Files
Last update 2 months 4 days
by
Arnaud-Apu-Fanovard
desktopEmbedded.js.téléchargement!function(){"use strict";var e={937:function(e,t){function r(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function n(e,t,n){e(null,{verifier:t,challenge:r(String.fromCharCode.apply(null,new Uint8Array(n)))})}t.A=function(e,t){e||(e=43);for(var i=window.msCrypto||window.crypto,o=r(Array.prototype.map.call(i.getRandomValues(new Uint8Array(e)),(function(e){return String.fromCharCode(e)})).join("")).substring(0,e),a=new Uint8Array(o.length),c=0;c<o.length;c++)a[c]=o.charCodeAt(c);var u=i.subtle.digest("SHA-256",a);window.CryptoOperation?(u.onerror=t,u.oncomplete=function(e){n(t,o,e.target.result)}):u.then((function(e){n(t,o,e)})).catch(t)}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}!function(){var e=crypto,t=function(e){return e instanceof CryptoKey};function n(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}var i=function(){var t,r=(t=function*(t,r){var n=`SHA-${t.slice(-3)}`;return new Uint8Array(yield e.subtle.digest(n,r))},function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function c(e){n(a,i,o,c,u,"next",e)}function u(e){n(a,i,o,c,u,"throw",e)}c(void 0)}))});return function(e,t){return r.apply(this,arguments)}}(),o=i;function a(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}var c=new TextEncoder,u=new TextDecoder,s=2**32;function l(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.reduce((function(e,t){var{length:r}=t;return e+r}),0),i=new Uint8Array(n),o=0;return t.forEach((function(e){i.set(e,o),o+=e.length})),i}function p(e,t,r){if(t<0||t>=s)throw new RangeError(`value must be >= 0 and <= ${s-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function f(e){var t=new Uint8Array(4);return p(t,e),t}function y(e){return l(f(e.length),e)}function h(){var e;return e=function*(e,t,r){for(var n=Math.ceil((t>>3)/32),i=new Uint8Array(32*n),a=0;a<n;a++){var c=new Uint8Array(4+e.length+r.length);c.set(f(a+1)),c.set(e,4),c.set(r,4+e.length),i.set(yield o("sha256",c),32*a)}return i.slice(0,t>>3)},h=function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function c(e){a(o,n,i,c,u,"next",e)}function u(e){a(o,n,i,c,u,"throw",e)}c(void 0)}))},h.apply(this,arguments)}var d=function(e){return function(e){var t=e;"string"==typeof t&&(t=c.encode(t));for(var r=[],n=0;n<t.length;n+=32768)r.push(String.fromCharCode.apply(null,t.subarray(n,n+32768)));return btoa(r.join(""))}(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},v=function(e){var t=e;t instanceof Uint8Array&&(t=u.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return function(e){for(var t=atob(e),r=new Uint8Array(t.length),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}(t)}catch(e){throw new TypeError("The input to be decoded is not correctly encoded.")}};function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,A(n.key),n)}}function g(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function A(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function E(e,t,r){return t=K(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,P()?Reflect.construct(t,r||[],K(e).constructor):t.apply(e,r))}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}function S(e){var t="function"==typeof Map?new Map:void 0;return S=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(P())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&C(i,r.prototype),i}(e,arguments,K(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),C(r,e)},S(e)}function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(P=function(){return!!e})()}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function K(e){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K(e)}var H=function(e){function t(e){var r,n;return w(this,t),(r=E(this,t,[e])).code="ERR_JOSE_GENERIC",r.name=r.constructor.name,null===(n=Error.captureStackTrace)||void 0===n||n.call(Error,r,r.constructor),r}return b(t,e),g(t,null,[{key:"code",get:function(){return"ERR_JOSE_GENERIC"}}])}(S(Error)),k=function(e){function t(){var e;return w(this,t),(e=E(this,t,arguments)).code="ERR_JOSE_NOT_SUPPORTED",e}return b(t,e),g(t,null,[{key:"code",get:function(){return"ERR_JOSE_NOT_SUPPORTED"}}])}(H),_=function(e){function t(){var e;return w(this,t),(e=E(this,t,arguments)).code="ERR_JWE_INVALID",e}return b(t,e),g(t,null,[{key:"code",get:function(){return"ERR_JWE_INVALID"}}])}(H);Symbol.asyncIterator;var U=e.getRandomValues.bind(e);function W(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new k(`Unsupported JWE Algorithm: ${e}`)}}var O=function(e){return U(new Uint8Array(W(e)>>3))},T=function(e,t){var r=e.byteLength<<3;if(r!==t)throw new _(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)};function R(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}var j=function(){var e,t=(e=function*(){throw new k('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `deflateRaw` encrypt option to provide Deflate Raw implementation.')},function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){R(o,n,i,a,c,"next",e)}function c(e){R(o,n,i,a,c,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}(),M=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function x(e){return new TypeError(`CryptoKey does not support this operation, its ${arguments.length>1&&void 0!==arguments[1]?arguments[1]:"algorithm.name"} must be ${e}`)}function D(e,t){return e.name===t}function B(e,t){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":if(!D(e.algorithm,"AES-GCM"))throw x("AES-GCM");var r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw x(r,"algorithm.length");break;case"A128KW":case"A192KW":case"A256KW":if(!D(e.algorithm,"AES-KW"))throw x("AES-KW");var n=parseInt(t.slice(1,4),10);if(e.algorithm.length!==n)throw x(n,"algorithm.length");break;case"ECDH":switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw x("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!D(e.algorithm,"PBKDF2"))throw x("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(!D(e.algorithm,"RSA-OAEP"))throw x("RSA-OAEP");var i=parseInt(t.slice(9),10)||1;if(o=e.algorithm.hash,parseInt(o.name.slice(4),10)!==i)throw x(`SHA-${i}`,"algorithm.hash");break;default:throw new TypeError("CryptoKey does not support this operation")}for(var o,a=arguments.length,c=new Array(a>2?a-2:0),u=2;u<a;u++)c[u-2]=arguments[u];!function(e,t){if(t.length&&!t.some((function(t){return e.usages.includes(t)}))){var r="CryptoKey does not support this operation, its usages must include ";if(t.length>2){var n=t.pop();r+=`one of ${t.join(", ")}, or ${n}.`}else 2===t.length?r+=`one of ${t[0]} or ${t[1]}.`:r+=`${t[0]}.`;throw new TypeError(r)}}(e,c)}function $(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];if(n.length>2){var o=n.pop();e+=`one of type ${n.join(", ")}, or ${o}.`}else 2===n.length?e+=`one of type ${n[0]} or ${n[1]}.`:e+=`of type ${n[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var I=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return $("Key must be ",e,...r)};function G(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return $(`Key for the ${e} algorithm must be `,t,...n)}var J=function(e){return t(e)},z=["CryptoKey"];function F(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}var V=function(){var r,n=(r=function*(r,n,i){var o=yield function(r,n,i){if(t(r))return B(r,n,i),r;if(r instanceof Uint8Array)return e.subtle.importKey("raw",r,"AES-KW",!0,[i]);throw new TypeError(I(r,...z,"Uint8Array"))}(n,r,"wrapKey");!function(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw new TypeError(`Invalid key size for alg: ${t}`)}(o,r);var a=yield e.subtle.importKey("raw",i,...M);return new Uint8Array(yield e.subtle.wrapKey("raw",a,o,"AES-KW"))},function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){F(o,n,i,a,c,"next",e)}function c(e){F(o,n,i,a,c,"throw",e)}a(void 0)}))});return function(e,t,r){return n.apply(this,arguments)}}();function X(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}function N(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){X(o,n,i,a,c,"next",e)}function c(e){X(o,n,i,a,c,"throw",e)}a(void 0)}))}}function L(){return L=N((function(r,n,i,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new Uint8Array(0),u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:new Uint8Array(0);return function*(){if(!t(r))throw new TypeError(I(r,...z));if(B(r,"ECDH"),!t(n))throw new TypeError(I(n,...z));B(n,"ECDH","deriveBits");var s,p=l(y(c.encode(i)),y(a),y(u),f(o));return s="X25519"===r.algorithm.name?256:"X448"===r.algorithm.name?448:Math.ceil(parseInt(r.algorithm.namedCurve.substr(-3),10)/8)<<3,function(e,t,r){return h.apply(this,arguments)}(new Uint8Array(yield e.subtle.deriveBits({name:r.algorithm.name,public:r},n,s)),o,p)}()})),L.apply(this,arguments)}function q(){return(q=N((function*(r){if(!t(r))throw new TypeError(I(r,...z));return e.subtle.generateKey(r.algorithm,!0,["deriveBits"])}))).apply(this,arguments)}function Y(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}function Q(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Y(o,n,i,a,c,"next",e)}function c(e){Y(o,n,i,a,c,"throw",e)}a(void 0)}))}}function Z(e,t,r,n){return ee.apply(this,arguments)}function ee(){return(ee=Q((function*(r,n,i,o){!function(e){if(!(e instanceof Uint8Array)||e.length<8)throw new _("PBES2 Salt Input must be 8 or more octets")}(r);var a=function(e,t){return l(c.encode(e),new Uint8Array([0]),t)}(n,r),u=parseInt(n.slice(13,16),10),s={hash:`SHA-${n.slice(8,11)}`,iterations:i,name:"PBKDF2",salt:a},p={length:u,name:"AES-KW"},f=yield function(r,n){if(r instanceof Uint8Array)return e.subtle.importKey("raw",r,"PBKDF2",!1,["deriveBits"]);if(t(r))return B(r,n,"deriveBits","deriveKey"),r;throw new TypeError(I(r,...z,"Uint8Array"))}(o,n);if(f.usages.includes("deriveBits"))return new Uint8Array(yield e.subtle.deriveBits(s,f,u));if(f.usages.includes("deriveKey"))return e.subtle.deriveKey(s,f,p,!1,["wrapKey","unwrapKey"]);throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}))).apply(this,arguments)}var te=function(){var e=Q((function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2048,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:U(new Uint8Array(16));return function*(){var o=yield Z(i,e,n,t);return{encryptedKey:yield V(e.slice(-6),o,r),p2c:n,p2s:d(i)}}()}));return function(t,r,n){return e.apply(this,arguments)}}();function re(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new k(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function ne(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}var ie=function(){var r,n=(r=function*(r,n,i){if(!t(n))throw new TypeError(I(n,...z));if(B(n,r,"encrypt","wrapKey"),function(e,t){if(e.startsWith("RS")||e.startsWith("PS")){var{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}}(r,n),n.usages.includes("encrypt"))return new Uint8Array(yield e.subtle.encrypt(re(r),n,i));if(n.usages.includes("wrapKey")){var o=yield e.subtle.importKey("raw",i,...M);return new Uint8Array(yield e.subtle.wrapKey("raw",o,n,re(r)))}throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')},function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){ne(o,n,i,a,c,"next",e)}function c(e){ne(o,n,i,a,c,"throw",e)}a(void 0)}))});return function(e,t,r){return n.apply(this,arguments)}}();function oe(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new k(`Unsupported JWE Algorithm: ${e}`)}}var ae=function(e){return U(new Uint8Array(oe(e)>>3))};function ce(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}var ue=function(){var t,r=(t=function*(t){var r,n;if(!t.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');var{algorithm:i,keyUsages:o}=function(e){var t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new k(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new k('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(t),a=[i,null!==(r=t.ext)&&void 0!==r&&r,null!==(n=t.key_ops)&&void 0!==n?n:o];if("PBKDF2"===i.name)return e.subtle.importKey("raw",v(t.k),...a);var c={...t};return delete c.alg,delete c.use,e.subtle.importKey("jwk",c,...a)},function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(e){ce(o,n,i,a,c,"next",e)}function c(e){ce(o,n,i,a,c,"throw",e)}a(void 0)}))});return function(e){return r.apply(this,arguments)}}(),se=ue;function le(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}function pe(){return(e=function*(e,t,r){var n;if(!function(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;for(var r=e;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return null!=r||(r=!0!==e.ext),r?se({...e,alg:t,ext:null!==(n=e.ext)&&void 0!==n&&n}):v(e.k);case"RSA":if(void 0!==e.oth)throw new k('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return se({...e,alg:t});default:throw new k('Unsupported "kty" (Key Type) Parameter value')}},pe=function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){le(o,n,i,a,c,"next",e)}function c(e){le(o,n,i,a,c,"throw",e)}a(void 0)}))}).apply(this,arguments);var e}function fe(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}function ye(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){fe(o,n,i,a,c,"next",e)}function c(e){fe(o,n,i,a,c,"throw",e)}a(void 0)}))}}function he(){return(he=ye((function*(t,r,n,i,o){if(!(n instanceof Uint8Array))throw new TypeError(I(n,"Uint8Array"));var a,c,u,f,y=parseInt(t.slice(1,4),10),h=yield e.subtle.importKey("raw",n.subarray(y>>3),"AES-CBC",!1,["encrypt"]),d=yield e.subtle.importKey("raw",n.subarray(0,y>>3),{hash:"SHA-"+(y<<1),name:"HMAC"},!1,["sign"]),v=new Uint8Array(yield e.subtle.encrypt({iv:i,name:"AES-CBC"},h,r)),w=l(o,i,v,(a=o.length<<3,c=Math.floor(a/s),u=a%s,p(f=new Uint8Array(8),c,0),p(f,u,4),f));return{ciphertext:v,tag:new Uint8Array((yield e.subtle.sign("HMAC",d,w)).slice(0,y>>3))}}))).apply(this,arguments)}function de(){return(de=ye((function*(t,r,n,i,o){var a;n instanceof Uint8Array?a=yield e.subtle.importKey("raw",n,"AES-GCM",!1,["encrypt"]):(B(n,t,"encrypt"),a=n);var c=new Uint8Array(yield e.subtle.encrypt({additionalData:o,iv:i,name:"AES-GCM",tagLength:128},a,r)),u=c.slice(-16);return{ciphertext:c.slice(0,-16),tag:u}}))).apply(this,arguments)}var ve=function(){var e=ye((function*(e,r,n,i,o){if(!(t(n)||n instanceof Uint8Array))throw new TypeError(I(n,...z,"Uint8Array"));switch(function(e,t){if(t.length<<3!==W(e))throw new _("Invalid Initialization Vector length")}(e,i),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return n instanceof Uint8Array&&T(n,parseInt(e.slice(-3),10)),function(e,t,r,n,i){return he.apply(this,arguments)}(e,r,n,i,o);case"A128GCM":case"A192GCM":case"A256GCM":return n instanceof Uint8Array&&T(n,parseInt(e.slice(1,4),10)),function(e,t,r,n,i){return de.apply(this,arguments)}(e,r,n,i,o);default:throw new k("Unsupported JWE Content Encryption Algorithm")}}));return function(t,r,n,i,o){return e.apply(this,arguments)}}(),we=ve;function me(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}function ge(){return(e=function*(e,t,r,n){var i=e.slice(0,7);n||(n=O(i));var{ciphertext:o,tag:a}=yield we(i,r,t,n,new Uint8Array(0));return{encryptedKey:o,iv:d(n),tag:d(a)}},ge=function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){me(o,n,i,a,c,"next",e)}function c(e){me(o,n,i,a,c,"throw",e)}a(void 0)}))}).apply(this,arguments);var e}function Ae(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}var Ee=function(){var r,n=(r=function*(r){if(r instanceof Uint8Array)return{kty:"oct",k:d(r)};if(!t(r))throw new TypeError(I(r,...z,"Uint8Array"));if(!r.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");var{ext:n,key_ops:i,alg:o,use:a,...c}=yield e.subtle.exportKey("jwk",r);return c},function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){Ae(o,n,i,a,c,"next",e)}function c(e){Ae(o,n,i,a,c,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}(),be=Ee;function Se(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}function Pe(){return(e=function*(e){return be(e)},Pe=function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Se(o,n,i,a,c,"next",e)}function c(e){Se(o,n,i,a,c,"throw",e)}a(void 0)}))}).apply(this,arguments);var e}function Ce(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}function Ke(){var e;return e=function(e,r,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return function*(){var a,c,u;switch(function(e,t,r){e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?function(e,t){if(!(t instanceof Uint8Array)){if(!J(t))throw new TypeError(G(e,t,...z,"Uint8Array"));if("secret"!==t.type)throw new TypeError(`${z.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}}(e,t):function(e,t,r){if(!J(t))throw new TypeError(G(e,t,...z));if("secret"===t.type)throw new TypeError(`${z.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${z.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${z.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${z.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${z.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)}(e,t,r)}(e,n,"encrypt"),e){case"dir":u=n;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":if(!function(e){if(!t(e))throw new TypeError(I(e,...z));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||"X25519"===e.algorithm.name||"X448"===e.algorithm.name}(n))throw new k("ECDH with the provided key is not allowed or not supported by your javascript runtime");var{apu:s,apv:l}=o,{epk:p}=o;p||(p=(yield function(e){return q.apply(this,arguments)}(n)).privateKey);var{x:f,y:y,crv:h,kty:v}=yield function(e){return Pe.apply(this,arguments)}(p),w=yield function(e,t,r,n){return L.apply(this,arguments)}(n,p,"ECDH-ES"===e?r:e,"ECDH-ES"===e?oe(r):parseInt(e.slice(-5,-2),10),s,l);if(c={epk:{x:f,crv:h,kty:v}},"EC"===v&&(c.epk.y=y),s&&(c.apu=d(s)),l&&(c.apv=d(l)),"ECDH-ES"===e){u=w;break}u=i||ae(r);var m=e.slice(-6);a=yield V(m,w,u);break;case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":u=i||ae(r),a=yield ie(e,n,u);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":u=i||ae(r);var{p2c:g,p2s:A}=o;({encryptedKey:a,...c}=yield te(e,n,u,g,A));break;case"A128KW":case"A192KW":case"A256KW":u=i||ae(r),a=yield V(e,n,u);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":u=i||ae(r);var{iv:E}=o;({encryptedKey:a,...c}=yield function(e,t,r,n){return ge.apply(this,arguments)}(e,n,u,E));break;default:throw new k('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:u,encryptedKey:a,parameters:c}}()},Ke=function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Ce(o,n,i,a,c,"next",e)}function c(e){Ce(o,n,i,a,c,"throw",e)}a(void 0)}))},Ke.apply(this,arguments)}function He(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}function ke(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_e(n.key),n)}}function _e(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}var Ue=Symbol(),We=function(){return e=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!(t instanceof Uint8Array))throw new TypeError("plaintext must be an instance of Uint8Array");this._plaintext=t},t=[{key:"setKeyManagementParameters",value:function(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}},{key:"setProtectedHeader",value:function(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}},{key:"setSharedUnprotectedHeader",value:function(e){if(this._sharedUnprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=e,this}},{key:"setUnprotectedHeader",value:function(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}},{key:"setAdditionalAuthenticatedData",value:function(e){return this._aad=e,this}},{key:"setContentEncryptionKey",value:function(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}},{key:"setInitializationVector",value:function(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}},{key:"encrypt",value:(r=function*(e,t){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new _("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=t.filter(Boolean);if(0===i.length||1===i.length)return!0;for(var o of i){var a=Object.keys(o);if(n&&0!==n.size)for(var c of a){if(n.has(c))return!1;n.add(c)}else n=new Set(a)}return!0}(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new _("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");var r={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(function(e,t,r,n,i){if(void 0!==i.crit&&void 0===n.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some((function(e){return"string"!=typeof e||0===e.length})))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');var o;for(var a of(o=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t,n.crit)){if(!o.has(a))throw new k(`Extension Header Parameter "${a}" is not recognized`);if(void 0===i[a])throw new e(`Extension Header Parameter "${a}" is missing`);if(o.get(a)&&void 0===n[a])throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}new Set(n.crit)}(_,new Map,null==t?void 0:t.crit,this._protectedHeader,r),void 0!==r.zip){if(!this._protectedHeader||!this._protectedHeader.zip)throw new _('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==r.zip)throw new k('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}var n,i,o,a,s,p,f,y,{alg:h,enc:v}=r;if("string"!=typeof h||!h)throw new _('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof v||!v)throw new _('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if("dir"===h){if(this._cek)throw new TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}else if("ECDH-ES"===h&&this._cek)throw new TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement");if(({cek:i,encryptedKey:n,parameters:o}=yield function(e,t,r,n){return Ke.apply(this,arguments)}(h,v,e,this._cek,this._keyManagementParameters)),o&&(t&&Ue in t?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...o}:this.setUnprotectedHeader(o):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...o}:this.setProtectedHeader(o)),this._iv||(this._iv=O(v)),s=this._protectedHeader?c.encode(d(JSON.stringify(this._protectedHeader))):c.encode(""),this._aad?(p=d(this._aad),a=l(s,c.encode("."),c.encode(p))):a=s,"DEF"===r.zip){var w=yield((null==t?void 0:t.deflateRaw)||j)(this._plaintext);({ciphertext:f,tag:y}=yield we(v,w,i,this._iv,a))}else({ciphertext:f,tag:y}=yield we(v,this._plaintext,i,this._iv,a));var m={ciphertext:d(f),iv:d(this._iv),tag:d(y)};return n&&(m.encrypted_key=d(n)),p&&(m.aad=p),this._protectedHeader&&(m.protected=u.decode(s)),this._sharedUnprotectedHeader&&(m.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(m.header=this._unprotectedHeader),m},n=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){He(o,n,i,a,c,"next",e)}function c(e){He(o,n,i,a,c,"throw",e)}a(void 0)}))},function(e,t){return n.apply(this,arguments)})}],t&&ke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,n}();function Oe(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,i)}function Te(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Re(n.key),n)}}function Re(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}var je=function(){return r=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._flattened=new We(t)},n=[{key:"setContentEncryptionKey",value:function(e){return this._flattened.setContentEncryptionKey(e),this}},{key:"setInitializationVector",value:function(e){return this._flattened.setInitializationVector(e),this}},{key:"setProtectedHeader",value:function(e){return this._flattened.setProtectedHeader(e),this}},{key:"setKeyManagementParameters",value:function(e){return this._flattened.setKeyManagementParameters(e),this}},{key:"encrypt",value:(e=function*(e,t){var r=yield this._flattened.encrypt(e,t);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")},t=function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Oe(o,n,i,a,c,"next",e)}function c(e){Oe(o,n,i,a,c,"throw",e)}a(void 0)}))},function(e,r){return t.apply(this,arguments)})}],n&&Te(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var e,t,r,n}(),Me=r(937);window.lpTag=window.lpTag||{},window.lpTag.pkce={importJWK:function(e,t,r){return pe.apply(this,arguments)},getPkce:Me.A,CompactEncrypt:je}}()}();;window.lpTag=window.lpTag||{};lpTag.taglets=lpTag.taglets||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.log=lpTag.unifiedWindow.log||function(){var a,n="UnifiedWindowLogger",o={ERROR:1,INFO:2,DEBUG:3},s=["lp_SMT","lp_monitoringSDK","LP_OFFER"],r=o.ERROR,l={isEnabled:!1},d={level:0},c="",u=[],t={APP_STARTED:"appStarted",APP_ENDED:"appEnded"},p=!1;function h(e,t){i(e,"ERROR",t||n)}function f(e){o[e]&&(r=o[e])}function g(){if(0<d.level&&d.queueSubmissionIntervalMilliseconds&&!isNaN(d.queueSubmissionIntervalMilliseconds)){var e=this,t=u.splice(0,d.queueSubmissionMaximum||u.length);if(0<t.length){var i=new XMLHttpRequest;i.open("POST",c,!0);i.setRequestHeader("Content-Type","application/json");i.onreadystatechange=function(){if(4===i.readyState){if(200!==i.status){u=u.concat(t);h("There was an error sending logs to Loggos: "+i.statusText,n)}setTimeout(function(){g.call(e)},d.queueSubmissionIntervalMilliseconds)}};i.send(JSON.stringify(t))}else setTimeout(function(){g.call(e)},d.queueSubmissionIntervalMilliseconds)}}function i(e,t,i){window.lpTag&&lpTag.log&&e&&lpTag.log(e,t,i||n)}return{init:function(e){a=lpTag.taglets.lpUtil;d=a.cloneExtend(e.loggosLogging||{},d,!0);c="https://"+lpTag.csds.getDomain("loggos")+"/api/loggos/log/";var t=a.getURLParams(window.location.search),i=t.lpDebug;if(i){l.isEnabled=!0;"2"===i&&"true"===t.debugLevel?f("DEBUG"):f(Object.keys(o).reduce(function(e,t){return e=o[t]===+i?t:e},r))}else if(e.debug){l.isEnabled=!0;f("INFO")}window.lpTaglogListeners=window.lpTaglogListeners||[];l.isEnabled&&window.lpTaglogListeners.push(function(e,t,i){window.console&&t&&o[t]<=r&&-1===a.indexOf(s,i)&&console.log((n=new Date).getHours()+":"+(n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes())+":"+(n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds())+" "+i+" : "+e+" LEVEL: "+t);var n});if(0<d.level){d.inSample=!d.samplingPercentage||1e3*d.samplingPercentage>(new Date).getMilliseconds();if(d.inSample){window.lpTaglogListeners.push(function(e,t,i){if(t&&o[t]<=d.level&&p&&-1===a.indexOf(s,i)){t={accountId:lpTag.site,appVersion:lpTag.taglets.lpUnifiedWindow.v,context:"webMessaging",immediate:!0,logLevel:t,msg:t+" : "+i+" : "+e,time:(new Date).toISOString(),trace:!1,url:window.location.href};u.push(t)}});g()}}},error:h,info:function(e,t){i(e,"INFO",t||n)},debug:function(e,t){i(e,"DEBUG",t||n)},setLogLevel:f,logLevels:o,events:t,triggerEvent:function(e){switch(e){case t.APP_STARTED:p=!0;break;case t.APP_ENDED:p=!1}},loggosLogging:d,loggosLogQueue:u}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.apps={AUTHENTICATION:"authenticationDelegate",STEP_UP:"stepUpManager",CHAT:"API",CHAT_STATE:"ChatStateManager",APPLICATION:"EmbeddedWindowApplication",HEARTBEAT:"HeartBeatManager",UISTATE:"UIStateManager",UNIFIED_WINDOW:"lpUnifiedWindow",SECURE_FORM:"leSecureForm",WINDOW_SDK:"windowSDK",COBROWSE:"cobrowse",RICH_CONTENT:"richContent",FILE_SHARE:"fileShare",QUICK_REPLIES:"quickReplies",MAVEN_PAY:"mavenPay",DATE_PICKER:"datePicker",SCHEDULE_LIST:"scheduleList"};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.events={chat:{ERROR:"error",INITIALIZED:"initialized",BLOD:"blueLightOfDeath(Ended)",CHATTING:"chatting",STATE:"state",CONVERSATION_STATE:"conversationState",DIALOG_STATE:"dialogState",CONVERSATION_CLOSED:"conversationClosed",CHAT_INFO:"chatInfo",USER_INFO:"userInfo",USER_LEFT:"userLeft",ENGAGEMENT_DATA:"engagementData",LINE:"line",COLLABORATION:"collaboration",SECURE_FORM:"leSecureForm",FINISHED_EVENTS_BULK:"finishEventsBulk",AGENT_TYPING:"agentIsTyping",AVAILABILITY:"availability",SURVEY_ERROR:"surveyError",SURVEY_SERVER_ERROR:"surveyServerError",EMAIL_TRANSCRIPT_SUCCESS:"emailTranscriptSuccess",EMAIL_TRANSCRIPT_ERROR:"emailTranscriptError",AUTHENTICATION_ERROR:"authenticationError",START_CHAT_INFO:"startChatInfo",TTR_INFO:"ttrInfo",CSAT_INFO:"csatInfo",BRAND_INFO:"brandInfoReceived",CONVERSATION_OWNER_BRAND_INFO:"conversationOwnerBrandInfoReceived",CONVERSATION_CONTENT:"conversationContent",SUBSCRIBE_MESSAGING_EVENTS_RESPONSE:"subscribeMessagingEventsResponse",CONVERSATION_HISTORY:"conversationHistory",NEW_CONVERSATION_REQUESTED:"newConversationRequested",NEW_CONVERSATION_CREATED:"newConversationCreated",MULTIPLE_CHANNELS_REQUESTED:"multipleChannelsRequested",SESSION_DATA:"sessionData",NO_SESSION:"noSession",FAILED_START_CONVERSATION:"failedStartConversation",FORGET_ME:"forgetMe",SET_REFRESH_MODEL_DELAY:"setRefreshModelDelaySec",CLOSE_WINDOW_FORGET_ME:"closeWindowForgetMe",DELETE_CONVERSATION_SUBSCRIPTION:"onDeletedSubscriptionFromConversation",CONVERSATION_STEP_UP:"onConversationStepUp",SIGNAL_OUT:"SIGNAL_OUT",SIGNAL_IN:"SIGNAL_IN"},socket:{CONNECTED:"socketConnected",INITIALIZED:"socketInitialized",DISCONNECTED:"socketDisconnected",NON_RESPONSIVE:"socketNonResponsive",PING_SUCCESS:"pingSuccess"},application:{PROCESSING:"processing",OFFLINE_SURVEY:"offlineSurvey",PRE_CHAT_SURVEY:"preChatSurvey",POST_CHAT_SURVEY:"postChatSurvey",PRE_SMS_FORM:"preSmsForm",PRE_SMS_FORM_EXIT:"preSmsFormExit",END_CHAT:"endChat",END_SURVEY:"endSurvey",ENDED:"appEnded",DO_HARAKIRI:"doHaraKiri(Seppuku)"},heartBeat:{INIT:"init",FAILED:"failed",RESUMED:"resumed"},uiState:{POP_OUT:"popOut",EMBEDDED_CHANGED:"embeddedChanged",MAXIMIZED:"maximized",MINIMIZED:"minimized",ACTIONS_TOGGLE:"actionsToggle",SEND_BUTTON:"sendButton",INPUT:"input",PAPER_PLANE_BUTTON:"paperPlaneButton",FOCUS_CHANGE_EVENT:"focusChanged",EMOJI_FOCUS_ON_CLICK:"emojiFocus"},chatState:{ENDED:"ended"},unifiedWindow:{MAXIMIZE:"maximize"},viewController:{INITIATE_END_CHAT:"endChatInitiate",CLICKED:"clicked",DIALOG:"dialog",DIALOG_CLOSED:"dialogClosed",DIALOG_STATE_CHANGED:"dialogStateChanged",SLIDER_CLOSED:"sliderClosed",PREPARE_SLIDER_CLOSED_TIMEOUT:"prepareSliderCloseTimeout",SLIDER_VIEW_CHANGE:"sliderViewChange",CLOSE_ACTIONS:"closeActions",VISITOR_HAS_TYPED:"visitorHasTyped",MAXIMIZE_VISIBLE:"maximizeVisible",MINIMIZE_VISIBLE:"minimizeVisible",LINE_ADDED:"lineAdded",LINES_VIEWED:"linesViewed",CONVERSATIONS_VIEWED:"conversationsViewed",RETRY_GET_HISTORY:"retryGetHistory",END_OF_HISTORY:"endOfHistory",CB_OFFER:"cbOffer",THANK_YOU_PAGE:"thankYouPage",SHOW_FORGET_ME:"forgetMeDialog",CLOSE_WINDOW_FORGET_ME:"closeWindowForgetMe",LINE_UPDATE:"lineUpdate",UPDATE_TIME_STAMP:"updateTimeStamp",UPDATE_ACCESSIBILITY_MESSAGE:"updateAccessibilityMessage",SCROLL_CONVERSATION_TO_BOTTOM:"scrollConversationToBottom",FLUTTER_OPEN:"flutterOpen",FLUTTER_CLOSE:"flutterClose",FLUTTER_IS_CLOSED:"flutterIsClosed",FLUTTER_STYLE_UPDATE:"flutterStyleUpdate",DATE_PICKER_SHOW:"DatePickerShow",ADD_PRODUCT_DETAILS:"addProductDetails",SCHEDULE_LIST_SHOW:"ScheduleListShow",HISTORY_TRY_NEXT:"historyTryNext"},coBrowseEvents:{OFFERED:"cobrowseOffered",ACCEPTED:"cobrowseAccepted",DECLINE:"cobrowseDeclined",TIMEOUT:"cobrowseTimeout",INVITED:"cobrowseInvited",STARTED:"sessionStarted",RESUME:"sessionResume",ERROR:"sessionError",CANCELED:"cobrowseCanceled",DIALOG_CREATED:"cobrowseDialogCreated",RENDER_CALL_SCREEN:"cobrowseRenderCallScreen",SLIDER_OPENED:"sliderOpened",MAXIMIZE:"maximize"},widgetSDK:{INIT:"init",PARTICIPANTS:"participants",MESSAGES:"messages",WIDGET_AREA_STATE:"widgetAreaState",CONVERSATION_STATE:"conversationState",CONVERSATION_INFO:"conversationInfo",ENGAGEMENT_INFO:"engagementInfo",NOTIFICATION:"notification",VISITOR_TYPING:"visitorTyping",AGENT_TYPING:"agentTyping",DISPOSED_WIDGET_ID:"disposedWidgetID",INITIATED_WIDGET_ID:"initiatedWidgetID",WIDGET_NOTIFICATION:"widgetNotification"},imageShare:{IMAGE_SELECTED:"imageSelected",FILE_UPLOAD_URL_READY:"fileUrlGenerated",FILE_DONE_UPLOADED:"fileUploaded",FILE_UPLOAD_RETRY:"fileUploadRetry",FILE_DOWNLOAD_REQUEST:"fileDownloadRequest",SHOW_PREVIEW:"showPreview",OVERLAY_CLOSED:"overlayClosed",IMAGE_PREVIEW_CLOSED:"ImagePreviewClosed",IMAGE_PREVIEW_SHOW:"ImagePreviewShow",FILE_VALIDATION:"fileValidation"},richContent:{DISABLE_RICH_CONTENT:"disableRichContent",UPDATE_RICH_CONTENT_LINE:"updateRCLine"},wrapperWindowExtender:{WINDOW_SCALE_SET:"windowScaleSet"},accessibility:{SET_INPUT_FOCUS:"setInputFocus"}};lpTag.unifiedWindow.publicEvents=lpTag.unifiedWindow.publicEvents||{API:{state:[{appName:"lpUnifiedWindow",eventName:"state",data:{state:"data"}},{appName:"ChatAPIV3",eventName:"state",data:"data"}],chatInfo:{appName:"lpUnifiedWindow",eventName:"conversationInfo",data:{agentName:"data.agentName",agentId:"data.agentId",conversationId:"data.rtSessionId",state:"data.chatState",monitoringSessionId:"data.monitoringSessionId",visitorId:"data.visitorId",skill:"data.skill",skillName:"data.skillName",engagementId:"data.engagementId",campaignId:"data.campaignId",language:"data.language",engagementName:"data.engagementName"}}}};lpTag.unifiedWindow.SurveyType={PRE_CHAT:"PreChatSurvey",EXIT_CHAT:"ExitSurvey",OFFLINE:"OfflineSurvey",CSAT:"CSAT",PRE_SMS:"PreSmsSurvey"};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.consts={dialog:{actions:{CONFIRM:"confirm",CANCEL:"cancel"}},views:{TOP_MENU:"topMenu",ACTION_MENU:"actionMenu"},chatEvents:{LINE:"line",INFO:"info",COBROWSE:"cobrowse",SECURE_FORM:"leSecureForm",RICH_CONTENT:"richContent",FILE_SHARING:"hosted/file",MAVEN_PAY:"mavenPay"},errorTypes:{CONNECTION_UNAVAILABLE:"CONNECTION_UNAVAILABLE",AUTH_ERROR:"AUTH_ERROR",FAILED_START_CONVERSATION_ERROR:"FAILED_START_CONVERSATION_ERROR"},authErrorsTypes:{EXPIRED:"expired",INVALID_SESSION:"invalidSession",LOGOUT:"logout"},SecureForm:{LINK_CLICKED:"secureFormClicked",HIDE_CONVO:"hideMessagingConversation"},RichContent:{ACTION:"richContentAction",RICH_CONTENT_LINE:"rich-content",RICH_CONTENT_TYPE:"richcontent",LINK_CLICKED:"richContentLinkClicked"},engagementContainerClass:"LPMcontainer",reCaptchaContainerClass:"reCaptchaContainer",authConnectorTypes:{S2S:0,OAUTH_IMPLICIT:1,OAUTH_CODE:2,STEP_UP:3},defaultRedirectUri:"https://liveperson.net",slider:{viewType:{widgetSDKView:"widgetSDKView",PCIFormView:"pciFormView",CoBrowseInvite:"cobrowseInviteView",CoBrowseCallConnecting:"cobrowseCallConnectingView",RichContentLinkAction:"richContentLinkAction",MavenPayLinkView:"MavenPayLinkView"}},widgetSDK:{WIDGET_NAME:"widgetName",AGENT:"agent",AGENT_ID:"agentId",VISITOR:"visitor",VISITOR_ID:"visitorId",SESSION_ID:"sessionId",MONTORING_SESSION_ID:"monitoringSessionId",ACCOUNT_ID:"accountId",CHANNEL_TYPE_MESSAGING:"messaging",CHANNEL_TYPE_CHAT:"chat",contentType:{text:"text/message",richContent:"text/richContent"}},csatStatus:{FILLED:"FILLED",PARTIALLY_FILLED:"PARTIALLY_FILLED",SKIPPED:"SKIPPED",EMPTY:"EMPTY"},coBrowse:{acceptedCoBrowseModes:["view","shared","follow","VIDEO_CALL","VOICE_CALL"],coBrowseChannelName:"COBROWSE"},engagementTypes:{CHAT_ENGAGEMENT:"chat",MESSAGING_ENGAGEMENT:"messaging"},richContentActionTypes:{LINK:"link",NAVIGATE:"navigate",PUBLISH_TEXT:"publishText",CAROUSEL_OFFSET_CHANGE:"carouselOffsetChange",CHECKED:"checked",SUBMIT_AS_TEXT:"submitAsText",DATE_PICKER:"datePicker",SCHEDULE_SLOT_LIST:"scheduleSlotList",ADD_TO_CART:"addToCart"},fileSharing:{fileAttributes:{TYPE:"type",SIZE:"size"},fallbackThumbnail:{URI:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABaCAYAAAAFOiBkAAAAAXNSR0IArs4c6QAACf9JREFUeAHtXelzFMcVf7u6FnQAlkDoQAe7qwuBHISQQSIFCGRIikDssp2kqLjs2FWO+ZB/If9CPqeKipNUOR9CiEOEAVsWBowBGxuD0YEudEvoAq/uA/J+rZ3JaLSjnVnNrIw0jxptT0/P6+5fv37d/fpN4yAVNTU1Fc7MzLzL0ceePXuWwpdLlWRF3Docjgm+ergy5yIjI//s8Xi+V1bMId0wAFENDQ1/4vu3ExMTI+Pj4yOio6OJX5aSrKhfri9NTU2Rz+ebHRwcnOHKnc7Nzf0D13caFRW19oNS7XK5StLS0lyM4IoCIVhluIdQV1fXBNNXDE4FwHHiJUgKQMnMzFx1oKD+EATUHRj4ew05/Drla7fbHbPaJAWgKAmS09zcPMk47HJC0UKnrHZQABAwABbABF3pGBStErnVHPZjcczJijcFo49NcwgAC2ACYFwrdUgOpbGBBTARo1IoDFb6OzYwGi1sA2MDo4GARrQtMTYwGghoRNsSowGMZcvop0+f0hfXv6Ta2loaGRnVyD706Li4WCooKKCyvXvI6TS/fS0DBqDcuvVV6DUP8ibAlvjvKy8Lktr4Y/Oh9pcBkhIOsiofy4CxovsEAtqqfCzrSoEqoY7LyMigA/t/KqJrLl+h9vZ2dZJlu7dMYvTUCKDExcWJSwJIz3vhSLOswISjgqHmsazAoPuMjIyIC+EfEy2rjoFO+eCvf/8x4SGXZVmBkUsRIBAREUGvvnJC7Gv988xZmp2dDZDKuqhl6UpZWZm0YcOGRWu1c+dPaOPGjZSUlEQIh5vCDozX66Gf/+wovf7aq7R169aA9U1IiKdiBRgIIy6cFFZg0D32vFQq6oetiqNHKqm4eOeC+u7bV05IKxHCiAsnhRWYF4t2EG9PzKvfS6W7qeLgAXkhmJWZSbjUpBWvTmfWfdiAWbNmjaauyMvLpePHj1FsbOyikqGWJLNACMQnbMCU7i6hxfavUlNS6Ne/emNRXaLWPYEqZFZcWIBBhQoK8oOWOSYm+MYfRiiXKyYor6UmCAsws7NPaWxsbKllFe+PjY+bwicYE8smeLCwSSaB0dFR+ssHfwtWlpCeIx8ryDKJgdkxHGRVPpZJDGyxoHDYfK1oAMuAgYEatlgr7LFWAKHmaVlXUmf0vN3bwGi0mA2MDYwGAhrRtsTYwGggoBFtS4wNjAYCGtG2xNjAaCCgEW1LjAYwpq+VsLPY3d1DcBzasiVdmCuRd29vH01MTgS058Is0ffoEW1OTqa1a9fKRTXCq7X1ofgWAHmaQaYCc+fOd3T58yvzNscqKg4SjODXv7xBPT09dOr99xaUu6Ozk6qqPqZfnjjOWyrZ4rkRXjfZQenatS+o8vAh0RgLMgghwjRgWlpaqfqzGsrI2EIAIyY6hh62PSSvx2O4WEZ4QRKvs/dWbk4Obd9eaDgvrRdMA+YqtxjoyMuV8hbJthCNVXp5TU9PU9X5j4UbyeHDFVp1DCneFOU7MzNL/F2h2E5V7xsZLZURXpDQx48fU2XlIYqJMddAbgow4+Nj+GKDkpM3GcVhQXq9vCYnJ+n+/Tk/v+am5gV8lhphCjDwioLFrrOza6nlEd1CDy80BHQKlPWd7+7iY88l561kYAow+MYnmYfaJ0+eiC4lZYDCQw8YIb28oqKi6OCB/XToUAUhfPHSp4RuaBZFnDp16o9wt1gqJSQkUG1dHTXz6ORg6RkYGKDPr1ylwYFBys7Oorr6BqEPIA1d3d3ylZSUKOIbG5soPy9PuIfo4YW5D/a9Y/iLNGzA1dbWiWlCoH1vo3VD2U0blTIzM+jE8V/QZzWXqYYvEBRxEc9hJMJXqlevXpNuxW9ujnfePW708FK+VLRjB9Uz8Ldvf8PDtpc2b96sfBxS2MHbG8/y84Nvnxrhzh92c3KHKVupZvLSW4c6lnzTJEaZKX/YrbxdUthMXkYKYoryNZLh85LWBkajpWxgNIDRpWM6OjppeibwfCQ6KprS09MEe5gaunkoHhwcYgegBEpNTdGcqrexj6+D/2HRqSQM5VOTU2KIb2ltpXiePGI64WNzRn9/vzKpCK9ft46POhkRJoe0tFT5OcwYL7BnKOY4ILih9Pb10Ub2AtWzbNEFzMVLn4jJm5yrIgB30zd/e5Iwr/j3R+fY7tIrP4XrGDw0A9lI7t69Rw8eNNK777wtQMRLOM/lzJl/UQp7V8Hl9ezZj4TD0dEjL1N7WztduHhJ5i0FdhUX09DwEHV0dND7v39PAIRn/+Gy7C3bQ9JC9ls2idy4cZNOnvyNecDA9XSWpQH04Yf/4EnYC3SEPS5BkX7vygsXLtHQ0JCwqUAK+rh1qs5foP9Wnad3fveW3HLiJf6DAgOYhoYHVFKyS0Rjkjc9PUPbC7XNB8g3NfX/kuHixWNzSwvBVPGwrY08brew+/zg8wneEjB8yodogORN+tZzunQMusWG9evF5XA4KYpdUaV7iGVf3yNRKLd7q1i7wFWVD+ihMm4xiHA9V15NkAhY65TPMHPG8Oz1etTJ5fv4uHg5b5QBTo8AAzPqJv9iEmCD2ljKMA/CUqW/f4BtQ26ZT7CArq4UjEn/wFzfT0+fb1ZElwA9Hh5ewAIVyWdvzdvffEvD/DySdQF0GWbK8OvFOisQwVYDMEClu3eJBgCYWzhvSA303IPGRtEdYTFsZLCmpiZF+sUAFwkUf3RJjCJ9wODkxFzGUJRKkhTf1FRgxS15Q0Fq6urqBRiFhduULBaEcWSWdPlPkhJpvDkeGmf/PHwnCWVcWloilDafICQkCdIJKdZLpkiMpOWh9bOzs+S8fT/4RHjdugQ5ThnYtAnfCiQKXYB43AfTAeVlZQtGMrzrcXuourqGbty8JUZCLCaxgMVHq5C+7UEABw8lmSIxMDnAXKC2iXx//77Ia7GWgnKE9Q9X4bbFpUVZcHU4NnatmB7gKxXoOnRHPohLdC0AY6QbgbcpEgOJyONC1NXX0yefVlM6iyzmKbCwQTGmpGivdvPz8+gKr7hRET2L2XruGpBMiTCHgvM0KMfr5cbpphz/ih3lQt5DQ8MsZRnSK7p+TQEGOVVWHiZnhFPYRTBHgRf4i0VFtN//MahWaTDXgdjDZqvHsfnevXnn+FF5+V4ZGEgFtmmUNpnc3Bzq630kf6ugVQ51vOlmB4jt6OgYmyhj1Xlp3sN+i664mEu95suqB5geKDft0LVwGeFtidkBFTQCCuplpoVfCQp4o4viMkqmKF+jmT4P6W1gNFrJBsYGRgMBjWhbYmxgNBDQiHby8DqBuYdNcwgAC2ACYHpgObNpDgFgAUygY875+HhoG5g5BPxYnHNG8kHiODMb26ernYABsAAmTv/p6qdxZvZqB8aPwWlgYh+mztIASQEoTPJh6gIYSAprY/v4ffXx+8ouZP+HDXNo/A/VKuq403VhBwAAAABJRU5ErkJggg==",TYPE:"image/png",HEIGHT:90,WIDTH:70}},googleMapsUrl:"https://www.google.com/maps/search/?api=1&",externalTargets:{SMS:0},MavenPay:{LINK_CLICKED:"mavenPayClicked"},stepUpInWaitingState:{appName:"stepUpInWaitingState",storageKey:"-stepUpDataInWaitingState"},messageTypes:{secureForm:"leSecureForm"},fifteenMinutesInMS:9e5};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.hooks={BEFORE_SUBMIT_SURVEY:"BEFORE_SUBMIT_SURVEY",BEFORE_WELCOME_MESSAGE:"BEFORE_WELCOME_MESSAGE",AFTER_GET_SURVEY:"AFTER_GET_SURVEY",BEFORE_SEND_VISITOR_LINE:"BEFORE_SEND_VISITOR_LINE",AFTER_GET_LINES:"AFTER_GET_LINES",AFTER_LOAD_SURVEY:"AFTER_LOAD_SURVEY",AFTER_SUBMIT_SURVEY:"AFTER_SUBMIT_SURVEY",AFTER_ABANDONED_SURVEY:"AFTER_ABANDONED_SURVEY",ON_WINDOW_CLOSED:"ON_WINDOW_CLOSED",ON_ADD_TO_CART:"ON_ADD_TO_CART"};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.CsatDataGenerator=function(e){return{id:0,title:"",header:"",questions:{question:[{type:"CSAT",validationType:"csat",label:e.translate("csatRatingQuestion"),id:0,order:0,mandatory:!1}]}}};lpTag.unifiedWindow.contentTypes={TEXT_PLAIN:"text/plain",EXTERNAL_FILE:"external/file",HOSTED_FILE:"hosted/file",SECURE_FORM_INVITATION:"forms/secure-invitation",SECURE_FORM_SUBMISSION:"forms/secure-submission",SECURE_FORM_UPDATE:"forms/secure-update"};lpTag.unifiedWindow.MessageTypes={CONTENT:"ContentEvent",RICH_CONTENT:"RichContentEvent"};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.structuredContentTypes=lpTag.unifiedWindow.structuredContentTypes||{QUICK_REPLIES:"quickReplies",BUTTON:"button",LIST:"list"};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.State={INIT:"init",INITIALIZED:"initialised",PRE_CHAT:"preChat",REQUESTED:"startChat",CHATTING:"chatting",POST_CHAT:"postChat",PRE_SMS:"preSms",OFFLINE:"offline",WAITING:"waiting",PENDING:"pending",ENDED:"ended",NOT_FOUND:"notfound",APP_ENDED:"applicationEnded",ERROR:"error",RESUME:"resume",PAUSED:"paused",RESUME_PAUSED:"resumepaused",AUTH_ERROR:"authenticationError",CONNECTION_ISSUE:"connectionIssue",RESTART_AUTHENTICATION:"restartAuthentication",STEP_UP_AUTH:"stepUpAuth",INTERACTIVE:"interactive"};lpTag.unifiedWindow.Priority=function(){var e=lpTag.unifiedWindow.State,t={},i=0;t[e.INIT]=i++;t[e.INITIALIZED]=i++;t[e.PRE_CHAT]=2;t[e.OFFLINE]=i++;t[e.REQUESTED]=i++;t[e.WAITING]=4;t[e.PENDING]=4;t[e.RESUME]=4;t[e.PAUSED]=4;t[e.RESUME_PAUSED]=4;t[e.CHATTING]=i++;t[e.ENDED]=i++;t[e.POST_CHAT]=i++;t[e.NOT_FOUND]=i++;t[e.ERROR]=+i;t[e.APP_ENDED]=9;return t}();lpTag.unifiedWindow.MessageState={ERROR:"ERROR",PENDING:"PENDING",SENT:"SENT",VIEWED:"VIEWED",ACCEPT:"ACCEPT",READ:"READ",FAILED:"FAILED"};lpTag.unifiedWindow.MessagePriority=function(){var e=lpTag.unifiedWindow.MessageState,t={},i=0;t[e.ERROR]=0;t[e.PENDING]=i++;t[e.SENT]=i++;t[e.VIEWED]=i++;t[e.ACCEPT]=i++;t[e.READ]=i++;t[e.READ]=+i;t[e.FAILED]=6;return t}();lpTag.unifiedWindow.secureFormStates={SEND:"send",RECEIVED:"received",VIEWED:"viewed",VIEWED_ON_ANOTHER_TAB:"viewedOnAnotherTab",ABORTED:"aborted",SUBMIT:"submit",ERROR:"error"};lpTag.unifiedWindow.richContentStates={ACTION_EVENT:"actionEvent",PUBLISH_TEXT:"publishText",DISPLAYED:"contentDisplayed",SUBMIT_AS_TEXT:"submitAsText"};lpTag.unifiedWindow.quickRepliesStates={ACTION_EVENT:"actionEvent",PUBLISH_TEXT:"publishText"};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.welcomeMessageStates=lpTag.unifiedWindow.welcomeMessageStates||{showTiming:{FIRST_TIME:"FIRST_TIME",EVERY_TIME:"EVERY_TIME"}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.ChatModelPath=lpTag.unifiedWindow.ChatModelPath||function(){if(!lpTag.unifiedWindow.chatModelPath){var e={name:"chatModel"},t=window.liveperson.uiframework.latest.LPModel;e.LINES=t.createPath("chat.lines",null,e.name);e.SECURE_FORMS=t.createPath("chat.secureForms",null,e.name);e.AGENT_NAME=t.createPath("chat.agentName",null,e.name);e.VISITOR_NAME=t.createPath("chat.visitorName",null,e.name);e.PARTICIPANTS=t.createPath("chat.participants",null,e.name);e.AGENT_ID=t.createPath("chat.agentId",null,e.name);e.CHAT_ID=t.createPath("chat.chatId",null,e.name);e.CURRENT_DIALOG_TYPE=t.createPath("chat.currentDialogType",null,e.name);e.AGENT_IS_TYPING=t.createPath("chat.agentIsTyping",null,e.name);e.SURVEYS_PRECHAT=t.createPath("chat.surveys.preChat",null,e.name);e.SURVEYS_EXIT=t.createPath("chat.surveys.exit",null,e.name);e.SURVEYS_OFFLINE=t.createPath("chat.surveys.offline",null,e.name);e.TTR=t.createPath("chat.ttr",null,e.name);e.TRANSCRIPT_LOADED=t.createPath("chat.transcriptLoaded",null,e.name);e.SDK_NOTIFICATIONS=t.createPath("windowsdk.notifications",null,e.name);e.SDK_BUTTON_ENABLE=t.createPath("windowsdk.buttonEnable",null,e.name);e.SURVEYS_PRESMS=t.createPath("chat.surveys.preSms",null,e.name);lpTag.unifiedWindow.chatModelPath=e}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.UIModelPath=lpTag.unifiedWindow.UIModelPath||function(){if(!lpTag.unifiedWindow.uiModelPath){var e={name:"uiModel"},t=window.liveperson.uiframework.latest.LPModel;e.STATE=t.createPath("chat.state",null,e.name);e.CONVERSATION_DATA=t.createPath("chat.conversationData",null,e.name);e.AGENT_PICTURE_URL=t.createPath("chat.agentPicUrl",null,e.name);e.VISITOR_TYPING=t.createPath("chat.isVisitorTyping",null,e.name);e.WINDOW_MAXIMIZED=t.createPath("window.maximized",null,e.name);e.ACTIONS_VISIBLE=t.createPath("window.actionsVisible",null,e.name);e.EMOJI_VISIBLE=t.createPath("window.emojisVisible",null,e.name);e.TOP_MENU_VISIBLE=t.createPath("window.topMenuVisible",null,e.name);e.WINDOW_POSITION=t.createPath("window.position",null,e.name);e.WINDOW_SOUND=t.createPath("window.sound",null,e.name);e.EMOJI_MENU=t.createPath("window.emojiMenu",null,e.name);e.WINDOW_EMBEDDED=t.createPath("window.embedded",null,e.name);e.LAST_LINE_VIEWED=t.createPath("window.lastLineViewed",null,e.name);e.ACTION_POPOUT_ENABLE=t.createPath("popout.enable",null,e.name);e.SECURE_FORMS_TAB_HANDLER=t.createPath("collaboration.secureFormsTabHandler",null,e.name);e.IDNV_DATA=t.createPath("collaboration.idnvData",null,e.name);e.WIDGET_SLIDER_VISIBLE=t.createPath("windowsdk.sliderVisible",null,e.name);e.SELECTED_WIDGET_ID=t.createPath("windowsdk.selectedWidgetId",null,e.name);e.DISPOSED_WIDGETS_IDS=t.createPath("windowsdk.disposedWidgetsIds",null,e.name);e.INITIATED_WIDGETS_IDS=t.createPath("windowsdk.InitiatedWidgetsIds",null,e.name);e.WIDGETS_NOTIICATIONS=t.createPath("windowsdk.widgetsNotifications",null,e.name);e.STEP_UP_STATE=t.createPath("chat.stepUpState",null,e.name);e.PRE_SMS_CONTEXT=t.createPath("chat.preSmsContext",null,e.name);e.LAST_VIEWED_TAB=t.createPath("tabs.lastViewedTab",null,e.name);e.TAB_LIST=t.createPath("tabs.list",null,e.name);e.SECURE_FORMS_INVITATIONS=t.createPath("collaboration.sfInvMapping",null,e.name);lpTag.unifiedWindow.uiModelPath=e}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.WidgetModelPath=lpTag.unifiedWindow.WidgetModelPath||function(){if(!lpTag.unifiedWindow.widgetModelPath){var e={name:"WidgetModelPath"},t=window.liveperson.uiframework.latest.LPModel;e.CONVERSATION_ID=t.createPath("conversation.id",null,e.name);e.SESSION_ID=t.createPath("conversation.sessionId",null,e.name);e.DIALOGS=t.createPath("conversation.dialogs",null,e.name);e.WINDOW_UI=t.createPath("ui.window",null,e.name);lpTag.unifiedWindow.widgetModelPath=e}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.ChatDelegate=lpTag.unifiedWindow.ChatDelegate||function(o,a){var s,n,r,l,d="ChatDelegate",c=lpTag.unifiedWindow.apps.CHAT,i=lpTag.unifiedWindow.apps.UNIFIED_WINDOW,u=lpTag.unifiedWindow.log,p=lpTag.unifiedWindow.State,h=lpTag.unifiedWindow.events.chat,f=(lpTag.taglets.postmessage,0),g=1,t=!1,m={state:p.INTERACTIVE,agent:!1,visitor:!1,bindId:null},v={},w=["line","leCollaboration"],_="@type",C="leCollaboration",T=lpTag.unifiedWindow.applicationUtils,E=lpTag.unifiedWindow.consts.errorTypes;function y(e){r&&r(e||{})}function b(e){l&&l(e||{})}function S(e){if(o){"string"==typeof o.svid&&(e.LETagVisitorId=o.svid);"string"==typeof o.ssid&&(e.LETagSessionId=o.ssid);"string"==typeof o.scid&&(e.LETagContextId=o.scid)}}function I(e,t,i){if(e){e.success=t;e.error=i;s.sendCollaboration(e)}u.info("sendCollaboration="+JSON.stringify(e),d)}function N(){s.cancelSurvey()}function x(e,t){n=e;p.NOT_FOUND===n&&(n=p.APP_ENDED);a.trigger({appName:c,eventName:h.STATE,data:n,global:!0});p.CHATTING===n&&a.trigger({appName:i,eventName:h.ENGAGEMENT_DATA,global:!0,data:{engagementName:o.ename,state:n}});if(t||p.WAITING===n||p.ENDED===n){v.chatState=n;M()}p.ENDED===n&&a.trigger({appName:c,eventName:h.BLOD,data:{engagementName:o.ename}})}function A(e){if("object"==typeof e){(v=v||{}).agentName=e&&e.agentName||"";v.agentId=e&&e.agentId||"";v.agentPictureUrl=e&&e.agentPictureUrl||"";v.skillName=e&&e.skillName||"";v.rtSessionId=e&&e.rtSessionId||v.rtSessionId||"";v.chatState=e&&e.chatState||v.chatState||"";v.monitoringSessionId=o&&o.ssid||v.monitoringSessionId||"";v.visitorId=o&&o.svid||v.visitorId||"";v.visitorName=e&&e.visitorName||v.visitorName||"";v.skill=o&&o.skill||v.skill||"";v.engagementId=o&&o.eid||v.engagementId||"";v.campaignId=o&&o.cid||v.campaignId||"";v.language=o&&o.lang||v.language||"";v.engagementName=o&&o.ename||v.engagementName||"";v.lastUpdate=e.lastUpdate||v.lastUpdate||"";M()}}function M(){a.trigger({appName:c,eventName:h.CHAT_INFO,data:v})}function L(e){if(!e||e.error||"ERROR"===e)a.trigger({appName:c,eventName:h.ERROR,data:{errorType:E.CONNECTION_UNAVAILABLE}});else if(!t){if(window.recaptchaRendererV2&&s.isCaptchaV2Supported&&s.isCaptchaV2Supported()){window.recaptchaRenderer=window.recaptchaRendererV2;window.recaptchaRenderer.renderCaptcha(o);window.recaptchaRendererV1.removeFromPage()}else window.recaptchaRendererV1&&(window.recaptchaRenderer=window.recaptchaRendererV1);x(p.INIT);a.trigger({appName:c,eventName:h.INITIALIZED});t=!0}}function D(e){for(var t,i=Array.isArray(e)?e:[e],n=0;n<i.length;n++){t=i[n];0<=T.indexOf(w,t[_])&&a.trigger({appName:c,eventName:t[_]===C?t.subType:t[_],data:t})}a.trigger({appName:c,eventName:h.FINISHED_EVENTS_BULK})}function k(e){a.trigger({appName:c,eventName:h.AGENT_TYPING,data:e})}function V(e){a.trigger({appName:c,eventName:h.SESSION_DATA,data:e})}function $(e){switch(e.source){case"visitor":m.visitor=!0;break;case"agent":m.agent=!0}if(m.agent&&m.visitor){x(m.state,!0);a.unbind(m.bindId)}}function F(e){x(e.state)}function P(t,i){return function(e){t&&t(e);i||e&&e.error&&(5===e.error.internalCode||32===e.error.internalCode||O()&&10===e.error.internalCode)||a.trigger({appName:c,eventName:h.ERROR,data:{errorType:E.CONNECTION_UNAVAILABLE}})}}function O(){return window.recaptchaRenderer}function W(e){return function(){s&&e.apply(null,arguments)}}function R(t){var i=window.recaptchaRenderer.getRecaptchaProps()||{};Object.keys(i).forEach(function(e){t[e]=i[e]})}return{createChatInstance:function(){var e={transportOrder:0<window.location.hostname.indexOf("liveperson.net")?["xhr","postmessage","rest2jsonp"]:["postmessage","rest2jsonp"],lpNumber:o.accountId,appKey:o.appKey,domain:o.domain||"",secureStorageLocation:o.secureStorageLocation,sessionUID:o.sessionId,useSecureStorage:o.useSecureStorage,failureTolerance:o.failureTolerance,reconnectTimeout:o.reconnectTimeout,onInfo:A,onInit:L,onState:F,onEventList:D,onSessionData:V,onAgentTyping:k,onAuthentication:y,onAuthenticationFail:b,firstParty:!0};o.chatPollInterval&&(e.chatPollInterval=o.chatPollInterval);o.chatExitSurveyInterval&&(e.chatExitSurveyInterval=o.chatExitSurveyInterval);m.bindId=a.bind({appName:c,eventName:h.LINE,func:$});s=new lpTag.taglets.ChatOverRestAPI(e);u.info("createChatInstance",d)},isInitialized:function(){return t},isInteractive:function(){return m.visitor},dispose:function(){s=null;v={}},resumePolling:W(function(){u.info("resumingPauseChat",d);s.getState()===s.chatStates.PAUSECHAT&&s.resumePausedChat()}),stopPolling:W(function(){u.info("pausingChat",d);s.pauseChat()}),getAvailability:W(function(t,e){var i={};if(o.agent&&"string"==typeof o.agent)i.agent=o.agent;else{o.skill&&"string"==typeof o.skill&&(i.skill=o.skill);o.maxWaitTime&&"number"==typeof o.maxWaitTime&&(i.maxWaitTime=o.maxWaitTime)}i.success=function(e){a.trigger({appName:c,eventName:h.AVAILABILITY,data:e});t&&t(e)};i.error=P(e);s.getAvailabilty(i)}),getPreChatSurvey:W(function(t,e){var i={};o.preSurveyId?i.surveyApiId=o.preSurveyId:o.visitorProfile?i.visitorProfile=o.visitorProfile:o.surveyName?i.surveyName=o.surveyName:o.visitorIp&&(i.visitorIp=o.visitorIp);o.skill&&(i.skill=o.skill);S(i);u.info("getPreChatSurvey, configuration="+JSON.stringify(i),d);i.success=function(e){x(p.PRE_CHAT,!0);t&&t(e)};i.error=P(e,!0);s.getPreChatSurvey(i)}),startConversation:W(function(e,t,i){r=t;l=i;s.authenticate({authChatConnId:e.connectorId,ssoKey:e.ssoKey,redirectUri:e.redirectUri,engagementId:e.engConf.eid,contextId:e.engConf.scid,sessionId:e.engConf.ssid,visitorId:e.engConf.svid})}),startChat:W(function(e,t,i){var n=e&&e.surveyData,e=e&&e.conversationData,a={};if(o||n||e){if(o.agent)a.agent=o.agent;else if(o.skill)a.skill=o.skill;else if(o.serviceQueue&&!isNaN(o.maxWaitTime)){a.serviceQueue=o.serviceQueue;a.maxWaitTime=o.maxWaitTime}o.interactionTimeout&&(a.interactionTimeout=o.interactionTimeout);o.queuePriority&&(a.queuePriority=o.queuePriority);o.availabilityPolicy!==f&&o.availabilityPolicy!==g||(a.availabilityPolicy=o.availabilityPolicy);o.preChatLines&&"object"==typeof o.preChatLines&&(a.preChatLines=Object.keys(o.preChatLines).map(function(e){return o.preChatLines[e]}));"string"==typeof o.ssoKey&&(a.ssoKey=o.ssoKey);n&&"object"==typeof n&&n.survey&&n.survey.question&&0<n.survey.question.length&&(a.survey=n.survey);if(e&&"object"==typeof e){a.participantId=e.participantId;a.conversationId=e.conversationId}S(a);o.eid;a.engagementId=o.eid;o.cid;a.campaignId=o.cid;o.lang;a.language=o.lang;O()&&R(a)}u.info("startChat="+JSON.stringify(a),d);a.success=function(e){t&&t(e)};a.error=P(i);s.requestChat(a)}),sendLine:W(function(e,t,i){s.addLine({text:e.text,success:t,error:i});u.info("sendLine="+JSON.stringify(T.excludeAttributes(T.clone(e),["text"])),d)}),sendCollaboration:W(I),sendStatesUpdate:W(function(){}),setVisitorTyping:W(function(e,t,i){if(n&&(n===p.CHATTING||n===p.INTERACTIVE)){s.setVisitorTyping({typing:e,success:t,error:i});u.info("setVisitorTyping="+e,d)}}),emailTranscript:W(function(e,t,i,n){var a=6e4*(new Date).getTimezoneOffset();s.requestTranscript({email:e,subject:t,success:i,error:n,timezoneOffset:a});u.info("emailTranscript="+JSON.stringify(e),d)}),endChat:W(function(t,e){s.endChat({success:function(e){t&&t(e)},error:e});u.info("endChat",d)}),getExitSurvey:W(function(e,t,i){e={windowSurveyEnabled:!!e,success:function(e){x(p.POST_CHAT,!0);t&&t(e)},error:P(i,!0)};o.exitSurveyId?e.surveyApiId=o.exitSurveyId:o.surveyName&&(e.surveyName=o.surveyName);o.skillId&&(e.engSkillId=o.skillId);s.getExitSurvey(e);u.info("getExitSurvey, id="+o.exitSurveyId,d)}),submitExitChatSurvey:W(function(e,t,i){if(e&&e.survey&&e.survey.question&&0<e.survey.question.length)s.submitExitSurvey({survey:e.survey,success:function(e){x(p.APP_ENDED,!0);t&&t(e)},error:i});else{i({error:"Missing survey data"});u.error("submitExitChatSurvey, No Survey Data",d);N()}}),getOfflineSurvey:W(function(t,e){e={windowSurveyEnabled:!0,success:function(e){x(p.OFFLINE,!0);t&&t(e)},error:P(e)};o.surveyOfflineId?e.surveyApiId=o.surveyOfflineId:o.visitorProfile?e.visitorProfile=o.visitorProfile:o.visitorId?e.visitorId=o.visitorId:o.surveyName&&(e.surveyName=o.surveyName);o.skill&&(e.skill=o.skill);o.skillId&&(e.engSkillId=o.skillId);S(e);s.getOfflineSurvey(e)}),submitOfflineSurvey:W(function(e,t,i){var n={success:function(e){x(p.APP_ENDED,!0);t&&t(e)},error:i};if(e&&e.survey&&e.survey.question&&0<e.survey.question.length){"string"==typeof o.svid&&(n.LETagVisitorId=o.svid);"string"==typeof o.ssid&&(n.LETagSessionId=o.ssid);"string"==typeof o.scid&&(n.LETagContextId=o.scid);"string"==typeof o.offsiteEngContext&&(n.offsiteEngContext=o.offsiteEngContext);"string"==typeof o.skill&&(n.skill=o.skill);O()&&R(n);n.survey=e.survey;s.submitOfflineSurvey(n);u.info("submitOfflineSurvey, survey"+JSON.stringify(e.survey),d)}else{i({error:"Missing survey data"});n=null;u.error("submitOfflineSurvey, ERROR",d);N()}}),cancelSurvey:W(N),disposeVisitor:W(function(){s.disposeVisitor()}),reInit:W(function(){s.reInit()}),getSessionKey:function(){return s.getSessionKey()},secureFormRequest:function(e,t,i,n){e={subType:h.SECURE_FORM,command:e,info:i};n&&(e.text=n);W(I).call(this,e)},getSecureFormOTKs:function(e,t){lpTag.taglets.lpUtil.runCallback(t,null,{submitOtk:e&&e.submitOtk,formOtk:e&&e.getOtk})},richContentRequest:W(function(e,t){u.info("richContentRequest with body: "+JSON.stringify(e)+" and data: "+JSON.stringify(t),d);e&&e.sequenceId&&e.state&&s.addLineStatusEvent({status:e.state,metadata:t,refSequenceId:e.sequenceId})})}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.MessagingDelegate=lpTag.unifiedWindow.MessagingDelegate||function(r,o){var l,n,a,s,d,c="MessagingDelegate",u=lpTag.unifiedWindow.apps.CHAT,p=lpTag.unifiedWindow.log,h=lpTag.unifiedWindow.State,R=lpTag.AMSStatics.memberTypes,f=lpTag.AMSStatics.conversation.states,g=lpTag.AMSStatics.dialog.states,t=lpTag.AMSStatics.effectiveTTRTypes,m=lpTag.AMSStatics.chatStates,k=lpTag.AMSStatics.channelTypes,v=lpTag.unifiedWindow.events.chat,i=lpTag.unifiedWindow.events.socket,w=lpTag.unifiedWindow.applicationUtils,V=lpTag.unifiedWindow.consts.errorTypes,_=lpTag.unifiedWindow.consts.authErrorsTypes,$=(lpTag.unifiedWindow.consts,"historyAPI"),C="richContent",T="en-US",E={},y={id:null,isActive:!1},b={id:null,isActive:!1},S=[],I=[],N=!1;function x(e){a=function(e){var t="function"==typeof lpTag.getEnv&&lpTag.getEnv(),t=void 0!==r.isFetchEnabled?JSON.parse(r.isFetchEnabled):"alpha"===t,i=r.fetchCacheMode,t={connectorsSfConfig:r.connectorsSfConfig,domain:r.asyncMessagingDomain,IDPDomain:r.idpDomain,shiftStatusDomain:r.shiftStatusDomain,connectorId:r.connectorId,historyDomain:r.messagingHistoryDomain,blockHistory:e.blockHistory,emptyHistoryConvoMaxRetries:1,emptyHistoryConvoRetryTimeout:200,authCode:e.authCode,redirect_uri:e.redirect_uri||r.redirect_uri,authType:e.authType,hasAuthentication:!0,accountId:r.subscription&&r.subscription.conversationowneraccountid||r.accountId,subscription:r.subscription,memberType:R.USER||"",storageConf:{useSecureStorage:r.useSecureStorage,secureStorageLocation:r.secureStorageLocation,lpNumber:r.accountId,appName:c,firstParty:!0},queryParameters:{appName:"webAsync",features:["AUTO_MESSAGES","RICH_CONTENT","CO_BROWSE","PHOTO_SHARING","QUICK_REPLIES","MULTI_DIALOG","FILE_SHARING","MARKDOWN_HYPERLINKS"],timeZone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch(e){p.info("_getCustomerTimezone, Intl API not supported");return null}}()},isStepUpEnabled:r.isStepUpEnabled,isFetchEnabled:t,fetchCacheMode:i,directOrderForPendingContent:!0,onSocketConnected:H,onSocketInitialized:z,onConversationStepUp:G,onSubscribeMessagingResponse:se,onUserInfo:Z,onConversationList:ee,onParticipantJoined:ne,onParticipantLeft:ae,onContent:oe,onConversationState:re,onDialogChatStateChanged:le,onDialogUpdated:de,onTTRUpdated:ce,onCSATUpdated:ue,onBrandProfile:F,onSessionInvalidated:q,onSocketClosed:j,onAuthenticationError:K,onServiceNonResponsive:Y,onPingSuccess:X,onDeletedSubscriptionFromConversation:J,pingTimeout:e.pingTimeout,resendTimedOutRequests:!0,restRecoveryPolicy:lpTag.AMSStatics.RECOVERY_POLICY.MODERATE,throttlingSupportEnabled:r.throttlingSupportEnabled||!0,throttlingTimeoutValue:r.throttlingTimeoutValue,appVersion:lpTag.unifiedWindow.Application.v,historySource:"unifiedWindow"};r.amsClientConfig&&(t=lpTag.taglets.lpUtil.cloneExtend(r.amsClientConfig,t));e.codeVerifier&&(t.code_verifier=e.codeVerifier);return t}(e);n=!0;if(e.forceNewConfig){W();l=new lpTag.UMSClientAPI(a)}else l?l.reInit(a):l=new lpTag.UMSClientAPI(a);p.info("createMessagingInstance",c)}function A(){var e=lpTag.identitiesObjects.filter(function(e){return e.tkn&&e.redirect_uri});if(e.length){e={connectorsJwt:e[0].tkn,isSecureIdentity:!0};r.connectorsSfConfig=r.connectorsSfConfig||e}}function F(e){p.info("_onBrandProfile, info="+JSON.stringify(e),c);r.subscription&&e.brandId===r.subscription.conversationowneraccountid?o.trigger({appName:u,eventName:v.CONVERSATION_OWNER_BRAND_INFO,data:e}):o.trigger({appName:u,eventName:v.BRAND_INFO,data:e})}function M(e,t,i){var n={};n.conversationId=y.id;n.success=function(){L(e,t,i)};n.error=function(){};l.closeConversation(n);p.info("_closeConversation, configuration="+JSON.stringify(n),c)}function L(e,t,i){if(r.subscription&&(r.subscription,r.subscription.conversationowneraccountid!==lpTag.site)){var n=e,a=t,o=i,s=!1;lpTag.taglets.providerSubscription.getSharkSession(r.subscription.conversationowneraccountid,function(e){if(!s){s=!0;r.ssid=e;D(n,a,o)}});setTimeout(function(){if(!s){s=!0;D(n,a,o)}},3e3)}else D(e,t,i)}function D(t,i,n){var e={conversationContext:{type:"SharkContext",lang:r.lang||T},campaignInfo:{}};e.channelType=k.MESSAGING;if(r.skillId&&"number"==typeof r.skillId){e.skillId=r.skillId;E.skill=r.skillId}if("string"==typeof r.svid){e.conversationContext.visitorId=r.svid;E.visitorId=r.svid}"string"==typeof r.ssid&&(e.conversationContext.sessionId=r.ssid);"string"==typeof r.scid&&(e.conversationContext.interactionContextId=r.scid);r.subscription;e.conversationContext.subscription=r.subscription;r.cid;e.campaignInfo.campaignId=r.cid;E.campaignId=r.cid;r.eid;e.campaignInfo.engagementId=r.eid;e.success=function(e){o.trigger({appName:u,eventName:v.NEW_CONVERSATION_CREATED,data:e});if(y&&e&&y.id===e.conversationId)(t&&t.type&&t.type===C?O:P)(t,i,n);else{pe(e&&e.conversationId);S.push({line:t,success:i,error:n})}};e.error=n;o.trigger({appName:u,eventName:v.NEW_CONVERSATION_REQUESTED});ie();B("createConversation",e,this);p.info("createConversation, configuration="+JSON.stringify(e),c)}function P(e,t,i){if(e){var n={};n.dialogId=b.id;n.success=U(t);n.error=i;n.text=e.text;if(e.contentType&&e.contentType==lpTag.unifiedWindow.consts.chatEvents.FILE_SHARING){n.text=e.fileData;n.contentType=e.contentType}e.metadata&&(n.metadata=e.metadata);l.sendMessage(n);p.info("_sendLine="+JSON.stringify(e),c)}}function O(e,t,i){if(e){var n={};n.dialogId=b.id;n.success=U(t);n.error=i;n.json=e.json;l.sendStructuredContentMessage(n);p.info("_sendStructuredContentLine="+JSON.stringify(e),c)}}function B(e,t,i){if("function"==typeof l.isConnected?l.isConnected():!n)"function"==typeof l[e]&&l[e].apply(i||this,!t||t instanceof Array?t:[t]);else{I.push(B.bind(this,e,t,i));a&&(l=new lpTag.UMSClientAPI(a));p.info("amsClient::reInit",a)}}function U(i){return function(e){var t;"function"==typeof i&&e&&!isNaN(e.sequence)&&(t={"@id":e.sequence,convId:b.id});i(t)}}function W(e){l&&l.dispose();e||(l=null)}function H(e){if(e&&200===e.statusCode){n=!1;o.trigger({appName:u,eventName:i.CONNECTED,data:e})}else Q();p.info("_onSocketConnected, data="+JSON.stringify(e),c)}function z(e){if(e&&200===e.code){o.trigger({appName:u,eventName:i.INITIALIZED,data:e});o.trigger({appName:u,eventName:v.STATE,data:h.INIT,global:!0})}else Q();if(I.length){var t=[].concat(I);I=[];t.forEach(function(e){"function"==typeof e&&e()})}p.info("_onSocketInitialized, data="+JSON.stringify(e),c)}function G(e){o.trigger({appName:"AMSClient",eventName:"onConversationStepUp",data:e});p.info("_onConversationStepUp, data="+JSON.stringify(e),c)}function j(e){n=!0;p.info("_onSocketClosed, data="+JSON.stringify(e),c);o.trigger({appName:u,eventName:i.DISCONNECTED,data:e})}function q(e){o.trigger({appName:u,eventName:v.AUTHENTICATION_ERROR,data:{error:_.EXPIRED,data:e}});p.info("_onSessionInvalidated, data="+JSON.stringify(e),c)}function K(e){o.trigger({appName:"*",eventName:v.AUTHENTICATION_ERROR,data:{error:_.INVALID_SESSION,data:e}});p.info("_onAuthenticationError, data="+JSON.stringify(e),c)}function Y(e){p.info("_onServiceNonResponsive, data="+JSON.stringify(e),c);o.trigger({appName:u,eventName:i.NON_RESPONSIVE,data:e})}function X(e){o.trigger({appName:u,eventName:i.PING_SUCCESS,data:e})}function J(e){o.trigger({appName:u,eventName:v.DELETE_CONVERSATION_SUBSCRIPTION,data:e})}function Z(e){o.trigger({appName:u,eventName:v.USER_INFO,data:e});p.info("_onUserInfo, info="+JSON.stringify(e),c)}function Q(){o.trigger({appName:u,eventName:v.ERROR,data:{errorType:V.CONNECTION_UNAVAILABLE}})}function ee(e){var t=e&&e.data||e,i=t.filter(function(e){return e.conversationDetails.state===f.OPEN}),n=i[0]&&i[0].convId;if(n){pe(n,i[0]);he({conversation:i[0]});if(0<S.length){for(var a=0;a<S.length;a++)(S[a].line&&S[a].line.type&&S[a].line.type===C?O:P)(S[a].line,S[a].success,S[a].error);S=[]}}else $!=e.subscriptionId&&(y={id:null,isActive:!1});s=s||0<t.length;o.trigger({appName:u,eventName:v.CONVERSATION_HISTORY,data:t});E.language=r.lang||T;o.trigger({appName:u,eventName:v.CHAT_INFO,data:E});if(s)ie();else if(l.isWebSocketConnection()&&!d){n=3e4;r.connectionTimeoutValue&&(r.connectionTimeoutValue<0?n=void 0:1e4<r.connectionTimeoutValue&&(n=r.connectionTimeoutValue));n&&(d=setTimeout(te,n))}}function te(){W(!0)}function ie(){if(d){clearTimeout(d);d=void 0}}function ne(e){for(var t=e.data||e,i=0;i<t.length;i++)o.trigger({appName:u,eventName:v.USER_INFO,data:t[i]})}function ae(e){for(var t=e.data||e,i=0;i<t.length;i++)o.trigger({appName:u,eventName:v.USER_LEFT,data:t[i]})}function oe(e){o.trigger({appName:u,eventName:v.CONVERSATION_CONTENT,data:e})}function se(e){o.trigger({appName:u,eventName:v.SUBSCRIBE_MESSAGING_EVENTS_RESPONSE,data:e})}function re(e){var t;e=e&&e.data||e;for(var i=0;i<e.length;i++)if(e[i].convId===y.id){if(e[i].state===f.OPEN)t=h.CHATTING;else{t=h.ENDED;y.isActive=!1}o.trigger({appName:u,eventName:v.CONVERSATION_STATE,data:{state:e[i].state,time:e[i].ts,closeReason:e[i].closeReason,convId:e[i].convId}});o.trigger({appName:u,eventName:v.STATE,data:t,global:!0})}}function le(e){var t;e=Array.isArray(e)?e:[];for(var i=0;i<e.length;i++)e[i].dialogId===b.id&&((t=w.getPropertyFromObject(e[i],"event.chatState"))===m.SIGNALED.toUpperCase()?r.isSignalEnabled&&lpTag.events.trigger({appName:"*",eventName:v.SIGNAL_IN,data:e[i].metadata.payload}):o.trigger({appName:u,eventName:v.AGENT_TYPING,data:{agentTyping:t===m.COMPOSING.toUpperCase(),originatorId:e[i].originatorId}}))}function de(e){if(e&&e.data)for(var t=0;t<e.data.length;t++){var i=e.data[t];if(i&&i.channelType===lpTag.unifiedWindow.consts.coBrowse.coBrowseChannelName)o.trigger({appName:u,eventName:lpTag.unifiedWindow.events.coBrowseEvents.DIALOG_CREATED,data:i});else{n=a=void 0;var n,a=i;a&&a.state===g.OPEN&&a.dialogId!==b.id&&he({dialogId:a.dialogId});if(a&&a.dialogId===b.id){if(a.state===g.OPEN)n=h.CHATTING;else{n=h.ENDED;b.isActive=!1}o.trigger({appName:u,eventName:v.DIALOG_STATE,data:{state:a.state,time:a.metaDataLastUpdateTs,closedBy:a.closedBy,dialogId:a.dialogId,endTime:a.endTs,closeReason:a.closedBy,dialogType:a.dialogType,channelType:a.channelType,participants:a.participants,conversationId:y.isActive?y.id:null}});o.trigger({appName:u,eventName:v.STATE,data:n,global:!0})}}}}function ce(e){var t=e,i="ttr",n="TTR_INFO";t=t&&t.data||t;for(var a=0;a<t.length;a++)t[a].convId===y.id&&o.trigger({appName:u,eventName:v[n],data:t[a][i]})}function ue(e){e=function(e){var t,i=0;e=e.data||e;for(var n=0;n<e.length;n++)if(w.getPropertyFromObject(e[n],"csat.endTs")>i){i=e[n].csat.endTs;t=e[n]}return t}(e.data||e);e&&e.csat&&o.trigger({appName:u,eventName:v.CSAT_INFO,data:e})}function pe(e,t){y.id=e;y.isActive=!0;E.rtSessionId=y.id;if(t&&t.conversationDetails){e=t.conversationDetails.skillId;e&&"-1"!==e?E.skill=e:"number"==typeof E.skill?E.skill=E.skill+"":E.skill=void 0}}function he(e){if(e.dialogId){b.id=e.dialogId;b.isActive=!0}else if(e.conversation){var e=e.conversation.conversationDetails&&e.conversation.conversationDetails.dialogs;if(e&&0<e.length){e=e.filter(function(e){return e.channelType!==lpTag.unifiedWindow.consts.coBrowse.coBrowseChannelName&&e.state===g.OPEN});b.id=0<e.length?e[0].dialogId:null;b.isActive=0<e.length}}}function e(e){return function(){if(l)return e.apply(null,arguments)}}return{createMessagingInstance:function(e){if(2===e.authType&&lpTag.taglets.lp_monitoringSDK&&!r.isExternalWindow){var t=e;if(lpTag.identities&&lpTag.identities.length)if(N||lpTag.identitiesObjects&&lpTag.identitiesObjects.length){A();x(t)}else lpTag.events.once({eventName:"SP_SENT",appName:"*",func:function(){N=!0;A();x(t)}});else x(t)}else x(e)},getMyUserProfile:e(function(){var e={success:function(){},error:function(){}};l.getMyUserProfile(e);p.info("getMyUserProfile, configuration="+JSON.stringify(e),c)}),getBrandProfile:e(function(){var e={brandId:r.accountId};l.getBrandProfile(e);p.info("getBrandProfile, brandId= "+e.brandId,c);if(r.subscription&&r.subscription.conversationowneraccountid){e={brandId:r.subscription.conversationowneraccountid};l.getBrandProfile(e);p.info("getBrandProfile, brandId= "+e.brandId,c)}}),updateStepUpParticipants:function(e){l.updateConversationParticipantForStepUp(e)},subscribeConversations:e(function(e,t){var i={};i.success=e;i.error=t;l.subscribeConversations(i);p.info("subscribeConversations, configuration="+JSON.stringify(i),c)}),unsubscribeConversations:e(function(e,t,i){var n={};n.subscriptionId=e;n.success=t;n.error=i;l.unsubscribeConversations(n);p.info("unsubscribeConversations, configuration="+JSON.stringify(n),c)}),createConversation:e(L),closeDialog:e(function(e){var t={};if(b.isActive){t.dialogId=b.id;t.success=e;t.error=e;l.closeDialog(t)}else w.runCallback(e);p.info("closeDialog, configuration="+JSON.stringify(t),c)}),sendLine:e(function(e,t,i){(y.isActive?y.isActive&&!b.isActive?M:P:L)(e,t,i)}),sendStructuredContentLine:e(function(e,t,i){(y.isActive?y.isActive&&!b.isActive?M:O:L)(e,t,i)}),sendStatesUpdate:e(function(e,t){var i,n=w.groupByKeyValue(e,"convId");for(i in n)if(!("undefined"===i||r.connectorsSfConfig&&r.connectorsSfConfig.isSecureIdentity)){s=o=a=void 0;var a=n[i],o=t,s=i;a=function(e){return e.map(function(e){return e["@id"]})}(a),s={dialogId:s,state:o,sequenceList:a};l.markMessagesState(s)}}),setVisitorTyping:function(e){e={dialogId:b.id,chatState:e?m.COMPOSING:m.ACTIVE};l.setDialogChatState(e)},setConversationUrgency:e(function(e){l.setTTR({conversationId:y.id,ttrType:e?t.urgent:t.normal})}),subscribeMessagingEvents:e(function(e){return l.subscribeMessagingEvents(e)}),submitExitChatSurvey:e(function(e,t,i){(t={success:t,error:i,conversationId:y.id||e.convId,CSAT:{}}).CSAT.status=(e=e||{}).status;(i=e.survey&&e.survey.question[0]&&e.survey.question[0].answer)&&(t.CSAT.csatRate=+i||0);l.setCSAT(t)}),getOTK:e(function(e,t){p.info("getOTK "+JSON.stringify(e),c);var i={uploadable:{dialogId:b.id}};"object"==typeof e&&(i.uploadable=w.cloneExtend(i.uploadable,e));l.generateUploadToken({success:t,error:t},i)}),secureFormRequest:e(function(e){if(e)if(e.contentType){l.sendPCIMessage(e);"submit"===e.state&&r.connectorsSfConfig&&(r.connectorsSfConfig.isFormSubmitted=!0)}else l.markMessagesState(e)}),richContentRequest:e(function(e){p.info("richContentRequest with body: "+JSON.stringify(e),c);e&&l.markMessagesState(e)}),quickRepliesRequest:e(function(e){p.info("quickRepliesRequest with body: "+JSON.stringify(e),c);e&&l.markMessagesState(e)}),getTimeDiff:e(function(){return l.getTimeDiff()}),imageShareGenerateUrlRequest:e(function(e){p.info("imageShareGenerateUrlRequest with body: "+JSON.stringify(e),c);e&&l.generateURLForUploadFile(e)}),imageShareDownloadUrlRequest:e(function(e){p.info("imageShareDownloadUrlRequest with body: "+JSON.stringify(e),c);e&&l.generateURLForDownloadFile(e)}),getShiftStatus:e(function(e){e.skillId=r.skillId&&"number"==typeof r.skillId?r.skillId:-1;l.sendShiftStatus(e)}),getSessionKey:function(){return b&&b.id},currentConversationActive:function(){return y&&y.isActive},dispose:W,sendSignaledEvent:function(t){if(t&&"string"!=typeof t){p.info("sendSignaledEvent: metadata payload is not a string",u);try{t=JSON.stringify(t)}catch(e){p.error("sendSignaledEvent: payload is not a string and can not be stringified "+e,u);t=""}}if(t){t={dialogId:b.id,chatState:m.SIGNALED,metadata:[{type:"Signal",payload:t}]};l.setDialogChatState(t)}}}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.SMSDelegate=lpTag.unifiedWindow.SMSDelegate||function(i,e){var t=lpTag.unifiedWindow.apps.CHAT,n=lpTag.unifiedWindow.log,a=lpTag.unifiedWindow.events.chat,o=i.sessionId,s=i.connectorId,r=i.subscription,l=lpTag.taglets.lp_sms_client_api;r&&r.conversationowneraccountid&&l.setAccount?l.setAccount(r.conversationowneraccountid):l.setAccount(lpTag.site);function d(e,t,i){if(e&&"function"==typeof e[t])return 1;i("taglet not exists or initilized")}return{initialize:function(){setTimeout(function(){e.trigger({appName:t,eventName:a.INITIALIZED})})},getPreSMSFormId:function(){return i.smsPreFormId},getPreSMSForm:function(e,t){if(i.smsPreFormId)d(l,"loadSMSForm",t)&&(r?l.loadSMSForm(i.smsPreFormId,e,t,r.provideraccountid):l.loadSMSForm(i.smsPreFormId,e,t));else{n.error("SMSDelegate:getPreSMSForm failed: no smsPreFormId on window");t()}},submitPreSMSForm:function(e,t,i){d(l,"submitSMSForm",i)&&l.submitSMSForm(e,t,i,{sessionId:o,connectorId:s,subscription:r})},dispose:function(){}}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.ChatStateManager=lpTag.unifiedWindow.ChatStateManager||function(R,k,V,$){var e,F,n,a,o,s,B,i,r,l,d,U,c="ChatStateManager",t=lpTag.unifiedWindow.apps.CHAT,u=lpTag.unifiedWindow.log,p=lpTag.unifiedWindow.events,H=lpTag.unifiedWindow.applicationUtils,h=p.chat,f=lpTag.unifiedWindow.State,g=lpTag.unifiedWindow.apps,m=lpTag.unifiedWindow.Priority,v=lpTag.unifiedWindow.uiModelPath,w=lpTag.unifiedWindow.chatModelPath,_=!1,C=!1,T=!1,E=!1,y=R,b=V;u.info("init",c);F=(e=b||{}).engConf||{};C=y.surveyPreChatEnabled||!1;E=y.surveyPostChatEnabled||!1;u.info("_initSurveyParameters usePreChat= "+C+" useExitSurvey= "+E,c);s=k.uiModel;B=k.chatModel;y=$;o=y.apiDelegate;a=y.appContext;n=y.events;a.conf.authConf&&(T=!0);b=(i=s.get(lpTag.unifiedWindow.uiModelPath.STATE))===f.CHATTING||i===f.PRE_CHAT||i===f.OFFLINE||i===f.WAITING;W()&&T&&b&&!a.conf.unifiedConf.external?a.authenticationManager.authenticate(function(e){a.unAuthUserTriesAuth=!e||!e.ssoKey;S()},function(){a.unAuthUserTriesAuth=!0;S()}):S();function S(){n.bind({appName:t,eventName:h.STATE,func:Ee});n.bind({appName:t,eventName:h.INITIALIZED,func:Z});n.bind({appName:t,eventName:h.BLOD,func:Q});n.bind({appName:"SessionManager",eventName:h.NO_SESSION,func:X});n.bind({appName:g.UNIFIED_WINDOW,eventName:p.application.PRE_CHAT_SURVEY,func:G});n.bind({appName:g.UNIFIED_WINDOW,eventName:p.application.POST_CHAT_SURVEY,func:q});n.bind({appName:g.UNIFIED_WINDOW,eventName:p.application.OFFLINE_SURVEY,func:K});n.bind({appName:g.UNIFIED_WINDOW,eventName:p.application.END_CHAT,func:be});n.bind({appName:g.UNIFIED_WINDOW,eventName:p.application.END_SURVEY,func:I});e.window&&e.window.embedded&&n.bind({appName:g.UISTATE,eventName:p.uiState.EMBEDDED_CHANGED,func:re});n.bind({appName:t,eventName:h.CHAT_INFO,func:le});s.bind(v.STATE,ee);u.info("_startFlow",c);o.createChatInstance()}function z(){return r}function G(e){if(e){e={surveyData:e};if(T){var t=e,i=j();if(!i||a.authenticationManager.isErroneous()){P();u.info("_submitPreChatSurveyForAuthenticatedSession:getOfflineSurvey. convData: "+!!i+", isErroneous: "+!!a.authenticationManager.isErroneous(),c)}else{ue({context:"prechat"});if(i)o.startChat(H.cloneExtend(t,{conversationData:i}),D,M);else{d=function(e){o.startChat(H.cloneExtend(t,{conversationData:e.newValue}),D,M)};s.bind(v.CONVERSATION_DATA,d)}}}else o.startChat(e,D,M)}else{N(null,f.APP_ENDED);I()}}function j(){return s.get(v.CONVERSATION_DATA)}function q(e){if(e){if(!_){_=!0;o.submitExitChatSurvey(e,te,ie)}}else{N(null,f.APP_ENDED);I()}}function K(e){if(e){if(!_){_=!0;o.submitOfflineSurvey(e,te,ie)}}else{N(null,f.APP_ENDED);I()}}function I(){o.cancelSurvey()}function Y(){s.unbind(v.STATE,ee);try{s.unbind(v.CONVERSATION_DATA,d)}catch(e){}n.unbind({appName:t,eventName:h.STATE,func:Ee});n.unbind({appName:t,eventName:h.INITIALIZED,func:Z});n.unbind({appName:t,eventName:h.BLOD,func:Q});n.unbind({appName:"SessionManager",eventName:h.NO_SESSION,func:X});n.unbind({appName:g.UNIFIED_WINDOW,eventName:p.application.END_CHAT,func:be});n.unbind({appName:g.UNIFIED_WINDOW,eventName:p.application.END_SURVEY,func:I});n.unbind({appName:g.UISTATE,eventName:p.uiState.EMBEDDED_CHANGED,func:re});n.unbind({appName:g.UNIFIED_WINDOW,eventName:p.application.PRE_CHAT_SURVEY,func:G});n.unbind({appName:g.UNIFIED_WINDOW,eventName:p.application.POST_CHAT_SURVEY,func:q});n.unbind({appName:g.UNIFIED_WINDOW,eventName:p.application.OFFLINE_SURVEY,func:K});n.unbind({appName:t,eventName:h.CHAT_INFO,func:le})}function X(){N(null,f.APP_ENDED)}function J(e){u.info("_tryResume",c);var t=s.get(v.STATE);(!l||t&&m[t]>m[l])&&e(m[t],m[f.ENDED])&&x(0,t,!0)}function Z(){u.info("_tryInitResume",c);J(function(e,t){return e<=t})}function Q(){u.info("_tryEndResume",c);J(function(e,t){return t<e})}function N(e,t){u.info("_handleNewState newState= "+t+" err= "+JSON.stringify(e),c);var i=s.get(v.STATE);if(T&&W()&&a.unAuthUserTriesAuth){t===f.APP_ENDED&&a.events.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.application.END_CHAT});"init"===t&&"chatting"===i&&(i=null)}if(!i||m[i]<=m[t]&&i!==t){l=t;s.modify({splitKey:v.STATE,updateData:t,onSuccess:function(){(!r||m[t]>=m[r]&&r!==t)&&x(0,t)}})}}function ee(e){u.info("_handleNewStateFromModel newState= "+e.newValue,c);var t=r;l&&r!==l&&(t=l);if(o.isInitialized()){var i=!1;if(t){if(t!==e.newValue){if(m[t]>m[e.newValue])return;if(t===f.PRE_CHAT)return o.reInit(),void 0}}else i=!0;x(0,e.newValue,i)}}function x(e,t,i){if(r!==t)switch(r=t){case f.INIT:break;case f.INITIALIZED:oe();break;case f.PRE_CHAT:A(i);break;case f.WAITING:case f.RESUME:case f.PAUSED:case f.RESUME_PAUSED:case f.CHATTING:break;case f.ENDED:ye();break;case f.POST_CHAT:i&&ye();break;case f.OFFLINE:A(i);break;case f.NOT_FOUND:case f.ERROR:Se();break;case f.APP_ENDED:u.info("_disposeApplication",c);o.disposeVisitor();n.trigger({appName:c,eventName:p.chatState.ENDED});Y();break;default:A(i)}}function A(e){e&&oe({resuming:!0})}function te(e){u.info("_submitFinalSurveyCallback: data="+JSON.stringify(e),c);_=!1;e&&e.error&&5===e.error.internalCode?n.trigger({appName:c,eventName:p.chat.SURVEY_ERROR,data:e}):e&&e.error&&10===e.error.internalCode?Ie()&&L({isInvalid:!0}):N(null,f.APP_ENDED)}function ie(e){u.info("_submitFinalSurveyError: data="+JSON.stringify(e),c);_=!1;n.trigger({appName:"survey",eventName:p.chat.SURVEY_SERVER_ERROR,data:e})}function M(e){if(e&&e.error){if(32===e.error.internalCode){P();u.info("_startChatChatError:getOfflineSurvey. internalCode: 32",c);return}if(5===e.error.internalCode)return void n.trigger({appName:c,eventName:p.chat.SURVEY_ERROR,data:e});if(10===e.error.internalCode)return Ie()&&L({isInvalid:!0}),void 0}O(e)}function ne(e){n.trigger({appName:c,eventName:p.chat.EMAIL_TRANSCRIPT_SUCCESS,data:e})}function ae(e){n.trigger({appName:c,eventName:p.chat.EMAIL_TRANSCRIPT_ERROR,data:e})}function oe(e){e=e||{};u.info("_handleInit",c);(!e.resuming&&Ie()?L:se)()}function L(e){e=e||{};window.recaptchaRenderer.showCaptcha({isInvalid:e.isInvalid,themer:a.themer,translator:a.translator,callback:se})}function se(){if(V.engConf.isOffline){P();u.info("_handleInitContinue:getOfflineSurvey. uiState.engConf.isOffline: true",c)}else a.conf.unifiedConf.skipAvailabilityCheck?de({availability:!0}):o.getAvailability(de,O)}function re(e){if(e){u.info("resumingPolling",c);o.resumePolling()}else{u.info("stopPolling",c);o.stopPolling()}}function le(e){var t;if(e.agentPictureUrl&&e.agentName){(t=s.get(v.AGENT_PICTURE_URL)||{})[e.agentName]=e.agentPictureUrl;s.modify(v.AGENT_PICTURE_URL,t)}e.skillName&&(U=e.skillName)}function de(e){u.info("_availabilitySuccess data="+JSON.stringify(e),c);if(e&&e.availability)if(T&&!ce()){u.info("_startAuthentication",c);ue({context:"onload"});a.authenticationManager.authenticate(pe,he)}else W()&&a.unAuthUserTriesAuth?he(void 0):C?o.getPreChatSurvey(me,ve):o.startChat(null,D,M);else{P();u.info("_availabilitySuccess:getOfflineSurvey. availability: false",c)}}function ce(){return s.get(v.STATE)===f.PRE_CHAT&&s.get(v.CONVERSATION_DATA)}function ue(e){u.info("_triggerProcessingEvent data="+JSON.stringify(e),c);n.trigger({appName:g.UNIFIED_WINDOW,eventName:p.application.PROCESSING,data:e})}function pe(e){u.info("_startConversation data="+JSON.stringify(e),c);if(e&&e.ssoKey){var t=j();C&&o.getPreChatSurvey(me,O);if(t&&i!==f.OFFLINE&&!ce())o.startChat({conversationData:t},D,M);else{t={domain:a.conf.unifiedConf.domain,appKey:a.keys.appKey,connectorId:a.conf.authConf.connector.id,ssoKey:e.ssoKey,redirectUri:e.redirect_uri||null,engConf:a.conf.engConf};o.startConversation(t,C?function(e){u.info("_startConversationSuccess data="+JSON.stringify(e),c);s.modify(v.CONVERSATION_DATA,e)}:function(e){u.info("_startConversationSuccess data="+JSON.stringify(e),c);o.startChat({conversationData:e},D,M)},fe)}}}function he(e){u.info("_ssoKeyError data="+JSON.stringify(e),c);ge()}function fe(e){u.info("_startConversationError data="+JSON.stringify(e),c);ge()}function ge(){if(r!==f.PRE_CHAT||W()&&a.unAuthUserTriesAuth){P();u.info("_authenticationErrorCallback:getOfflineSurvey.",c)}}function D(e){n.trigger({appName:c,eventName:p.chat.START_CHAT_INFO,data:e.info});u.info("_startChatSuccess data="+JSON.stringify(e),c)}function me(e){u.info("_getPreChatSuccess data="+JSON.stringify(e),c);e&&e.survey?Te(p.application.PRE_CHAT_SURVEY,w.SURVEYS_PRECHAT,e.survey):o.startChat(null,D,M)}function ve(e){u.info("_getPreChatError data="+JSON.stringify(e),c);o.startChat(null,D,M)}function P(){o.getOfflineSurvey(we,O)}function we(e){u.info("_getOfflineSurveyCallback data="+JSON.stringify(e),c);e&&!e.error&&e.survey?Te(p.application.OFFLINE_SURVEY,w.SURVEYS_OFFLINE,e.survey):O()}function _e(e){u.info("_getPostChatSurveyCallback, survey="+JSON.stringify(e),c);e&&!e.error&&e.survey?Te(p.application.POST_CHAT_SURVEY,w.SURVEYS_EXIT,e.survey):O()}function Ce(e){u.info("_getExitSurveyError, survey="+JSON.stringify(e),c);N(null,f.APP_ENDED)}function Te(e,t,i){i&&i.questions&&i.questions.question&&i.questions.question.forEach(function(e){e.label=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(e.label).cleanText;e.entry&&e.entry.forEach(function(e){e.displayValue=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(e.displayValue).cleanText})});lpTag.hooks&&lpTag.hooks.exec&&(i=(e=lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.AFTER_GET_SURVEY,data:{surveyType:e,surveyData:i}}))&&e.data&&e.data.surveyData||i);B.modify(t,i)}function Ee(e){u.info("_stateListener state="+e,c);N(null,e)}function O(e){u.info("_changeToError err= "+JSON.stringify(e),c);N(e,h.ERROR)}function ye(){u.info("_checkForPostChatSurvey",c);!function(){var e;e=!(!E&&F.skill===U)&&(!0===R.postChatSurveyOnNonInteractiveChat||o.isInteractive());return e}()?N(null,f.APP_ENDED):o.getExitSurvey(E,_e,Ce)}function be(){o.setVisitorTyping(!1);o.endChat(null,O)}function Se(){u.info("_handleError",c);N(null,f.APP_ENDED)}function Ie(){return window.recaptchaRenderer}function W(){var e=a&&a.conf&&a.conf.unifiedConf,t=e&&e.external,e=e&&e.authPostVerificationLiveChat;return!t&&e}this.emailTranscript=function(e,t){e&&o.emailTranscript(e,t,ne,ae)};this.getCurrentState=z;this.getOTK=function(e,t){return o.getOTK(e,t)};this.richContentRequest=function(e,t){u.info("richContentRequest info: "+JSON.stringify(e),c);o.richContentRequest(e,t=t||[])};this.secureFormRequest=function(e,t,i,n){return o.secureFormRequest(e,t,i,n)};this.getOtkJson=function(e){return JSON.stringify({siteId:lpTag.site,chatId:o.getSessionKey&&o.getSessionKey()})};this.dispose=Y};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.SMSDeflectionManager=lpTag.unifiedWindow.SMSDeflectionManager||function(e,t,i,n){var r,a,o,l,s=lpTag.unifiedWindow.apps.CHAT,d=lpTag.unifiedWindow.events.chat,c=lpTag.unifiedWindow.chatModelPath,u=lpTag.unifiedWindow.uiModelPath,p=lpTag.unifiedWindow.apps,h=lpTag.unifiedWindow.events,f=t.chatModel,g=t.uiModel,m=i.engConf||{},v=lpTag.unifiedWindow.consts,w=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml||function(e){return{cleanText:e}},t=(l=new lpTag.unifiedWindow.helpers.SMSFormHelper,n);r=t.apiDelegate;a=t.appContext;(o=t.events).bind({appName:s,eventName:d.INITIALIZED,func:_});o.bind({appName:p.UNIFIED_WINDOW,eventName:h.application.PRE_SMS_FORM,func:C});o.bind({appName:p.UNIFIED_WINDOW,eventName:h.application.PRE_SMS_FORM_EXIT,func:T});r.initialize();function _(){r.getPreSMSForm(function(e){if(e.error)E();else{g.modify(u.STATE,lpTag.unifiedWindow.State.PRE_SMS);f.modify(c.SURVEYS_PRESMS,l.transform(e))}},function(e){E()})}function C(t){if(t&&t.survey){var e=m.externalTargets&&m.externalTargets[v.externalTargets.SMS]&&m.externalTargets[v.externalTargets.SMS].brandIdentifier,i=f.get(c.SURVEYS_PRESMS),n=l.getAnswerOfType(i,t.survey.question,l.TYPES.PHONE_NUMBER),a=l.getAnswerOfType(i,t.survey.question,l.TYPES.FIRST_NAME),o=l.getAnswerOfType(i,t.survey.question,l.TYPES.LAST_NAME),i=l.getAnswerOfType(i,t.survey.question,l.TYPES.MESSAGE);if(n&&e){var s={Body:i?w(i.answer).cleanText:"",From:n.answer,To:e,context:{engagementId:m.eid,campaignId:m.cid,visitorId:m.svid,visitorFirstName:w(a).cleanText?a.answer:"",visitorLastName:o?w(o.answer).cleanText:""}};m.skillId&&(s.context.skillId=m.skillId);r.submitPreSMSForm(s,function(e){g.modify(u.PRE_SMS_CONTEXT,s);g.modify(u.STATE,lpTag.unifiedWindow.State.APP_ENDED);b(t.survey,"success");y()},function(){E();b(t.survey,"fail")})}else E()}else{g.modify(u.STATE,lpTag.unifiedWindow.State.APP_ENDED);y()}}function T(){y();o.trigger({appName:s,eventName:h.viewController.INITIATE_END_CHAT})}function E(){g.modify(u.STATE,lpTag.unifiedWindow.State.CONNECTION_ISSUE)}function y(){o.unbind({appName:s,eventName:d.INITIALIZED,func:_});o.unbind({appName:p.UNIFIED_WINDOW,eventName:h.application.PRE_SMS_FORM,func:C})}function b(e,t){lpTag.hooks&&lpTag.hooks.exec&&lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.AFTER_SUBMIT_SURVEY,data:{context:a,surveyType:lpTag.unifiedWindow.SurveyType.PRE_SMS,surveyData:e,status:t}})}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.ConversationManager=lpTag.unifiedWindow.ConversationManager||function(k,n,V,$){var F,B,v,U,H,z,G,j,q,s,w,r,l,o,K,Y,d,t,c,u,X,J,Z,Q,p="ConversationManager",h=lpTag.unifiedWindow.apps.CHAT,f=lpTag.unifiedWindow.log,g=lpTag.unifiedWindow.events,m=lpTag.unifiedWindow.uiModelPath,_=lpTag.unifiedWindow.chatModelPath,C=g.chat,ee=g.viewController,T=lpTag.unifiedWindow.State,te=lpTag.unifiedWindow.apps,ie=lpTag.unifiedWindow.consts,a=lpTag.unifiedWindow.consts.chatEvents,e=lpTag.unifiedWindow.events.socket,E=lpTag.AMSStatics.conversation.states,y=lpTag.AMSStatics.dialog,b=lpTag.unifiedWindow.secureFormStates,ne=lpTag.AMSStatics.participant.roles,ae=lpTag.unifiedWindow.consts.errorTypes,oe=lpTag.unifiedWindow.consts.authErrorsTypes,se=lpTag.unifiedWindow.MessageState,S=lpTag.unifiedWindow.contentTypes,re=lpTag.unifiedWindow.MessageTypes,le=lpTag.unifiedWindow.settingsIDs,de=lpTag.unifiedWindow.structuredContentTypes,ce=lpTag.unifiedWindow.quickRepliesStates,ue=lpTag.unifiedWindow.welcomeMessageStates,pe=0,he=4,I=2,fe=3,N=null,x={SYSTEM:"system",AGENT:"agent",VISITOR:"visitor"},ge=!1,me=!1,ve=15e3,we=null,_e=3e5,Ce=lpTag.AMSStatics.dialog.closeReasons,Te=!1,Ee=!1,ye=!1,A={},M={},L={},D={},be={},P={},O=lpTag.unifiedWindow.applicationUtils,Se=[],Ie="@id",Ne=!1,xe=!1,Ae={},Me={},W=[],Le=(lpTag.csds,{csds:{acCdnDomain:"acCdnDomain",acCdnDomainConsumerSdk:"acCdnDomainConsumerSdk",leCdnDomain:"leCdnDomain"},storage:{unauthStorage:{key:"-unAuthJWT",name:"unAuthMessaging"},stepUpStorage:{appName:"StepUP",valueKeys:{lastActiveConvo:"lastActiveConvo"}}}}),De=!1,i=(Me[a.SECURE_FORM]=!0,$);f.info("init",p);r=n.uiModel;l=n.chatModel;F=i.stepUpManager;n=i.canEnableOfflineFlow;var Pe=i;o=Pe.apiDelegate;w=Pe.appContext;s=Pe.events;t=Pe.authenticationData;X=Pe.appContext.featureStateManager;J=Pe.appContext.uiStateManager;De=X.checkSetting(le.BLOCK_CONSUMER,"true");s.bind({appName:"SessionManager",eventName:C.NO_SESSION,func:Yt});s.bind({appName:h,eventName:e.CONNECTED,func:Be});s.bind({appName:h,eventName:e.INITIALIZED,func:Ue});s.bind({appName:h,eventName:e.DISCONNECTED,func:ze});s.bind({appName:h,eventName:e.NON_RESPONSIVE,func:Ge});s.bind({appName:h,eventName:e.PING_SUCCESS,func:He});s.bind({appName:h,eventName:C.USER_INFO,func:Je});s.bind({appName:h,eventName:C.USER_LEFT,func:Ze});s.bind({appName:te.UNIFIED_WINDOW,eventName:g.application.POST_CHAT_SURVEY,func:Ut});s.bind({appName:te.UNIFIED_WINDOW,eventName:g.application.END_CHAT,func:Gt});s.bind({appName:h,eventName:C.CONVERSATION_STATE,func:ct});s.bind({appName:h,eventName:C.DIALOG_STATE,func:ut});s.bind({appName:h,eventName:C.CSAT_INFO,func:ot});s.bind({appName:h,eventName:C.CONVERSATION_CONTENT,func:Tt});s.bind({appName:h,eventName:C.SUBSCRIBE_MESSAGING_EVENTS_RESPONSE,func:Et});s.bind({appName:h,eventName:C.CONVERSATION_HISTORY,func:Rt});s.bind({appName:"*",eventName:C.AUTHENTICATION_ERROR,func:rt});s.bind({appName:h,eventName:C.NEW_CONVERSATION_REQUESTED,func:Kt});s.bind({appName:"*",eventName:ee.CONVERSATIONS_VIEWED,func:kt});s.bind({appName:"*",eventName:ee.RETRY_GET_HISTORY,func:bt});s.bind({appName:"*",eventName:C.FORGET_ME,func:st});s.bind({appName:"API",eventName:C.DELETE_CONVERSATION_SUBSCRIPTION,func:Xt});s.once({appName:h,eventName:C.CONVERSATION_OWNER_BRAND_INFO,func:Jt});s.bind({appName:"*",eventName:"pendingLineSet",func:Ve});s.bind({appName:"AMSClient",eventName:C.CONVERSATION_STEP_UP,func:$e});lpTag.events&&lpTag.events.bind({appName:"*",eventName:C.SIGNAL_OUT,func:ke});Fe();n?Bt():We(t);i=w&&w.conf&&w.conf.unifiedConf;B=i&&i.isWelcomeMessageForAgentEnabled||!0;Q=Number(i&&i.timePeriodToLoadHistoryFromUMS);we=Number(i&&i.messagingNotificationTimeout)||5e3;function Oe(){s.unbind({appName:"SessionManager",eventName:C.NO_SESSION,func:Yt});s.unbind({appName:h,eventName:e.CONNECTED,func:Be});s.unbind({appName:h,eventName:e.INITIALIZED,func:Ue});s.unbind({appName:h,eventName:e.DISCONNECTED,func:ze});s.unbind({appName:h,eventName:e.NON_RESPONSIVE,func:Ge});s.unbind({appName:h,eventName:e.PING_SUCCESS,func:He});s.unbind({appName:h,eventName:C.USER_INFO,func:Je});s.unbind({appName:h,eventName:C.USER_LEFT,func:Ze});s.unbind({appName:te.UNIFIED_WINDOW,eventName:g.application.POST_CHAT_SURVEY,func:Ut});s.unbind({appName:te.UNIFIED_WINDOW,eventName:g.application.END_CHAT,func:Gt});s.unbind({appName:h,eventName:C.CONVERSATION_STATE,func:ct});s.unbind({appName:h,eventName:C.DIALOG_STATE,func:ut});s.unbind({appName:h,eventName:C.CONVERSATION_CONTENT,func:Tt});s.unbind({appName:h,eventName:C.SUBSCRIBE_MESSAGING_EVENTS_RESPONSE,func:Et});s.unbind({appName:h,eventName:C.CONVERSATION_HISTORY,func:Rt});s.unbind({appName:h,eventName:C.CSAT_INFO,func:ot});s.unbind({appName:"*",eventName:C.AUTHENTICATION_ERROR,func:rt});s.unbind({appName:h,eventName:C.NEW_CONVERSATION_REQUESTED,func:Kt});s.unbind({appName:"*",eventName:ee.CONVERSATIONS_VIEWED,func:kt});s.unbind({appName:"*",eventName:ee.RETRY_GET_HISTORY,func:bt});s.unbind({appName:"*",eventName:C.FORGET_ME,func:st});s.unbind({appName:"*",eventName:"pendingLineSet",func:Ve});s.unbind({appName:"AMSClient",eventName:C.CONVERSATION_STEP_UP,func:$e});lpTag.events&&lpTag.events.unbind({appName:"*",eventName:C.SIGNAL_OUT,func:ke})}function We(e){if(t=e){f.info("authenticate with data: "+JSON.stringify(t),p);t.type=t.type||O.getPropertyFromObject($,"appContext.conf.authConf.stepUpConnector.type")||O.getPropertyFromObject($,"appContext.conf.authConf.connector.type");Xe(t)}else{f.info("authenticate - error - no authentication data",p);lt()}}function Re(e){var t=M[e];return A[t]&&A[t].dialogs[e].state===y.states.OPEN}function ke(e){var t=w&&w.conf&&w.conf.unifiedConf;t&&!t.isSignalEnabled||o&&"function"==typeof o.sendSignaledEvent&&o.sendSignaledEvent(e.payload)}function Ve(e){Z=!!e.serverPendingLineExists}function $e(){var e=w&&w.conf&&w.conf.unifiedConf;e&&(e.isConvoSteppedUp=!0)}function Fe(){K={agent:!1,visitor:!1}}function Be(){f.info("_handleSocketConnected",p);F.sendStepUp();He();je()}function Ue(){f.info("_handleSocketInitialized",p);if(Te)qe(q);else if(!me){me=!0;s.trigger({appName:h,eventName:C.INITIALIZED});Ee=!0;o.getMyUserProfile();o.getBrandProfile();R(T.REQUESTED,null)}}function He(){if(ge){ge=!1;if(U&&r.get(m.STATE)===T.CONNECTION_ISSUE){G.dialogId=z;ut(G);R(U)}}}function ze(){f.info("_handleSocketDisconnected",p);xe=!0;L={};q=null;j||ge||(j=setTimeout(function(){Ge()},ve))}function Ge(){if(!ge){ge=!0;L={};H=mt();z=gt();A[H]&&A[H].dialogs&&A[H].dialogs[z]&&(G=lpTag.unifiedWindow.applicationUtils.clone(A[H].dialogs[z]));ct({convId:mt(),state:T.CONNECTION_ISSUE});ut({dialogId:gt(),state:T.CONNECTION_ISSUE});je();U=r.get(m.STATE);Ee?R(T.CONNECTION_ISSUE):dt()}}function je(){clearTimeout(j);j=null}function qe(e){e&&o.unsubscribeConversations(e);o.subscribeConversations(et)}function Ke(){!w.conf.unifiedConf.poppedOut&&!w.conf.unifiedConf.external||w.conf.unifiedConf.connectorsSfConfig&&w.conf.unifiedConf.connectorsSfConfig.isFormSubmitted?Ye(Xe):Te?R(T.RESTART_AUTHENTICATION,null):window.location.href=w.appConfigurationManager.getExternalResourceURL(w.conf.engConf,w.conf.unifiedConf,w.conf.unifiedConf.poppedOut)}function Ye(e){if(he<=pe)lt();else{pe++;f.info("_restartAuthentication",p);w.authenticationManager.reAuthenticate(e,Ye.bind(this,e))}}function Xe(e){f.info("_ssoKeySuccess data="+JSON.stringify(e),p);var t=e&&e.ssoKey||null,i=e&&e.redirect_uri||null,n=e&&e.type||O.getPropertyFromObject(w,"conf.authConf.stepUpConnector.type")||O.getPropertyFromObject(w,"conf.authConf.connector.type")||null,e=e&&e.code_verifier,a=F&&F.getStepUpFailedStatus();O.getPropertyFromObject(w,"conf.engConf.allowUnauthMsg")?o.createMessagingInstance({authCode:t,redirect_uri:i,authType:n,pingTimeout:ve,forceNewConfig:a,blockHistory:De}):o.createMessagingInstance({authCode:t,redirect_uri:i,authType:n,pingTimeout:ve,forceNewConfig:a,codeVerifier:e})}function Je(e){var t=e;if(t){var e={id:t.userId,type:function(e){var t;if("string"==typeof e.type)switch(e.type){case"CONTROLLER":t=x.SYSTEM;break;case"CONSUMER":t=x.VISITOR;break;default:t=x.AGENT}else t=e.role?x.AGENT:x.VISITOR;return t}(t),name:t.name,imgUrl:t.imgUrl},i=!1;e.name||(e.type===x.VISITOR?e.name=t.firstName||t.lastName?t.firstName+" "+t.lastName:w.translator.translate("you"):e.name=w.translator.translate("agent"));!function(e,t){var i=l.get(_.PARTICIPANTS)||{};i[e.id]=e;l.modify(_.PARTICIPANTS,i);if(t&&t.dialogId){e=M[t.dialogId];if(e&&A[e]){i=A[e].dialogs[t.dialogId];i&&i.participants&&(i.participants.some(function(e){return e.id===t.userId})||i.participants.push({id:t.userId,role:t.type}))}}}(e,t);switch(e.type){case x.VISITOR:l.get(_.VISITOR_NAME)||(i=!0);break;case x.AGENT:Qe(t)&&(i=!0)}i&&at(e)}if(!Te){qe(q);me=!(Te=!0)}}function Ze(t){Qe(t)&&nt();if(t&&t.dialogId){var e=M[t.dialogId];if(e&&A[e]){e=A[e].dialogs[t.dialogId];if(e&&e.participants){var i=e.participants.some(function(e){return e.id===t.pid});if(i){i=e.participants.indexOf(i);"number"==typeof i&&e.participants.splice(i,1)}}}}}function Qe(e){return e&&(e.type===ne.ASSIGNED_AGENT||e.type===ne.AGENT)&&e.dialogId&&Re(e.dialogId)}function et(e){pe=0;q=e.subscriptionId}function tt(){var e=w.themer&&w.themer.getStyle("openingMessage","text"),i={source:x.AGENT,by:w.translator.translate("info"),isWelcomeMessage:!0};if(u=w.conf.windowConf&&w.conf.windowConf.welcomeMessage){w.shouldWelcomeMessageBeSent=!0;i.text=u.text;if(u.quickReplies&&0<u.quickReplies.length){var t=it(u.quickReplies);if(t){i.quickReplies=t;u.quickRepliesState={isRequired:!0,isRenedered:!1,isRemoved:!1}}}}else e?i.text=e:i.textKey="welcomeMessage";if("string"==typeof i.text){var n,t=w.conf.unifiedConf.welcomeMessageTemplate||{},a=O.cloneExtend(t,{brandName:{type:"sitesettings",value:"account.profile.brand.name"}});for(n in a)if(n){var o=new RegExp("{"+n+"}","gi");if(o.test(i.text)){var s,r=a[n]||{};if("sitesettings"===r.type){if(w.conf.engConf.subscription)try{s=JSON.parse(w.conf.engConf.subscription.conversationownerSettings||"[]")}catch(e){s=[]}else s=w.conf.accountSettings;var l=(s||[]).filter(function(e){return e.id===r.value}),l=l.length?l[0].propertyValue.value:"";i.text=i.text.replace(o,l)}}}w.welcomeMessage={content:i}}if(lpTag.hooks&&lpTag.hooks.execAsync&&lpTag.hooks.isHookAsync(lpTag.unifiedWindow.hooks.BEFORE_WELCOME_MESSAGE)){w.events.trigger({appName:"tooltip",eventName:"show",data:{text:w.translator.translate("loading"),type:"process"}});lpTag.hooks.execAsync({name:lpTag.unifiedWindow.hooks.BEFORE_WELCOME_MESSAGE,data:{content:i}},function(e){f.info("Hook "+lpTag.unifiedWindow.hooks.BEFORE_WELCOME_MESSAGE+" asynchronously returned data successfully",p);e=e&&e.data&&e.data.content||i;(e=e instanceof Array?e:[e]).forEach(function(e){if(e.quickReplies&&0<e.quickReplies.replies.length){var t=it(e.quickReplies.replies,e.quickReplies.itemsPerRow);if(t){e.quickReplies=t;u.quickRepliesState={isRequired:!0,isRenedered:!1,isRemoved:!1}}}w.events.trigger({appName:"tooltip",eventName:"close"});Ot([e])})},function(e,t){f.info("Hook "+lpTag.unifiedWindow.hooks.BEFORE_WELCOME_MESSAGE+" failed with error: "+(t&&t.message),p);i=e&&e.data&&e.data.content||i;w.events.trigger({appName:"tooltip",eventName:"close"});Ot([i])});w.welcomeMessage={content:i}}else{if(lpTag.hooks&&lpTag.hooks.exec){e=lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.BEFORE_WELCOME_MESSAGE,data:{content:i}}),i=e&&e.data&&e.data.content||i;w.welcomeMessage={content:i}}Ot([i])}}function it(e,t){var i=w.conf.windowConf.welcomeMessage.wrapQuickReplies,n=w.conf&&w.conf.unifiedConf&&w.conf.unifiedConf.rowLimit,a={type:de.QUICK_REPLIES,rowLimit:n||3,itemsPerRow:i?void 0:t||8,replies:[]};e.forEach(function(e){e={type:de.BUTTON,tooltip:e.text||e.tooltip,title:e.text||e.title,style:{bold:!e["is-font-inherit"]&&e.bold,italic:!e["is-font-inherit"]&&e.italic,"font-family":e["is-font-inherit"]?"inherit":e["font-family"],size:e.size,color:e.color,"background-color":e["background-color"],"border-color":e["border-color"],"color-hover":e["color-hover"],"background-color-hover":e["background-color-hover"],"border-color-hover":e["border-color-hover"]},accessibility:e.accessibility||{},click:{actions:[{type:ce.PUBLISH_TEXT,text:e.text||e.title}]}};a.replies.push(e)});return a}function nt(){s.trigger({appName:h,eventName:C.CHAT_INFO,data:{resetAgentInfo:!0}})}function at(e){var t;if(e&&e.name&&e.id){(t={})[e.type+"Name"]=e.name;t[e.type+"Id"]=e.id;s.trigger({appName:h,eventName:C.CHAT_INFO,data:t})}}function ot(e){if(!v||e.convId===v[0].convId){d=e;l.get(_.SURVEYS_EXIT)&&((e=e.csat).csatRate||e.status&&(e.status===ie.csatStatus.SKIPPED||e.status===ie.csatStatus.PARTIALLY_FILLED))&&Ht()}}function st(){Ne=!0;var e=r.get(m.STATE);(e===T.WAITING||e===T.CONNECTION_ISSUE&&U===T.WAITING)&&qt()}function rt(e){switch(e&&e.error){case oe.EXPIRED:Ke();break;case oe.INVALID_SESSION:lt();break;case oe.LOGOUT:pe=0;Ye(function(){pe=0;r.get(m.STATE)===T.AUTH_ERROR&&s.trigger({appName:"*",eventName:"knockout"})})}}function lt(e){f.info("_endAppOnInvalidSession"+(e?" err="+JSON.stringify(e):""),p);var e=O.getPropertyFromObject(w,"conf.engConf.allowUnauthMsg"),t=w&&w.conf&&w.conf.unifiedConf;if(!e||t&&t.isConvoSteppedUp){t&&t.isStepUpDuringWaitingStateEnabled&&t.isConvoSteppedUp&&Qt({isConvoSteppedUp:!1,wasAuthConnectorAppliedForStepUp:!1});R(T.AUTH_ERROR,null);s.trigger({appName:h,eventName:C.ERROR,data:{errorType:ae.AUTH_ERROR,keepError:!0}})}else{R(T.ERROR,null);s.trigger({appName:h,eventName:C.ERROR,data:{errorType:ae.FAILED_START_CONVERSATION_ERROR,keepError:!0}})}o.dispose()}function dt(){f.info("_endAppAndShowFailedConnectionError",p);R(T.ERROR);O.isEmpty(Se)&&Ee?s.trigger({appName:h,eventName:C.FAILED_START_CONVERSATION}):s.trigger({appName:h,eventName:C.ERROR,data:{errorType:ae.FAILED_START_CONVERSATION_ERROR,keepError:!0}});o.dispose()}function ct(e){if(A[e.convId]&&A[e.convId].state!==e.state){A[e.convId].state=e.state;switch(e.state){case E.OPEN:Y=ye=!1;break;case E.CLOSE:var t=e;A[t.convId].endTime=t.time;A[t.convId].closeReason=t.closeReason;jt(!1);_t(t)||qt()}}}function ut(e){var t=M[e.dialogId]||e.conversationId;if(A[t]){if(!A[t].dialogs[e.dialogId]){A[t].dialogs[e.dialogId]={state:null,endTime:e.endTime,closeReason:e.closeReason,dialogType:e.dialogType,channelType:e.channelType,participants:e.participants,lastMessageId:-1,history:!1};var i=A[t].sortedDialogIds;i.push({dialogId:e.dialogId,endTime:e.endTime});A[t].sortedDialogIds=Ft(i);M[e.dialogId]=t;$t(e.dialogId)}if(A[t].dialogs[e.dialogId].state!==e.state){A[t].dialogs[e.dialogId].state=e.state;switch(e.state){case y.states.OPEN:ye=!1;l.modify(_.CURRENT_DIALOG_TYPE,e.dialogType);w.conf.unifiedConf.shouldSkipConfirmationDialog=A[t].dialogs[e.dialogId].dialogType===y.types.POST_SURVEY;zt(e.dialogId);break;case y.states.CLOSE:var n=e,a=M[n.dialogId],o=A[a].sortedDialogIds;A[a].dialogs[n.dialogId].endTime=n.endTs||n.time;A[a].dialogs[n.dialogId].closeReason=n.closedBy;o[o.length-1].dialogId===n.dialogId&&(o[o.length-1].endTime=A[a].dialogs[n.dialogId].endTime);jt(!1);R(T.APP_ENDED,function(){var e=r.get(m.STATE);if(w.conf.unifiedConf.external&&!k.surveyPostChatEnabled){c=!1;w.dontParseWelcomeMessageFromMetaData=!0}e!==T.APP_ENDED||Ne||R(T.WAITING)});l.removeKey(_.CURRENT_DIALOG_TYPE,!1);c=!1;w.dontParseWelcomeMessageFromMetaData=!0;if(!ye&&0<=A[t].dialogs[e.dialogId].lastMessageId){ye=!0;o=e.dialogId,a=M[o],((n=A[a].dialogs[o].dialogType)!==y.types.MAIN||pt(a))&&n===y.types.MAIN||Ot([Pt(o)])}s.trigger({appName:h,eventName:C.CONVERSATION_CLOSED,data:{convId:e.dialogId}})}}}}function pt(e){var t;if(e)return t=ht(e),A[e].dialogs[t].closeReason===Ce.SYSTEM}function ht(e){if(A[e]&&A[e].dialogs)for(var t in A[e].dialogs)if(A[e].dialogs[t].dialogType===y.types.MAIN)return t}function ft(e){if(A[e]&&A[e].dialogs){for(var t in A[e].dialogs)if(A[e].dialogs[t].dialogType===y.types.POST_SURVEY)return A[e].dialogs[t].lastMessageId<0;return!0}}function gt(){for(var e in A)if(A.hasOwnProperty(e))for(var t in A[e].dialogs)if(A[e].dialogs.hasOwnProperty(t)&&A[e].dialogs[t].state===y.states.OPEN)return t}function mt(){for(var e in A)if(A.hasOwnProperty(e)&&A[e].state===E.OPEN)return e}function R(e,t){var i=r.get(m.STATE),n=i===T.POST_CHAT&&e===T.WAITING,a=w&&w.conf&&w.conf.unifiedConf;if((!i||i!==e)&&!n){r.modify({splitKey:m.STATE,updateData:e,onSuccess:t});W.push(e);if(e===T.WAITING){nt();Fe();wt(e);a&&a.isStepUpDuringWaitingStateEnabled&&Qt({isConvoSteppedUp:!1});var n=l&&l.getModel();if(n){var t=X.getCloseWindowByAgentBehaviorType(),o=X.getCloseWindowButtonBehaviorType(),s=J.isWindowClosedByVisitor();(i===T.REQUESTED||i===T.APP_ENDED&&o===X.CLOSE_ON_END_TYPE.OPEN)&&(n=(o=n)&&o.attributes&&(!o.attributes.chat||o.attributes.chat&&o.attributes.chat.currentDialogType!==y.types.POST_SURVEY),o=!c||0===O.getPropertyFromObject(o,"attributes.chat.lines",[]).length,n)&&o&&vt();if(!s&&i===T.APP_ENDED&&t===X.CLOSE_ON_END_TYPE.CLOSE){w.events.trigger({appName:lpTag.unifiedWindow.MaximizedViewController.ControllerName,eventName:g.viewController.INITIATE_END_CHAT,data:!0});w.uiStateManager.setVisibility(m.TOP_MENU_VISIBLE,!1)}}else vt()}a&&a.isStepUpDuringWaitingStateEnabled&&e===T.CHATTING&&a.wasAuthConnectorAppliedForStepUp&&Qt({isConvoSteppedUp:!0})}}function vt(){if(!(W&&3<=W.length&&W[W.length-1]===T.WAITING&&W[W.length-2]===T.PENDING&&W[W.length-3]===T.WAITING)){var e=!1;if(u=w.conf.windowConf&&w.conf.windowConf.welcomeMessage){if(u.isEnabled){u.whenToPresent!==ue.showTiming.EVERY_TIME&&(u.whenToPresent!==ue.showTiming.FIRST_TIME||v||c)||(e=!0);c=!0}}else v||c||(e=c=!0);var t=lpTag.hooks&&lpTag.hooks&&lpTag.hooks.isHookAsync&&lpTag.hooks.isHookAsync(lpTag.unifiedWindow.hooks.BEFORE_WELCOME_MESSAGE);(e||t)&&setTimeout(tt,0)}}function wt(e){s.trigger({appName:h,eventName:C.STATE,data:e})}function _t(e){var t,i,n=!1;if(k.surveyPostChatEnabled){a=O.getPropertyFromObject(d,"csat.endTs")+o.getTimeDiff()+_e;t=e&&!pt(e.convId)&&xt(ht(e.convId))&&ft(e.convId);i=d&&!(i=d,O.getPropertyFromObject(i,"csat.csatRate")||"SKIPPED"===O.getPropertyFromObject(i,"csat.status"))&&xt(ht(d.convId))&&ft(d.convId)&&Date.now()<a&&!mt()&&!pt(d.convId);O.getPropertyFromObject(w,"conf.engConf.allowUnauthMsg")&&(i=!1);if(t||i){var a=e;if((a=a&&a.convId||d&&d.convId)&&ft(a)&&A[a]&&A[a].postSurveyDialogWasOpened&&A[a].state===E.CLOSE){nt();a=A[a].dialogs[ht(a)].participants.some(function(e){return e.role===ne.ASSIGNED_AGENT});a&&at(Dt({originatorId:a.id}))}R(T.POST_CHAT,Ct);n=!0;wt(T.POST_CHAT)}}return n}function Ct(){var e,t=l.get(_.AGENT_NAME)||w.translator.translate("csatTheAgent"),t=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(t).cleanText;w.translator.extendDictionary({agentName:t},{locale:w.conf.engConf.lang});t=lpTag.unifiedWindow.CsatDataGenerator(w.translator);l.removeKey(_.SURVEYS_EXIT,!1);lpTag.hooks&&lpTag.hooks.exec&&(t=(e=lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.AFTER_GET_SURVEY,data:{surveyType:g.application.POST_CHAT_SURVEY,surveyData:t}}))&&e.data&&e.data.surveyData||t);l.modify(_.SURVEYS_EXIT,t)}function Tt(e){if(e&&!O.isEmpty(e)){if(e&&e.dialogId){var t=D[e.dialogId]&&D[e.dialogId].resubscribe,i=e.dialogId;if(i&&D&&D[i]&&D[i].timeoutId){clearTimeout(D[i].timeoutId);delete D[i].timeoutId}delete D[i]}var i=e,e=t,n=i.dialogId,a=St(n,!0),o=A[a];o.returnedDialogs[n].content=i;o.returnedDialogs[n].resubscribed=e;if(function(e){var t=A[e];if(!t.returnedDialogs.allDialogsSuccessful){for(var i in t.dialogs){i=t.returnedDialogs[i];if(!i||!i.successful)return t.returnedDialogs.allDialogsSuccessful=!1,0}t.returnedDialogs.allDialogsSuccessful=!0}return 1}(a))for(n in o.dialogs){var s=o.returnedDialogs[n];if(s&&s.content){!function(e,t){var i,n;for(n in e){i=e[n].dialogId&&M[e[n].dialogId];if("dialogId"!==n&&e.hasOwnProperty(n)&&!function(e,t){e=e.filter(function(e){return e.dialogId===t.dialogId&&e.sequence===t.sequence});return e&&0<e.length}(Se,e[n])){e[n].resubscribed=t;Se.push(e[n]);!A[i].hasContent&&e[n].event&&(A[i].hasContent=!0)}"number"==typeof e[n].sequence&&i&&A[i].dialogs[e[n].dialogId].lastMessageId<e[n].sequence&&e[n].event&&(A[i].dialogs[e[n].dialogId].lastMessageId=e[n].sequence)}!function(){if(0===Object.keys(L).length&&0===Object.keys(D).length&&Object.keys(A).length===I){var e,t,i=0;for(e in A)A[e].hasContent||i++;i===I?t=I:0<i&&i<I&&(t=I-i);for(var n=0;n<t;n++)kt()}}()}(s.content,s.resubscribed);delete s.content;delete s.resubscribed}}}It(t);e=mt();if(e&&!Y&&xt(ht(e))){Y=!0;wt(T.INTERACTIVE)}}function Et(e){var t,i;if(e&&e.reqId)if(200!=e.code){var n,a=e;if((a=a&&a.reqId)&&L[a]){n=L[a].dialogId;if(P[n]&&P[n].retries>=fe){yt(a,!0);if(function(e){e=M[e];return A[e].state===E.OPEN}(n))dt();else{It();0===Object.keys(L).length&&be[ht(v[0].convId)]&&It(w.conf.unifiedConf.failedToLoadHistory=!0)}}else{P[n]?P[n].retries++:P[n]={retries:1};$t(n)!==a&&yt(a)}}}else{t=L[e.reqId].dialogId;i=1;if(!O.isEmpty(P)&&P[t]){i=P[t].retries;delete P[t]}n=L[e.reqId].resubscribe;yt(e.reqId);delete be[t];a=setTimeout(function(){P[t]||(P[t]={retries:i});Tt({dialogId:t})},we);D[t]={dialogId:t,timeoutId:a,resubscribe:n}}}function yt(e,t){if(t&&L[e]&&L[e].dialogId){be[L[e].dialogId]=L[e];t=L[e].dialogId;t=St(t,!1);A[t].returnedDialogs.allDialogsSuccessful=!1}delete L[e]}function bt(e){if(O.isEmpty(be))kt(e);else for(var t in be)be.hasOwnProperty(t)&&$t(t)}function St(e,t){if(!e)return null;var i=M[e];if(i&&A[i]){A[i].returnedDialogs||(A[i].returnedDialogs={allDialogsSuccessful:!1});A[i].returnedDialogs[e]||(A[i].returnedDialogs[e]={});A[i].returnedDialogs[e].successful=t}return i}function It(e){if(0===Object.keys(L).length&&0===Object.keys(D).length||e){var e=gt()?T.CHATTING:T.WAITING,t=function(){var i,n=[];Array.isArray(Se)&&Se.forEach(function(e,t){i=function(e){var t=function(e){var t=e&&e.event||{};{if(t.type!==re.RICH_CONTENT){var i=e,n=i&&i.event||{};!function(e){return!(!Ae[e.sequence]||e.state!==se.VIEWED&&e.state!==se.ERROR)}(i)||(n.contentType=S.SECURE_FORM_UPDATE);switch(n.contentType){case S.HOSTED_FILE:return function(e,t){return{type:t,subType:"REGULAR",fileData:e,textType:"file"}}(n.message,S.HOSTED_FILE);case S.EXTERNAL_FILE:return Mt(w.translator.translate("transcriptForPhotoSharingImage"),a.LINE);case S.TEXT_PLAIN:return Mt(n.message||"",a.LINE,n.quickReplies);case S.SECURE_FORM_INVITATION:return Lt(i,b.SEND);case S.SECURE_FORM_SUBMISSION:return Lt(i,b.SUBMIT);case S.SECURE_FORM_UPDATE:return Lt(i,i.state);default:return Mt("string"==typeof n.message?n.message:"",a.LINE)}return}return Mt(t.content,a.RICH_CONTENT,t.quickReplies)}}(e);!function(e,t){var i=Dt(t)||{};e[Ie]=t.sequence;e.sequenceId=t.sequence;e.originatorId=i.id;e.by=i.name;e.source=i.type;e.time=t.serverTimestamp;e.convId=t.dialogId;e.track=function(e){var t=M[e.dialogId];if(At(e)&&N&&v[N]&&t===v[N].convId&&e.dialogId===function(e){if(A[e]&&A[e].dialogs&&A[e].sortedDialogIds)for(var t=0;t<A[e].sortedDialogIds.length;t++){var i=A[e].sortedDialogIds[t].dialogId;if(0<=A[e].dialogs[i].lastMessageId)return i}}(t)&&N!==v.length-1)return!0;return!1}(t);e.history=function(e){var t=e.dialogId,e=e.conversationId||M[e.dialogId];return A[e].dialogs[t]&&A[e].dialogs[t].history}(t);e.resubscribed=t.resubscribed;e.state=t.state;e.metadata=t.metadata||void 0}(t,e);return t}(e);n.push(i);Se[t].event&&function(e){var t=M[e.dialogId],i=A[t].dialogs[e.dialogId].dialogType;if(ye||!At(e)||i===y.types.MAIN&&pt(t))return;{var n;if(e.resubscribed)return i=l.get(_.LINES)||[],n=Pt(e.dialogId),!(!!(t=i.filter(function(e){return e.time===n.time&&e.type===n.type&&e.textKey===n.textKey}))&&0<t.length)}return 1}(e)&&n.push(Pt(e.dialogId));(t=i)&&t[Ie]&&t.type===a.SECURE_FORM&&(Ae[t[Ie]]={info:t.info});e=i;(e=Array.isArray(e)?e:[e]).forEach(function(e){if(function(e){switch(e.type){case a.LINE:return!!e.text;case a.RICH_CONTENT:case a.SECURE_FORM:return 1;default:return}}(e)&&Re(e.convId))switch(e.source){case x.VISITOR:K.visitor=!0;break;case x.AGENT:K.agent=!0}})});return n}();R(e,null);Ot(t,!0);_t();Se=[]}}function Nt(e){if(!w.dontParseWelcomeMessageFromMetaData){w.dontParseWelcomeMessageFromMetaData=!0;for(var t=0;t<e.length;t++)if(e[t]&&Array.isArray(e[t].metadata)){var i=e[t].metadata.find(function(e){return"WelcomeMessage"===e.type});if(i){i.quickReplies=i.quickReplies||[];i.time=e[t].time-1;e.splice(t,0,function(e){var t={by:"Info",isWelcomeMessage:!0,source:"agent"};t.text=e.event.message;t.time=e.time;t.type="line";t.addedFromMD=!0;t.history=!0;return t}(i));c=!0;w.shouldWelcomeMessageBeSent=!1;t++}}}}function xt(e){for(var t=l.get(_.LINES)||[],i=!1,n=!1,a=0;a<t.length;a++)if(t[a].convId===e){i=i||t[a].source===x.VISITOR;n=n||t[a].source===x.AGENT;if(i&&n)break}return i&&n}function At(e){var t=e.conversationId||M[e.dialogId],i=e.dialogId;return!(!A[t].dialogs[i]||A[t].dialogs[i].lastMessageId!==e.sequence||A[t].dialogs[i].state!==y.states.CLOSE)}function Mt(e,t,i){return{type:t,subType:"REGULAR",text:e,quickReplies:i,textType:"plain"}}function Lt(e,t){var i,n=function(e,t){var i;switch(e.state){case se.VIEWED:i=b.VIEWED;break;case se.ERROR:i=b.ERROR;break;default:i=t}return Re(e.dialogId)?i:b.ERROR}(e,t),t=function(e,t){t=t===b.SUBMIT?e.eventId:e.sequence,t=Ae[t]||{};return e.event&&e.event.message||t.info}(e,t);if(t){i={type:a.SECURE_FORM,subType:a.SECURE_FORM,formState:n,command:n,info:{secureFormId:t.formId||t.secureFormId,secureFormName:t.title||t.secureFormName,invitationId:t.invitationId,uniqueId:t.invitationId}};e.metadata&&e.metadata[0]&&e.metadata[0].hasOwnProperty("agentData")&&(i.info.metadata=e.metadata[0])}return i}function Dt(e){return(l.get(_.PARTICIPANTS)||{})[e.originatorId]}function Pt(e){var t=M[e],i=A[t].dialogs[e].dialogType===y.types.MAIN?A[t].dialogs[e].closeReason===Ce.AGENT?"transcriptConvResolvedByAgent":"transcriptConvResolvedByVisitor":"";return{type:a.INFO,textKey:i,time:A[t].dialogs[e].endTime,history:A[t].dialogs[e].history,source:"system",hasSeparator:!0,subType:"conversationResolved"}}function Ot(e,t){var i=0<Object.keys(A).length&&"CLOSE"===A[Object.keys(A)[0]].state;if(e&&0<e.length){t&&(e=O.sortByKeyValue(e,"time"));B&&(!w.dontParseWelcomeMessageFromMetaData&&i||!c&&!e[0].isWelcomeMessage)&&Nt(e);e.forEach(function(e){r.get(m.STATE);Z&&!e.isWelcomeMessage&&(e.history=!0);s.trigger({appName:h,eventName:Me[e.type]?e.type:C.LINE,data:e})});s.trigger({appName:h,eventName:C.FINISHED_EVENTS_BULK})}}function Wt(e){return e&&e.conversationDetails&&e.conversationDetails.dialogs||[]}function Rt(e){if(Array.isArray(e)&&0<e.length){e=e.sort(function(e,t){return e.conversationDetails.endTs?t.conversationDetails.endTs?t.conversationDetails.endTs-e.conversationDetails.endTs:1:-1});if(v){var t=function(e){if(0<(e=function(e){var t,i,n=[];t=v&&0<v.length&&v[0]&&v[0].convId;i=t&&v[0].conversationDetails&&v[0].conversationDetails.startTs||0;for(var a=0;a<e.length&&(e[a].convId!==t&&e[a].conversationDetails&&e[a].conversationDetails.startTs>i);a++)n.push(e[a]);return n}(e)).length){Vt(e,0,e.length-1,!1);v=e.concat(v);N+=e.length}return e}(e),i=e;if(0<(i=function(e){var t,i;t=v&&0<v.length&&v[v.length-1];i=t&&t.conversationDetails&&t.conversationDetails.startTs;return e.filter(function(e){return e.conversationDetails&&e.conversationDetails.startTs<i||!i})}(i)).length){v=v.concat(i);kt()}if(xe){xe=!1;if((!t||!t.length)&&v[0]){v[0].conversationDetails.dialogs=(i=e,n=v[0],t=Wt(n),i=Wt(i.filter(function(e){if(e.convId===n.convId)return e})[0]||{}),O.arrayUniqueByKey(i.concat(t),"dialogId"));Vt(v,0,0,!1,!0)}}}else{v=e;kt()}}else v||Bt();var n}function kt(e){var t,i,n=!1,a=e&&e.retry||!1,e=e&&e.changedScroll||!1;if(v&&!e){if(null===N){t=0;i=v.length<I?v.length-1:I-1}else if(N<v.length-1){i=t=N+1;n=null!==l.get(_.LINES);if(a){i=t=N;v&&v[N]&&v[N].convId&&A&&A[v[N].convId]&&delete A[v[t].convId]}}else{if(N!==v.length-1||null!==l.get(_.LINES)){s.trigger({appName:"*",eventName:ee.END_OF_HISTORY,data:{shouldHide:!0}});f.error("in _loadNextConversationsFromHistory: something went wrong trying to load the history!!!",p);return}Bt()}Vt(v,t,N=i,n)}}function Vt(e,t,i,n,a){var o,s,r=w&&w.conf&&w.conf.unifiedConf,l=!r||void 0===r.resubscribeDialogOnReconnect||r.resubscribeDialogOnReconnect;e=e||v;for(var d=t;d<=i;d++){var c=e[d],u=c.convId;if(!A[u]||a){o=c.conversationDetails.state!==E.OPEN?e[d].conversationDetails.state:"";A[u]=A[u]||{state:o,endTime:e[d].conversationDetails.endTs,closeReason:e[d].conversationDetails.closeReason,dialogs:{},postSurveyDialogWasOpened:!1,hasContent:!1};for(var p=[],h=e[d].conversationDetails.dialogs,f=0;f<h.length;f++){s=h[f].dialogId;if(h[f].channelType!==lpTag.unifiedWindow.consts.coBrowse.coBrowseChannelName){if(A[u].dialogs[s]){if(a)if(h[f].state===y.states.OPEN)$t(s,!0);else if(l&&0===d&&h[f].dialogType===y.types.MAIN&&h[f].state===y.states.CLOSE){A[u].dialogs[s].state=y.states.CLOSE;A[u].dialogs[s].closeReason=h[f].closedBy;A[u].dialogs[s].endTime=h[f].endTs;jt(!1);$t(s,!0)}}else{g=h[f].state!==y.states.OPEN?h[f].state:"";A[u].dialogs[s]={state:g,endTime:h[f].endTs,lastMessageId:-1,closeReason:h[f].closedBy,history:n,dialogType:h[f].dialogType,channelType:h[f].channelType,participants:h[f].participants};M[s]=u;zt(s);var g=!1;if(Q&&c.conversationDetails.state!==E.OPEN){Q=Q>=ie.fifteenMinutesInMS?Q:ie.fifteenMinutesInMS;var m=Date.now()-Q,g=A[u].endTime&&A[u].endTime<m;A[u].dialogs[s].history=!0}$t(s,!1,g)}p.push({dialogId:s,endTime:h[f].endTs})}}A[u].sortedDialogIds=Ft(p)}}}function $t(e,t,i){if(function(e){var t,i;if(e){t=M[e];if(w.conf.unifiedConf.connectorsSfConfig&&w.conf.unifiedConf.connectorsSfConfig.conversationId&&w.conf.unifiedConf.connectorsSfConfig.dialogId)return i=w.conf.unifiedConf.connectorsSfConfig.conversationId,w.conf.unifiedConf.connectorsSfConfig.dialogId===e&&i===t?1:void 0;if(A[t].dialogs[e].channelType!==y.channelTypes.COBROWSE)switch(A[t].dialogs[e].dialogType){case y.types.MAIN:case y.types.POST_SURVEY:return 1;default:if(A[t].dialogs[e].participants.some(function(e){return e.role===ne.CONSUMER}))return 1}}}(e)){i={conversationId:M[e],dialogId:e,forceLoadFromHistoryAPI:i||!1},i=(w.conf.unifiedConf.connectorsSfConfig&&w.conf.unifiedConf.connectorsSfConfig.seqId&&0<w.conf.unifiedConf.connectorsSfConfig.seqId&&(i.fromSeq=w.conf.unifiedConf.connectorsSfConfig.seqId),o.subscribeMessagingEvents(i));L[i]={dialogId:e,resubscribe:t};return i}}function Ft(e){return e.sort(function(e,t){return e.endTime?t.endTime?t.endTime-e.endTime:1:-1})}function Bt(){R(T.WAITING,null)}function Ut(e){if(e&&(e.survey&&e.survey.question[0]||e.status)){d&&(e.convId=d.convId);o.submitExitChatSurvey(e,null,Ge)}d=null;Ht()}function Ht(){l.removeKey(_.SURVEYS_EXIT,!1);r.get(m.STATE)!==T.CONNECTION_ISSUE?R(T.APP_ENDED,qt):Ne?qt():U=T.WAITING}function zt(e){var t=M[e];A[t].dialogs[e].dialogType===y.types.POST_SURVEY&&(A[t].postSurveyDialogWasOpened=!0)}function Gt(){jt(!1);o.setVisitorTyping(!1);o.closeDialog()}function jt(e){"boolean"==typeof e&&s.trigger({appName:h,eventName:C.AGENT_TYPING,data:{agentTyping:e}})}function qt(){if(Ne){R(T.APP_ENDED);o.dispose()}else R(T.WAITING)}function Kt(){R(T.PENDING)}function Yt(){f.info("_disposeApplication",p);s.trigger({appName:p,eventName:g.chatState.ENDED});Oe()}function Xt(t){w.conf.unifiedConf.isStepUpEnabled&&(e=function(e){t.conversationId&&t.conversationId===e&&w.wrapperWindow&&t.stage&&"OPEN"===t.stage&&t.state&&"OPEN"===t.state&&w.wrapperWindow.hide()},i=lpTag&&lpTag.csds&&lpTag.csds.getDomain(Le.csds.leCdnDomain),window.lpTag.taglets.lpSecureStorage.getValue({app:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,key:Le.storage.stepUpStorage.valueKeys.lastActiveConvo,appName:Le.storage.stepUpStorage.appName,site:lpTag&&lpTag.site,domain:Zt(i),success:e,error:function(){f.error("_getLastUnauthConvoData: failed to get last unauth convo data",p)},firstParty:!0}));var e,i}function Jt(e){w.conf.conversationOwnerBrandInfo=e}function Zt(e){var t=window.lpTag.taglets.lpSecureStorage.v;return"https://"+e+"/le_secure_storage/"+(t||"")}function Qt(e){var t=w&&w.conf&&w.conf.unifiedConf,i=lpTag&&lpTag.csds&&lpTag.csds.getDomain(Le.csds.leCdnDomain);if(t){t.isConvoSteppedUp=(e.hasOwnProperty("isConvoSteppedUp")?e:t).isConvoSteppedUp;t.wasAuthConnectorAppliedForStepUp=(e.hasOwnProperty("wasAuthConnectorAppliedForStepUp")?e:t).wasAuthConnectorAppliedForStepUp;e={wasAuthConnectorAppliedForStepUp:t.wasAuthConnectorAppliedForStepUp,isConvoSteppedUp:t.isConvoSteppedUp};lpTag.taglets.lpSecureStorage.setValue({key:lpTag.unifiedWindow.consts.stepUpInWaitingState.storageKey,site:lpTag.site,app:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,value:e,success:function(e){e&&f.info("_persistWaitingStateStepUpProperties: convo flag persisted",p)},errorTimeout:function(){f.error("_persistWaitingStateStepUpProperties: Error persist convo flag",p)},appName:lpTag.unifiedWindow.consts.stepUpInWaitingState.appName,domain:Zt(i),firstParty:!0})}}this.setConversationUrgency=function(e){o.setConversationUrgency(e)};this.authenticate=We;this.isCurrentConversation=Re;this.getOtkJson=function(e){return lpTag.site+":"+(e&&e.invitationId)};this.getOTK=function(e,t){return o.getOTK({formId:e.secureFormId,invitationId:e.invitationId,type:"SecureForm"},t)};this.secureFormRequest=function(e,t,i){f.info("secureFormRequest status: "+e+" info:"+JSON.stringify(i),p);o.secureFormRequest({dialogId:ht(mt())||o.getSessionKey(),state:e,submissionId:i.formUuid,invitationId:t,sequenceList:[i.sequenceId],contentType:e===b.SUBMIT?S.SECURE_FORM_SUBMISSION:""})};this.richContentRequest=function(e,t){if(e){f.info("richContentRequest info: "+JSON.stringify(e),p);o.richContentRequest({state:e.state,dialogId:o.getSessionKey(),sequenceList:[e.sequenceId],metadata:t||[]})}};this.imageShareGenerateUrlRequest=function(e){o.imageShareGenerateUrlRequest(e)};this.imageShareDownloadUrlRequest=function(e){o.imageShareDownloadUrlRequest(e)};this.dispose=Oe;this.quickRepliesRequest=function(e,t){if(e){f.info("quickRepliesRequest info: "+JSON.stringify(e),p);o.quickRepliesRequest({state:e.state,dialogId:o.getSessionKey(),sequenceList:[e.sequenceId],metadata:t||[]})}};this.getShiftStatus=function(e){o.getShiftStatus({success:e.success,error:e.error})};this.getConversationList=function(){return v};this.areAllConversationsLoaded=function(){return N===(v&&v.length-1)};this.isAutoClosedMainDialog=pt};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.LineStatesManager=function(e){var t,s,r,l,i,n="LineStatesManager",o={AGENT:"agent",VISITOR:"visitor",SYSTEM:"system"},d=lpTag.unifiedWindow.MessageState,c=lpTag.unifiedWindow.MessagePriority,a=lpTag.unifiedWindow.events.viewController,u=lpTag.unifiedWindow.chatModelPath,p=lpTag.unifiedWindow.uiModelPath,h=lpTag.unifiedWindow.log,f="@id",g=lpTag.unifiedWindow.applicationUtils;h.info("init",n);if("object"==typeof e){i=e.events;t=e.lpModel;s=e.lppModel;r=e.apiDelegate;l=e.browserStateManager;i.bind({appName:"*",eventName:a.LINES_VIEWED,func:m})}else h.error("init: missing mandatory dependencies.",n);function m(e){i=s.get(p.WINDOW_MAXIMIZED);var t,i,n,a=l.isFocus()&&i?d.READ:d.ACCEPT,o=[];e=e||w();Array.isArray(e)&&e.forEach(function(e){if(!_(e)&&v(e,a)){e.state=a;o.push(e)}});for(n in t=g.groupByKeyValue(o,"state"))r.sendStatesUpdate(t[n],n)}function v(e,t,i,n,a){n=!n||e.source!==n;if(a){n=!0;i=null}return(e.state!==d.FAILED&&!e.originatorId&&e.source===o.VISITOR||e.originatorId&&e.originatorId!==i)&&e.state!==t&&n&&c[e.state]<c[t]}function w(){return t.get(u.LINES)||[]}function _(e){return e.source===o.VISITOR}this.verifyLineStates=function(e){m(e=function(e){var t,i=w(),n=[];Array.isArray(e)&&e.forEach(function(e){(t=function(e,t){var i=e;if((t=function(e,t){var i=null;Array.isArray(e)&&e.some(function(e){if(e[f]===t[f]&&e.convId===t.convId)return i=e,!0});return i}(t,e))&&void 0!==e.state)if(v(t,e.state,e.originatorId,e.source,e.resubscribed)){(i=t).state=e.state;i.update=!0}else if("SENT"===e.state&&"SENT"!==t.state&&t.state!==d.FAILED&&t.state!==d.ERROR){(i=e).localId=t.localId;i.state=t.state}else i=null;return i}(e,i))&&n.push(t)});return n}(e));return e};this.sendStatesUpdate=m;this.getLastReadLine=function(e){for(var t,i,n=e.length-1;0<=n&&(_(t=e[n])||t.source===o.SYSTEM||t.state!==d.READ||t.history);n--)i||!_(t)||t.history||(i=t);return i||t};this.dispose=function(){i.unbind({appName:"*",eventName:a.LINES_VIEWED,func:m})}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.TtrManager=function(e){var t,i,n,a,o,s="TtrManager",r=lpTag.unifiedWindow.apps.CHAT,l=lpTag.unifiedWindow.events.chat,d=lpTag.AMSStatics.effectiveTTRTypes,c=lpTag.unifiedWindow.chatModelPath,u=lpTag.unifiedWindow.uiModelPath,p=lpTag.unifiedWindow.log,h=!1,f={brandInfo:null,urgencyInfo:null,shiftStatus:null,published:!1},g=lpTag.unifiedWindow.applicationUtils,m=null,v=1e4;p.info("init",s);if("object"==typeof e){a=e.events;i=e.lpModel;n=e.lppModel;t=e.conversationManager;e.features;!function(){a.bind({appName:r,eventName:l.BRAND_INFO,func:T});_();n.bind(u.STATE,C);i.bind(c.TRANSCRIPT_LOADED,y)}()}else p.error("init: missing mandatory dependencies.",s);function w(){a.unbind({appName:r,eventName:l.TTR_INFO,func:E});h=!1}function _(){if(!h){h=!0;a.bind({appName:r,eventName:l.TTR_INFO,func:E})}}function C(e){switch(e.newValue){case lpTag.unifiedWindow.State.APP_ENDED:case lpTag.unifiedWindow.State.POST_CHAT:f.published=!1;f.urgencyInfo=null;w();break;case lpTag.unifiedWindow.State.REQUESTED:case lpTag.unifiedWindow.State.PENDING:case lpTag.unifiedWindow.State.CHATTING:_()}}function T(e){if(!f.brandInfo||!g.isSameObject(e,f.brandInfo)){f.brandInfo=e;b();y()}}function E(e){if(!f.urgencyInfo||!g.isSameObject(e,f.urgencyInfo)){f.urgencyInfo=f.urgencyInfo||{};var t=e.ttrType!==f.urgencyInfo.ttrType,i=e.manualETTR!==f.urgencyInfo.manualETTR;f.urgencyInfo=e;f.urgencyInfo.hasDataChanged=i||t;y()}}function y(){if(f.brandInfo&&f.urgencyInfo&&i.get(c.TRANSCRIPT_LOADED)&&null!=m){e=function(e,t){var i={},n=g.getPropertyFromObject(e,"timeDiff")||0;i.delay=g.getPropertyFromObject(e,"delay.tillWhen")||0;i.onOffHours=function(e,t,i){var n,a,t=(new Date).getTime()-t;if(g.isEmpty(i))(a="number"==typeof e&&t<e)&&(n=e-t);else{a=!i.onShift;n=a?i.nextOn&&i.nextOn>t?i.nextOn-t:null:i.nextOff&&i.nextOff>t?i.nextOff-t:null}if("number"==typeof n){e=Math.min(n+v,36e5);o&&clearTimeout(o);o=setTimeout(g.isEmpty(i)?y:b,e)}return a}(i.delay,n,t);return i}(f.brandInfo,f.shiftStatus),t=function(e){return{isUrgent:e.ttrType===d.urgent,isPrioritized:e.ttrType===d.prioritized,isManual:!!e.manualETTR}}(f.urgencyInfo);e={isUrgent:t.isUrgent,markUrgencyEnabled:!e.onOffHours&&!t.isManual&&!t.isPrioritized};i.modify(c.TTR,e)}var e,t}function b(){t.getShiftStatus({success:S,error:S})}function S(e){var t=e&&e.body;(m=!g.isEmpty(t)&&200===e.statusCode&&200===e.responseCode)&&(f.shiftStatus=t);y()}this.dispose=function(){a.unbind({appName:r,eventName:l.BRAND_INFO,func:T});n.unbind(u.STATE,C);i.unbind(c.TRANSCRIPT_LOADED,y);w()}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.HeartBeatManager=lpTag.unifiedWindow.HeartBeatManager||function(e,t){var i,n,a,o,s,r,l,d,c,u,p,h,f,g,m,v=lpTag.unifiedWindow.log,w=lpTag.unifiedWindow.apps,_=w.HEARTBEAT,C=lpTag.unifiedWindow.events,T="UIHeartBeatEmbedded",E="UIHeartBeatPopOut",R=6e4,k=15e3,V=15e3,$=2e3,y=1e3,b=w.UNIFIED_WINDOW;v.info("init",_);if("object"==typeof e&&e.accountId&&e.storageKey&&e.secureStorageLocation&&"object"==typeof t){n=e.accountId;r=e.storageKey;a=e.poppedOut;m=e.secureStorageLocation;g=t.events;f=t.browserStateManager;g.bind({appName:w.UISTATE,eventName:C.uiState.EMBEDDED_CHANGED,func:N});if(a)!function(){I(!0);A(C.heartBeat.INIT)}();else{!function(){v.info("_fetchEmbeddedBeat",_);lpTag.taglets.lpSecureStorage.getValue({key:r,site:n,app:b,success:F,appName:T,domain:m,firstParty:!0})}();!function(){v.info("_fetchPopOutBeat",_);lpTag.taglets.lpSecureStorage.getValue({key:r,site:n,app:b,success:M,appName:E,domain:m,firstParty:!0})}()}}else v.error("No configuration received on init",_);function S(e){v.info("_stop ,preserveTimestamps: "+e,_);c=!0;v.info("_clearTimeouts",_);l&&clearTimeout(l);u&&clearTimeout(u);if(!a&&!e){v.info("_clearTimestamps",_);M();L()}d=!1}function I(e){v.info("_start, preserveTimestamps: "+e,_);i=(new Date).getTime();S(e);v.info("_resolveApps: initializing apps value - poppedOut = "+a,_);if(a){o=T;s=E}else{o=E;s=T}v.info("_resolveApps: resolvedGetApp = "+o+", resolvedSetApp = "+s,_);v.info("_startBeating",_);d=!(c=!1);P(B);O()}function N(e){v.debug("_handleEmbeddedStateChange: embedded="+e,_);e?S():I(!0)}function x(){A(a?C.heartBeat.FAILED:C.application.DO_HARAKIRI)}function A(e,t){g.trigger({appName:_,eventName:e,data:t})}function M(e){v.info("_initPopOutBeat: "+JSON.stringify(e),_);if(!e||!e.timestamp){v.info("_initPopOutBeat: initializing popout beat value",_);lpTag.taglets.lpSecureStorage.setValue({key:r,site:n,app:b,value:W(0),success:D,error:D,appName:E,domain:m,firstParty:!0})}}function L(){lpTag.taglets.lpSecureStorage.setValue({key:r,site:n,app:b,value:W(0),success:D,error:D,appName:T,domain:m,firstParty:!0})}function F(e){v.info("_initEmbeddedBeat: data="+JSON.stringify(e),_);if(!e||!e.timestamp){v.info("_initEmbeddedBeat: initializing embedded beat value",_);L()}}function D(){v.info("_emptyCallback",_)}function P(e){v.info("_getBeat: got beat",_);l&&clearTimeout(l);c||(a||f.visibilitySupported()&&!f.isHidden()?lpTag.taglets.lpSecureStorage.getValue({key:r,site:n,app:b,success:e,appName:o,domain:m,firstParty:!0}):l=setTimeout(U(e),y))}function B(e){v.info("_validateBeat: data="+JSON.stringify(e),_);var t=(new Date).getTime();if(!c)if(!(a||e&&e.timestamp)&&k<t-i){v.info("_validateBeat: timed out from start data= "+JSON.stringify(e)+" session="+r,_);x()}else{if(a&&(!e||!e.timestamp)||e&&e.timestamp&&function(e,t){v.debug("_isTimeout: now="+e+", currentTime="+t+", prevRecordedWriteTime="+h+", lastWriteTime="+p,_);if(h===p)return R<e-t;if(a)return $<e-t;return V<e-t}(t,e.timestamp)){v.info("_validateBeat: timed out data= "+JSON.stringify(e)+" session="+r,_);x();d=!1}else if(!d){v.info("_validateBeat: resumed",_);d=!0;A(C.heartBeat.RESUMED)}h=p;l=setTimeout(U(B),y)}}function U(e){return function(){P(e)}}function O(){v.info("_setBeat",_);u&&clearTimeout(u);c||(a||f.visibilitySupported()&&!f.isHidden()?lpTag.taglets.lpSecureStorage.setValue({key:r,site:n,app:b,value:W((new Date).getTime()),success:H,error:D,appName:s,expires:108e5,domain:m,firstParty:!0}):u=setTimeout(O,y))}function H(e){v.info("_setBeatCallBack: new data="+JSON.stringify(e),_);p=e.timestamp;u=setTimeout(O,y)}function W(e){return{timestamp:e}}this.dispose=function(){S();g&&g.unbind&&g.unbind({appName:w.UISTATE,eventName:C.uiState.EMBEDDED_CHANGED,func:N});f=g=m=a=r=n=null}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.SecureFormManager=function(e){var n,a,p,h,f,g,m,v="SecureFormManager",w="https://"+lpTag.csds.getDomain("tokenizer")+"/pcigw/pci_dynamic_le.jsp",R="https://"+lpTag.csds.getDomain("tokenizer")+"/pcigw/pci_dynamic_submitted_le.html",_={},o=lpTag.unifiedWindow.apps.CHAT,t=lpTag.unifiedWindow.apps.SECURE_FORM,i=lpTag.unifiedWindow.chatModelPath,s=lpTag.unifiedWindow.events.chat,C=lpTag.unifiedWindow.log,k=lpTag.unifiedWindow.applicationUtils,T="en-US",E=lpTag.unifiedWindow.uiModelPath,V="secureForm_line_",y=!0,b={},S={OPEN:"OPEN",CLOSED:"CLOSED"},I=lpTag.unifiedWindow.secureFormStates,$=lpTag.unifiedWindow.settingsIDs,N=0,x=lpTag.unifiedWindow.log,A={},M={};C.info("init",v);if("object"==typeof e){h=e.lpModel;f=e.lppModel;a=e.events;p=e.apiManager;e.browserStateManager;T=e.appContext.conf.engConf.lang||T;N=e.appContext.featureStateManager.getSettingsValue($.OTK_RETRIES)||0;g=lpTag.unifiedWindow.helpers.SecureFormStyleHelper(e.appContext);n=e.appContext.conf.unifiedConf.poppedOut?-1:lpTag.storageMethods.getSessionData("lpTabId");m="true"===e.appContext.conf.windowConf.hidePCILogo||!0===e.appContext.conf.windowConf.hidePCILogo;!function(){a.bind({appName:o,eventName:s.FINISHED_EVENTS_BULK,func:d});a.bind({appName:o,eventName:s.SECURE_FORM,func:r});a.bind({appName:t,eventName:I.SUBMIT,func:U});a.bind({appName:t,eventName:I.VIEWED,func:F});a.bind({appName:t,eventName:I.ERROR,func:B});a.bind({appName:o,eventName:s.CONVERSATION_CLOSED,func:l})}()}else C.error("init: missing mandatory dependencies.",v);function r(e){var t,i,n,a,o,s,r,l,d;if(e&&(s=_[(o=e)&&o.info&&o.info.uniqueId],r=s&&o.command===I.SEND,l=s&&o.command===I.ERROR,d=s&&s.formState===I.SUBMIT&&o.command===I.SUBMIT,s=s&&o.command===I.VIEWED&&"agent"===o.source,l||!r&&!d&&!s)){t=function(e){var t=e&&e.info;if(t&&t.uniqueId)return _[t.uniqueId]=_[t.uniqueId]||e,_[t.uniqueId]}(e);switch(e.command){case I.SEND:var c=e,u=t;if(u){u.info=c.info;!function(e){e&&e.info&&(b[e.info.uniqueId]=function(a){return function(t){var i,n={siteid:lpTag.site,redirect:encodeURIComponent(R),css:encodeURIComponent(g.getCompressedCSS()),hideLogo:m,otkJson:encodeURIComponent(p.getOtkJson(a)),lang:T,formid:a.secureFormId};a.metadata&&(n.metadataJson=JSON.stringify(a.metadata));if(a.uniqueId&&1<N){if((A=f.get(E.SECURE_FORMS_INVITATIONS)||{})[a.uniqueId])M=A[a.uniqueId];else{M={formId:a.uniqueId,retryCount:N,currentRetryAttempt:0};A[a.uniqueId]=M}A[a.uniqueId].currentRetryAttempt++;f.modify(E.SECURE_FORMS_INVITATIONS,A);if(M.url&&M.currentRetryAttempt<=N)return lpTag.taglets.lpUtil.runCallback(t,null,M.url),void 0}if(a&&a.submitOtk&&a.getOtk){n.otk=a.submitOtk;n.formOtk=a.getOtk;D(i=L(w,n),a.uniqueId);lpTag.taglets.lpUtil.runCallback(t,null,i)}else a&&a.invitationId&&p.getOTK(a,function(e){e=e&&e.token;if(e&&e.writeOtk&&e.readOtk){n.otk=e.writeOtk;n.formOtk=e.readOtk;i=L(w,n);x.info("Got SF URL: "+i,v)}else{x.error("No tokens",v);e&&"object"==typeof e&&x.info("writeOtk: "+e.writeOtk+", readOtk: "+e.readOtk,v)}D(i,a.uniqueId);lpTag.taglets.lpUtil.runCallback(t,null,i)})}}(e.info))}(u);W(c,u,I.SEND);!function(e){y||e.command!==I.SEND||P(e.info.uniqueId,I.RECEIVED)}(u)}break;case I.VIEWED:c=t,u=e.source,c&&"visitor"===u&&!y&&c.formState!==I.VIEWED&&c.formState!==I.ERROR&&O(c.info.uniqueId,I.VIEWED_ON_ANOTHER_TAB);_[t.info.uniqueId].visualState=S.OPEN;break;case I.SUBMIT:n=e,(a=t)&&W(n,a,I.SUBMIT);_[t.info.uniqueId].visualState=S.CLOSED;break;case I.ERROR:a=n=t,(i=_[n&&n.info&&n.info.uniqueId])&&!i.firedLine&&W(n,a,I.SEND);_[t.info.uniqueId].visualState=S.CLOSED}O(t.info.uniqueId,e.command);y||h.modify(H(t),_[t.info.uniqueId]);C.info("_onSecureFormEvent: event="+JSON.stringify({event:e}),v)}}function l(e){if(e&&e.convId&&(e=function(e){for(var t in _)if(_[t].visualState===S.OPEN&&_[t].convId===e)return _[t].info.uniqueId}(e.convId))){_[e].command=I.ERROR;_[e].formState=I.ERROR;h.modify(H(_[e]),_[e])}}function d(){if(y){for(var e in _)if(_.hasOwnProperty(e))switch(_[e].formState){case I.VIEWED:P(_[e].info.uniqueId,I.ABORTED);break;case I.SEND:P(_[e].info.uniqueId,I.RECEIVED)}h.modify(i.SECURE_FORMS,_)}y=!1}function L(e,t){return lpTag.taglets.lpUtil.addQueryParams(e,t)}function D(e,t){(A=f.get(E.SECURE_FORMS_INVITATIONS)||{})[t]&&(A[t].url=e);f.modify(E.SECURE_FORMS_INVITATIONS,A)}function F(e){if(!u(e.uniqueId)){var t=e.uniqueId,i=f.get(E.SECURE_FORMS_TAB_HANDLER)||{};if(void 0===i[t]){i[t]=n;f.modify(E.SECURE_FORMS_TAB_HANDLER,i)}c(I.VIEWED,e.uniqueId);O(e.uniqueId,I.VIEWED)}}function B(e){if(M.currentRetryAttempt<=M.retryCount){x.info("SF retry data: "+JSON.stringify(M),v);a.trigger({appName:t,eventName:"SF_ERROR"})}else{if(e.isTimeOut){x.info("SF timeout: "+JSON.stringify(e),v);(function(e){if(e)return _[e]})(e.uniqueId).isTimeOut=!0}c(I.ERROR,e.uniqueId,{errorReason:e.message.errorReason||"unknown",failedCommand:I.VIEWED})}}function U(e){c(I.SUBMIT,e.uniqueId,{formUuid:e.message.token,gatewayDomain:e.message.gatewayDomain},e.text);a.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.PREPARE_SLIDER_CLOSED_TIMEOUT})}function P(e,t){c(t,e);O(e,t)}function O(e,t){if(_[e]){_[e].events=_[e].events||[];if(k.indexOf(_[e].events,t)<0){_[e].events.push(t);_[e].formState=u(e)?I.VIEWED_ON_ANOTHER_TAB:t}}}function c(e,t,i,n){var a=_[t];if(a&&!u(t)){(i=i||{}).uniqueId=t;i.secureFormName=a.info.secureFormName;i.secureFormId=a.info.secureFormId;i.sequenceId=a["@id"];p.secureFormRequest(e,t,i,n)}}function W(e,t,i){_[t.info.uniqueId].firedLine=!0;a.trigger({appName:o,eventName:s.LINE,data:function(e,t,i){i={"@id":e["@id"],source:"agent",by:t.by,time:e.time||new Date,type:s.SECURE_FORM,textKey:V+i,dictionaryKey:{secureFormName:t.info.secureFormName},uniqueId:t.info.uniqueId,formName:t.info.secureFormName,history:e.history,track:e.track};if(e.state){i.state=e.state;i.convId=e.convId;i.originatorId=e.originatorId}return i}(e,t,i)})}function u(e){var t;return _[e].formState===I.VIEWED_ON_ANOTHER_TAB||(t=f.get(E.SECURE_FORMS_TAB_HANDLER))&&void 0!==t[e]&&t[e]!==n}function H(e){var t=i.SECURE_FORMS;return{name:t.name,path:t.path+"."+e.info.uniqueId}}this.getFormUrl=function(e,t){lpTag.taglets.lpUtil.runCallback(b[e],null,t)};this.dispose=function(){a.unbind({appName:o,eventName:s.FINISHED_EVENTS_BULK,func:d});a.unbind({appName:o,eventName:s.SECURE_FORM,func:r});a.unbind({appName:t,eventName:I.SUBMIT,func:U});a.unbind({appName:t,eventName:I.VIEWED,func:F});a.unbind({appName:t,eventName:I.ERROR,func:B});a.unbind({appName:o,eventName:s.CONVERSATION_CLOSED,func:l});y=!0}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.RichContentManager=function(e){var t,i,n="RichContentManager",a=lpTag.unifiedWindow.richContentStates,o=lpTag.unifiedWindow.apps.RICH_CONTENT,s=lpTag.unifiedWindow.log,r=(lpTag.unifiedWindow.applicationUtils,"ACTION"),l="ACCEPT";s.info("init",n);if("object"==typeof e){e.lpModel;e.lppModel;t=e.appContext;i=e.apiManager;!function(){t.events.bind({appName:o,eventName:a.ACTION_EVENT,func:c});t.events.bind({appName:o,eventName:a.PUBLISH_TEXT,func:u});t.events.bind({appName:o,eventName:a.DISPLAYED,func:d});t.events.bind({appName:o,eventName:a.SUBMIT_AS_TEXT,func:p})}()}else s.error("init: missing mandatory dependencies.",n);function d(e){if(e){e={sequenceId:"number"==typeof e.uniqueId?e.uniqueId:e.sequenceId,state:l};i.richContentRequest(e)}}function c(e){if(e){var t={sequenceId:e.uniqueId||e.sequenceId,state:r};i.richContentRequest(t,e.metadata||[])}}function u(e){if(e&&e.actionData&&e.actionData.text){e={text:e.actionData.text,metadata:e.metadata};t.transcriptManager.sendLine(e)}}function p(e){if(e&&e.actionData){e={text:e.actionData.join(", ")||"",metadata:e.metadata||[]};t.transcriptManager.sendLine(e)}}this.dispose=function(){t.events.unbind({appName:o,eventName:a.ACTION_EVENT,func:c});t.events.unbind({appName:o,eventName:a.PUBLISH_TEXT,func:u});t.events.unbind({appName:o,eventName:a.DISPLAYED,func:d});t.events.unbind({appName:o,eventName:a.SUBMIT_AS_TEXT,func:p})}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.QuickRepliesManager=function(e){var t,i,n="QuickRepliesManager",a="ACTION",o=lpTag.unifiedWindow.log,s=lpTag.unifiedWindow.apps.QUICK_REPLIES,r=lpTag.unifiedWindow.quickRepliesStates;o.info("init",n);if("object"==typeof e){t=e.appContext;i=e.apiManager;!function(){t.events.bind({appName:s,eventName:r.ACTION_EVENT,func:l});t.events.bind({appName:s,eventName:r.PUBLISH_TEXT,func:d})}()}else o.error("init: missing mandatory dependencies.",n);function l(e){if(e){var t={sequenceId:e.sequenceId,state:a};i.quickRepliesRequest(t,e.payload||[])}}function d(e){if(e&&e.payload&&e.payload.action&&e.payload.action.text){e={text:e.payload.action.text,metadata:e.payload.metadata};t.transcriptManager.sendLine(e);t.events.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.accessibility.SET_INPUT_FOCUS})}}this.dispose=function(){o.info("dispose",n);t.events.unbind({appName:s,eventName:r.ACTION_EVENT,func:l});t.events.unbind({appName:s,eventName:r.PUBLISH_TEXT,func:d})}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.CoBrowseManager=function(e){var s,r,l,d,c,t="CoBrowseManager",i=lpTag.unifiedWindow.log,n=lpTag.unifiedWindow.applicationUtils,u=lpTag.unifiedWindow.settingsIDs,p=lpTag.unifiedWindow.events.chat,h=lpTag.unifiedWindow.events.coBrowseEvents,a=lpTag.unifiedWindow.consts.coBrowse.acceptedCoBrowseModes,f=lpTag.unifiedWindow.chatModelPath,g=lpTag.unifiedWindow.apps.CHAT,m=lpTag.unifiedWindow.apps.UNIFIED_WINDOW,v="cobrowseLine_",o=115e3,w=!1;i.info("init",t);if("object"==typeof e){s=e.events;r=e.lpModel;l=e.appContext;d=l.conf.engConf;c=n.isArray(e.appContext.conf.accountSettings)?e.appContext.conf.accountSettings:[];s.bind({appName:lpTag.unifiedWindow.apps.CHAT,eventName:lpTag.unifiedWindow.events.coBrowseEvents.DIALOG_CREATED,func:E})}else i.error("init: missing mandatory dependencies.",t);function _(){for(var t,e,i,n=r.get(f.PARTICIPANTS)||{},a=Object.keys(n),o=!1,s=0;s<a.length;s++)if("system"===n[a[s]].type){o=!0;break}return o&&(t=u.COBROWSE_CONTROLLER_BOT_PREFERRED_FOR_SYSTEM_MESSAGES,e="true",i=c.filter(function(e){return e.id===t})[0])&&i.propertyValue&&i.propertyValue.value===e}function C(e,t,i,n,a){n=n||r.get(f.AGENT_ID);s.trigger({appName:m,eventName:e,data:{ssid:d.ssid,svid:d.svid,scid:d.scid,cid:d.cid,eid:d.eid,agentId:n,serviceId:t,chatId:r.get(f.CHAT_ID),visitorName:r.get(f.VISITOR_NAME)||"",mode:i,endTs:a},global:!0});if(!_()){var o,t=e,a=i,e=n,i=l.conf.unifiedConf.isMessaging;if(t!==h.STARTED&&t!==h.INVITED&&t!==h.CANCELED&&(t!==h.OFFERED||i)){if(e){i=r.get(f.PARTICIPANTS),i=i&&i[e];i&&(o=i.name)}e=T(v+t,a,o);s.trigger({appName:g,eventName:p.LINE,data:{source:"system",by:l.translator.translate("info"),time:new Date,type:p.INFO,text:e}});s.trigger({appName:g,eventName:p.FINISHED_EVENTS_BULK})}}}function T(e,t,i){i=i||r.get(f.AGENT_NAME);l.translator.extendDictionary({agentName:i},{locale:d.lang});"VIDEO_CALL"===t?e="video_"+e:"VOICE_CALL"===t&&(e="voice_"+e);var n,i=l.translator.translate(e),t=(t=l.conf.unifiedConf,n=l.conf.engConf.lang,t&&t.cobrowseCustomization&&t.cobrowseCustomization[n]);return i=t?t[e]||i:i}function E(e){!function(e){var t=e&&e.metaData,e="OPEN"===e.state;if(e&&t){var i=-1!==a.indexOf(t.mode),n="INVITED"===t.sessionState,t=Date.now()/1e3<t.expires;e=i&&n&&t}return e}(e)?"CLOSE"===e.state&&C(h.CANCELED,null,null,null,e.endTs):C(h.INVITED,e.metaData.serviceId,e.metaData.mode,function(e){for(var t=0;t<e.participants.length;t++)if(e.participants[t]&&"CONSUMER"!==e.participants[t].role)return e.participants[t].id}(e))}this.isCall=function(e){return"VIDEO_CALL"===e||"VOICE_CALL"===e};this.isCoBrowseLineEvent=function(e){return!!(e&&e.text&&e.text.indexOf&&0<=e.text.indexOf('data-lp-point="cb-offer"'))};this.processCoBrowseLineObj=function(e){!function(e){e=new Date(e.time);return Date.now()-e.getTime()<o}(e)||C(h.INVITED,function(e){e=e.text.match(/data-lp-serviceid="([\w\d#]*)"/);return 1<e.length?e[1]:""}(e));e.type=p.INFO;e.text=T(v+"cobrowseOffered",null,e.by);e.by=l.translator.translate("info");e.source="system";return e};this.publishCoBrowseEvent=C;this.customizeTranslation=T;this.isInActiveCall=function(){return w};this.setActiveCall=function(e){(w=e)||s.trigger({appName:"tooltipButton",eventName:"close",global:!0})};this.dispose=function(){s.unbind({appName:lpTag.unifiedWindow.apps.CHAT,eventName:lpTag.unifiedWindow.events.coBrowseEvents.DIALOG_CREATED,func:E})};this.COBROWSE_OFFER_TIMEOUT=o};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.TranscriptManager=function(e){var a,l,p,o,s,r,d,c,i,u,h,f,g="TranscriptManager",t="API",m=lpTag.unifiedWindow.consts,v={AGENT:"agent",VISITOR:"visitor"},w=lpTag.unifiedWindow.MessageState,n=lpTag.unifiedWindow.events.chat,R=lpTag.unifiedWindow.events.viewController,_=lpTag.unifiedWindow.chatModelPath,C=lpTag.unifiedWindow.uiModelPath,T=lpTag.unifiedWindow.log,E=lpTag.unifiedWindow.State,y="localId",b="@id",S=0,I=0,N=lpTag.unifiedWindow.applicationUtils,x=[],A=[],M=null,L={CONTENT_EVENT:"ContentEvent",RICHCONTENT_EVENT:"RichContentEvent",CONTENT_TYPE_TEXT:"text/plain",CONTENT_TYPE_RICHCONTENT:"richContent",WELCOME_MESSAGE_TYPE:"WelcomeMessage"};T.info("init",g);if("object"==typeof e){d=e.events;a=e.lpModel;l=e.lppModel;p=e.apiDelegate;o=e.coBrowseManager;s=e.idnvManager;e.browserStateManager;r=e.lineStatesManager;f=e.canEnableOfflineFlow;e=(c=e.appContext)&&c.conf&&c.conf.unifiedConf;u=!e||!e.hasOwnProperty("isWelcomeMessageForAgentEnabled")||e.isWelcomeMessageForAgentEnabled;!function(){d.bind({appName:t,eventName:n.LINE,func:k});d.bind({appName:t,eventName:n.CHAT_INFO,func:H});d.bind({appName:t,eventName:n.AGENT_TYPING,func:U});d.bind({appName:t,eventName:n.FINISHED_EVENTS_BULK,func:V});d.bind({appName:"*",eventName:R.LINES_VIEWED,func:$});l.bind(C.STATE,F)}()}else T.error("init: missing mandatory dependencies.",g);function D(e){e.source=v.VISITOR;e.time=(new Date).getTime();e.state=w.PENDING;e[y]=S}function k(e){var t,i=e.lines||e;T.info("_collectLines: lines="+JSON.stringify(N.excludeAttributes(N.clone(i),["text"])));if(e)for(var n=N.isArray(e.lines)?e.lines:[e],a=0;a<n.length;a++)(function(e){if(e.source===v.VISITOR&&0<I)return I--,!0;return!1})(t=n[a])||(t=function(e){o.isCoBrowseLineEvent(e)?e=o.processCoBrowseLineObj(e):s.isIdnvLineObj(e)?e=s.processIdnvLineObj(e):e.type=e.type||m.chatEvents.LINE;return e}(t))&&x.push(t)}function V(){var e;W(x=r?r.verifyLineStates(x):x);x=[];z(e=O());var t=e,i=!1;t=t||[];if(!a.get(_.TRANSCRIPT_LOADED)){for(var n=0;n<t.length;n++)if(!isNaN(t[n][b])){i=!0;break}i&&a.modify(_.TRANSCRIPT_LOADED,!0)}}function $(){z(O())}function F(e){if(e&&e.newValue){A.push(e.newValue);if((e.newValue===lpTag.unifiedWindow.State.CHATTING||e.newValue===lpTag.unifiedWindow.State.WAITING&&1<A.length&&A[A.length-2]===lpTag.unifiedWindow.State.REQUESTED)&&M&&!M.isProcessed){var e=P(M.lineIndex,w.ERROR),t=P(M.lineIndex,w.SENT),i=P(M.lineIndex,w.PENDING),t=p.sendLine.bind(p,M,t,e);M.serverHandler?M.serverHandler({callback:t,error:e,retry:i,lineIndex:M.lineIndex}):t();M.isProcessed=!0}}}function B(e,t,i){for(var n,a=O(),o=0;o<a.length;o++)if(a[o].localId===t){(n=a[o]).state=i;n.update=!0;if(e&&!isNaN(e[b])&&e.convId){n[b]=e[b];n.convId=e.convId;n.originatorId=h}e&&void 0!==e.canRetry&&(n.canRetry=e.canRetry);e&&e.relativePath&&(n.relativePath=e.relativePath);break}W([n])}function P(t,i){return function(e){B(e,t,i);if(t===(M&&M.lineIndex)&&i!==w.PENDING){M=null;d.trigger({appName:"*",eventName:"pendingLineSet",data:{serverPendingLineExists:!1}})}}}function O(){return a.get(_.LINES)||[]}function W(e,t){var i;e=e.map(function(e){e[y]=void 0!==e[y]?e[y]:S++;return e});lpTag.hooks&&lpTag.hooks.exec&&(e=(i=lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.AFTER_GET_LINES,data:{lines:e}}))&&i.data&&i.data.lines||e);T.info("_storeChatLines: store chat lines in the model, lines="+JSON.stringify(N.excludeAttributes(N.clone(e),["text"])),g);a.modify(_.LINES,e,y,t)}function U(e){if(t=e,i=a.get(_.PARTICIPANTS)||[],!(t=t||{}).originatorId||i[t.originatorId].type===v.AGENT){e&&"boolean"==typeof e.agentTyping&&a.modify(_.AGENT_IS_TYPING,e.agentTyping);T.info("_setAgentTyping: data="+JSON.stringify(e),g)}var t,i}function H(e){if("object"==typeof e){e.agentName&&a.modify(_.AGENT_NAME,e.agentName);e.agentId&&a.modify(_.AGENT_ID,e.agentId);e.visitorName&&a.modify(_.VISITOR_NAME,e.visitorName);e.rtSessionId&&a.modify(_.CHAT_ID,e.rtSessionId);if(e.resetAgentInfo){a.removeKey(_.AGENT_NAME,!0);a.removeKey(_.AGENT_ID)}e.visitorId&&(h=e.visitorId)}}function z(e){var t,i=l.get(C.WINDOW_MAXIMIZED),n=l.get(C.LAST_LINE_VIEWED),a={};r?t=r.getLastReadLine(e):i&&(t=function(e){for(var t,i=e.length-1;0<=i;i--){t=e[i];if(!isNaN(t[y]))break}return t}(e));if(t){a[b]=t[b];a[y]=t[y];t.convId&&(a.convId=t.convId)}N.isEmpty(a)||N.isSameObject(n,a)||l.modify(C.LAST_LINE_VIEWED,a)}this.sendLine=function(e,t){var i=!1,n=l.get(C.STATE)||"",a=lpTag.unifiedWindow.Priority;if(c&&c.shouldWelcomeMessageBeSent&&u){var o=e,s=c.welcomeMessage.content||c.conf.windowConf&&c.conf.windowConf.welcomeMessage;if(s){o.metadata=o.metadata||[];var r={event:{contentType:L.CONTENT_TYPE_TEXT,message:s.text},type:"WelcomeMessage"};if(s.quickReplies&&1<=s.quickReplies.replies.length){r.event.quickReplies=s.quickReplies;r.event.quickReplies.itemsPerRow=r.event.quickReplies.itemsPerRow||8;delete r.event.quickReplies.rowLimit;r.event.quickReplies.replies.forEach(function(e){delete e.style})}"richContent"===s.type?r.event.type=L.RICHCONTENT_EVENT:r.event.type=L.CONTENT_EVENT;o.metadata.push(r)}c.shouldWelcomeMessageBeSent=!1}if(f&&(a[n]<a[E.WAITING]||n===E.WAITING&&-1===A.indexOf(E.REQUESTED)||""===n)){if(M)return;M=e;i=!0;d.trigger({appName:"*",eventName:lpTag.unifiedWindow.events.uiState.SEND_BUTTON,data:{enabled:!1}});d.trigger({appName:"*",eventName:"pendingLineSet",data:{serverPendingLineExists:!0}})}T.info("sendLine: visitor sent line",g);if("object"==typeof e){D(e=lpTag.hooks&&lpTag.hooks.exec?(s=lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.BEFORE_SEND_VISITOR_LINE,data:{line:e}}))&&s.data&&s.data.line||e:e);i||I++;W([e]);S++;o=O().length-1;if(i){if(M){M.lineIndex=o;M.serverHandler=t}}else{r=P(o,w.ERROR),a=P(o,w.SENT),n=P(o,w.PENDING),i=p.sendLine.bind(p,e,a,r);t?t({callback:i,error:r,retry:n,lineIndex:o}):i()}}};this.sendStructeredContentLine=function(e,t,i,n){var a,o,s,r,l;T.info("sendStructuredContentLine: visitor sent structued content line",g);if("object"==typeof e){D(e);e.type=m.chatEvents.RICH_CONTENT;I++;W([e]);S++;function d(e){B(e,a,o);r.call(s,l)}var c,u=P(c=O().length-1,w.ERROR);a=c,o=w.SENT,s=t,r=i,l=n;p.sendStructuredContentLine.bind(p,e,d,u)()}};this.sendLineSkipLocal=function(e,t){T.info("sendLine: send visitor line: "+JSON.stringify(e),g);if("object"==typeof e){D(e);p.sendLine(e,t&&t.success,t&&t.error)}};this.setVisitorTyping=function(e){T.info("setVisitorTyping: isTyping="+e,g);if("boolean"==typeof e&&i!==e&&l.get(C.STATE)===E.CHATTING&&(!0===(t=e)||!1===t&&"boolean"==typeof l.get(C.VISITOR_TYPING))){i=e;p.setVisitorTyping(e);l.modify(C.VISITOR_TYPING,e)}var t};this.currentConversationActive=function(){return p.currentConversationActive&&p.currentConversationActive()};this.dispose=function(){d.unbind({appName:t,eventName:n.LINE,func:k});d.unbind({appName:t,eventName:n.CHAT_INFO,func:H});d.unbind({appName:t,eventName:n.AGENT_TYPING,func:U});d.unbind({appName:t,eventName:n.FINISHED_EVENTS_BULK,func:V});d.unbind({appName:"*",eventName:R.LINES_VIEWED,func:$});l.unbind(C.STATE,F)}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.UIStateManager=function(e){var n,a,o,t,s,r,i,l,d="UIStateManager",c=lpTag.unifiedWindow.apps,u=lpTag.unifiedWindow.events,p={MAXIMIZED:!0,MINIMIZED:!1},h=lpTag.unifiedWindow.uiModelPath,f=lpTag.unifiedWindow.chatModelPath,g=lpTag.unifiedWindow.log,m=1e3,v=0,w=lpTag.taglets.lpUtil,_=!1,C=!1;g.info("init",d);n=e.lpModel;a=e.lppModel;o=e.events;t=e.browserStateManager;l=e.NativeSDK;s=e.appContext;r=lpTag.unifiedWindow.events;_=w.getPropertyFromObject(s,"conf.engConf.async",!1);!function(){o.bind({appName:c.HEARTBEAT,eventName:u.heartBeat.FAILED,func:b});o.bind({appName:c.HEARTBEAT,eventName:u.heartBeat.RESUMED,func:S});o.bind({appName:c.UNIFIED_WINDOW,eventName:u.unifiedWindow.MAXIMIZE,func:y});o.bind({appName:c.UNIFIED_WINDOW,eventName:u.chat.SET_REFRESH_MODEL_DELAY,func:M});t.on(t.EVENT_NAME.FOCUS_CHANGE,I,this);t.on(t.EVENT_NAME.VISIBILITY_CHANGE,N,this);a.bind(h.WINDOW_EMBEDDED,x)}();function T(e){var t=!l;if("boolean"==typeof e&&a.get(h.WINDOW_MAXIMIZED)!==e){g.info("setWindowState: Window maximized="+e,d);var i=s.conversationManager&&s.conversationManager.isAutoClosedMainDialog,i=i&&i(n.get(f.CHAT_ID));t&&a.modify(h.WINDOW_MAXIMIZED,e);if(a.get(h.STATE)===lpTag.unifiedWindow.State.WAITING&&_&&!i){o.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:r.application.DO_HARAKIRI});t=s&&s.conf?s.conf:{};lpTag.lastClosedEngagementID=t.uiState&&t.uiState.engConf&&t.uiState.engConf.eid}o.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:e?u.uiState.MAXIMIZED:u.uiState.MINIMIZED,global:!0})}}function E(e,t){e&&"boolean"==typeof t&&a.modify(e,t)}function y(){T(p.MAXIMIZED)}function b(){a.modify(h.ACTION_POPOUT_ENABLE,!1)}function S(){a.modify(h.ACTION_POPOUT_ENABLE,!0)}function I(e){if(e.focus){g.info("_refreshModelOnFocusChange: model refreshed",d);a.load()}else{i&&clearTimeout(i);i=setTimeout(N,m)}}function N(){t.isHidden()||a.modify(h.LAST_VIEWED_TAB,lpTag.storageMethods.getSessionData("lpTabId"));if(!t.isFocus()&&!t.isHidden()){g.info("_refreshModelOnVisibility: "+(0===v?"model refreshed":"skip refresh"),d);0===v?a.load():v--;i&&clearTimeout(i);i=setTimeout(N,m)}}function x(e){o.trigger({appName:c.UISTATE,eventName:u.uiState.EMBEDDED_CHANGED,data:e&&e.newValue})}function A(e){o.trigger({appName:c.UISTATE,eventName:u.uiState.POP_OUT,data:{popOut:!e.window.embedded}})}function M(e){v=e.loadModelDelay||0}this.WINDOW_STATE=p;this.setWindowState=T;this.setEmbeddedState=function(e){a.modify({splitKey:h.WINDOW_EMBEDDED,updateData:e,onSuccess:A,context:this})};this.setWindowPosition=function(e,t){g.info("setWindowPosition: position="+JSON.stringify(e),d);a.modify(h.WINDOW_POSITION,e,null,t)};this.setActionsVisibility=function(e){E(h.ACTIONS_VISIBLE,e)};this.setVisibility=E;this.setSoundState=function(e){g.info("setSoundState: enable="+e,d);"boolean"==typeof e&&a.modify(h.WINDOW_SOUND,e)};this.clear=function(){a.clear();o.unbind({appName:c.HEARTBEAT,eventName:u.heartBeat.FAILED,func:b});o.unbind({appName:c.HEARTBEAT,eventName:u.heartBeat.RESUMED,func:S});o.unbind({appName:c.UNIFIED_WINDOW,eventName:u.unifiedWindow.MAXIMIZE,func:y});o.unbind({appName:c.UNIFIED_WINDOW,eventName:u.chat.SET_REFRESH_MODEL_DELAY,func:M});t.off(t.EVENT_NAME.FOCUS_CHANGE,I);t.off(t.EVENT_NAME.VISIBILITY_CHANGE,N);a.unbind(h.WINDOW_EMBEDDED,x);clearTimeout(i)};this.setWindowClosedByVisitor=function(e){C=e};this.isWindowClosedByVisitor=function(){return C}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.IdnvManager=function(e){var n,a,i="IdnvManager",t=lpTag.unifiedWindow.log,o=lpTag.unifiedWindow.applicationUtils,s=3e3,r={},l=lpTag.unifiedWindow.uiModelPath,d='<span data-lp-collab-type="idnv_answer" data-lp-collab-payload={{payload}} {{mask}}>{{text}}</span>',c={attrs:{type:"data-lp-collab-type",payload:"data-lp-collab-payload",action:"data-lp-action",questionType:"idnv_question",answerType:"idnv_answer"},states:{PENDING:"pending",CANCELLED:"cancelled",SUBMITTED:"submitted",SKIPPED:"skipped"}};t.info("init",i);if("object"==typeof e){n=e.appContext;a=e.lppModel}else t.error("init: missing mandatory dependencies.",i);function u(e){return p(n.translator.dictionary.getString("idnvFormCancelled"),e,!1)}function p(e,t,i){var n;i&&(n=c.attrs.action+'="mask"');return o.injectTextObj(d,{payload:t,mask:n,text:e})}function h(e,t){a.modify(l.IDNV_DATA.path+"."+e+".state",t)}function f(e){n.transcriptManager.sendLineSkipLocal({text:e},{error:function(){n.events.trigger({appName:"tooltip",eventName:"show",data:{text:n.translator.translate("idnvSendLineError"),tooltipTimeout:s}})}})}function g(e){var e=e.match(/<span.*<\/span>/g);return e&&e[0]&&(e=lpTag.lpUtils.getAttrValue(e[0],c.attrs.payload))?{encodedFields:e,fields:JSON.parse(decodeURIComponent(e))}:null}function m(e,t){t={context:this,data:{ControllerName:lpTag.unifiedWindow.IdnvDialogViewController.ControllerName,idnvData:t,dialogOpenedFrom:this}};n.events.trigger({appName:i,eventName:e,data:t})}this.isIdnvLineObj=function(e){return!!(e.text&&e.text.indexOf&&(-1<e.text.indexOf(c.attrs.questionType)||-1<e.text.indexOf(c.attrs.answerType)))};this.processIdnvLineObj=function(e){"visitor"===e.source?(e=function(e){var t=-1<e.text.indexOf(c.attrs.action),i=g(e.text);if(i.encodedFields===r.encodedFields){m.call(this,lpTag.unifiedWindow.events.viewController.DIALOG_STATE_CHANGED,{});r={}}e.text=t?function(e){var t=n.translator.translate("idnvFormSubmitted",!0);return o.injectTextObj(t,{idnvChar1:e.firstChar,idnvChar2:e.secondChar,idnvType:e.typeField})}(i.fields):u(i.encodedFields);return e}(e)).source="system":e=function(e){var t=e["@id"],i=function(e){return a.get(l.IDNV_DATA.path+"."+e+".state")}(t);i=i||function(e){var t;t=r.lineId&&e!==r.lineId?c.states.SKIPPED:c.states.PENDING;h(e,t);return t}(t);if(i===c.states.PENDING&&(i=g(e.text))){r={lineId:t,encodedFields:i.encodedFields};m.call(this,lpTag.unifiedWindow.events.viewController.DIALOG,i)}return e}(e);return e};this.sendIdnvCancelLine=function(e){f(u(e));h(r.lineId,c.states.CANCELLED);r={}};this.sendIdnvSubmitLine=function(e){e=e,t=n.translator.translate("idnvAnswer",!0);var t;f(p(t=o.injectTextObj(t,{idnvAnswer1:e.firstChar,idnvAnswer2:e.secondChar}),e.idnvData.encodedFields,!0));h(r.lineId,c.states.SUBMITTED);r={}}};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow.WidgetManager=window.lpTag.unifiedWindow.WidgetManager||function(e){var o,s,r,t,l,a,d,c,u,i="WidgetManager",n=lpTag.unifiedWindow.log,p=lpTag.taglets.lpUtil,h=lpTag.unifiedWindow.widgetModelPath,f=lpTag.unifiedWindow.events,g=[],m={agent:!1,visitor:!1},v=/(<img.*?>)/g;n.info("init",i);o=e.lpModel;s=e.lppModel;r=e.wsdkModel;lpTag.LPWidgetSDK.API;t=e.events;l=e.windowSDKEvents;a=e.appContext;d=lpTag.unifiedWindow.consts.widgetSDK;u=p.getPropertyFromObject(a,"conf.engConf.async");lpTag.unifiedWindow.State;!function(){t.bind({appName:"*",eventName:f.widgetSDK.INIT,context:this,func:w});g.push(t.bind({appName:"*",eventName:f.widgetSDK.VISITOR_TYPING,context:this,func:D}));g.push(t.bind({appName:"*",eventName:f.chat.LINE,context:this,func:O}));g.push(t.bind({appName:"*",eventName:f.chat.CHAT_INFO,context:this,func:E}));g.push(t.bind({appName:"*",eventName:f.chat.STATE,func:N}));g.push(t.bind({appName:"slider",eventName:f.viewController.SLIDER_VIEW_CHANGE,context:this,func:x}));g.push(t.bind({appName:"slider",eventName:f.viewController.SLIDER_CLOSED,context:this,func:A}));g.push(t.bind({appName:"WrapperWindowExtender",eventName:f.viewController.MINIMIZE_VISIBLE,context:this,func:function(){P(!1)}}));g.push(t.bind({appName:"WrapperWindowExtender",eventName:f.viewController.MAXIMIZE_VISIBLE,context:this,func:function(){P(!0)}}));l.bind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:lpTag.unifiedWindow.events.widgetSDK.NOTIFICATION,context:this,func:T});l.bind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:lpTag.unifiedWindow.events.widgetSDK.INITIATED_WIDGET_ID,context:this,func:_});o.bind(lpTag.unifiedWindow.chatModelPath.AGENT_IS_TYPING,L)}();function w(){l.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:f.widgetSDK.INIT})}function _(e){var t=s.get(lpTag.unifiedWindow.uiModelPath.INITIATED_WIDGETS_IDS)||{};t[e]=!0;s.modify(lpTag.unifiedWindow.uiModelPath.INITIATED_WIDGETS_IDS,t);o.modify(lpTag.unifiedWindow.chatModelPath.SDK_BUTTON_ENABLE,!0)}function C(){var e=s.get(lpTag.unifiedWindow.uiModelPath.INITIATED_WIDGETS_IDS),t=s.get(lpTag.unifiedWindow.uiModelPath.DISPOSED_WIDGETS_IDS);if(t&&e)for(var i in t)e[i]=!1;return e||{}}function T(e){"number"==typeof e&&0<=e&&o.modify(lpTag.unifiedWindow.chatModelPath.SDK_NOTIFICATIONS,e)}function E(e){if(e&&(c=e.rtSessionId&&!c?e.rtSessionId:c)){var t=e,i=r.get(h.CONVERSATION_ID),n=r.get(h.SESSION_ID);!i&&t.rtSessionId&&r.modify(h.CONVERSATION_ID,t.rtSessionId);!n&&t.monitoringSessionId&&r.modify(h.SESSION_ID,t.monitoringSessionId);y(e,I(c));if(e.agentName&&e.agentId||e.visitorId&&e.visitorName){i=e;i.agentName&&i.agentId&&b({id:i.agentId,name:i.agentName,type:d.AGENT,imgPath:p.getPropertyFromObject(a,"conf.windowConf.agentUrl")||"",description:p.getPropertyFromObject(a,"conf.windowConf.description")||""});i.visitorId&&i.visitorName&&b({id:i.visitorId,name:i.visitorName,type:d.VISITOR})}}}function y(e,t){var i=r.get(h.CONVERSATION_ID),n=r.get(h.SESSION_ID),a=!1;if(t&&e){if(e.state&&t.state!==W(e.state)){t.state=W(e.state);a=!0}if(!t.startTime&&e.lastUpdate){t.startTime=e.lastUpdate;a=!0}if(e.skill&&(!t.skill||t.skill.name!==e.skill&&t.skill.id!==e.skill)){t.skill=u?{name:"",id:e.skill}:{name:e.skill,id:""};a=!0}if(e.typing){t.typing=e.typing;a=!0}if(a){r.modify(h.DIALOGS,[t],"id");l.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:f.widgetSDK.CONVERSATION_INFO,data:{conversationId:i,sessionId:n,dialogId:t.id,startTime:t.startTime,state:t.state,dialogType:t.dialogType,channelType:t.channelType,skill:t.skill,typing:t.typing}})}}}function b(e){for(var t,i=I(c),n=!1,a=0;a<i.participants.length;a++)if(i.participants[a].id===e.id){t=i.participants[a];break}if(t){if(!t.name){t.name=e.name;n=!0}if(e.type===d.AGENT){if(!t.imgPath&&e.imgPath){t.imgPath=e.imgPath;n=!0}if(!t.description&&e.description){t.description=e.description;n=!0}}n&&S(i)}else{i.participants.push(e);S(i)}}function S(e){r.modify(h.DIALOGS,[e],"id");l.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:f.widgetSDK.PARTICIPANTS,data:e.participants})}function I(e){var t,i;if(e){t=r.get(h.DIALOGS);i={id:e,startTime:null,state:null,dialogType:null,channelType:u?d.CHANNEL_TYPE_MESSAGING:d.CHANNEL_TYPE_CHAT,messages:[],participants:[],typing:{agent:!1,visitor:!1}};if(t)for(var n=0;n<t.length;n++)t[n].id===e&&(i=t[n]);return i}}function N(e){var t;if(e!==lpTag.unifiedWindow.State.INIT&&e!==lpTag.unifiedWindow.State.INITIALIZED){e=W(e);(t=I(c))&&t.state!==e&&y({state:e},t);l.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:f.widgetSDK.CONVERSATION_STATE,data:e})}}function x(e){e.type===lpTag.unifiedWindow.consts.slider.viewType.widgetSDKView?s.modify(lpTag.unifiedWindow.uiModelPath.SELECTED_WIDGET_ID,e.id):s.removeKey(lpTag.unifiedWindow.uiModelPath.SELECTED_WIDGET_ID);M(e,!0)}function A(e){M(e,!1)}function M(e,t){l.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:f.widgetSDK.WIDGET_AREA_STATE,data:{isOpened:t,type:e.type}})}function L(e){var t,i;if(e&&"boolean"==typeof e.newValue&&(i=(t=I(c)).typing).agent!==e.newValue){i.agent=e.newValue;y({typing:i},t)}}function D(e){var t,i;if("boolean"==typeof e&&(i=(t=I(c)).typing).visitor!==e){i.visitor=e;y({typing:i},t)}}function P(e){var t=r.get(h.WINDOW_UI),t=t&&t.isMaximized;("boolean"!=typeof t||"boolean"==typeof e&&e!==t)&&r.modify(h.WINDOW_UI,{isMaximized:e})}function O(e){var t=function(e,t){var i;if(e)switch(t){case f.chat.LINE:if(e.type===f.chat.SECURE_FORM)return null;(i={}).type=function(e){return e&&e===lpTag.unifiedWindow.consts.chatEvents.RICH_CONTENT?d.contentType.richContent:d.contentType.text}(e.type);i.id=e["@id"]||e.id;i.ts=e.time;i.content=function(e){var t="";if("string"==typeof e){v.lastIndex=null;t=e.replace(v,"<img alt='filteredImg'>")}return t}(e.text);i.originator={type:e.source,name:e.by};i.state=e.state;break;case f.chat.CHAT_INFO:}return i}(e,f.chat.LINE);if(t){var i=t,n=I(c);if(n&&(n.state===lpTag.WindowSDKAPI.states.ACCEPTED||n.state===lpTag.LPWidgetSDK.API.states.IN_QUEUE)){i.originator&&(i.originator.type===d.VISITOR?m.visitor=!0:i.originator.type===d.AGENT&&(m.agent=!0));m.agent&&m.visitor&&y({state:lpTag.LPWidgetSDK.API.states.INTERACTIVE},n)}if(i=I(e.convId)){i.messages.push(t);r.modify(h.DIALOGS,[i],"id")}l.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:f.widgetSDK.MESSAGES,data:t})}}function W(e){var t=lpTag.unifiedWindow.State,i=lpTag.LPWidgetSDK.API.states;switch(e){case t.PRE_CHAT:return i.PRE_CONVERSATION;case t.WAITING:case t.REQUESTED:return i.PENDING;case t.CHATTING:return u?i.IN_QUEUE:i.ACCEPTED;case t.POST_CHAT:return i.POST_CONVERSATION;case t.ENDED:return i.CONVERSATION_ENDED;case t.OFFLINE:return i.OFFLINE;case t.ERROR:case t.NOT_FOUND:return i.ERROR;default:return e}}this.dispose=function(){n.info("dispose",i);g.forEach(function(e){t.unbind(e)});l.unbind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:lpTag.unifiedWindow.events.widgetSDK.NOTIFICATION,context:this,func:T})};this.getWidgetsStatus=C;this.getLastShownWidgetId=function(){var e=s.get(lpTag.unifiedWindow.uiModelPath.SELECTED_WIDGET_ID),t=s.get(lpTag.unifiedWindow.uiModelPath.WIDGET_SLIDER_VISIBLE);if(e&&t)return e};this.getWidgetsNotifications=function(){return s.get(lpTag.unifiedWindow.uiModelPath.WIDGETS_NOTIICATIONS)||{}};this.getLastSliderState=function(){return s.get(lpTag.unifiedWindow.uiModelPath.WIDGET_SLIDER_VISIBLE)};this.isWindowMaximized=function(){return s.get(lpTag.unifiedWindow.uiModelPath.WINDOW_MAXIMIZED)};this.setWIdgetsNotifications=function(e){s.removeKey(lpTag.unifiedWindow.uiModelPath.WIDGETS_NOTIICATIONS);s.modify(lpTag.unifiedWindow.uiModelPath.WIDGETS_NOTIICATIONS,e)};this.handleWidgetDisposal=function(e){var t,i,n=s.get(lpTag.unifiedWindow.uiModelPath.DISPOSED_WIDGETS_IDS)||{},a=!1;n[e]=!1;s.modify(lpTag.unifiedWindow.uiModelPath.DISPOSED_WIDGETS_IDS,n);for(i in t=C())if(!0===t[i]){a=!0;break}a||o.modify(lpTag.unifiedWindow.chatModelPath.SDK_BUTTON_ENABLE,!1)};this.onWidgetStateChanged=function(e){s.modify(lpTag.unifiedWindow.uiModelPath.WIDGET_SLIDER_VISIBLE,e)}};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow.AuthenticationManager=window.lpTag.unifiedWindow.AuthenticationManager||function(e){var d,c="AuthenticationManager",u=lpTag.unifiedWindow.log,p=lpTag.taglets.authenticator,h=lpTag.taglets.lpUtil;d=e.appContext;function f(){var e=d.conf.authConf&&(d.conf.authConf.stepUpConnector||d.conf.authConf.connector),e=d.conf.unifiedConf.useOAuth2Standard||e&&e.configuration&&e.configuration.rfcCompliance;return d.conf.authConf&&d.conf.authConf.redirect_uri?d.conf.authConf.redirect_uri:e&&d.conf.unifiedConf.external?lpTag.lpUtils.getCurrentUrlWithoutParams():lpTag.unifiedWindow.consts.defaultRedirectUri}function g(t){return function(e){e&&(e.redirect_uri=e.redirect_uri||f());t(e)}}this.authenticate=function(e,t){u.info("authenticate",c);var i=d.conf.unifiedConf.authToken||d.conf.unifiedConf.poppedOut,n=d.conf.engConf.async&&d.conf.authConf&&d.conf.authConf.ssoKey,a=d.conf.authConf&&(d.conf.authConf.stepUpConnector||d.conf.authConf.connector),o=a&&a.configuration&&a.configuration.pkceEnabled;if(p){var s=f(),r=d.conf.uiState&&d.conf.uiState.chat&&"restartAuthentication"===d.conf.uiState.chat.state,l=decodeURIComponent(window.location.href);if(o&&(i||n)&&r&&d.conf.unifiedConf.external&&!l.match('"pkce_reauthentication":1')){r=d.pkceManager.getExternalWindowURLForPKCE(d);window.location.href=r}else if(i)h.runCallback(e,null,{ssoKey:d.conf.unifiedConf.authToken,redirect_uri:s});else if(n)h.runCallback(e,null,{ssoKey:d.conf.authConf.ssoKey,redirect_uri:s});else if(d.conf.unifiedConf.pkceRedirectUrl)d.pkceManager.generatePKCE(function(e){if(e){localStorage.setItem("cv",e.code_verifier);window.location.href=d.conf.unifiedConf.pkceRedirectUrl+"&code_challenge="+e.code_challenge+"&code_challenge_method=S256"}});else{if(!function(e){e=e&&e.configuration;return!e||"lpTag.taglets.unAuthMessaging"===e.jsContext&&"lpTag.taglets.unAuthMessaging.lpUnauthFunction"===e.jsMethodName}(a)&&d.conf.unifiedConf.connectors&&d.conf.unifiedConf.connectors.length){l=function(){var i,e=window.lpTag.identities&&lpTag.identities.safeIdentities||[],t=d.conf.unifiedConf.connectors,n=e.filter(function(e){var e=e.acr,t=parseInt(e,10);return 1!==e.length||0!==t});n.length&&t.forEach(function(t){n.forEach(function(e){t.configuration.issuer===e.iss&&(i=t)})});return i}();l&&(a=l)}o?d.pkceManager.runPKCE(a,function(){p.getSSOKey(a,g(e),t)}):p.getSSOKey(a,g(e),t)}}else{u.error("Not authenticator",c);h.runCallback(t)}};this.reAuthenticate=function(e,t){u.info("reAuthenticate",c);if(p){var i=d.conf.authConf&&(d.conf.authConf.stepUpConnector||d.conf.authConf.connector);i&&i.configuration&&i.configuration.pkceEnabled?d.pkceManager.runPKCE(i,function(){p.getSSOKey(i,g(e),t)}):p.getSSOKey(i,g(e),t)}};this.isErroneous=function(){if(p)return p.isErroneous();u.error("Not authenticator",c)};this.dispose=function(){u.info("dispose",c)}};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow.StepUpManager=window.lpTag.unifiedWindow.StepUpManager||function(e){var a,r,l,t,i,n,o,d,c=lpTag.unifiedWindow.log,s=lpTag.taglets.authenticator,u=lpTag.unifiedWindow.events.chat,p=window.lpTag.taglets.lpSecureStorage,h="StepUpManager",f={},g=!1,m={success:null,fallback:null,error:function(){c.error("failed to stepup, auth error",h);setTimeout(F,0)}},v="onBehalf",w="sub",_="exp",C={outOfAuthArea:-1,noStepUp:0,stepUp:1,alreadySteppedUp:2,stepUpEnded:3,failedStepUp:4},T={},R={idpVersion:"3.0"},E={csds:{idp:"idp",leCdnDomain:"leCdnDomain"},storage:{unauthStorage:{key:"-unAuthJWT",name:"unAuthMessaging"},stepUpStorage:{appName:"StepUP",valueKeys:{lastActiveConvo:"lastActiveConvo",jwt:"-stepUpJWT",lastStepUpState:"lastStepUpState"}}}},y={};function k(e){var t=null;"OPEN"===e.state&&e.convId&&(t=e.convId);p.setValue({app:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,key:E.storage.stepUpStorage.valueKeys.lastActiveConvo,appName:E.storage.stepUpStorage.appName,site:y.accountId,value:t,domain:y.secureStorageLocation,success:function(e){c.debug("stored last unauth convo data",h)},error:function(e){c.debug("failed to store last unauth convo data",h)},firstParty:!0});if("CLOSE"===e.state){l=C.stepUpEnded;n.modify(lpTag.unifiedWindow.uiModelPath.STEP_UP_STATE,l)}}function b(e,i){var t=y.authenticationLocation,n=g?lpTag.taglets.fetch:lpTag.taglets.postmessage,e={lp_jwt:e};i.redirect_uri&&(e.redirect_uri=i.redirect_uri);f.authConnector.type===lpTag.unifiedWindow.consts.authConnectorTypes.OAUTH_IMPLICIT?e.id_token=i.ssoKey:e.code=i.ssoKey;i.code_verifier&&(e.code_verifier=i.code_verifier);t={url:t,method:"POST",success:function(e){var e=e.body.token,t=M(e,[v,w]);T.unAuthConsuemrId=t[v];T.authConsumerId=t[w];o=e;t=a&&a.conf;t&&t.authConf&&(t.authConf.stepUpConnector=f.authConnector);t&&t.engConf&&(t.engConf.stepUpConnector=f.authConnector);i.ssoKey&&i.redirect_uri&&window.lpTag.taglets.lpSecureStorage.setValue({app:"monitoringSDK",appName:"lp_monitoringSDK",site:lpTag&&lpTag.site,domain:y.secureStorageLocation,success:function(){},error:function(e){c.error("Error when setting data for SMT - "+e,h)},firstParty:!0,key:"lpsmtAuth",value:{tkn:e,code:i.ssoKey}});m.success(o)},error:function(e){c.error("failed to get onbehalf jwt from IDP",h);m.fallback()},data:e};if(g){t.headers=t.headers||{};t.headers["Content-Type"]="application/json"}else lpTag.taglets.postmessage.isValidRequest(t)||O();n.issueCall(t)}function S(n){return function(e){var i={},t=f.authConnector&&f.authConnector&&f.authConnector.configuration.pkceEnabled;if("object"==typeof e){i.ssoKey=e.ssoKey;i.redirect_uri=e.redirect_uri}else i.ssoKey=e;t?a.pkceManager.getPKCEFromSecureStorage(function(e){e&&e.code_verifier&&(i.code_verifier=e.code_verifier);a.pkceManager.removePKCEFromSecureStorage();b(n,i)},function(e){c.error("Error when getting PKCE data from storage - "+e,h);b(n,i)}):i.redirect_uri?window.lpTag.taglets.lpSecureStorage.getValue({app:"monitoringSDK",appName:"lp_monitoringSDK",key:"lpsmtAuth",site:lpTag&&lpTag.site,domain:y.secureStorageLocation,success:function(e){var t;e&&e.tkn?(t=M(e.tkn,[_]))&&t.exp&&Date.now()<1e3*t.exp&&m.success(e.tkn):b(n,i)},error:function(e){c.error("Error when getting lpsmtAuth from storage - "+e,h);b(n,i)},firstParty:!0}):b(n,i)}}function V(e){var t=e.body.token,e=f.authConnector&&f.authConnector.configuration.pkceEnabled;a&&a.pkceManager&&e?a.pkceManager.runPKCE(f.authConnector,function(){s.getSSOKey(f.authConnector,S(t),I)}):s.getSSOKey(f.authConnector,S(t),I)}function I(e){c.error("Step up failed to auth with auth connector",h);m.fallback()}function N(e){var t=g?lpTag.taglets.fetch:lpTag.taglets.postmessage,e={url:y.unauthJwtLocation,method:"POST",data:{id_token:e},error:function(e){m.fallback()},success:V};if(g){e.headers=e.headers||{};e.headers["Content-Type"]="application/json"}else lpTag.taglets.postmessage.isValidRequest(e)||O();t.issueCall(e)}function x(){y.authenticationLocation=L(y.idpDomain,{accountId:y.accountId,connectorId:f.authConnector.id});y.unauthJwtLocation=L(y.idpDomain,{accountId:y.accountId,connectorId:f.unauthConnector.id});e=E.storage.unauthStorage.key,t=E.storage.unauthStorage.name,window.lpTag.taglets.lpSecureStorage.getValue({key:e,site:y.accountId,app:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,success:function(e){var t,i,n,a=lpTag.taglets.lpSecureStorage;"function"==typeof a.isFirstPartyStorageFeatureEnabled&&(t=a.isFirstPartyStorageFeatureEnabled());e&&t?(i=e,a=E.storage.unauthStorage.key,n=E.storage.unauthStorage.name,window.lpTag.taglets.lpSecureStorage.getValue({key:a,site:y.accountId,app:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,success:function(e){N(P(i)<P(e)?e:i)},error:function(e){c.error("_getUnauthTokenFromThirdPartySecureStorage: Storage returned error - "+e,n);N(i)},appName:n,domain:y.secureStorageLocation,firstParty:!1})):N(e)},error:function(e){c.error("_getUnauthTokenFromSecureStorage: Storage returned error - "+e,t)},appName:t,domain:y.secureStorageLocation,firstParty:!0});var e,t}function $(){e=function(e){var t={};t.conversationId=e;t.authUserId=T.authConsumerId;t.unAuthUserId=T.unAuthConsuemrId;i.updateStepUpParticipants(t)},p.getValue({app:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,key:E.storage.stepUpStorage.valueKeys.lastActiveConvo,appName:E.storage.stepUpStorage.appName,site:y.accountId,domain:y.secureStorageLocation,success:e,error:function(){c.debug("failed to get last unauth convo data",h)},firstParty:!0});var e}function A(e){if(200===e.code){c.info("Successfully to stepUp user",h);l=C.alreadySteppedUp;n.modify(lpTag.unifiedWindow.uiModelPath.STEP_UP_STATE,l)}else if(400===e.code){if(l!==C.alreadySteppedUp){c.error("Stepup failed to stepUp user with code 400",h);l=C.failedStepUp;n.modify(lpTag.unifiedWindow.uiModelPath.STEP_UP_STATE,l);t.trigger({appName:"*",eventName:"authenticationError",data:{error:"expired"}})}}else{c.error("Step up failed to stepUp user",h);c.error("Failed to stepUp user",h);l=C.failedStepUp;n.modify(lpTag.unifiedWindow.uiModelPath.STEP_UP_STATE,l);m.error()}}function M(e,t){var i={};if(e){e=e.split(".");if(2<=e.length){var n;try{n=JSON.parse(window.atob(e[1]));t.forEach(function(e){i[e]=n[e]})}catch(e){c("error parsing jwt","ERROR","getSubFromJWT")}}return i}}function L(e,t){return"https://"+e+"/api/account/"+t.accountId+"/app/"+t.connectorId+"/authenticate?v="+R.idpVersion}function D(e){e=e&&e.configuration;return"lpTag.taglets.unAuthMessaging"===e.jsContext&&"lpTag.taglets.unAuthMessaging.lpUnauthFunction"===e.jsMethodName}function F(){t.trigger({appName:lpTag.unifiedWindow.apps.CHAT,eventName:lpTag.unifiedWindow.events.chat.ERROR,data:{errorType:lpTag.unifiedWindow.consts.errorTypes.AUTH_ERROR,keepError:!0}})}function P(e){e=function(e){if(e){e=e.split(".");if(2<=e.length)try{return JSON.parse(window.atob(e[1]))}catch(e){c.error("_getPayloadFromJWT: error parsing jwt - "+e,h)}}return{}}(e);return e&&e.exp?e.exp:0}function O(){lpTag.taglets.postmessage.configure({frames:{url:"https://"+y.idpDomain+"/postmessage/postmessage.min.html"}})}this.dispose=function(){c.info("dispose",h);t.unbind({appName:"API",eventName:u.CONVERSATION_STATE});t.unbind({appName:"AMSClient",eventName:"onConversationStepUp",func:A})};this.shouldStepUp=function(){var e=l===C.stepUp||l===C.alreadySteppedUp,t=lpTag&&lpTag.taglets&&lpTag.taglets.lp_sms_client_api?2:1;if(e&&lpTag.identities.length===t){l=C.outOfAuthArea;m.error()}l=function(){if(l===C.outOfAuthArea||l===C.failedStepUp||l===C.alreadySteppedUp)return l;var e=r.uiState.engConf,t=y.isStepupEnabled,i=D(e.connector),n=lpTag&&lpTag.taglets&&lpTag.taglets.lp_sms_client_api?3:2,a=r.uiState.chat?"chatting"===r.uiState.chat.state:!!y.forceStepUp||lpTag.stepUpShouldStart,o=t&&i&&e.identityData&&"0"!==e.identityData.acr,t=t&&i&&a&&l!==C.stepUpEnded;lpTag.stepUpShouldStart&&delete lpTag.stepUpShouldStart;return o?C.alreadySteppedUp:t?l===C.stepUp||lpTag.identities&&lpTag.identities.length===n?C.stepUp:e.identityData&&"0"!==e.identityData.acr?C.alreadySteppedUp:C.noStepUp:C.noStepUp}();c.info("Stepup state:"+l,h);return l===C.stepUp||l===C.alreadySteppedUp||l===C.outOfAuthArea};this.stepUpAuthentication=function(t,e){m.success=function(e){c.debug("successful stepup auth",h);t(e)};m.fallback=function(){c.error("failed to stepup, falling back",h);e()};if(y.isStepupEnabled&&l===C.outOfAuthArea)c.debug("User is out of auth area with auth convo",h);else if(y.isStepupEnabled&&l!==C.failedStepUp){c.debug("begin stepup auth",h);var i,n="https://"+(g?r.unified.acCdnDomainConsumerSdk:r.unified.acCdnDomain)+"/api/account/"+r.unified.accountId+"/configuration/le-connectors/all-connectors",a=r.unified&&r.unified.connectors,o=(lpTag.identities&&lpTag.identities.safeIdentities||[]).filter(function(e){return"LivePerson"!==e.iss}),s=g?lpTag.taglets.fetch:lpTag.taglets.jsonp;f.authConnector=null;f.unauthConnector=null;if(a&&a.length){a.forEach(function(t){if(D(t))f.unauthConnector=t;else{i=t;o.length&&o.forEach(function(e){t.configuration.issuer===e.iss&&(f.authConnector=t)})}});f.authConnector||i&&(f.authConnector=i);x()}else s.issueCall({url:n,timeout:5e3,retries:0,credentials:g?"omit":void 0,cache:g&&d?d:void 0,success:function(e){(g?e&&e.body:e).forEach(function(e){f[D(e)?"unauthConnector":"authConnector"]=e});x()},error:function(){c.info("_getConfiguration - ERROR FROM SERVER",h)}})}else m.fallback()};this.configure=function(e){n=e.lppModel;i=e.apiDelegate};this.getStepUpState=function(){return l};this.sendStepUp=function(){y.isStepupEnabled&&l===C.stepUp&&$()};this.stepUpState=C;this.getStepUpFailedStatus=function(){return l===C.failedStepUp};r=(e=e).configs;l=r.uiState.chat&&r.uiState.chat.stepUpState;a=e.appContext;t=a.events;y.isStepupEnabled=r.unified.isStepUpEnabled||!1;y.forceStepUp=r.unified.forceStepUpIfNoState&&!a.isNewConversation||!1;y.accountId=lpTag&&lpTag.site;y.secureStorageDomain=lpTag&&lpTag.csds&&lpTag.csds.getDomain(E.csds.leCdnDomain);y.idpDomain=lpTag&&lpTag.csds&&lpTag.csds.getDomain(E.csds.idp);y.secureStorageLocation=(e=y.secureStorageDomain,W=window.lpTag.taglets.lpSecureStorage.v,"https://"+e+"/le_secure_storage/"+(W||""));var W,e="function"==typeof lpTag.getEnv&&lpTag.getEnv();g=r&&void 0!==r.unified.isFetchEnabled?JSON.parse(r.unified.isFetchEnabled):"alpha"===e;d=r.unified&&r.unified.fetchCacheMode;t.bind({appName:"API",eventName:u.CONVERSATION_STATE,func:k});t.bind({appName:"AMSClient",eventName:"onConversationStepUp",func:A})};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.FileSharingManager=function(e){var t,o,r,s,n,i="FileSharingManager",a=lpTag.unifiedWindow.apps.FILE_SHARE,l={DEFAULT:5,PDF:15},d=2,c=1e3,u=["PNG","JPG","GIF","JPEG"],p=u.concat(["PDF","DOCX","PPTX","XLSX"]),h={},f=!1,g=!1;if("object"==typeof e){o=e.appContext;r=e.apiManager;s=e.utils;t=e.log;n=e.imageParsingHelper;!function(){o.events.bind({appName:a,eventName:lpTag.unifiedWindow.events.imageShare.IMAGE_SELECTED,func:m});o.events.bind({appName:a,eventName:lpTag.unifiedWindow.events.imageShare.FILE_DOWNLOAD_REQUEST,func:M});o.events.bind({appName:a,eventName:lpTag.unifiedWindow.events.imageShare.OVERLAY_CLOSED,func:L});o.events.bind({appName:a,eventName:lpTag.unifiedWindow.events.imageShare.IMAGE_PREVIEW_CLOSED,func:w});o.events.bind({appName:a,eventName:lpTag.unifiedWindow.events.imageShare.FILE_UPLOAD_RETRY,func:x})}();o&&o.conf&&o.conf.unifiedConf.areExtendedFileFormatsEnabled&&(p=p.concat(["TXT","CSV"]));t.info("init",i)}function m(e){if(e&&!f){var t=C(e&&e.image);if(E(t))switch(t){case"JPG":case"JPEG":case"PNG":case"GIF":n.fixOrientation(e.image,v.bind(this));break;case"PDF":case"DOCX":case"XLSX":case"PPTX":y(T(e))&&v.call(this,e.image,t);break;default:y(T(e))&&v.call(this,e.image,"GENERIC")}}}function v(e,t){f||new lpTag.unifiedWindow.PhotoPreviewViewController({appContext:o,utils:s,image:e,type:t})}function w(e){f=!1;if(e&&e.image){var t=e.image,e=T(e);if(y(e)){e.error=e.success=function(e,t,i){i=S(i),i=function(t,i,n,e){var a=this,e={fileData:{preview:e,caption:i.caption,fileType:i.fileType,relativePath:n.relativePath},contentType:lpTag.unifiedWindow.consts.chatEvents.FILE_SHARING,type:lpTag.unifiedWindow.consts.chatEvents.FILE_SHARING};n.error?o.transcriptManager.sendLine(e):o.transcriptManager.sendLine(e,function(e){if(e&&e.hasOwnProperty("lineIndex")&&!h[e.lineIndex]){h[e.lineIndex]={send:e.callback,error:e.error,lineRetry:e.retry,state:"pending",details:i};A(e.lineIndex,!1,!0);I.call(a,t,e.lineIndex,n)}})}.bind(this,e,t,i);!function(e,t,i){n.createThumbnail(e,t,i)}(e,i,t.fileType)}.bind(this,t,e);r.imageShareGenerateUrlRequest(e)}}}function _(e){return!!e&&(e=-1<(e=e).indexOf("/")?e.split("/")[1]:e).toUpperCase()}function C(e){var t=e&&e.type;return t=(!(t=_(t))||4<t.length)&&e&&e.name?_((e=e.name.split("."))[e.length-1]):t}function T(e){var t=e&&e.image,e=e&&e.caption||"",i=t&&t.size,t=C(t);return{fileSize:i.toString(),fileType:t,caption:e}}function E(e){if(-1!==p.indexOf(e))return 1;b(lpTag.unifiedWindow.consts.fileSharing.fileAttributes.TYPE)}function y(e){var t=!0,i=e.fileSize/1024/1024,n=(n=e.fileType,l[n]||l.DEFAULT);if(E(e.fileType)){if(n<i){t=!1;b(lpTag.unifiedWindow.consts.fileSharing.fileAttributes.SIZE,n)}}else t=!1;return t}function b(e,t){o.events.trigger({appName:a,eventName:lpTag.unifiedWindow.events.imageShare.FILE_VALIDATION,data:{validation:e,extraData:t}})}function S(e){var t=e;"string"==typeof e&&(t={error:e});return t=e.timeout?{error:e.timeout}:t}function I(e,a,t,o){if(h[a]){h[a].lineRetry&&h[a].lineRetry(t);var i=h[a].details,s=N(t);if(e&&i&&s){h[a].retry||(h[a].retry=function(e,t,i){h[t].lineRetry&&h[t].lineRetry();var n=h[t].details;i=i||0;n.error=n.success=function(e,t,i,n){n=S(n);I.call(this,e,t,n,i)}.bind(this,e,t,i);r.imageShareGenerateUrlRequest(n)}.bind(this,e,a));t=new FileReader;t.onload=function(){var e=this.result,e=new Int8Array(e),t=s,i=function(e,t,i,n){if(h[e]&&i&&h[e].send)h[e].send();else if(!i){t=t||0;if(n&&t<d){t++;setTimeout(function(){h[e]&&h[e].retry?h[e].retry(t):A(e,!i,!1,n)},c);return}h[e]&&h[e].error&&h[e].error({canRetry:n})}A(e,!i,!1,n)}.bind(this,a,o||0);if(e){var n=new XMLHttpRequest;n.open("PUT",t);n.onreadystatechange=function(){4===n.readyState&&i(201===n.status,n.status<400||500<=n.status)};n.send(e)}};t.readAsArrayBuffer(e)}}}function N(e){var t=e.relativePath,i=e.queryParams&&e.queryParams.temp_url_sig,e=e.queryParams&&e.queryParams.temp_url_expires;if(t&&i&&e)return"https://"+lpTag.csds.getDomain("swift")+t+"?temp_url_sig="+i+"&temp_url_expires="+e}function x(e){e&&e.localId&&h&&h[e.localId]&&h[e.localId].retry&&h[e.localId].retry(0)}function A(e,t,i,n){o.events.trigger({appName:a,eventName:lpTag.unifiedWindow.events.imageShare.FILE_DONE_UPLOADED+":"+e,data:{showLoader:i,error:t,canRetry:n}})}function M(e){if(!g||s.getPropertyFromObject(e,"download")){g=!0;var t=s.getPropertyFromObject(e,"fileData.relativePath"),i=s.getPropertyFromObject(e,"convId");if(t){t={relativePath:t,conversationId:i};t.error=t.success=function(e,t){var i=s.getPropertyFromObject(t,"body.urlForDownload");!i&&t.relativePath&&(i=N(t));if(s.getPropertyFromObject(e,"download"))i&&window.open(i,"_blank");else{var n=C({name:s.getPropertyFromObject(e,"fileData.relativePath")}),a=n;if(n)switch(n){case"PNG":case"JPG":case"JPEG":case"GIF":a=null;break;case"PDF":case"DOCX":case"XLSX":case"PPTX":i=o.conf.unifiedConf.imagesRepository+"/"+n.toLowerCase()+".png";break;default:i=o.conf.unifiedConf.imagesRepository+"/generic.png"}i?new lpTag.unifiedWindow.PhotoOverlayViewController({appContext:o,utils:s,imageURL:i,type:a,line:e,timestamp:e.time,caption:e.fileData&&e.fileData.caption||""}):g=!1}}.bind(this,e);r.imageShareDownloadUrlRequest(t)}}}function L(){g=!1}this.ALLOWED_IMAGES=u;this.dispose=function(){o.events.unbind({appName:a,eventName:lpTag.unifiedWindow.events.imageShare.IMAGE_SELECTED,func:m});o.events.unbind({appName:a,eventName:lpTag.unifiedWindow.events.imageShare.FILE_DOWNLOAD_REQUEST,func:M});o.events.unbind({appName:a,eventName:lpTag.unifiedWindow.events.imageShare.OVERLAY_CLOSED,func:L});o.events.unbind({appName:a,eventName:lpTag.unifiedWindow.events.imageShare.IMAGE_PREVIEW_CLOSED,func:w});o.events.unbind({appName:a,eventName:lpTag.unifiedWindow.events.imageShare.FILE_UPLOAD_RETRY,func:x})}};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.BrowserNotificationsManager=function(e,t){var i,a,c,n,r,o,s,l,d,u,p,h="BrowserNotificationsManager",f=lpTag.unifiedWindow.log,R=lpTag.taglets.lpUtil,g=!1,m={GRANTED:"granted",DENIED:"denied"},v=null,w=lpTag.unifiedWindow.uiModelPath,_=lpTag.unifiedWindow.chatModelPath,C=0,T="",E=!1,y=lpTag.storageMethods.getSessionData("lpTabId"),b=lpTag.taglets.lpSecureStorage,S=lpTag.unifiedWindow.consts.chatEvents,k=5e3,I=null,V=5e3,N=null;c=t.uiModel;a=t.chatModel;i=function(e){return{nativeEnabled:"true"===e.nativeNotification,tabEnabled:"true"===e.tabNotification}}(e);g=!!window.Notification;v=t.browserStateManager;f.info("Browser Notifications Supported: "+g,h);n=t.secureStorageLocation;r=t.appContext.translator;o=t.appContext.deviceDetector;t.events;s=t.appContext.fileSharingManager;l=t.appContext.conf.engConf.lang;t.appContext.conf.unifiedConf.jsRepository;e=t.appContext.conf.unifiedConf.external;t=t&&t.appContext&&t.appContext.conf&&t.appContext.conf.unifiedConf.disableFaviconUsage;d=o.isAndroidChrome();u=o.isMacOS();p=o.isMobile();if(!e&&!t){var x=new XMLHttpRequest;x.onreadystatechange=function(){if(4===x.readyState&&200===x.status)T="/favicon.ico";else if(4===x.readyState){for(var e,t="",i=document.getElementsByTagName("link"),n=0;n<i.length;n++)"icon"!==(e=i[n].getAttribute("rel"))&&"shortcut icon"!==e||(t=i[n].getAttribute("href"));t&&(T=t)}};try{x.open("GET","/favicon.ico");x.send(null)}catch(e){f.error("Error loading favicon"+e,h)}}if(d){var A=function(){M();F()};d?navigator.serviceWorker.getRegistration(window.location.origin+"/bn-sw.js").then(function(e){if(e){N=e;f.info("Service worker obtained",h);A()}else t=A,navigator.serviceWorker.register(window.location.origin+"/bn-origin-sw.js").then(function(e){f.info("Service worker registration succeeded",h);navigator.serviceWorker.getRegistration(window.location.origin+"/bn-sw.js").then(function(e){if(e){N=e;f.info("Service worker obtained",h);t()}})},function(e){f.error("Service worker registration failed: "+e,h);t()});var t}):A()}else{M();F()}function $(e){if(g)switch(window.Notification.permission){case m.DENIED:c.load(D.bind(this,W.bind(this,O,e)));break;case m.GRANTED:c.load(D.bind(this,O.bind(this,e)));break;default:c.load(D.bind(this,W.bind(this,O,e)))}}function M(){if(i.tabEnabled){a.bind(_.LINES,P);c.bind(w.LAST_LINE_VIEWED,P);v.on(v.EVENT_NAME.VISIBILITY_CHANGE,P)}i.nativeEnabled&&B()&&a.bind(_.LINES,U)}function L(){I=setTimeout(D.bind(this,L),V)}function F(){I=setTimeout(D.bind(this,L),0)}function D(d){c.load(function(){var e=c.get(w.TAB_LIST)||{},t=c.get(w.LAST_VIEWED_TAB)||"",i={active:!0,ts:(new Date).getTime()};e[y]=i;c.modify(w.TAB_LIST,e);for(var n=e,a=t,i=d,o=Object.keys(n)||[],s=(new Date).getTime(),r=0;r<o.length;r++)if(s-n[o[r]].ts>k){var l=R.clone(w.TAB_LIST);l.path=l.path+"."+o[r];c.removeKey(l);o[r]==a&&c.modify(w.LAST_VIEWED_TAB,"")}i()})}function B(){return b.getStorageType(n).lpUnifiedWindow!==b.storageTypes.SESSIONSTORAGE}function P(){var e=function(){var e=0,t=a.get(_.LINES)||[],i=c.get(w.LAST_LINE_VIEWED);if(i)for(var n=t.length-1;0<=n;n--){if(t[n]["@id"]===i["@id"]&&t[n].convId===i.convId)return e;isNaN(t[n]["@id"])||"agent"!==t[n].source||t[n].history||e++}return 0}.call(this),t=void 0===C||C!==e,i=v&&v.isHidden();if(t)if(i&&0<e){C=e;if(E)window.document.title=window.document.title.replace(/^\(\d*\)/,"("+C+")");else{E=!0;window.document.title="("+C+") "+window.document.title}}else if(e<=0){C=0;E=!1;window.document.title=window.document.title.replace(/^\(\d*\)/,"")}}function U(e){var t,i,n=e.newValue,a=c.get(w.LAST_LINE_VIEWED),o=v&&v.isHidden();if(a)for(var s=0;s<n.length;s++)if(((t=n[s],i=a,t["@id"]>i["@id"]&&t.convId===i.convId&&"agent"===t.source&&!t.update)||function(e,t){if(e.convId!==t.convId&&"agent"===e.source&&!e.update)return 0===e["@id"]&&c.modify(w.LAST_LINE_VIEWED,{"@id":e["@id"],localId:e.localId,convId:e.convId}),1}(n[s],a))&&o){if(1<C){n[s].type=S.LINE;n[s].text=C+" "+r.translate("browserNotifications_newMessages")}$(n[s])}}function O(e){var t=c.get(w.LAST_VIEWED_TAB),i=c.get(w.TAB_LIST)||{},i=Object.keys(i)||[],i=0<i.length?i[i.length-1]:"",e=function(e){e=function(e){var t=e.by||r.translate("agent");r.extendDictionary({agentName:t},{locale:l});switch(e.type){case S.LINE:var i=document.createElement("div");i.innerHTML=e.text;return i.textContent||i.innerText||"";case S.SECURE_FORM:return r.translate("secureForm_link_title_send");case S.RICH_CONTENT:return r.translate("browserNotifications_richContent");case S.COBROWSE:return r.translate("cobrowseInvitation");case S.FILE_SHARING:return"IMAGE"===function(e){e=e&&e.fileType||"";if(-1!==s.ALLOWED_IMAGES.indexOf(e.toUpperCase()))return"IMAGE"}(e.fileData)?r.translate("browserNotifications_image"):r.translate("browserNotifications_file");default:return""}}(e);return{title:r.translate("browserNotifications_newMessageTitle"),options:{body:e,icon:T}}}(e);if(t&&t===y||i===y){t=e.title,i=e.options;if(!u){i.tag=h;p||(i.renotify=!0)}T||delete i.icon;if(d){i.data={url:document.location.href};N.showNotification(t,i)}else{var n=new window.Notification(t,i);n.onclick=function(){window.focus();o.isEdge()||n.close()}}}}function W(t,i){window.Notification.requestPermission().then(function(e){e===m.GRANTED&&t(i)})}this.isSupported=g;this.nativeEnabled=function(){return g&&i.nativeEnabled};this.permissionGranted=function(){return g&&window.Notification.permission===m.GRANTED};this.permissionDenied=function(){return g&&window.Notification.permission===m.DENIED};this.requestPermission=W;this.dispose=function(){if(i.tabEnabled){a.unbind(_.LINES,P);c.unbind(w.LAST_LINE_VIEWED,P);v.off(v.EVENT_NAME.VISIBILITY_CHANGE,P);if(E){window.document.title=window.document.title.replace(/^\(\d*\)/,"");E=!1}}i.nativeEnabled&&B()&&a.unbind(_.LINES,U);clearTimeout(I)}};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.FeatureStateManager=lpTag.unifiedWindow.FeatureStateManager||function(i,e){var n,t,a,o,s=lpTag.unifiedWindow.log,r=lpTag.taglets.lpUtil,l=lpTag.unifiedWindow.applicationUtils,d=lpTag.unifiedWindow.settingsIDs,c={EMOJI_ICON:"emojiEnabled",ATTACHMENT_ICON:"attachmentIcon",BOTTOM_AREA:"bottomArea",ACTIONS_BUTTON:"actionsButton",CLOSE_BUTTON:"closeButton",TOP_MENU_BUTTON:"topMenuButton"},u="emojiEnabled",p="sendIconType",h="timeStampGrouping",f="timeStampLocation",g="agentAvatar",m="bubbleGrouping",v="agentAvatarPadding",w="engagementWindowBorder",_="engagementWindowBoxShadow",C="closeWindowButtonBehaviorType",T="closeWindowButtonByAgentBehaviorType",R="historyLazyLoad",E={emojiEnabled:"emojiEnabled",sendIconType:"sendIconType",attachmentIcon:"attachmentIcon"},y={TOP:"top",BOTTOM:"bottom",DEFAULT:"bottom"},k="top",b="top",S={emojiEnabled:"lp_emoji_supported",attachmentIcon:"lp_attachment_icon",topMenu:"lp_menu_top"},I={VISITOR_BUBBLE:"transcript_bubble_visitor_parent.options.transcript_bubble_visitor_parent",AGENT_BUBBLE:"transcript_bubble_agent_parent.options.transcript_bubble_agent_parent"},N={},x=[],A=!1,M=i;a=(n=M).menuLocation||y.DEFAULT;o=e.appContext.conf.engConf.async;t=e.appContext.deviceDetector;x=l.isArray(e.appContext.conf.accountSettings)?e.appContext.conf.accountSettings:[];A=P(d.FILE_SHARING_ENALBED,"true");M=n;if(!o){O(c.ATTACHMENT_ICON,!1);O(c.TOP_MENU_BUTTON,!1);O(c.ACTIONS_BUTTON,!0);O(c.CLOSE_BUTTON,!0)}A||O(c.ATTACHMENT_ICON,!1);t.isDesktop()||O(c.EMOJI_ICON,!1);l=a;if(l===y.TOP){O(c.ACTIONS_BUTTON,!1);O(c.CLOSE_BUTTON,!1);O(c.TOP_MENU_BUTTON,!0)}else{y.BOTTOM;O(c.ACTIONS_BUTTON,!0);O(c.CLOSE_BUTTON,!0);O(c.TOP_MENU_BUTTON,!1);O(c.ATTACHMENT_ICON,!1)}var V=M,e=(Object.keys(E).forEach(function(e){O([E[e]],!!V[e])}),M),l=[];if(o||t.isDesktop()){if(t.isDesktop()){e[E.attachmentIcon]&&A&&l.push(S.attachmentIcon);e[E.emojiEnabled]&&l.push(S.emojiEnabled)}else e[E.attachmentIcon]&&A&&l.push(S.attachmentIcon);W()&&l.push(S.topMenu);$(c.BOTTOM_AREA,l)}s.debug("Menu Location parsed","FeatureStateManager");function L(){return o}function D(e,t){return r.getPropertyFromObject(i,"customStyle.config."+e,t)}function P(t,e){var i=x.filter(function(e){return e.id===t});return i&&0<i.length&&i[0].propertyValue&&i[0].propertyValue.value===e}function O(e,t){N[e]||(N[e]={value:t})}function $(e,t){N[e]?N[e].classes=t:N[e]={classes:t}}function W(){return a===y.TOP&&o}this.getStyleConfig=function(e){(e=N[e]||{}).classes=e.classes||[];return e};this.renderMap=c;this.isMessaging=L;this.emojiEnabled=function(){return n[u]&&t.isDesktop()};this.isFileSharingEnabled=function(){return L.call(this)&&A};this.getSendIconType=function(){return n[p]||"arrow"};this.isMenuTop=W;this.isLineGroupingEnabled=function(){return"true"===r.getPropertyFromObject(n,m,"false")};this.locationMap=y;this.checkSetting=P;this.getSettingsValue=function(t){var e=x.filter(function(e){return e.id===t});return e&&0<e.length&&e[0].propertyValue&&e[0].propertyValue.value||null};this.timeStampGroupingEnabled=function(){return"true"===r.getPropertyFromObject(n,h,"false")};this.avatarEnabled=function(){var e=r.getPropertyFromObject(n,g,!1);return!0===e||"true"===e};this.getBubbleStyles=function(){return{agent:D(I.AGENT_BUBBLE,"default"),visitor:D(I.VISITOR_BUBBLE,"default")}};this.getCustomStyle=D;this.isTimeStampAbove=function(){return r.getPropertyFromObject(n,f,b)===k};this.timeStampLocationEnabled=function(){return!!r.getPropertyFromObject(n,f,b)};this.agentAvatarPaddingEnabled=function(){return"true"===r.getPropertyFromObject(n,v,"false")};this.isHistoryLazyLoadEnabled=function(){var e=n[R],t=P(d.HISTORY_LAZYLOAD,"true");switch(e){case"default":case"enabled":return!0;case"disabled":return!1;default:return t}};this.isEngagementWindowBorderEnabled=function(){return"true"===r.getPropertyFromObject(n,w,"true")};this.getEngagementWindowBoxShadowConfig=function(){return n[_]};this.getCloseWindowButtonBehaviorType=function(){return n[C]};this.getCloseWindowByAgentBehaviorType=function(){return n[T]};this.isUMSConnectionTimeoutEnabled=function(){return P(d.UMS_CONNECTION_TIMEOUT,"true")};this.isBlurThumbnailsEnabled=function(){return P(d.BLUR_THUMBNAILS,"true")};this.CLOSE_ON_END_TYPE={OPEN:"OPEN",CLOSE:"CLOSE"};this.customStyleMap=I};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.TimeStampManager=function(e){lpTag.unifiedWindow.log;var t,a,i,n,o,s,r,l,d=lpTag.lpUtils,c=lpTag.unifiedWindow.applicationUtils,u={MINUTE:6e4,DAY:864e5,WEEK:6048e5},p={NOW:"ts_Now",TODAY:"ts_Today",YESTERDAY:"ts_Yesterday"},h=lpTag.unifiedWindow.chatModelPath,f=lpTag.unifiedWindow.events.viewController,g=" ";t=e.chatModel;n=e.appContext.featureStateManager;i=n.timeStampGroupingEnabled();o=e.appContext.events;a=e.appContext.translator;s=e.appContext.conf.engConf.lang;r=[a.translate("monthJanuary"),a.translate("monthFebruary"),a.translate("monthMarch"),a.translate("monthApril"),a.translate("monthMay"),a.translate("monthJune"),a.translate("monthJuly"),a.translate("monthAugust"),a.translate("monthSeptember"),a.translate("monthOctober"),a.translate("monthNovember"),a.translate("monthDecember")];l=[a.translate("weekDaySunday"),a.translate("weekDayMonday"),a.translate("weekDayTuesday"),a.translate("weekDayWednesday"),a.translate("weekDayThursday"),a.translate("weekDayFriday"),a.translate("weekDaySaturday")];i&&t.bind(h.LINES,_);function m(e,t){return i?C(w(e),t):g+a.translate("at")+" "+c.getTime(e,r,a.translate("dayMonthGap"),a.translate("daySuffix"),null,a.getLocaleConfig("timeOrder"))+":"}function v(e,t){t=t||{};e=w(e)?w(e):(new Date).getTime();if(i=e,n=(new Date).getTime(),n=Math.ceil(n/u.DAY),i=Math.ceil(i/u.DAY),n-i==0)return a.translate(p.TODAY);if(n=e,i=(new Date).getTime(),i=Math.ceil(i/u.DAY),n=Math.ceil(n/u.DAY),i-n==1)return a.translate(p.YESTERDAY);(i=e,n=(new Date).getTime(),n=Math.ceil(n/u.WEEK),i=Math.ceil(i/u.WEEK),n-i==0)?t.weekDay=!0:(n=e,i=(new Date).getFullYear(),n=new Date(n).getFullYear(),i!==n)&&(t.year=!0);var i,n;return c.getDay(e,r,l,a.translate("dayMonthGap"),a.translate("daySuffix"),t)}function w(e){return e&&"number"==typeof e?e:e?new Date(e).getTime():null}function _(e){for(var t,i,n=e.newValue.filter(function(e){var t=(new Date).getTime();return e.time&&t-w(e.time)<u.MINUTE}),a=0;a<n.length;a++)(t=n[a],i=void 0,i=(new Date).getTime(),!t.update&&i-w(t.time)<u.MINUTE)&&!function(e){setTimeout(function(){o.trigger({appName:"*",eventName:f.UPDATE_TIME_STAMP,data:{line:e,timeStamp:m(e.time,!0)}})},function(e){var t=(new Date).getTime(),t=Math.ceil(t/u.MINUTE)*u.MINUTE;return Math.abs(t-w(e))}(e.time))}(n[a])}function C(e,t,i){var n={lang:s},i=(i&&(n.lang=null),""),i=(new Date).getTime()-e<u.MINUTE&&!t?a.translate(p.NOW):d.getTime(e,r,a.translate("dayMonthGap"),a.translate("daySuffix"),n);return g+"-"+g+i}this.getTimeString=m;this.getDayString=v;this.getDayId=function(e,t){return v(e,t).replace(/(\s|,)/g,"_")};this.dispose=function(){i&&t.unbind(h.LINES,_)};this.timeStampGroupingEnabled=function(){return i};this.isSameDay=function(e,t){if(!e)return!1;t=t?new Date(t):new Date;var i=new Date(e);return e<t&&t.getFullYear()===i.getFullYear()&&t.getMonth()===i.getMonth()&&t.getDate()===i.getDate()};this.getEpochTime=w;this.getSideTimeString=function(e,t,i){return C(e,i,t).replace(g+"-"+g,"")}};lpTag.unifiedWindow.webViewPlugin=lpTag.unifiedWindow.webViewPlugin||function(n){var e=lpTag.unifiedWindow.events,a=n&&n.events,o=n&&n.log,t=e.chat,i=e.uiState,e=e.application,s=window.android,r=window.webkit&&window.webkit.messageHandlers,l=[],d=lpTag.taglets.lpUtil,c=d.getPropertyFromObject(lpTag,"unifiedWindow.publicEvents");function u(e,i){var t;n.IOS&&r?t=function(e,t){e=p(t.appName,t.eventName,e);r[i].postMessage(e)}:s&&"function"==typeof s[i]&&(t=function(e,t){e=p(t.appName,t.eventName,e);s[i].call(s,"string"!=typeof e?JSON.stringify(e):e)});if(t){t=a.bind({eventName:e,func:t,context:s,async:!0});l.push(t)}else o.error("No callback defined, missing android object",e)}function p(e,t,i){var n=i,e=i&&c&&c[e]&&c[e][t];return n=e?function(e,t){var i={};if("object"==typeof t)for(var n in t)i[n]=d.getPropertyFromObject(e,t[n]);else i=d.getPropertyFromObject(e,t);return i}({data:i},(Array.isArray(e)?e[0]:e).data):n}if(a&&"function"==typeof a.bind){u(t.INITIALIZED,"onInit");u(t.STATE,"onConversationStateChanged");u(t.LINE,"onConversationLine");u(t.CHAT_INFO,"onConversationInfo");u(e.DO_HARAKIRI,"onApplicationEnded");u(i.MINIMIZED,"onBackClicked");u(t.SESSION_DATA,"onSessionData")}else o.error("No events object found","webViewPlugin");return{dispose:function(){if(a&&"function"==typeof a.unbind)for(var e=0;e<l.length;e++)a.unbind(l[e]);o=a=n=null;l.length=0}}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.helpers=lpTag.unifiedWindow.helpers||{};lpTag.unifiedWindow.helpers.LocalizationHelper=lpTag.unifiedWindow.helpers.LocalizationHelper||function(e){var a,t={"he-IL":!0,"ar-AE":!0},o={LTR:"lp_ltr",RTL:"lp_rtl"};a=e.util;function s(e){return!0===t[e]}return{applyDirOnElement:function(e,t,i){var n=s(i)?"RTL":"LTR",i=s(i)?"LTR":"RTL";if(function(e,t){var i="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-﷾--",n="֑-߿יִ-﷽ﹰ-ﻼ";e="rtl"===e.toLowerCase()?new RegExp("^[^"+n+"]*["+i+"]"):new RegExp("^[^"+i+"]*["+n+"]");return!e.test(t)}(n,t)){a.addClass(e,o[n]);a.removeClass(e,o[i])}else{a.addClass(e,o[i]);a.removeClass(e,o[n])}},isLanguageRTL:s}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.helpers=lpTag.unifiedWindow.helpers||{};lpTag.unifiedWindow.helpers.ImageParsingHelper=lpTag.unifiedWindow.helpers.ImageParsingHelper||function(e){var s=e&&e.appContext,r=lpTag.unifiedWindow.settingsIDs,l={TIFF_TAGS:{ORIENTATION:274},SOI_MARKER:65496,APP1_MARKER:65505,EXIF_HEADER_MARKER:1165519206,TIFF_HEADER_MARKER:18761,MAX_THUMB_WIDTH:130,MAX_THUMB_HEIGHT:130,DEFAULT_RESIZE_IMAGE:800,THUMB_FORMAT:"image/jpeg"};function n(e,i){var s=function(e){var t=-1;e&&(t=e[l.TIFF_TAGS.ORIENTATION]);i(t)};if(e instanceof Blob){var t=new FileReader;t.onload=function(e){var t=new DataView(e.target.result);if(t.buffer.byteLength<16)return s();if(t.getUint16(0,!1)!==l.SOI_MARKER)return s();for(var i=t.byteLength,n=2;n<i;){if(t.getUint16(n+2,!1)<=8)return s();var a,o=t.getUint16(n,!1);n+=2;if(o===l.APP1_MARKER)return t.getUint32(n+=2,!1)!==l.EXIF_HEADER_MARKER?s():(a=t.getUint16(n+=6,!1)===l.TIFF_HEADER_MARKER,a=(n+=t.getUint32(n+4,a),function(e,t,i){for(var n=e.getUint16(t,i),a=(t+=2,{}),o=0;o<n;o++){var s=t+12*o,r=e.getUint16(s,i),s=e.getUint16(s+8,i);a[r]=s}return a}(t,n,a)),s(a));if(65280!=(65280&o))break;n+=t.getUint16(n,!1)}s()};try{t.readAsArrayBuffer(e)}catch(e){s()}}else s()}return{fixOrientation:function(t,i){if(t&&t instanceof Blob){var e=function(o,s,r){if(r<2)s(o);else{var e=new FileReader;e.onloadend=function(){var a=new Image;a.onload=function(){var e=a.width,t=a.height,i=document.createElement("canvas"),n=i.getContext("2d");if(4<r&&r<9){i.width=t;i.height=e}else{i.width=e;i.height=t}switch(r){case 2:n.transform(-1,0,0,1,e,0);break;case 3:n.transform(-1,0,0,-1,e,t);break;case 4:n.transform(1,0,0,-1,0,t);break;case 5:n.transform(0,1,1,0,0,0);break;case 6:n.transform(0,1,-1,0,t,0);break;case 7:n.transform(0,-1,-1,0,t,e);break;case 8:n.transform(0,-1,1,0,0,e)}n.drawImage(a,0,0);i.toBlob?i.toBlob(s,o.type):s(o)};a.onerror=function(e){s(o)};e&&e.result&&"data:"!==e.result?a.src=e.result:s(o)};try{e.readAsDataURL(o)}catch(e){s(o)}}}.bind(this,t,function(a,o){var e=new FileReader;e.onloadend=function(){var n=new Image;n.onload=function(){var e,t=document.createElement("canvas"),i=t.getContext("2d");t.width=n.width;t.height=n.height;e=s&&s.conf&&s.conf.unifiedConf&&s.conf.unifiedConf.resizeImage||s.featureStateManager.getSettingsValue(r.FILE_SHARING_IMAGE_RESIZE_SIZE)||l.DEFAULT_RESIZE_IMAGE;e=Math.min(e/t.width,e/t.height,1);t.width=t.width*e;t.height=t.height*e;i.drawImage(n,0,0,t.width,t.height);t.toBlob?t.toBlob(a,o.type):a(o)};n.onerror=function(e){a(o)};e&&e.result&&"data:"!==e.result?n.src=e.result:a(o)};try{e.readAsDataURL(o)}catch(e){a(o)}}.bind(this,i));try{n(t,e)}catch(e){i(t)}}else i(t)},createThumbnail:function(e,t,i){var n=new FileReader,a=function(n,e){var a=new Image,o=(a.setAttribute("crossOrigin","Anonymous"),s.featureStateManager&&s.featureStateManager.isBlurThumbnailsEnabled());a.onload=function(){var e=document.createElement("canvas"),t=e.getContext("2d"),i=Math.min(l.MAX_THUMB_HEIGHT/a.height,l.MAX_THUMB_WIDTH/a.width);e.height=a.height*i;e.width=a.width*i;o&&(t.filter="blur(10px)");t.fillStyle="white";t.fillRect(0,0,e.width,e.height);t.drawImage(a,0,0,e.width,e.height);o&&(s.deviceDetector.isSafari()||s.deviceDetector.isIOS())&&(t=function(e,t){var i=parseFloat(t);if(!(i<=0)){for(var n,a,o,s,r=e.canvas.height,l=e.canvas.width,t=e.getImageData(0,0,l,r),d=t.data,c=l-1,u=r-1,p=i+1,h=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1][i],f=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18][i],g=[],m=[],v=[],w=[],_=[],C=[],R=3;0<R;){for(var T=0,E=0,y=0;y<r;y++){for(var b=d[T]*p,S=d[T+1]*p,I=d[T+2]*p,N=d[T+3]*p,x=1;x<=i;x++){n=T+((c<x?c:x)<<2);b+=d[n++];S+=d[n++];I+=d[n++];N+=d[n]}for(var A=0;A<l;A++){g[E]=b;m[E]=S;v[E]=I;w[E]=N;if(0===y){_[A]=((n=A+p)<c?n:c)<<2;C[A]=0<(n=A-i)?n<<2:0}a=T+_[A];o=T+C[A];b+=d[a++]-d[o++];S+=d[a++]-d[o++];I+=d[a++]-d[o++];N+=d[a]-d[o];E++}T+=l<<2}for(var M=0;M<l;M++){for(var L=M,D=g[L]*p,P=m[L]*p,O=v[L]*p,k=w[L]*p,V=1;V<=i;V++){D+=g[L+=u<V?0:l];P+=m[L];O+=v[L];k+=w[L]}E=M<<2;for(var W=0;W<r;W++){d[E+3]=s=k*h>>>f;if(0<s){s=255/s;d[E]=(D*h>>>f)*s;d[E+1]=(P*h>>>f)*s;d[E+2]=(O*h>>>f)*s}else d[E]=d[E+1]=d[E+2]=0;if(0===M){_[W]=((n=W+p)<u?n:u)*l;C[W]=0<(n=W-i)?n*l:0}D+=g[a=M+_[W]]-g[o=M+C[W]];P+=m[a]-m[o];O+=v[a]-v[o];k+=w[a]-w[o];E+=l<<2}}R-=1}e.putImageData(t,0,0)}return e}(t,"10px"));i=e.toDataURL(l.THUMB_FORMAT);n&&"function"==typeof n&&n(i)};a.onerror=function(){n&&"function"==typeof n&&n()};!function(){return s.deviceDetector.isIOS13()||s.deviceDetector.isMacOS()&&s.deviceDetector.isSafari()&&13===s.deviceDetector.browserVersion()}.call(this)?a.src=e&&e.target&&e.target.result||e:n(lpTag.unifiedWindow.consts.fileSharing.fallbackThumbnail.URI)}.bind(this,t);n.onload=a;if(i)switch(i){case"JPG":case"JPEG":case"PNG":case"GIF":n.readAsDataURL(e);break;case"PDF":case"DOCX":case"XLSX":case"PPTX":a(s.conf.unifiedConf.imagesRepository+"/"+i.toLowerCase()+".png");break;default:a(s.conf.unifiedConf.imagesRepository+"/generic.png")}else n.readAsDataURL(e)},getImageOrientation:n}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.helpers=lpTag.unifiedWindow.helpers||{};lpTag.unifiedWindow.helpers.SecureFormStyleHelper=lpTag.unifiedWindow.helpers.SecureFormStyleHelper||function(e){var i,n={surveyArea:1,button:2},a={"background-color":"bc",color:"c","font-family":"f"};i=e;return{getCompressedCSS:function(){var e=function(e){var t,i={};for(t in e)e.hasOwnProperty(t)&&(i[n[t]]=function(e,t){var i={};if(e)for(var n in e)e.hasOwnProperty(n)&&(i[t[n]]=e[n]);return i}(e[t],a));return i}(function(){var e,t={};for(e in n)n.hasOwnProperty(e)&&(t[e]=i.themer.getStyle(e));return t}()),e=JSON.stringify(e);return encodeURIComponent(e)}}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.helpers=lpTag.unifiedWindow.helpers||{};lpTag.unifiedWindow.helpers.SMSFormHelper=lpTag.unifiedWindow.helpers.SMSFormHelper||function(){var a=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml||function(e){return{cleanText:e}},o=["Text Field","Text Area","Dropdown Box","Radio Button","Radio Button (side by side)","Checkbox"],s={EMAIL:"email",PHONE_NUMBER:"phoneNumber",IDENTIFIER:"identifier",FIRST_NAME:"firstname",LAST_NAME:"lastname",MESSAGE:"message",NUMBER:"numeric",ALPHA_NUMBERIC:"alpha_numeric"};function n(e,t){var i,n={id:t+1,type:(i=e.UDEType,0<=o.indexOf(i)?i:"Text Field"),validationType:function(e,t){switch(e){case s.EMAIL:case s.PHONE_NUMBER:case s.IDENTIFIER:case s.FIRST_NAME:case s.LAST_NAME:case s.MESSAGE:return e}return"Numeric Field"===t?s.NUMBER:s.ALPHA_NUMBERIC}(e.type,e.UDEType),logicId:e.logicID,order:t,mandatory:e.required,label:a(e.question).cleanText,lastKnownValue:""};if(e.answersList&&e.answersList.answer&&e.answersList.answer.length){n.entry=[];e.answersList.answer.forEach(function(e){n.entry.push({checked:!1,value:e,displayValue:a(e).cleanText})})}return n}return{TYPES:s,transform:function(e){if(e&&e.json){var t={header:e.json.heading,footer:e.json.footer,survey:{id:e.id,header:e.json.heading,questions:{question:[]}}},i=t.survey.questions.question;(e.json.questions&&e.json.questions.surveyQuestion||[]).forEach(function(e,t){e.displayed&&i.push(n(e,t))});return e.id,t}},getAnswerOfType:function(e,t,i){var n;if(e&&t&&i)return e.survey.questions.question.forEach(function(e){e.validationType===i&&(n=e.id)}),void 0!==n&&(e=t.filter(function(e){return e.id===n}))&&e.length?e[0]:void 0}}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.helpers=lpTag.unifiedWindow.helpers||{};lpTag.unifiedWindow.helpers.HyperLinksHelper=lpTag.unifiedWindow.helpers.HyperLinksHelper||function(){var r={markdownToHtml:{regexp:new RegExp("#md#\\[(.*?)]\\((.*?)\\)#/md#","gim")},anchorTagRegex:{regexp:new RegExp("<a[\\s]+([^>]+)>((?:.(?!\\<\\/a\\>))*.)</a>","gim")},href:{regexp:new RegExp("href=\"(.*?)\"|href='(.*?)'","gim")},link:{regexp:new RegExp("(?:(?:https?|ftp|file):\\/\\/|www\\.|ftp\\.)(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[A-Z0-9+&@#/%=~_|$])","gim")}},o=[],s=[];function l(e){var t=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"];return t.slice(0,e).map(function(e){return t[Math.random()*t.length|0]}).join("")}function d(e){var t;try{t=lpTag.HtmlSanitizerUtils.sanitizeAndCleanHtml(e)}catch(e){lpTag.unifiedWindow.log.error("_htmlSanitization",e);t=""}return t}function c(e){var t=document.createElement("textarea"),i=(t.innerHTML=e,t.value),t=(t.remove(),i.replace(/[^a-zA-Z0-9.\/:-]/gim,"")),i=-1===e.indexOf("://")&&-1===e.indexOf("www.");return e=-1<t.indexOf("javascript"+String.fromCharCode(58))||i?"":e}return{wrapStandaloneLinks:function(i,n){if(i&&n){var e=r.link.regexp,e=i.match(e),a=0<i.indexOf(""");a&&(i=i.replace(/\"/g,"temporaryQuotText"));if(null!==e){n.innerHTML="";var o=0;e.forEach(function(e){a&&(e=e.replace(/\"/g,"temporaryQuotText"));i=i.slice(o);o=i.indexOf(e);var t=d((i=i.replace(e," ")).slice(0,o));" "===i[o]&&">"===i[o+2]&&(i=i.slice(0,o)+i.slice(o+3));n.innerHTML+=t;e=c(e).trim();n.innerHTML+="<span style='font-weight:inherit;'><a target='_blank' rel='noopener 'href='"+e+"'>"+e+"</a></span>"});i=d(i=i.slice(o));n.innerHTML+=i;if(n.children)for(var t=0;t<n.children.length;t++){var s=n.children[t].firstChild;if(s&&s.href&&0<s.href.indexOf("temporaryQuotText")){s.href=s.href.replace(/temporaryQuotText/g,""");s.innerText=s.innerText.replace(/temporaryQuotText/g,""")}}}return n}return null},getMarkDownToTemp:function(){return o},setMarkDownToTemp:function(e){o=e},getAHREFToTemp:function(){return s},setAHREFToTemp:function(e){s=e},generateTempId:l,convertMarkdownToTempId:function(e){if(e){for(var t,i=r.markdownToHtml.regexp,n=e;null!==(t=i.exec(e));){var a=l(5);o.push({key:a,markdown:t[0]});n=n.replace(t[0]," "+a+" ")}e=n}return e},convertTempIdToMarkdown:function(t){t&&0<o.length&&o.forEach(function(e){t=t.replace(" "+e.key+" ",e.markdown)});return t},convertAHREFToTempId:function(e){if(e){for(var t,i=r.anchorTagRegex.regexp,n=e;null!==(t=i.exec(e));){var a=l(5);s.push({key:a,aHREF:t[0]});n=n.replace(t[0]," "+a+" ")}e=n}return e},convertTempIdToAHREF:function(i){i&&0<s.length&&s.forEach(function(e){var t=function(e){var t=new RegExp("href=\"(.*?)\"|href='(.*?)'","gim").exec(e);if(t&&t.length)for(var i=1;i<t.length;i+=1)if(t[i]){var n=c(t[i]);e=e.replace(t[i],n)}return e}(e.aHREF);i=i.replace(" "+e.key+" ",t)});return i},parseAllMarkdownFormat:function(e){if(e)for(var t=r.markdownToHtml.regexp;null!==(a=t.exec(e));){var i=a[0],n=a[2]||"",a=a[1]||"";n&&a&&0!==(o=n).indexOf("http://")&&0!==o.indexOf("https://")&&0!==o.indexOf("ftp://")&&0!==o.indexOf("tel"+String.fromCharCode(58))&&0!==o.indexOf("mailto"+String.fromCharCode(58))&&0!==o.indexOf("javascript"+String.fromCharCode(58))&&(o=n,n=a,a=o);n.includes("tel"+String.fromCharCode(58))||n.includes("mailto"+String.fromCharCode(58))||(n=c(n));e=e.replace(i,"<a href='"+n+"'>"+a+"</a>")}var o;return e},textContainsMarkDownSyntax:function(e){return e.match(r.markdownToHtml.regexp)},sanitizeTextFromHTML:d,textContainsAHREFSyntax:function(e){return e.match(r.anchorTagRegex.regexp)}}};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var l;lpTag.unifiedWindow.BaseViewController=window.liveperson.uiframework.latest.ViewController.extend({ControllerName:"BaseViewController",logger:lpTag.unifiedWindow.log,util:lpTag.taglets.lpUtil,uiPath:lpTag.unifiedWindow.uiModelPath,chatPath:lpTag.unifiedWindow.chatModelPath,EventName:lpTag.unifiedWindow.events,appConsts:lpTag.unifiedWindow.consts,VCEvents:lpTag.unifiedWindow.events.viewController,State:lpTag.unifiedWindow.State,prefixPlaceHolder:"{{PREFIX}}",customAnimationDurations:{},animationClasses:{bounce:"lpBounceClass",shakeX:"lpShakeXClass",shakeY:"lpShakeYClass"},LPReadNotificationsTypes:{none:{value:"none"},visual:{value:"visual",templates:{PENDING:"<svg class='lp-state-visual lp-pending-notification' viewBox='0 0 20 6' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><title>{{iconTitle}}</title><g stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' stroke-linecap='round'><g transform='translate(-100.000000, -828.000000)'><g transform='translate(101.000000, 829.000000)'><g id='icon_settings_hover'><g id='Group-5'><circle id='Path' stroke='#C8C8C8' cx='9' cy='2' r='2'></circle><circle id='Path' stroke='#C0C0C1' cx='2' cy='2' r='2'></circle><circle id='Path' stroke='#C0C0C1' cx='16' cy='2' r='2'></circle></g></g></g></g></g></svg>",SENT:"<svg class='lp-state-visual lp-sent-notification' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'><title>{{iconTitle}}</title><g fill='none'><g stroke='#C0C0C1'><g transform='translate(-421 -823)translate(421 824)'><polygon points='0 6.6 13.9 0 14 12.3 8.3 10.2 4.6 14 4.6 8.3' stroke-linejoin='round'/><path d='M13.3 1.2L7 8'/></g></g></g></svg>",ACCEPT:"<svg class='lp-state-visual lp-accept-notification' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 5'><title>{{iconTitle}}</title><g fill='none' stroke-linejoin='round'><g stroke='#C0C0C1'><polyline points='0 2.5 2.1 5 7 0'/></g></g></svg>",READ:"<svg class='lp-state-visual lp-read-notification' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 5'><title>{{iconTitle}}</title><g fill='none' stroke-linejoin='round'><g stroke='#6D6E70'><g transform='translate(-426 -829)translate(427 829)'><polyline points='0 2.5 2.1 5 7 0'/><path d='M5 5L10 0'/></g></g></g></svg>",ERROR:"<svg class='lp-state-visual lp-failed-notification' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><title>{{iconTitle}}</title><g fill='none'><g stroke='#FF0B29'><path d='M8.3 1.8C8.2 1.5 8 1.2 7.7 1.1 6.9 0.7 6 1 5.7 1.8L0.8 11.3C0.7 11.5 0.6 11.8 0.6 12 0.6 12.8 1.3 13.5 2.1 13.5L11.9 13.5C12.1 13.5 12.3 13.4 12.5 13.3 13.3 13 13.6 12.1 13.2 11.3L8.3 1.8Z'/><path d='M7 5.4L7 8.4'/><path d='M7 10.6L7 11.1'/></g></g></svg>",image_ERROR:"<svg class='lp-state-visual lp-failed-notification' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><title>{{iconTitle}}</title><g fill='none'><g stroke='#FF0B29'><path d='M8.3 1.8C8.2 1.5 8 1.2 7.7 1.1 6.9 0.7 6 1 5.7 1.8L0.8 11.3C0.7 11.5 0.6 11.8 0.6 12 0.6 12.8 1.3 13.5 2.1 13.5L11.9 13.5C12.1 13.5 12.3 13.4 12.5 13.3 13.3 13 13.6 12.1 13.2 11.3L8.3 1.8Z'/><path d='M7 5.4L7 8.4'/><path d='M7 10.6L7 11.1'/></g></g></svg>",image_RETRY:"<svg class='lp-state-visual lp-failed-notification' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><title>{{iconTitle}}</title><g fill='none'><g stroke='#FF0B29'><path d='M8.3 1.8C8.2 1.5 8 1.2 7.7 1.1 6.9 0.7 6 1 5.7 1.8L0.8 11.3C0.7 11.5 0.6 11.8 0.6 12 0.6 12.8 1.3 13.5 2.1 13.5L11.9 13.5C12.1 13.5 12.3 13.4 12.5 13.3 13.3 13 13.6 12.1 13.2 11.3L8.3 1.8Z'/><path d='M7 5.4L7 8.4'/><path d='M7 10.6L7 11.1'/></g></g></svg>"}},text:{value:"text"}},initialize:function(e){this.uiPath=lpTag.unifiedWindow.uiModelPath;this.chatPath=lpTag.unifiedWindow.chatModelPath;this.appContext=e.appContext;this.timeStampManager=e.appContext.timeStampManager;this.timeStampGroupingEnabled=this.timeStampManager.timeStampGroupingEnabled();l.enableStrictCspMode=!!(this.appContext&&this.appContext.conf&&this.appContext.conf.unifiedConf&&this.appContext.conf.unifiedConf.enableStrictCspMode);if(!l.animationCreated&&!l.enableStrictCspMode&&this.appContext.deviceDetector.isAnimationSupported()){l.animationPrefix=this.appContext.deviceDetector.getAnimationData().preFix;l.animationsSupported=!0;l.cssAnimation=document.createElement("style");l.cssAnimation.type="text/css";document.getElementsByTagName("head")[0].appendChild(l.cssAnimation);this.createDefaultAnimations()}},render:function(){l.enableStrictCspMode&&this.customize(this.view)}});(l=lpTag.unifiedWindow.BaseViewController.prototype).templateString=function(e,t){e=window.liveperson.uiframework.latest.ViewController.prototype.templateString.call(this,e,t);return e=l.enableStrictCspMode?function(e){"string"==typeof e&&(e=(e=e.replace(/(<[^>]+) style=".*?"/gi,"$1")).replace(/<[^>]+ style=".*?" \/>/gi,function(e){return e.replace(/ style=".*?"/gi,"")}));return e}(e):this.customize(e)};l.createDefaultAnimations=function(){if(!l.animationCreated){this.createKeyframe(this.animationClasses.bounce,[{percent:0,animate:this.prefixPlaceHolder+"transform: scale(1, 1);"},{percent:40,animate:this.prefixPlaceHolder+"transform: scale(1.15, 1.1);"},{percent:100,animate:this.prefixPlaceHolder+"transform: scale(1, 1);"}],500);this.createKeyframe(this.animationClasses.shakeX,[{percent:0,animate:this.prefixPlaceHolder+"transform: translateX(0px);"},{percent:20,animate:this.prefixPlaceHolder+"transform: translateX(-15px);"},{percent:40,animate:this.prefixPlaceHolder+"transform: translateX(15px); "},{percent:60,animate:this.prefixPlaceHolder+"transform: translateX(-10px);"},{percent:80,animate:this.prefixPlaceHolder+"transform: translateX(10px);"},{percent:100,animate:this.prefixPlaceHolder+"transform: translateX(0px);"}],400);this.createKeyframe(this.animationClasses.shakeY,[{percent:0,animate:this.prefixPlaceHolder+"transform: translateY(0px);"},{percent:20,animate:this.prefixPlaceHolder+"transform: translateY(-15px);"},{percent:40,animate:this.prefixPlaceHolder+"transform: translateY(15px); "},{percent:60,animate:this.prefixPlaceHolder+"transform: translateY(-10px);"},{percent:80,animate:this.prefixPlaceHolder+"transform: translateY(10px);"},{percent:100,animate:this.prefixPlaceHolder+"transform: translateY(0px);"}],400);l.animationCreated=!0}};l.createKeyframe=function(e,t,i){if(l.cssAnimation){for(var n="."+e+" {"+l.animationPrefix+"animation: lpanim_"+e+" "+i/1e3+"s 0s 1 ease-in-out;}@"+l.animationPrefix+"keyframes lpanim_"+e+" {",a=0;a<t.length;a++)n+=t[a].percent+"% {"+t[a].animate+"}";n+="}";var o=new RegExp(this.prefixPlaceHolder,"g"),n=n.replace(o,this.animationPrefix);l.customAnimationDurations[e]=i;this.cssAnimation.appendChild(document.createTextNode(n))}};l.bounce=function(e,t){this.animateKeyframe({view:e,classname:this.animationClasses.bounce,callback:t,showAnimation:!0})};l.shakeX=function(e,t){this.animateKeyframe({view:e,classname:this.animationClasses.shakeX,callback:t,showAnimation:!0})};l.shakeY=function(e,t){this.animateKeyframe({view:e,classname:this.animationClasses.shakeY,callback:t,showAnimation:!0})};l.animateKeyframe=function(e){var t=e.classname,i=e.callback,n=e.showBefore,a=e.hideAfter,o=e.view,e=e.showAnimation,s=l.customAnimationDurations[t];"number"!=typeof s&&(s=0);"string"==typeof o&&(o=this.getFirstElement(o));if(e&&this.animationsSupported&&o&&!this.animationInProgress&&this.animationCreated){this.animationInProgress=!0;var r=this;this.addClass(o,t);n&&this.show(o);setTimeout(function(){r.animationInProgress=!1;r.removeClass(o,t);a&&r.hide(o);i&&"function"==typeof i&&i.call(r)},s)}else{a?this.hide(o):n&&this.show(o);i&&"function"==typeof i&&i.call(this)}};l.focusOnElement=function(e,t){t=t||this.view,e=this.getFirstElement(e,t);e&&1===e.nodeType&&e.focus()};l.getFocusableHeaderButton=function(e,t){t=t||!1;e=Array.prototype.filter.call(e.querySelectorAll('button:not(:disabled), input:not(:disabled), [href], select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])'),function(e){var t=window.getComputedStyle(e);return"none"!==t.display&&"none"!==e.parentNode.style.display&&"hidden"!==t.visibility&&"hidden"!==e.parentNode.style.visibility&&"0"!==t.opacity&&"0"!==e.parentNode.style.opacity&&!e.classList.contains("lp_maximize")});return t?0<e.length?e[e.length-1]:null:0<e.length?e[0]:null};l.isFocusInsideApp=function(){var e=document.activeElement,t=this.appContext.wrapperWindow.getChatWrapperElement();return!!(!e||t&&t.contains(e)||e===document.body||function(e,t){for(var i=e.getElementsByClass(document.body,e.appConsts.engagementContainerClass,[]),n=0;n<i.length;n++)if(function(e,t){return t===e||e.contains(t)}(i[n],t))return 1;return}(this,e)||(t=this,document.body.className===t.appConsts.reCaptchaContainerClass))};l.getLineStateText=function(e,t){var i;switch(e){case this.LPReadNotificationsTypes.none.value:i=void 0;break;case this.LPReadNotificationsTypes.visual.value:i=(i=this.createView({template:this.LPReadNotificationsTypes[e].templates[t.state],wrapWithDiv:!1,target:"#lp_line_"+t.localId+" .lp_line_state",doNotAddChild:!0,textInjection:{iconTitle:this.translate("messagingState_"+t.state)}}))&&i.outerHTML?i.outerHTML:i instanceof SVGElement?(new XMLSerializer).serializeToString(i):this.translate("messagingState_"+t.state);break;default:i=this.translate("messagingState_"+t.state)}return i};l.getMonthNames=function(){return[this.translate("monthJanuary"),this.translate("monthFebruary"),this.translate("monthMarch"),this.translate("monthApril"),this.translate("monthMay"),this.translate("monthJune"),this.translate("monthJuly"),this.translate("monthAugust"),this.translate("monthSeptember"),this.translate("monthOctober"),this.translate("monthNovember"),this.translate("monthDecember")]};l.getMonthFullNames=function(){return[this.translate("monthFullJanuary"),this.translate("monthFullFebruary"),this.translate("monthFullMarch"),this.translate("monthFullApril"),this.translate("monthFullMay"),this.translate("monthFullJune"),this.translate("monthFullJuly"),this.translate("monthFullAugust"),this.translate("monthFullSeptember"),this.translate("monthFullOctober"),this.translate("monthFullNovember"),this.translate("monthFullDecember")]}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e,a=/({{\w+)(?![{])}}/gi;lpTag.unifiedWindow.Translator=function(e){!function(){this.dictionary=lpTag.unifiedWindow.language;this.dictionary.setLocale(e)}.call(this,e)};(e=lpTag.unifiedWindow.Translator.prototype).extendDictionary=function(e,t){(t=t||{}).locale=t.locale||"en-US";this.dictionary.add(e,t)};e.translate=function(e,t){e=this.dictionary.getString(e);return e=t?e:function(e){if(e)for(var t,i=function(e){var t=[],i="string"==typeof e&&e.match(a);if(i)for(var n=0;n<i.length;n++)"string"==typeof i[n]&&t.push(i[n].substring(2,i[n].length-2));return t}(e),n=0;n<i.length;n++){t=this.translate(i[n])||"";e=e.replace("{{"+i[n]+"}}",t)}return e}.call(this,e)};e.getLocaleConfig=function(e){var t=this.dictionary.getLocaleConfig();return t&&t[e]}}();window.lpTag=window.lpTag||{};lpTag.taglets=lpTag.taglets||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.applicationUtils=lpTag.unifiedWindow.applicationUtils||function(){var a="ApplicationUtils";function s(e,t){if("function"==typeof[].indexOf&&"function"==typeof e.indexOf)return e.indexOf(t);if(e.constructor===Array)for(var i=0;i<e.length;i++)if(e[i]===t)return i;return-1}function o(e){return"string"!=typeof e?e:e.trim?e.trim():e.replace(/^\s+|\s+$/gm,"")}function l(e,t){var e=new RegExp(/((?:http|ftp|ws){1}s{0,1}?:\/\/){0,1}([^\/\?/:]+)(\/?)/gi).exec(e),i=null;if(e&&3<=e.length&&""!==e[2]){i=e[2].toLowerCase();t&&(i=e[1]+i)}return i}var d={customTopLevelDomain:{aero:"aero",asia:"asia",bike:"bike",biz:"biz",camera:"camera",cat:"cat",clothing:"clothing",coop:"coop",equipment:"equipment",estate:"estate",eus:"eus",gallery:"gallery",graphics:"graphics",guru:"guru",info:"info",int:"int",holdings:"holdings",jobs:"jobs",lighting:"lighting",mobi:"mobi",museum:"museum",name:"name",photography:"photography",plumbing:"plumbing",post:"post",pro:"pro",singles:"singles",tel:"tel",travel:"travel",ventures:"ventures",xxx:"xxx"},topLevelDomain:{ac:"ac",co:"co",com:"com",edu:"edu",gov:"gov",mil:"mil",net:"net",org:"org"},countryTopLevelDomain:{ac:"ac",ad:"ad",ae:"ae",af:"af",ag:"ag",ai:"ai",al:"al",am:"am",an:"an",ao:"ao",aq:"aq",ar:"ar",as:"as",at:"at",au:"au",aw:"aw",ax:"ax",az:"az",ba:"ba",bb:"bb",bd:"bd",be:"be",bf:"bf",bg:"bg",bh:"bh",bi:"bi",bj:"bj",bm:"bm",bn:"bn",bo:"bo",bq:"bq",br:"br",bs:"bs",bt:"bt",bv:"bv",bw:"bw",by:"by",bz:"bz",bzh:"bzh",ca:"ca",cc:"cc",cd:"cd",cf:"cf",cg:"cg",ch:"ch",ci:"ci",ck:"ck",cl:"cl",cm:"cm",cn:"cn",co:"co",cr:"cr",cs:"cs",cu:"cu",cv:"cv",cw:"cw",cx:"cx",cy:"cy",cz:"cz",dd:"dd",de:"de",dj:"dj",dk:"dk",dm:"dm",do:"do",dz:"dz",ec:"ec",ee:"ee",eg:"eg",eh:"eh",er:"er",es:"es",et:"et",eu:"eu",fi:"fi",fj:"fj",fk:"fk",fm:"fm",fo:"fo",fr:"fr",ga:"ga",gb:"gb",gd:"gd",ge:"ge",gf:"gf",gg:"gg",gh:"gh",gi:"gi",gl:"gl",gm:"gm",gn:"gn",gp:"gp",gq:"gq",gr:"gr",gs:"gs",gt:"gt",gu:"gu",gw:"gw",gy:"gy",hk:"hk",hm:"hm",hn:"hn",hr:"hr",ht:"ht",hu:"hu",id:"id",ie:"ie",il:"il",im:"im",in:"in",io:"io",iq:"iq",ir:"ir",is:"is",it:"it",je:"je",jm:"jm",jo:"jo",jp:"jp",ke:"ke",kg:"kg",kh:"kh",ki:"ki",km:"km",kn:"kn",kp:"kp",kr:"kr","krd:":"krd",kw:"kw",ky:"ky",kz:"kz",la:"la",lb:"lb",lc:"lc",li:"li",lk:"lk",lr:"lr",ls:"ls",lt:"lt",lu:"lu",lv:"lv",ly:"ly",ma:"ma",mc:"mc",md:"md",me:"me",mg:"mg",mh:"mh",mk:"mk",ml:"ml",mm:"mm",mn:"mn",mo:"mo",mp:"mp",mq:"mq",mr:"mr",ms:"ms",mt:"mt",mu:"mu",mv:"mv",mw:"mw",mx:"mx",my:"my",mz:"mz",na:"na",nc:"nc",ne:"ne",nf:"nf",ng:"ng",ni:"ni",nl:"nl",no:"no",np:"np",nr:"nr",nu:"nu",nz:"nz",om:"om",pa:"pa",pe:"pe",pf:"pf",pg:"pg",ph:"ph",pk:"pk",pl:"pl",pm:"pm",pn:"pn",pr:"pr",ps:"ps",pt:"pt",pw:"pw",py:"py",qa:"qa",re:"re",ro:"ro",rs:"rs",ru:"ru",rw:"rw",sa:"sa",sb:"sb",sc:"sc",sd:"sd",se:"se",sg:"sg",sh:"sh",si:"si",sj:"sj",sk:"sk",sl:"sl",sm:"sm",sn:"sn",so:"so",sr:"sr",ss:"ss",st:"st",su:"su",sv:"sv",sx:"sx",sy:"sy",sz:"sz",tc:"tc",td:"td",tf:"tf",tg:"tg",th:"th",tj:"tj",tk:"tk",tl:"tl",tm:"tm",tn:"tn",to:"to",tp:"tp",tr:"tr",tt:"tt",tv:"tv",tw:"tw",tz:"tz",ua:"ua",ug:"ug",uk:"uk",us:"us",uy:"uy",uz:"uz",va:"va",vc:"vc",ve:"ve",vg:"vg",vi:"vi",vn:"vn",vu:"vu",wf:"wf",ws:"ws",ye:"ye",yt:"yt",yu:"yu",za:"za",zm:"zm",zr:"zr"}};function r(e){try{return JSON.parse(c(e))}catch(e){lpTag.log("unable to clone object:"+JSON.stringify(e),"ERROR",a)}}function c(e){var t,i;if("function"==typeof Array.prototype.toJSON){i=Array.prototype.toJSON;delete Array.prototype.toJSON;try{t=JSON.stringify(e)}catch(e){Array.prototype.toJSON=i;throw e}Array.prototype.toJSON=i}else t=JSON.stringify(e);return t}function u(e,t){t=t||window;if("function"==typeof e){var i=Array.prototype.slice.call(arguments,2);try{return e.apply(t,i)}catch(e){lpTag.log("Failed to execute callback exc= "+e.message,"ERROR",a)}}}function p(e,t){return-1<e.className.indexOf(t)}function h(e){return void 0!==e&&e.constructor===Array}function f(e,t){var i=null===e&&null===t,n=e===t,a=typeof e==typeof t,o=a&&void 0===e,s=a&&"function"==typeof e&&""+e==""+t,a=a&&"object"==typeof e&&null!==e&&null!==t&&Object.keys(e).length===Object.keys(t).length;return i||o||n||s||a&&function(e,t){var i,n=!0;for(i in e)if(!(n=e.hasOwnProperty(i)&&t.hasOwnProperty(i)?"object"==typeof e[i]&&null!==e[i]&&e[i].constructor===Array?c(e[i])===c(t[i]):f(e[i],t[i]):n))break;return n}(e,t)}function g(e,t,i){var n=e;if("string"==typeof t)for(var a=t.split("."),o=0;o<a.length;o++){if(null==n||void 0===n[a[o]]||null===n[a[o]]){n=void 0!==i?i:void 0;break}n=n[a[o]]}else lpTag.log("Empty path sent to lookup getPropertyFromObject","DEBUG","utils");return n}return{indexOf:s,trim:o,trimAndLower:function(e){return"string"!=typeof e?e:o(e).toLowerCase()},injectTextObj:function(e,t){return e=function(e,t,i,n){var a,o,s=-1,r=i,l=e.length,d=t.length,c=r.indexOf(e);for(;-1<c;){c+=l;if(-1<(s=r.substring(c).indexOf(t))){a=r.substring(c,c+s);o=n&&n[a];void 0!==(o=n&&void 0!==n[a]?n[a]:o)&&(i=i.replace(e+a+t,o));r=r.substring(c+s+d)}else r=r.substring(c+d);c=r.indexOf(e)}return i}("{{","}}",e,t)},getDomain:l,getURLParams:function(e){var t,i={};if("string"==typeof e)for(var n=e.substr(1).split("&"),a=0;a<n.length;a++)-0<n[a].indexOf("=")&&2==(t=n[a].split("=")).length&&(i[decodeURIComponent(t[0])]=decodeURIComponent(t[1]));return i},getParentDomain:function(e){var t,i=null,n={top:null,country:null};if((t=(e=l(e=""+e)).split(".")).length<3)return e;for(var a=t.length-1;-1<a;a--){r=s=o=void 0;var o=t[a],s=n,r=a;o=""+o;null===s.top&&(d.topLevelDomain[o]||d.customTopLevelDomain[o])?s.top=r:null===s.country&&d.countryTopLevelDomain[o]&&(s.country=r);if(null!==n.country&&null!==n.top)break}return null!==n.top||null!==n.country?t.slice(0<(i=null===(i=n.top)||null!==n.country&&n.country<i&&i-1===n.country?n.country:i)?i-1:i).join("."):e},cloneExtend:function e(t,i,n){var a,o;if(!t||"object"!=typeof t)return t;if(!i)return r(t);a=i||t.constructor()||{};for(o in t)a[o]!==t[o]&&t.hasOwnProperty(o)&&(a[o]=n?e(t[o],void 0,n):t[o]);return a},clone:r,convertConfig:function(e,t){if(void 0===t)lpTag.log("_config is passed as undefined","ERROR",a);else if(e)for(var i=0;i<e.length;i++){var n=e[i].value;if("string"==typeof n&&""!==n)if("true"===n)n=!0;else if("false"===n)n=!1;else if("["==n.charAt(0)||"{"==n.charAt(0))try{n=JSON.parse(n)}catch(e){lpTag.log("unable to parse JSON:"+JSON.stringify(e),"ERROR",a)}t[e[i].id]=n}},addStyleTag:function(e,t){if(e&&"string"==typeof e){var i,n=(t=t||{}).document||window.document,t=t.id;void 0!==t?(i=n.getElementById(t)||n.createElement("style")).id=t:i=n.createElement("style");i.type="text/css";n.getElementsByTagName("head")[0].appendChild(i);i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e));return i}},objectKeys:function(e){var t,i={};for(t in e)e.hasOwnProperty(t)&&(i[t]=t);return i},waitForBody:function(t,e){var i=(e=e||{}).context,n=e.document||window.document;!function e(){n.body?u(t,i):setTimeout(e,50)}()},stringify:c,cookieActions:{delimiter:"|",set:function(e,t,i){if("string"==typeof e&&t.join&&"function"==typeof t.join){e=encodeURIComponent(e)+"="+encodeURIComponent(t.join(this.delimiter))+";path=/";void 0!==i&&(e+=";domain="+i);document.cookie=e;return!0}},get:function(e){if("string"==typeof e){e=document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1")||null;if("string"==typeof e){e=decodeURIComponent(e);if(e)return e.split(this.delimiter)}}},remove:function(e,t){if("string"==typeof e)return this.set(e,["null"],t),!0}},getUID:function(){var e,t="";if(crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();if(crypto&&"function"==typeof crypto.getRandomValues){e=new Uint8Array(32);crypto.getRandomValues(e);for(var i=0;i<e.length;i++)t+=e[i].toString(16);return t.substring(0,8)+"-"+t.substring(8,12)+"-"+t.substring(12,16)+"-"+t.substring(16,20)+"-"+t.substring(20,32)}return"tttttttt-tttt-4ttt-fttt-t7ttttttttttt".replace(/[tf]/g,function(e){var t=16*Math.random()|0;return("t"==e?t:3&t|8).toString(16)})+"-"+Math.floor(1e5*Math.random())},runCallback:u,runCallbackByObject:function(e,t,i){e=e||{};var n=g(window,e.jsContext),a=g(window,e.jsMethodName);if("function"!=typeof a){lpTag.log("runCallbackByObject err=function "+e.jsMethodName+" was not found","ERROR","utils");i()}else{lpTag.log("runCallbackByObject calling function "+e.jsMethodName,"DEBUG","utils");a.call(n,t)}},registerEvent:function(e,t,i){e&&t&&i&&(e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent("on"+t,i))},unregisterEvent:function(e,t,i){e&&t&&i&&(e.removeEventListener?e.removeEventListener(t,i,!1):e.detachEvent("on"+t,i))},buildClassString:function(e,t,i){var n=(e="string"==typeof e?e:"").split(" "),a=t&&t.constructor===Array?t:"string"==typeof t?[t]:[];i=i&&i.constructor===Array?i:"string"==typeof i?[i]:[];for(var o=0;o<n.length;o++)s(i,n[o])<0&&s(a,n[o])<0&&a.push(n[o]);return a.join(" ").replace(/$\s/gi,"")},isEmpty:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},isDomNode:function(e){return"object"==typeof e&&1===e.nodeType},isNodeList:function(e){return void 0!==e.length&&void 0!==e.item},hasClass:p,groupByKeyValue:function(e,i){var n={};e.forEach(function(e){var t=e[i];n[t]=n[t]||[];n[t].push(e)});return n},arrayUniqueByKey:function(e,t){for(var i=e.concat(),n=0;n<i.length;++n)for(var a=n+1;a<i.length;++a)void 0!==i[n][t]&&i[n][t]===i[a][t]&&i.splice(a--,1);return i},isArray:h,sortByKeyValue:function(e,i){var t=e;return t=Array.isArray(e)?e.sort(function(e,t){return!e[i]||e[i]<t[i]?-1:!t[i]||e[i]>t[i]?1:0}):t},cloneObj:function(e){return JSON.parse(JSON.stringify(e))},isEmptyLiteral:function(e){for(var t in e)return!1;return!0},isSameObject:f,addClassByArray:function e(t,i){if(h(i))for(var n=0;n<i.length;n++)e(t,i[n]);else if(!p(t,i)){var a=t.className?[t.className]:[];a.push(i);t.className=a.join(" ")}},objectKeysAsArray:function(e){var t,i=[];for(t in e=e||{})i.push(t);return i},removeClassByArray:function e(t,i){if(h(i))for(var n=0;n<i.length;n++)e(t,i[n]);else{t.className=t.className.replace(new RegExp(i,"g"),"");t.className=o(t.className.replace(/\s\s*/g," "))}},getWindowSize:function(){var e=document.documentElement,t=document.getElementsByTagName("body")[0];return{width:e.clientWidth||t.clientWidth||window.innerWidth,height:window.outerHeight||e.clientHeight||t.clientHeight}},getPropertyFromObject:g,excludeAttributes:function(e,i){e&&(Array.isArray(e)?e.forEach(function(e){e&&t(e)}):"object"==typeof e&&t(e));return e;function t(t){Array.isArray(i)&&i.forEach(function(e){"string"==typeof e&&0<e.length&&delete t[e]})}},escapeHtml:function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};if(e)return e.replace(/[&<>"'`=/]/g,function(e){return t[e]})},createDateFromString:function(e){var t=new Date(e);if(isNaN(t)){t=new Date,e=e.match(/(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)([.])(\d+)([+-])(\d+):(\d+)/);if(e&&12==e.length){t.setUTCFullYear(parseInt(e[1],10));t.setUTCMonth(parseInt(e[2],10)-1);t.setUTCDate(parseInt(e[3],10));t.setUTCHours(parseInt(e[4],10)-parseInt(e[9]+"1",10)*parseInt(e[10],10));t.setUTCMinutes(parseInt(e[5],10)-parseInt(e[9]+"1",10)*parseInt(e[11],10));t.setUTCSeconds(parseInt(e[6],10))}0}return t},formatDay:function(e,t,i,n,a,o){var s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=["Sun","Mon","Tues","Wed","Thurs","Fri","Sat"];if(t)for(var l=0,d=s.length;l<d;l++)t[l]=t[l]||s[l];else t=s;if(i)for(var c=0,u=r.length;c<u;c++)i[c]=i[c]||r[c];else i=r;if(!e)return"";var p=(e="Date"!==e.constructor?this.createDateFromString(e):e).getMonth(),h=e.getDate(),f=e.getDay(),e=e.getFullYear();if(o&&null!==o&&"object"==typeof o){var g="";o.weekDay&&(g+=i[f]+", ");g+=t[p]+("string"==typeof n?n:" ")+h+("string"==typeof a?a:"");o.year&&(g+=" "+e);return g}return t[p]+("string"==typeof n?n:" ")+h+("string"==typeof a?a:"")},getDay:function(e,t,i,n,a,o){return(e=e&&this.formatDay(e,t,i,n,a,o))||this.formatDay(new Date,t,i,n,a)},formatTime:function(e,t,i,n,a,o,s){var r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];if(i)for(var l=0,d=r.length;l<d;l++)i[l]=i[l]||r[l];else i=r;if(!e)return"";var c=":",u=(e="Date"!==e.constructor?this.createDateFromString(e):e).getMonth(),p=e.getDate(),h=e.getMinutes();c=c+(h<10?"0":"")+h;t&&(c=c+((h=e.getSeconds())<10?":0":":")+h);if(o&&null!==o&&"object"==typeof o)return"en-US"===o.lang?(h=12<=(t=e.getHours())?"PM":"AM",(t=(t%=12)||12)+c+" "+h):e.getHours()+c;var f=e.getHours()+c,g=i[u]+("string"==typeof n?n:" "),m=p+("string"==typeof a?a:"");switch(s){case"tdm":return f+", "+m+" "+g;case"mdt":return g+m+", "+f;default:return f+", "+g+m}},getTime:function(e,t,i,n,a,o){return(e=e&&this.formatTime(e,!1,t,i,n,a,o))||this.formatTime(new Date,!0,t,i,n,null,o)}}}();window.lpTag=window.lpTag||{};!function(){var i,n;this.JsonPollock=(i=[function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=["vertical","horizontal","carousel"];t.default={styleToCss:function(e){var t="";return e&&(e.color&&(t+="color:"+e.color+";"),e["background-color"]&&(t+="background-color:"+e["background-color"]+";"),e.bold&&(t+="font-weight:bold;"),e.italic&&(t+="font-style:italic;"),e.size&&(t+="font-size:"+this.sizeToPx(e.size)+"px;"),e.fill)&&(t+="fill:"+e.fill+";"),t},styleToBorder:function(e){var t="";return e&&(e["border-color"]&&(t+="border-color: "+e["border-color"]+";"),e["border-radius"])&&(t+="border-radius: "+e["border-radius"]+"px;"),t},styleToButton:function(e){var t="";return e&&e.size&&(t+="width: "+this.buttonSizeToPx(e.size)+"px; height: "+this.buttonSizeToPx(e.size)+"px;"),t},extractFromStyles:function(e,t){var t=e.indexOf(t),i="";return-1<t&&(i=e.substr(t,e.indexOf(";",t)-(t-1)),e=e.replace(i,"")),{extractedStyle:i,style:e}},sizeToPx:function(e){switch(e){case"small":return 11;case"medium":return 13;case"large":return 17;default:return 13}},buttonSizeToPx:function(e){switch(e){case"small":return 27;case"medium":return 36;case"large":return 45;default:return 36}},validateParameters:function(t){if(!t.type)throw new Error("Missing configuration: type");for(var e=arguments.length,i=Array(1<e?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];i.forEach(function(e){if(void 0===t[e])throw new Error("Missing configuration: "+e+" is a mandatory for element of type "+t.type)})},isString:function(e){return e instanceof String||"string"==typeof e},isObject:function(e){return null!==e&&"object"===(void 0===e?"undefined":n(e))},isLayout:function(e){return 0<=a.indexOf(e)},normalizeHtmlText:function(e){var t=e;return t=e?e.replace(/(?:\r\n|\r|\n)/g,"<br/>"):t},escapeHtml:function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return e.replace(/[&<>"'`=/]/g,function(e){return t[e]})},htmlToElement:function(e){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild},hasClass:function(e,t){return e.classList&&e.classList.contains?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},addClass:function(e,t){e.classList?e.classList.add(t):this.hasClass(e,t)||(e.className+=" "+t)},removeClass:function(e,t){if(e.classList)e.classList.remove(t);else if(this.hasClass(e,t)){t=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(t," ")}},generateRandomId:function(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)},appendAttributesFromObject:function(t,i){Object.keys(i).forEach(function(e){t.setAttribute(e,i[e])})}}},function(e,i,t){var n,a;!function(e){"use strict";n=function(){return function(n,e,t){"use strict";function i(e,t,i){var n=[];if(e[t]&&e[t].length)for(var a=0;a<e[t].length;a++)i&&"*"!==e[t][a].appName&&e[t][a].appName!==i||n.push(e[t][a]);if(e["*"])for(var o=0;o<e["*"].length;o++)i&&"*"!==e["*"][o].appName&&e["*"][o].appName!==i||n.push(e["*"][o]);return n}function u(e,t,i){n&&"function"==typeof n.log&&n.log(e,t,i)}function a(e){var t,i=e.unbindObj[e.attrName],n=!1;if(!e.unbindObj)return u("CMD listen id not spec for unbind","ERROR",e.loggerName),null;if("string"==typeof e.unbindObj)return l(e.lstnrs,e.unbindObj);if(!e.unbindObj.func&&!e.unbindObj.context&&!e.unbindObj.appName)return!1;var a=e.lstnrs;i&&(a={},a[i]=e.lstnrs[i]);for(var o in a)a.hasOwnProperty(o)&&a[o]&&a[o].length&&(t=d(a[o],e.unbindObj.func,e.unbindObj.context,e.unbindObj.appName),t.length!==a[o].length&&(e.lstnrs[o]=t,n=!0));return n}function o(e){var t={};if(e.constructor===Object)for(var i in e)e.hasOwnProperty(i)&&null!==e[i]&&void 0!==e[i]&&("object"==typeof e[i]&&e[i].constructor!==Array?t[i]=o(e[i]):e[i].constructor===Array?t[i]=e[i].slice(0)||[]:"function"!=typeof e[i]&&(t[i]=null!==e[i]&&void 0!==e[i]?e[i]:""));else e.constructor===Array?t=e.slice(0)||[]:"function"!=typeof e&&(t=e);return t}function s(e,t,i){if((void 0===i||"*"===i)&&"*"===t)return e;for(var n=[],a=0;a<e.length;a++)e[a].eventName!==i&&"*"!==i||(t&&t===e[a].appName||!e[a].appName||"*"===e[a].appName||"*"===t)&&n.push(e[a]);return n}function r(e){if(0===e.eventBufferLimit||e.triggerData.data&&e.triggerData.data.doNotStore)e=null;else{var t={eventName:e.triggerData[e.attrName],appName:e.triggerData.appName};t.data=e.triggerData.passDataByRef?e.triggerData.data:o(e.triggerData.data),e.eventBufferLimit>0?(e.index>=e.eventBufferLimit&&(e.index=0),e.fired[e.index]=t,e.index++):e.fired.push(t),e=null}}function l(e,t){var i=!1;if(!t)return u("Ev listen id not spec for unregister","ERROR","Events"),null;for(var n in e)if(e.hasOwnProperty(n))for(var a=0;a<e[n].length;a++)if(e[n][a].id==t){e[n].splice(a,1),u("Ev listen="+t+" and name="+n+" unregister","DEBUG","Events"),i=!0;break}return i||u("Ev listen not found "+t+" unregister","DEBUG","Events"),i}function d(e,t,i,n){var a=[];if(e&&e.length)for(var o=0;o<e.length;o++)try{var s=!i&&e[o].func===t,r=!t&&i&&e[o].context===i,l=t&&i&&e[o].func===t&&e[o].context===i,d=n&&n===e[o].appName,c="*"===e[o].appName;if(s||r||l){if(d||c)continue;if(r)continue}else if(!t&&!i&&d)continue;a.push(e[o])}catch(e){u("Error in unbind e="+e.message,"ERROR","Events")}return a}var c={getListeners:i,log:u,unbind:a,hasFired:s,cloneEventData:o,storeEventData:r};return t||(e.EventsUtil=e.EventsUtil||c),c}(e,e,!0)}.apply(i,[])}("undefined"==typeof ChronosRoot?this:ChronosRoot),function(t){"use strict";void 0!==(a=function(e){return function(e,w,t){"use strict";function i(e){function t(e){return e?(e.triggerOnce=!0,c(e)):null}function c(e,t,i){var n=e;if("string"==typeof e&&(n={appName:e,eventName:t,func:i}),n.appName=n.appName||h,"*"!==h&&("string"!=typeof e||"function"!=typeof t&&void 0!==t||(n.eventName=e)),!n.eventName||!n.func||"function"!=typeof n.func&&n.func.constructor!==Array)return w.log("Ev listen has invalid params: evName=["+n.eventName+"]","ERROR","Events"),null;if(n.func.constructor===Array){for(var a,o,s=[],r=0;r<n.func.length;r++)a=w.cloneEventData(n),a.func=n.func[r],o=c(a),s.push(o);return s}var l=m+f++,d={id:l,func:n.func,context:n.context||null,aSync:!!n.aSync,appName:n.appName,triggerOnce:n.triggerOnce||!1};return g[n.eventName]=g[n.eventName]||[],g[n.eventName].push(d),w.log("Ev listen rgstr: evName=["+n.eventName+"] aSync="+d.aSync+" appName="+d.name,"DEBUG","Events"),n=null,e=null,l}function n(e){return"*"!==h&&(e.appName=e.appName||h),w.unbind({unbindObj:e,attrName:r,loggerName:s,lstnrs:g})}function i(e,t){return void 0===t&&(t=e,e=h),w.hasFired(l,e,t)}function a(e,t,i){var n=e;if("string"==typeof e&&(n={eventName:t,appName:e,data:i}),"*"!==h&&(n.appName=n.appName||h,"string"!=typeof e||"object"!=typeof t&&void 0!==t||(n.eventName=e)),!n||void 0===n.eventName)return w.log("Ev name not spec for publish","ERROR","Events"),n=null,null;n.passDataByRef=n.passDataByRef||!p,u(n);var a=w.getListeners(g,n.eventName,n.appName);if(a.length>0)for(var o=0;o<a.length;o++){var s=n.passDataByRef?n.data:w.cloneEventData(n.data),r={appName:n.appName,eventName:n.eventName},l=a[o];l.aSync||s&&s.aSync?setTimeout(d(l,s,r),0):d(l,s,r)()}return n=null,a.length>0}function d(t,e,i){return function(){try{t.func.call(t.context,e,i),e=null,t.triggerOnce&&n(t),t=null}catch(e){w.log("Error executing "+i.eventName+" eventId: "+t.id+"e="+e.message,"ERROR","Events")}}}function u(e){w.storeEventData({triggerData:e,eventBufferLimit:o,attrName:r,fired:l,index:v})}var p,o,h,s="Events",r="eventName",f=0,g={},l=[],m="evId_",v=0;h=e&&e.appName||"*",p=!(!e||"boolean"!=typeof e.cloneEventData)&&e.cloneEventData,o=e&&!isNaN(e.eventBufferLimit)?e.eventBufferLimit:-1,this.once=t,this.hasFired=i,this.trigger=a,this.publish=a,this.bind=c,this.register=c,this.unbind=n,this.unregister=n}return t||(e.Events=e.Events||i),i}(t,e,!0)}.apply(i,[n]))&&(e.exports=a)}("undefined"==typeof ChronosRoot?this:ChronosRoot)},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t,i){return t&&u(e.prototype,t),i&&u(e,i),e},s=n(i(4)),r=n(i(0)),l=i(1),d=function(e){function i(e,t){a(this,i);e=function(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return e.errors=t,e}var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);return i}(Error),i=(o(c,[{key:"init",value:function(e){e&&(Object.prototype.hasOwnProperty.call(e,"maxAllowedElements")&&(!isNaN(e.maxAllowedElements)&&0<e.maxAllowedElements?this.maxAllowedElements=e.maxAllowedElements:this.maxAllowedElements=50),"function"==typeof e.onAfterElementRendered)&&(this.onAfterElementRendered=e.onAfterElementRendered)}},{key:"renderElement",value:function(e,t){var i=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;if(!(n>=this.maxAllowedElements)){var a=n,n=this.provider.get(e.type),o=void 0;n&&(o=n(e),o=this.onAfterElementRendered?this.onAfterElementRendered(o,e):o)&&(t.appendChild(o),Array.isArray(e.elements)&&e.elements.forEach(function(e){a+=1,i.renderElement(e,o,a)}),o.afterRender)&&o.afterRender.call(o,e,t)}}},{key:"render",value:function(e){var e=r.default.isString(e)?JSON.parse(e):e,t=(this.validate(e),document.createDocumentFragment()),i=document.createElement("div");return i.className="lp-json-pollock",r.default.isLayout(e.type)||(i.className+=" lp-json-pollock-single-element"),t.appendChild(i),this.renderElement(e,i),t}},{key:"validate",value:function(e){if(!r.default.isObject(e))throw new d("JsonPollock::validte - input is not an object");if(this.schemaValidator){e=this.schemaValidator.validate(e);if(!e.valid)throw new d("Schema validation error, see 'errors' for more details",e.errors)}}},{key:"registerAction",value:function(e,t){this.events.bind({eventName:e,func:function(e){t(e)}})}},{key:"unregisterAction",value:function(e){this.events.unbind({eventName:e})}},{key:"unregisterAllActions",value:function(){this.events.unbind({})}},{key:"registerElement",value:function(e,t){this.provider.set(e,t)}}]),c);function c(e){a(this,c),this.events=new l({cloneEventData:!0,appName:"json-pollock"}),this.provider=new s.default(this.events),this.maxAllowedElements=50,this.schemaValidator=e}function u(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}i.TEMPLATE_TYPES=s.default.TYPES,t.default=i},function(e,t){},function(e,t,i){"use strict";function l(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i,n=arguments[t];for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},n=function(e,t,i){return t&&c(e.prototype,t),i&&c(e,i),e},a=i(0),w=a&&a.__esModule?a:{default:a},o=(i(1),{TEXT:"text",BUTTON:"button",IMAGE:"image",MAP:"map",VERTICAL:"vertical",HORIZONTAL:"horizontal",CAROUSEL:"carousel",CAROUSELSELECT:"carouselSelect",ACCORDIONSELECT:"accordionSelect",SUBMITBUTTON:"submitButton",CHECKBOX:"checkbox",CHECKLIST:"checklist",LIST:"list",SECTION:"section",SECTIONLIST:"sectionList",BUTTONLIST:"buttonList",TABS:"tabs"}),s="data-section-id",a=(n(r,[{key:"get",value:function(e){return this.elements[e]}},{key:"set",value:function(e,t){this.elements[e]=t}},{key:"wrapAction",value:function(a,e,o){var s=this;return function(i,n){e&&i&&i.preventDefault&&i.preventDefault(),a.actions instanceof Array&&a.actions.forEach(function(e){var t={actionData:e,metadata:a.metadata,uiEvent:i};o&&(t.groupID=o),n&&(t.formEl=n),s.events.trigger({eventName:e.type,data:t})})}}}]),r);function r(e){var v=this;if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");this.elements={},this.events=e,this.set(o.TEXT,function(e){var t=document.createElement("div"),i=document.createElement("span"),n=e.tooltip?w.default.escapeHtml(e.tooltip):"",a=(t.className="lp-json-pollock-element-text",e.rtl&&(t.dir="rtl",w.default.addClass(t,"direction-rtl")),w.default.styleToCss(e.style)),a=w.default.extractFromStyles(a,"background-color");return t.setAttribute("style",a.extractedStyle),i.innerHTML=w.default.normalizeHtmlText(e.text),i.setAttribute("style",a.style),i.setAttribute("title",n),e.accessibility&&e.accessibility.web?w.default.appendAttributesFromObject(i,e.accessibility.web):i.setAttribute("aria-label",n),t.appendChild(i),t}),this.set(o.BUTTON,function(o){var e=document.createElement("div"),s=(e.className="lp-json-pollock-element-button",o.rtl&&(e.dir="rtl",w.default.addClass(e,"direction-rtl")),document.createElement("button"));if(s.innerHTML=w.default.normalizeHtmlText(o.title),o.subtitle){var t=document.createElement("span");t.className="lp-json-pollock-element-button-subtitle",t.innerHTML=w.default.normalizeHtmlText(o.subtitle),s.appendChild(t)}o.tooltip&&(s.title=o.tooltip,s.setAttribute("aria-label",o.tooltip)),o.accessibility&&o.accessibility.web&&w.default.appendAttributesFromObject(s,o.accessibility.web);var r=o.click;if(r&&r.actions&&(o.ref?s.onclick=function(e,t){var i=[],n=function e(t){if(t)return t.classList.contains("lp-json-pollock")?t:e(t.parentNode)}(s);if(!n)throw new Error("Cannot find root element selected!");var a=void 0;switch(o.ref.type){case"carouselSelect":a="[data-carousel-name="+o.ref.name+"] [data-selected]";break;case"accordionSelect":a="[data-accordion-name="+o.ref.name+"] [data-accordion-body][data-selected]";break;default:throw new Error("Invalid config ref type is used for the button! Type: "+o.ref.type)}n=Array.from(n.querySelectorAll(a));if(0===n.length)throw new Error("No items has selected!");n=n.map(function(e){return JSON.parse(e.getAttribute("data-metadata")||"[]")}).reduce(function(e,t){return[].concat(l(e),l(t))},[]);return i.push.apply(i,l(n)),v.wrapAction(d({},r,{metadata:i}))(e,t)}:s.onclick=v.wrapAction(o.click)),"button"!==o.class){if(o.style){t=w.default.styleToCss(o.style),t=w.default.extractFromStyles(t,"background-color");s.style.cssText=t.style,e.setAttribute("style",t.extractedStyle)}e.appendChild(s)}else{t=document.createElement("div");if(t.className="lp-json-pollock-element-button-button",w.default.addClass(t,"class-button"),o.style){var i=w.default.styleToCss(o.style),i=w.default.extractFromStyles(i,"background-color"),n=(s.style.cssText=i.style,t.setAttribute("style",i.extractedStyle),w.default.styleToBorder(o.style));""!==n&&t.setAttribute("style",i.extractedStyle+" "+n)}t.appendChild(s),e.appendChild(t)}return e}),this.set(o.SUBMITBUTTON,function(e){var t=document.createElement("div"),i=(t.className="lp-json-pollock-element-submit-button",e.rtl&&(t.dir="rtl",w.default.addClass(t,"direction-rtl")),document.createElement("input"));if(i.type="submit",i.value=w.default.normalizeHtmlText(e.title),e.disabled&&(i.disabled=!0,i.classList.add("lp-json-pollock-element-submit-button-disabled")),e.tooltip&&(i.title=e.tooltip,i.setAttribute("aria-label",e.tooltip)),e.style){var n=w.default.styleToCss(e.style),n=w.default.extractFromStyles(n,"background-color");t.setAttribute("style",n.extractedStyle),i.style.cssText=n.style}return e.accessibility&&e.accessibility.web&&w.default.appendAttributesFromObject(i,e.accessibility.web),e.click&&e.click.actions&&(i.onclick=v.wrapAction(e.click,!0)),t.appendChild(i),t}),this.set(o.CHECKBOX,function(e){var t=w.default.generateRandomId(),n=document.createElement("div"),i=(n.className="lp-json-pollock-element-checkbox",document.createElement("input")),a=w.default.normalizeHtmlText(e.text),o=(i.type="checkbox",i.className="lp-json-pollock-element-checkbox-input",i.id=t,document.createElement("label"));if(o.className="lp-json-pollock-element-checkbox-label",o.innerHTML+=a,o.setAttribute("for",t),e.rtl&&(o.dir="rtl",w.default.addClass(o,"direction-rtl")),e.tooltip&&(o.title=e.tooltip,o.setAttribute("aria-label",e.tooltip)),e.borderLine){a=document.createElement("div");a.className="lp-json-pollock-border-element",e.borderColor&&(a.style.borderColor=e.borderColor),n.appendChild(a)}e.accessibility&&e.accessibility.web&&w.default.appendAttributesFromObject(o,e.accessibility.web);t=document.createElement("div");if(t.className="lp-json-pollock-element-checkbox-wrapper",e.rtl&&(t.dir="rtl",w.default.addClass(t,"direction-rtl")),e.style){a=w.default.styleToCss(e.style),e=w.default.extractFromStyles(a,"background-color");o.style.cssText=a,t.setAttribute("style",e.extractedStyle)}return t.appendChild(i),t.appendChild(o),n.appendChild(t),n.afterRender=function(e,t){var i=n.getElementsByTagName("input")[0];e.click&&e.click.actions&&(i.onclick=v.wrapAction(e.click,!1,t.parentElement.getAttribute(s)))},n}),this.set(o.CHECKLIST,function(e){var t=document.createElement("div");if(t.className="lp-json-pollock-layout-checklist",t.setAttribute("role","group"),e.padding){e=e.padding;t.style.margin=e/2+"px 0px"}return t}),this.set(o.SECTION,function(e){var t=document.createElement("div");if(t.className="lp-json-pollock-layout-section",e.padding){var i=e.padding;t.style.margin=i/2+"px 0px"}return e.sectionID&&t.setAttribute(s,e.sectionID),e.accessibility&&e.accessibility.web&&w.default.appendAttributesFromObject(t,e.accessibility.web),t}),this.set(o.SECTIONLIST,function(){var e=document.createElement("div");return e.className="lp-json-pollock-layout-sectionList",e}),this.set(o.BUTTONLIST,function(){var e=document.createElement("div");return e.className="lp-json-pollock-layout-buttonList",e}),this.set(o.LIST,function(){var s=document.createElement("form");return s.className="lp-json-pollock-layout lp-json-pollock-layout-form",s.afterRender=function(){var e=s.querySelectorAll("input");if(0<e.length)for(var t=0;t<e.length;t+=1){var i=e[t];i.onclick&&function(){var t=i.onclick;i.onclick=function(e){t.call(v,e,s)}}()}var n=s.querySelectorAll("button");if(0<n.length)for(var a=0;a<n.length;a+=1){var o=n[a];o.getAttribute("type")||o.setAttribute("type","button")}},s}),this.set(o.IMAGE,function(e){var t=document.createElement("div"),i=(t.className="lp-json-pollock-element-image loading",e.rtl&&(t.dir="rtl",w.default.addClass(t,"direction-rtl")),document.createElement("img"));return i.src=e.url,e.tooltip&&e.tooltip.length&&(t.title=e.tooltip),e.alt&&e.alt.length?i.setAttribute("alt",e.alt):(i.setAttribute("alt",""),i.setAttribute("role","presentation")),e.style&&(i.style.cssText=w.default.styleToCss(e.style)),e.caption&&(t.innerHTML+="<span>"+e.caption+"</span>"),e.accessibility&&e.accessibility.web&&w.default.appendAttributesFromObject(i,e.accessibility.web),i.onload=function(){w.default.removeClass(t,"loading")},i.onerror=function(){w.default.removeClass(t,"loading"),w.default.addClass(t,"error"),t.title="fail to load image",i.style.display="none"},e.click&&e.click.actions&&(i.onclick=v.wrapAction(e.click)),t.appendChild(i),t}),this.set(o.MAP,function(t){var e=t.accessibility&&t.accessibility.web,i=document.createElement("div");return i.className="lp-json-pollock-element-map",t.tooltip&&(i.title=t.tooltip,i.setAttribute("aria-label",t.tooltip)),t.style&&(i.style.cssText=w.default.styleToCss(t.style)),e&&w.default.appendAttributesFromObject(i,t.accessibility.web),e&&e.tabindex||i.setAttribute("tabindex","0"),i.onkeydown=function(e){13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),window.open("https://www.google.com/maps/search/?api=1&query="+t.la+","+t.lo,"_blank"))},t.click&&t.click.actions?i.onclick=v.wrapAction(t.click):i.onclick=function(){window.open("https://www.google.com/maps/search/?api=1&query="+t.la+","+t.lo,"_blank")},i}),this.set(o.VERTICAL,function(e){var t=document.createElement("div");if(t.className="lp-json-pollock-layout lp-json-pollock-layout-vertical","borderLess"===e.border?w.default.addClass(t,"lp-json-pollock-layout-borderLess"):"dropShadow"===e.border&&w.default.addClass(t,"lp-json-pollock-layout-dropShadow"),"enable"===e.scroll)if(w.default.addClass(t,"lp-json-pollock-layout-vertical-scroll"),e.style&&e.style.size){var i=e.style.size,n=100;"medium"===i?n=300:"large"===i&&(n=500),t.setAttribute("style","height: "+n+"px")}else t.setAttribute("style","height: 100px");return e.accessibility&&e.accessibility.web&&w.default.appendAttributesFromObject(t,e.accessibility.web),e.metadata&&t.setAttribute("data-metadata",JSON.stringify(e.metadata)),t}),this.set(o.TABS,function(i){var e=i.elements,l=document.createElement("div"),n=document.createElement("div"),d=(l.appendChild(n),""),c="",a="",u="";if(i.style){var t=i.style.color,o=i.style["background-color"],s=i.style["color-active"],r=i.style["background-color-active"],p=i.style["color-hover"],h=i.style["background-color-hover"],f=1;i.style.size&&("small"===i.style.size?f=1:"medium"===i.style.size?f=2:"large"===i.style.size&&(f=3)),d=(d+=t?"color: "+t+"; ":"")+(t?"border-bottom: "+f+"px solid "+t+"; ":"")+(o?"background-color: "+o+"; ":""),c=(c+=s?"color: "+s+"; ":"")+(s?"border-bottom: "+f+"px solid "+s+"; ":"")+(r?"background-color: "+r+"; ":""),a=(a+=p?"color: "+p+"; ":"")+(p?"border-bottom: "+f+"px solid "+p+"; ":"")+(h?"background-color: "+h+"; ":"")}function g(e){for(var t=l.children,i=t[0].children,n=[],a=1;a<t.length;a++)n.push(t[a]);if(n.length&&n.forEach(function(e){e.style.display="none"}),e){for(var o=0;o<i.length;o++){var s=i[o];d&&c?s.style.cssText=d:s.className=s.className.replace(" active","")}d&&c?(e.currentTarget.style.cssText=c,u=c):e.currentTarget.className+=" active";for(var r=0;r<i.length;r++)(i[r].style.cssText.trim().toLowerCase()===c.trim().toLowerCase()&&c||i[r].className.includes("active"))&&(n[r].style.display="block")}else d&&c?(i[0].style.cssText=c,u=c):i[0].className+=" active",n[0].style.display="block"}return n.className="lp-json-pollock-element-tab",e.forEach(function(e){var e=e.tag,t=document.createElement("button");t.className="lp-json-pollock-element-tab-button",i.style&&i.style.size?t.className+=" lp-json-pollock-element-tab-button-size-"+i.style.size:t.className+=" lp-json-pollock-element-tab-button-size-small",d&&(t.style.cssText=d),a&&(u=t.style.cssText,t.addEventListener("mouseover",function(){u=t.style.cssText,t.style.cssText=a},!1),t.addEventListener("mouseout",function(){t.style.cssText=u},!1)),t.id=e,t.textContent=e,t.onclick=function(e){g.call(v,e)},n.appendChild(t)}),l.afterRender=function(){g()},l}),this.set(o.CAROUSEL,function(e){function i(e){h&&h[p]&&(s=-1*h[p].offsetLeft+"px",p===h.length-1&&(s=-1*(h[p].offsetLeft-(d.offsetWidth-h[p].offsetWidth))+"px"),this&&this.events&&this.events.trigger({eventName:t,data:{offset:s,prevOffset:u.style.left,uiEvent:e}}),u.style.left=s)}function n(){var e="Item "+(p+1)+" of "+h.length;c.setAttribute("aria-label",e)}function a(e){var t=function e(t){if(t)return t.getAttribute("data-carousel-index")||e(t.parentNode)}(e.target);t&&(d.scrollLeft=0,t)&&p!==parseInt(t,10)&&(p=parseInt(t,10),i.call(this,e))}var o=e.padding||0,s=0,r=document.createElement("button"),l=document.createElement("button"),d=document.createElement("div"),c=document.createElement("div"),u=document.createElement("div"),t="carouselOffsetChange",p=0,h=void 0;if(r.setAttribute("type","button"),r.setAttribute("aria-label","Previous"),l.setAttribute("type","button"),l.setAttribute("aria-label","Next"),c.setAttribute("aria-live","polite"),c.setAttribute("aria-atomic","true"),r.innerHTML='<svg aria-hidden="true" class="lp-json-pollock-layout-carousel-arrow-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 14"><path d="M0 0 L2 0 L9 7 L2 14 L0 14 L0 13 L6 7 L0 1"/></svg>',l.innerHTML='<svg aria-hidden="true" class="lp-json-pollock-layout-carousel-arrow-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 14"><path d="M0 0 L2 0 L9 7 L2 14 L0 14 L0 13 L6 7 L0 1"/></svg>',e.accessibility&&e.accessibility.web&&w.default.appendAttributesFromObject(d,e.accessibility.web),e.style){var f=w.default.styleToCss(e.style),f=w.default.extractFromStyles(f,"background-color"),g=""+f.extractedStyle,m=w.default.styleToBorder(e.style),m=(""!==m&&(g+=" "+m),w.default.styleToButton(e.style)),e=(""!==m&&(g+=" "+m),l.setAttribute("style",""+g),r.setAttribute("style",""+g),l.querySelector(".lp-json-pollock-layout-carousel-arrow-icon")),m=r.querySelector(".lp-json-pollock-layout-carousel-arrow-icon");e&&e.setAttribute("style",f.style),m&&m.setAttribute("style",f.style)}return r.style.visibility="visible",d.afterRender=function(){if(d.childNodes.length){for(var e=0;e<d.childNodes.length;e+=1){var t=d.childNodes[e];t.addEventListener("focus",a.bind(v),!0),t.style.margin="0 "+o/2+"px",t.setAttribute("data-carousel-index",e),t.setAttribute("role","listitem")}for(l.className="lp-json-pollock-component-action lp-json-pollock-layout-carousel-arrow",r.className="lp-json-pollock-component-action lp-json-pollock-layout-carousel-arrow left";d.hasChildNodes();)u.insertBefore(d.lastChild,u.firstChild);d.appendChild(u),u.className="lp-json-pollock-layout-carousel",d.setAttribute("aria-label","Carousel with buttons"),d.className="lp-json-pollock-layout-carousel-wrapper",u.setAttribute("role","list"),d.appendChild(r),d.appendChild(l),d.appendChild(u),d.appendChild(c),setTimeout(function(){d.offsetWidth>u.offsetWidth&&(r.style.visibility="hidden",l.style.visibility="hidden"),h=u.children,"rtl"===window.getComputedStyle(l).direction&&(r.style.visibility="visible",l.style.visibility="visible",p=h.length-1,h=[].slice.call(h,0).reverse(),s=-1*(h[p].offsetLeft-(d.offsetWidth-h[p].offsetWidth))+"px",u.style.left=s)},0),l.onclick=function(e){!function(e){p===h.length-1?p=0:p+=1,n(),i.call(this,e)}.call(v,e)},r.onclick=function(e){!function(e){0===p?p=h.length-1:--p,n(),i.call(this,e)}.call(v,e)}}},d}),this.set(o.CAROUSELSELECT,function(n){function i(e,t){t?(e.setAttribute("data-selected","true"),e.classList.add("lp-json-pollock-layout-selected"),n.style&&n.style["border-color-selected"]&&(e.style.borderColor=n.style["border-color-selected"])):(e.removeAttribute("data-selected"),e.classList.remove("lp-json-pollock-layout-selected"),e.style.borderColor="")}function a(e){var t=function e(t){if(t&&"BUTTON"!==t.tagName)return null!==t.getAttribute("data-carousel-index")?t:e(t.parentNode)}(e.target);t&&("single"===n.selectMode.type&&t.parentNode&&Array.from(t.parentNode.querySelectorAll("[data-carousel-index][data-selected]")).filter(function(e){return e!==t}).forEach(function(e){i(e,!1)}),i(t,"true"!==t.dataset.selected))}var o=n.padding||0,s=document.createElement("div"),r=document.createElement("div");if(n.accessibility&&n.accessibility.web&&w.default.appendAttributesFromObject(s,n.accessibility.web),n.style){var e=w.default.styleToCss(n.style),e=w.default.extractFromStyles(e,"background-color");r.style.cssText=e.style,r.setAttribute("style",e.extractedStyle)}return s.afterRender=function(){var e=s.children.length;if(e){for(var t=0;t<e;t+=1){var i=s.children[t];i.addEventListener("click",a.bind(v),!0),i.style.margin="0 "+o/2+"px",i.setAttribute("data-carousel-index",t.toString()),i.setAttribute("role","listitem")}for(;s.hasChildNodes()&&s.lastChild;)r.insertBefore(s.lastChild,r.firstChild);r.className="lp-json-pollock-layout-carousel lp-json-pollock-layout-carousel-select",s.className="lp-json-pollock-layout-carousel-wrapper",s.appendChild(r),s.setAttribute("data-carousel-name",n.selectMode.name)}},s}),this.set(o.ACCORDIONSELECT,function(c){function u(e){var e=e.target,t="INPUT"===e.tagName,e=function e(t){return null!==t.getAttribute("data-accordion-index")?t:e(t.parentNode)}(e);if(e){var i=e.querySelector(".lp-json-pollock-layout-accordion-checkbox"),n=e.querySelector(".lp-json-pollock-layout-accordion-header"),a=e.querySelector(".lp-json-pollock-layout-accordion"),e=e.querySelector(".lp-json-pollock-layout-accordion-arrow");if(t)return i&&a?(t="true"===i.dataset.selected,i=i,t?(i.removeAttribute("data-selected"),i.checked=!1):(i.setAttribute("data-selected","true"),i.checked=!0),void(i=a,t?i.removeAttribute("data-selected"):i.setAttribute("data-selected","true"))):void 0;if(n&&a){t="true"===a.dataset.open;i=a,!t?(i.setAttribute("data-open","true"),i.classList.remove("lp-json-pollock-layout-accordion-folded")):(i.setAttribute("data-open","false"),i.classList.add("lp-json-pollock-layout-accordion-folded")),n=e,!t?(n.classList.add("open"),n.classList.remove("close")):(n.classList.add("close"),n.classList.remove("open"))}}}var p=c.padding||0,h=document.createElement("div"),f=document.createElement("div"),g=w.default.htmlToElement('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 14"><path d="M0 0 L2 0 L9 7 L2 14 L0 14 L0 13 L6 7 L0 1"/></svg>');if(c.accessibility&&c.accessibility.web&&w.default.appendAttributesFromObject(h,c.accessibility.web),c.style){var e=w.default.styleToCss(c.style),e=w.default.extractFromStyles(e,"background-color");f.style.cssText=e.style,f.setAttribute("style",e.extractedStyle)}return h.afterRender=function(){var e=h.children.length;if(e){for(var t=0;t<e;t+=1){var i=h.children[0],n=c.titles[t],a=document.createElement("section"),o=document.createElement("div"),s=document.createElement("input"),r=document.createElement("h3"),l=document.createElement("span"),d=g.cloneNode(!0);a.classList.add("lp-json-pollock-layout-accordion-tab"),o.classList.add("lp-json-pollock-layout-accordion-header"),s.classList.add("lp-json-pollock-layout-accordion-checkbox"),r.classList.add("lp-json-pollock-layout-accordion-title"),l.classList.add("lp-json-pollock-layout-accordion-additional"),d.classList.add("lp-json-pollock-layout-accordion-arrow","close"),i.classList.add("lp-json-pollock-layout-accordion-folded"),i.classList.add("lp-json-pollock-layout-accordion"),i.setAttribute("data-open","false"),i.setAttribute("data-accordion-body",""),s.type="checkbox",r.innerText=n.name,n.additional&&(l.innerText=n.additional),o.addEventListener("click",u.bind(v),!0),a.style.margin="0 "+p/2+"px",a.setAttribute("data-accordion-index",t.toString()),a.setAttribute("role","listitem"),o.appendChild(s),o.appendChild(r),o.appendChild(l),o.appendChild(d),a.appendChild(o),a.appendChild(i),h.appendChild(a)}for(;h.hasChildNodes()&&h.lastChild;)f.insertBefore(h.lastChild,f.firstChild);f.className="lp-json-pollock-layout-accordion lp-json-pollock-layout-accordion-select",h.className="lp-json-pollock-layout-accordion-wrapper",h.appendChild(f),h.setAttribute("data-accordion-name",c.selectMode.name)}},h}),this.set(o.HORIZONTAL,function(e){var t=document.createElement("div");return t.className="lp-json-pollock-layout lp-json-pollock-layout-horizontal","borderLess"===e.border?w.default.addClass(t,"lp-json-pollock-layout-borderLess"):"dropShadow"===e.border?w.default.addClass(t,"lp-json-pollock-layout-dropShadow"):void 0!==e.borderLine&&!1===e.borderLine&&"border"!==e.border&&w.default.addClass(t,"lp-json-pollock-layout-borderLess"),e.accessibility&&e.accessibility.web&&w.default.appendAttributesFromObject(t,e.accessibility.web),e.metadata&&t.setAttribute("data-metadata",JSON.stringify(e.metadata)),t.afterRender=function(){if(t.childNodes.length){var i=e.percentages,n=100/t.childNodes.length;i&&0<i.length&&i.length<t.childNodes.length&&(n=(100-i.reduce(function(e,t){return e+t},0))/(t.childNodes.length-i.length));Array.prototype.forEach.call(t.childNodes,function(e,t){t=i&&i[t]||n;e.style.width=t+"%"})}},t})}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}a.TYPES=o,t.default=a},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.TEMPLATE_TYPES=t.version=t.unregisterAllActions=t.unregisterAction=t.registerAction=t.render=t.init=void 0;n(i(3));var i=i(2),i=n(i),a=new i.default,o=a.init.bind(a),s=a.render.bind(a),r=a.registerAction.bind(a),l=a.unregisterAction.bind(a),a=a.unregisterAllActions.bind(a),i=i.default.TEMPLATE_TYPES;t.init=o,t.render=s,t.registerAction=r,t.unregisterAction=l,t.unregisterAllActions=a,t.version="1.7.7",t.TEMPLATE_TYPES=i}],n={},a.m=i,a.c=n,a.i=function(e){return e},a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/dist/",a(a.s=5));function a(e){var t;return(n[e]||(t=n[e]={i:e,l:!1,exports:{}},i[e].call(t.exports,t,t.exports,a),t.l=!0,t)).exports}}.call(window.lpTag);window.lpTag=window.lpTag||{};!function(){this.chips=(i=[function(e,t){e=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},function(e,t,i){function g(e,t,i){var n,a,o,s=e&g.F,r=e&g.G,l=e&g.S,d=e&g.P,c=e&g.B,u=e&g.W,p=r?v:v[t]||(v[t]={}),h=p.prototype,f=r?m:l?m[t]:(m[t]||{}).prototype;for(n in i=r?t:i)(a=!s&&f&&void 0!==f[n])&&C(p,n)||(o=(a?f:i)[n],p[n]=r&&"function"!=typeof f[n]?i[n]:c&&a?w(o,m):u&&f[n]==o?function(n){function e(e,t,i){if(this instanceof n){switch(arguments.length){case 0:return new n;case 1:return new n(e);case 2:return new n(e,t)}return new n(e,t,i)}return n.apply(this,arguments)}return e.prototype=n.prototype,e}(o):d&&"function"==typeof o?w(Function.call,o):o,d&&((p.virtual||(p.virtual={}))[n]=o,e&g.R)&&h&&!h[n]&&_(h,n,o))}var m=i(5),v=i(0),w=i(9),_=i(8),C=i(11);g.F=1,g.G=2,g.S=4,g.P=8,g.B=16,g.W=32,g.U=64,g.R=128,e.exports=g},function(e,t,i){var n=i(37)("wks"),a=i(24),o=i(5).Symbol,s="function"==typeof o;(e.exports=function(e){return n[e]||(n[e]=s&&o[e]||(s?o:a)("Symbol."+e))}).store=n},function(e,t,i){e.exports=!i(10)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,i){var n=i(7),a=i(53),o=i(39),s=Object.defineProperty;t.f=i(3)?Object.defineProperty:function(e,t,i){if(n(e),t=o(t,!0),n(i),a)try{return s(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(e[t]=i.value),e}},function(e,t){e=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,i){var n=i(6);e.exports=function(e){if(n(e))return e;throw TypeError(e+" is not an object!")}},function(e,t,i){var n=i(4),a=i(17);e.exports=i(3)?function(e,t,i){return n.f(e,t,a(1,i))}:function(e,t,i){return e[t]=i,e}},function(e,t,i){var o=i(50);e.exports=function(n,a,e){if(o(n),void 0===a)return n;switch(e){case 1:return function(e){return n.call(a,e)};case 2:return function(e,t){return n.call(a,e,t)};case 3:return function(e,t,i){return n.call(a,e,t,i)}}return function(){return n.apply(a,arguments)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},function(e,t,i){var n=i(32),a=i(30);e.exports=function(e){return n(a(e))}},function(e,t){e.exports={}},function(e,t,i){var n=i(30);e.exports=function(e){return Object(n(e))}},function(e,t,i){var n=i(61),a=i(31);e.exports=Object.keys||function(e){return n(e,a)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,i){"use strict";var n=i(122)(!0);i(33)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e=this._t,t=this._i;return t>=e.length?{value:void 0,done:!0}:(e=n(e,t),this._i+=e.length,{value:e,done:!1})})},function(e,t,i){var u=i(9),p=i(56),h=i(54),f=i(7),g=i(23),m=i(42),v={},w={};(t=e.exports=function(e,t,i,n,a){var o,s,r,l,a=a?function(){return e}:m(e),d=u(i,n,t?2:1),c=0;if("function"!=typeof a)throw TypeError(e+" is not iterable!");if(h(a)){for(o=g(e.length);c<o;c++)if((l=t?d(f(s=e[c])[0],s[1]):d(e[c]))===v||l===w)return l}else for(r=a.call(e);!(s=r.next()).done;)if((l=p(r,d,s.value,t))===v||l===w)return l}).BREAK=v,t.RETURN=w},function(e,t){e.exports=!0},function(e,t,i){function n(){}var a=i(7),o=i(114),s=i(31),r=i(36)("IE_PROTO"),l=function(){var e=i(52)("iframe"),t=s.length;for(e.style.display="none",i(109).appendChild(e),e.src="javascript:",(e=e.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;t--;)delete l.prototype[s[t]];return l()};e.exports=Object.create||function(e,t){var i;return null!==e?(n.prototype=a(e),i=new n,n.prototype=null,i[r]=e):i=l(),void 0===t?i:o(i,t)}},function(e,t,i){var n=i(4).f,a=i(11),o=i(2)("toStringTag");e.exports=function(e,t,i){e&&!a(e=i?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t,i){var n=i(38),a=Math.min;e.exports=function(e){return 0<e?a(n(e),9007199254740991):0}},function(e,t){var i=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++i+n).toString(36))}},function(e,t,i){i(127);for(var n=i(5),a=i(8),o=i(13),s=i(2)("toStringTag"),r="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<r.length;l++){var d=r[l],c=n[d],c=c&&c.prototype;c&&!c[s]&&a(c,s,d),o[d]=o.Array}},function(e,t,i){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,i){"use strict";t.__esModule=!0;var i=i(78),a=i&&i.__esModule?i:{default:i};t.default=function(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e};function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,a.default)(e,n.key,n)}}},function(e,t,i){var n=i(29),a=i(2)("toStringTag"),o="Arguments"==n(function(){return arguments}());e.exports=function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,t){try{return e[t]}catch(e){}}(e=Object(e),a))?t:o?n(e):"Object"==(t=n(e))&&"function"==typeof e.callee?"Arguments":t}},function(e,t){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,i){var n=i(29);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,i){"use strict";function v(){return this}var w=i(20),_=i(1),C=i(63),T=i(8),E=i(13),y=i(111),b=i(22),S=i(60),I=i(2)("iterator"),N=!([].keys&&"next"in[].keys());e.exports=function(e,t,i,n,a,o,s){y(i,t,n);function r(e){if(!N&&e in p)return p[e];switch(e){case"keys":case"values":return function(){return new i(this,e)}}return function(){return new i(this,e)}}var l,d,n=t+" Iterator",c="values"==a,u=!1,p=e.prototype,h=p[I]||p["@@iterator"]||a&&p[a],f=h||r(a),g=a?c?r("entries"):f:void 0,m="Array"==t&&p.entries||h;if(m&&(m=S(m.call(new e)))!==Object.prototype&&m.next&&(b(m,n,!0),w||"function"==typeof m[I]||T(m,I,v)),c&&h&&"values"!==h.name&&(u=!0,f=function(){return h.call(this)}),w&&!s||!N&&!u&&p[I]||T(p,I,f),E[t]=f,E[n]=v,a)if(l={values:c?f:r("values"),keys:o?f:r("keys"),entries:g},s)for(d in l)d in p||C(p,d,l[d]);else _(_.P+_.F*(N||u),t,l);return l}},function(e,t,i){function n(e){r(e,a,{value:{i:"O"+ ++l,w:{}}})}var a=i(24)("meta"),o=i(6),s=i(11),r=i(4).f,l=0,d=Object.isExtensible||function(){return!0},c=!i(10)(function(){return d(Object.preventExtensions({}))}),u=e.exports={KEY:a,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,a)){if(!d(e))return"F";if(!t)return"E";n(e)}return e[a].i},getWeak:function(e,t){if(!s(e,a)){if(!d(e))return!0;if(!t)return!1;n(e)}return e[a].w},onFreeze:function(e){return c&&u.NEED&&d(e)&&!s(e,a)&&n(e),e}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,i){var n=i(37)("keys"),a=i(24);e.exports=function(e){return n[e]||(n[e]=a(e))}},function(e,t,i){var n=i(0),a=i(5),o=a["__core-js_shared__"]||(a["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:i(20)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){var i=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?n:i)(e)}},function(e,t,i){var a=i(6);e.exports=function(e,t){if(!a(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!a(n=i.call(e))||"function"==typeof(i=e.valueOf)&&!a(n=i.call(e))||!t&&"function"==typeof(i=e.toString)&&!a(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")}},function(e,t,i){var n=i(5),a=i(0),o=i(20),s=i(41),r=i(4).f;e.exports=function(e){var t=a.Symbol||(a.Symbol=!o&&n.Symbol||{});"_"==e.charAt(0)||e in t||r(t,e,{value:s.f(e)})}},function(e,t,i){t.f=i(2)},function(e,t,i){var n=i(28),a=i(2)("iterator"),o=i(13);e.exports=i(0).getIteratorMethod=function(e){if(null!=e)return e[a]||e["@@iterator"]||o[n(e)]}},function(e,t,i){"use strict";i.d(t,"d",function(){return n}),i.d(t,"a",function(){return r}),i.d(t,"c",function(){return l}),i.d(t,"b",function(){return d}),i.d(t,"e",function(){return c}),i.d(t,"f",function(){return u});var t=i(84),a=i.n(t),t=i(79),o=i.n(t),t=i(44),s=i.n(t),n=function(){var e=arguments.length<=0?void 0:arguments[0],t=void 0,i=void 0,i=Array.isArray(arguments.length<=1?void 0:arguments[1])?(t={},(arguments.length<=1?void 0:arguments[1])||[]):(t=(arguments.length<=1?void 0:arguments[1])||{},(arguments.length<=2?void 0:arguments[2])||[]),n=document.createElement(e);return s()(n.style,t.style||{}),s()(n,t.domProps||{}),o()(t.attrs||[]).forEach(function(e){var e=a()(e,2),t=e[0],e=e[1];return n.setAttribute(t,e)}),o()(t.on||[]).forEach(function(e){var e=a()(e,2),t=e[0],e=e[1];return n.addEventListener(t,e,!1)}),i.forEach(function(e){return n.appendChild(e)}),n},r=function(e,t,i){if(e){var n=e.classList.contains(t);i?n||e.classList.add(t):n&&e.classList.remove(t)}},l=function(e){var t=document.createDocumentFragment();return t.appendChild(e),t},d=function(i,n){i.style.animationName="nodeInserted",i.style.animationDuration="0.001s";document.addEventListener("animationstart",function e(t){t.target===i&&"nodeInserted"===t.animationName&&(n(),document.removeEventListener("animationstart",e,!1))},!1)},c=function(e,t){e=e.getBoundingClientRect(),t=t.getBoundingClientRect();return e.left<t.left||e.right>t.right||e.top<t.top||e.bottom>t.bottom},u=function(e,t,i){var e=e.getBoundingClientRect(),t=t.getBoundingClientRect(),i=t.width*i,n=void 0,a=void 0;return e.left<t.left?(n=e.left-t.left,a=Math.floor):e.right>t.right&&(n=e.right-t.right,a=Math.ceil),-1*a(n/i)}},function(e,t,i){e.exports={default:i(90),__esModule:!0}},function(e,t,i){e.exports={default:i(94),__esModule:!0}},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(i(80)),o=n(i(77)),s=n(i(49));t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,s.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.default?(0,a.default)(e,t):e.__proto__=t)}},function(e,t,i){"use strict";t.__esModule=!0;var i=i(49),n=i&&i.__esModule?i:{default:i};t.default=function(e,t){if(e)return!t||"object"!==(void 0===t?"undefined":(0,n.default)(t))&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}},function(e,t,i){"use strict";t.__esModule=!0;var i=i(72),n=i&&i.__esModule?i:{default:i};t.default=function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return(0,n.default)(e)}},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(i(82)),o=n(i(81)),s="function"==typeof o.default&&"symbol"==typeof a.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};t.default="function"==typeof o.default&&"symbol"===s(a.default)?function(e){return void 0===e?"undefined":s(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":s(e)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t,i,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(i+": incorrect invocation!");return e}},function(e,t,i){var n=i(6),a=i(5).document,o=n(a)&&n(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},function(e,t,i){e.exports=!i(3)&&!i(10)(function(){return 7!=Object.defineProperty(i(52)("div"),"a",{get:function(){return 7}}).a})},function(e,t,i){var n=i(13),a=i(2)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||o[a]===e)}},function(e,t,i){var n=i(29);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,i){var a=i(7);e.exports=function(e,t,i,n){try{return n?t(a(i)[0],i[1]):t(i)}catch(t){n=e.return;throw void 0!==n&&a(n.call(e)),t}}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,i){var n=i(16),a=i(17),o=i(12),s=i(39),r=i(11),l=i(53),d=Object.getOwnPropertyDescriptor;t.f=i(3)?d:function(e,t){if(e=o(e),t=s(t,!0),l)try{return d(e,t)}catch(e){}if(r(e,t))return a(!n.f.call(e,t),e[t])}},function(e,t,i){var n=i(61),a=i(31).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},function(e,t,i){var n=i(11),a=i(14),o=i(36)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=a(e),n(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,i){var s=i(11),r=i(12),l=i(100)(!1),d=i(36)("IE_PROTO");e.exports=function(e,t){var i,n=r(e),a=0,o=[];for(i in n)i!=d&&s(n,i)&&o.push(i);for(;t.length>a;)!s(n,i=t[a++])||~l(o,i)||o.push(i);return o}},function(e,t,i){var a=i(8);e.exports=function(e,t,i){for(var n in t)i&&e[n]?e[n]=t[n]:a(e,n,t[n]);return e}},function(e,t,i){e.exports=i(8)},function(e,t,i){var n=i(6);e.exports=function(e,t){if(n(e)&&e._t===t)return e;throw TypeError("Incompatible receiver, "+t+" required!")}},function(e,t){},function(e,t,i){"use strict";i=i(68);t.a=i.a},function(e,t){},function(e,t,i){"use strict";var n=i(48),l=i.n(n),n=i(45),u=i.n(n),n=i(26),p=i.n(n),n=i(27),n=i.n(n),a=i(47),h=i.n(a),a=i(46),a=i.n(a),o=i(69),s=i(70),r=i(43),a=(o=o.a,a()(f,o),n()(f,[{key:"render",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.items,t=void 0===t?this.items:t,i=e.rowSize,i=void 0===i?this.rowSize:i,n=e.rowLimit,n=void 0===n?this.rowLimit:n,a=e.rowWrap,a=void 0===a?this.rowWrap:a,o=e.itemCharLimit,o=void 0===o?this.itemCharLimit:o,s=e.accessibility,s=void 0===s?this.accessibility:s,e=e.direction,e=void 0===e?this.direction:e,t=a?[t]:function(e,t){for(var i=+t||1,n=[],a=0;a<e.length;a+=i)n.push(e.slice(a,a+i));return n}(t,i);if(t.length>n){var i=t.slice(0,n-1),r=(r=[]).concat.apply(r,l()(t.slice(n-1)));i.push(r),t=i}this.renderer=new this.RendererClass({events:this,rows:t,itemCharLimit:o,rowWrap:a,accessibility:s,direction:e}),this.detach(),this.attach(this.renderer.render())}},{key:"attach",value:function(e){this.el.appendChild(e)}},{key:"detach",value:function(){var e=this.el.querySelector(".chips-wrapper");e&&this.el.removeChild(e)}},{key:"dispose",value:function(){this.clear(),this.detach()}},{key:"readonly",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];i.i(r.a)(this.el.querySelector(".chips-wrapper"),"chips-readonly",e),this.renderer.isReadOnly=e}}]),f);function f(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.el,t=void 0===t?document.body:t,i=e.items,i=void 0===i?[]:i,n=e.rowSize,a=e.rowLimit,a=void 0===a?3:a,o=e.itemCharLimit,o=void 0===o?25:o,s=e.rowWrap,s=void 0!==s&&s,r=e.lazy,r=void 0!==r&&r,l=e.accessibility,l=void 0===l?{web:{}}:l,d=e.renderer,e=e.direction,e=void 0===e?"ltr":e,c=(p()(this,f),h()(this,(f.__proto__||u()(f)).call(this)));if(d)return c.el=t,c.items=i,c.rowWrap=!n&&s,c.rowSize=n||i.length||1,c.rowLimit=a,c.itemCharLimit=o,c.accessibility=l,c.RendererClass=d,c.direction=e,r||c.render(),c;throw new Error('"renderer" must be passed')}a.Renderer=s.a,t.a=a},function(e,t,i){"use strict";var n=i(75),a=i.n(n),n=i(26),o=i.n(n),n=i(27),i=(i.n(n)()(s,[{key:"on",value:function(e,t){this.listeners.set(e,t)}},{key:"off",value:function(e){this.listeners.delete(e)}},{key:"clear",value:function(){this.listeners=new a.a}},{key:"dispatch",value:function(e){e=this.listeners.get(e);if(e){for(var t=arguments.length,i=Array(1<t?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];e.apply(void 0,i)}}}]),s);function s(){o()(this,s),this.listeners=new a.a}t.a=i},function(e,t,l){"use strict";var i=l(48),d=l.n(i),i=l(76),c=l.n(i),i=l(45),n=l.n(i),i=l(47),a=l.n(i),i=l(46),i=l.n(i),o=l(83),u=l.n(o),o=l(26),s=l.n(o),o=l(27),o=l.n(o),p=l(43);o()(f,[{key:"render",value:function(){var e=this.buildDomTree();return this.refs={wrapper:e,slider:e.querySelector(".chips-slider"),navLeft:e.querySelector(".chips-nav-left"),navRight:e.querySelector(".chips-nav-right")},l.i(p.b)(this.refs.slider,this.renderNav.bind(this)),l.i(p.c)(e)}},{key:"buildDomTree",value:function(){var t=this;return l.i(p.d)("div",{attrs:u()({class:"rtl"===this.direction?"chips-wrapper chips-wrapper-rtl":"chips-wrapper"},this.accessibility.web)},[l.i(p.d)("div",{attrs:{class:"chips-nav chips-nav-left",role:"button","aria-hidden":"true",tabindex:"-1"},style:{visibility:"hidden"},on:{click:function(){t.renderOffset(1),t.events.dispatch("nav:left")}}}),l.i(p.d)("div",{attrs:{class:"chips-nav chips-nav-right",role:"button","aria-hidden":"true",tabindex:"-1"},style:{visibility:"hidden"},on:{click:function(){t.renderOffset(-1),t.events.dispatch("nav:right")}}}),l.i(p.d)("div",{attrs:{class:"chips-slider"},style:{left:0}},this.rows.map(function(e){return l.i(p.d)("ul",{attrs:{class:"chips-row"},style:u()({"flex-wrap":t.rowWrap?"wrap":"nowrap"},t.rowWrap&&{height:"auto"})},e.map(t.renderItem.bind(t)))}))])}},{key:"renderOffset",value:function(e){var t=this.refs.slider,e=t.offsetWidth*this.stepRatio*e,e=t.offsetLeft+e,i=void 0,e=("ltr"===this.direction&&(i=0<e?0:e<t.offsetWidth-t.scrollWidth?t.offsetWidth-t.scrollWidth:e),"rtl"===this.direction&&(i=e<0?0:e<t.scrollWidth-t.offsetWidth?e:t.scrollWidth-t.offsetWidth),Math.round(i));t.style.left=e+"px",this.renderNav(i)}},{key:"renderNav",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=this.refs.slider,i=this.refs.navLeft,n=this.refs.navRight;"ltr"===this.direction&&(this.rowWrap||0===e?i.style.visibility="hidden":i.style.visibility="visible",this.rowWrap||e<=t.offsetWidth-t.scrollWidth?n.style.visibility="hidden":n.style.visibility="visible"),"rtl"===this.direction&&(!this.rowWrap&&e<t.scrollWidth-t.offsetWidth?i.style.visibility="visible":i.style.visibility="hidden",!this.rowWrap&&0<e?n.style.visibility="visible":n.style.visibility="hidden")}},{key:"renderItem",value:function(){throw new Error("abstract method not implemented!")}}]);r=f,i()(h,r),o()(h,[{key:"renderItem",value:function(e){var i=this,t=e.title,n=e.tooltip,a=e.style,o=void 0===a?{}:a,a=e.accessibility,a=void 0===a?{web:{}}:a,s=e.click,e=this.itemCharLimit,r="string"==typeof t&&t.length>e;return l.i(p.d)("li",{attrs:{class:"chips-item-container"},style:{"margin-top":this.rowWrap?"10px":0}},[l.i(p.d)("button",{attrs:u()({class:"chips-item"},a.web),domProps:u()({},"string"==typeof t&&{textContent:r?""+t.substr(0,e):t},"string"==typeof n&&{title:n}),style:u()({},"string"==typeof o.color&&{color:o.color},"string"==typeof o["background-color"]&&{backgroundColor:o["background-color"]},"string"==typeof o["border-color"]&&{borderColor:o["border-color"]},"string"==typeof o["color-hover"]&&{colorHover:o["color-hover"]},"string"==typeof o["background-color-hover"]&&{backgroundColorHover:o["background-color-hover"]},"string"==typeof o["border-color-hover"]&&{borderColorHover:o["border-color-hover"]},c()(o["border-radius"])&&{borderRadius:o["border-radius"]+"px"},o.bold&&{fontWeight:"bold"},o.italic&&{fontStyle:"italic"},o["font-family"]&&{fontFamily:o["font-family"]},-1!==["small","medium","large"].indexOf(o.size)&&{fontSize:{small:"10px",medium:"12px",large:"15px"}[o.size]}),on:u()({},s&&{click:function(e){i.isReadOnly?e.preventDefault():s.actions.forEach(function(e){return i.events.dispatch("action:"+e.type,{action:e,metadata:s.metadata})})},focus:function(e){var e=e.target,t=i.refs.wrapper;if(t.scrollLeft=0,l.i(p.e)(e,t)){e=l.i(p.f)(e,t,i.stepRatio);i.renderOffset(e)}}},{mouseenter:function(e){i.setHoverStyle(e.target,o,!0)},mouseleave:function(e){i.setHoverStyle(e.target,o,!1)}})})],[].concat(d()(r&&[l.i(p.d)("span",{domProps:{innerHTML:"…"}})])))}},{key:"setHoverStyle",value:function(e,t,i){i?(e.style.backgroundColor=t["background-color-hover"],e.style.color=t["color-hover"],e.style.borderColor=t["border-color-hover"]):(e.style.backgroundColor=t["background-color"]||"",e.style.color=t.color||"",e.style.borderColor=t["border-color"]||"")}}]);var r,i=h;function h(){return s()(this,h),a()(this,(h.__proto__||n()(h)).apply(this,arguments))}function f(e){var t=e.events,i=e.rows,n=e.itemCharLimit,a=e.rowWrap,o=e.accessibility,o=void 0===o?{web:{}}:o,e=e.direction,e=void 0===e?"ltr":e;s()(this,f),this.events=t,this.rows=i,this.itemCharLimit=n,this.rowWrap=a,this.accessibility=o,this.stepRatio=.7,this.refs={wrapper:null,slider:null,navLeft:null,navRight:null},this.direction=e}t.a={StructuredContentButton:i}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(67),n=(i.n(n),i(66));t.default=n.a},function(e,t,i){e.exports={default:i(85),__esModule:!0}},function(e,t,i){e.exports={default:i(86),__esModule:!0}},function(e,t,i){e.exports={default:i(87),__esModule:!0}},function(e,t,i){e.exports={default:i(88),__esModule:!0}},function(e,t,i){e.exports={default:i(89),__esModule:!0}},function(e,t,i){e.exports={default:i(91),__esModule:!0}},function(e,t,i){e.exports={default:i(92),__esModule:!0}},function(e,t,i){e.exports={default:i(93),__esModule:!0}},function(e,t,i){e.exports={default:i(95),__esModule:!0}},function(e,t,i){e.exports={default:i(96),__esModule:!0}},function(e,t,i){e.exports={default:i(97),__esModule:!0}},function(e,t,i){"use strict";t.__esModule=!0;i=i(44),i=i&&i.__esModule?i:{default:i};t.default=i.default||function(e){for(var t=1;t<arguments.length;t++){var i,n=arguments[t];for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var l=n(i(74)),d=n(i(73));t.default=function(e,t){if(Array.isArray(e))return e;if((0,l.default)(Object(e))){var i=e,n=t,a=[],o=!0,e=!1,t=void 0;try{for(var s,r=(0,d.default)(i);!(o=(s=r.next()).done)&&(a.push(s.value),!n||a.length!==n);o=!0);}catch(i){e=!0,t=i}finally{try{!o&&r.return&&r.return()}finally{if(e)throw t}}return a}throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,i){i(18),i(126),e.exports=i(0).Array.from},function(e,t,i){i(25),i(18),e.exports=i(124)},function(e,t,i){i(25),i(18),e.exports=i(125)},function(e,t,i){i(65),i(18),i(25),i(128),i(138),i(137),i(136),e.exports=i(0).Map},function(e,t,i){i(129),e.exports=i(0).Number.isInteger},function(e,t,i){i(130),e.exports=i(0).Object.assign},function(e,t,i){i(131);var n=i(0).Object;e.exports=function(e,t){return n.create(e,t)}},function(e,t,i){i(132);var n=i(0).Object;e.exports=function(e,t,i){return n.defineProperty(e,t,i)}},function(e,t,i){i(139),e.exports=i(0).Object.entries},function(e,t,i){i(133),e.exports=i(0).Object.getPrototypeOf},function(e,t,i){i(134),e.exports=i(0).Object.setPrototypeOf},function(e,t,i){i(135),i(65),i(140),i(141),e.exports=i(0).Symbol},function(e,t,i){i(18),i(25),e.exports=i(41).f("iterator")},function(e,t){e.exports=function(){}},function(e,t,i){var n=i(19);e.exports=function(e,t){var i=[];return n(e,!1,i.push,i,t),i}},function(e,t,i){var l=i(12),d=i(23),c=i(123);e.exports=function(r){return function(e,t,i){var n,a=l(e),o=d(a.length),s=c(i,o);if(r&&t!=t){for(;s<o;)if((n=a[s++])!=n)return!0}else for(;s<o;s++)if((r||s in a)&&a[s]===t)return r||s||0;return!r&&-1}}},function(e,t,i){var _=i(9),C=i(32),T=i(14),E=i(23),n=i(103);e.exports=function(u,e){var p=1==u,h=2==u,f=3==u,g=4==u,m=6==u,v=5==u||m,w=e||n;return function(e,t,i){for(var n,a,o=T(e),s=C(o),r=_(t,i,3),l=E(s.length),d=0,c=p?w(e,l):h?w(e,0):void 0;d<l;d++)if((v||d in s)&&(a=r(n=s[d],d,o),u))if(p)c[d]=a;else if(a)switch(u){case 3:return!0;case 5:return n;case 6:return d;case 2:c.push(n)}else if(g)return!1;return m?-1:f||g?g:c}}},function(e,t,i){var n=i(6),a=i(55),o=i(2)("species");e.exports=function(e){var t;return void 0===(t=a(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!a(t.prototype)||(t=void 0),n(t))&&null===(t=t[o])?void 0:t)?Array:t}},function(e,t,i){var n=i(102);e.exports=function(e,t){return new(n(e))(t)}},function(e,t,i){"use strict";function s(e,t){var i,n=f(t);if("F"!==n)return e._i[n];for(i=e._f;i;i=i.n)if(i.k==t)return i}var r=i(4).f,l=i(21),d=i(62),c=i(9),u=i(51),p=i(19),n=i(33),a=i(57),o=i(121),h=i(3),f=i(34).fastKey,g=i(64),m=h?"_s":"size";e.exports={getConstructor:function(e,a,i,n){var o=e(function(e,t){u(e,o,a,"_i"),e._t=a,e._i=l(null),e._f=void 0,e._l=void 0,e[m]=0,null!=t&&p(t,i,e[n],e)});return d(o.prototype,{clear:function(){for(var e=g(this,a),t=e._i,i=e._f;i;i=i.n)i.r=!0,i.p&&(i.p=i.p.n=void 0),delete t[i.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var t=g(this,a),e=s(t,e);if(e){var i=e.n,n=e.p;delete t._i[e.i],e.r=!0,n&&(n.n=i),i&&(i.p=n),t._f==e&&(t._f=i),t._l==e&&(t._l=n),t[m]--}return!!e},forEach:function(e){g(this,a);for(var t,i=c(e,1<arguments.length?arguments[1]:void 0,3);t=t?t.n:this._f;)for(i(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!s(g(this,a),e)}}),h&&r(o.prototype,"size",{get:function(){return g(this,a)[m]}}),o},def:function(e,t,i){var n,a=s(e,t);return a?a.v=i:(e._l=a={i:n=f(t,!0),k:t,v:i,p:t=e._l,n:void 0,r:!1},e._f||(e._f=a),t&&(t.n=a),e[m]++,"F"!==n&&(e._i[n]=a)),e},getEntry:s,setStrong:function(e,i,t){n(e,i,function(e,t){this._t=g(e,i),this._k=t,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?a(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,a(1))},t?"entries":"values",!t,!0),o(i)}}},function(e,t,i){var n=i(28),a=i(99);e.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return a(this)}}},function(e,t,i){"use strict";var u=i(5),p=i(1),h=i(34),f=i(10),g=i(8),m=i(62),v=i(19),w=i(51),_=i(6),C=i(22),T=i(4).f,E=i(101)(0),y=i(3);e.exports=function(i,e,t,n,a,o){var s=u[i],r=s,l=a?"set":"add",d=r&&r.prototype,c={};return y&&"function"==typeof r&&(o||d.forEach&&!f(function(){(new r).entries().next()}))?(r=e(function(e,t){w(e,r,i,"_c"),e._c=new s,null!=t&&v(t,a,e[l],e)}),E("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(i){var n="add"==i||"set"==i;i in d&&(!o||"clear"!=i)&&g(r.prototype,i,function(e,t){return(w(this,r,i),n||!o||_(e))?(e=this._c[i](0===e?0:e,t),n?this:e):"get"==i&&void 0})}),o||T(r.prototype,"size",{get:function(){return this._c.size}})):(r=n.getConstructor(e,i,a,l),m(r.prototype,t),h.NEED=!0),C(r,i),c[i]=r,p(p.G+p.W+p.F,c),o||n.setStrong(r,i,a),r}},function(e,t,i){"use strict";var n=i(4),a=i(17);e.exports=function(e,t,i){t in e?n.f(e,t,a(0,i)):e[t]=i}},function(e,t,i){var r=i(15),l=i(35),d=i(16);e.exports=function(e){var t=r(e),i=l.f;if(i)for(var n,a=i(e),o=d.f,s=0;a.length>s;)o.call(e,n=a[s++])&&t.push(n);return t}},function(e,t,i){i=i(5).document;e.exports=i&&i.documentElement},function(e,t,i){var n=i(6),a=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&a(e)===e}},function(e,t,i){"use strict";var n=i(21),a=i(17),o=i(22),s={};i(8)(s,i(2)("iterator"),function(){return this}),e.exports=function(e,t,i){e.prototype=n(s,{next:a(1,i)}),o(e,t+" Iterator")}},function(e,t,i){var o=i(2)("iterator"),s=!1;try{var n=[7][o]();n.return=function(){s=!0},Array.from(n,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!s)return!1;var i=!1;try{var n=[7],a=n[o]();a.next=function(){return{done:i=!0}},n[o]=function(){return a},e(n)}catch(e){}return i}},function(e,t,i){"use strict";var p=i(3),h=i(15),f=i(35),g=i(16),m=i(14),v=i(32),a=Object.assign;e.exports=!a||i(10)(function(){var e={},t={},i=Symbol(),n="abcdefghijklmnopqrst";return e[i]=7,n.split("").forEach(function(e){t[e]=e}),7!=a({},e)[i]||Object.keys(a({},t)).join("")!=n})?function(e,t){for(var i=m(e),n=arguments.length,a=1,o=f.f,s=g.f;a<n;)for(var r,l=v(arguments[a++]),d=o?h(l).concat(o(l)):h(l),c=d.length,u=0;u<c;)r=d[u++],p&&!s.call(l,r)||(i[r]=l[r]);return i}:a},function(e,t,i){var s=i(4),r=i(7),l=i(15);e.exports=i(3)?Object.defineProperties:function(e,t){r(e);for(var i,n=l(t),a=n.length,o=0;o<a;)s.f(e,i=n[o++],t[i]);return e}},function(e,t,i){var n=i(12),a=i(59).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){if(!s||"[object Window]"!=o.call(e))return a(n(e));var t=e;try{return a(t)}catch(t){return s.slice()}}},function(e,t,i){var a=i(1),o=i(0),s=i(10);e.exports=function(e,t){var i=(o.Object||{})[e]||Object[e],n={};n[e]=t(i),a(a.S+a.F*s(function(){i(1)}),"Object",n)}},function(e,t,i){var l=i(3),d=i(15),c=i(12),u=i(16).f;e.exports=function(r){return function(e){for(var t,i=c(e),n=d(i),a=n.length,o=0,s=[];o<a;)t=n[o++],l&&!u.call(i,t)||s.push(r?[t,i[t]]:i[t]);return s}}},function(e,t,i){"use strict";var n=i(1),s=i(50),r=i(9),l=i(19);e.exports=function(e){n(n.S,e,{from:function(e){var t,i,n,a,o=arguments[1];return s(this),(t=void 0!==o)&&s(o),null==e?new this:(i=[],t?(n=0,a=r(o,arguments[2],2),l(e,!1,function(e){i.push(a(e,n++))})):l(e,!1,i.push,i),new this(i))}})}},function(e,t,i){"use strict";var n=i(1);e.exports=function(e){n(n.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,a){function o(e,t){if(n(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")}var i=a(6),n=a(7);e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,i,n){try{(n=a(9)(Function.call,a(58).f(Object.prototype,"__proto__").set,2))(e,[]),i=!(e instanceof Array)}catch(e){i=!0}return function(e,t){return o(e,t),i?e.__proto__=t:n(e,t),e}}({},!1):void 0),check:o}},function(e,t,i){"use strict";var n=i(5),a=i(0),o=i(4),s=i(3),r=i(2)("species");e.exports=function(e){e=("function"==typeof a[e]?a:n)[e];s&&e&&!e[r]&&o.f(e,r,{configurable:!0,get:function(){return this}})}},function(e,t,i){var o=i(38),s=i(30);e.exports=function(a){return function(e,t){var i,e=String(s(e)),t=o(t),n=e.length;return t<0||n<=t?a?"":void 0:(i=e.charCodeAt(t))<55296||56319<i||t+1===n||(n=e.charCodeAt(t+1))<56320||57343<n?a?e.charAt(t):i:a?e.slice(t,t+2):n-56320+(i-55296<<10)+65536}}},function(e,t,i){var n=i(38),a=Math.max,o=Math.min;e.exports=function(e,t){return(e=n(e))<0?a(e+t,0):o(e,t)}},function(e,t,i){var n=i(7),a=i(42);e.exports=i(0).getIterator=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},function(e,t,i){var n=i(28),a=i(2)("iterator"),o=i(13);e.exports=i(0).isIterable=function(e){e=Object(e);return void 0!==e[a]||"@@iterator"in e||o.hasOwnProperty(n(e))}},function(e,t,i){"use strict";var u=i(9),n=i(1),p=i(14),h=i(56),f=i(54),g=i(23),m=i(107),v=i(42);n(n.S+n.F*!i(112)(function(e){Array.from(e)}),"Array",{from:function(e){var t,i,n,a,o=p(e),e="function"==typeof this?this:Array,s=arguments.length,r=1<s?arguments[1]:void 0,l=void 0!==r,d=0,c=v(o);if(l&&(r=u(r,2<s?arguments[2]:void 0,2)),null==c||e==Array&&f(c))for(i=new e(t=g(o.length));d<t;d++)m(i,d,l?r(o[d],d):o[d]);else for(a=c.call(o),i=new e;!(n=a.next()).done;d++)m(i,d,l?h(a,r,[n.value,d],!0):n.value);return i.length=d,i}})},function(e,t,i){"use strict";var n=i(98),a=i(57),o=i(13),s=i(12);e.exports=i(33)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,i=this._i++;return!e||i>=e.length?(this._t=void 0,a(1)):a(0,"keys"==t?i:"values"==t?e[i]:[i,e[i]])},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(e,t,i){"use strict";var n=i(104),a=i(64);e.exports=i(106)("Map",function(e){return function(){return e(this,0<arguments.length?arguments[0]:void 0)}},{get:function(e){e=n.getEntry(a(this,"Map"),e);return e&&e.v},set:function(e,t){return n.def(a(this,"Map"),0===e?0:e,t)}},n,!0)},function(e,t,i){var n=i(1);n(n.S,"Number",{isInteger:i(110)})},function(e,t,i){var n=i(1);n(n.S+n.F,"Object",{assign:i(113)})},function(e,t,i){var n=i(1);n(n.S,"Object",{create:i(21)})},function(e,t,i){var n=i(1);n(n.S+n.F*!i(3),"Object",{defineProperty:i(4).f})},function(e,t,i){var n=i(14),a=i(60);i(116)("getPrototypeOf",function(){return function(e){return a(n(e))}})},function(e,t,i){var n=i(1);n(n.S,"Object",{setPrototypeOf:i(120).set})},function(R,k,e){"use strict";function n(e){var t=x[e]=C(y.prototype);return t._k=e,t}function i(e,t){m(e);for(var i,n=U(t=v(t)),a=0,o=n.length;a<o;)W(e,i=n[a++],t[i]);return e}function t(e){var t=Q.call(this,e=w(e,!0));return!(this===M&&l(x,e)&&!l(A,e))&&(!(t||!l(this,e)||!l(x,e)||l(this,I)&&this[I][e])||t)}function a(e,t){var i;if(e=v(e),t=w(t,!0),e!==M||!l(x,t)||l(A,t))return!(i=X(e,t))||!l(x,t)||l(e,I)&&e[I][t]||(i.enumerable=!0),i}function o(e){for(var t,i=J(v(e)),n=[],a=0;i.length>a;)l(x,t=i[a++])||t==I||t==V||n.push(t);return n}function s(e){for(var t,i=e===M,n=J(i?A:v(e)),a=[],o=0;n.length>o;)!l(x,t=n[o++])||i&&!l(M,t)||a.push(x[t]);return a}var r=e(5),l=e(11),d=e(3),c=e(1),u=e(63),V=e(34).KEY,p=e(10),h=e(37),f=e(22),$=e(24),g=e(2),F=e(41),B=e(40),U=e(108),H=e(55),m=e(7),z=e(6),G=e(14),v=e(12),w=e(39),_=e(17),C=e(21),j=e(115),q=e(58),T=e(35),K=e(4),Y=e(15),X=q.f,E=K.f,J=j.f,y=r.Symbol,b=r.JSON,S=b&&b.stringify,I=g("_hidden"),Z=g("toPrimitive"),Q={}.propertyIsEnumerable,N=h("symbol-registry"),x=h("symbols"),A=h("op-symbols"),M=Object.prototype,h="function"==typeof y&&!!T.f,L=r.QObject,D=!L||!L.prototype||!L.prototype.findChild,P=d&&p(function(){return 7!=C(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(e,t,i){var n=X(M,t);n&&delete M[t],E(e,t,i),n&&e!==M&&E(M,t,n)}:E,O=h&&"symbol"==typeof y.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof y},W=function(e,t,i){return e===M&&W(A,t,i),m(e),t=w(t,!0),m(i),(l(x,t)?(i.enumerable?(l(e,I)&&e[I][t]&&(e[I][t]=!1),i=C(i,{enumerable:_(0,!1)})):(l(e,I)||E(e,I,_(1,{})),e[I][t]=!0),P):E)(e,t,i)};h||(u((y=function(){if(this instanceof y)throw TypeError("Symbol is not a constructor!");var t=$(0<arguments.length?arguments[0]:void 0),i=function(e){this===M&&i.call(A,e),l(this,I)&&l(this[I],t)&&(this[I][t]=!1),P(this,t,_(1,e))};return d&&D&&P(M,t,{configurable:!0,set:i}),n(t)}).prototype,"toString",function(){return this._k}),q.f=a,K.f=W,e(59).f=j.f=o,e(16).f=t,T.f=s,d&&!e(20)&&u(M,"propertyIsEnumerable",t,!0),F.f=function(e){return n(g(e))}),c(c.G+c.W+c.F*!h,{Symbol:y});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)g(ee[te++]);for(var ie=Y(g.store),ne=0;ie.length>ne;)B(ie[ne++]);c(c.S+c.F*!h,"Symbol",{for:function(e){return l(N,e+="")?N[e]:N[e]=y(e)},keyFor:function(e){if(!O(e))throw TypeError(e+" is not a symbol!");for(var t in N)if(N[t]===e)return t},useSetter:function(){D=!0},useSimple:function(){D=!1}}),c(c.S+c.F*!h,"Object",{create:function(e,t){return void 0===t?C(e):i(C(e),t)},defineProperty:W,defineProperties:i,getOwnPropertyDescriptor:a,getOwnPropertyNames:o,getOwnPropertySymbols:s});L=p(function(){T.f(1)});c(c.S+c.F*L,"Object",{getOwnPropertySymbols:function(e){return T.f(G(e))}}),b&&c(c.S+c.F*(!h||p(function(){var e=y();return"[null]"!=S([e])||"{}"!=S({a:e})||"{}"!=S(Object(e))})),"JSON",{stringify:function(e){for(var t,i,n=[e],a=1;a<arguments.length;)n.push(arguments[a++]);if(i=t=n[1],(z(t)||void 0!==e)&&!O(e))return H(t)||(t=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!O(t))return t}),n[1]=t,S.apply(b,n)}}),y.prototype[Z]||e(8)(y.prototype,Z,y.prototype.valueOf),f(y,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,i){i(118)("Map")},function(e,t,i){i(119)("Map")},function(e,t,i){var n=i(1);n(n.P+n.R,"Map",{toJSON:i(105)("Map")})},function(e,t,i){var n=i(1),a=i(117)(!0);n(n.S,"Object",{entries:function(e){return a(e)}})},function(e,t,i){i(40)("asyncIterator")},function(e,t,i){i(40)("observable")}],a={},n.m=i,n.c=a,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/pages/ve-le-lp/chips/dist/",n(n.s=71));function n(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},i[e].call(t.exports,t,t.exports,n),t.l=!0,t)).exports}var i,a}.call(window.lpTag);window.lpTag=window.lpTag||{};!function(){var i,n;this.lpTelInput=(i=[function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.lpTelInput=t.v=void 0,i(1),i(2);function n(e,t){return new a.default(e,t)}var a=(i=i(3))&&i.__esModule?i:{default:i},i=(t.v="2.0.3",t.lpTelInput=n);t.default=i},function(e,t,i){},function(e,t){!function(){"use strict";fe=he={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([457]\\d{6})$","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2457]\\d{6})$","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"1|([267]\\d{6})$","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"0|(183[12])",0,0,0,[["(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8]))\\d{3}|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4]))|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:83[0-38]|93[0-6])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[06-9]|7[02-9]|8[0-24-9]|9[0-27-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:28|4[14]|5)|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[047]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[25689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[25689]"]]]],BL:["590","00","(?:590|(?:69|80)\\d|976)\\d{6}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["976[01]\\d{5}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-8]\\d{6})$","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-24679]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([3-8]\\d{6})$","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-79]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}",[10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|6[578])|4(?:03|1[68]|3[178]|50|74)|5(?:06|1[49]|48|79|8[17])|6(?:04|13|39|47|72)|7(?:0[59]|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[12]|33|44|66|77|88)|622)[2-9]\\d{6}"],0,0,0,["600[2-9]\\d{6}"]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"0|([59]\\d{7})$","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:83[0-38]|93[0-6])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[06-9]|7[02-9]|8[0-24-9]|9[0-27-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-3]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","(?:10|2[0-57-9])(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"0|(1(?:[12]\\d|79)\\d\\d)",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:(?:1\\d|[36])\\d{3}|9101)\\d{6}|[124-8]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1 $2",["[146][2-9]|[2578]"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["[39]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","[27]\\d{6,7}|[34]\\d{5,7}|(?:5|8\\d\\d)\\d{7}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["5"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"0|([59]\\d{7})$","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:83[0-38]|93[0-6])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[06-9]|7[02-9]|8[0-24-9]|9[0-27-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:1\\d|2[02-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[05]\\d|[23]1|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[0568]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"1|([2-7]\\d{6})$","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[189]"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-59]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-59]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d)(\\d{4,9})","$1 $2",["[2568][1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["[12]00|[368]|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[1245]|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[47]\\d{6}|76\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0359])|(?:5[0-26-9]|[78][0-49])\\d\\d|6(?:[0-4]\\d\\d|50[0-24-69]))|2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d\\d|1(?:[0-7]\\d\\d|8(?:[02]\\d|1[0-278])))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-2]|2[356]|34|4[01347]|5[49]|6[0-369]|77|81|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94|80\\d|976)\\d{6}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"0|([25-9]\\d{5})$","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-2]|2[356]|34|4[01347]|5[49]|6[0-369]|77|81|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d\\d|606)\\d{5}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590|(?:69|80)\\d|976)\\d{6}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|1[0-24]|2[0-68]|3[1289]|4[0-24-9]|5[3-579]|6[0189]|7[08]|8[0-689]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["976[01]\\d{5}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"1|([3-9]\\d{6})$","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","9008\\d{3}|(?:[2-467]\\d\\d|862)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-46-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-5]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-489]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-489]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"0|([25-8]\\d{5})$","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|55\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[38]"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[1-9]\\d{8}|3[2-9]\\d{7}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"0|([0-24-8]\\d{5})$","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97[7-9]))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-2]|2[356]|34|4[01347]|5[49]|6[0-369]|77|81|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51|63)|9(?:49|80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9]|636)|9(?:496|802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9]|636[457-9])|9(?:496|802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[27-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9])|5(?:2|3[045]|4[0-369]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|49|51|6(?:[0-24]|36|5[0-3589]|72|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:49|55|83)[29]|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[23]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|7[015-9]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17|3[015-9]))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9(?:[019]|4[1-3]|6(?:[0-47-9]|5[01346-9])))|3(?:[29]|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[23]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|829(?:2|66)|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|(?:[235-8]\\d|99)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-7]\\d{6})$","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"1|([2-8]\\d{6})$","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"0|(1001)"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:2|33|5\\d|77|88)\\d{7}|[4-6]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[4-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{5})(\\d{4})","$1-$2",["5(?:29|38)","5(?:29|38)[89]","5(?:29|38)[89]0"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-489]|3[5-9]|9)|892","5(?:2(?:[2-49]|8[235-9])|3[5-9]|9)|892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:29(?:[189][05]|2[29]|3[01])|38[89][05])\\d{4}|5(?:2(?:[0-25-7]\\d|3[1-578]|4[02-46-8]|8[0235-7]|90)|3(?:[0-47]\\d|5[02-9]|6[02-8]|80|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[017]\\d|6[0-367]))\\d{6}"],["80\\d{7}"],["89\\d{7}"],0,0,0,0,["592(?:4[0-2]|93)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590|(?:69|80)\\d|976)\\d{6}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|30|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["976[01]\\d{5}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"0|([24-9]\\d{6})$","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[57-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[57-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","670$1",0,"670"],MQ:["596","00","(?:69|80)\\d{7}|(?:59|97)6\\d{6}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"1|([34]\\d{6})$","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:5|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["5"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[3467]|9[13-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[19]\\d|[23]1|77|88)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:44|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[017]\\d|[235][1-9]|4[0-35-9]|6[0-46-9]|8[1-79]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9])|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1[36-8]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","[2-57-9]\\d{5}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[2-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[04]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:[124-7]|9\\d{3})\\d{6}|[1-9]\\d{7}|[78]\\d{9,13}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-7]|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|[89]\\d{6,9}|1\\d{4,5}",[5,6,7,8,9,10],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[489]|59"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-7]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-579]|6[2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[47]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[29]\\d{7,9}|50\\d{5}(?:\\d{2,3})?|6[0-35-9]\\d{6}|7\\d{7,8}|8\\d{4,9}|(?:11\\d|[34])\\d{7}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-579]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|[89]0","50(?:[0367]|88)|[89]0"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[59]|80"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7|86"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,0," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","6\\d{5}(?:\\d{2})?|8\\d{9}|[1-9]\\d{6}(?:\\d{2})?",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","(?:[45]|80\\d\\d)\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-6])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","[2-7]\\d{7}|800\\d{4}(?:\\d{2})?|2\\d{6}",[7,8,9],[["(\\d{3})(\\d{4})","$1 $2",["2[126]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]"]]]],RE:["262","00","9769\\d{5}|(?:26|[68]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,"26[23]|69|[89]"],RO:["40","00","(?:[2378]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[237-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-6]2|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-6]2|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","8000\\d{3}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-5]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|[57]9)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["24|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3478]|64|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6(?:0[5-7]|[1-35-9])|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|[89]00\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|(5\\d{6})$","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"1|([2-479]\\d{6})$","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:00|[1-57-9]\\d)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[34]7|91[78]"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|616)","5(?:[0-59]|6161)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-46-8]\\d{6})$","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[26-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["4[45][0-5]|5(?:0|6[37])|6(?:[12][018]|[36-8])|7|89|9[1-9]|(?:48|57)[0137-9]","4[45][0-5]|5(?:0|6(?:3[14-7]|7))|6(?:[12][018]|[36-8])|7|89|9[1-9]|(?:48|57)[0137-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["[3-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}",[10],[["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["5(?:05(?:[2-57-9]\\d\\d|6(?:[0-35-9]\\d|44))|82(?:2(?:0[0-3]|[268]2)|3(?:0[02]|33)|4(?:00|4[24]|65|82)|5(?:00|29|83)|6(?:00|66|82)|777|8(?:00|88)|9(?:00|9[89])))\\d{4}|(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[01356]|3[0-24679]|4[167]|5[12]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[39]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-47]|7[0-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[0179]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[08]|3[0-289]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01579]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","4\\d{9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["405|8|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["4"],"0$1"]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:33|55|[679]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[35-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"1|([2-7]\\d{6})$","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-578]\\d{6})$","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[69]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3578]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23]"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7[24-68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","80\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,"269|63"],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:005|[1-9]\\d\\d)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:005|[1-9]\\d\\d)\\d{5}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"[0-36-9]\\d{8}",[9],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-36-9]"]]],0,0,0,0,0,0,[0,["[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|285\\d{9}|(?:[19]\\d|49)\\d{6}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["4"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[19]"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["34[57]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-3]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|3(?:2|47|7\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:(?:285\\d\\d|3(?:45|[69]\\d{3}))\\d|9[89])\\d{6}"]]],883:["883",0,"(?:210|370\\d\\d)\\d{7}|51\\d{7}(?:\\d{3})?",[9,10,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["2"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[35]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:210|(?:370[1-9]|51[013]0)\\d)\\d{7}|5100\\d{5}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}},I="".concat("-‐-―−ー-").concat("//").concat("..").concat(" ").concat("()()[]\\[\\]").concat("~⁓∼~"),ge=(((N=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.name=this.constructor.name,this.message=t,this.stack=new Error(t).stack}).prototype=Object.create(Error.prototype)).constructor=N,/^\d+$/),x=(e(r,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{e=this.countryCallingCodes()[e];if(e&&1===e.length&&"001"===e[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&ge.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new A(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new A(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){e=this.countryCallingCodes()[e];if(e&&(1!==e.length||3!==e[0].length))return e}},{key:"getCountryCodeForCallingCode",value:function(e){e=this.getCountryCodesForCallingCode(e);if(e)return e[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){t=this.nonGeographic()[e];if(t)return t}else{t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),r),A=(e(s,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var t=this;return(this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[]).map(function(e){return new me(e,t)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return!(this.types()&&0===this.types().length||!this.types())}},{key:"type",value:function(e){if(this.hasTypes()&&V(this.types(),e))return new we(V(this.types(),e),this)}},{key:"ext",value:function(){return!this.v1&&!this.v2&&this.metadata[13]||" ext. "}}]),s),me=(e(o,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||ve.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),o),ve=/^\(?\$1\)?$/,we=(e(n,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),n),M=function(e){return"object"===t(e)},_e=function(e){return t(e)},L="[++]{0,1}(?:["+I+"]*[0-90-9٠-٩۰-۹]){3,}["+I+"0-90-9٠-٩۰-۹]*",Ce=new RegExp("^[++]{0,1}(?:["+I+"]*[0-90-9٠-٩۰-۹]){1,2}$","i"),L=L+"(?:"+F()+")?",Te=new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^"+L+"$","i"),D=new RegExp("(?:"+F()+")$","i"),Ee={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"},ye=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"],be=/(\$\d)/,Se=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/,Ie={formatExtension:function(e,t,i){return"".concat(e).concat(i.ext()).concat(t)}},P=function(){function a(e,t,i){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");if(!e)throw new TypeError("`country` or `countryCallingCode` not passed");if(!t)throw new TypeError("`nationalNumber` not passed");if(!i)throw new TypeError("`metadata` not passed");var n=new x(i);Ne(e)&&(this.country=e,n.country(e),e=n.countryCallingCode()),this.countryCallingCode=e,this.nationalNumber=t,this.number="+"+this.countryCallingCode+this.nationalNumber,this.metadata=i}for(var e=a.prototype,t=[{key:"setExt",value:function(e){this.ext=e}},{key:"isPossible",value:function(){var e=this,t={v2:!0},i=this.metadata;if(void 0===t&&(t={}),i=new x(i),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");i.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!i.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));i.country(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");i.selectNumberingPlan(e.countryCallingCode)}}if(i.possibleLengths())return z(e.phone||e.nationalNumber,i);if(e.countryCallingCode&&i.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}},{key:"isValid",value:function(){return t={v2:!0},i=(e=this).metadata,i=new x(i),!!e.country&&(i.selectNumberingPlan(e.country,e.countryCallingCode),i.hasTypes()?void 0!==c(e,t,i.metadata):d(t.v2?e.nationalNumber:e.phone,i.nationalNumberPattern()));var e,t,i}},{key:"isNonGeographic",value:function(){return new x(this.metadata).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return c(this,{v2:!0},this.metadata)}},{key:"format",value:function(e,t){var i=this,n=e,a=t?function(n){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},t=Object.keys(a);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):t).forEach(function(e){t=n,i=a[e=e],e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i;var t,i})}return n}({},t,{v2:!0}):{v2:!0},o=this.metadata;if(a=a?function(n){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},t=Object.keys(a);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):t).forEach(function(e){t=n,i=a[e=e],e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i;var t,i})}return n}({},Ie,a):Ie,o=new x(o),i.country&&"001"!==i.country){if(!o.hasCountry(i.country))throw new Error("Unknown country: ".concat(i.country));o.country(i.country)}else{if(!i.countryCallingCode)return i.phone||"";o.selectNumberingPlan(i.countryCallingCode)}var s,r,l,d,c=o.countryCallingCode(),u=a.v2?i.nationalNumber:i.phone;switch(n){case"NATIONAL":return u?m(h=g(u,i.carrierCode,"NATIONAL",o,a),i.ext,o,a.formatExtension):"";case"INTERNATIONAL":return u?(h=g(u,null,"INTERNATIONAL",o,a),m(h="+".concat(c," ").concat(h),i.ext,o,a.formatExtension)):"+".concat(c);case"E.164":return"+".concat(c).concat(u);case"RFC3966":var p=(h={number:"+".concat(c).concat(u),ext:i.ext}).number,h=h.ext;if(!p)return"";if("+"!==p[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(p).concat(h?";ext="+h:"");case"IDD":return a.fromCountry?m((p=u,s=i.carrierCode,r=c,f(l=a.fromCountry,(d=o).metadata)===r?(s=g(p,s,"NATIONAL",d),"1"===r?r+" "+s:s):(s=function(e,t){t=new x(t);return t.selectNumberingPlan(e,void 0),t.defaultIDDPrefix()?t.defaultIDDPrefix():Se.test(t.IDDPrefix())?t.IDDPrefix():void 0}(l,d.metadata))?"".concat(s," ").concat(r," ").concat(g(p,null,"INTERNATIONAL",d)):void 0),i.ext,o,a.formatExtension):void 0;default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(n,'"'))}}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}],i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return a}(),Ne=function(e){return/^[A-Z]{2}$/.test(e)},xe=new RegExp("([0-90-9٠-٩۰-۹])"),Ae=new RegExp("[++0-90-9٠-٩۰-۹]"),Me=new RegExp("[^0-90-9٠-٩۰-۹#]+$"),Le=function(e){return"object"===J(e)},De=function(){function n(e){var t,a=this,i=e.onCountryChange,e=e.onCallingCodeChange;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");t=function(e){for(var t=0,i=Object.keys(e);t<i.length;t++){var n=i[t];a[n]=e[n]}},"update"in this?Object.defineProperty(this,"update",{value:t,enumerable:!0,configurable:!0,writable:!0}):this.update=t,this.onCountryChange=i,this.onCallingCodeChange=e}for(var e=n.prototype,t=[{key:"reset",value:function(e,t){this.international=!1,this.IDDPrefix=void 0,this.missingPlus=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(e,t)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberMatchesInput=!0,this.nationalPrefix=void 0,this.carrierCode=void 0,this.complexPrefixBeforeNationalSignificantNumber=void 0}},{key:"initCountryAndCallingCode",value:function(e,t){this.setCountry(e),this.setCallingCode(t)}},{key:"setCountry",value:function(e){this.country=e,this.onCountryChange(e)}},{key:"setCallingCode",value:function(e){return this.callingCode=e,this.onCallingCodeChange(this.country,e)}},{key:"startInternationalNumber",value:function(){this.international=!0,this.initCountryAndCallingCode()}},{key:"appendDigits",value:function(e){this.digits+=e}},{key:"appendNationalSignificantNumberDigits",value:function(e){this.nationalSignificantNumber+=e}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}],i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}return n}(),O=new RegExp("x"),Pe=(de(y,[{key:"match",value:function(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).allowOverflow;if(!e)throw new Error("String is required");e=function e(t,i,n){{var a;if("string"==typeof i)return n&&t.length>i.length?{overflow:!0}:(a=t.join(""),0===i.indexOf(a)?t.length===i.length?{match:!0,matchedChars:t}:{partialMatch:!0}:0===a.indexOf(i)?{match:!0,matchedChars:t.slice(0,i.length)}:void 0)}if(Array.isArray(i)){for(var o=t.slice(),s=0;s<i.length;){var r=e(o,i[s],n&&s===i.length-1);if(!r||r.overflow)return r;if(!r.match){if(r.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(r,null,2)))}if(0===(o=o.slice(r.matchedChars.length)).length)return s===i.length-1?{match:!0,matchedChars:t}:{partialMatch:!0};s++}return n?{overflow:!0}:{match:!0,matchedChars:t.slice(0,t.length-o.length)}}switch(i.op){case"|":var l,d,c=i.args,u=Array.isArray(c),p=0;for(c=u?c:c[Symbol.iterator]();;){if(u){if(p>=c.length)break;d=c[p++]}else{if((p=c.next()).done)break;d=p.value}var h=e(t,d,n);if(h){if(h.overflow)return h;if(h.match)return{match:!0,matchedChars:h.matchedChars};h.partialMatch&&(l=!0)}}return l?{partialMatch:!0}:void 0;case"[]":var f,g=i.args,m=Array.isArray(g),v=0;for(g=m?g:g[Symbol.iterator]();;){if(m){if(v>=g.length)break;f=g[v++]}else{if((v=g.next()).done)break;f=v.value}var w=f;if(t[0]===w)return 1===t.length?{match:!0,matchedChars:t}:n?{overflow:!0}:{match:!0,matchedChars:[w]}}return;default:throw new Error("Unsupported instruction tree: ".concat(i))}}(e.split(""),this.matchTree,!0);if(e&&e.match&&delete e.matchedChars,!e||!e.overflow||t)return e}}]),y),Oe=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])"),We=(de(b,[{key:"parse",value:function(e){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(e),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var e=this.context[0],t=e.branches,e=e.instructions;if(t)return[{op:"|",args:t.concat([e])}];if(0===e.length)throw new Error("Pattern is required");return e}},{key:"startContext",value:function(e){this.context.push(e)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(e){if(!e)throw new Error("Empty pattern passed");var t=e.match(Oe);if(t){var i=t[1],n=e.slice(0,t.index),t=e.slice(t.index+i.length);switch(i){case"(?:":n&&this.parsePattern(n),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(n&&this.parsePattern(n),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var a=this.getContext().branches;a.push(this.getContext().instructions),this.endContext(),this.getContext().instructions.push({op:"|",args:a});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(n&&this.parsePattern(n),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(this.getContext().instructions),this.getContext().instructions=[];break;case"[":n&&this.parsePattern(n),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:function(e){for(var t=[],i=0;i<e.length;){if("-"===e[i]){if(0===i||i===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var n=e[i-1].charCodeAt(0)+1,a=e[i+1].charCodeAt(0)-1,o=n;o<=a;)t.push(String.fromCharCode(o)),o++}else t.push(e[i]);i++}return t}(n)});break;default:throw new Error("Unknown operator: ".concat(i))}t&&this.parsePattern(t)}else this.getContext().instructions=this.getContext().instructions.concat(e.split(""))}}]),b),Re=E("9",15),ke=/[- ]/,Ve=new RegExp("^["+I+"]*(\\$\\d["+I+"]*)+$"),$e=function(){function i(e){var t=this,e=(e.state,e.metadata);if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");ce(this,"getSeparatorAfterNationalPrefix",function(e){return t.isNANP||e&&e.nationalPrefixFormattingRule()&&ke.test(e.nationalPrefixFormattingRule())?" ":""}),ce(this,"shouldTryNationalPrefixFormattingRule",function(e,t){var i=t.international,t=t.nationalPrefix;if(e.nationalPrefixFormattingRule()){e=e.usesNationalPrefix();if(e&&t||!e&&!i)return!0}}),this.metadata=e,this.resetFormat()}for(var e=i.prototype,t=[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(e,t){this.resetFormat(),e?(this.isNANP="1"===e.callingCode(),this.matchingFormats=e.formats(),t.nationalSignificantNumber&&this.narrowDownMatchingFormats(t)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(e,t){var i,n,a=this;if(i=t.nationalSignificantNumber,n=this.metadata,"IS_POSSIBLE"===p(i,n))for(var o,s=this.matchingFormats,r=Array.isArray(s),l=0,s=r?s:s[Symbol.iterator]();;){if(r){if(l>=s.length)break;o=s[l++]}else{if((l=s.next()).done)break;o=l.value}var d=o,c=function(e,t,i){var n=i.metadata,a=i.shouldTryNationalPrefixFormattingRule,i=i.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber)){a=(n={metadata:n,shouldTryNationalPrefixFormattingRule:a,getSeparatorAfterNationalPrefix:i}).metadata,i=n.shouldTryNationalPrefixFormattingRule,n=n.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,i(t)){i=se(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:n,metadata:a});if(i)return i}return se(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:n,metadata:a})}}(t,d,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(e){return a.shouldTryNationalPrefixFormattingRule(e,{international:t.international,nationalPrefix:t.nationalPrefix})},getSeparatorAfterNationalPrefix:this.getSeparatorAfterNationalPrefix});if(c)return this.resetFormat(),this.chosenFormat=d,this.setNationalNumberTemplate(c.replace(/\d/g,"x"),t),this.populatedNationalNumberTemplate=c,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf("x"),c}return this.formatNationalNumberWithNextDigits(e,t)}},{key:"formatNationalNumberWithNextDigits",value:function(e,t){var i=this.chosenFormat,n=this.chooseFormat(t);if(n)return n===i?this.formatNextNationalNumberDigits(e):this.formatNextNationalNumberDigits(t.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(e){var t=this,i=e.nationalSignificantNumber,n=e.nationalPrefix,a=e.international,o=i,s=o.length-3;s<0&&(s=0),this.matchingFormats=this.matchingFormats.filter(function(e){return t.formatSuits(e,a,n)&&t.formatMatches(e,o,s)}),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(e,t,i){return!(i&&!e.usesNationalPrefix()&&!e.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!t&&!i&&e.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(e,t,i){var n=e.leadingDigitsPatterns().length;if(0===n)return!0;i=Math.min(i,n-1);n=e.leadingDigitsPatterns()[i];if(t.length<3)try{return void 0!==new Pe(n).match(t,{allowOverflow:!0})}catch(e){return console.error(e),!0}return new RegExp("^(".concat(n,")")).test(t)}},{key:"getFormatFormat",value:function(e,t){return t?e.internationalFormat():e.format()}},{key:"chooseFormat",value:function(e){var i,n=this,a=this.matchingFormats.slice(),o=Array.isArray(a),s=0;e:for(a=o?a:a[Symbol.iterator]();;)switch(function(){if(o){if(s>=a.length)return"break";i=a[s++]}else{if((s=a.next()).done)return"break";i=s.value}var t=i;return n.chosenFormat===t?"break":Ve.test(n.getFormatFormat(t,e.international))?n.createTemplateForFormat(t,e)?(n.chosenFormat=t,"break"):(n.matchingFormats=n.matchingFormats.filter(function(e){return e!==t}),"continue"):"continue"}()){case"break":break e;case"continue":continue}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(e,t){return!(0<=e.pattern().indexOf("|"))&&(e=this.getTemplateForFormat(e,t))?(this.setNationalNumberTemplate(e,t),!0):void 0}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(e,t){var i=e.IDDPrefix,e=e.missingPlus;return i?t&&!1===t.spacing?i:i+" ":e?"":"+"}},{key:"getTemplate",value:function(e){if(this.template){for(var t=-1,i=0,n=e.international?this.getInternationalPrefixBeforeCountryCallingCode(e,{spacing:!1}):"";i<n.length+e.getDigitsWithoutInternationalPrefix().length;)t=this.template.indexOf("x",t+1),i++;return oe(this.template,t+1)}}},{key:"setNationalNumberTemplate",value:function(e,t){this.nationalNumberTemplate=e,this.populatedNationalNumberTemplate=e,this.populatedNationalNumberTemplatePosition=-1,t.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(t).replace(/[\d\+]/g,"x")+E("x",t.callingCode.length)+" "+e:this.template=e}},{key:"getTemplateForFormat",value:function(e,t){var i=t.nationalSignificantNumber,n=t.international,a=t.nationalPrefix,t=t.complexPrefixBeforeNationalSignificantNumber,o=(o=e.pattern()).replace(/\[([^\[\]])*\]/g,"\\d").replace(/\d(?=[^,}][^,}])/g,"\\d"),s=Re.match(o)[0];if(!(i.length>s.length)){var r=new RegExp("^"+o+"$"),i=i.replace(/\d/g,"9");r.test(i)&&(s=i);var l,d=this.getFormatFormat(e,n);if(this.shouldTryNationalPrefixFormattingRule(e,{international:n,nationalPrefix:a})){r=d.replace(be,e.nationalPrefixFormattingRule());if(u(e.nationalPrefixFormattingRule())===(a||"")+u("$1")&&(d=r,l=!0,a))for(var c=a.length;0<c;)d=d.replace(/\d/,"x"),c--}i=s.replace(new RegExp(o),d).replace(new RegExp("9","g"),"x");return l||(t?i=E("x",t.length)+" "+i:a&&(i=E("x",a.length)+this.getSeparatorAfterNationalPrefix(e)+i)),i=n?G(i):i}}},{key:"formatNextNationalNumberDigits",value:function(r){var e=function(e,t){for(var i,n=r.split(""),a=Array.isArray(n),o=0,n=a?n:n[Symbol.iterator]();;){if(a){if(o>=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}var s=i;if(e.slice(t+1).search(O)<0)return;t=e.search(O),e=e.replace(O,s)}return[e,t]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition);if(e)return this.populatedNationalNumberTemplate=e[0],this.populatedNationalNumberTemplatePosition=e[1],oe(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}}],n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}return i}(),Fe=new RegExp("^["+I+"0-90-9٠-٩۰-۹]+$","i"),Be="(?:[++]["+I+"0-90-9٠-٩۰-۹]*|["+I+"0-90-9٠-٩۰-۹]+)",Ue=new RegExp("[^"+I+"0-90-9٠-٩۰-۹]+.*$"),He=/[^\d\[\]]/,ze=function(){function a(e){var t=e.defaultCountry,i=e.defaultCallingCode,n=e.metadata,e=e.onNationalSignificantNumberChange;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.defaultCountry=t,this.defaultCallingCode=i,this.metadata=n,this.onNationalSignificantNumberChange=e}for(var e=a.prototype,t=[{key:"input",value:function(e,t){e=ue("+"===(e=function(e){var t,i=e.search(Be);if(!(i<0))return"+"===(e=e.slice(i))[0]&&(t=!0,e=e.slice("+".length)),e=e.replace(Ue,""),e=t?"+"+e:e}(e=e)||"")[0]?[e.slice("+".length),!0]:[e],2),n=e[0],e=e[1];var i,n=[n=Fe.test(n)?n:"",e],e=ue(n,2),n=e[0],e=e[1],n=u(n);return!e||t.digits||(t.startInternationalNumber(),n)||(i=!0),n&&this.inputDigits(n,t),{digits:n,justLeadingPlus:i}}},{key:"inputDigits",value:function(e,t){var i=t.digits,i=i.length<3&&3<=i.length+e.length;if(t.appendDigits(e),i&&this.extractIddPrefix(t),this.isWaitingForCountryCallingCode(t)){if(!this.extractCountryCallingCode(t))return}else t.appendNationalSignificantNumberDigits(e);t.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(t.getNationalDigits(),t.update)}},{key:"isWaitingForCountryCallingCode",value:function(e){var t=e.international,e=e.callingCode;return t&&!e}},{key:"extractCountryCallingCode",value:function(e){var t=Y("+"+e.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=t.countryCallingCode,t=t.number;if(i)return e.setCallingCode(i),e.update({nationalSignificantNumber:t}),!0}},{key:"reset",value:function(e){if(e){this.hasSelectedNumberingPlan=!0;e=e._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=e&&He.test(e)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(e,t){if(this.hasSelectedNumberingPlan){var i=v(e,this.metadata),n=i.nationalPrefix,a=i.nationalNumber,i=i.carrierCode;if(a!==e)return this.onExtractedNationalNumber(n,i,a,e,t),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(e,t,i){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(e,i);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var n=v(e,this.metadata),a=n.nationalPrefix,o=n.nationalNumber,n=n.carrierCode;if(o!==t)return this.onExtractedNationalNumber(a,n,o,e,i),!0}}},{key:"onExtractedNationalNumber",value:function(e,t,i,n,a){var o,s=n.lastIndexOf(i);if(0<=s&&s===n.length-i.length){var r=!0,n=n.slice(0,s);n!==e&&(o=n)}a({nationalPrefix:e,carrierCode:t,nationalSignificantNumber:i,nationalSignificantNumberMatchesInput:r,complexPrefixBeforeNationalSignificantNumber:o}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(e){return!!this.extractAnotherNationalSignificantNumber(e.getNationalDigits(),e.nationalSignificantNumber,e.update)||(this.extractIddPrefix(e)||this.fixMissingPlus(e)?(this.extractCallingCodeAndNationalSignificantNumber(e),!0):void 0)}},{key:"extractIddPrefix",value:function(e){var t=e.international,i=e.IDDPrefix,n=e.digits;return(e.nationalSignificantNumber,!t&&!i)&&void 0!==(t=q(n,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata))&&t!==n?(e.update({IDDPrefix:n.slice(0,n.length-t.length)}),this.startInternationalNumber(e),!0):void 0}},{key:"fixMissingPlus",value:function(e){if(!e.international){var t=K(e.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=t.countryCallingCode;if(t.number,i)return e.update({missingPlus:!0}),this.startInternationalNumber(e),!0}}},{key:"startInternationalNumber",value:function(e){e.startInternationalNumber(),e.nationalSignificantNumber&&(e.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(e){this.extractCountryCallingCode(e)&&this.extractNationalSignificantNumber(e.getNationalDigits(),e.update)}}],i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return a}(),Ge=function(){function i(e,t){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.metadata=new x(t);e=function(e){if(Array.isArray(e))return e}(t=this.getCountryAndCallingCode(e))||function(e){var t=[],i=!0,n=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done)&&(t.push(o.value),2!==t.length);i=!0);}catch(e){n=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(n)throw a}}return t}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}(),t=e[0],e=e[1];this.defaultCountry=t,this.defaultCallingCode=e,this.reset()}for(var e=i.prototype,t=[{key:"getCountryAndCallingCode",value:function(e){var t,i;return e&&("object"===pe(e)?(t=e.defaultCountry,i=e.defaultCallingCode):t=e),[t=t&&!this.metadata.hasCountry(t)?void 0:t,i]}},{key:"input",value:function(e){var t,e=this.parser.input(e,this.state),i=e.digits;if(e.justLeadingPlus)this.formattedOutput="+";else if(i){if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),void 0===(t=this.metadata.hasSelectedNumberingPlan()?this.formatter.format(i,this.state):t)&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();e=this.state.getNationalDigits();e&&(t=this.formatter.format(e,this.state))}this.formattedOutput=t?this.getFullNumber(t):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var i=this;return this.state=new De({onCountryChange:function(e){i.country=e},onCallingCodeChange:function(e,t){i.metadata.selectNumberingPlan(e,t),i.formatter.reset(i.metadata.numberingPlan,i.state),i.parser.reset(i.metadata.numberingPlan)}}),this.formatter=new $e({state:this.state,metadata:this.metadata}),this.parser=new ze({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){i.determineTheCountryIfNeeded(),i.formatter.reset(i.metadata.numberingPlan,i.state)}}),this.state.reset(this.defaultCountry,this.defaultCallingCode),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){return this.state.country}},{key:"determineTheCountryIfNeeded",value:function(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function(e){var t;return this.isInternational()?(t=(t=this.state.callingCode)?e?"".concat(t," ").concat(e):t:"".concat(this.state.getDigitsWithoutInternationalPrefix()),this.formatter.getInternationalPrefixBeforeCountryCallingCode(this.state,{spacing:!!t})+t):e}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var e=this.state,t=e.nationalSignificantNumber,i=e.complexPrefixBeforeNationalSignificantNumber,e=e.nationalPrefix,i=i||e;return i?i+t:t}},{key:"getNonFormattedNumber",value:function(){var e=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(e?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var e=this.getNonFormattedNumber();if(e)return e.replace(/[\+\d]/g,"x")}},{key:"isCountryCallingCodeAmbiguous",value:function(){var e=this.state.callingCode,e=this.metadata.getCountryCodesForCallingCode(e);return e&&1<e.length}},{key:"determineTheCountry",value:function(){this.state.setCountry(X(this.isInternational()?this.state.callingCode:this.defaultCallingCode,this.state.nationalSignificantNumber,this.metadata))}},{key:"getNumberValue",value:function(){var e=this.state,t=e.digits,i=e.callingCode,n=e.country,e=e.nationalSignificantNumber;if(t)return this.isInternational()?i?"+"+i+e:"+"+t:n||i?"+"+(n?this.metadata.countryCallingCode():i)+e:void 0}},{key:"getNumber",value:function(){var e=this.state,t=e.nationalSignificantNumber,i=e.carrierCode,e=e.callingCode,n=this._getCountry();if(t&&(n||e))return n=new P(n||e,t,this.metadata.metadata),i&&(n.carrierCode=i),n}},{key:"isPossible",value:function(){var e=this.getNumber();return!!e&&e.isPossible()}},{key:"isValid",value:function(){var e=this.getNumber();return!!e&&e.isValid()}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}],n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}return i}(),qe=((S.prototype=Object.create(Ge.prototype,{})).constructor=S,JSON.parse('{"AC":"40123","AD":"312345","AE":"501234567","AF":"701234567","AG":"2684641234","AI":"2642351234","AL":"672123456","AM":"77123456","AO":"923123456","AR":"91123456789","AS":"6847331234","AT":"664123456","AU":"412345678","AW":"5601234","AX":"412345678","AZ":"401234567","BA":"61123456","BB":"2462501234","BD":"1812345678","BE":"470123456","BF":"70123456","BG":"48123456","BH":"36001234","BI":"79561234","BJ":"90011234","BL":"690001234","BM":"4413701234","BN":"7123456","BO":"71234567","BQ":"3181234","BR":"11961234567","BS":"2423591234","BT":"17123456","BW":"71123456","BY":"294911911","BZ":"6221234","CA":"5062345678","CC":"412345678","CD":"991234567","CF":"70012345","CG":"061234567","CH":"781234567","CI":"0123456789","CK":"71234","CL":"221234567","CM":"671234567","CN":"13123456789","CO":"3211234567","CR":"83123456","CU":"51234567","CV":"9911234","CW":"95181234","CX":"412345678","CY":"96123456","CZ":"601123456","DE":"15123456789","DJ":"77831001","DK":"32123456","DM":"7672251234","DO":"8092345678","DZ":"551234567","EC":"991234567","EE":"51234567","EG":"1001234567","EH":"650123456","ER":"7123456","ES":"612345678","ET":"911234567","FI":"412345678","FJ":"7012345","FK":"51234","FM":"3501234","FO":"211234","FR":"612345678","GA":"06031234","GB":"7400123456","GD":"4734031234","GE":"555123456","GF":"694201234","GG":"7781123456","GH":"231234567","GI":"57123456","GL":"221234","GM":"3012345","GN":"601123456","GP":"690001234","GQ":"222123456","GR":"6912345678","GT":"51234567","GU":"6713001234","GW":"955012345","GY":"6091234","HK":"51234567","HN":"91234567","HR":"921234567","HT":"34101234","HU":"201234567","ID":"812345678","IE":"850123456","IL":"502345678","IM":"7924123456","IN":"8123456789","IO":"3801234","IQ":"7912345678","IR":"9123456789","IS":"6111234","IT":"3123456789","JE":"7797712345","JM":"8762101234","JO":"790123456","JP":"9012345678","KE":"712123456","KG":"700123456","KH":"91234567","KI":"72001234","KM":"3212345","KN":"8697652917","KP":"1921234567","KR":"1020000000","KW":"50012345","KY":"3453231234","KZ":"7710009998","LA":"2023123456","LB":"71123456","LC":"7582845678","LI":"660234567","LK":"712345678","LR":"770123456","LS":"50123456","LT":"61234567","LU":"628123456","LV":"21234567","LY":"912345678","MA":"650123456","MC":"612345678","MD":"62112345","ME":"67622901","MF":"690001234","MG":"321234567","MH":"2351234","MK":"72345678","ML":"65012345","MM":"92123456","MN":"88123456","MO":"66123456","MP":"6702345678","MQ":"696201234","MR":"22123456","MS":"6644923456","MT":"96961234","MU":"52512345","MV":"7712345","MW":"991234567","MX":"12221234567","MY":"123456789","MZ":"821234567","NA":"811234567","NC":"751234","NE":"93123456","NF":"381234","NG":"8021234567","NI":"81234567","NL":"612345678","NO":"40612345","NP":"9841234567","NR":"5551234","NU":"8884012","NZ":"211234567","OM":"92123456","PA":"61234567","PE":"912345678","PF":"87123456","PG":"70123456","PH":"9051234567","PK":"3012345678","PL":"512345678","PM":"551234","PR":"7872345678","PS":"599123456","PT":"912345678","PW":"6201234","PY":"961456789","QA":"33123456","RE":"692123456","RO":"712034567","RS":"601234567","RU":"9123456789","RW":"720123456","SA":"512345678","SB":"7421234","SC":"2510123","SD":"911231234","SE":"701234567","SG":"81234567","SH":"51234","SI":"31234567","SJ":"41234567","SK":"912123456","SL":"25123456","SM":"66661212","SN":"701234567","SO":"71123456","SR":"7412345","SS":"977123456","ST":"9812345","SV":"70123456","SX":"7215205678","SY":"944567890","SZ":"76123456","TA":"8999","TC":"6492311234","TD":"63012345","TG":"90112345","TH":"812345678","TJ":"917123456","TK":"7290","TL":"77212345","TM":"66123456","TN":"20123456","TO":"7715123","TR":"5012345678","TT":"8682911234","TV":"901234","TW":"912345678","TZ":"621234567","UA":"501234567","UG":"712345678","US":"2015550123","UY":"94231234","UZ":"912345678","VA":"3123456789","VC":"7844301234","VE":"4121234567","VG":"2843001234","VI":"3406421234","VN":"912345678","VU":"5912345","WF":"821234","WS":"7212345","XK":"43201234","YE":"712345678","YT":"639012345","ZA":"711234567","ZM":"955123456","ZW":"712345678"}')),window.lpIntlTelInputUtils={formatNumber:function(e,t,i){t="string"==typeof t?t.toUpperCase():void 0;try{var n=T(e,t);return function(){return a(te,arguments)}(n.number)?(i=void 0===i?"E.164":i,n.format(i)):e}catch(t){return e}},getExampleNumber:function(e,t,i){e="string"==typeof e?e.toUpperCase():void 0;try{var n=function(){return a(ie,arguments)}(e,qe);return t?n.formatNational():n.formatInternational()}catch(e){return""}},getNumberType:function(e,t){t="string"==typeof t?t.toUpperCase():void 0;try{var i=T(e,t);return je[i.getType()]}catch(e){return-99}},getExtension:function(e,t){t="string"==typeof t?t.toUpperCase():void 0;try{return T(e,t).ext}catch(e){return""}},getValidationError:function(e,t){t="string"==typeof t?t.toUpperCase():void 0;try{var i=function(){return a(ae,arguments)}(T(e,t).number,t);return"INVALID_COUNTRY"===i?W.INVALID_COUNTRY_CODE:"TOO_SHORT"===i?W.TOO_SHORT:"TOO_LONG"===i?W.TOO_LONG:"INVALID_LENGTH"===i?W.INVALID_LENGTH:W.IS_POSSIBLE}catch(e){return"INVALID_COUNTRY"===e.message?W.INVALID_COUNTRY_CODE:"TOO_SHORT"===e.message?W.TOO_SHORT:"TOO_LONG"===e.message?W.TOO_LONG:"INVALID_LENGTH"===e.message?W.INVALID_LENGTH:-99}},isValidNumber:function(e,t){t="string"==typeof t?t.toUpperCase():void 0;try{return T(e,t).isValid()}catch(e){return!1}},numberFormat:{E164:"E.164",INTERNATIONAL:"INTERNATIONAL",NATIONAL:"NATIONAL",RFC3966:"RFC3966"},numberType:je={FIXED_LINE:0,MOBILE:1,FIXED_LINE_OR_MOBILE:2,TOLL_FREE:3,PREMIUM_RATE:4,SHARED_COST:5,VOIP:6,PERSONAL_NUMBER:7,PAGER:8,UAN:9,VOICEMAIL:10,UNKNOWN:-1},validationError:W={IS_POSSIBLE:0,INVALID_COUNTRY_CODE:1,TOO_SHORT:2,TOO_LONG:3,IS_POSSIBLE_LOCAL_ONLY:4,INVALID_LENGTH:5},AsYouType:S};function a(e,t){t=Array.prototype.slice.call(t);return t.push(he),e.apply(this,t)}function R(e,t){e=e.split("-"),t=t.split("-");for(var i=e[0].split("."),n=t[0].split("."),a=0;a<3;a++){var o=Number(i[a]),s=Number(n[a]);if(s<o)return 1;if(o<s)return-1;if(!isNaN(o)&&isNaN(s))return 1;if(isNaN(o)&&!isNaN(s))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function e(e,t,i){t&&k(e.prototype,t),i&&k(e,i)}function n(e,t){i(this,n),this.type=e,this.metadata=t}function o(e,t){i(this,o),this._format=e,this.metadata=t}function s(e,t){i(this,s),this.globalMetadataObject=t,this.metadata=e,$.call(this,t.metadata)}function r(e){i(this,r);var t=e;if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!M(t)||!M(t.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(M(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+_e(t)+": "+t,"."));this.metadata=e,$.call(this,e)}function V(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function f(e,t){if((t=new x(t)).hasCountry(e))return t.country(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function $(e){e=e.version;"number"==typeof e?(this.v1=1===e,this.v2=2===e,this.v3=3===e,this.v4=4===e):e?-1===R(e,"1.2.0")?this.v2=!0:-1===R(e,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function l(e){return"([".concat("0-90-9٠-٩۰-۹","]{1,").concat(e,"})")}function F(){return";ext="+l("20")+"|[ \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[ \\t,-]*"+l("20")+"#?|[ \\t,]*(?:[xx##~~]|int|int)[:\\..]?[ \\t,-]*"+l("9")+"#?|[- ]+"+l("6")+"#|[ \\t]*(?:,{2}|;)[:\\..]?[ \\t,-]*"+l("15")+"#?|[ \\t]*(?:,)+[:\\..]?[ \\t,-]*"+l("9")+"#?"}function B(e){return 2<=e.length&&Te.test(e)}function U(e){return Ee[e]}function u(e){for(var t,i="",n=e.split(""),a=Array.isArray(n),o=0,n=a?n:n[Symbol.iterator]();;){if(a){if(o>=n.length)break;t=n[o++]}else{if((o=n.next()).done)break;t=o.value}var s=U(t);s&&(i+=s)}return i}function H(e){for(var t,i,n,a="",o=e.split(""),s=Array.isArray(o),r=0,o=s?o:o[Symbol.iterator]();;){if(s){if(r>=o.length)break;t=o[r++]}else{if((r=o.next()).done)break;t=r.value}a+=(n=a,"+"!==(i=t)?U(i):n?void 0:"+")||""}return a}function p(e,t){return function e(t,i,n){var a=n.type(i),o=a&&a.possibleLengths()||n.possibleLengths();if(!o)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===i){if(!n.type("FIXED_LINE"))return e(t,"MOBILE",n);n=n.type("MOBILE");n&&(o=function(e,t){for(var i,n=e.slice(),a=t,o=Array.isArray(a),s=0,a=o?a:a[Symbol.iterator]();;){if(o){if(s>=a.length)break;i=a[s++]}else{if((s=a.next()).done)break;i=s.value}var r=i;e.indexOf(r)<0&&n.push(r)}return n.sort(function(e,t){return e-t})}(o,n.possibleLengths()))}else if(i&&!a)return"INVALID_LENGTH";n=t.length,i=o[0];return i===n?"IS_POSSIBLE":n<i?"TOO_SHORT":o[o.length-1]<n?"TOO_LONG":0<=o.indexOf(n,1)?"IS_POSSIBLE":"INVALID_LENGTH"}(e,void 0,t)}function z(e,t){return"IS_POSSIBLE"===p(e,t)}function d(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function c(e,t,i){if(t=t||{},e.country){(i=new x(i)).selectNumberingPlan(e.country,e.countryCallingCode);var n=t.v2?e.nationalNumber:e.phone;if(d(n,i.nationalNumberPattern())){if(h(n,"FIXED_LINE",i))return i.type("MOBILE")&&""===i.type("MOBILE").pattern()||!i.type("MOBILE")||h(n,"MOBILE",i)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var a=0,o=ye;a<o.length;a++){var s=o[a];if(h(n,s,i))return s}}}}function h(e,t,i){return(t=i.type(t))&&t.pattern()&&!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&d(e,t.pattern())}function G(e){return e.replace(new RegExp("[".concat(I,"]+"),"g")," ").trim()}function j(e,t,i){var n=i.useInternationalFormat,a=i.withNationalPrefix,i=(i.carrierCode,i.metadata,e.replace(new RegExp(t.pattern()),n?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(be,t.nationalPrefixFormattingRule()):t.format()));return n?G(i):i}function g(e,t,i,n,a){var o=function(e,t){for(var i,n=e,a=Array.isArray(n),o=0,n=a?n:n[Symbol.iterator]();;){if(a){if(o>=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}var s=i;if(0<s.leadingDigitsPatterns().length){var r=s.leadingDigitsPatterns()[s.leadingDigitsPatterns().length-1];if(0!==t.search(r))continue}if(d(t,s.pattern()))return s}}(n.formats(),e);return o?j(e,o,{useInternationalFormat:"INTERNATIONAL"===i,withNationalPrefix:!o.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!a||!1!==a.nationalPrefix,carrierCode:t,metadata:n}):e}function m(e,t,i,n){return t?n(e,t,i):e}function q(e,t,i,n){if(t){n=new x(n),t=(n.selectNumberingPlan(t,i),new RegExp(n.IDDPrefix()));if(0===e.search(t)){i=(e=e.slice(e.match(t)[0].length)).match(xe);if(!(i&&null!=i[1]&&0<i[1].length&&"0"===i[1]))return e}}}function v(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var i=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),n=i.exec(e);if(n){var a,o,s=n.length-1,r=0<s&&n[s];if(t.nationalPrefixTransformRule()&&r)l=e.replace(i,t.nationalPrefixTransformRule()),1<s&&(a=n[1]);else{var i=n[0],l=e.slice(i.length);r&&(a=n[1])}if(r){s=e.indexOf(n[1]);e.slice(0,s)===t.numberingPlan.nationalPrefix()&&(o=t.numberingPlan.nationalPrefix())}else o=n[0];return{nationalNumber:l,nationalPrefix:o,carrierCode:a}}}return{nationalNumber:e}}function w(e,t){var i,n,a=v(e,t),o=a.nationalNumber,a=a.carrierCode;if(!(i=o,!d(e,(n=t).nationalNumberPattern())||d(i,n.nationalNumberPattern())))return{nationalNumber:e};if(e.length!==o.length+(a?a.length:0)&&t.possibleLengths())switch(p(o,t)){case"TOO_SHORT":case"INVALID_LENGTH":return{nationalNumber:e}}return{nationalNumber:o,carrierCode:a}}function K(e,t,i,n){var a=t?f(t,n):i;if(0===e.indexOf(a)){(n=new x(n)).selectNumberingPlan(t,i);var t=e.slice(a.length),i=w(t,n).nationalNumber,o=w(e,n).nationalNumber;if(!d(o,n.nationalNumberPattern())&&d(i,n.nationalNumberPattern())||"TOO_LONG"===p(o,n))return{countryCallingCode:a,number:t}}return{number:e}}function Y(e,t,i,n){if(e){if("+"!==e[0]){var a=q(e,t,i,n);if(!a||a===e){if(t||i){t=K(e,t,i,n),i=t.countryCallingCode,t=t.number;if(i)return{countryCallingCode:i,number:t}}return{number:e}}e="+"+a}if("0"!==e[1]){n=new x(n);for(var o=2;o-1<=3&&o<=e.length;){var s=e.slice(1,o);if(n.hasCallingCode(s))return n.selectNumberingPlan(s),{countryCallingCode:s,number:e.slice(o)};o++}}}return{}}function X(e,t,i){e=i.getCountryCodesForCallingCode(e);if(e)if(1===e.length)return e[0];else{var n=t;var a=i.metadata;a=new x(a);for(var o,s=e,r=Array.isArray(s),l=0,s=r?s:s[Symbol.iterator]();;){if(r){if(l>=s.length)break;o=s[l++]}else{if((l=s.next()).done)break;o=l.value}var d=o;if(a.country(d),a.leadingDigits()){if(n&&0===n.search(a.leadingDigits()))return d}else if(c({phone:n,country:d},void 0,a.metadata))return d}return}}function _(e,t,i){t=function(n){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},t=Object.keys(a);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):t).forEach(function(e){t=n,i=a[e=e],e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i;var t,i})}return n}({},t,{v2:!0});if(t=t||{},i=new x(i),t.defaultCountry&&!i.hasCountry(t.defaultCountry)){if(t.v2)throw new N("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var s=(e=function(e,t,i){if(e&&0===e.indexOf("tel:")){for(var n,a,o,s,r=e.replace(/^tel:/,"tel=").split(";"),l=Array.isArray(r),d=0,r=l?r:r[Symbol.iterator]();;){if(l){if(d>=r.length)break;o=r[d++]}else{if((d=r.next()).done)break;o=d.value}var c=function(e){if(Array.isArray(e))return e}(c=o.split("="))||function(e){var t=[],i=!0,n=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done)&&(t.push(o.value),2!==t.length);i=!0);}catch(e){n=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(n)throw a}}return t}(c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}(),u=c[0],p=c[1];switch(u){case"tel":n=p;break;case"ext":a=p;break;case"phone-context":"+"===p[0]&&(n=p+n)}}return B(n)?(s={number:n},a&&(s.ext=a),s):{}}return(s=function(e,t,i){if(e){if(!(250<e.length))return!1===t?e:(t=e.search(Ae))<0?void 0:e.slice(t).replace(Me,"");if(i)throw new N("TOO_LONG")}}(e,i,t))?B(s)?(e=function(e){var t=e.search(D);if(t<0)return{};for(var i=e.slice(0,t),n=e.match(D),a=1;a<n.length;){if(n[a])return{number:i,ext:n[a]};a++}}(s)).ext?e:{number:s}:Ce.test(s)?{error:"TOO_SHORT"}:{}:{}}(e,t.v2,t.extract)).number,n=e.ext,e=e.error;if(!s){if(t.v2){if("TOO_SHORT"===e)throw new N("TOO_SHORT");throw new N("NOT_A_NUMBER")}return{}}var a,o=(e=function(e,t,i){var n,a=Y(H(s),e,t,i.metadata),o=a.countryCallingCode,a=a.number;if(o)i.selectNumberingPlan(o);else{if(!a||!e&&!t)return{};i.selectNumberingPlan(e,t),e&&(n=e),o=t||f(e,i.metadata)}return a?(e=(t=w(H(a),i)).nationalNumber,a=t.carrierCode,(t=X(o,e,i))&&"001"!==(n=t)&&i.country(n),{country:n,countryCallingCode:o,nationalNumber:e,carrierCode:a}):{countryCallingCode:o}}(t.defaultCountry,t.defaultCallingCode,i)).country,r=e.nationalNumber,l=e.countryCallingCode,e=e.carrierCode;if(!i.hasSelectedNumberingPlan()){if(t.v2)throw new N("INVALID_COUNTRY");return{}}if(!r||r.length<2){if(t.v2)throw new N("TOO_SHORT");return{}}if(17<r.length){if(t.v2)throw new N("TOO_LONG");return{}}return t.v2?(a=new P(l,r,i.metadata),o&&(a.country=o),e&&(a.carrierCode=e),n&&(a.ext=n),a):(a=!!(t.extended?i.hasSelectedNumberingPlan():o)&&d(r,i.nationalNumberPattern()),t.extended?{country:o,countryCallingCode:l,carrierCode:e,valid:a,possible:!!a||!(!0!==t.extended||!i.possibleLengths()||!z(r,i)),phone:r,ext:n}:a?(l={country:o,phone:r},n&&(l.ext=n),l):{})}function J(e){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(){var e=C(arguments);return _(e.text,e.options,e.metadata)}function C(e){var t,i,e=function(e){if(Array.isArray(e))return e}(e=Array.prototype.slice.call(e))||function(e){var t=[],i=!0,n=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done)&&(t.push(o.value),4!==t.length);i=!0);}catch(e){n=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(n)throw a}}return t}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}(),n=e[0],a=e[1],o=e[2],e=e[3];if("string"!=typeof n)throw new TypeError("A text for parsing must be a string.");if(n=n,a&&"string"!=typeof a){if(!Le(a))throw new Error("Invalid second argument: ".concat(a));i=o?(t=a,o):a}else i=e?(t=o,e):(t=void 0,o),a&&(t=function(n){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},t=Object.keys(a);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):t).forEach(function(e){t=n,i=a[e=e],e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i;var t,i})}return n}({defaultCountry:a},t));return{text:n,options:t,metadata:i}}function T(){return a(Z,arguments)}function Q(e,t,i){t&&t.defaultCountry&&!(n=t.defaultCountry,void 0!==i.countries[n])&&(t=function(n){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},t=Object.keys(a);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):t).forEach(function(e){t=n,i=a[e=e],e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i;var t,i})}return n}({},t,{defaultCountry:void 0}));var n;try{return _(e,t,i)}catch(e){if(!(e instanceof N))throw e}}function ee(n){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},t=Object.keys(a);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):t).forEach(function(e){t=n,i=a[e=e],e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i;var t,i})}return n}function te(){var e=C(arguments),t=e.text,i=e.options,e=e.metadata,t=Q(t,ee({},i,{extract:!1}),e);return t&&t.isPossible()||!1}function ie(e,t,i){if(t[e])return new P(e,t[e],i)}function ne(n){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},t=Object.keys(a);(t="function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):t).forEach(function(e){t=n,i=a[e=e],e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i;var t,i})}return n}function ae(){var e=C(arguments),t=e.text,i=e.options,n=e.metadata,i=ne({},i,{extract:!1});try{var a=_(t,i,n),o=((n=new x(n)).selectNumberingPlan(a.countryCallingCode),p(a.nationalNumber,n));if("IS_POSSIBLE"!==o)return o}catch(e){if(e instanceof N)return e.message;throw e}}function E(e,t){if(t<1)return"";for(var i="";1<t;)1&t&&(i+=e),t>>=1,e+=e;return i+e}function oe(e,t){")"===e[t]&&t++;for(var i=e.slice(0,t),n=[],a=0;a<i.length;)"("===i[a]?n.push(a):")"===i[a]&&n.pop(),a++;var o=0,s="";n.push(i.length);for(var r=0,l=n;r<l.length;r++){var d=l[r];s+=i.slice(o,d),o=d+1}return s}function se(e,t,i){var n=i.metadata,a=i.useNationalPrefixFormattingRule,i=i.getSeparatorAfterNationalPrefix,n=j(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:a,metadata:n});if(a||(e.nationalPrefix?n=e.nationalPrefix+i(t)+n:e.complexPrefixBeforeNationalSignificantNumber&&(n=e.complexPrefixBeforeNationalSignificantNumber+" "+n)),a=e,u(n)===a.getNationalDigits())return n}function re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function le(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function de(e,t,i){t&&le(e.prototype,t),i&&le(e,i)}function y(e){re(this,y),this.matchTree=(new We).parse(e)}function b(){re(this,b)}function ce(e,t,i){t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i}function ue(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=[],n=!0,a=!1,o=void 0;try{for(var s,r=e[Symbol.iterator]();!(n=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){a=!0,o=e}finally{try{n||null==r.return||r.return()}finally{if(a)throw o}}return i}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e){return Ge.call(this,e,fe)}var he,fe,I,N,ge,x,A,me,ve,we,M,_e,L,Ce,Te,D,Ee,ye,be,Se,Ie,P,Ne,xe,Ae,Me,Le,De,O,Pe,Oe,We,Re,ke,Ve,$e,Fe,Be,Ue,He,ze,Ge,je,W,qe}()},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(i=i(4))&&i.__esModule?i:{default:i};function a(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=window.lpIntlTelInputUtils,i=(a(s.prototype,[{key:"addEventListener",value:function(e,t){"input"===e&&(this._oninput=t)}},{key:"getSelectedCountry",value:function(){return(this._iti.getSelectedCountryData().iso2||this.options.initialCountry||"US").toUpperCase()}},{key:"_onInput",value:function(e){var t=new o.AsYouType(this.getSelectedCountry()).input(e.target.value);")"===t[t.length-1]&&(t=t.replace(/[\(|\)]/g,"")),this._iti.getNumber()!==t&&this._iti.setNumber(t),"function"==typeof this._oninput&&this._oninput(e)}},{key:"iti",get:function(){return this._iti}},{key:"value",get:function(){return this.options.nationalMode?this._iti.getNumber(o.numberFormat.NATIONAL):this._iti.getNumber()},set:function(e){e=new o.AsYouType(this.getSelectedCountry()).input(e);this._iti.setNumber(e)}},{key:"oninput",set:function(e){this._oninput=e}}]),s);function s(e,t){if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");this.options=t||{},this.inputEl=e,this._iti=(0,n.default)(e,t),this.value=this.inputEl.value,this._iti.telInput.oninput=this._onInput.bind(this)}t.default=i,e.exports=t.default},function(e,t,i){var n=function(a){"use strict";for(var o=[["Afghanistan (افغانستان)","af","93"],["Albania (Shqipëri)","al","355"],["Algeria (الجزائر)","dz","213"],["American Samoa","as","1",5,["684"]],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1",6,["264"]],["Antigua and Barbuda","ag","1",7,["268"]],["Argentina","ar","54"],["Armenia (Հայաստան)","am","374"],["Aruba","aw","297"],["Ascension Island","ac","247"],["Australia","au","61",0],["Austria (Österreich)","at","43"],["Azerbaijan (Azərbaycan)","az","994"],["Bahamas","bs","1",8,["242"]],["Bahrain (البحرين)","bh","973"],["Bangladesh (বাংলাদেশ)","bd","880"],["Barbados","bb","1",9,["246"]],["Belarus (Беларусь)","by","375"],["Belgium (België)","be","32"],["Belize","bz","501"],["Benin (Bénin)","bj","229"],["Bermuda","bm","1",10,["441"]],["Bhutan (འབྲུག)","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina (Босна и Херцеговина)","ba","387"],["Botswana","bw","267"],["Brazil (Brasil)","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1",11,["284"]],["Brunei","bn","673"],["Bulgaria (България)","bg","359"],["Burkina Faso","bf","226"],["Burundi (Uburundi)","bi","257"],["Cambodia (កម្ពុជា)","kh","855"],["Cameroon (Cameroun)","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde (Kabu Verdi)","cv","238"],["Caribbean Netherlands","bq","599",1,["3","4","7"]],["Cayman Islands","ky","1",12,["345"]],["Central African Republic (République centrafricaine)","cf","236"],["Chad (Tchad)","td","235"],["Chile","cl","56"],["China (中国)","cn","86"],["Christmas Island","cx","61",2,["89164"]],["Cocos (Keeling) Islands","cc","61",1,["89162"]],["Colombia","co","57"],["Comoros (جزر القمر)","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia (Hrvatska)","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus (Κύπρος)","cy","357"],["Czech Republic (Česká republika)","cz","420"],["Denmark (Danmark)","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1",13,["767"]],["Dominican Republic (República Dominicana)","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt (مصر)","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea (Guinea Ecuatorial)","gq","240"],["Eritrea","er","291"],["Estonia (Eesti)","ee","372"],["Eswatini","sz","268"],["Ethiopia","et","251"],["Falkland Islands (Islas Malvinas)","fk","500"],["Faroe Islands (Føroyar)","fo","298"],["Fiji","fj","679"],["Finland (Suomi)","fi","358",0],["France","fr","33"],["French Guiana (Guyane française)","gf","594"],["French Polynesia (Polynésie française)","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia (საქართველო)","ge","995"],["Germany (Deutschland)","de","49"],["Ghana (Gaana)","gh","233"],["Gibraltar","gi","350"],["Greece (Ελλάδα)","gr","30"],["Greenland (Kalaallit Nunaat)","gl","299"],["Grenada","gd","1",14,["473"]],["Guadeloupe","gp","590",0],["Guam","gu","1",15,["671"]],["Guatemala","gt","502"],["Guernsey","gg","44",1,["1481","7781","7839","7911"]],["Guinea (Guinée)","gn","224"],["Guinea-Bissau (Guiné Bissau)","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong (香港)","hk","852"],["Hungary (Magyarország)","hu","36"],["Iceland (Ísland)","is","354"],["India (भारत)","in","91"],["Indonesia","id","62"],["Iran (ایران)","ir","98"],["Iraq (العراق)","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2,["1624","74576","7524","7924","7624"]],["Israel (ישראל)","il","972"],["Italy (Italia)","it","39",0],["Jamaica","jm","1",4,["876","658"]],["Japan (日本)","jp","81"],["Jersey","je","44",3,["1534","7509","7700","7797","7829","7937"]],["Jordan (الأردن)","jo","962"],["Kazakhstan (Казахстан)","kz","7",1,["33","7"]],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait (الكويت)","kw","965"],["Kyrgyzstan (Кыргызстан)","kg","996"],["Laos (ລາວ)","la","856"],["Latvia (Latvija)","lv","371"],["Lebanon (لبنان)","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya (ليبيا)","ly","218"],["Liechtenstein","li","423"],["Lithuania (Lietuva)","lt","370"],["Luxembourg","lu","352"],["Macau (澳門)","mo","853"],["North Macedonia (Македонија)","mk","389"],["Madagascar (Madagasikara)","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania (موريتانيا)","mr","222"],["Mauritius (Moris)","mu","230"],["Mayotte","yt","262",1,["269","639"]],["Mexico (México)","mx","52"],["Micronesia","fm","691"],["Moldova (Republica Moldova)","md","373"],["Monaco","mc","377"],["Mongolia (Монгол)","mn","976"],["Montenegro (Crna Gora)","me","382"],["Montserrat","ms","1",16,["664"]],["Morocco (المغرب)","ma","212",0],["Mozambique (Moçambique)","mz","258"],["Myanmar (Burma) (မြန်မာ)","mm","95"],["Namibia (Namibië)","na","264"],["Nauru","nr","674"],["Nepal (नेपाल)","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia (Nouvelle-Calédonie)","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger (Nijar)","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea (조선 민주주의 인민 공화국)","kp","850"],["Northern Mariana Islands","mp","1",17,["670"]],["Norway (Norge)","no","47",0],["Oman (عُمان)","om","968"],["Pakistan (پاکستان)","pk","92"],["Palau","pw","680"],["Palestine (فلسطين)","ps","970"],["Panama (Panamá)","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru (Perú)","pe","51"],["Philippines","ph","63"],["Poland (Polska)","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar (قطر)","qa","974"],["Réunion (La Réunion)","re","262",0],["Romania (România)","ro","40"],["Russia (Россия)","ru","7",0],["Rwanda","rw","250"],["Saint Barthélemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1",18,["869"]],["Saint Lucia","lc","1",19,["758"]],["Saint Martin (Saint-Martin (partie française))","mf","590",2],["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)","pm","508"],["Saint Vincent and the Grenadines","vc","1",20,["784"]],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé and Príncipe (São Tomé e Príncipe)","st","239"],["Saudi Arabia (المملكة العربية السعودية)","sa","966"],["Senegal (Sénégal)","sn","221"],["Serbia (Србија)","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1",21,["721"]],["Slovakia (Slovensko)","sk","421"],["Slovenia (Slovenija)","si","386"],["Solomon Islands","sb","677"],["Somalia (Soomaaliya)","so","252"],["South Africa","za","27"],["South Korea (대한민국)","kr","82"],["South Sudan (جنوب السودان)","ss","211"],["Spain (España)","es","34"],["Sri Lanka (ශ්රී ලංකාව)","lk","94"],["Sudan (السودان)","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1,["79"]],["Sweden (Sverige)","se","46"],["Switzerland (Schweiz)","ch","41"],["Syria (سوريا)","sy","963"],["Taiwan (台灣)","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand (ไทย)","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1",22,["868"]],["Tunisia (تونس)","tn","216"],["Turkey (Türkiye)","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1",23,["649"]],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1",24,["340"]],["Uganda","ug","256"],["Ukraine (Україна)","ua","380"],["United Arab Emirates (الإمارات العربية المتحدة)","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan (Oʻzbekiston)","uz","998"],["Vanuatu","vu","678"],["Vatican City (Città del Vaticano)","va","39",1,["06698"]],["Venezuela","ve","58"],["Vietnam (Việt Nam)","vn","84"],["Wallis and Futuna (Wallis-et-Futuna)","wf","681"],["Western Sahara (الصحراء الغربية)","eh","212",1,["5288","5289"]],["Yemen (اليمن)","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1,["18"]]],e=0;e<o.length;e++){var t=o[e];o[e]={name:t[0],iso2:t[1],dialCode:t[2],priority:t[3]||0,areaCodes:t[4]||null}}function i(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var n,s={getInstance:function(e){e=e.getAttribute("data-lp-intl-tel-input-id");return window.lpIntlTelInputGlobals.instances[e]},instances:{},documentReady:function(){return"complete"===document.readyState}},r=("object"==typeof window&&(window.lpIntlTelInputGlobals=s),0),l={allowDropdown:!0,autoHideDialCode:!0,autoPlaceholder:"polite",customContainer:"",customPlaceholder:null,dropdownContainer:null,excludeCountries:[],formatOnDisplay:!0,geoIpLookup:null,hiddenInput:"",initialCountry:"",localizedCountries:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,utilsScript:""},d=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],c=function(e,t){for(var i=Object.keys(e),n=0;n<i.length;n++)t(i[n],e[i[n]])},u=function(t){c(window.lpIntlTelInputGlobals.instances,function(e){window.lpIntlTelInputGlobals.instances[e][t]()})},p=(i((n=h).prototype,[{key:"_init",value:function(){var i=this;if(this.options.nationalMode&&(this.options.autoHideDialCode=!1),this.options.separateDialCode&&(this.options.autoHideDialCode=this.options.nationalMode=!1),this.isMobile=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.isMobile&&(document.body.classList.add("iti-mobile"),this.options.dropdownContainer||(this.options.dropdownContainer=document.body)),"undefined"!=typeof Promise){var e=new Promise(function(e,t){i.resolveAutoCountryPromise=e,i.rejectAutoCountryPromise=t}),t=new Promise(function(e,t){i.resolveUtilsScriptPromise=e,i.rejectUtilsScriptPromise=t});this.promise=Promise.all([e,t])}else this.resolveAutoCountryPromise=this.rejectAutoCountryPromise=function(){},this.resolveUtilsScriptPromise=this.rejectUtilsScriptPromise=function(){};this.selectedCountryData={},this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests()}},{key:"_processCountryData",value:function(){this._processAllCountries(),this._processCountryCodes(),this._processPreferredCountries(),this.options.localizedCountries&&this._translateCountriesByLocale(),(this.options.onlyCountries.length||this.options.localizedCountries)&&this.countries.sort(this._countryNameSort)}},{key:"_addCountryCode",value:function(e,t,i){t.length>this.countryCodeMaxLen&&(this.countryCodeMaxLen=t.length),this.countryCodes.hasOwnProperty(t)||(this.countryCodes[t]=[]);for(var n=0;n<this.countryCodes[t].length;n++)if(this.countryCodes[t][n]===e)return;i=i!==a?i:this.countryCodes[t].length;this.countryCodes[t][i]=e}},{key:"_processAllCountries",value:function(){if(this.options.onlyCountries.length){var t=this.options.onlyCountries.map(function(e){return e.toLowerCase()});this.countries=o.filter(function(e){return-1<t.indexOf(e.iso2)})}else if(this.options.excludeCountries.length){var i=this.options.excludeCountries.map(function(e){return e.toLowerCase()});this.countries=o.filter(function(e){return-1===i.indexOf(e.iso2)})}else this.countries=o}},{key:"_translateCountriesByLocale",value:function(){for(var e=0;e<this.countries.length;e++){var t=this.countries[e].iso2.toLowerCase();this.options.localizedCountries.hasOwnProperty(t)&&(this.countries[e].name=this.options.localizedCountries[t])}}},{key:"_countryNameSort",value:function(e,t){return e.name.localeCompare(t.name)}},{key:"_processCountryCodes",value:function(){this.countryCodeMaxLen=0,this.dialCodes={},this.countryCodes={};for(var e=0;e<this.countries.length;e++){var t=this.countries[e];this.dialCodes[t.dialCode]||(this.dialCodes[t.dialCode]=!0),this._addCountryCode(t.iso2,t.dialCode,t.priority)}for(var i=0;i<this.countries.length;i++){var n=this.countries[i];if(n.areaCodes)for(var a=this.countryCodes[n.dialCode][0],o=0;o<n.areaCodes.length;o++){for(var s=n.areaCodes[o],r=1;r<s.length;r++){var l=n.dialCode+s.substr(0,r);this._addCountryCode(a,l),this._addCountryCode(n.iso2,l)}this._addCountryCode(n.iso2,n.dialCode+s)}}}},{key:"_processPreferredCountries",value:function(){this.preferredCountries=[];for(var e=0;e<this.options.preferredCountries.length;e++){var t=this.options.preferredCountries[e].toLowerCase(),t=this._getCountryData(t,!1,!0);t&&this.preferredCountries.push(t)}}},{key:"_createEl",value:function(e,t,i){var n=document.createElement(e);return t&&c(t,function(e,t){return n.setAttribute(e,t)}),i&&i.appendChild(n),n}},{key:"_generateMarkup",value:function(){this.telInput.hasAttribute("autocomplete")||this.telInput.form&&this.telInput.form.hasAttribute("autocomplete")||this.telInput.setAttribute("autocomplete","off");var e="iti",e=(this.options.allowDropdown&&(e+=" iti--allow-dropdown"),this.options.separateDialCode&&(e+=" iti--separate-dial-code"),this.options.customContainer&&(e=e+" "+this.options.customContainer),this._createEl("div",{class:e}));if(this.telInput.parentNode.insertBefore(e,this.telInput),this.flagsContainer=this._createEl("div",{class:"iti__flag-container"},e),e.appendChild(this.telInput),this.selectedFlag=this._createEl("div",{class:"iti__selected-flag",role:"combobox","aria-controls":"iti-".concat(this.id,"__country-listbox"),"aria-owns":"iti-".concat(this.id,"__country-listbox"),"aria-expanded":"false"},this.flagsContainer),this.selectedFlagInner=this._createEl("div",{class:"iti__flag"},this.selectedFlag),this.options.separateDialCode&&(this.selectedDialCode=this._createEl("div",{class:"iti__selected-dial-code"},this.selectedFlag)),this.options.allowDropdown&&(this.selectedFlag.setAttribute("tabindex","0"),this.dropdownArrow=this._createEl("div",{class:"iti__arrow"},this.selectedFlag),this.countryList=this._createEl("ul",{class:"iti__country-list iti__hide",id:"iti-".concat(this.id,"__country-listbox"),role:"listbox","aria-label":"List of countries"}),this.preferredCountries.length&&(this._appendListItems(this.preferredCountries,"iti__preferred",!0),this._createEl("li",{class:"iti__divider",role:"separator","aria-disabled":"true"},this.countryList)),this._appendListItems(this.countries,"iti__standard"),(this.options.dropdownContainer?(this.dropdown=this._createEl("div",{class:"iti iti--container"}),this.dropdown):this.flagsContainer).appendChild(this.countryList)),this.options.hiddenInput){var t=this.options.hiddenInput,i=this.telInput.getAttribute("name");if(i){var n=i.lastIndexOf("[");-1!==n&&(t="".concat(i.substr(0,n),"[").concat(t,"]"))}this.hiddenInput=this._createEl("input",{type:"hidden",name:t}),e.appendChild(this.hiddenInput)}}},{key:"_appendListItems",value:function(e,t,i){for(var n="",a=0;a<e.length;a++)var o=e[a],s=i?"-preferred":"",n=(n=(n=(n+="<li class='iti__country ".concat(t,"' tabIndex='-1' id='iti-").concat(this.id,"__item-").concat(o.iso2).concat(s,"' role='option' data-lp-dial-code='").concat(o.dialCode,"' data-lp-country-code='").concat(o.iso2,"' aria-selected='false'>"))+"<div class='iti__flag-box'><div class='iti__flag iti__".concat(o.iso2,"'></div></div>"))+"<span class='iti__country-name'>".concat(o.name,"</span>"))+"<span class='iti__dial-code'>+".concat(o.dialCode,"</span>")+"</li>";this.countryList.insertAdjacentHTML("beforeend",n)}},{key:"_setInitialState",value:function(){var e=this.telInput.getAttribute("value"),t=this.telInput.value,t=!e||"+"!==e.charAt(0)||t&&"+"===t.charAt(0)?t:e,e=this._getDialCode(t),i=this._isRegionlessNanp(t),n=this.options,a=n.initialCountry,o=n.nationalMode,s=n.autoHideDialCode,n=n.separateDialCode;e&&!i?this._updateFlagFromNumber(t):"auto"!==a&&(a?this._setFlag(a.toLowerCase()):e&&i?this._setFlag("us"):(this.defaultCountry=(this.preferredCountries.length?this.preferredCountries:this.countries)[0].iso2,t||this._setFlag(this.defaultCountry)),t||o||s||n||(this.telInput.value="+".concat(this.selectedCountryData.dialCode))),t&&this._updateValFromNumber(t)}},{key:"_initListeners",value:function(){this._initKeyListeners(),this.options.autoHideDialCode&&this._initBlurListeners(),this.options.allowDropdown&&this._initDropdownListeners(),this.hiddenInput&&this._initHiddenInputListener()}},{key:"_initHiddenInputListener",value:function(){var e=this;this._handleHiddenInputSubmit=function(){e.hiddenInput.value=e.getNumber()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleHiddenInputSubmit)}},{key:"_getClosestLabel",value:function(){for(var e=this.telInput;e&&"LABEL"!==e.tagName;)e=e.parentNode;return e}},{key:"_initDropdownListeners",value:function(){var t=this,e=(this._handleLabelClick=function(e){t.countryList.classList.contains("iti__hide")?t.telInput.focus():e.preventDefault()},this._getClosestLabel());e&&e.addEventListener("click",this._handleLabelClick),this._handleClickSelectedFlag=function(){!t.countryList.classList.contains("iti__hide")||t.telInput.disabled||t.telInput.readOnly||t._showDropdown()},this.selectedFlag.addEventListener("click",this._handleClickSelectedFlag),this._handleFlagsContainerKeydown=function(e){t.countryList.classList.contains("iti__hide")&&-1!==["ArrowUp","Up","ArrowDown","Down"," ","Enter"].indexOf(e.key)&&(e.preventDefault(),e.stopPropagation(),t._showDropdown()),"Tab"===e.key&&t._closeDropdown()},this.flagsContainer.addEventListener("keydown",this._handleFlagsContainerKeydown)}},{key:"_initRequests",value:function(){var e=this;this.options.utilsScript&&!window.lpIntlTelInputUtils?window.lpIntlTelInputGlobals.documentReady()?window.lpIntlTelInputGlobals.loadUtils(this.options.utilsScript):window.addEventListener("load",function(){window.lpIntlTelInputGlobals.loadUtils(e.options.utilsScript)}):this.resolveUtilsScriptPromise(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.resolveAutoCountryPromise()}},{key:"_loadAutoCountry",value:function(){window.lpIntlTelInputGlobals.autoCountry?this.handleAutoCountry():window.lpIntlTelInputGlobals.startedLoadingAutoCountry||(window.lpIntlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup(function(e){window.lpIntlTelInputGlobals.autoCountry=e.toLowerCase(),setTimeout(function(){return u("handleAutoCountry")})},function(){return u("rejectAutoCountryPromise")}))}},{key:"_initKeyListeners",value:function(){var e=this;this._handleKeyupEvent=function(){e._updateFlagFromNumber(e.telInput.value)&&e._triggerCountryChange()},this.telInput.addEventListener("keyup",this._handleKeyupEvent),this._handleClipboardEvent=function(){setTimeout(e._handleKeyupEvent)},this.telInput.addEventListener("cut",this._handleClipboardEvent),this.telInput.addEventListener("paste",this._handleClipboardEvent)}},{key:"_cap",value:function(e){var t=this.telInput.getAttribute("maxlength");return t&&e.length>t?e.substr(0,t):e}},{key:"_initBlurListeners",value:function(){var e=this;this._handleSubmitOrBlurEvent=function(){e._removeEmptyDialCode()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.addEventListener("blur",this._handleSubmitOrBlurEvent)}},{key:"_removeEmptyDialCode",value:function(){if("+"===this.telInput.value.charAt(0)){var e=this._getNumeric(this.telInput.value);e&&this.selectedCountryData.dialCode!==e||(this.telInput.value="")}}},{key:"_getNumeric",value:function(e){return e.replace(/\D/g,"")}},{key:"_trigger",value:function(e){var t=document.createEvent("Event");t.initEvent(e,!0,!0),this.telInput.dispatchEvent(t)}},{key:"_showDropdown",value:function(){this.countryList.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._setDropdownPosition(),this.activeItem&&(this._highlightListItem(this.activeItem,!1),this._scrollTo(this.activeItem,!0)),this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}},{key:"_toggleClass",value:function(e,t,i){i&&!e.classList.contains(t)?e.classList.add(t):!i&&e.classList.contains(t)&&e.classList.remove(t)}},{key:"_setDropdownPosition",value:function(){var e=this;if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.isMobile){var t=this.telInput.getBoundingClientRect(),i=window.pageYOffset||document.documentElement.scrollTop,n=t.top+i,a=this.countryList.offsetHeight,o=n+this.telInput.offsetHeight+a<i+window.innerHeight,i=i<n-a;if(this._toggleClass(this.countryList,"iti__country-list--dropup",!o&&i),this.options.dropdownContainer){a=!o&&i?0:this.telInput.offsetHeight;this.dropdown.style.top="".concat(n+a,"px"),this.dropdown.style.left="".concat(t.left+document.body.scrollLeft,"px"),this._handleWindowScroll=function(){return e._closeDropdown()},window.addEventListener("scroll",this._handleWindowScroll)}}}},{key:"_getClosestListItem",value:function(e){for(var t=e;t&&t!==this.countryList&&!t.classList.contains("iti__country");)t=t.parentNode;return t===this.countryList?null:t}},{key:"_bindDropdownListeners",value:function(){var t=this,e=(this._handleMouseoverCountryList=function(e){e=t._getClosestListItem(e.target);e&&t._highlightListItem(e,!1)},this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList),this._handleClickCountryList=function(e){e=t._getClosestListItem(e.target);e&&t._selectListItem(e)},this.countryList.addEventListener("click",this._handleClickCountryList),!0),i=(this._handleClickOffToClose=function(){e||t._closeDropdown(),e=!1},document.documentElement.addEventListener("click",this._handleClickOffToClose),""),n=null;this._handleKeydownOnDropdown=function(e){e.preventDefault(),"ArrowUp"===e.key||"Up"===e.key||"ArrowDown"===e.key||"Down"===e.key?t._handleUpDownKey(e.key):"Enter"===e.key?t._handleEnterKey():"Escape"===e.key?t._closeDropdown():/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(e.key)&&(n&&clearTimeout(n),i+=e.key.toLowerCase(),t._searchForCountry(i),n=setTimeout(function(){i=""},1e3))},document.addEventListener("keydown",this._handleKeydownOnDropdown)}},{key:"_handleUpDownKey",value:function(e){var t="ArrowUp"===e||"Up"===e?this.highlightedItem.previousElementSibling:this.highlightedItem.nextElementSibling;t&&(t.classList.contains("iti__divider")&&(t="ArrowUp"===e||"Up"===e?t.previousElementSibling:t.nextElementSibling),this._highlightListItem(t,!0))}},{key:"_handleEnterKey",value:function(){this.highlightedItem&&this._selectListItem(this.highlightedItem)}},{key:"_searchForCountry",value:function(e){for(var t=0;t<this.countries.length;t++)if(this._startsWith(this.countries[t].name,e)){var i=this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(this.countries[t].iso2));this._highlightListItem(i,!1),this._scrollTo(i,!0);break}}},{key:"_startsWith",value:function(e,t){return e.substr(0,t.length).toLowerCase()===t}},{key:"_updateValFromNumber",value:function(e){var t,i,n;this.options.formatOnDisplay&&window.lpIntlTelInputUtils&&this.selectedCountryData&&(t=!this.options.separateDialCode&&(this.options.nationalMode||"+"!==e.charAt(0)),i=(n=lpIntlTelInputUtils.numberFormat).NATIONAL,n=n.INTERNATIONAL,e=lpIntlTelInputUtils.formatNumber(e,this.selectedCountryData.iso2,t?i:n));e=this._beforeSetNumber(e),this.telInput.value=e}},{key:"_updateFlagFromNumber",value:function(e){var t=this.selectedCountryData.dialCode,i=(e&&this.options.nationalMode&&"1"===t&&"+"!==e.charAt(0)&&("1"!==e.charAt(0)&&(e="1".concat(e)),e="+".concat(e)),this.options.separateDialCode&&t&&"+"!==e.charAt(0)&&(e="+".concat(t).concat(e)),this._getDialCode(e,!0)),n=this._getNumeric(e),a=null;if(i){var o=this.countryCodes[this._getNumeric(i)],i=-1!==o.indexOf(this.selectedCountryData.iso2)&&n.length<=i.length-1;if(!("1"===t&&this._isRegionlessNanp(n)||i))for(var s=0;s<o.length;s++)if(o[s]){a=o[s];break}}else"+"===e.charAt(0)&&n.length?a="":e&&"+"!==e||(a=this.defaultCountry);return null!==a&&this._setFlag(a)}},{key:"_isRegionlessNanp",value:function(e){var e=this._getNumeric(e);return"1"===e.charAt(0)&&(e=e.substr(1,3),-1!==d.indexOf(e))}},{key:"_highlightListItem",value:function(e,t){var i=this.highlightedItem;i&&i.classList.remove("iti__highlight"),this.highlightedItem=e,this.highlightedItem.classList.add("iti__highlight"),t&&this.highlightedItem.focus()}},{key:"_getCountryData",value:function(e,t,i){for(var n=t?o:this.countries,a=0;a<n.length;a++)if(n[a].iso2===e)return n[a];if(i)return null;throw new Error("No country data for '".concat(e,"'"))}},{key:"_setFlag",value:function(e){var t=this.selectedCountryData.iso2?this.selectedCountryData:{},i=(this.selectedCountryData=e?this._getCountryData(e,!1,!1):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.selectedFlagInner.setAttribute("class","iti__flag iti__".concat(e)),e?"".concat(this.selectedCountryData.name,": +").concat(this.selectedCountryData.dialCode):"Unknown");if(this.selectedFlag.setAttribute("title",i),this.options.separateDialCode){i=this.selectedCountryData.dialCode?"+".concat(this.selectedCountryData.dialCode):"",i=(this.selectedDialCode.innerHTML=i,this.selectedFlag.offsetWidth||this._getHiddenSelectedFlagWidth());this.telInput.style.paddingLeft="".concat(i+6,"px")}if(this._updatePlaceholder(),this.options.allowDropdown){i=this.activeItem;if(i&&(i.classList.remove("iti__active"),i.setAttribute("aria-selected","false")),e){i=this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(e,"-preferred"))||this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(e));i.setAttribute("aria-selected","true"),i.classList.add("iti__active"),this.activeItem=i,this.selectedFlag.setAttribute("aria-activedescendant",i.getAttribute("id"))}}return t.iso2!==e}},{key:"_getHiddenSelectedFlagWidth",value:function(){var e=this.telInput.parentNode.cloneNode(),t=(e.style.visibility="hidden",document.body.appendChild(e),this.flagsContainer.cloneNode()),i=(e.appendChild(t),this.selectedFlag.cloneNode(!0)),t=(t.appendChild(i),i.offsetWidth);return e.parentNode.removeChild(e),t}},{key:"_updatePlaceholder",value:function(){var e="aggressive"===this.options.autoPlaceholder||!this.hadInitialPlaceholder&&"polite"===this.options.autoPlaceholder;if(window.lpIntlTelInputUtils&&e){e=lpIntlTelInputUtils.numberType[this.options.placeholderNumberType],e=this.selectedCountryData.iso2?lpIntlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,e):"",e=this._beforeSetNumber(e);"function"==typeof this.options.customPlaceholder&&(e=this.options.customPlaceholder(e,this.selectedCountryData)),this.telInput.setAttribute("placeholder",e)}}},{key:"_selectListItem",value:function(e){var t=this._setFlag(e.getAttribute("data-lp-country-code")),e=(this._closeDropdown(),this._updateDialCode(e.getAttribute("data-lp-dial-code"),!0),this.telInput.focus(),this.telInput.value.length);this.telInput.setSelectionRange(e,e),t&&this._triggerCountryChange()}},{key:"_closeDropdown",value:function(){this.countryList.classList.add("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","false"),this.dropdownArrow.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._handleKeydownOnDropdown),document.documentElement.removeEventListener("click",this._handleClickOffToClose),this.countryList.removeEventListener("mouseover",this._handleMouseoverCountryList),this.countryList.removeEventListener("click",this._handleClickCountryList),this.options.dropdownContainer&&(this.isMobile||window.removeEventListener("scroll",this._handleWindowScroll),this.dropdown.parentNode)&&this.dropdown.parentNode.removeChild(this.dropdown),this._trigger("close:countrydropdown")}},{key:"_scrollTo",value:function(e,t){var i=this.countryList,n=window.pageYOffset||document.documentElement.scrollTop,a=i.offsetHeight,o=i.getBoundingClientRect().top+n,s=o+a,r=e.offsetHeight,e=e.getBoundingClientRect().top+n,n=e+r,l=e-o+i.scrollTop,d=a/2-r/2;if(e<o)t&&(l-=d),i.scrollTop=l;else if(s<n){t&&(l+=d);i.scrollTop=l-(a-r)}}},{key:"_updateDialCode",value:function(e,t){var i=this.telInput.value,e="+".concat(e);if("+"===i.charAt(0))var n=this._getDialCode(i),n=n?i.replace(n,e):e;else{if(this.options.nationalMode||this.options.separateDialCode)return;if(i)n=e+i;else{if(!t&&this.options.autoHideDialCode)return;n=e}}this.telInput.value=n}},{key:"_getDialCode",value:function(e,t){var i="";if("+"===e.charAt(0))for(var n="",a=0;a<e.length;a++){var o=e.charAt(a);if(!isNaN(parseInt(o,10))){if(n+=o,t)this.countryCodes[n]&&(i=e.substr(0,a+1));else if(this.dialCodes[n]){i=e.substr(0,a+1);break}if(n.length===this.countryCodeMaxLen)break}}return i}},{key:"_getFullNumber",value:function(){var e=this.telInput.value.trim(),t=this.selectedCountryData.dialCode,i=this._getNumeric(e);return(this.options.separateDialCode&&"+"!==e.charAt(0)&&t&&i?"+".concat(t):"")+e}},{key:"_beforeSetNumber",value:function(e){var t;this.options.separateDialCode&&this._getDialCode(e)&&(t=" "===e[(t="+".concat(this.selectedCountryData.dialCode)).length]||"-"===e[t.length]?t.length+1:t.length,e=e.substr(t));return this._cap(e)}},{key:"_triggerCountryChange",value:function(){this._trigger("countrychange")}},{key:"handleAutoCountry",value:function(){"auto"===this.options.initialCountry&&(this.defaultCountry=window.lpIntlTelInputGlobals.autoCountry,this.telInput.value||this.setCountry(this.defaultCountry),this.resolveAutoCountryPromise())}},{key:"handleUtils",value:function(){window.lpIntlTelInputUtils&&(this.telInput.value&&this._updateValFromNumber(this.telInput.value),this._updatePlaceholder()),this.resolveUtilsScriptPromise()}},{key:"destroy",value:function(){var e=this.telInput.form;if(this.options.allowDropdown){this._closeDropdown(),this.selectedFlag.removeEventListener("click",this._handleClickSelectedFlag),this.flagsContainer.removeEventListener("keydown",this._handleFlagsContainerKeydown);var t=this._getClosestLabel();t&&t.removeEventListener("click",this._handleLabelClick)}this.hiddenInput&&e&&e.removeEventListener("submit",this._handleHiddenInputSubmit),this.options.autoHideDialCode&&(e&&e.removeEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.removeEventListener("blur",this._handleSubmitOrBlurEvent)),this.telInput.removeEventListener("keyup",this._handleKeyupEvent),this.telInput.removeEventListener("cut",this._handleClipboardEvent),this.telInput.removeEventListener("paste",this._handleClipboardEvent),this.telInput.removeAttribute("data-lp-intl-tel-input-id");t=this.telInput.parentNode;t.parentNode.insertBefore(this.telInput,t),t.parentNode.removeChild(t),delete window.lpIntlTelInputGlobals.instances[this.id]}},{key:"getExtension",value:function(){return window.lpIntlTelInputUtils?lpIntlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""}},{key:"getNumber",value:function(e){var t;return window.lpIntlTelInputUtils?(t=this.selectedCountryData.iso2,lpIntlTelInputUtils.formatNumber(this._getFullNumber(),t,e)):""}},{key:"getNumberType",value:function(){return window.lpIntlTelInputUtils?lpIntlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99}},{key:"getSelectedCountryData",value:function(){return this.selectedCountryData}},{key:"getValidationError",value:function(){var e;return window.lpIntlTelInputUtils?(e=this.selectedCountryData.iso2,lpIntlTelInputUtils.getValidationError(this._getFullNumber(),e)):-99}},{key:"isValidNumber",value:function(){var e=this._getFullNumber().trim(),t=this.options.nationalMode?this.selectedCountryData.iso2:"";return window.lpIntlTelInputUtils?lpIntlTelInputUtils.isValidNumber(e,t):null}},{key:"setCountry",value:function(e){e=e.toLowerCase();this.selectedFlagInner.classList.contains("iti__".concat(e))||(this._setFlag(e),this._updateDialCode(this.selectedCountryData.dialCode,!1),this._triggerCountryChange())}},{key:"setNumber",value:function(e){var t=this._updateFlagFromNumber(e);this._updateValFromNumber(e),t&&this._triggerCountryChange()}},{key:"setPlaceholderNumberType",value:function(e){this.options.placeholderNumberType=e,this._updatePlaceholder()}}]),Object.defineProperty(n,"prototype",{writable:!1}),h);function h(e,t){var i=this;if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");this.id=r++,this.telInput=e,this.activeItem=null,this.highlightedItem=null;var n=t||{};this.options={},c(l,function(e,t){i.options[e]=n.hasOwnProperty(e)?n[e]:t}),this.hadInitialPlaceholder=Boolean(e.getAttribute("placeholder"))}s.getCountryData=function(){return o};function f(e,t,i){var n=document.createElement("script");n.onload=function(){u("handleUtils"),t&&t()},n.onerror=function(){u("rejectUtilsScriptPromise"),i&&i()},n.className="iti-load-utils",n.async=!0,n.src=e,document.body.appendChild(n)}return s.loadUtils=function(i){if(!window.lpIntlTelInputUtils&&!window.lpIntlTelInputGlobals.startedLoadingUtilsScript){if(window.lpIntlTelInputGlobals.startedLoadingUtilsScript=!0,"undefined"!=typeof Promise)return new Promise(function(e,t){return f(i,e,t)});f(i)}return null},s.defaults=l,s.version="18.2.2",function(e,t){t=new p(e,t);return t._init(),e.setAttribute("data-lp-intl-tel-input-id",t.id),window.lpIntlTelInputGlobals.instances[t.id]=t}};e.exports?e.exports=n():window.lpIntlTelInput=n()}],n={},a.m=i,a.c=n,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(i,n,function(e){return t[e]}.bind(null,n));return i},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0));function a(e){var t;return(n[e]||(t=n[e]={i:e,l:!1,exports:{}},i[e].call(t.exports,t,t.exports,a),t.l=!0,t)).exports}}.call(window.lpTag);window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.ThemeConfiguratorFactory=function(e,t){t=t||{};var i=lpTag.unifiedWindow.ThemeConfigurationTranslator,n=lpTag.unifiedWindow.ThemeConfigurator,a=lpTag.unifiedWindow.applicationUtils;t.clone=void 0===t.clone||t.clone;return new n(e=(e=t.clone?a.cloneObj(e||{}):e)&&"2.0"!==e.v?(new i).translate(e):e)};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.ThemeConfiguration=lpTag.unifiedWindow.ThemeConfiguration||{};lpTag.unifiedWindow.ThemeConfiguration.styleInference={mainArea:{"background-color":[{target:"surveyArea"},{target:"dialogArea"},{target:"transcriptArea"}]},transcript_message:{"font-family":[{target:"surveyArea"},{target:"dialogArea"}],color:[{target:"cancel_button"},{target:"surveyArea"},{target:"dialogArea"}]},top:{"background-color":[{target:"button"},{target:"close_survey_button"},{target:"star",prop:"color"}]},top_text:{color:[{target:"button"},{target:"close_survey_button"}]},transcript_bubble_agent:{"border-color":[{target:"transcript_bubble_agentArrowBorder",prop:"border-right-color",override:!0}],"background-color":[{target:"transcript_bubble_agentArrow",prop:"border-right-color",override:!0}]},transcript_bubble_visitor:{"border-color":[{target:"transcript_bubble_visitorArrowBorder",prop:"border-left-color",override:!0}],"background-color":[{target:"transcript_bubble_visitorArrow",prop:"border-left-color",override:!0}]},input:{"border-radius":[{target:"mainArea"},{target:"maximizedWindow"},{target:"surveyArea"},{target:"dialogArea"},{target:"actionsMenu"},{target:"sliderMaximizedWindow"}]}};lpTag.unifiedWindow.ThemeConfiguration.options={ICON_SET:{name:"icon_set",query:'[data-lp-type="icon"]',values:{DARK:{name:"dark",cssClass:"lp_icon-dark"},BRIGHT:{name:"bright",cssClass:"lp_icon-white"}}},MINIMIZE_ICON:{name:"minimize_icon",query:'[data-lp-point="minimize_icon"]',values:{DEFAULT:{name:"default",cssClass:"lp_minimize-icon"},CHEVRON:{name:"chevron",cssClass:"lp_chevron-icon"}}},LOCATION:{name:"location",values:{TOP_LEFT:{name:"top_left",cssClass:"lp_top-left"},TOP_RIGHT:{name:"top_right",cssClass:"lp_top-right"},MIDDLE_RIGHT:{name:"middle_right",cssClass:"lp_middle-right"},BOTTOM_RIGHT:{name:"bottom_right",cssClass:"lp_bottom-right"},BOTTOM_LEFT:{name:"bottom_left",cssClass:"lp_bottom-left"},MIDDLE_LEFT:{name:"middle_left",cssClass:"lp_middle-left"}}},TOP_TEXT:{name:"top_text"},TRANSCRIPT_BUBBLE_VISITOR_TEXT:{name:"transcript_bubble_visitor_text"},TRANSCRIPT_BUBBLE_AGENT_TEXT:{name:"transcript_bubble_agent_text"},TRANSCRIPT_TIME:{name:"transcript_time"},TRANSCRIPT_MESSAGE:{name:"transcript_message"},INPUT_TEXT:{name:"input_text"},ACTIONSMENU_ACTIONITEM_TEXT:{name:"actionsMenu_actionItem_text"},TRANSCRIPT_BUBBLE_RICH_CONTENT:{name:"transcript_bubble_rich_content"},TRANSCRIPT_BUBBLE_VISITOR_PARENT:{name:"transcript_bubble_visitor_parent",query:'[data-lp-cust-id = "transcript_bubble_visitor"]',values:{DEFAULT:{name:"default",cssClass:"lp_chat_line"},CURVY:{name:"curvy",cssClass:"lp_new_chat_line"}}},TRANSCRIPT_BUBBLE_VISITOR_ARROW_BORDER_PARENT:{name:"transcript_bubble_visitor_parent",query:'[data-lp-cust-id = "transcript_bubble_visitorArrowBorder"]',values:{DEFAULT:{name:"default",cssClass:"lp_chat_arrow_border"},CURVY:{name:"curvy",cssClass:"lpHide"}}},TRANSCRIPT_BUBBLE_VISITOR_ARROW_PARENT:{name:"transcript_bubble_visitor_parent",query:'[data-lp-cust-id = "transcript_bubble_visitorArrow"]',values:{DEFAULT:{name:"default",cssClass:"lp_chat_arrow"},CURVY:{name:"curvy",cssClass:"lpHide"}}},TRANSCRIPT_BUBBLE_AGENT_PARENT:{name:"transcript_bubble_agent_parent",query:'[data-lp-cust-id = "transcript_bubble_agent"]',values:{DEFAULT:{name:"default",cssClass:"lp_chat_line"},CURVY:{name:"curvy",cssClass:"lp_new_chat_line"}}},TRANSCRIPT_BUBBLE_AGENT_ARROW_BORDER_PARENT:{name:"transcript_bubble_agent_parent",query:'[data-lp-cust-id = "transcript_bubble_agentArrowBorder"]',values:{DEFAULT:{name:"default",cssClass:"lp_chat_arrow_border"},CURVY:{name:"curvy",cssClass:"lpHide"}}},TRANSCRIPT_BUBBLE_AGENT_ARROW_PARENT:{name:"transcript_bubble_agent_parent",query:'[data-lp-cust-id = "transcript_bubble_agentArrow"]',values:{DEFAULT:{name:"default",cssClass:"lp_chat_arrow"},CURVY:{name:"curvy",cssClass:"lpHide"}}}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.ThemeConfigurationTranslator=function(){var r=lpTag.unifiedWindow.ThemeConfigurator,l=lpTag.unifiedWindow.ThemeConfiguration,a=lpTag.unifiedWindow.AWCUtils;function d(e,t,i,n){a.isStyleColorProperty(t)?n.setStyle(e,t,"{{colors."+i+"}}"):"image"===t?n.setProperty(e,"src",i):"font"===t?n.setStyle(e,t,"{{fonts."+i+"}}"):n.setStyle(e,t,i)}function c(e){if(e)return-1<e.indexOf("_white")?l.options.ICON_SET.values.BRIGHT.name:-1<e.indexOf("_normal")?l.options.ICON_SET.values.DARK.name:void 0}return{translate:function(e){if("2.0"===e.v)return e;var t=e,i=new r;t.style&&!function e(t,i,n){var a;n=n||"";if("object"==typeof t)for(var o in a=t)"object"!=typeof a[o]?d(n,o,a[o],i):e(a[o],i,(n&&n+"_")+o)}(t.style,i);if(t.iconSet)for(var n in t.iconSet)i.setOption(n,l.option.ICON_SET.name,t.iconSet[n]);t.meta&&i.setMeta(t.meta);var a=c((e=i).getProperty("top_minimizeButton","src")),o=c(e.getProperty("input_buttonEnabled","src"));e.removeItem("top_minimizeButton");e.removeItem("top_closeButton");e.removeItem("input_buttonEnabled");e.removeItem("input_buttonDisabled");var s=e.getStyle("transcriptArea","background-color");void 0!==s&&e.setStyle("mainArea","background-color",s);e.removeItem("transcriptArea");void 0!==a&&e.setOption("top",l.options.ICON_SET.name,a);void 0!==o&&e.setOption("input",l.options.ICON_SET.name,o);return i.getConfiguration()}}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.ThemeConfigurator=function(e){var s,r,l=lpTag.unifiedWindow.AWCUtils,d=lpTag.unifiedWindow.applicationUtils;r=e&&"2.0"===e.v?e.config:{};s=e&&e.meta||{};function c(e,t,i,n,a){n=d.trim(""+n);if("style"===t&&void 0===n)p(e,t,i);else if(void 0===i)p(e,t);else if(a||!r[e]||!r[e].attrs||!r[e].attrs[t]||!r[e].attrs[t][i]){r[e]=r[e]||{};r[e].attrs=r[e].attrs||{};r[e].attrs[t]=r[e].attrs[t]||{};if("style"===t){a=i;a=l.isStyleColorProperty(a)?"colors":"font-family"===a?"fonts":void 0;if(n&&!n.match(/\{\{(.*)\}\}/)&&a){var o=function(e,t){if(s&&s[e]){for(var i in s[e])if(s[e][i]===t)return i;for(var n=1;;n++)if(!s[e][n])return n}return 1}(a,n);u(a,o,n);r[e].attrs[t][i]="{{"+[a,o].join(".")+"}}"}else r[e].attrs[t][i]=n}else r[e].attrs[t]=i}}function o(e,t,i){if(void 0!==r[e]&&void 0!==r[e].attrs)return void 0!==r[e].attrs[t]&&void 0!==i?h(r[e].attrs[t][i]):h(r[e].attrs[t])}function i(e,t){if(void 0!==s&&void 0!==s[e])return s[e][t]}function u(e,t,i){(s=s||{})[e]=s[e]||{};s[e][t]=i}function p(e,t,i){if(r[e]&&r[e].attrs&&r[e].attrs[t])if(void 0===i)delete r[e].attrs[t];else{delete r[e].attrs[t][i];d.isEmptyLiteral(r[e].attrs[t])&&delete r[e].attrs[t];d.isEmptyLiteral(r[e].attrs)&&delete r[e].attrs;d.isEmptyLiteral(r[e])&&delete r[e]}}function n(e,t,i){for(var n,a=d.objectKeysAsArray(e[i]),o=1,s=0;s<a.length;s++){n=a[s];if(-1===t.indexOf("{{"+i+"."+n+"}}"))delete e[i][n];else{t=t.replace(new RegExp("{{"+i+"."+n+"}}","g"),"{{"+i+"."+o+"}}");e[i][o]=e[i][n];n!=o&&delete e[i][n];o++}}return t}function h(e){var t;return"string"==typeof e&&(t=e.match(/\{\{(.*)\}\}/))&&2===t.length?i((t=t[1].split("."))[0],t[1]):e}return{removeItem:function(e){r[e]&&delete r[e]},setProperty:c,getProperty:o,getAvailableAttributes:function(e){var t=[];if(r[e]&&r[e].attrs)for(var i in r[e].attrs)t.push(i);return t},setStyle:function e(t,i,n,a){a="boolean"!=typeof a||a;if("object"==typeof i)for(var o in i)e(t,o,i[o],a);else c(t,"style",i,n,a)},getStyle:function(e,t){if(void 0===t&&r[e]&&r[e].attrs&&r[e].attrs.style){var i,n,a={};for(n in r[e].attrs.style){i=h(r[e].attrs.style[n]);a[n]=i}return a}return o(e,"style",t)},setOption:function(e,t,i){r[e]=r[e]||{};r[e].options=r[e].options||{};r[e].options[t]=i},getOption:function(e,t){if(void 0!==r[e]&&void 0!==r[e].options)return h(r[e].options[t])},setMetaProperty:u,setMeta:function(e){s=d.cloneObj(e)},getMetaProperty:i,getConfiguration:function(e){(e=e||{}).normalize=void 0===e.normalize||e.normalize;var t={config:r,v:"2.0"};void 0!==s&&(t.meta=s);if(e.normalize){var e=t,i=d.cloneObj(e.meta),e=JSON.stringify(e);e=n(i,e,"colors");e=n(i,e,"fonts");(e=JSON.parse(e)).meta=i;return e}return t}}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.Themer=function(e,t,i){var C,T,_,E,n,y,b="data-lp-cust-id",S="data-lp-type",a=lpTag.unifiedWindow.AWCUtils,I=lpTag.unifiedWindow.applicationUtils,N=lpTag.unifiedWindow.ThemeConfiguratorFactory,x=lpTag.unifiedWindow.ThemeConfiguration,o=lpTag.taglets.lpSecureStorage,s=lpTag.unifiedWindow.log,A={},M=!1,r={},l=6e5,d={csds:{leCdnDomain:"leCdnDomain"},storage:{appName:"themerStorage",valueKeys:{overridenFontInStorage:"overridenFontInStorage_$_"+document.URL}}};T=t||{};_=i||{};C=new N(e);n=T.accountId;var c={transcript_bubble_visitor:x.options.TRANSCRIPT_BUBBLE_VISITOR_TEXT.name,transcript_bubble_agent:x.options.TRANSCRIPT_BUBBLE_AGENT_TEXT.name,transcript_time:x.options.TRANSCRIPT_TIME.name,transcript_message:x.options.TRANSCRIPT_MESSAGE.name,top:x.options.TOP_TEXT.name,input:x.options.INPUT_TEXT.name,actionsMenu:x.options.ACTIONSMENU_ACTIONITEM_TEXT.name,transcript_bubble_rich_content:x.options.TRANSCRIPT_BUBBLE_RICH_CONTENT};y=!!T.enableStrictCspMode;Object.keys(c).forEach(function(e){var t=C.getOption(e,c[e]);void 0!==t&&t&&(A[c[e]]=t);t&&"transcript_bubble_agent"===e&&(A.transcript_bubble_rich_content=!0)});if(0!==Object.keys(A).length){!function(){r.secureStorageDomain=lpTag&&lpTag.csds&&lpTag.csds.getDomain(d.csds.leCdnDomain);r.secureStorageLocation=function(e){var t=window.lpTag.taglets.lpSecureStorage.v;return"https://"+e+"/le_secure_storage/"+(t||"")}(r.secureStorageDomain)}();!function(e,t){o.getValue({key:d.storage.valueKeys.overridenFontInStorage,appName:d.storage.appName,site:n,domain:r.secureStorageLocation,success:e,error:t,firstParty:!0})}(g,m)}function u(e,t){var i=(t=t||{removeThemeAttrs:!0}).configuration?new N(t.configuration):C,n=i,a=n.getProperty("logoAltText","alt"),o=n.getProperty("logoAltText","title"),s=n.getProperty("logoTarget","title");a!==o&&n.setProperty("logoAltText","title",a);a!==s&&n.setProperty("logoTarget","title",a);void 0===n.getProperty("agentImage","src")&&n.setProperty("agentImage","src",T.agentUrl);void 0===n.getProperty("logoImage","src")&&n.setProperty("logoImage","src",T.logoUrl);void 0===n.getOption("input",x.options.ICON_SET.name)&&n.setOption("input",x.options.ICON_SET.name,x.options.ICON_SET.values.DARK.name);o=n.getOption("action",x.options.ICON_SET.name);void 0===n.getOption("actionsMenu",x.options.ICON_SET.name)&&void 0!==o&&n.setOption("actionsMenu",x.options.ICON_SET.name,o);M||Object.keys(A).forEach(function(e){if("string"==typeof E&&0<E.length){n.setProperty(e,"style","font-family",E,!0);M=!0}});var r,l,d,c,u,p=n,h=lpTag.unifiedWindow.ThemeConfiguration.styleInference;for(u in h)for(var f in l=h[u]){d=l[f];if(void 0!==(r=p.getStyle(u,[f])))for(var g=0;g<d.length;g++){c=d[g];p.setStyle(c.target,c.prop||f,r,c.override||!1)}}var m,v=e.querySelectorAll("["+b+"]");L(e,i);for(var w=0;w<v.length;w++){L(m=v[w],i);if(t.removeThemeAttrs){_=void 0;var _=m;_.removeAttribute(b);_.removeAttribute(S)}}}function L(e,t){var i=e.getAttribute(b);if(i&&!_[i]){for(var n=e,a=i,o=t,s=o.getAvailableAttributes(a),r=0;r<s.length;r++)if("style"===s[r])if(y){var l,d=o.getStyle(a);for(l in d)d.hasOwnProperty(l)&&(n.style[l]=d[l])}else if(n.getAttribute("style")){var c=function(e,t){var i,n=function(e){var t,e=e.getAttribute("style"),i={};if(e)for(var n=e.split(";"),a=0;a<n.length;a++)if(n[a].length){t=n[a];t=n[a].split(":");i[t[0]]=t[1]}return i}(e);for(i in t)n[i]=t[i];return D(n)}(n,o.getStyle(a));n.setAttribute(s[r],c)}else n.setAttribute(s[r],D(o.getStyle(a)));else"src"===s[r]&&"IMG"===n.tagName?n.setAttribute(s[r],function(e){var t=T.imagesRepository;return t&&null===e.match(/^http[s]*/)?[t,e].join("/"):e}(o.getProperty(a,"src"))):n.setAttribute(s[r],o.getProperty(a,s[r]));var u,p,h,f,g=e,m=i,v=t,w=x.options;for(f in w){u=w[f];h=u.query?g.querySelectorAll(u.query):g;p=v.getOption(m,u.name);!function(e,t,i){var n,a,o=[];for(a in t)t[a].name===i?n=t[a].cssClass:o.push(t[a].cssClass);if(void 0!==n){e=I.isNodeList(e)?e:[e];for(var s=0;s<e.length;s++){I.addClassByArray(e[s],n);I.removeClassByArray(e[s],o)}}}(h,u.values,p)}}}function D(e){var t,i=[];for(t in e)i.push(t+":"+e[t]);return i.join(";")}function p(e,t,i){o.setValue({key:d.storage.valueKeys.overridenFontInStorage,appName:d.storage.appName,site:n,value:e,domain:r.secureStorageLocation,ttl:l,success:t,error:i,firstParty:!0})}function h(e){s.debug("Successfully added value to Secure storage for accountId: "+n+" key: "+d.storage.valueKeys.overridenFontInStorage+" value :"+e)}function f(e){s.error("Secure storage transaction failed with error ",e)}function g(e){if(e&&"string"==typeof e&&0<e.length){s.debug("Successfully retrieved value from Secure storage for accountId: "+n+" key: "+d.storage.valueKeys.overridenFontInStorage+" value :"+e);E=e}else p(E=v(),h,f)}function m(e){s.error("Secure storage transaction failed with error ",e);p(E=v(),h,f)}function v(){var e,i,n={},a="",o=0;e=document,e=Array.prototype.slice.call(e.getElementsByTagName("*"),0),i=["META","STYLE","SCRIPT"];e.filter(function(e){if(e&&e.className&&("string"==typeof e.className||e.className instanceof String)&&-1<e.className.indexOf("lp_")||("string"==typeof e.nodeName||e.nodeName instanceof String)&&-1<i.indexOf(e.nodeName))return!1;if(e.hasChildNodes())for(var t=0;t<e.childNodes.length;t++)if(1===e.childNodes[t].nodeType)return!1;return!0}).forEach(function(e){if(t=e,"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName){t="font-family";e=window.getComputedStyle(e,null).getPropertyValue(t);n[e]=1<=n[e]?n[e]+1:1;o<=n[e]&&"system-ui"!==e&&(o=n[a=e])}var t});return a}return{processHTML:function(e,t){y&&"string"==typeof e&&(e=function(e){"string"==typeof e&&(e=(e=e.replace(/(<[^>]+) style=".*?"/gi,"$1")).replace(/<[^>]+ style=".*?" \/>/gi,function(e){return e.replace(/ style=".*?"/gi,"")}));return e}(e));u(e=a.createDomContainer(e),t);return e.innerHTML},processDomEl:u,getStyle:function(e,t){return C.getStyle(e,t)}}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.defaultStyle={v:"2.0",config:{logo:{attrs:{style:{"text-align":"left","background-color":"{{colors.3}}"}}},transcript_time:{attrs:{style:{color:"{{colors.6}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},transcript_bubble_visitor:{attrs:{style:{"background-color":"{{colors.3}}","border-color":"{{colors.4}}"}}},actionsMenu_actionItem_text:{attrs:{style:{color:"{{colors.7}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},input_text:{attrs:{style:{color:"{{colors.2}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},transcript_bubble_agent_text:{attrs:{style:{color:"{{colors.3}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},agent:{attrs:{style:{"background-color":"{{colors.3}}"}}},transcript_message:{attrs:{style:{color:"{{colors.6}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},transcript_bubble_visitor_text:{attrs:{style:{color:"{{colors.5}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},transcript_bubble_visitorArrowBorder:{attrs:{style:{"border-left-color":"{{colors.4}}"}}},transcript_bubble_agent:{attrs:{style:{"background-color":"{{colors.1}}","border-color":"{{colors.4}}"}}},mainArea:{attrs:{style:{"background-color":"{{colors.3}}"}}},transcript_bubble_agentArrowBorder:{attrs:{style:{"border-right-color":"{{colors.4}}"}}},input:{attrs:{style:{color:"{{colors.6}}","font-style":"normal","background-color":"{{colors.3}}","font-family":"{{fonts.1}}","font-weight":"normal"}},options:{icon_set:"dark"}},transcript_bubble_visitorArrow:{attrs:{style:{"border-left-color":"{{colors.3}}"}}},actionsMenu:{attrs:{style:{"background-color":"{{colors.3}}"}}},action:{options:{icon_set:"dark"}},top_text:{attrs:{style:{color:"{{colors.3}}","font-style":"normal","font-family":"{{fonts.1}}","font-weight":"normal"}}},transcript_bubble_agentArrow:{attrs:{style:{"border-right-color":"{{colors.1}}"}}},top:{attrs:{style:{"background-color":"{{colors.1}}"}},options:{icon_set:"bright"}}},meta:{colors:{3:"#FFFFFF",2:"#000000",1:"#0363ad",7:"#6d6e71",6:"#6D6E70",5:"#404041",4:"#b6b6b6",8:"#134cd1"},fonts:{1:"Arial,Helvetica,sans-serif"}}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.AWCUtils=function(){var i=lpTag.unifiedWindow.applicationUtils;return{createDomContainer:function(e){var t=document.createElement("div");i.isDomNode(e)?t.appendChild(e):t.innerHTML=e;return t},isStyleColorProperty:function(e){for(var t=["background-color","border-left-color","border-right-color","border-top-color","border-bottom-color","border-color","color"],i=0;i<t.length;i++)if(t[i]===e)return!0;return!1}}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.accessibilityManager=lpTag.unifiedWindow.accessibilityManager||function(e){var t,i=lpTag.unifiedWindow.log,n=!1,a=!1;o(e);function o(e){if(e.unifiedConf.keyboardOnlyFocus){a=!0;l();document.addEventListener("keydown",s);r.bind(this)}}function s(e){var t=document.activeElement;setTimeout(function(e){r(e[0],e[1])},100,[e,t])}function r(e,t){if(t!==document.activeElement){i.info("Keyboard changed input from "+t.text+" to "+document.activeElement.text);d();n=!0;document.removeEventListener("keydown",s)}}function l(){(t=document.createElement("style")).type="text/css";t.textContent="#lpChat *:focus {outline: none !important}";document.head.appendChild(t)}function d(){t&&(t.textContent="")}return{init:o,checkForKeyboardNavigation:s,hideFocus:l,showFocus:d,getKeyboardNavigationDetected:function(){return n},getKeyboardOnlyFocus:function(){return a}}};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.soundManager=function(e,o,s,r){var l,d,a,c,u,p,h,f,g,m=lpTag.unifiedWindow.log,v='audio[data-lp-point="audio_tag"]',w={NEW_LINE_MIN:{fileName:"systemSoundEffect"},NEW_LINE_MAX:{fileName:"kpSoundEffect"}},_=1;!function(e,t,i){l=i.audioRepository;u=t;p=e.uiModel;h=lpTag.unifiedWindow.uiModelPath;f=i.poppedOut;g=i.external;d=function(){var e=!!document.createElement("audio").canPlayType;0;return e&&u.isAudioSupported()}();a=function(){var e;if(d){e="mp3";!function(){var e=document.createElement("audio"),t=!(!e.canPlayType||!e.canPlayType('audio/wav; codecs="1"').replace(/no/,""));e=null;return t}()||(e="wav")}return e}();c=!!a;e.chatModel.bind(lpTag.unifiedWindow.chatModelPath.LINES,y,this,!1);if(c)for(var n in w)w.hasOwnProperty(n)&&!function(e){var t;if(e.fileName)if(t=document.querySelector(v)){e.audioTag=t;T(e)()}else C(d?{template:"<audio data-lp-point='audio_tag' controls hidden preload='auto' aria-live='polite'></audio>",callback:T(e)}:{template:"<object data-lp-point='audio_tag' classid='clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6' style='display:none;'><param name='uimode' value='invisible'><param name='autostart' value='false'></object>",callback:T(e)})}(w[n])}(e,o,s);function C(t){var i=document.createElement("audio");i.style.position="absolute";i.style.left="-1000px";i.style.top="-1000px";t.templateFile?lpTag.unifiedWindow.BaseViewController.prototype.loadResource(t.templateFile,e):e(t.template);function e(e){t.template=e;i.innerHTML=t.template;document.body.appendChild(i);t.callback&&"function"==typeof t.callback&&t.callback.call(null,i)}}function T(t){return function(){t.audioTag||(t.audioTag=document.querySelector(v));if(t.audioTag&&!s.connectorsSfConfig){var e=l+"/"+t.fileName+"."+a;d?t.audioTag.src=e:t.audioTag.url=e;d&&setTimeout(function(){t.audioTag.volume=0;try{var e=t.audioTag.play();void 0!==e&&e.then(function(){},function(e){m.info("Cannot play sound")})}catch(e){m.info("Cannot play sound")}},10)}}}function n(e){var t,i=e,n=document.querySelector('track[data-lp-point="track_tag"]');if(n)t=n;else{t=document.createElement("track");i.audioTag.appendChild(t)}t.kind="captions";t.setAttribute("data-lp-point","track_tag");if(i==w.NEW_LINE_MAX){t.src=l+"/kpSoundEffectCaption.vtt";t.label="pop";i.audioTag.setAttribute("aria-label","Conversation Notification")}else if(i==w.NEW_LINE_MIN){t.src=l+"/systemSoundEffectCaption.vtt";t.label="ping";i.audioTag.setAttribute("aria-label","Conversation System Notification")}if(c&&(u.isDesktop()||u.isAndroid())&&p.get(h.WINDOW_SOUND)&&(!f&&E()||f&&!E()||g)&&e.audioTag&&!s.connectorsSfConfig&&!(r&&r.isSupported&&r.nativeEnabled()&&r.permissionGranted()&&o.isMobile()))if(d){e.audioTag.volume=_;try{var a=e.audioTag.play();void 0!==a&&a.then(function(){},function(e){m.info("Cannot play sound")})}catch(e){m.info("Cannot play sound")}}else e.audioTag.controls.play()}function E(){return p.get(h.WINDOW_EMBEDDED)}function y(e){var t=!1;if(e&&e.newValue)for(var i=0;i<e.newValue.length;i++)"agent"!==e.newValue[i].source||e.newValue[i].history||(t=!0);t&&(p.get(h.WINDOW_MAXIMIZED)?n(w.NEW_LINE_MAX):n(w.NEW_LINE_MIN))}};function SurveyManager(s){if(this===window||!s||!s.rootElem||!s.survey)return!1;var a,o,t=s&&s.startTabIndex||500,r=N(),l=[],d=[],c=new lpTag.taglets.SurveyLogic(s.survey),u={question:"q_",checkbox:"cb_",radioButton:"rb_",select:"sel_",textArea:"txar_",input:"txt_",label:"lbl_"},p="error",h={info:"lp_survey_info",error:"lp_error",success:"lp_success"},f=function(e){for(var t=document.createDocumentFragment(),i=0;i<e.length;i++){var n=e[i],a=function(e){var t=document.createElement("DIV");t.style.display="none";t.className="lp_question";t.setAttribute("id",u.question+e.id);var i=document.createElement("LABEL");i.setAttribute("id",u.label+e.id);i.className="lp_question_label";i.appendChild(document.createTextNode(e.label));if(e.mandatory){e=document.createElement("SPAN");e.innerHTML="*";e.className="mandatory";i.appendChild(e)}t.appendChild(i);d.push(t);return t}(n);switch(n.type){case c.questionTypes.SELECT:a.appendChild(function(n){var a=document.createElement("SELECT");a.className="select-field";a.setAttribute("tabIndex",N());a.setAttribute("aria-labelledby",u.label+n.id);if(n.mandatory){a.setAttribute("aria-required","true");a.setAttribute("required","true")}var e=[{value:s.defaultSelect||"pick one..."}];e=e.concat(n.entry);for(var t=0;t<e.length;t++){var i=e[t],o=document.createElement("OPTION");o.setAttribute("value",i.value);o.innerHTML=this.sanitizeText(i.value).text;!0!==i.checked&&"true"!=i.checked||o.setAttribute("selected","selected");a.appendChild(o)}w(a,"change",function(e){var t=a,i=n.id;t=t.value;S(i,t)});return a}(n));break;case c.questionTypes.CHECKBOX:!function(o,e){for(var t=0;t<o.entry.length;t++){var i=o.entry[t],n=document.createElement("div"),a=(n.className="checkbox-button",y("cb")),s=document.createElement("input");s.setAttribute("type","checkbox");s.setAttribute("value",i.value);s.setAttribute("name",u.checkbox+o.id);s.setAttribute("id",a);s.setAttribute("aria-describedby",u.label+o.id);s.setAttribute("tabIndex",N());if(o.mandatory){s.setAttribute("aria-required","true");s.setAttribute("required","true")}!0!==i.checked&&"true"!=i.checked||s.setAttribute("checked","checked");n.appendChild(s);s=document.createElement("LABEL");s.innerHTML=this.sanitizeText(i.value).text;s.setAttribute("for",a);n.appendChild(s);e.appendChild(n)}w(e,"click",function(e){for(var t=o.id,i=[],n=document.getElementsByName(u.checkbox+t),a=0;a<n.length;a++)!n[a].checked&&!0!==n[a].getAttribute("checked")&&"checked"!=n[a].getAttribute("checked")||i.push(n[a].value);S(t,i)})}(n,a);break;case c.questionTypes.RADIO:case c.questionTypes.RADIOH:!function(n,e){for(var t=0;t<n.entry.length;t++){var i=n.entry[t],a=document.createElement("div"),o=(a.className="radio-button",y("rb")),s=document.createElement("input");s.setAttribute("type","radio");s.setAttribute("value",i.value);s.setAttribute("name",u.radioButton+n.id);s.setAttribute("id",o);s.setAttribute("aria-describedby",u.label+n.id);s.setAttribute("tabIndex",N());!0!==i.checked&&"true"!=i.checked||s.setAttribute("checked","checked");if(n.mandatory){s.setAttribute("aria-required","true");s.setAttribute("required","true")}a.appendChild(s);s=document.createElement("LABEL");void 0!==i.displayValue?s.innerHTML=i.displayValue:s.innerHTML=this.sanitizeText(i.value).text;s.setAttribute("for",o);a.appendChild(s);e.appendChild(a)}w(e,"click",function(e){var t,i=n.id;(e=(e=e||event).target||e.srcElement).value?t=e.value:"LABEL"===e.nodeName&&(t=document.getElementById(e.getAttribute("for")).value);t&&S(i,t)})}(n,a);break;case c.questionTypes.TEXT:a.appendChild(function(e){var t=document.createElement("TEXTAREA");t.className="textarea-field";t.setAttribute("tabIndex",N());t.setAttribute("aria-labelledby",u.label+e.id);if(e.mandatory){t.setAttribute("aria-required","true");t.setAttribute("required","true")}e.lastKnownValue&&(t.value=e.lastKnownValue);w(t,"keyup",function(){b(t,e.id)});return t}(n));break;case c.questionTypes.TEXTF:a.appendChild(function(e){var t=document.createElement("INPUT");t.className="input-field";t.setAttribute("tabIndex",N());t.setAttribute("aria-labelledby",u.label+e.id);if(e.mandatory){t.setAttribute("aria-required","true");t.setAttribute("required","true")}e.validationType===c.validationTypes.EMAIL?t.setAttribute("type","email"):t.setAttribute("type","text");e.lastKnownValue&&(t.value=e.lastKnownValue);w(t,"keyup",function(){b(t,e.id)});return t}(n))}t.appendChild(a)}return t}(c.getAllQuestions());document&&"complete"===document.readyState?e():w(window,"load",e);function g(){if(o.childNodes)for(var e=0;e<o.childNodes.length;e++)o.removeChild(o.childNodes[e]);o.className=h.info;o.style.display="none"}function m(e){i(e||s.errorText,h.error)}function v(){var e,t=c.validateSurvey(!0);if(t.surveyValid){g();e=c.getJSONSurvey();if(s.callback&&"function"==typeof s.callback)try{s.callback(e)}catch(e){}}else{for(var i=t.questionsNeeded,n=0;n<i.length;n++){var a=document.getElementById(u.question+i[n].id),o=a.className;C(p,o)||(a.className+=" "+p)}m()}return e}function w(e,t,i){e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent("on"+t,i);l.push({e:e,ev:t,cb:i})}function _(e,t){e=document.getElementById(e);if(e&&C(t,e.className)){for(var i=e.className.split(" "),n="",a=0;a<i.length;a++){i[a]=i[a].replace(/^[\s*\n*\r*\t\*]$[\s*\n*\r*\t\*]/g,"");if(i[a]!=t&&i){0<a&&(n+=" ");n+=i[a]}}e.className=n}}function C(e,t){var i=t.split(" "),n=!1;e=e.replace(/^[\s*\n*\r*\t\*]$[\s*\n*\r*\t\*]/g,"");for(var a=0;a<i.length;a++)n||e!=i[a]||(n=!0);return n}function T(e){e=document.getElementById(u.question+e);e&&(e.style.display="block")}function E(e){for(var t=0;t<e.length;t++){i=void 0;var i=e[t].id;(i=document.getElementById(u.question+i))&&(i.style.display="none")}}function y(e){return e+Math.floor(1e4*Math.random())+"_"+Math.floor(1e4*Math.random())}function b(e,t){c.submitTextAnswer(t,e.value);_(u.question+t,p)}function S(e,t){t=c.submitAnswerGetNextQuestions(e,t);if(t.questionsToShow)for(var i=t.questionsToShow,n=0;n<i.length;n++)T(i[n].id);t.questionIdsToHide&&E(t.questionIdsToHide);_(u.question+e,p)}function i(e,t){o.className=h.info+" "+t;if(o.childNodes)for(var i=0;i<o.childNodes.length;i++)o.removeChild(o.childNodes[i]);o.appendChild(document.createTextNode(e));o.style.display="block";o.focus()}function e(){s.rootElem&&1!==s.rootElem.nodeType&&"string"==typeof s.rootElem&&(a=document.getElementById(s.rootElem));void 0!==(e=c.header)&&(a.getElementsByTagName("H2")[0].innerHTML=e);(o=a.querySelector("."+h.info)).setAttribute("tabIndex",r);o.style.display="none";var e=s.buttonText||"Submit",t=s.buttonContainer;(t=(t=t&&1!==t&&"string"==typeof t?document.getElementById(t):t).getElementsByTagName("BUTTON")[0]).setAttribute("tabIndex",N());t.innerHTML=e;w(t,"click",v);d.push(t);a.appendChild(f);for(var i=c.getActiveQuestionsIds(),n=0;n<i.length;n++)T(i[n]);setTimeout(I,100)}function I(){var e=c.getQuestionByIndex(0);if(e&&e.id){var t=document.getElementById(u.question+e.id);switch(e.type){case c.questionTypes.SELECT:t.getElementsByTagName("SELECT")[0].focus();break;case c.questionTypes.RADIOH:case c.questionTypes.RADIO:case c.questionTypes.CHECKBOX:case c.questionTypes.TEXTF:t.getElementsByTagName("INPUT")[0].focus();break;case c.questionTypes.TEXT:t.getElementsByTagName("TEXTAREA")[0].focus()}}}function N(){var e=t;t+=1;return e}return{validateSurvey:v,showErrorMessage:m,showSuccessMessage:function(e){i(e||s.successText,h.success)},hideMessage:g,dispose:function(){for(var e,t,i,n=0;n<l.length;n++){var a=l[n];try{e=a.e,t=a.ev,i=a.cb,e.addEventListener?e.removeEventListener(t,i,!1):e.detachEvent("on"+t,i)}catch(e){}}l=[]},clearSurveyDOM:function(){this.dispose();for(var e=0;e<d.length;e++)try{d[e].innerHTML="";d[e].parentNode&&d[e].parentNode.removeChild(d[e])}catch(e){}d=[]}}}window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};window.lpTag.uiframework=window.lpTag.uiframework||{};lpTag.uiframework.scrollManager=function(s){var r,l,i,d,c,u,p,n,a,h=!1,f="lpclass_scrollable",g=[],m=0,v=0,w=-1,_=0;function o(){if(!h&&!p&&0!==g.length){document.body.addEventListener("touchmove",E,!1);document.body.addEventListener("touchstart",e,!1);document.body.addEventListener("touchend",t,!1);h=!0}}function C(){if(h&&!p){document.body.removeEventListener("touchmove",E);document.body.removeEventListener("touchstart",e);document.body.removeEventListener("touchend",t);h=!1}}function e(e){if(i){clearTimeout(i);i=null;T()}d=!!(l=!1);m=e.touches[0].clientY;v=m;w=-1;r=null}function t(e){if(r&&d){l=!1;var t=_/400;r.style[y()]="all "+t+"s ease-out";r.style.webkitTransform="translateY(0px)";0;i&&clearTimeout(i);i=setTimeout(T,1e3*t+50)}}function T(){if(r){r.style[y()]="";delete r.style[y()];r=null;w=-1}}function E(e){var t=!1;if(l)t=!0;else{t=function(e){var t=!1;if(h)for(var i=e.target||e.relatedTarget||e.srcElement;null!==i&&!r;){if(i.className&&0<=i.className.indexOf(f)){r=i;t=!1}i=i.parentNode}if(r&&r.parentNode){r.parentNode.style["-webkit-overflow-scrolling"]="touch";if(w<0)for(var n=0;n<g.length;n++)if(g[n].view===r){w=n;break}var a=parseInt(getComputedStyle(r,"height").height,10);if(0===r.parentNode.scrollTop){if(0===m){m=e.touches[0].clientY;t=!0}(e.touches[0].clientY>m||a<=r.parentNode.clientHeight)&&(t=!0)}else a<=r.parentNode.clientHeight+r.parentNode.scrollTop&&m>e.touches[0].clientY&&(t=!0)}else t=!0;return t}(e);l=!0}if(t){if(r&&g[w].bounce){d=!0;for(var i=e.touches[0].clientY-v,n=u?[{height:.1*s.innerHeight,scale:.85},{height:.3*s.innerHeight,scale:.55},{height:.5*s.innerHeight,scale:.35},{height:.75*s.innerHeight,scale:.2},{height:.9*s.innerHeight,scale:.1}]:[{height:.05*s.innerHeight,scale:.75},{height:.1*s.innerHeight,scale:.4},{height:.9*s.innerHeight,scale:.08}],t=i<0?-1:1,i=0<i?i:-1*i,a=_=0;a<n.length;a++){var o=0<a?n[a].height-n[a-1].height:n[a].height;if(i<=n[a].height){_+=(i-(0===a?0:n[a-1].height))*n[a].scale;break}_+=o*n[a].scale}if(0<_){c=Math.round(_*t);r.style[""===document.body.style.mozTransform?"-moz-transform":""===document.body.style.webkitTransform?"-webkit-transform":""===document.body.style.OTransform?"-o-transform":"transform"]="translateY("+c+"px)"}}e.preventDefault()}else{w=-1;r=null;e.stopPropagation()}}function y(){return""===document.body.style.MozTransition?"-moz-transition":""===document.body.style.WebkitTransition?"-webkit-transition":""===document.body.style.OTransition?"-o-transition":"transition"}return{init:function(e,t){a=lpTag.unifiedWindow.uiModelPath;u=e.isIOS();p=e.isDesktop();n=t},registerView:function(e,t){if(!p){null==t&&(t=!0);!function(e,t){"string"==typeof e&&(e=this.getFirstElement(e));t=t.constructor===Array?t:[t];if(e&&1===e.nodeType){var i=e.className;i&&i.indexOf(t)<0&&(i+=" "+t);i=i.replace(/^\s\s*/,"");e.className=i}else this.logger.error("Unable to add class to "+e+" Class: "+t,"addClass")}(e,f);g.push({view:e,bounce:t});!h&&n.get(a.WINDOW_MAXIMIZED)&&o()}},unregisterView:function(e){if(!p){for(var t=e,i=f,n=t.className.split(" "),a=[],o=0;o<n.length;o++)n[o]!==i&&a.push(n[o]);t.className=a.join(" ");for(var s=[],r=0;r<g.length;r++)g[r].view!==e&&s.push(g[r]);0===(g=s).length&&C()}},enable:o,disable:C}}(window);window.lpTag=window.lpTag||{};lpTag.taglets=lpTag.taglets||{};lpTag.taglets.lpDragManager=lpTag.taglets.lpDragManager||function(e){var d,c={},u=0,p=!1,h=!1,f=!!window.addEventListener,g=!1,t=20;function m(e,t,i,n){e&&f?e.addEventListener(t,i,!0===n):e&&e.attachEvent&&e.attachEvent("on"+t,i)}function n(e,t,i){e&&f?e.removeEventListener(t,i):e&&e.detachEvent&&e.detachEvent("on"+t,i)}m(document,"mousemove",function(e){var t,i;if(p&&d){h=!1;e=e||event;d.horizontal&&(t=function(e){var t=e.clientX-d.diff.left;t>d.parentData.width-d.dragElementData.width&&(t=d.parentData.width-d.dragElementData.width);t<d.parentData.left&&(t=d.parentData.left);(t+d.dragElementData.width>d.parentData.width+d.parentData.left||e.clientX<0)&&(t=0);return t}(e));v(i=d.vertical?function(e){var t=e.clientY-d.diff.top;t>d.parentData.top+d.parentData.height-d.dragElementData.height&&(t=d.parentData.top+d.parentData.height-d.dragElementData.height);t<d.parentData.top&&(t=d.parentData.top);(t+d.dragElementData.height>d.parentData.height+d.parentData.top||e.clientY<0)&&(t=0);return t}(e):i,t);if((g=!0)===d.newDrag){setTimeout(function(){d&&T(d.onDrag,d,d.context)},0);d.newDrag=!1}f&&1!=e.which&&(h=!0);d&&h&&w();return!1}});m(document,"mouseup",function(e){p&&d&&w()});m(document,"keyup",function(e){p&&d&&e.altKey&&e.code.includes("Arrow")&&w()});function v(e,t){var i=l(),n=C(d.drag);if(d.horizontal)if(d.drag.style.right&&"auto"!==d.drag.style.right){d.drag.style.right=i.width-t-n.width+"px";d.drag.style.left="auto"}else{d.drag.style.left=t+"px";d.drag.style.right="auto"}if(d.vertical)if(d.drag.style.right&&"auto"!==d.drag.style.bottom){d.drag.style.bottom=i.height-e-n.height+"px";d.drag.style.top="auto"}else{d.drag.style.top=e+"px";d.drag.style.bottom="auto"}}function w(){if(d&&d.onDragEnd){var e=function(e,t){var i=0,n=0,a=0,o=0;if(!e||!t)return 0;e=s(e);t=s(t);e.top!==t.top&&(i=e.top>t.top?e.top-t.top:t.top-e.top);e.right!==t.right&&(o=e.right>t.right?e.right-t.right:t.right-e.right);e.left!==t.left&&(a=e.left>t.left?e.left-t.left:t.left-e.left);e.bottom!==t.bottom&&(n=e.bottom>t.bottom?e.bottom-t.bottom:t.bottom-e.bottom);t=Math.max(Math.abs(i),Math.abs(n));return Math.max(Math.abs(a),Math.abs(o))+t}(C(d.drag),d.dragElementData);if(g&&t<e){e=function(e){var t=C(e),e=_(e,!0);t.left=(""!==e.left?e:t).left;t.right=(""!==e.right?e:t).right;t.bottom=(""!==e.bottom?e:t).bottom;t.top=(""!==e.top?e:t).top;return t}(d.drag);T(d.onDragEnd,e,d.context);setTimeout(function(){p=!1},10)}else p=!1;e=d;n(e.anchor,"mouseup",w);n(e.drag,"keyup",w)}else p=!1;document.body.classList.remove("lp-not-selectable");e=document.getElementById("lpUnselectable");if(e){e.parentNode.removeChild(e);0}document.body.removeAttribute("unselectable");d=null;g=!1}function s(e){e.top=r(e.top);e.bottom=r(e.bottom);e.left=r(e.left);e.right=r(e.right);return e}function _(e,t){var i;t||(document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(e):e.currentStyle&&(i=e.currentStyle));return i||e.style}function C(e){var t=!1,i=e.getBoundingClientRect(),n=_(e),a={right:r(n.borderRight),left:r(n.borderLeft),top:r(n.borderTop),bottom:r(n.borderBottom)},n={right:r(n.marginRight),left:r(n.marginLeft),top:r(n.marginTop),bottom:r(n.marginBottom)};if(e===document.body)var t=!0,o=l(),s=o.width,o=o.height;else{s=(i.width||e.clientWidth||0)+a.right+a.left+n.right+n.left;o=(i.height||e.clientHeight||0)+a.top+a.bottom+n.top+n.bottom}return{width:s,height:o,left:t?0:i.left,right:i.right,top:t?0:i.top,bottom:i.bottom,border:a,margin:n}}function r(e){e=parseInt(e,10);return isNaN(e)?0:e}function T(e,t,i){if("function"==typeof e)try{e.call(i||null,t)}catch(e){}}function l(){var e=document.documentElement,t=document.body;return{width:e.clientWidth||t.clientWidth||window.innerWidth,height:e.clientHeight||t.clientHeight||window.innerHeight}}return{v:"0.5.0",name:"lpDragManager",isDragging:function(){return p},init:function(){},start:function(){},bindDrag:function(e){var t,a,o,i,n,s=u+++"_"+((new Date).getTime()+Math.floor(1e6*Math.random())),r=(r=lpTag.taglets&&lpTag.taglets.lpUnifiedWindow&&lpTag.taglets.lpUnifiedWindow.inspect())&&r.conf&&r.conf.enableStrictCspMode;c[s]=(n=e.drag,i=e.anchor||n,t=e.parent||n.parentNode||document.body,{anchor:i,drag:n,parent:t,onDrag:e.onDrag,onDragEnd:e.onDragEnd,horizontal:!0===e.horizontal,vertical:!0===e.vertical,limitToParent:!0===e.containParent,context:e.context});c[s].bindFunc=(a=c[s],o=r,function(e){e=e||event;m(a.anchor,"mouseup",w);a.anchorData=C(a.anchor);a.parentData=C(a.parent);a.dragElementData=C(a.drag);a.diff={left:e.clientX-a.dragElementData.left,top:e.clientY-a.dragElementData.top};a.newDrag=!0;d=a;o?document.body.classList.add("lp-not-selectable"):function(){document.body.setAttribute("unselectable","on");(function(e,t){if(f){var i,n=document.createElement("style"),a="";n.id=t;for(i in e){a+=i+"{";for(var o in e[i])a+=o+":"+e[i][o]+";";a+="}"}n.appendChild(document.createTextNode(a));document.getElementById(t)||(document.head||document.getElementsByTagName("head")[0]).appendChild(n);return}})({"*,body,.lpDragActive":{"-moz-user-select":"none","-webkit-user-select":"none","-ms-user-select":"none","user-select":"none","-o-user-select":"none"},"html *::selection,body *::selection,button::selection,body::selection,*::selection":{background:"transparent",color:"inherit"}},"lpUnselectable")}();p=!0;if(e.altKey&&e.code.includes("Arrow")){m(a.drag,"keyup",w);var t,i,n=-50;if(!1!==e.keyCode){39!=e.keyCode&&40!=e.keyCode||(n=Math.abs(n));if(d){h=!1;37!==(e=e||event).keyCode&&39!==e.keyCode||!d.horizontal||(t=function(e){e=d.dragElementData.left+e;e>d.parentData.width-d.dragElementData.width&&(e=d.parentData.width-d.dragElementData.width);e<d.parentData.left&&(e=d.parentData.left);e+d.dragElementData.width>d.parentData.width+d.parentData.left&&(h=!0);return e}(n));v(i=38!==e.keyCode&&40!==e.keyCode||!d.vertical?i:function(e){e=d.dragElementData.top+e;e>d.parentData.top+d.parentData.height-d.dragElementData.height&&(e=d.parentData.top+d.parentData.height-d.dragElementData.height);e<d.parentData.top&&(e=d.parentData.top);e+d.dragElementData.height>d.parentData.height&&(h=!0);return e}(n),t);if((g=!0)===d.newDrag){setTimeout(function(){d&&T(d.onDrag,d,d.context)},0);d.newDrag=!1}f&&37!=e.which&&38!=e.which&&39!=e.which&&40!=e.which&&(h=!0);d&&h&&w()}}}return!1});var l=c[s];m(l.anchor,"mousedown",l.bindFunc);m(l.drag,"keydown",function(e){(e.altKey&&e.code.includes("Arrow")||e.altKey)&&l.bindFunc(e)});i=c[s].drag,"absolute"!==(n=_(i)).position&&"fixed"!==n.position&&(i.style.position="absolute");return s},unbindDrag:function(e){if(c[e]){var t,i=c[e];n(i.anchor,"mousedown",i.bindFunc);n(i.drag,"keydown",i.bindFunc);for(t in c[e])if(c[e].hasOwnProperty(t)){c[e][t]=null;delete c[e][t]}delete c[e];return!0}return!1}}};window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.ViewPortManager=function(e){var a,t,o,s,r,l,d,c,u,i="ViewPortManager",n=lpTag.unifiedWindow.log,p=lpTag.taglets.lpUtil,h=!0;u=e;p.waitForBody(m);function f(){var e=screen.availWidth/window.innerWidth;n.debug("getCurrentScale, currentScale="+e+" height="+window.innerHeight+" width="+window.innerWidth,i);return e}function g(e,t){if(a){var i={top:l,left:d,scale:r};r=f();d=document.body.scrollLeft;l=document.body.scrollTop;if(!function(e,t){var i,n=!0;for(i in e)if(t.hasOwnProperty(i)&&t[i]!==e[i]){n=!1;break}return n}(n=_(a.content),e)){s=n;n=function(e){var t,i="";for(t in e)if(e.hasOwnProperty(t)){!0===e[t]?i+=t:i+=t+"="+e[t];i+=", "}return i.substring(0,i.length-2)}(e),a.content=n;o=e;if(i.scale!==f()){var n=t,e=i;if(c){c.style.top=(void 0!==e?e.top:document.body.scrollTop)+"px";c.style.left=(void 0!==e?e.left:document.body.scrollLeft)+"px"}t=n;if(c){c.focus();if(u.isIOS()){c.click();setTimeout(v(t),40)}else v(t)()}}}}}function m(){if(!a){var e=document.getElementsByName("viewport");e&&(a=e[e.length-1])}if(a){t=_(a.content);o=o||t;if(w(t)){(c=document.createElement("input")).type="text";c.style.opacity=0;c.style.top="-1000px";c.style.left="-1000px";c.style.position="absolute";document.body.appendChild(c)}}else h=!1}function v(e){return function(){c.blur();p.runCallback(e)}}function w(e){var t=!1,i=e["user-scalable"],n=[e["minimum-scale"],e["maximum-scale"],e["initial-scale"]];if("no"===i)t=!1;else for(var a=0;a<n.length&&!t;a++)for(var o=a;o<n.length;o++)if(a!==o&&void 0!==n[a]&&void 0!==n[o]&&n[a]!==n[o]){t=!0;break}return t}function _(e){var t,i={};if(e)for(var n=e.split(","),a=0;a<n.length;a++){t=n[a].split("=");i[p.trimAndLower(t[0])]=p.trimAndLower(t[1])}return i}this.reset=function(){if(h&&a&&s){t["initial-scale"]=r;g(t)}};this.setScale=function(e,t,i,n){a&&g({width:"device-width","initial-scale":e,"minimum-scale":t||e,"maximum-scale":i||e,"user-scalable":"string"==typeof n?n:"no"})};this.getViewPortInfo=function(){return p.cloneExtend(o||{})};this.getCurrentScale=f;this.isPageZoomable=function(){return w(o)}};window.lpTag=window.lpTag||{};lpTag.unifiedWindow.addLanguage({chattingWith:"{{agent_name}}",connecting:"Connecting",message_us:"Message us",ended:"Thank you",loader_title:"Loading",chatting:"Chat",preChat:"Chat with us",preSms:"Text us",postChat:"Thank you",offline:"Contact us",endedAndTranscriptShown:"Chat transcript",windowRegionLabel:"Chat window",minimizedChatWindowLabel:"Minimized chat window",headerRegionLabel:"Chat window header",transcriptRegionLabel:"Message transcript",bottomRegionLabel:"Send a message",previewAttachmentLabel:"Preview attachment",fileAttachmentPreviewLabel:"File attachment preview",attachmentCaptionLabel:"Attachment caption",closeAttachmentLabel:"Close Attachment",attachedImageLabel:"Attached image",closeWindowAreYouSureMsg:"Closing will end conversation",closeWindowOkBtn:"OK",closeWindowCancelBtn:"Cancel",closeChatAreYouSureMsg:"Are you sure you want to disconnect?",closeChatDisconnectBtn:"Disconnect",closeChatCancelBtn:"Cancel",tooltip_NewMessageNotification:"You have {{notificationCount}} new {{notificationMsg}}",tooltip_EmailTranscriptSentConfirmation:"Transcript will be sent after chat ends",tooltip_Message:"message",tooltip_Messages:"messages",tooltip_Close:"Close",tooltip_Download:"You may be required to allow pop-ups to download files",tooltip_ExpandActionMenu:"Actions",tooltip_CollapseActionMenu:"Actions",tooltip_SendIcon:"Send",tooltip_SendIconDisabled:"You are not connected to chat",tooltip_Minimize:"Minimize",tooltip_Maximize:"Maximize",tooltip_MuteButton:"Mute",tooltip_UnmuteButton:"Unmute",tooltip_Print:"Print transcript",tooltip_Email:"Email transcript",tooltip_EndChat:"End conversation",tooltip_Popout:"Pop out",tooltip_Popin:"Pop in",tooltip_Lock:"This is a secure chat",tooltip_Loader:"Loading",tooltip_EmailClearField:"Clear",tooltip_AutoBlockCreditCardPatternsMessage:"We have blocked some of your personal details from displaying. Please do not share personal or sensitive information during the conversation.",tooltip_open_widgets:"Open slider widgets",tooltip_close_widgets:"Close slider widgets",tooltip_refresh_slider:"Refresh widget",tooltip_minimize_slider:"Minimize widget",tooltip_maximize_slider:"Maximize widget",tooltip_Connection:"Establishing connection",tooltip_ConnectionIssue:"Connection unavailable",tooltip_ConnectionReEstablished:"Connection re-established",tooltip_CloseToStartChat:"To start a chat please close this window",tooltip_CloseToStartConversation:"To start a messaging conversation please close this window",tooltip_FileTypeValidation:"File type should be PNG, JPG or GIF",tooltip_FileTypeValidationExpanded:"File type should be PNG, JPG, GIF, PDF, DOCX, XLSX or PPTX",tooltip_FileSizeValidation:"File size should be 5 MB or less",tooltip_FileSizeValidation15:"File size should be 15 MB or less",tooltip_EmojiIcon:"Emoji picker",windowTitle:"Need help?",defaultTextBoxText:"Type your message",welcomeMessage:"How can I help you today?",thankYouMessage:"Thank you for connecting with us",thankYouMessagePreSms:"Text conversation started with {{phoneNumber}}. A representative should text you soon.",visitorChatLineSentError:"Error sending message",textAreaDisabledDefaultMessage:"Select an option above",dragFilesMessage:"Drag files here",dropFilesMessage:"Drop files here",at:"at",me:"Me",you:"You",info:"Info",agent:"Agent",authExpired:"Your verification has expired. You are being directed to re-login. Please press here in order to redirect immediately.",unauthExpired:"Your verification has expired. Click below to reload the conversation.",reload:"Reload",redirect:"Redirect",relogin:"Session expired",secureForm_line_send:"{{agentName}} has sent you a Secure Form: {{secureFormName}}",secureForm_link_title_send:"{{agentName}} has sent you a Secure Form",secureForm_line_submit:"The following Secure Form has been submitted: {{secureFormName}}",secureForm_link_title_submit:"The following Secure Form has been submitted",secureFormSubmittedMessage:"The form has been submitted successfully. <br>To protect your information, submitted forms cannot be reopened.",secureFormOpenedInAnotherTabMessage:"The Secure Form could not be opened. Please submit the Secure Form from the tab where the interaction began.",secureFormErrorMessage:"The Secure Form could not be opened. <br>Please contact your agent for assistance.",secureFormTimeOutErrorMessage:"There was a connection problem and the Secure Form could not be opened. <br>Please contact your agent for assistance.",monthFullJanuary:"January",monthFullFebruary:"February",monthFullMarch:"March",monthFullApril:"April",monthFullMay:"May",monthFullJune:"June",monthFullJuly:"July",monthFullAugust:"August",monthFullSeptember:"September",monthFullOctober:"October",monthFullNovember:"November",monthFullDecember:"December",weekDayFullSunday:"Sunday",weekDayFullMonday:"Monday",weekDayFullTuesday:"Tuesday",weekDayFullWednesday:"Wednesday",weekDayFullThursday:"Thursday",weekDayFullFriday:"Friday",weekDayFullSaturday:"Saturday",weekDayShortSunday:"S",weekDayShortMonday:"M",weekDayShortTuesday:"T",weekDayShortWednesday:"W",weekDayShortThursday:"T",weekDayShortFriday:"F",weekDayShortSaturday:"S",monthJanuary:"Jan",monthFebruary:"Feb",monthMarch:"Mar",monthApril:"Apr",monthMay:"May",monthJune:"Jun",monthJuly:"Jul",monthAugust:"Aug",monthSeptember:"Sep",monthOctober:"Oct",monthNovember:"Nov",monthDecember:"Dec",weekDaySunday:"Sun",weekDayMonday:"Mon",weekDayTuesday:"Tues",weekDayWednesday:"Wed",weekDayThursday:"Thurs",weekDayFriday:"Fri",weekDaySaturday:"Sat",daySuffix:"",dayMonthGap:" ",logoAltText:"Logo",agentPicAltText:"Agent picture",lpLogo:"LivePerson logo",errorIconAltText:"Error",a11yNewMessage:"New message",a11yNewStructuredContent:"New message above. There may be form options.",file_sent_from:"File sent from",dialog_email_transcript:"Send transcript to:",EmailTranscriptAction:"Email\ntranscript",inputEmailError:"Enter a valid email address. Format: you@domain.com",defaultEmailInputText:"Enter email*",transcriptSubject:"Your chat transcript",transcriptAreaLabel:"Chat messages",transcriptConvResolvedByAgent:"Conversation closed by the agent {{time}}",transcriptConvResolvedByVisitor:"Conversation closed by you {{time}}",transcriptTtrMessage:"We will respond by {{time}}",transcriptShortlyMessage:"An agent will respond shortly",transcriptTtrOffHoursMessage:"We are currently off-hours. We will answer by {{time}}",transcriptForPhotoSharingImage:"Shared content is not available",transcriptRotatorDefaultMessage:"Loading history",transcriptRotatorFirstMessage:"Still loading",transcriptRotatorSecondMessage:"Failed to load history. ",transcriptRotatorLinkText:"Retry",transcriptPossibleMessages:"There may be new messages since you were last here, please check above",transcriptPossibleMessagesShort:"There may be new messages",transcriptHistoryButtonDisplayText:"Show Previous",transcriptHistoryButtonAriaLabelText:"Show previous conversation button",transcriptHistoryLazyLoadingLabel:"Loading previous conversations",idnvDialogTitle:"Please enter characters {{idnvChar1}} and {{idnvChar2}} from your {{idnvType}}",idnvInputError:"Complete both required fields",idnvFormCancelled:"The identification form was not submitted",idnvFormSubmitted:"You have submitted characters {{idnvChar1}} and {{idnvChar2}} from your {{idnvType}}.",idnvAnswer:"Characters are {{idnvAnswer1}} and {{idnvAnswer2}}",idnvSendLineError:"Identification form could not be submitted",MuteSoundAction:"Mute",UnmuteSoundAction:"Unmute",PrintTranscriptAction:"Print\ntranscript",DownloadTranscriptAction:"Download\ntranscript",RichContentNotAvailable:"[Rich Content: Preview not available]",MarkUrgentAction:"Mark as urgent",DismissUrgentAction:"Dismiss urgent",EndChatAction:"End\nconversation",PopOutAction:"Pop out",PopInAction:"Pop in",PopOutAction_topbar:"Click to pop out",PopInAction_topbar:"Click to pop in",ForgetMeAction:"Clear history",SharePhotoAction:"Send\nimage",AddAttachmentAction:"Add\nattachment",PoweredBy:"Messaging powered by Liveperson",error:"Error",couldNotConnect:"Oops - unable to connect",tryAgain:"Try again",loadingOnMinimize:"Loading",loading:"Loading",unableToConnect:"Unable to connect",reconnect:"Trying to reconnect",chatEndedOnExternalWindow:"Close window in order to start new chat",externalWindowOpen:"You have an ongoing chat. Return to that window to continue the chat.",unsupportedBrowserMode:"Your browser may be in incognito mode, or it may be blocking third party cookies. Please open a regular browser session to chat, or check your browser privacy settings",cannotResumeChat:"Resume chat from the tab where the interaction began",crossDomainError:"Cannot resume conversation, please return to previous page to continue.",chatAuthError:"Go back to the previous page or log in to continue your conversation.",confirmMessage:"Closing the conversation means that you won’t be able to continue even if you go back or log in. Are you sure you want to proceed?",startConversationError:"Please refresh the page and start a new conversation.",connectionUnavailable:"Connection unavailable",sessionExpired:"Session expired",sessionError:"Your session has expired. Please close this window and start a new conversation in order to resume.",sharkSessionExpired:"Please refresh the page and start a new conversation.",agentIsTypingText:"Agent is typing...",forget_me_dialog:"Are you sure you want to clear your conversation history?",forget_me_dialog_subtitle_on_active_chat:"If you choose “yes” the conversation will end and your conversation history will no longer be available from this device.",forget_me_dialog_subtitle:"If you choose “yes” your conversation history will no longer be available from this device",forget_me_dialog_close_window:"Are you sure you want to clear your conversation history?",forget_me_dialog_subtitle_on_active_chat_close_window:'If you choose "Yes" the conversation will be closed automatically and your history will no longer be available when you reopen the window.',forget_me_dialog_subtitle_close_window:'If you choose "Yes" the conversation will be closed automatically and your history will no longer be available when you reopen the window.',end_chat_alert:"Are you sure you want to end the conversation?",yes:"Yes",no:"No",preChatButton:"Submit",surveyRequireField:"Complete the required field",surveyRequireOption:"Required field. Select an option.",surveyRequireCheckbox:"Required field. Select at least one option.",surveyRequireNumericField:"Only numbers can be used in this field",surveyRequireValidEmail:"Enter a valid email address. Format: you@domain.com",surveyRequireValidPhone:"Enter a valid phone number.",surveyMaximumChars:"Cannot include more than {{specify_number}} characters in this field",surveyIllilgalCharacters:"One or more of the characters entered are not valid. Do not use: <, >, "",surveyGeneralError:"An error has been encountered. Please review the survey and resubmit.",surveyServerError:"An unexpected error has been encountered. Please resubmit the survey.",surveyLabel:"Complete the survey",offlineButton:"Submit",exitButton:"Submit",defaultSelect:"Choose item from the list",defaultTextArea:"Type your message",emailTextArea:"Enter your email address",submit:"Submit",back:"Back",next:"Next",startChat:"Chat",closeWindowText:"You have an active engagement",cancel:"Cancel",ok:"OK",close:"Close",send:"Send",insertTextHere:"Type your message",on:"On",off:"Off",IN_SESSION:"Resume chat from the tab where the interaction began",IN_PRE_CHAT:"Return to the tab with the survey to start chat",IN_CHAT:"Please refresh the page to resume chat",captchaTitle:"Chat with us",captchaEnterText:"Type the text shown",captchaRefreshButton:"Try another text",captchaAudioButton:"Try audio",captchaTextButton:"Try text",captchaMessageError:"Verification failed. Please try again.",captchaAccessDenied:"Maximum number of tries exceeded",messagingState_PENDING:"Pending",messagingState_SENT:"Sent",messagingState_ACCEPT:"Delivered",messagingState_READ:"Read",messagingState_ERROR:"Not Delivered",messagingState_image_ERROR:"This file failed to upload.<br>Please try another file.",messagingState_image_RETRY:"This file failed to upload.<br>Please try again.",csatLevel_0:"",csatLevel_1:"Very dissatisfied",csatLevel_2:"Dissatisfied",csatLevel_3:"Neutral",csatLevel_4:"Satisfied",csatLevel_5:"Very Satisfied",outOf:"out of",csatTheAgent:"the agent",csatRatingQuestion:"How would you rate your conversation with {{agentName}}?",csatDisclaimer:"Your feedback helps us serve you better. <br>It will not be shared with any customer service representative.",cobrowseInvitation:"I have invited you to join a CoBrowse session, where I will be able to walk you through our website. To start, please click Accept.",cobrowseAcceptBtn:"Accept",cobrowseRejectBtn:"Reject",cobrowseInvitationHeading:"CoBrowse Invitation",cobrowseInvitationMinimizeTitle:"Reject CoBrowse invitation",cobrowseSessionStarting:"Starting CoBrowse session...",cobrowseInvitationRejected:"CoBrowse invitation has been rejected",cobrowseLine_cobrowseAccepted:"CoBrowse invitation accepted",cobrowseLine_cobrowseDeclined:"CoBrowse invitation rejected",cobrowseLine_cobrowseTimeout:"CoBrowse invitation timed out",cobrowseLine_cobrowseOffered:"{{agentName}} has invited you to a CoBrowse session",cobrowseLine_cobrowseCanceled:"CoBrowse invitation was cancelled by {{agentName}}",video_cobrowseInvitation:"I have invited you to a video call. To start, please click Accept.",video_cobrowseConnecting:"Connecting",video_cobrowseConnectingPermission:"Camera and microphone access are required. Please accept these permissions when prompted by your browser.",video_cobrowseAcceptBtn:"Accept",video_cobrowseRejectBtn:"Reject",video_cobrowseInvitationHeading:"Video Call",video_cobrowseSessionStarting:"Starting a Call...",video_cobrowseInvitationRejected:"Call has been rejected",video_cobrowseLine_cobrowseAccepted:"Call accepted",video_cobrowseLine_cobrowseDeclined:"Call rejected",video_cobrowseLine_cobrowseTimeout:"You missed a call from {{agentName}}",video_cobrowseLine_cobrowseOffered:"{{agentName}} has called you",video_cobrowseLine_cobrowseCanceled:"Call was cancelled by {{agentName}}",video_cobrowseActiveCallTooltip:"You are in a video call",video_cobrowseActiveCallTooltipMaximizeTitle:"Maximize the video chat window",video_cobrowseInvitationMinimizeTitle:"Minimize the video chat window",voice_cobrowseInvitation:"I have invited you to a voice call. To start, please click Accept.",voice_cobrowseConnecting:"Connecting",voice_cobrowseConnectingPermission:"Microphone access is required. Please accept this permission when prompted by your browser.",voice_cobrowseAcceptBtn:"Accept",voice_cobrowseRejectBtn:"Reject",voice_cobrowseInvitationHeading:"Voice Call",voice_cobrowseSessionStarting:"Starting a Call...",voice_cobrowseInvitationRejected:"Call has been rejected",voice_cobrowseLine_cobrowseAccepted:"Call accepted",voice_cobrowseLine_cobrowseDeclined:"Call rejected",voice_cobrowseLine_cobrowseTimeout:"You missed a call from {{agentName}}",voice_cobrowseLine_cobrowseOffered:"{{agentName}} has called you",voice_cobrowseLine_cobrowseCanceled:"Call was cancelled by {{agentName}}",voice_cobrowseActiveCallTooltip:"You are in a voice call",voice_cobrowseActiveCallTooltipMaximizeTitle:"Maximize the voice chat window",voice_cobrowseInvitationMinimizeTitle:"Minimize the voice chat window",richContentSent:"<< Sent Rich Content >>",browserNotifications_newMessageTitle:"New message from {{agentName}}",browserNotifications_newMessages:"new messages",browserNotifications_richContent:"{{agentName}} has shared rich content with you",browserNotifications_image:"{{agentName}} has shared an image with you",browserNotifications_file:"{{agentName}} has shared a file with you",ts_Now:"Now",ts_Today:"Today",ts_Yesterday:"Yesterday",paymentRequest_CheckoutTitle:"Secure Checkout",paymentRequest_CheckoutWithMavenPay:"PAY NOW",paymentRequest_SlideoutTitle:"Secure Checkout",paymentResponse_ResponseText:"Payment Successful",paymentRequest_PoweredByLeftText:"Powered by",paymentRequest_PoweredByRightText:"Maven Pay",paymentRequest_YourCart:"Your Cart",datePicker_select_day:"Select day",datePicker_select_range:"Select date range",datePicker_choose_day:"CHOOSE DAY",datePicker_choose_range:"CHOOSE RANGE",next_month:"Next month",prev_month:"Previous month",select_month:"Choose month",next_year:"Next year",prev_year:"Previous year",select_year:"Choose year",week_of:"Week of",scheduleList_error_no_slots:"No times available, please discuss with agent",scheduleList_header:"Schedule a time",scheduleList_confirm_button_title:"confirm",next_week:"Next week",prev_week:"Previous Week"},{locale:"en-US"});window.liveperson.uiframework.latest.ViewController.plugin({initialize:function(e){e&&(this.models=e.models)},bindModel:function(e){this.models[e.path.name].bind(e.path,e.callback,e.context||this,e.trigger)},unbindModel:function(e){var t=(e=e||{}).context||this,i=e.callback||null,n=e.path||null;this.models[e.path.name].unbind(n,i,t)},getModelParam:function(e){return this.models[e.name].get(e)},dispose:function(){for(var e in this.models)this.models.hasOwnProperty(e)&&this.models[e].unbind(null,null,this)}});!function(e){var i=new lpTag.unifiedWindow.helpers.LocalizationHelper({util:lpTag.taglets.lpUtil});e.ViewController.plugin({initialize:function(e){e.appContext&&(this.translator=e.appContext.translator)},translate:function(e,t){return this.translator.translate(e,t)},replaceCharacter:function(e,t,i){t=e.split(t);return 0<t.length?i?t.join(i):t.join(""):e},extendDictionary:function(e){this.translator.extendDictionary(e)},isLanguageRTL:function(){return i.isLanguageRTL(this.appContext.conf.engConf.lang)},applyDirOnElement:function(e,t){i.applyDirOnElement(e,t,this.appContext.conf.engConf.lang)}})}(window.liveperson.uiframework.latest);window.liveperson.uiframework.latest.ViewController.plugin({initialize:function(e){e.appContext&&(this.themer=e.appContext.themer)},customize:function(e){var t={removeThemeAttrs:!1};if(!this.isDOMNode(e))return this.themer.processHTML(e,t);this.themer.processDomEl(e,t)}});window.liveperson.uiframework.latest.ViewController.plugin({initialize:function(e){},events:function(){},dragableView:function(e){var t=e.context&&e.context.appContext.translator;e.drag=this.isDOMNode(e.view)?e.view:this.getFirstElement(e.view);e.anchor=this.isDOMNode(e.anchor)?e.anchor:this.getFirstElement(e.anchor);e.parent=document.body;e.horizontal=!0;e.vertical=e.allowVerticalDrag;this.dragInstances=this.dragInstances||[];this.dm=new lpTag.taglets.lpDragManager(t);this.dm.bindDrag(e);t=this.dm;this.dragInstances.push(t);return t},dispose:function(){if(this.dragInstances&&0<this.dragInstances.length)for(var e=0;e<this.dragInstances.length;e++)this.dm.unbindDrag(this.dragInstances[e])}});!function(e,t){"use strict";"function"==typeof define&&define.amd&&define("HtmlSanitizerUtils",function(){return t(0,e)});e.lpTag=e.lpTag||{};t(0,e.lpTag)}(this,function(e,t){var i=function(){"use strict";var l=["SCRIPT","STYLE","LINK","IFRAME","META","OBJECT","EMBED"],u=/^on\S+|^\S*[^A-Za-z]+on\S*/gi,p=/DIRNAME|SRCDOC|BEGIN|TO/gi,h=/DATA(\s*):|MHTML(\s*):|JAVASCRIPT(\s*):|EXPRESSION(\s*)\([^;]*\)/gi,f=/MHTML(\s*):([^;]*)|DATA(\s*):([^;]*)|MASK(\s*):([^;]*)|[\w]+(\s*):(\s*)EXPRESSION\([^;]*/gi,o=/<\/\/(.*?)>|<[^ $€£A-Za-z0-9\/!](.*?)>/gi,s=/<(\s*)?SCRIPT\b[^>]*(\s*)?>|<(\s*)?FRAMESET\b[^>]*(\s*)?>|<(\s*)?FRAME\b[^>]*(\s*)?>|<(\s*)?BODY\b[^>]*(\s*)?>/gi,r=/ONERROR(\s*)=(\s*)["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?|ONLOAD(\s*)=(\s*)["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?|ONTOGGLE(\s*)=(\s*)["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?|ONRATECHANGE(\s*)=(\s*)["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']|ONLOADSTART(\s*)=(\s*)["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?|ONLOADEND(\s*)=(\s*)["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?/gi,g=/\[.]/gi,d=/(((ftp|http|https):\/\/)|www[.])(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi,c=/(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/gi,m=/<((\s)?[a-z%]+)\s*[^\/]*?/gi,v="SCRIPT/FRAMESET/FRAME/BODY",w="ONERROR_ONLOAD_ONTOGGLE_ONRATECHANGE_ONLOADEND",_={ELEMENT:"element",ATTRIBUTE:"attribute",ATTRIBUTE_VALUE:"attribute_value",STYLE_ATTRIBUTE:"style_attribute",MARKER:"marker",NOT_WELLFORMED:"not_wellformed_html"};function n(e){var t=e,i=[],n=e,e=T(n=""!==e?function(e){var t=e,i="",n=!1;for(;t!==i;){try{i=decodeURIComponent(t)}catch(e){i=t;n=!0}n||(t=i)}return i}(e):n,o,_.MARKER,"");a(e);a(e=T(e.cleanText,s,_.ELEMENT,v));a(e=T(e.cleanText,r,_.ATTRIBUTE,w));a(e=function(e){var t={errors:[],cleanText:e},i=e;"string"!=typeof i&&(i=i.toString());var n=i.match(m),i=(n=null===n?0:n.length,C(i)),a=i.innerHTML.match(m);(a=null===a?0:a.length)<n&&t.errors.push({type:_.NOT_WELLFORMED,key:"",html:e});t.cleanText=i.innerHTML;return t}(e.cleanText));a(e=function(e){for(var t={errors:[],cleanText:e},i=C(e),n=!1,a=0;a<l.length;a++){var o=null;o=i.getElementsByTagName(l[a]);for(var s=0;s<o.length;s++){n=!0;t.errors.push({type:_.ELEMENT,key:l[a],html:o[s].outerHTML});var r=o[s];r&&r.parentNode&&r.parentNode.removeChild(r)}}n&&(t.cleanText=i.innerHTML);return t}(e.cleanText));a(e=function(e){var r={errors:[],cleanText:e};"string"!=typeof e&&(e=e.toString());for(var t=[],e=C(e),i=e.getElementsByTagName("*"),n=0;n<i.length;n++)for(var a=0;a<i[n].attributes.length;a++)t.push({attributeKey:i[n].attributes[a].name,attributeValue:i[n].attributes[a].value,element:i[n]});if(t)for(var o=0;o<t.length;o++){var s=t[o].attributeKey,l=t[o].attributeValue,d=t[o].element;c(s,l,u,_.ATTRIBUTE,d);c(s,l,p,_.ATTRIBUTE,d);c(s,l,h,_.ATTRIBUTE_VALUE,d);"style"===s.toLowerCase()&&c(s,l,f,_.STYLE_ATTRIBUTE,d)}function c(e,t,i,n,a){var t=n===_.STYLE_ATTRIBUTE||n===_.ATTRIBUTE_VALUE?t:e,o=(t=n===_.ATTRIBUTE_VALUE?t.replace(g,""):t).match(i);if(o){for(var s=0;s<o.length;s++)r.errors.push({type:n,key:o[s],html:a.outerHTML});a.removeAttribute(e)}}r.cleanText=e.innerHTML;return r}(e.cleanText));function a(e){0<e.errors.length&&Array.prototype.push.apply(i,e.errors)}return{sanitized:0<i.length,cleanText:0<i.length?e.cleanText:t,errors:i}}function C(e){var t=document.createElement("DIV");t.innerHTML=e;return t}function T(e,t,i,n){var a={errors:[],cleanText:e},o=e,s=(o="string"!=typeof o?o.toString():o).match(t);if(s)for(var r=0;r<s.length;r++){a.errors.push({type:i,key:n,html:s[r]});o=o.replace(s[r],"")}a.cleanText=o;return a}function E(e){return e&&e.constructor===RegExp}function y(e,t,i){return e=(e=e.replace(t,function(e,t,i,n){return"<a href='"+(e.match(/^www\./i)?"http://"+e.replace(/www\./i,""):e)+"'>"+e+"</a>"})).replace(i,"<a href='mailto:$&'>$&</a>")}return{sanitizeHtml:n,formatLinks:function(e,t){for(var i=t&&t.uri_regex&&E(t.uri_regex)?t.uri_regex:d,n=t&&t.email_regex&&E(t.email_regex)?t.email_regex:c,a=C(e),o=0;o<a.childNodes.length;o++)3===a.childNodes[o].nodeType?a.childNodes[o].textContent=y(a.childNodes[o].textContent,i,n):a.childNodes[o].outerHTML.match(/<a\s+href/g)||(a.childNodes[o].innerText=y(a.childNodes[o].innerText,i,n));a.innerHTML=a.innerHTML.replace(new RegExp("<","g"),"<").replace(new RegExp(">","g"),">");return a.innerHTML},sanitizeAndCleanHtml:function(e,t){t=function(e){var t,i={};for(t in e){var n=[];e[t]instanceof Array&&(n=e[t].map(function(e){return e=e.toLowerCase()}));i[t.toLowerCase()]=n}return i}(t=t||{});var e=C(n(e).cleanText),i="";if(t==={})i=e.innerText;else{!function r(e,l){e=Array.prototype.slice.call(e.childNodes);e.forEach(function(e){e.hasChildNodes()&&r(e,l);if(3!==e.nodeType){var t=e.tagName.toLowerCase();if(void 0===l[t])e.parentNode&&(e.outerHTML=e.innerHTML);else{for(var i=l[t],n=[],a=0;a<e.attributes.length;a++){var o=e.attributes[a].name.toLowerCase();-1===i.indexOf(o)&&n.push(o)}for(var s=0;s<n.length;s++)e.removeAttribute(n[s])}}})}(e,t);i=e.innerHTML}return i}}}();t.HtmlSanitizerUtils=t.HtmlSanitizerUtils||i;return i});!function(e){var o=["strong","i","em","b","u","a","br","span","div","ul","ol","li","p"],d=[/^aria-'/,/^href/,/^target/,/^data-lp-point/,/^title/,/^id/,/^class/],i=new RegExp("(?:(?:https?|ftp|file):\\/\\/|www\\.|ftp\\.)(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[A-Z0-9+&@#/%=~_|$])","gim");e.ViewController.plugin({LPSanitizer:window.lpTag&&lpTag.HtmlSanitizerUtils,sanitizeText:function(e,t){var i="string"==typeof e&&e;if(i){var n=this.appContext&&this.appContext.conf&&this.appContext.conf.engConf&&this.appContext.conf.engConf.async;n&&(i=this.decodeInput(i));i=this.initialTextSanitize(i);i=this.sanitizeEvents(i);i=this.removeElementByType(["SCRIPT","STYLE","LINK","IFRAME","META"],i);!n||t&&t.noFormatLink||(i=this.formatLinks(i,t));i=this.reTargetElementsByType(["A","FORM"],i)}return{sanitized:i!==e,text:i}},initialTextSanitize:function(e){if(this.LPSanitizer)try{e=this.LPSanitizer.sanitizeHtml(e).cleanText||""}catch(e){}return e},formatLinks:function(e,t){(t=t||{}).uri_regex=i;if(this.LPSanitizer)try{e=this.LPSanitizer.formatLinks(e,t)||""}catch(e){}return e},sanitizeEvents:function(t){for(var i=t,n=[{regEx:/[\s'"/]+(onkeypress|onblur|onmouseleave|onpointerlockerror|ondragenter|ontouchend|onanimationend|onpaste|onanimationiteration|onplaying|ondrop|onpointerlockchange|onerror|onended|onsort|onseeked|onplay|onabort|ontransitioncancel|onselectionchange|onpointercancel|onbeforeunload|onfocusin|onpopstate|ondurationchange|onrepeat|onfullscreenchange|onscrollend|onpagehide|onauxclick|onbeforeprint|onpointerout|onresize|onfocusout|onmouseout|onloadedmetadata|onunload|onwebkitanimationiteration|onbeforecut|oncanplaythrough|ondragleave|onsubmit|onseeking|ontransitionrun|onmousemove|onsearch|onselect|oninvalid|ontransitionend|onclose|onchange|oninput|onmouseup|onloadstart|onwaiting|onwebkitanimationstart|onsuspend|oncontextmenu|onafterprint|onmousewheel|oncuechange|onend|onpointermove|onreset|onbegin|onpointerleave|onratechange|onfocus|onprogress|onpageshow|oncanplay|onpointerenter|onstart|onkeydown|onpointerdown|onmessage|onscroll|onwebkitanimationend|onselectstart|onbeforecopy|ontouchstart|ontouchcancel|onshow|ondblclick|onpause|onanimationcancel|onloadeddata|ondrag|onemptied|ontouchmove|onbeforeinput|onfinish|onpointerrawupdate|onstalled|onpointerup|oncancel|onvolumechange|onmozfullscreenchange|ontimeupdate|onunhandledrejection|ontoggle|ondragstart|onwheel|onpointerover|onclick|onkeyup|onmousedown|onanimationstart|ondragend|onbeforescriptexecute|onhashchange|oncut|onbounce|onload|ontransitionstart|onafterscriptexecute|ondragover|onwebkittransitionend|onmouseover|oncopy|onmouseenter|ondragexit)\s*=/gi,replaceString:" _eventRemoved=",type:"ONEVENT"}],a=0;a<n.length;a++)try{i=(i="number"==typeof i?i.toString():i).replace(n[a].regEx,n[a].replaceString)}catch(e){this.logger.error("Error when trying to cleanup text, cleanupType: "+n[a].type+" text: "+t+" result: "+i,"sanitizeEvents")}return i},removeElementByType:function(t,e){t=t.constructor===Array?t:[t];for(var i=document.createElement("DIV"),n=(i.innerHTML=e,!1),a=[],o=0;o<t.length;o++)for(var s=i.getElementsByTagName(t[o]),r=0;r<s.length;r++){n=!0;try{a.push(function(e){return function(){e&&e.parentNode&&e.parentNode.removeChild(e)}}(s[r]))}catch(e){this.logger.error("Error when trying to create remove element function for type "+t[o],"removeElementByType")}}for(var l=0;l<a.length;l++)try{a[l]()}catch(e){this.logger.error("Error when trying to remove element, HTML "+i.innerHTML,"removeElementByType")}return n?i.innerHTML:e},isSecureForm:function(e){return"lp_secure_form_line"===e.getAttribute("data-lp-point")},setTarget:function(e){var t=!1,i=e.getAttribute("target");if(!i||"_blank"!==i.toLowerCase()&&!this.isSecureForm(e)){t=!0;e.setAttribute("target","_blank")}return t},reTargetElementsByType:function(e,t){e=e.constructor===Array?e:[e];for(var i=document.createElement("DIV"),n=(i.innerHTML=t,!1),a=0;a<e.length;a++){for(var o=i.getElementsByTagName(e[a]),s=0;s<o.length;s++)try{var n=this.setTarget(o[s]),r=o[s].getAttribute("rel"),l=o[s].textContent||o[s].innerText;if(!r||"noopener"!==r.toLowerCase()){o[s].setAttribute("rel","noopener");-1===l.indexOf("@")&&o[s].setAttribute("aria-describedby","opens-in-a-new-window")}}catch(e){this.logger.error("Error when trying to reTargetLinks elements, result HTML: "+i.innerHTML+" text: "+t,"reTargetElementsByType")}o=null}return n?i.innerHTML:t},decodeInput:function(e){var t=document.createElement("DIV");t.textContent=e;return t.innerHTML},removeUnsupportedTagsAndAttributes:function(e,t,i){if(e&&e.querySelectorAll)for(var n=[].slice.call(e.querySelectorAll("*")).reverse(),a=0;a<n.length;a++)o.indexOf(n[a].tagName.toLowerCase())<0?n[a].outerHTML=n[a].innerHTML:this._removeUnsupportedAttributes(n[a],t,i)},_removeUnsupportedAttributes:function(e,t,i){for(var n=e&&e.attributes||[],a=0;a<n.length;a++){for(var o=!1,s=n[a].name.toLowerCase(),r=n[a].value.toLowerCase(),l=0;l<d.length;l++)!s.match(d[l])||r.match("javascript")||(o=!0);o||t&&"span"===e.tagName.toLowerCase()&&"style"===s||i&&"a"===e.tagName.toLowerCase()&&"style"===s||e.removeAttribute(s)}},replaceDuplicatedEncodings:function(e){return"string"==typeof e?e.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<"):e}})}(window.liveperson.uiframework.latest);!function(e){var s=".lp-json-pollock",r=["[data-carousel-name]",".lp-json-pollock-layout-vertical-scroll"];e.ViewController.plugin({pluginName:"scrollPrevent",initialize:function(){},preventScroll:function(e){if("object"==typeof(e=e||{view:this.view})&&(e.selector||e.view)){var t=[window.addEventListener?"wheel":"mousewheel","scroll"];e.callback=n.call(this,e,a);i.call(this,e,t)}},limitScroll:function(e){if("object"==typeof(e=e||{view:this.view})&&(e.selector||e.view)){var t=[window.addEventListener?"wheel":"mousewheel","scroll"];e.callback=n.call(this,e,o);i.call(this,e,t)}}});function i(e,t){for(var i=0;i<t.length;i++){e.DOMEvent=t[i];this.bindViewEvent(e)}}function n(e,t){var i=this,n=void 0!==e.selector&&this.getFirstElement(e.selector)||e.view;return function(e){t.call(i,e,n)}}function a(t,e){var i,n=!1,a=e.scrollTop+e.clientHeight,o=r.some(function(e){return function e(t,i){if(!t)return null;var n=l(t,i);if(n)return t;if(!t.parentElement)return null;n=l(t.parentElement,s);if(n)return null;return e(t.parentElement,i)}(t.target,e)});if(!o){if(void 0!==t.deltaY){n=t.deltaY<0;i=0<t.deltaY?t.deltaY:-1*t.deltaY;i=parseInt(i,10)}if(!i&&void 0!==t.wheelDelta){n=0<t.wheelDelta;i=0<t.wheelDelta?t.wheelDelta:-1*t.wheelDelta;i=parseInt(i,10)}if(n?e.scrollTop-i<=0:a+i>=e.scrollHeight){e.scrollTop=n?0:a;this.preventDefault(t)}this.stopPropagation(t)}}function o(e,t){var i=t.scrollHeight-t.offsetHeight;0===t.scrollTop?t.scrollTop=1:i===t.scrollTop&&(t.scrollTop=i-1)}function l(e,t){var i=[];i.push("attribute without value");if("["===t[0]&&"]"===t.slice(-1))return e.hasAttribute(t.slice(1,-1));i.push("single classname");if("."===t[0])return e.classList.contains(t.slice(1));lpTag&&lpTag.unifiedWindow&&lpTag.unifiedWindow.log&&lpTag.unifiedWindow.log.error("Unknown selector, no parser for it.\nSelector: "+t+'\nSupported Selectors: "'+i.join('", "')+'"',"ScrollPreventionPlugin");return!1}}(window.liveperson.uiframework.latest);!function(){var n,i;window.liveperson.uiframework.latest.ViewController.plugin({initialize:function(e){var t=["scroll","resize",window.addEventListener?"wheel":"mousewheel"];e.appContext&&e.appContext.deviceDetector.isDesktop&&(i=e.appContext.deviceDetector.isDesktop()?t:["touchend","resize"])},events:function(){},trackInView:function(e){e.view=t.call(this,e.view);e.inView=t.call(this,e.inView);if(e.view&&e.inView){n=function(e,t){if(function(e,t,i){e=e.getBoundingClientRect(),t=t.getBoundingClientRect();return e.top>=t.top&&(!i||e.bottom<=t.bottom)}(e.view,e.inView,e.trackBottom)){"function"==typeof e.callback&&e.callback.call(this);e.bindOnce&&!function(e,t){for(var i=0;i<t.length;i++)this.unbindViewEvent({view:e,DOMEvent:t[i],callback:n})}.call(this,e.inView,i)}}.bind(this,e);e={view:e.inView,callback:n};!function(e,t){for(var i=0;i<t.length;i++){e.DOMEvent=t[i];this.bindViewEvent(e)}}.call(this,e,i)}},dispose:function(){}});function t(e){return e?this.isDOMNode(e)?e:"object"==typeof e?e.view||e.selector&&void 0!==e.selector&&this.getFirstElement(e.selector):this.view:null}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var n=lpTag.taglets.lpUtil,e=(lpTag.unifiedWindow.WrapperWindowExtenderBase=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"WrapperWindowExtenderBase",LPViewMap:{header:"^header",maximized:"^maximized",minimizedView:"^minimized",headerText:"^headerText",chattingWithIcon:"^chattingWithIcon",closeButton:"^close",topMenu:"^top_menu",topMenuButton:"^menu-top-btn",minimizeButton:"^minimize",maximizeButton:"^maximize",widgetSdkButton:"^widget_sdk",refreshSdkButton:"^refresh",minimizeSdkButton:"^minimize-slider",minimizeButtonImg:"^minimizeButtonImage",minimizeSliderButton:"^minimize-slider",closeButtonImg:"^closeButtonImage",slider:"^slider",main:"^main"},CloseOnEndType:{OPEN:"OPEN",CLOSE:"CLOSE"},LPClassesMap:{visitorHasTyped:"lp_visitor_has_typed",lp_slider_gap:"lp_slider_gap"},initialize:function(e){this.models=e.models;this.endChatWasInitiated=!1;this.forgetMeInitiated=!1;this.isClosingWindow=!1;this.appContextConf=e.appContext&&e.appContext.conf||{};this.featureStateManager=e.appContext.featureStateManager;this.State=lpTag.unifiedWindow.State;this.states=this.appContext.uiStateManager.WINDOW_STATE;this.mainWindow=this.appContext.wrapperWindow.getMainWindowElement();this.minimizedView=this.appContext.wrapperWindow.getMinimizedElement();this.bufferStrip=this.appContext.wrapperWindow.getBufferStripElement();this.maximizedView=this.appContext.wrapperWindow.getMaximizedElement();this.sliderButton=this.appContext.wrapperWindow.getSliderButton();this.titleDiv=this.appContext.wrapperWindow.getTitleDiv();this.chattingWithIcon=this.appContext.wrapperWindow.getChattingWIthIcon();this.widgetNotificationContainer=this.appContext.wrapperWindow.getWidgetNotificationContainer();this.widgetNotificationText=this.appContext.wrapperWindow.getWidgetNotificationText();this.appContext.wrapperWindow.unbindDomEvents();this.windowConf=this.appContextConf.windowConf;this.closeOnEnd=this.windowConf.closeWindowButtonBehaviorType;this.isAsync=this.appContextConf.engConf&&this.appContextConf.engConf.async;this.isSMS=this.appContextConf.engConf&&this.appContextConf.engConf.externalTargets&&!!this.appContextConf.engConf.externalTargets[lpTag.unifiedWindow.consts.externalTargets.SMS];this.stateHistory=[];this.dialogStatics=lpTag.AMSStatics&&lpTag.AMSStatics.dialog||{};this.consumerConfirmedClose=!1;this.topMenuEnabled=this.featureStateManager.isMenuTop();this.renderMap=this.featureStateManager.renderMap;this.topMenuButtonStyle=this.featureStateManager.getStyleConfig(this.renderMap.TOP_MENU_BUTTON);this.closeButtonStyle=this.featureStateManager.getStyleConfig(this.renderMap.CLOSE_BUTTON);this.topMenuButton=this.getFirstElement(this.LPViewMap.topMenuButton,this.maximizedView);this.topMenu=this.getFirstElement(this.LPViewMap.topMenu,this.maximizedView);this.featureStateManager=this.appContext.featureStateManager;m.call(this,!0);e=!(e.appContext.conf&&e.appContext.conf.unifiedConf&&e.appContext.conf.unifiedConf.connectorsSfConfig);this.appContext.wrapperWindow.showClose(e);this.appContext.wrapperWindow.showMinimized(!0);this.isSMS||this.appContext.wrapperWindow.showTopMenu(!0);!function(){this.customize(this.maximizedView);this.customize(this.minimizedView);this.customize(this.bufferStrip);this.appContext.wrapperWindow.adjustConfigStyle(this.appContext.themer)}.call(this);this.removeClass(this.minimizedView,"lpHide");this.appContext.conf.unifiedConf.widgetSDK&&this.setWidgetSDKView.call(this);this.showMessageUs=this.appContext.conf.engConf.async&&!this.isSMS;this.isBarTitleDisplay=this.util.getPropertyFromObject(this.appContext,"conf.windowConf.isBarTitleDisplay",!1);this.barTitleText=this.util.getPropertyFromObject(this.appContext,"conf.windowConf.barTitleText")||this.appContext.translator.translate("message_us")},events:function(){this.bindModel({path:this.uiPath.STATE,callback:_,context:this});this.bindModel({path:this.chatPath.AGENT_NAME,callback:E,context:this});this.bindModel({path:this.chatPath.SDK_NOTIFICATIONS,context:this,callback:N});this.bindModel({path:this.chatPath.SDK_BUTTON_ENABLE,context:this,callback:t});this.bindViewEvent({inView:this.maximizedView,selector:this.LPViewMap.topMenuButton,DOMEvent:"click",callback:s,context:this});this.bindViewEvent({inView:this.maximizedView,selector:this.LPViewMap.closeButton,DOMEvent:"click",callback:o,context:this});this.bindViewEvent({inView:this.maximizedView,selector:this.LPViewMap.widgetSdkButton,DOMEvent:"click",callback:l,context:this});this.bindViewEvent({view:this.mainWindow,DOMEvent:"keyup",callback:this.stopPropagation,context:this});this.bindViewEvent({view:this.mainWindow,DOMEvent:"keydown",callback:this.stopPropagation,context:this});this.bindViewEvent({view:this.mainWindow,DOMEvent:"keypress",callback:this.stopPropagation,context:this});this.bindViewEvent({inView:this.minimizedView,selector:this.LPViewMap.closeButton,DOMEvent:"click",callback:r,context:this});this.appContext.events.bind({appName:"*",eventName:this.EventName.viewController.SHOW_FORGET_ME,context:this,func:h});this.appContext.events.bind({appName:"*",eventName:this.EventName.viewController.CLOSE_WINDOW_FORGET_ME,context:this,func:p});this.appContext.events.bind({appName:lpTag.unifiedWindow.ForgetMeDialogViewController.ControllerName,eventName:this.EventName.viewController.DIALOG_CLOSED,context:this,func:u});this.appContext.events.bind({appName:"*",eventName:this.EventName.viewController.INITIATE_END_CHAT,context:this,func:d});this.appContext.events.bind({appName:"*",eventName:this.EventName.viewController.VISITOR_HAS_TYPED,context:this,func:g});this.appContext.events.bind({appName:lpTag.unifiedWindow.EndChatDialogViewController.ControllerName,eventName:this.EventName.viewController.DIALOG_CLOSED,context:this,func:i});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.THANK_YOU_PAGE,context:this,func:b});this.appContext.events.bind({appName:"*",eventName:lpTag.unifiedWindow.events.viewController.SLIDER_VIEW_CHANGE,func:S,context:this});this.appContext.events.bind({appName:"*",eventName:lpTag.unifiedWindow.events.viewController.SLIDER_CLOSED,func:I,context:this});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.SHOW_PREVIEW,func:x,context:this});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.IMAGE_PREVIEW_SHOW,func:A,context:this});this.appContext.browserStateManager.on(this.appContext.browserStateManager.EVENT_NAME.FOCUS_CHANGE,y,this);this.maximizedVisible=this.getModelParam(this.uiPath.WINDOW_MAXIMIZED);this.bindTopMenuDismissEvent()},render:function(){var e=this.getFirstElement(this.LPViewMap.closeButton,this.maximizedView);if(this.topMenuEnabled&&this.topMenuButtonStyle.value){this.show({view:this.topMenuButton,display:"inline-block",useClasses:!0});this.hide(e);this.topMenuButton.setAttribute("aria-label",this.translate("tooltip_ExpandActionMenu"));this.topMenuButton.setAttribute("aria-expanded",!1)}else{this.hide(this.topMenuButton);this.show({view:e,display:"inline-block",useClasses:!0})}_.call(this,{newValue:this.getModelParam(this.uiPath.STATE)});this.addLocalizationClasses();this.maximizedEl=this.getFirstElement(this.LPViewMap.maximized);!function(){this.featureStateManager.isEngagementWindowBorderEnabled()||(this.maximizedView.style.border="none")}.call(this);!function(){var e=this.featureStateManager.getEngagementWindowBoxShadowConfig();e&&0<e.length&&(this.maximizedView.style.boxShadow=e)}.call(this)}}),lpTag.unifiedWindow.WrapperWindowExtenderBase.prototype);e.bindTopMenuDismissEvent=function(){if(this.featureStateManager.isMenuTop()){this.bindViewEvent({view:this.maximizedView,DOMEvent:(this.appContext.deviceDetector.isMobile()||this.appContext.deviceDetector.isTablet())&&this.appContext.deviceDetector.isIOS()?"touchend":"click",callback:this.dismissTopMenu,context:this});this.bindViewEvent({view:this.maximizedView,DOMEvent:"keydown",callback:this.handleKeydown,context:this})}};e.handleKeydown=function(e){var t=Array.prototype.slice.call(document.querySelectorAll(".lp_top_menu button")),i=document.querySelectorAll(".lp_top_close_action button")[0],n=this.getFirstElement(this.LPViewMap.topMenuButton,this.maximizedView),a=this.getModelParam(this.uiPath.TOP_MENU_VISIBLE),o=this.getFocusableHeaderButton(document.querySelector(".lpc_maximized-header"),!0);if("Escape"===e.code){this.appContext.uiStateManager.setVisibility(this.uiPath.TOP_MENU_VISIBLE,!1);n.focus();return!1}if(e.target.classList.contains("lp_cancel_button")&&(13===e.keyCode||32===e.keyCode)){this.appContext.uiStateManager.setVisibility(this.uiPath.TOP_MENU_VISIBLE,!1);n.focus();e.preventDefault();return!1}if(t[0]===e.target&&e.shiftKey&&9==e.keyCode){e.preventDefault();n.focus();return!1}if(i===document.activeElement&&!e.shiftKey&&9==e.keyCode){e.preventDefault();t[0];o.focus();return!1}if(a){if(n===e.target&&!e.shiftKey&&9==e.keyCode){e.preventDefault();t[0].focus();return!1}if(o===document.activeElement&&!e.shiftKey&&9==e.keyCode){e.preventDefault();this.appContext.events.trigger({appName:"*",eventName:"focusLastLine",data:{}});return!1}}return!e.target.classList.contains("lp_menu-top-btn")||32!=e.keyCode&&13!=e.keyCode||(s.call(this),!1)};e.dismissTopMenu=function(e){var t=this.getFirstElement(this.LPViewMap.topMenu,this.maximizedView),e=e.target;t.contains(e)||this.topMenuButton.contains(e)||this.appContext.uiStateManager.setVisibility(this.uiPath.TOP_MENU_VISIBLE,!1)};e.setWidgetSDKView=function(){n.addClass(this.titleDiv,this.LPClassesMap.lp_slider_gap);n.addClass(this.chattingWithIcon,"lp_hidden");this.sliderButton.title=this.translate("tooltip_open_widgets");t.call(this,this.models.chatModel.get(this.chatPath.SDK_BUTTON_ENABLE))};function t(e){"boolean"==typeof(e=e&&e.newValue)&&(e?n.removeClass(this.sliderButton,"lp_hidden"):n.addClass(this.sliderButton,"lp_hidden"))}e.dispose=function(){this.appContext&&this.appContext.browserStateManager&&this.appContext.browserStateManager.off(this.appContext.browserStateManager.EVENT_NAME.FOCUS_CHANGE,y);lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};e.addLocalizationClasses=function(){var e=this.isLanguageRTL()?"lp_main_rtl":"lp_main_ltr",t=this.appContext.conf.engConf;n.addClass(this.mainWindow,e);"string"==typeof t.lang&&n.addClass(this.mainWindow,"lp_"+t.lang)};function i(e){this.endChatWasInitiated=!1;this.consumerConfirmedClose="confirm"===e.origin;a.call(this,e)}function a(e){if(e.dialogOpenedFrom===this.appConsts.views.TOP_MENU){var t=this,i=this.focusOnElement;setTimeout(function(){i.call(t,t.LPViewMap.closeButton,t.maximizedView)},500)}if(this.topMenuEnabled&&this.topMenuButtonStyle.value&&e.dialogOpenedFrom!==this.appConsts.views.TOP_MENU){var e=this.getFirstElement(this.LPViewMap.topMenuButton,this.maximizedView),n=(e.focus(),e);n.setAttribute("tabindex","0");n.blur();var a=0,o=window.setInterval(function(){n.focus();10<=++a&&window.clearInterval(o)},10)}}function s(){this.getModelParam(this.uiPath.EMOJI_VISIBLE)&&this.appContext.uiStateManager.setVisibility(this.uiPath.EMOJI_VISIBLE,!1);this.appContext.uiStateManager.setVisibility(this.uiPath.TOP_MENU_VISIBLE,!this.getModelParam(this.uiPath.TOP_MENU_VISIBLE))}function o(){d.call(this,!0)}function r(e){if(this.appContext.conf.engConf.externalFailed){this.stopPropagation(e);this.appContext.events.trigger({appName:"*",eventName:this.EventName.application.DO_HARAKIRI})}else{d.call(this,!0);this.stopPropagation(e)}}function l(){var e=this.getFirstElement(this.LPViewMap.minimizeSliderButton,document.body),t="block"===this.getFirstElement(this.LPViewMap.slider,document.body).style.display;this.appContext.events.trigger({appName:this.ControllerName,eventName:this.EventName.widgetSDK.INIT});t||e.focus()}function d(e){var t=this.getModelParam(this.uiPath.STATE);if(!this.endChatWasInitiated)switch(t){case this.State.PENDING:case this.State.CHATTING:!function(e){var t={ControllerName:lpTag.unifiedWindow.EndChatDialogViewController.ControllerName,models:this.models,appContext:this.appContext,sliderAPI:this.slider};t.dialogOpenedFrom=e?this.appConsts.views.TOP_MENU:this.appConsts.views.ACTION_MENU;if(this.appContext.unAuthUserTriesAuth){this.appContext.unAuthUserTriesAuth=!1;c.call(this)}else if(this.appContext.conf.unifiedConf.shouldSkipConfirmationDialog)c.call(this);else{this.endChatWasInitiated=!0;this.appContext.events.trigger({appName:this.ControllerName,eventName:this.VCEvents.DIALOG,data:{context:this,data:t}})}}.call(this,e);this.changeMode(this.states.MAXIMIZED,!0);break;case this.State.APP_ENDED:this.isClosingWindow=!0;T.call(this,this.State.APP_ENDED);break;case this.State.WAITING:c.call(this);break;default:this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.EventName.application.END_SURVEY});f.call(this)}}function c(){this.isClosingWindow=!0;this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.EventName.application.END_CHAT});f.call(this)}function u(e){this.forgetMeInitiated=!1;a.call(this,e)}function p(){this.isClosingWindow=!0;T.call(this,this.State.APP_ENDED)}function h(e){var t=this.getModelParam(this.uiPath.STATE);if(!this.forgetMeInitiated&&t!==this.State.ERROR&&t!==this.State.CONNECTION_ISSUE){t={ControllerName:lpTag.unifiedWindow.ForgetMeDialogViewController.ControllerName,models:this.models,appContext:this.appContext,sliderAPI:this.slider};t.dialogOpenedFrom=e?this.appConsts.views.TOP_MENU:this.appConsts.views.ACTION_MENU;this.forgetMeInitiated=!0;this.appContext.events.trigger({appName:this.ControllerName,eventName:this.VCEvents.DIALOG,data:{context:this,data:t}})}}function f(){var e=this.appContext&&this.appContext.conf&&this.appContext.conf.unifiedConf?this.appContext.conf.unifiedConf:{},t=this.appContext&&this.appContext.conf?this.appContext.conf:{},i=this.appContext;(e.poppedOut||e.external)&&!e.NativeSDK?window.close():this.appContext.events.trigger({appName:this.ControllerName,eventName:this.EventName.application.DO_HARAKIRI});lpTag.lastClosedEngagementID=t.uiState&&t.uiState.engConf&&t.uiState.engConf.eid;lpTag.hooks&&lpTag.hooks.exec&&lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.ON_WINDOW_CLOSED,data:{context:i}})}function g(e){var t=this.appContext.wrapperWindow.getChatWrapperElement(),i=this.LPClassesMap.visitorHasTyped;if(e.typing){n.addClass(t,i);this.appContext.events.trigger({appName:this.ControllerName,eventName:this.EventName.widgetSDK.VISITOR_TYPING,data:!0})}else{n.removeClass(t,i);this.appContext.events.trigger({appName:this.ControllerName,eventName:this.EventName.widgetSDK.VISITOR_TYPING,data:!1})}}function m(e,t){t=t||this.getModelParam(this.uiPath.STATE);t=this.State.CHATTING===t||this.State.WAITING===t;!function(e,t){var i,n,a,o;for(o in e){n=this.translator.translate(e[o]);i=this.getElements(this.LPViewMap[o],this.mainWindow);for(var s=0;s<i.length;s++){i[s].title=n;(a=this.getFirstElement("img",i[s]))&&!function(e,t,i){e.alt=t;i&&(e.src+="?v="+lpTag.unifiedWindow.Application.v)}(a,n,t)}}}.call(this,{closeButton:t?"tooltip_EndChat":"tooltip_Close",minimizeButton:"tooltip_Minimize",maximizeButton:"tooltip_Maximize"},e)}function v(e,t){if(e&&t&&e.length===t.length){for(var i=!0,n=0;n<e.length;n++)if(e[n]!==t[n]){i=!1;break}return i}return!1}function w(e){return e?this.stateHistory[this.stateHistory.length-e]:this.stateHistory}function _(e){e=e&&e.newValue;!function(e){this.stateHistory.push(e);5<this.stateHistory.length&&this.stateHistory.shift()}.call(this,e);T.call(this,e);!function(e){var t,i;if(this.appContext&&!this.appContext.conf.unifiedConf.widgetSDK){t=this.getElements(this.LPViewMap.chattingWithIcon,this.mainWindow);for(var n=0;n<t.length;n++){i={view:t[n],useClasses:!0,display:"inline-block"};e!==this.State.CHATTING||this.appContext.conf.unifiedConf.connectorsSfConfig?this.hide(i):this.show(i)}}}.call(this,e);this.appContext&&!this.appContext.conf.unifiedConf.connectorsSfConfig&&this.appContext.wrapperWindow.setTitle(function(e){var t,i,n=this.showMessageUs&&this.barTitleText;switch(e=e||this.getModelParam(this.uiPath.STATE)){case this.State.APP_ENDED:t=this.translator.translate(this.State.ENDED);break;case this.State.REQUESTED:t=n;break;case this.State.CHATTING:case this.State.CONNECTION_ISSUE:t=this.showMessageUs&&this.isBarTitleDisplay?this.barTitleText:this.getModelParam(this.chatPath.AGENT_NAME)||n||this.translator.translate(this.State.CHATTING);break;case this.State.PRE_SMS:t=this.translator.translate(this.State.PRE_SMS);break;default:i=n||this.translator.translate("connecting");t=this.translator.translate(e)||i}return t}.call(this,e));m.call(this,!1,e)}function C(e){var t=this;setTimeout(function(){f.call(t)},e)}function T(e){var t=e===this.State.ENDED||e===this.State.APP_ENDED,i=e===this.State.WAITING,n=this.util.getPropertyFromObject(this.appContext,"conf.unifiedConf.external",!1),a=this.util.getPropertyFromObject(this.appContext,"conf.windowConf.surveyPostChatEnabled",!1),o=this.util.getPropertyFromObject(this.models.chatModel.getModel(),"attributes.chat",{});if(this.closeOnEnd===this.CloseOnEndType.CLOSE&&this.consumerConfirmedClose&&!this.appContext.clearingHistory){if(t||i)if(this.isAsync){var o=o.currentDialogType===this.dialogStatics.types.POST_SURVEY,s=w.call(this,2),r=w.call(this);if(n)(s===this.State.POST_CHAT||i&&s===this.State.APP_ENDED&&!a||v(["chatting","applicationEnded","waiting","chatting","applicationEnded"],r))&&f.call(this);else{n=v(["applicationEnded","waiting","chatting","applicationEnded","waiting"],r);i&&s===this.State.APP_ENDED&&!o&&(n?C.call(this,2e3):f.call(this))}}else e===this.State.APP_ENDED&&C.call(this,2e3)}else if(t&&this.isClosingWindow){this.appContext.clearingHistory&&(this.appContext.clearingHistory=!1);f.call(this)}}function E(e){var t=this.getModelParam(this.uiPath.STATE),e=e&&e.newValue;t!==this.State.CHATTING||this.appContext.conf.unifiedConf.connectorsSfConfig||(e&&!this.isBarTitleDisplay?this.appContext.wrapperWindow.setTitle(e):this.showMessageUs&&this.appContext.wrapperWindow.setTitle(this.barTitleText))}function y(e){this.blurredTimeout&&clearTimeout(this.blurredTimeout);var t=this;e.focus?this.blurredTimeout=setTimeout(function(){t.wasBlurred=!1},100):this.wasBlurred=!0}function b(){this.isFocusInsideApp()&&this.focusOnElement(this.LPViewMap.closeButton,this.maximizedView)}function S(e){if(e&&e.type===lpTag.unifiedWindow.consts.slider.viewType.widgetSDKView){this.sliderButton.title=this.translate("tooltip_close_widgets");this.sliderButton.setAttribute("aria-expanded",!0)}else this.sliderButton.title=this.translate("tooltip_open_widgets")}function I(){if(this.appContext.conf.unifiedConf.widgetSDK){this.sliderButton.title=this.translate("tooltip_open_widgets");this.sliderButton.setAttribute("aria-expanded",!1);this.focusOnElement(this.LPViewMap.widgetSdkButton,this.maximizedView)}else this.focusOnElement(this.LPViewMap.maximized,document.body)}function N(e){e=e&&"number"==typeof e.newValue&&e.newValue||0;if(0<e){n.removeClass(this.titleDiv,this.LPClassesMap.lp_slider_gap);!function(e){this.widgetNotificationText.innerHTML=""+e;this.removeClass(this.widgetNotificationContainer,"lpHide");this.shakeX(this.getFirstElement(this.widgetNotificationContainer))}.call(this,e)}else{n.addClass(this.titleDiv,this.LPClassesMap.lp_slider_gap);this.addClass(this.widgetNotificationContainer,"lpHide")}}function x(e){this.mainWindow.appendChild(e)}function A(e){this.maximizedView.appendChild(e)}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e;lpTag.unifiedWindow.WrapperWindowExtender=lpTag.unifiedWindow.WrapperWindowExtenderBase.extend({ControllerName:"WrapperWindowExtender",LPClassesMap:{hideMaximizedKeyframes:"hide_maximized_keyframes",showMaximizedKeyframes:"show_maximized_keyframes"},LPWindowSizesMap:{small:{value:"small",bottom:"-400px"},large:{value:"large",bottom:"-580px"}},initialize:function(){this.windowWidth=280;this.windowSize=this.appContextConf.uiState.window.size||this.LPWindowSizesMap.small.value;this.allowMaxVerticalDrag=m("maximizedVerticalDrag",this.appContext);this.allowMinVerticalDrag=m("minimizedVerticalDrag",this.appContext);this.wrapperWindow=this.appContext.wrapperWindow},events:function(){this.bindViewEvent({view:this.minimizedView,DOMEvent:"click",callback:i,context:this});this.bindViewEvent({inView:this.maximizedView,selector:this.LPViewMap.minimizeButton,DOMEvent:"click",callback:t,context:this});this.bindModel({path:this.uiPath.WINDOW_EMBEDDED,callback:n,context:this});this.bindModel({path:this.uiPath.WINDOW_MAXIMIZED,callback:s,context:this})},render:function(){var e=this.appContext.conf.unifiedConf;this.fontBasedScale=e.enableFontBasedZoom||!1;if(!e.poppedOut&&!e.external){this.appContext.browserStateManager.on(this.appContext.browserStateManager.EVENT_NAME.RESIZE,o,this);this.bindModel({path:this.uiPath.WINDOW_POSITION,callback:a,context:this});this.maxDragInstance=this.dragableView({view:this.appContext.wrapperWindow.getMaximizedElement(),anchor:this.getFirstElement(this.LPViewMap.header,this.maximizedView),container:document.body,horizontal:!0,vertical:!1,sticky:!0,stickyHorizontal:!1,stickyVertical:!1,onDragEnd:this.maxDragComplete,context:this,allowVerticalDrag:this.allowMaxVerticalDrag});this.minDragInstance=this.dragableView({view:this.minimizedView,anchor:this.getFirstElement(this.LPViewMap.header,this.minimizedView),container:document.body,horizontal:!0,vertical:!1,sticky:!0,stickyHorizontal:!1,stickyVertical:!1,onDragEnd:this.minDragComplete,context:this,allowVerticalDrag:this.allowMinVerticalDrag})}this.scaleWindow()}});(e=lpTag.unifiedWindow.WrapperWindowExtender.prototype).changeMode=function(e,t){t&&this.appContext.uiStateManager.setWindowState(e)};e.dispose=function(){this.appContext&&this.appContext.browserStateManager&&this.appContext.browserStateManager.off(this.appContext.browserStateManager.EVENT_NAME.RESIZE,o);lpTag.unifiedWindow.WrapperWindowExtenderBase.prototype.dispose.call(this)};e.maxDragComplete=function(e){e.minBottom=this.minimizedView.style.bottom;this.dragComplete(e)};e.minDragComplete=function(e){e.minBottom=e.bottom;e.bottom=this.maximizedView.style.bottom;this.dragComplete(e)};e.dragComplete=function(e){this.dragging=e.dragging;this.dragging||this.appContext.uiStateManager.setWindowPosition({left:e.left,right:e.right,bottom:e.bottom||"0px",minBottom:e.minBottom||"0px"})};function t(e){if(!this.maxDragInstance||!this.maxDragInstance.dragging){this.preventDefault(e);this.changeMode(this.states.MINIMIZED,!0)}}function i(e){var t=this.appContext.conf.engConf;if(t.externalFailed){this.appContext.appConfigurationManager.openExternal(t,t.externalConfIfFailed.url);this.appContext.events.trigger({appName:"*",eventName:this.EventName.application.DO_HARAKIRI})}else if(!this.minDragInstance||!this.minDragInstance.isDragging()){this.preventDefault(e);this.changeMode(this.states.MAXIMIZED,!0)}}function n(){var e=this.appContext.conf.unifiedConf,t=this.getModelParam(this.uiPath.WINDOW_EMBEDDED);e.poppedOut||e.external||(t?this.appContext.wrapperWindow.show():this.appContext.wrapperWindow.hide())}function a(e){var t=n(e.newValue,this.allowMinVerticalDrag,!1),e=n(e.newValue,this.allowMaxVerticalDrag,!0),i=r.call(this);t.display=this.maximizedVisible?"none":"block";this.css(this.minimizedView,t);e.display=this.maximizedVisible?"block":"none";if(window.innerWidth<=320){e.right="0";t.right="0"}this.css(this.maximizedView,e);d();this.logger.debug("_windowPositionChanged: special="+i+" maximizedVisible="+this.maximizedVisible,this.ControllerName);p.call(this,this.maximizedVisible);this.scaleWindow();function n(e,t,i){var n={left:e.left,right:e.right};i&&e.hasOwnProperty("bottom")?n.bottom=e.bottom||"0px":!i&&e.hasOwnProperty("minBottom")&&(n.bottom=e.minBottom||"0px");t||(n.bottom="0px");return n}}e.calculateScale=function(){var e=c(this.appContextConf.unifiedConf.defaultFontSize||"16px"),t=parseFloat(getComputedStyle(document.documentElement).fontSize);return e<t?t/e:1};e.scaleContent=function(){var e=this.appContext.wrapperWindow.getMaximizedElement(),t=this.appContext.wrapperWindow.getMinimizedElement(),i=this.getModelParam(this.uiPath.WINDOW_POSITION),i=i.left&&"auto"!==i.left?"left":"right";e.style.transformOrigin="bottom "+i;e.style.transform="scale("+this.scale+")";e.style.maxHeight="calc(calc(100% / "+this.scale+") - 20px)";t.style.transformOrigin="bottom "+i;t.style.transform="scale("+this.scale+")";lpTag.events.trigger(this.ControllerName,this.EventName.wrapperWindowExtender.WINDOW_SCALE_SET,this.scale);if(this.appContext.conf.unifiedConf.poppedOut||this.appContext.conf.unifiedConf.external){e.style.transformOrigin="center top";e.style.maxWidth="calc(100% / "+this.scale+")";e.style.maxHeight="calc(100% / "+this.scale+")";this.originalWindowHeight=this.originalWindowHeight||c(window.outerHeight);this.originalWindowWidth=this.originalWindowWidth||c(window.outerWidth);i=this.originalWindowWidth*this.scale,t=this.originalWindowHeight*this.scale;window.resizeTo(i,t)}};e.removeScale=function(){var e=this.appContext.wrapperWindow.getMaximizedElement(),t=this.appContext.wrapperWindow.getMinimizedElement();e.style.transformOrigin="initial";e.style.transform="initial";e.style.maxHeight="calc(100% - 20px)";t.style.transformOrigin="initial";t.style.transform="initial";if(this.appContext.conf.unifiedConf.poppedOut||this.appContext.conf.unifiedConf.external){e.style.maxWidth="initial";this.originalWindowHeight=this.originalWindowHeight;this.originalWindowWidth=this.originalWindowWidth;this.originalWindowHeight&&this.originalWindowWidth&&window.resizeTo(this.originalWindowWidth,this.originalWindowHeight)}lpTag.events.trigger(this.ControllerName,this.EventName.wrapperWindowExtender.WINDOW_SCALE_SET,this.scale)};e.scaleWindow=function(){if(this.fontBasedScale){this.scale=this.calculateScale();1<this.scale?this.scaleContent():this.scale<=1&&this.removeScale()}};e.getScale=function(){return this.scale||1};function o(e){var t,i=this.getModelParam(this.uiPath.WINDOW_POSITION),n=i.left&&"auto"!==i.left?"left":"right",a=this.appContext.wrapperWindow.getMaximizedElement(),o=this.appContext.wrapperWindow.getMinimizedElement(),s=this.getComputedStyle(a),r=this.getComputedStyle(o),a=(a.getBoundingClientRect(),o.getBoundingClientRect(),this.maximizedVisible?s:r),o=(this.maximizedVisible,c(a.width)),a=c(a[n]);if(e&&e.width<a+o){a=e.width>o?e.width-o-20:0;this.wasResized=!0;t="right"==n?{right:a+"px",left:"auto"}:{right:"auto",left:a+"px"};this.maximizedVisible?t.bottom=c(s.bottom)+"px":t.minBottom=c(r.bottom)+"px"}this.scaleWindow();t=l.call(this,this.maximizedVisible,t);if(0<Object.keys(t).length){this.appContext.uiStateManager.setWindowPosition(t);this.wasResized=!1;d();this.logger.debug("_documentResized, window size:"+e.width+" position.right:"+i.right+"position.left:"+i.left,this.ControllerName)}}function l(e,t){var i=this.appContext.wrapperWindow.getMaximizedElement(),n=this.appContext.wrapperWindow.getMinimizedElement(),a=this.getComputedStyle(i),o=this.getComputedStyle(n),i=i.getBoundingClientRect(),n=n.getBoundingClientRect(),s=this.getModelParam(this.uiPath.WINDOW_POSITION),s=s.left&&"auto"!==s.left?"left":"right",a=e?a:o,o=c((e?i:n).height),i=c(a.marginBottom),n=c(a.bottom),r=c(window.innerHeight);t=t||{};if(0!==n&&r<n+o){n=(n=r-(o+i))<0?0:n;if(t&&t.bottom)t.bottom=n+"px";else{t="right"==s?{right:a.right,left:"auto"}:{right:"auto",left:a.left};e?t.bottom=n+"px":t.minBottom=n+"px"}}return t}function d(){var e=document.querySelector(".lp_floating"),t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;if(e&&t<=320){e.style.marginBottom="0";this.scale<=1&&(e.style.maxHeight="100%");this.css(this.maximizedView,{right:0,bottom:0})}else if(e){e.style.marginBottom="20px";this.scale<=1&&(e.style.maxHeight="calc(100% - 20px)")}}function c(e){e=parseInt(e,10);return isNaN(e)?0:e}function s(e){this.logger.debug("_handleMaximizedStateChange: "+e.newValue,this.ControllerName);this.maximizedVisible=!e||e.newValue;(this.maximizedVisible?function(e){this.logger.debug("Maximizing view desktop",this.ControllerName);!function(e){this.logger.debug("_hideMinimized",this.ControllerName);this.minimizedHeight=g(this.minimizedView);this.hide(this.minimizedView);this.runCallback(e,this)}.call(this,h)}:function(){this.logger.debug("Minimizing view desktop",this.ControllerName);!function(e){var t=this;this.logger.debug("_hideMaximized",this.ControllerName);!function(){var e=g(this.getFirstElement(this.LPViewMap.header,this.maximizedView));this.maximizedHeight=g(this.maximizedView);this.createKeyframe(this.LPClassesMap.hideMaximizedKeyframes,[{percent:0,animate:"height: "+this.maximizedHeight+"px; bottom: "+this.maximizedView.style.bottom},{percent:50,animate:"height: "+.5*this.maximizedHeight+"px;"},{percent:100,animate:"height: "+e+"px; bottom: "+this.minimizedView.style.bottom+"; margin-bottom: 0px;"}],200)}.call(this);this.animateKeyframe({view:this.maximizedView,classname:this.LPClassesMap.hideMaximizedKeyframes,showBefore:!0,hideAfter:!0,showAnimation:!r.call(this),callback:function(){t.maximizedVisible=!1;t.logger.debug("_hideMaximized: animation complete",t.ControllerName);t.runCallback(e,t)}})}.call(this,f)}).call(this);this.loaded=!0}function r(){return!(this.loaded&&!this.wasBlurred&&!this.wasResized)}function u(){var e,t=this.getFirstElement(this.LPViewMap.header,this.maximizedView),t=getComputedStyle(t).backgroundColor,n=(t=(t=t).match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/),i=parseInt(t[1],10),e=parseInt(t[2],10),t=parseInt(t[3],10),(299*i+587*e+114*t)/1e3<40),i=[];i.push(this.getFirstElement(this.LPViewMap.topMenuButton,this.maximizedView));i.push(this.getFirstElement(this.LPViewMap.closeButton,this.maximizedView));i.push(this.getFirstElement(this.LPViewMap.minimizeButton,this.maximizedView));i.push(this.getFirstElement(this.LPViewMap.closeButton,this.minimizedView));i.push(this.getFirstElement(this.LPViewMap.maximizeButton,this.minimizedView));i.push(this.getFirstElement(this.LPViewMap.widgetSdkButton,this.maximizedView));i.push(this.getFirstElement(this.LPViewMap.refreshSdkButton,this.maximizedView));i.push(this.getFirstElement(this.LPViewMap.minimizeSdkButton,this.maximizedView));i.forEach(function(e){var t=e,i=n;if(t){t.onmouseover=function(){t.style.backgroundColor=i?"rgba(255,255,255,0.3)":"rgba(0,0,0,0.3)"};t.onmouseleave=function(){t.style.backgroundColor="transparent"}}})}function p(e){e=l.call(this,e,{});0<Object.keys(e).length&&this.appContext.uiStateManager.setWindowPosition(e)}function h(e){var t=this;this.logger.debug("_showMaximized",this.ControllerName);!function(){this.minimizedHeight||(this.minimizedHeight=parseInt(this.getComputedStyle(this.appContext.wrapperWindow.getMinimizedElement()).height,10));this.maximizedHeight||(this.maximizedHeight=parseInt(this.getComputedStyle(this.appContext.wrapperWindow.getMaximizedElement()).height,10));this.createKeyframe(this.LPClassesMap.showMaximizedKeyframes,[{percent:0,animate:"height: "+this.minimizedHeight+"px; bottom: "+this.minimizedView.style.bottom+"; margin-bottom: 0px;"},{percent:50,animate:"height: "+.5*this.maximizedHeight+"px;"},{percent:100,animate:"height: "+this.maximizedHeight+"px; bottom: "+this.maximizedView.style.bottom}],200)}.call(this);this.animateKeyframe({view:this.maximizedView,showBefore:!0,classname:this.LPClassesMap.showMaximizedKeyframes,showAnimation:!r.call(this),callback:function(){t.logger.debug("_showMaximized: animation complete",t.ControllerName);t.maximizedVisible=!0;p.call(this,!0);t.appContext.events.trigger({appName:t.ControllerName,eventName:t.VCEvents.MAXIMIZE_VISIBLE});t.runCallback(e,t);u.call(this)}})}function f(e){this.logger.debug("_showMinimized",this.ControllerName);this.show(this.minimizedView);p.call(this,!1);this.runCallback(e,this);this.focusOnElement(this.LPViewMap.maximizeButton,this.minimizedView)}function g(e){e=e.getBoundingClientRect();return e.bottom-e.top}function m(e,t){return!(!t||!t.conf)&&(t.conf.unifiedConf&&t.conf.unifiedConf[e]?t.conf.unifiedConf[e]:!(!t.conf.windowConf||!t.conf.windowConf[e])&&t.conf.windowConf[e])}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e,i=lpTag.unifiedWindow.applicationUtils;lpTag.unifiedWindow.PagingViewControllerBase=lpTag.unifiedWindow.BaseViewController.extend({utils:lpTag.taglets.lpUtil,ControllerName:"PagingViewControllerBase",className:"lp_paging_wrapper",LPViewMap:{pagesArea:"^pages_area",pager:"^pager",prevButton:"^prev_button",nextButton:"^next_button",submitButton:"^submit_button",cancelButton:"^cancel_button",closeSurveyButton:"^close_survey_button"},LPClassesMap:{selected:"lp_selected"},initialize:function(e){this.headerText=e.headerText;this.footerText=e.footerText;this.appContext=e.appContext;this.submitFunc=e.submitCallback;this.cancelFunc=e.cancelCallback;this.validatorFunc=e.validatorCallback;this.dataContext=e.context;this.addClass(this.view,this.className);this.isLogicalSurvey=e.isLogicalSurvey;this.renderPages(e.pages);e.activeQuestions&&this.refresh(e.activeQuestions)},events:function(){this.bindViewEvent({selector:this.LPViewMap.submitButton,DOMEvent:"click",callback:this.submitClicked});this.bindViewEvent({selector:this.LPViewMap.cancelButton,DOMEvent:"click",callback:this.cancelClicked});this.bindViewEvent({selector:this.LPViewMap.closeSurveyButton,DOMEvent:"click",callback:this.cancelClicked});0===this.pages.length&&this.appContext.events.bind({appName:"*",eventName:this.VCEvents.MAXIMIZE_VISIBLE,context:this,func:t})},onInitialize:function(){0===this.pages.length&&t.call(this);this.toggleSubmitButtonAvailability()}});(e=lpTag.unifiedWindow.PagingViewControllerBase.prototype).enableSubmit=function(e){var t=this.getFirstElement(this.LPViewMap.submitButton);t&&(e?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled"))};e.submitClicked=function(){this.utils.runCallback(this.submitFunc,this.dataContext)};e.cancelClicked=function(){this.utils.runCallback(this.cancelFunc,this.dataContext)};e.renderPages=function(e){this.pages=[];if(0===e.length)a.call(this,this.getFirstElement(this.LPViewMap.pagesArea));else for(var t=0;t<e.length;t++)this.addPage(e[t],0===t,t===e.length-1)};e.refresh=function(e){};e.isIncludedId=function(e,t){return-1!==i.indexOf(e,t)};e.addPage=function(e,t,i){var n={};n.controller=o(e)?e:null;n.view=o(e)?e.view:e;n.view.style["-webkit-overflow-scrolling"]="touch";void 0!==this.headerText&&t&&this.loadSingleResource("<div class='lp_lpview_survey_header lp_survey_header_area lpc_survey-area__header {{deviceClass}}'><div class='lp_header_text lp_text'>{{text}}</div></div>",function(){a.call(this,n.view)});void 0!==this.footerText&&i&&this.loadSingleResource("<div class='lp_lpview_survey_footer lp_survey_footer_area'><div class='lp_footer_text lp_text'>{{text}}</div></div>",function(){!function(e){if(this.footerText){var t=this.createView({template:"<div class='lp_lpview_survey_footer lp_survey_footer_area'><div class='lp_footer_text lp_text'>{{text}}</div></div>",wrapWithDiv:!1,doNotAddChild:!0,textInjection:{text:this.footerText}});this.addView({viewToAdd:t,targetView:e})}}.call(this,n.view)});this.getFirstElement(this.LPViewMap.pagesArea).appendChild(n.view);this.pages.push(n)};e.displayButton=function(e,t){t?this.show({view:e,useClasses:!0}):this.hide({view:e,useClasses:!0})};e.toggleSubmitButtonAvailability=function(){this.setEnabled(!this.parent.isSubmitSurveyDisabled,this.LPViewMap.submitButton)};function a(e){if(this.headerText){var t=this.createView({template:"<div class='lp_lpview_survey_header lp_survey_header_area lpc_survey-area__header {{deviceClass}}'><div class='lp_header_text lp_text'>{{text}}</div></div>",wrapWithDiv:!1,doNotAddChild:!0,textInjection:{text:this.headerText}});this.addView({viewToAdd:t,targetView:e,beforeView:e.firstChild})}}function o(e){return e&&e.isViewController}function t(){var e=this.parent.isCloseSurveyVisible?this.LPViewMap.closeSurveyButton:this.parent.isSubmitSurveyDisabled?this.LPViewMap.cancelButton:this.LPViewMap.submitButton;this.focusOnElement(e)}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e,t;lpTag.unifiedWindow.PagingViewController=lpTag.unifiedWindow.PagingViewControllerBase.extend({ControllerName:"PagingViewController",events:function(){this.bindViewEvent({selector:this.LPViewMap.submitButton,DOMEvent:"keydown",callback:this.toggleWaitingForKeyUp});this.bindViewEvent({selector:this.LPViewMap.submitButton,DOMEvent:"keyup",callback:this.submitKeyUp});this.bindViewEvent({selector:this.LPViewMap.cancelButton,DOMEvent:"keydown",callback:this.toggleWaitingForKeyUp});this.bindViewEvent({selector:this.LPViewMap.cancelButton,DOMEvent:"keyup",callback:this.cancelKeyUp});this.bindViewEvent({selector:this.LPViewMap.closeSurveyButton,DOMEvent:"keydown",callback:this.toggleWaitingForKeyUp});this.bindViewEvent({selector:this.LPViewMap.closeSurveyButton,DOMEvent:"keyup",callback:this.cancelKeyUp})},render:function(){this.updateButtonsEnablement()}});e=lpTag.unifiedWindow.PagingViewController.prototype;t=lpTag.unifiedWindow.PagingViewControllerBase.prototype;e.updateButtonsEnablement=function(){this.displayButton(this.LPViewMap.prevButton,!1);this.displayButton(this.LPViewMap.nextButton,!1);this.displayButton(this.LPViewMap.submitButton,!this.parent.isCloseSurveyVisible);this.displayButton(this.LPViewMap.cancelButton,!this.parent.isCloseSurveyVisible);this.displayButton(this.LPViewMap.closeSurveyButton,this.parent.isCloseSurveyVisible)};e.submitClicked=function(e){this.waitingForKeyUp||t.submitClicked.call(this)};e.submitKeyUp=function(e){if(this.waitingForKeyUp){t.submitClicked.call(this);this.waitingForKeyUp=!1}};e.cancelClicked=function(e){this.waitingForKeyUp||t.cancelClicked.call(this)};e.cancelKeyUp=function(e){if(this.waitingForKeyUp){t.cancelClicked.call(this);this.waitingForKeyUp=!1}};e.toggleWaitingForKeyUp=function(e){13===e.keyCode&&(this.waitingForKeyUp=!0)};e.refresh=function(e){var t,i;if(e)for(var n=0;n<this.pages.length;n++){i=this.pages[n];t=this.isIncludedId(e,i.controller.question.id);i={view:i.view,useClasses:!0};t?this.show(i):this.hide(i)}};e.updateActivePages=function(e){this.refresh(e)}}();!function(){var e,i=lpTag.taglets.lpUtil;lpTag.unifiedWindow.SliderViewControllerBase=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"SliderViewControllerBase",applicationName:"SliderViewController",template:"<div class='lpc_slider lp_slider {{deviceClass}}' data-lp-point='slider' data-lp-cust-id='sliderMaximizedWindow'><div class='lp_slider_header lpc_slider-header {{deviceClass}}' data-lp-point='header' data-lp-cust-id='top'><div class='lp_header-content-wrapper'><button class='lpc_slider-header__refresh-button {{deviceClass}} lp_refresh lp_hidden' data-lp-point='refresh' title='{{tooltip_refresh_slider}}' tabindex='0'><span class='lp_refresh_slider_icon' data-lp-point='refresh-slider-icon' data-lp-type='icon'><img class='lpc_slider-header__refresh-button-asset {{deviceClass}}' src='{{iconsRepository}}/sprites_v1.png' alt='{{tooltip_refresh_slider}}' aria-hidden='true' data-lp-point='refresh-img'></span></button><div class='lp_title' role='heading' aria-level='2'><span data-lp-point='sliderHeaderText' data-lp-cust-id='top_text' class='lp_top-text lpc_slider-header__text {{deviceClass}}'>{{sliderHeader}}</span></div><button class='lpc_slider-header__minimize-button {{deviceClass}} lp_minimize' data-lp-point='minimize-slider' title='{{tooltip_minimize_slider}}' tabindex='0'><span class='lp_minimize-right-slider-icon' data-lp-point='minimize-icon' data-lp-type='icon'><img class='lpc_slider-header__minimize-button-asset {{deviceClass}}' src='{{iconsRepository}}/sprites_v1.png' alt='{{tooltip_minimize_slider}}' aria-hidden='true' data-lp-point='minimize-img'></span></button></div></div><div class='lpc_slider__body lp_slider_container {{deviceClass}}' data-lp-point='container' data-lp-cust-id='surveyArea'></div></div>",isSliderOpen:!1,inProgress:!1,sliderCurrentTimeout:void 0,views:{},LPViewMap:{mainWindow:"^maximized",minimizeButton:"^minimize-slider",minimizeImg:"^minimize-img",container:"^container",headerText:"^sliderHeaderText",header:"^header",slider:"^slider",minimizeIcon:"^minimize-icon",refreshButton:"^refresh",mainArea:"^main"},LPClassesMap:{sliderOpen:"lp_slider_open",cssCustomization:{window:"lpc_window_slider-open",header:"lpc_maximized-header_slider-open",mainArea:"lpc_body_slider-open"}},autoCloseTimeout:3e3,keepWidgetOpen:!1,cobrowseMinimizeBtnTitle:"",initialize:function(e){var t=this.appContext.conf.widgetSDK;this.unifiedConf=this.appContext.conf.unifiedConf;this.mainWindow=this.getFirstElement(this.LPViewMap.mainWindow,document.body);this.maximized=this.appContext.wrapperWindow.getMaximizedElement();this.showRefreshButton=Array.isArray(t)&&(!0===t[0].showRefreshButton||"true"===t[0].showRefreshButton);this.maximizedHeader=this.getFirstElement(this.LPViewMap.header,this.maximized);this.maximizedMainArea=this.getFirstElement(this.LPViewMap.mainArea,this.maximized);if(this.unifiedConf.connectorsSfConfig){this.getFirstElement(this.LPViewMap.minimizeButton).style.visibility="hidden";this.keepWidgetOpen=!0}},events:function(){this.bindViewEvent({inView:this.view,selector:this.LPViewMap.minimizeButton,DOMEvent:"click",callback:t,context:this});this.bindViewEvent({inView:this.view,selector:this.LPViewMap.refreshButton,DOMEvent:"click",callback:this.refreshView,context:this});this.bindViewEvent({selector:this.LPViewMap.slider,DOMEvent:"keydown",callback:this.keydownListener,context:this});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.PREPARE_SLIDER_CLOSED_TIMEOUT,context:this,func:n});this.appContext.events.bind({appName:"RichContentWidget",eventName:"CloseRichContentWidget",context:this,func:t})},render:function(){this.hide()},setSliderToolbarViewByType:function(e){var t=this.getFirstElement(this.LPViewMap.refreshButton);t&&(e===lpTag.unifiedWindow.consts.slider.viewType.widgetSDKView&&this.showRefreshButton?i.removeClass(t,"lp_hidden"):i.addClass(t,"lp_hidden"))}});(e=lpTag.unifiedWindow.SliderViewControllerBase.prototype).isInProgress=function(){return this.inProgress};e.addView=function(e,t,i,n,a,o){this.views[i]={view:e,header:t,type:n||"",minimizeSliderBtnTitle:o||""};a&&(this.views[i].callbacks=a);this.getFirstElement(this.LPViewMap.container).appendChild(e);this.selectedViewId!==i&&this.hide(e)};e.removeView=function(e){if("object"==typeof this.views[e]&&!lpTag.taglets.lpUtil.getPropertyFromObject(this,"unifiedConf.connectorsSfConfig",!1)){this.getFirstElement(this.LPViewMap.container).removeChild(this.views[e].view);delete this.views[e]}};e.setSelectedView=function(e){if("object"==typeof this.views[e]){this.setSliderToolbarViewByType(this.views[e].type);this.selectedViewId&&this.views[this.selectedViewId]&&this.hide(this.views[this.selectedViewId].view);this.selectedViewId=e;var e=this.getFirstElement(this.LPViewMap.slider),t=this.getFirstElement(this.LPViewMap.headerText,e),t=(t.innerHTML=this.views[this.selectedViewId].header,t.textContent);t&&e.setAttribute("aria-label",t);this.views[this.selectedViewId].minimizeSliderBtnTitle&&this.setMinimizeButtonTitle(this.views[this.selectedViewId].minimizeSliderBtnTitle);t=this.views[this.selectedViewId];this.captureFocus(e);this.show(t.view);this.appContext.events.trigger({appName:"slider",eventName:this.VCEvents.SLIDER_VIEW_CHANGE,data:{id:this.selectedViewId,type:t.type}})}};e.setMinimizeButtonTitle=function(e){var t,i=this.getFirstElement(this.LPViewMap.slider);if(e){t=this.getFirstElement(this.LPViewMap.minimizeButton,i);i=this.getFirstElement(this.LPViewMap.minimizeImg,i);t.setAttribute("title",e);t.setAttribute("aria-label",e);i.setAttribute("alt",e)}};e.captureFocus=function(t){if(null!==t){if(null==t.getAttribute("aria-modal")&&null==t.getAttribute("role")){t.setAttribute("aria-modal","true");t.setAttribute("role","dialog")}if(void 0!==t.querySelectorAll){var i=t.querySelectorAll('a[href]:not([tabindex="-1"]):not(.lp_hidden),area[href]:not([tabindex="-1"]):not(.lp_hidden),input:not([tabindex="-1"]):not(.lp_hidden),select:not([tabindex="-1"]):not(.lp_hidden),textarea:not([tabindex="-1"]):not(.lp_hidden),button:not([tabindex="-1"]):not(.lp_hidden),iframe:not([tabindex="-1"]):not(.lp_hidden),[tabindex]:not([tabindex="-1"]):not(.lp_hidden),[contentEditable=true]:not([tabindex="-1"]):not(.lp_hidden)');if(0!==i.length){var e=i[0],n=i[i.length-1],a=this.getFocusableHeaderButton(this.mainWindow);e!=n&&t.addEventListener("keydown",function(e){if(("Tab"===e.key||9===e.keyCode)&&!e.shiftKey)if(document.activeElement==t.querySelector('[data-lp-point="minimize-slider"]')&&i[i.length-1]&&!this.appContext.coBrowseManager.isInActiveCall()){i[i.length-1].focus();e.preventDefault()}else if(document.activeElement==n&&a){a.focus();e.preventDefault()}})}}}};e.getSelectedViewId=function(){return this.selectedViewId};e.getSelectedViewType=function(){return this.views&&this.views[this.selectedViewId]&&this.views[this.selectedViewId].type};e.hideSlider=function(){if(this.isVisible(this.view)&&!this.unifiedConf.connectorsSfConfig){this.hide();this.removeClass(this.maximized,this.LPClassesMap.sliderOpen);this.removeClass(this.maximized,this.LPClassesMap.cssCustomization.window);this.removeClass(this.maximizedHeader,this.LPClassesMap.cssCustomization.header);this.removeClass(this.maximizedMainArea,this.LPClassesMap.cssCustomization.mainArea);this.isSliderOpen=!1;this.appContext.events.trigger({appName:"slider",eventName:this.VCEvents.SLIDER_CLOSED,data:this.views&&this.views[this.selectedViewId]})}};e.refreshView=function(e){var t=this.views[this.selectedViewId]&&this.views[this.selectedViewId].callbacks;e&&e.context;t&&this.isVisible(this.view)&&i.runCallback(t.reload,t.context,this.getFirstElement(e.eventSelector))};e.showSlider=function(){if(!this.isVisible(this.view)){this.addClass(this.maximized,this.LPClassesMap.sliderOpen);this.addClass(this.maximized,this.LPClassesMap.cssCustomization.window);this.addClass(this.maximizedHeader,this.LPClassesMap.cssCustomization.header);this.addClass(this.maximizedMainArea,this.LPClassesMap.cssCustomization.mainArea);this.show();this.isSliderOpen=!0}};e.removeAllViews=function(){for(var e in this.views)this.views.hasOwnProperty(e)&&this.removeView(e);this.views=[]};e.focusOnMinimize=function(){var e=this.getFirstElement(this.LPViewMap.minimizeButton);e&&"function"==typeof e.focus&&e.focus()};e.dispose=function(){this.removeAllViews();this.hideSlider();this.appContext.events.unbind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.PREPARE_SLIDER_CLOSED_TIMEOUT,context:this,func:n});lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};e.keydownListener=function(e){27===e.keyCode&&t.call(this)};function t(){if(this.sliderCurrentTimeout){clearTimeout(this.sliderCurrentTimeout);this.sliderCurrentTimeout=void 0}this.keepWidgetOpen||(this.appContext.WidgetManager&&this.appContext.WidgetManager.getLastSliderState()?this.appContext.WidgetManager.onWidgetStateChanged(!1):function(){if(this.views&&this.views.coBrowseInvitationView&&"coBrowseInvitationView"!==this.selectedViewId)return this.setSelectedView("coBrowseInvitationView"),!0;return!1}.call(this)||this.hideSlider())}function n(){this.isSliderOpen&&(this.sliderCurrentTimeout=setTimeout(t.bind(this),this.autoCloseTimeout))}}();!function(){var s,t,u,e,i=400,n=280,r=i+n,a=r+20,p=120,h=20,f=50,g=lpTag.unifiedWindow.applicationUtils;lpTag.unifiedWindow.SliderViewController=lpTag.unifiedWindow.SliderViewControllerBase.extend({ControllerName:"SliderViewController",LPClassesMap:{rightSlider:"lp_right_slider",leftSlider:"lp_left_slider",sliderAnimate:"lp_slider_animate_open",showLeftSliderKeyframes:"show_left_slider_animation",showRightSliderKeyframes:"show_right_slider_animation",hideLeftSliderKeyframes:"hide_left_slider_animation",hideRightSliderKeyframes:"hide_right_slider_animation",leftSliderMinimizeIcon:"lp_minimize-left-slider-icon",rightSliderMinimizeIcon:"lp_minimize-right-slider-icon"},initialize:function(e){this.minimized=this.appContext.wrapperWindow.getMinimizedElement();this.isExternal=this.appContext.conf.unifiedConf.poppedOut||this.unifiedConf.external;this.leftSlider=!this.isExternal;this.scale=1;this.isExternal&&this.appContext.browserStateManager.on(this.appContext.browserStateManager.EVENT_NAME.RESIZE,_,this);!function(){this.createKeyframe(this.LPClassesMap.showLeftSliderKeyframes,S(5,[{prop:"width",asc:!0}],i),150);this.createKeyframe(this.LPClassesMap.showRightSliderKeyframes,S(5,[{prop:"width",asc:!0},{prop:"right",asc:!1}],i),150);this.createKeyframe(this.LPClassesMap.hideLeftSliderKeyframes,S(5,[{prop:"width",asc:!1}],i),150);this.createKeyframe(this.LPClassesMap.hideRightSliderKeyframes,S(5,[{prop:"width",asc:!1},{prop:"right",asc:!0}],i),150)}.call(this)},events:function(){if(this.isExternal)window.onunload=(e=this,function(){e.isVisible(e.view)&&window.resizeTo(A(t),g.getWindowSize().height)});else{this.bindModel({path:this.uiPath.WINDOW_MAXIMIZED,callback:m,context:this});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.MAXIMIZE_VISIBLE,context:this,func:y});this.bindModel({path:this.uiPath.WINDOW_EMBEDDED,callback:l,context:this})}var e;this.appContext.events.bind({appName:"*",eventName:this.EventName.wrapperWindowExtender.WINDOW_SCALE_SET,context:this,func:b});!function(e,t,i){t=lpTag.events.hasFired(t,e);if(0<t.length){e=t[t.length-1];e.data&&i(e.data)}}.call(this.EventName.wrapperWindowExtender.WINDOW_SCALE_SET,"*",b)},render:function(){this.isExternal||(this.dragInstance=this.dragableView({view:this.maximized,anchor:this.getFirstElement(this.LPViewMap.header),container:document.body,horizontal:!0,vertical:!1,sticky:!0,stickyHorizontal:!1,stickyVertical:!1,callback:this.dragComplete}));this.preventScroll({view:this.view});t=A(g.getWindowSize().width);this.hide()}});(e=lpTag.unifiedWindow.SliderViewController.prototype).dragComplete=function(e){this.appContext.uiStateManager.setWindowPosition({left:e.left,right:e.right,bottom:0})};e.showSlider=function(){if(!this.isVisible(this.view)&&!this.inProgress){if(!this.isExternal){E.call(this,null,!0);!function(){this.bindModel({path:this.uiPath.WINDOW_POSITION,callback:E,context:this})}.call(this)}o.call(this);this.isSliderOpen=!0}};e.hideSlider=function(){if(this.isVisible(this.view)&&!this.inProgress){this.isSliderOpen=!1;l.call(this);this.isExternal||!function(){this.unbindModel({path:this.uiPath.WINDOW_POSITION,callback:E,context:this})}.call(this);this.appContext.events.trigger({appName:"slider",eventName:this.VCEvents.SLIDER_CLOSED,data:this.views&&this.views[this.selectedViewId]})}};e.dispose=function(){this.removeAllViews();this.hideSlider();c.call(this);this.appContext.events.unbind({appName:"*",eventName:this.VCEvents.MAXIMIZE_VISIBLE,context:this,func:y});this.appContext.events.unbind({appName:"*",eventName:this.EventName.wrapperWindowExtender.WINDOW_SCALE_SET,context:this,func:b});this.appContext.browserStateManager.off(this.appContext.browserStateManager.EVENT_NAME.RESIZE,_);lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};function o(){this.inProgress=!0;this.leftSlider=this.isExternal?this.leftSlider:v.call(this);this.addClass(this.maximized,this.leftSlider?this.LPClassesMap.leftSlider:this.LPClassesMap.rightSlider);this.addClass(this.maximized,this.LPClassesMap.sliderOpen);this.addClass(this.maximized,this.LPClassesMap.cssCustomization.window);this.addClass(this.maximizedHeader,this.LPClassesMap.cssCustomization.header);this.addClass(this.maximizedMainArea,this.LPClassesMap.cssCustomization.mainArea);!function(e){var t=this.getFirstElement(this.LPViewMap.minimizeIcon);this.removeClass(t,e?this.LPClassesMap.rightSliderMinimizeIcon:this.LPClassesMap.leftSliderMinimizeIcon);this.addClass(t,e?this.LPClassesMap.leftSliderMinimizeIcon:this.LPClassesMap.rightSliderMinimizeIcon)}.call(this,this.leftSlider);this.isExternal?C.call(this,!0):function(){var e=this.getFirstElement(this.LPViewMap.slider);e.style.width=0;this.show();this.addClass(this.maximized,this.LPClassesMap.sliderAnimate);this.leftSlider||(e.style.right=i+"px");this.animateKeyframe({view:e,classname:this.leftSlider?this.LPClassesMap.showLeftSliderKeyframes:this.LPClassesMap.showRightSliderKeyframes,showAnimation:!0,showBefore:!0,callback:d})}.call(this)}function l(){this.inProgress=!0;this.isExternal?C.call(this,!1):function(){var e=this.getFirstElement(this.LPViewMap.slider);this.addClass(this.maximized,this.LPClassesMap.sliderAnimate);this.animateKeyframe({view:e,classname:this.leftSlider?this.LPClassesMap.hideLeftSliderKeyframes:this.LPClassesMap.hideRightSliderKeyframes,showAnimation:!0,hideAfter:!0,callback:c})}.call(this)}function d(){var e=this.getFirstElement(this.LPViewMap.slider);e.style.width="";e.style.right="";this.removeClass(this.maximized,this.LPClassesMap.sliderAnimate);this.show();this.inProgress=!1}function c(){this.hide();this.removeClass(this.maximized,this.LPClassesMap.sliderOpen);this.removeClass(this.maximized,this.LPClassesMap.rightSlider);this.removeClass(this.maximized,this.LPClassesMap.leftSlider);this.removeClass(this.maximized,this.LPClassesMap.sliderAnimate);this.removeClass(this.maximized,this.LPClassesMap.cssCustomization.window);this.removeClass(this.maximizedHeader,this.LPClassesMap.cssCustomization.header);this.removeClass(this.maximizedMainArea,this.LPClassesMap.cssCustomization.mainArea);this.inProgress=!1;if(this.redraw){this.redraw=!1;o.call(this)}}function m(e){var e=!e||e.newValue,t=this.models.uiModel.get(this.uiPath.WIDGET_SLIDER_VISIBLE);e||t&&l.call(this)}function v(e){e=I.call(this,e);return(s=g.getWindowSize().width)<=r?this.leftSlider:w(e.right)?this.leftSlider?0<=s-e.right-r:!1===this.isVisible(this.view)&&e.right<=r:this.leftSlider?!0===this.isVisible(this.view)||e.left>=i:s-e.left-r<0}function w(e){var t=Number(e);return!isNaN(t)&&""!==e}function _(){u?u=!1:t=A(g.getWindowSize().width)}function C(e){if(this.isExternal)if(e){this.show();T(function(e){if(1<this.scale)return e*this.scale;return e}.call(this,a),!0,d,this)}else T(t,!1,c,this)}function T(e,t,i,n){var a,o,s,r,l,d=g.getWindowSize(),c=d.width;if(t&&d.width<e-h||!t&&d.width>e){c=t?e<(c+=p)?e:c:(c-=p)<e?e:c;u=!0;window.resizeTo(c,d.height);setTimeout((a=e,o=c,s=t,r=i,l=n,function(){g.getWindowSize().width<o-h&&s&&window.moveBy(-p,0);T(a,s,r,l)}),f)}else{n.show();lpTag.taglets.lpUtil.runCallback(i,n)}}function E(e,t){var i,n,a,o=I.call(this,e);s=g.getWindowSize().width;if(t&&s<=r){a=this.leftSlider?"0px":"auto";n=this.leftSlider?"auto":"0px"}else if(v.call(this,e)){a=function(e,t){t=w(e.right)?e.right:t-(e.width+e.left);return(t=0<t?t:0)+"px"}(o,s);n="auto";i=this.isVisible(this.view)&&!this.leftSlider}else{n=function(e,t){t=w(e.left)?e.left:t-e.right-e.width;return(t=0<t?t:0)+"px"}(o,s);a="auto";i=this.isVisible(this.view)&&this.leftSlider}!function(e){if(e){this.redraw=!0;l.call(this);this.redraw=!0}}.call(this,i);this.appContext.uiStateManager.setWindowPosition({left:n,right:a,top:"auto"})}function y(){this.models.uiModel.get(this.uiPath.WIDGET_SLIDER_VISIBLE)&&this.isSliderOpen&&o.call(this)}function b(e){this.scale=e||1}function S(e,t,i){var n,a=[];e-=1;for(var o=0;o<=e;o++){(n={}).percent=o*(100/e);n.animate=function(e,t,i,n){for(var a,o="",s=0;s<e.length;s++){o+=e[s].prop+": ";a=e[s].asc?i*(100/t):100/t*(t-i);o=o+Math.floor(a/100*n)+"px; "}return o.trim()}(t,e,o,i);a.push(n)}return a}function I(e){var t=this.getComputedStyle(this.minimized);return{right:N(e&&e.newValue.right,this.minimized.style.right),left:N(e&&e.newValue.left,this.minimized.style.left),width:x(t.width)}}function N(e,t){return"auto"===(e=e||t)?e:x(e)}function x(e){e=parseInt(e,10);return isNaN(e)?"":e}function A(e){return e<n+10?n+10:e}}();!function(){var e,a;lpTag.taglets.lpUtil;lpTag.unifiedWindow.FlutterViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"FlutterViewController",applicationName:"FlutterViewController",template:"<div class='lpc_flutter lp_flutter {{deviceClass}}' data-lp-point='flutter' data-lp-cust-id='flutterWindow' tabindex='0'><div class='lpc_flutter-header lp_flutter_header {{deviceClass}}' data-lp-point='flutterHeader' data-lp-cust-id='flutterHeader'><div class='lp_header-content-wrapper'><div class='lp_title' role='heading'><span class='lp_top-text lpc_flutter-header__text {{deviceClass}}' data-lp-point='flutterHeaderText' data-lp-cust-id='flutterTop_text'>{{flutterHeader}}</span></div><button class='lpc_flutter-header__close-button {{deviceClass}} lp_close' data-lp-point='close-flutter' title='{{tooltip_Close}}' tabindex='0'><span class='lp_close-right-flutter-icon' data-lp-point='close-icon' data-lp-type='icon'><img class='lpc_flutter-header__close-button-asset {{deviceClass}}' src='{{imagesRepository}}/close_button.svg' alt='{{tooltip_Close}}' aria-hidden='true' data-lp-point='close-img'></span></button></div></div><div class='lpc_flutter__body lp_flutter_container {{deviceClass}}' data-lp-point='container' data-lp-cust-id='flutterArea'></div></div>",LPViewMap:{closeButton:"^close-flutter",container:"^container",headerText:"^flutterHeaderText",flutter:"^flutter"},initialize:function(){},events:function(){this.bindViewEvent({inView:this.view,selector:this.LPViewMap.closeButton,DOMEvent:"click",callback:t,context:this});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_OPEN,context:this,func:n});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_STYLE_UPDATE,context:this,func:i});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_CLOSE,context:this,func:t})},render:function(){this.hide();a={flutterEml:this.getFirstElement(this.LPViewMap.flutter),containerEml:this.getFirstElement(this.LPViewMap.container),headerTextEml:this.getFirstElement(this.LPViewMap.headerText)}}});(e=lpTag.unifiedWindow.FlutterViewController.prototype).removeView=function(){if(a.containerEml&&"object"==typeof a.containerEml.firstChild)for(;a.containerEml.firstChild;)a.containerEml.removeChild(a.containerEml.lastChild)};e.dispose=function(){t.apply(this);lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};function t(){this.removeView();this.hide();this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_IS_CLOSED})}function i(e){if(e&&"object"==typeof e.style)for(var t in e.style)e.style.hasOwnProperty(t)&&(a.flutterEml.style[t.toString()]=e.style[t.toString()])}function n(e){if("object"==typeof e.view){a.containerEml.innerHTML="";var t=e.view;a.containerEml.appendChild(t);"string"==typeof e.className&&a.flutterEml.classList.add(e.className);if("object"==typeof e.style)for(var i in e.style)e.style.hasOwnProperty(i)&&(a.flutterEml.style[i.toString()]=e.style[i.toString()]);if(e.header){a.headerTextEml.innerHTML=e.header;a.headerTextEml.title=e.header}this.show();var n=18;a.headerTextEml.style.fontSize=n+"px";for(;a.headerTextEml.offsetWidth<a.headerTextEml.scrollWidth;){n--;a.headerTextEml.style.fontSize=n+"px"}}}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var h,e,c,f,g,m,v,w,_,C,u,T,E,y,b,S,I,s,p,N,t,x,i=lpTag.unifiedWindow.apps.DATE_PICKER,A=-1,M=0,$=150,n=[31,28,31,30,31,30,31,31,30,31,30,31],L={openHeightLarge:"448px",openHeightSmall:"100%"},D={disable:"disable",day:"day",hide:"hide",selected:"selected",endRange:"end_range",startRange:"start_range",inRange:"in_range",today:"today",nextMonth:"nextMonth",prevMonth:"prevMonth",pickerSizeLarge:"lp_large",pickerSizeSmall:"lp_small",keyFocused:"key-focused"},P={tabIndex:"tabindex",ariaSelected:"aria-selected",ariaLabel:"aria-label"},O={},W={SINGLE:"single",RANGE:"range"};lpTag.unifiedWindow.DatePickerViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"DatePickerViewController",template:"<div class='lpc_datePicker lp_datePicker {{deviceClass}} {{pickerSize}}' data-lp-point='datePicker' data-lp-cust-id='datePickerWindow'><div class='lpc_datePicker_navigate lp_datePicker_navigate' data-lp-point='datePickerNavigate'><button class='lpc_datePicker_navigate__previous-month-button {{deviceClass}}' title='{{prev_month}}' data-lp-point='monthsPrev' tabindex='0' aria-label='{{prev_month}}'><span class='lp_minimize-right-slider-icon' data-lp-type='icon' data-lp-point='months_prev_icon'><img class='lpc_datePicker_navigate__previous-icon lp_prev_icon {{deviceClass}}' src='{{iconsRepository}}/sprites_v1.png' alt='{{prev_month}}' aria-hidden='true'></span></button> <select class='lpc_datePicker_navigate__month-select selectMonths' data-lp-point='selectMonths' tabindex='0' id='selectMonths' aria-label='{{select_month}}'></select> <button class='lpc_datePicker_navigate__next-month-button {{deviceClass}}' title='{{next_month}}' data-lp-point='monthsNext' tabindex='0' aria-label='{{next_month}}'><span class='lp_minimize-left-slider-icon' data-lp-type='icon' data-lp-point='months_next_icon'><img class='lpc_datePicker_navigate__next-icon lp_next_icon {{deviceClass}}' src='{{iconsRepository}}/sprites_v1.png' alt='{{next_month}}' aria-hidden='true'></span></button> <button title='{{prev_year}}' class='lp_year_prev_button {{deviceClass}}' data-lp-point='yearsPrev' tabindex='0' aria-label='{{prev_year}}'><span class='lp_minimize-right-slider-icon' data-lp-type='icon' data-lp-point='years_prev_icon'><img class='lpc_datePicker_navigate__previous-icon lp_prev_icon {{deviceClass}}' src='{{iconsRepository}}/sprites_v1.png' alt='{{prev_year}}' aria-hidden='true'></span></button> <select class='lpc_datePicker_navigate__year-select selectYears' data-lp-point='selectYears' tabindex='0' aria-label='{{select_year}}'></select> <button class='lpc_datePicker_navigate__next-year-button {{deviceClass}}' title='{{next_year}}' data-lp-point='yearsNext' tabindex='0' aria-label='{{next_year}}'><span class='lp_minimize-left-slider-icon' data-lp-type='icon' data-lp-point='years_next_icon'><img class='lpc_datePicker_navigate__next-icon lp_next_icon {{deviceClass}}' src='{{iconsRepository}}/sprites_v1.png' alt='{{next_year}}' aria-hidden='true'></span></button></div><table class='lpc_datePicker_calender-table lp_calender-table' data-lp-point='calenderBox'><thead><tr><td aria-label='{{day1Name}}'><abbr title='{{day1Name}}'></abbr>{{day1}}</td><td aria-label='{{day2Name}}'><abbr title='{{day2Name}}'></abbr>{{day2}}</td><td aria-label='{{day3Name}}'><abbr title='{{day3Name}}'></abbr>{{day3}}</td><td aria-label='{{day4Name}}'><abbr title='{{day4Name}}'></abbr>{{day4}}</td><td aria-label='{{day5Name}}'><abbr title='{{day5Name}}'></abbr>{{day5}}</td><td aria-label='{{day6Name}}'><abbr title='{{day6Name}}'></abbr>{{day6}}</td><td aria-label='{{day7Name}}'><abbr title='{{day7Name}}'></abbr>{{day7}}</td></tr></thead><tbody data-lp-point='days' (keydown)='_handleCalendarBodyKeydown($event)'></tbody></table><div class='lpc_datePicker_choose-area lp_choose-area' data-lp-point='choose_area'><div class='lp_choose_date_area'><div class='lp_choose_date_start'><div class='lp_choose_date text' data-lp-point='choose_start_date'></div><div class='lp_choose_day text' data-lp-point='choose_start_day'></div></div><div class='lp_choose_date_icon hide' data-lp-point='choose_date_icon'><img class='lpc_cdatePicker_choose-area__arrow-icon lp_arrow_icon {{deviceClass}}' src='{{imagesRepository}}/arrow_right.svg' alt='' aria-hidden='true'></div><div class='lp_choose_date_end hide' data-lp-point='choose_date_end'><div class='lp_choose_date text' data-lp-point='choose_end_date'></div><div class='lp_choose_day text' data-lp-point='choose_end_day'></div></div></div><button class='lpc_datePicker_choose-button lp_choose-button' title='{{choose_button}}' data-lp-point='choose_button' tabindex='0'>{{choose_button}}</button></div></div>",LPViewMap:{datePicker:"^datePicker",days:"^days",selectMonths:"^selectMonths",selectYears:"^selectYears",monthsPrev:"^monthsPrev",monthsNext:"^monthsNext",yearsPrev:"^yearsPrev",yearsNext:"^yearsNext",chooseArea:"^choose_area",chooseStartDate:"^choose_start_date",chooseStartDay:"^choose_start_day",chooseEndDate:"^choose_end_date",chooseEndDay:"^choose_end_day",chooseDateEnd:"^choose_date_end",chooseDateIcon:"^choose_date_icon",chooseButton:"^choose_button",mainWindow:"^maximized"},preInitView:function(e){var t=this.getFirstElement(this.LPViewMap.mainWindow,document.body),i=D.pickerSizeLarge;L.openHeight=L.openHeightLarge;if(t&&t.offsetHeight<484){i=D.pickerSizeSmall;L.openHeight=L.openHeightSmall}c=lpTag.unifiedWindow.language.getLocale();s="he-IL"===c?0:1;this.textInjection={pickerSize:i,iconsRepository:e.appContext.conf.unifiedConf.iconsRepository,imagesRepository:e.appContext.conf.unifiedConf.imagesRepository,day1:0===s?this.translate("weekDayShortSunday"):this.translate("weekDayShortMonday"),day2:0===s?this.translate("weekDayShortMonday"):this.translate("weekDayShortTuesday"),day3:0===s?this.translate("weekDayShortTuesday"):this.translate("weekDayShortWednesday"),day4:0===s?this.translate("weekDayShortWednesday"):this.translate("weekDayShortThursday"),day5:0===s?this.translate("weekDayShortThursday"):this.translate("weekDayShortFriday"),day6:0===s?this.translate("weekDayShortFriday"):this.translate("weekDayShortSaturday"),day7:0===s?this.translate("weekDayShortSaturday"):this.translate("weekDayShortSunday"),day1Name:0===s?this.translate("weekDayFullSunday"):this.translate("weekDayFullMonday"),day2Name:0===s?this.translate("weekDayFullMonday"):this.translate("weekDayFullTuesday"),day3Name:0===s?this.translate("weekDayFullTuesday"):this.translate("weekDayFullWednesday"),day4Name:0===s?this.translate("weekDayFullWednesday"):this.translate("weekDayFullThursday"),day5Name:0===s?this.translate("weekDayFullThursday"):this.translate("weekDayFullFriday"),day6Name:0===s?this.translate("weekDayFullFriday"):this.translate("weekDayFullSaturday"),day7Name:0===s?this.translate("weekDayFullSaturday"):this.translate("weekDayFullSunday"),choose_button:this.translate("datePicker_choose_day"),prev_month:this.translate("prev_month"),select_month:this.translate("select_month"),next_month:this.translate("next_month"),prev_year:this.translate("prev_year"),select_year:this.translate("select_year"),next_year:this.translate("next_year")};O={TODAY:this.translate("ts_Today"),DEFAULT_HEADER:this.translate("datePicker_select_day")}},initialize:function(e){h=e.appContext.events},events:function(){this.appContext.events.bind({appName:i,eventName:lpTag.unifiedWindow.events.viewController.DATE_PICKER_SHOW,context:this,func:q});this.bindViewEvent({selector:this.LPViewMap.monthsPrev,callback:d,DOMEvent:"click",context:this});this.bindViewEvent({selector:this.LPViewMap.monthsNext,callback:F,DOMEvent:"click",context:this});this.bindViewEvent({selector:this.LPViewMap.yearsPrev,callback:B,DOMEvent:"click",context:this});this.bindViewEvent({selector:this.LPViewMap.yearsNext,callback:U,DOMEvent:"click",context:this});this.bindViewEvent({selector:this.LPViewMap.chooseButton,callback:Z,DOMEvent:"click",context:this});this.bindViewEvent({selector:this.LPViewMap.selectMonths,callback:H,DOMEvent:"change",context:this});this.bindViewEvent({selector:this.LPViewMap.selectYears,callback:z,DOMEvent:"change",context:this});this.bindViewEvent({selector:this.LPViewMap.days,callback:j,DOMEvent:"keydown",context:this});this.bindViewEvent({selector:this.LPViewMap.datePicker,callback:G,DOMEvent:"keyup",context:this});this.bindViewEvent({selector:this.LPViewMap.datePicker,callback:l,DOMEvent:"focusout",context:this})},render:function(){x={daysElm:this.getFirstElement(this.LPViewMap.days),monthsElm:this.getFirstElement(this.LPViewMap.selectMonths),yearsElm:this.getFirstElement(this.LPViewMap.selectYears),yearsNextButtonElm:this.getFirstElement(this.LPViewMap.yearsNext),yearsPrevButtonElm:this.getFirstElement(this.LPViewMap.yearsPrev),monthsNextButtonElm:this.getFirstElement(this.LPViewMap.monthsNext),monthsPrevButtonElm:this.getFirstElement(this.LPViewMap.monthsPrev),chooseStartDateElm:this.getFirstElement(this.LPViewMap.chooseStartDate),chooseStartDayElm:this.getFirstElement(this.LPViewMap.chooseStartDay),chooseEndDateElm:this.getFirstElement(this.LPViewMap.chooseEndDate),chooseEndDayElm:this.getFirstElement(this.LPViewMap.chooseEndDay),chooseDateEndElm:this.getFirstElement(this.LPViewMap.chooseDateEnd),chooseDateIconElm:this.getFirstElement(this.LPViewMap.chooseDateIcon),chooseButtonElm:this.getFirstElement(this.LPViewMap.chooseButton)}}});(e=lpTag.unifiedWindow.DatePickerViewController.prototype).dispose=function(){if(this.datePickerShow){this.datePickerShow=!1;h.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_CLOSE})}lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};e.reselectMonth=function(){var e=y===w?b:0,t=T===w?E:11;t<(_=_<e?e:_)&&(_=t);for(var i=0;i<=11;i++){var n=x.monthsElm.options[i];i===_&&(n.selected=!0);n.disabled=!1;if(i<e){n.disabled=!0;n.selected=!1}else if(t<i){n.disabled=!0;n.selected=!1}}};e.goToPrevMonth=function(e){if(0<x.monthsElm.selectedIndex&&!x.monthsElm.options[x.monthsElm.selectedIndex-1].disabled){_--;x.monthsElm.selectedIndex--;C=void 0;this.updateCalender();e&&void 0===v&&u&&a(u)}else if(0===_&&y<w){_=11;w--;x.monthsElm.selectedIndex=11;x.yearsElm.selectedIndex++;C=void 0;this.reselectMonth();this.updateCalender();e&&void 0===v&&u&&a(u)}};e.goToNextMonth=function(e){if(x.monthsElm.selectedIndex<x.monthsElm.options.length-1&&!x.monthsElm.options[x.monthsElm.selectedIndex+1].disabled){_++;x.monthsElm.selectedIndex++;C=void 0;this.updateCalender();e&&void 0===v&&u&&a(u)}else if(11===_&&w<T){_=0;w++;x.monthsElm.selectedIndex=0;x.yearsElm.selectedIndex--;C=void 0;this.reselectMonth();this.updateCalender();e&&void 0===v&&u&&a(u)}};e.updateCalender=function(){x.yearsNextButtonElm.classList.remove(D.disable);x.yearsPrevButtonElm.classList.remove(D.disable);x.monthsNextButtonElm.classList.remove(D.disable);x.monthsPrevButtonElm.classList.remove(D.disable);x.yearsNextButtonElm.setAttribute(P.tabIndex,0);x.yearsPrevButtonElm.setAttribute(P.tabIndex,0);x.monthsNextButtonElm.setAttribute(P.tabIndex,0);x.monthsPrevButtonElm.setAttribute(P.tabIndex,0);if(T<=w){x.yearsNextButtonElm.classList.add(D.disable);x.yearsNextButtonElm.setAttribute(P.tabIndex,-1);if(_===E){x.monthsNextButtonElm.classList.add(D.disable);x.monthsNextButtonElm.setAttribute(P.tabIndex,-1)}}if(w<=y){x.yearsPrevButtonElm.classList.add(D.disable);x.yearsPrevButtonElm.setAttribute(P.tabIndex,-1);if(_===b){x.monthsPrevButtonElm.classList.add(D.disable);x.monthsPrevButtonElm.setAttribute(P.tabIndex,-1)}}A=-1;u=void 0;for(var e=(new Date(w,_,1).getDay()-s+7)%7,t=R(_,w),i=R((_-1+12)%12,w),n=i+1-e,a=0;n<=i;n++,a++)r(w,_-1,n,a,D.prevMonth);p=void 0;for(n=1;n<=t;n++,a++)r(w,_,n,a);void 0===C&&k(p);for(var o=t+1;o<=42-e;o++,a++)r(w,_+1,o%t,a,D.nextMonth)};function r(e,t,i,n,a){var e=new Date(e,t,i),o=e.getTime(),s=(new Date).toDateString()===e.toDateString(),r=x.daysElm.querySelector('[data-index="'+n+'"]');if(r){r.className=D.day;r.setAttribute(P.ariaSelected,!1);r.setAttribute(P.tabIndex,-1);r.dataset.disable=!1;r.dataset.selected=!1;r.setAttribute(P.ariaSelected,!1);r.parentElement.className="";r.textContent=i;r.dataset.date=o;a&&r.classList.add(a);var l,d,a=e.toLocaleDateString(c,{weekday:"long",year:"numeric",month:"long",day:"numeric"});if(s){r.classList.add(D.today);a=O.TODAY+", "+a}r.setAttribute(P.ariaLabel,a);if(I<o||o<S){r.classList.add(D.disable);r.dataset.disable=!0}else{if(M===i&&_===t){C=n;r.focus();u=r;M=0}if(o===m){r.classList.add(D.selected);r.dataset.selected=!0;r.setAttribute(P.ariaSelected,!0);A=n}if(o===v){r.classList.add(D.selected);r.dataset.selected=!0;r.setAttribute(P.ariaSelected,!0)}if(s){r.setAttribute(P.tabIndex,0);void 0===C&&_===t&&(C=n)}if(_===t){void 0===p&&(p=n);N=n}if(m&&v){if(m<v){l=m;d=v}else{l=v;d=m}o===l&&o!=d?r.parentElement.classList.add(D.startRange):l<o&&o<d?r.parentElement.classList.add(D.inRange):o===d&&o!=l&&r.parentElement.classList.add(D.endRange)}}}}function R(e,t){return 1===e&&(t%4==0&&t%100!=0||t%400==0)?29:n[e]}function l(){t&&t.classList.remove(D.keyFocused)}function d(){l();this.goToPrevMonth()}function F(){l();this.goToNextMonth()}function B(){if(x.yearsElm.selectedIndex<x.yearsElm.options.length-1){l();w--;x.yearsElm.selectedIndex++;C=void 0;this.reselectMonth();this.updateCalender()}}function U(){if(0<x.yearsElm.selectedIndex){l();w++;C=void 0;x.yearsElm.selectedIndex--;this.reselectMonth();this.updateCalender()}}function H(){l();C=void 0;_=parseInt(x.monthsElm.options[x.monthsElm.selectedIndex].value,10);this.updateCalender()}function z(){l();C=void 0;var e=x.yearsElm.options[x.yearsElm.selectedIndex].value;w=parseInt(e,10);this.reselectMonth();this.updateCalender()}function G(e){if(9===e.keyCode){t&&t.classList.remove(D.keyFocused);(t=document.activeElement).classList.add(D.keyFocused)}}function j(e){var t;switch(e.keyCode){case 39:a=C+1;o.call(this,a);break;case 37:a=C-1;o.call(this,a);break;case 38:a=C-7;o.call(this,a);break;case 40:a=C+7;o.call(this,a);break;case 32:(t=x.daysElm.querySelector("[data-index='"+C+"']"))&&t.click();break;case 13:if(t=x.daysElm.querySelector("[data-index='"+C+"']")){(!g||void 0===v)&&t.click();Z()}break;case 27:h.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_CLOSE});break;case 36:if(t=x.daysElm.querySelector("[data-index='"+C+"']")){i=parseInt(t.innerText,10);a=C-i+1;o.call(this,a,p)}break;case 35:if(t=x.daysElm.querySelector("[data-index='"+C+"']")){var i=parseInt(t.innerText,10),n=R(_,w),a=C+(n-i);o.call(this,a,N)}break;case 33:if(t=x.daysElm.querySelector("[data-index='"+C+"']")){M=parseInt(t.innerText,10);n=new Date(w,_,1),i=(n.setMonth(n.getMonth()-1),R(n.getMonth(),n.getFullYear()));i<M&&(M=i);new Date(n.getFullYear(),n.getMonth(),M)<S&&(M=S.getDate());this.goToPrevMonth(!0)}break;case 34:if(t=x.daysElm.querySelector("[data-index='"+C+"']")){M=parseInt(t.innerText,10);a=new Date(w,_,1),i=(a.setMonth(a.getMonth()+1),R(a.getMonth(),a.getFullYear()));i<M&&(M=i);new Date(a.getFullYear(),a.getMonth(),M)>I&&(M=I.getDate());this.goToNextMonth(!0)}}}function o(e,t){if(void 0!==e){var i;if(e<0){if(i=x.daysElm.querySelector("[data-index='"+C+"']")){var n=parseInt(i.innerText,10),a=R((_-1+12)%12,w);M=a+n+(e-C);this.goToPrevMonth(!0)}}else if(41<e){if(i=x.daysElm.querySelector("[data-index='"+C+"']")){n=parseInt(i.innerText,10);a=R(_,w);M=e-C-(a-n);this.goToNextMonth(!0)}}else if(i=x.daysElm.querySelector("[data-index='"+e+"']"))if(i.classList.contains(D.prevMonth)){M=parseInt(i.innerText,10);this.goToPrevMonth(!0)}else if(i.classList.contains(D.nextMonth)){M=parseInt(i.innerText,10);this.goToNextMonth(!0)}else"false"==i.dataset.disable?k(e,!0):t&&k(t,!0)}}function k(e,t){if(void 0!==e){var i=x.daysElm.querySelector("[data-index='"+C+"']"),n=x.daysElm.querySelector("[data-index='"+e+"']");if(n&&"false"===n.dataset.disable){i&&i.setAttribute(P.tabIndex,-1);if(n){n.setAttribute(P.tabIndex,0);if(t){n.focus();void 0===v&&a(n)}C=e}}}}function q(e){var t=e;C=void 0;A=-1;t.dateFormat;S=I=void 0;f=t.type||W.SINGLE;g=f===W.RANGE;var i=new Date,n=i.getFullYear();i.setHours(0,0,0,0);m=i.getTime();v=void 0;w=n;_=i.getMonth();if(Number.isInteger(t.minDate)){i=1e3*t.minDate;(S=new Date(i)).setHours(0,0,0,0);y=S.getFullYear();b=S.getMonth();if(m<S.getTime()){m=S.getTime();w=y;_=b;M=S.getDate()}}else{y=n-$;b=0;(S=new Date(y,b,1)).setHours(0,0,0,0)}if(Number.isInteger(t.maxDate)&&(!t.minDate||t.maxDate>t.minDate)){i=1e3*t.maxDate;(I=new Date(i)).setHours(0,0,0,0);T=I.getFullYear();E=I.getMonth();if(m>I.getTime()){m=I.getTime();w=T;_=E;M=I.getDate()}}else{T=n+$;E=11;(I=new Date(T,E,R(E,T))).setHours(0,0,0,0)}if(g){x.chooseDateIconElm.classList.remove(D.hide);x.chooseDateEndElm.classList.remove(D.hide);x.chooseButtonElm.textContent=this.translate("datePicker_choose_range");x.chooseButtonElm.title=this.translate("datePicker_choose_range");O.DEFAULT_HEADER=this.translate("datePicker_select_range")}else{x.chooseDateIconElm.classList.add(D.hide);x.chooseDateEndElm.classList.add(D.hide);x.chooseButtonElm.textContent=this.translate("datePicker_choose_day");x.chooseButtonElm.title=this.translate("datePicker_choose_day");O.DEFAULT_HEADER=this.translate("datePicker_select_day")}J(x.monthsElm);for(var a=this.getMonthFullNames(),o=0;o<=11;o++){var s=document.createElement("option");s.text=a[o];s.value=o;x.monthsElm.add(s)}this.reselectMonth();J(x.yearsElm);for(var r,l=T;y<=l;l--){var d=document.createElement("option");d.text=l;(d.value=l)===w&&(d.selected=!0);x.yearsElm.add(d)}x.daysElm.innerHTML="";r=document.createElement("tr");x.daysElm.appendChild(r);for(var c=0;c<42;c++){if(c%7==0&&5<c){r=document.createElement("tr");x.daysElm.appendChild(r)}var u=document.createElement("div");u.className=D.day;u.dataset.index=c;u.dataset.selected=!1;u.setAttribute(P.ariaSelected,!1);u.onclick=K;u.onmouseover=Y;var p=document.createElement("td");p.appendChild(u);r.appendChild(p)}if(!this.datePickerShow){this.datePickerShow=!0;h.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_IS_CLOSED,once:!0,context:this,func:X});t=e.header||O.DEFAULT_HEADER;h.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_OPEN,data:{view:this.view,header:t,style:{height:L.openHeight}}})}x.monthsElm.focus();this.updateCalender();k(C,!0);V()}function K(e){var t,i=e.currentTarget;if("false"===i.dataset.disable){l();if(f===W.SINGLE||void 0!==v){for(var n=x.daysElm.querySelectorAll("[data-selected = true]"),a=0;a<n.length;a++){n[a].dataset.selected=!1;n[a].dataset.endRange=!1;n[a].classList.remove(D.selected);n[a].classList.remove(D.endRange);n[a].setAttribute(P.ariaSelected,!1)}for(var o=x.daysElm.querySelectorAll("[data-end-range = true]"),a=0;a<o.length;a++){o[a].dataset.endRange=!1;o[a].dataset.selected=!1;o[a].classList.remove(D.selected);o[a].classList.remove(D.endRange);o[a].setAttribute(P.ariaSelected,!1)}v=void 0;i.classList.add(D.selected);i.setAttribute(P.ariaSelected,!0);i.dataset.selected=!0;m=parseInt(i.dataset.date,10);t=i.getAttribute("data-index");k(parseInt(t,10),!0);A=parseInt(t,10);V()}else{var s=parseInt(i.dataset.date,10);i.setAttribute(P.ariaSelected,!0);t=i.getAttribute("data-index");k(parseInt(t,10),!0);if(s!==m){i.classList.add(D.endRange);i.dataset.endRange=!0;v=s;V()}}Y(e)}}function Y(e){void 0===v&&a(e.currentTarget)}function a(e){if(g){var t,i=parseInt(e.dataset.index,10),n=A,a=i;-1===n&&(t=n=e.dataset.date>m?0:41);if(a<n){a=n;n=i}for(var o=0;o<42;o++){var s=x.daysElm.querySelector("[data-index = '"+o+"']");if(s){s.parentElement.className="";t===o?o!==a?s.parentElement.classList.add(D.inRange):s.parentElement.classList.add(D.endRange):o===n&&o!=a?s.parentElement.classList.add(D.startRange):n<o&&o<a?s.parentElement.classList.add(D.inRange):o===a&&o!=n&&s.parentElement.classList.add(D.endRange)}}}}function X(){this.datePickerShow=!1}function J(e){for(var t=e.options.length-1;0<=t;t--)e.remove(t)}function V(){var e={year:"numeric",month:"long",day:"numeric"},t=new Date(m);if(v){var i=new Date(v);if(v<m){i=new Date(m);t=new Date(v)}x.chooseEndDateElm.textContent=i.toLocaleDateString(c,e);x.chooseEndDayElm.textContent=i.toLocaleDateString(c,{weekday:"long"})}else{x.chooseEndDateElm.textContent="-";x.chooseEndDayElm.textContent="-"}x.chooseStartDateElm.textContent=t.toLocaleDateString(c,e);x.chooseStartDayElm.textContent=t.toLocaleDateString(c,{weekday:"long"})}function Z(){var e,t,i={year:"numeric",month:"long",day:"numeric"},n=new Date(m).toLocaleDateString(c,i),a=m;if(g){if(void 0===v||v===m)return;if(m<v){e=new Date(v).toLocaleDateString(c,i);a=m;t=v}else{e=n;n=new Date(v).toLocaleDateString(c,i);a=v;t=m}}i={actionData:{text:n},metadata:[{type:"datePickerResponse",start:a/1e3}]};if(g){i.actionData.text=n+" - "+e;i.metadata[0].end=t/1e3}h.trigger({appName:lpTag.unifiedWindow.apps.RICH_CONTENT,eventName:lpTag.unifiedWindow.richContentStates.PUBLISH_TEXT,data:i});h.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_CLOSE})}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var s,e,i,n,r,a,l,d,c,u,o,p,h,t,f=lpTag.unifiedWindow.apps.SCHEDULE_LIST,g={},m=null,v={},w=!1,_={openHeightLarge:"90%",openHeightSmall:"100%"},C={tabIndex:"tabindex",ariaLabel:"aria-label",ariaSelected:"aria-selected"},T={disable:"disable",selected:"selected",keyFocused:"key-focused",lpWeekDay:"lp_weekDay",timeOnly:"time_only"};lpTag.unifiedWindow.ScheduleListViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"ScheduleListViewController",template:"<div class='lpc_scheduleList lp_scheduleList {{deviceClass}}' data-lp-point='scheduleList' data-lp-cust-id='scheduleListWindow'><div class='lpc_scheduleList_navigate lp_scheduleList_navigate' data-lp-point='scheduleListNavigate'><button class='lpc_scheduleList_navigate__previous-week-button {{deviceClass}}' title='{{prev_week}}' data-lp-point='weekPrev' tabindex='0' aria-label='{{prev_week}}'><span class='lp_minimize-right-slider-icon' data-lp-type='icon' data-lp-point='weeks_prev_icon'><img class='lpc_scheduleList_navigate__previous-icon lp_prev_icon {{deviceClass}}' src='{{iconsRepository}}/sprites_v1.png' alt='{{prev_week}}' aria-hidden='true'></span></button> <span class='lpc_scheduleList_navigate__week-text lp_week_text' data-lp-point='weekText' id='weekText'></span> <button class='lpc_scheduleList_navigate__next-week-button {{deviceClass}}' title='{{next_week}}' data-lp-point='weekNext' tabindex='0' aria-label='{{next_week}}'><span class='lp_minimize-left-slider-icon' data-lp-type='icon' data-lp-point='weeks_next_icon'><img class='lpc_scheduleList_navigate__next-icon lp_next_icon {{deviceClass}}' src='{{iconsRepository}}/sprites_v1.png' alt='{{next_week}}' aria-hidden='true'></span></button></div><div class='lpc_scheduleList_navigate__week_display lp_week_display' data-lp-point='weekDisplay'></div><div class='lpc_scheduleList_navigate__day_display lp_day_display' data-lp-point='dayDisplay'></div><div class='lpc_scheduleList_choose-area lp_scheduleList_choose-area' data-lp-point='choose_area'><button class='lpc_scheduleList_choose-button lp_choose-button' title='{{choose_button}}' data-lp-point='choose_button' tabindex='0' disabled>{{choose_button}}</button></div></div>",LPViewMap:{scheduleList:"^scheduleList",chooseButton:"^choose_button",weekText:"^weekText",weekDisplay:"^weekDisplay",dayDisplay:"^dayDisplay",weekPrev:"^weekPrev",weekNext:"^weekNext",mainWindow:"^maximized"},preInitView:function(e){s=lpTag.unifiedWindow.language.getLocale();a="he-IL"===s?0:1;var t=this.getFirstElement(this.LPViewMap.mainWindow,document.body);_.openHeight=_.openHeightLarge;t&&t.offsetHeight<484&&(_.openHeight=_.openHeightSmall);this.textInjection={iconsRepository:e.appContext.conf.unifiedConf.iconsRepository,prev_week:this.translate("prev_week"),next_week:this.translate("next_week"),choose_button:this.translate("scheduleList_confirm_button_title")};h=e.appContext.conf.unifiedConf.imagesRepository;v={TODAY:this.translate("ts_Today"),WEEK_OF:this.translate("week_of"),ERROR_MESSAGE:this.translate("scheduleList_error_no_slots"),DEFAULT_HEADER:this.translate("scheduleList_header"),weekDayShortSunday:this.translate("weekDayShortSunday"),weekDayShortMonday:this.translate("weekDayShortMonday"),weekDayShortTuesday:this.translate("weekDayShortTuesday"),weekDayShortWednesday:this.translate("weekDayShortWednesday"),weekDayShortThursday:this.translate("weekDayShortThursday"),weekDayShortFriday:this.translate("weekDayShortFriday"),weekDayShortSaturday:this.translate("weekDayShortSaturday")};D()},initialize:function(e){i=e.appContext.events},events:function(){this.appContext.events.bind({appName:f,eventName:lpTag.unifiedWindow.events.viewController.SCHEDULE_LIST_SHOW,context:this,func:k});this.bindViewEvent({selector:this.LPViewMap.chooseButton,callback:E,DOMEvent:"click",context:this});this.bindViewEvent({selector:this.LPViewMap.weekPrev,callback:y,DOMEvent:"click",context:this});this.bindViewEvent({selector:this.LPViewMap.weekNext,callback:b,DOMEvent:"click",context:this});this.bindViewEvent({selector:this.LPViewMap.weekDisplay,callback:M,DOMEvent:"keydown",context:this});this.bindViewEvent({selector:this.LPViewMap.dayDisplay,callback:A,DOMEvent:"keydown",context:this});this.bindViewEvent({selector:this.LPViewMap.scheduleList,callback:I,DOMEvent:"keydown",context:this});this.bindViewEvent({selector:this.LPViewMap.scheduleList,callback:N,DOMEvent:"keyup",context:this});this.bindViewEvent({selector:this.LPViewMap.scheduleList,callback:x,DOMEvent:"focusout",context:this})},render:function(){r={daysElm:this.getFirstElement(this.LPViewMap.days),weekTextElm:this.getFirstElement(this.LPViewMap.weekText),weekDisplayElm:this.getFirstElement(this.LPViewMap.weekDisplay),dayDisplayElm:this.getFirstElement(this.LPViewMap.dayDisplay),weekPrevElm:this.getFirstElement(this.LPViewMap.weekPrev),weekNextElm:this.getFirstElement(this.LPViewMap.weekNext),chooseButtonElm:this.getFirstElement(this.LPViewMap.chooseButton)}}});(e=lpTag.unifiedWindow.ScheduleListViewController.prototype).dispose=function(){if(this.scheduleListShow){this.scheduleListShow=!1;i.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_CLOSE})}lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};e.goToPrevWeek=function(){null!==m&&O(m)};e.goToNextWeek=function(){O(c)};e.openScheduleList=function(e){if(!this.scheduleListShow){i.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_IS_CLOSED,once:!0,context:this,func:R});i.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_OPEN,data:{view:this.view,header:e,style:{height:_.openHeight}}});this.scheduleListShow=!0}};function E(){var e="";o.title&&(e+=o.title+"\n");o.description&&(e+=o.description+"\n");var t={hour:"numeric",minute:"numeric"},e=(e+=new Date(1e3*o.start).toLocaleDateString(s,{year:"numeric",month:"long",day:"numeric"})+"\n")+new Date(1e3*o.start).toLocaleTimeString(s,t),t=(o.end&&(e+=" - "+new Date(1e3*o.end).toLocaleTimeString(s,t)),{actionData:{text:e},metadata:[o]});i.trigger({appName:lpTag.unifiedWindow.apps.RICH_CONTENT,eventName:lpTag.unifiedWindow.richContentStates.PUBLISH_TEXT,data:t});i.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_CLOSE})}function y(){x();this.goToPrevWeek()}function b(){x();this.goToNextWeek()}function S(e){W(e.currentTarget.dataset.date)}function I(e){27===e.keyCode&&i.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.viewController.FLUTTER_CLOSE})}function N(e){if(9===e.keyCode){t&&t.classList.remove(T.keyFocused);(t=document.activeElement).classList.add(T.keyFocused)}}function x(){t&&t.classList.remove(T.keyFocused)}function A(e){var t;switch(e.keyCode){case 32:(t=r.dayDisplayElm.getElementsByClassName(T.keyFocused))[0]&&t[0].click();e.preventDefault();break;case 13:if((t=r.dayDisplayElm.getElementsByClassName(T.keyFocused))[0]){t[0].click();E()}else if((t=r.dayDisplayElm.getElementsByClassName(T.selected))[0]){t[0].click();E()}}}function M(e){if(32===e.keyCode){e=r.weekDisplayElm.getElementsByClassName(T.keyFocused);e[0]&&e[0].click()}}function R(){this.scheduleListShow=!1}function L(e){var t=e.getDay()||7;t-=a;e.setHours(-24*t);return e}function D(){v.day1=0===a?v.weekDayShortSunday:v.weekDayShortMonday;v.day2=0===a?v.weekDayShortMonday:v.weekDayShortTuesday;v.day3=0===a?v.weekDayShortTuesday:v.weekDayShortWednesday;v.day4=0===a?v.weekDayShortWednesday:v.weekDayShortThursday;v.day5=0===a?v.weekDayShortThursday:v.weekDayShortFriday;v.day6=0===a?v.weekDayShortFriday:v.weekDayShortSaturday;v.day7=0===a?v.weekDayShortSaturday:v.weekDayShortSunday}function k(e){r.chooseButtonElm.disabled=!0;r.chooseButtonElm.classList.add(T.disable);var t=e.header||v.DEFAULT_HEADER;u=void 0;w=!(g={});if(e.firstDayOfTheWeek){var i="sun"===e.firstDayOfTheWeek?0:1;if(a!==i){a=i;D()}}i=[];if(Array.isArray(e.slots)&&0<e.slots.length){(i=e.slots).sort(function(e,t){return e.start-t.start});if((n=i.filter(function(e){var t=(new Date).getTime()/1e3;return e.start>t})).length<=0){P(v.ERROR_MESSAGE);this.openScheduleList(t);r.dayDisplayElm.getElementsByClassName("error_message")[0].focus()}else{l=L(new Date(1e3*n[0].start));e=n[n.length-1].end||n[n.length-1].start;d=new Date(1e3*e);n.forEach(function(e){if(Number.isInteger(e.start)){var t=new Date(1e3*e.start).setHours(0,0,0,0);g[t]||(g[t]=[]);g[t].push(e);"string"==typeof e.imageUrl&&(w=!0)}});O(l);this.openScheduleList(t);W(new Date(1e3*n[0].start).setHours(0,0,0,0))}}else{P(v.ERROR_MESSAGE);this.openScheduleList(t)}}function P(e){l=L(new Date);d=new Date;O(l);r.dayDisplayElm.innerHTML="";var t=document.createElement("div");t.textContent=e;t.classList.add("error_message");t.setAttribute(C.tabIndex,0);r.dayDisplayElm.appendChild(t)}function O(e){r.weekDisplayElm.innerHTML="";e.setHours(0,0,0,0);var t=new Date(e.getTime()),i={day:"numeric",month:"numeric"},i=(e.getFullYear()!==(new Date).getFullYear()&&(i.year="numeric"),e.toLocaleDateString(s,i));r.weekTextElm.textContent=v.WEEK_OF+" "+i;for(var n=0;n<7;n++){var a=document.createElement("div");a.className=T.lpWeekDay;a.dataset.index=n;a.dataset.selected=!1;a.setAttribute(C.ariaSelected,!1);a.dataset.date=t.getTime();var o=document.createElement("div");o.textContent=v["day"+(n+1)];o.className="lp_weekDay__label";a.appendChild(o);o=document.createElement("div");o.className="lp_weekDay__text";o.textContent=t.toLocaleDateString(s,{day:"numeric",month:"numeric"});a.appendChild(o);if(g[t.getTime()]){o=document.createElement("div");o.className="lp_weekDay__count";o.textContent=g[t.getTime()].length;a.appendChild(o);a.onclick=S;a.setAttribute(C.tabIndex,0)}else{a.classList.add(T.disable);a.setAttribute(C.tabIndex,-1)}if(u&&u.getTime()===t.getTime()){a.classList.add(T.selected);a.dataset.selected=!0}o=t.toLocaleDateString(s,{weekday:"long",year:"numeric",month:"long",day:"numeric"});a.setAttribute("title",o);a.setAttribute(C.ariaLabel,o);r.weekDisplayElm.appendChild(a);t.setDate(t.getDate()+1);t.setHours(0,0,0,0)}c=t;if(l.getTime()<e.getTime()){r.weekPrevElm.classList.remove(T.disable);r.weekPrevElm.dataset.disable=!1;r.weekPrevElm.disabled=!1;(m=new Date(c.getTime())).setDate(c.getDate()-14)}else{r.weekPrevElm.classList.add(T.disable);r.weekPrevElm.dataset.disable=!0;r.weekPrevElm.disabled=!0;m=null}if(d.getTime()>=c.getTime()){r.weekNextElm.classList.remove(T.disable);r.weekNextElm.dataset.disable=!1;r.weekNextElm.disabled=!1}else{r.weekNextElm.classList.add(T.disable);r.weekNextElm.dataset.disable=!0;r.weekNextElm.disabled=!0}}function W(e){var a=!0;u=new Date(parseInt(e,10));r.dayDisplayElm.innerHTML="";var t=r.weekDisplayElm.querySelector("[data-selected = true]");if(t){t.classList.remove(T.selected);t.dataset.selected=!1}t=r.weekDisplayElm.querySelector('[data-date="'+e+'"]');if(t){t.classList.add(T.selected);t.dataset.selected=!0;t.focus()}p=void 0;r.chooseButtonElm.disabled=!0;r.chooseButtonElm.classList.add(T.disable);g[e].forEach(function(e){(e.title||e.description||w)&&(a=!1)});g[e].forEach(function(i){var n=document.createElement("div");n.className="lp_slot";if(w){var e=document.createElement("div");e.className="lp_slot__image";"string"==typeof i.imageUrl?e.style["background-image"]="url('"+i.imageUrl+"')":e.style.background="url('"+h+"/scheduleSlotImage.png') no-repeat 2px 0px";n.appendChild(e)}if(i.title||i.description||w){var e=document.createElement("div"),t=(e.className="lp_slot__text",document.createElement("div"));t.className="lp_slot__text_title";t.textContent=i.title;e.appendChild(t);t=document.createElement("div");t.className="lp_slot__text_description";t.textContent=i.description;e.appendChild(t);n.appendChild(e)}else a&&n.classList.add(T.timeOnly);t=document.createElement("div"),e=(t.className="lp_slot__time",new Date(1e3*i.start).toLocaleTimeString(s,{hour:"2-digit",minute:"2-digit"}));Number.isInteger(i.end)&&i.end>i.start&&(e+=" - "+new Date(1e3*i.end).toLocaleTimeString(s,{hour:"2-digit",minute:"2-digit"}));t.textContent=e;n.appendChild(t);n.onclick=function(){var e=i,t=n;x();o=e;p&&p.classList.remove(T.selected);(p=t).classList.add(T.selected);r.chooseButtonElm.disabled=!1;r.chooseButtonElm.classList.remove(T.disable)};n.setAttribute(C.tabIndex,0);r.dayDisplayElm.appendChild(n)})}}();!function(){var e;lpTag.unifiedWindow.MinimizedViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"MinimizedViewController",applicationName:"minimized_view",LPViewMap:{notificationText:"^notification_text",notificationCounter:"^notification_counter",minimized:"^header",windowMinimized:".lpc_window_minimized",headerArea:".lpc_minimized-header",titleArea:".lp_title",extendedTitleArea:".lp_extended_title",title:".lp_title-text",brandLogoImage:".lp_brand-logo-asset",subTitle:".lp_top-text",minimizedWrapper:"^minimized"},LPClassesMap:{visible:"lp_visible"},initialize:function(e){this.models=e.models;this.featureStateManager=e.appContext.featureStateManager;this.unifiedWindowAppName=lpTag.unifiedWindow.apps.UNIFIED_WINDOW;this.appEvents=this.appContext.events;this.windowConf=this.appContext.conf.windowConf;this.unifiedConf=this.appContext.conf.unifiedConf;this.engConf=this.appContext.conf.engConf;this.widgetNotifications=0;this.windowMinimized=this.getFirstElement(this.LPViewMap.windowMinimized,document.body);this.headerArea=this.getFirstElement(this.LPViewMap.headerArea,this.windowMinimized);this.titleArea=this.getFirstElement(this.LPViewMap.titleArea,this.windowMinimized);this.extendedTitleArea=this.getFirstElement(this.LPViewMap.extendedTitleArea,this.windowMinimized);this.brandLogoImage=this.getFirstElement(this.LPViewMap.brandLogoImage,this.windowMinimized);this.title=this.getFirstElement(this.LPViewMap.title,this.windowMinimized);this.subTitle=this.getFirstElement(this.LPViewMap.subTitle,this.extendedTitleArea)},events:function(){this.bindModel({path:this.chatPath.LINES,context:this,callback:this.checkNotificationCount});this.bindModel({path:this.uiPath.LAST_LINE_VIEWED,context:this,callback:this.checkNotificationCount});this.bindModel({path:lpTag.unifiedWindow.chatModelPath.SDK_NOTIFICATIONS,context:this,callback:this.onWidgetNotifications});this.appEvents.bind({appName:this.unifiedWindowAppName,eventName:lpTag.unifiedWindow.events.uiState.MINIMIZED,context:this,func:this.checkNotificationCount});this.appEvents.bind({appName:this.unifiedWindowAppName,eventName:lpTag.unifiedWindow.events.uiState.MAXIMIZED,context:this,func:o});this.appContext.browserStateManager.on(this.appContext.browserStateManager.EVENT_NAME.FOCUS_CHANGE,this.checkNotificationCount,this);this.appContext.deviceDetector.isIOS()&&this.bindViewEvent({selector:this.LPViewMap.minimized,callback:i,DOMEvent:"click"})},render:function(){this.checkNotificationCount();if(this.featureStateManager.isMenuTop()){var e=this.getFirstElement("^close",this.view);this.addClass(e,"lpHide")}!function(){var e=this.appContext&&this.appContext.conf&&this.appContext.conf.windowConf&&this.appContext.conf.windowConf.headerEnhancedUi,t=this.appContext&&this.appContext.conf&&this.appContext.conf.unifiedConf&&this.appContext.conf.unifiedConf.headerEnhancedUiMinimized;if(e&&t){var e=this.appContext.conf.windowConf.headerAddLogoUrl,t=this.appContext.conf.windowConf.headerLogoUrl,i=this.appContext.conf.windowConf.barTitleText,n=this.appContext.conf.windowConf.headerAddSubtitle,a=this.appContext.conf.windowConf.barSubtitleText,e={isHeaderLogo:e,logoUrl:t,title:i,subTitle:{show:n,defaultText:a}};this.addClass(this.headerArea,"lpc_extended-header");this.addClass(this.view.parentElement,"lpc_window_minimized_extended-header");this.addClass(this.titleArea,"lpHide");this.removeClass(this.extendedTitleArea,"lpHide");this.title.innerHTML=""+lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(e.title).cleanText;this.title.setAttribute("aria-label",e.title);if(e.isHeaderLogo&&e.logoUrl){this.addClass(this.extendedTitleArea,"show-logo");this.brandLogoImage.setAttribute("src",e.logoUrl)}if(e.subTitle&&e.subTitle.show){this.addClass(this.extendedTitleArea,"show-subtitle");this.subTitle.innerHTML=""+lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(e.subTitle.defaultText).cleanText;this.subTitle.setAttribute("aria-label",e.subTitle.defaultText);e.subTitle.font&&(this.subTitle.style.font=e.subTitle.font);e.subTitle.color&&(this.subTitle.style.color=e.subTitle.color)}}}.call(this)}});(e=lpTag.unifiedWindow.MinimizedViewController.prototype).onWidgetNotifications=function(e){this.widgetNotifications=e&&"number"==typeof e.newValue&&e.newValue||0;this.checkNotificationCount()};e.checkNotificationCount=function(){var e=t.call(this);(void 0===this.notificationCount||this.notificationCount!==e)&&!function(e){var t=this.appContext&&this.appContext.browserStateManager&&(!this.appContext.browserStateManager.isHidden()||this.appContext.browserStateManager.isFocus()),i=this.models.uiModel.get(this.uiPath.WINDOW_MAXIMIZED);t&&0<e?function(e){!function(e){var t=1===e?this.translate("tooltip_Message"):this.translate("tooltip_Messages"),i=this.getFirstElement(this.LPViewMap.notificationText);this.translator.extendDictionary({notificationCount:e,notificationMsg:t},{locale:this.engConf.lang});t=this.translate("tooltip_NewMessageNotification");i.innerHTML=""+lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(e).cleanText;i.title=t;this.show({view:this.LPViewMap.notificationCounter,useClasses:!0})}.call(this,e);!function(){this.appContext.deviceDetector.isDesktop()?this.shakeX(this.view):this.shakeY(this.view)}.call(this);this.notificationCount=e}.call(this,e):e<=0&&n.call(this);i||a.call(this)}.call(this,e)};e.dispose=function(){this.appContext&&this.appContext.browserStateManager&&this.appContext.browserStateManager.off(this.appContext.browserStateManager.EVENT_NAME.FOCUS_CHANGE,this.checkNotificationCount);lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};function n(){!function(){this.hide({view:this.LPViewMap.notificationCounter,useClasses:!0})}.call(this);this.notificationCount=0}function t(){return function(){var e=0,t=this.getModelParam(this.chatPath.LINES)||[],i=this.getModelParam(this.uiPath.LAST_LINE_VIEWED);if(i)for(var n=t.length-1;0<=n;n--){if(t[n]["@id"]===i["@id"]&&t[n].convId===i.convId)return e;isNaN(t[n]["@id"])||"agent"!==t[n].source||t[n].history||e++}return 0}.call(this)+function(){var e=0;"number"==typeof this.widgetNotifications?e=this.widgetNotifications:this.models&&this.models.chatModel&&(e=this.models.chatModel.get(lpTag.unifiedWindow.chatModelPath.SDK_NOTIFICATIONS)||0);return e}.call(this)}function a(){this.appContext.events.trigger({appName:this.unifiedWindowAppName,eventName:"notification",global:!0,data:{count:this.notificationCount}})}function i(){this.appContext.events.trigger({appName:"*",eventName:"keyboard_visible",data:{}})}function o(){if(t.call(this)){n.call(this);a.call(this);this.appContext.events.trigger({appName:"*",eventName:this.VCEvents.LINES_VIEWED})}}}();!function(){var e,m,i,a=lpTag.taglets.lpUtil;lpTag.unifiedWindow.MaximizedViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"MaximizedViewController",applicationName:"maximize_view",template:"<div class='lp_lpview_mp lp_main_area' data-lp-point='main_area'><div class='lp_wait lpHide' data-lp-point='wait'></div><div class='lp_top_menu lpHide lpc_menu {{deviceClass}}' data-lp-cust-id='topMenu' data-lp-point='top_menu' tabindex='-1'><div class='lp_top_logo_bar lpc_menu__banner {{deviceClass}} {{logoClass}}' data-lp-point='bottom_logo'><span data-lp-type='icon' class='lp_top_menu-logo-icon'><svg width='81px' height='14px' viewBox='0 0 81 14' version='1.1' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'><g id='designs---September19' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'><g id='Window---Powered-by-Copy' transform='translate(-1063.000000, -510.000000)'><g id='Menu-Copy-12' transform='translate(1009.000000, 303.000000)'><g id='elements-LPAuto_logo' transform='translate(53.000000, 206.000000)'><g id='LP_Auto_1c_full'><rect id='Rectangle' x='0' y='0' width='156' height='15.9545455'></rect><path d='M4.12143237,4.95774537 L3.12718399,4.0968319 L4.17105293,3.08580117 L5.05870908,4.04980721 C5.23906053,3.91705445 5.42815565,3.79621339 5.62475069,3.68807886 L5.04768228,2.51969631 L6.40949018,1.97710379 L6.84872376,3.19612831 C7.06868091,3.13968058 7.29213981,3.09738946 7.51768203,3.06952339 L7.44233234,1.77272727 L8.91257027,1.77272727 L8.83905837,3.06409747 C9.06402303,3.09179001 9.28688212,3.13408381 9.50617883,3.19070239 L9.95092581,1.97167786 L11.3127337,2.51427038 L10.7356653,3.67722702 C10.9322604,3.78536154 11.1213555,3.90620257 11.3017069,4.03895537 L12.1893631,3.07494932 L13.2313942,4.08598005 L12.2371458,4.9468935 C12.3760024,5.11928248 12.5030893,5.3005444 12.6175699,5.48948602 L13.8176516,4.92880709 L14.3818554,6.24911556 L13.1229642,6.69223278 C13.1815105,6.90496115 13.2257138,7.1212633 13.2552856,7.33972652 L14.5876887,7.26738084 L14.5876887,8.6962078 L13.2552856,8.62386215 C13.2257138,8.84232535 13.1815105,9.05862753 13.1229642,9.27135589 L14.3818554,9.69819533 L13.8176516,11.0166951 L12.6157321,10.4542076 C12.5012515,10.6431492 12.3741646,10.8244111 12.235308,10.9968001 L13.2295564,11.8577136 L12.1893631,12.8777875 L11.3017069,11.9137815 C11.1213555,12.0465342 10.9322604,12.1673753 10.7356653,12.2755098 L11.3127337,13.4384664 L9.95092581,13.9810589 L9.50985442,12.7638431 C9.29055771,12.8204616 9.06769862,12.8627554 8.84273396,12.890448 L8.91624587,14.1818182 L7.44600793,14.1818182 L7.52135762,12.890448 C7.2958154,12.8625819 7.0723565,12.8202908 6.85239935,12.7638431 L6.41316577,13.9810589 L5.05135787,13.4384664 L5.63210187,12.2809357 C5.43550683,12.1728012 5.24641174,12.0519602 5.06606026,11.9192074 L4.17105293,12.8777875 L3.12718399,11.8667568 L4.12143237,11.0058433 C3.98316714,10.8334292 3.85669325,10.652166 3.74284612,10.4632508 L2.54276439,11.0166951 L1.97856058,9.69819533 L3.24296521,9.27135589 C3.18441891,9.05862753 3.14021555,8.84232535 3.11064378,8.62386215 L1.77272727,8.6962078 L1.77272727,7.26738084 L3.1032926,7.33972652 C3.13527963,7.12109832 3.18193921,6.90479409 3.24296521,6.69223278 L1.97856058,6.26539334 L2.54276439,4.94508487 L3.74284612,5.5057638 C3.85648514,5.31498845 3.98296283,5.13190702 4.12143237,4.95774537 Z M5.08076263,7.98179432 C5.06136389,9.22193848 5.80581407,10.350529 6.96472541,10.8378922 C8.12363671,11.3252553 9.4669421,11.0746397 10.3641971,10.2036652 C11.2614521,9.33269058 11.5345337,8.01426289 11.0552782,6.86715083 C10.5760228,5.72003877 9.43957219,4.97196706 8.17928909,4.97396748 C6.48029575,4.96399651 5.09391067,6.30977464 5.08076263,7.98179432 Z M75.9021243,4.76060341 L80.8255834,9.55892993 L80.8255834,5.00838733 L81.5331355,5.00838733 L81.5331355,11.1577692 L76.6041629,6.35763406 L76.6041629,10.8792384 L75.9021243,10.8792384 L75.9021243,4.76060341 Z M67.2975565,7.94562151 C67.2975565,9.27135589 68.4535312,10.376436 69.8851753,10.376436 C71.3168198,10.376436 72.4727941,9.27135589 72.4727941,7.94562151 C72.4727941,6.6198871 71.3333597,5.51480702 69.8851753,5.51480702 C68.4369909,5.51480702 67.2975565,6.61446119 67.2975565,7.94562151 Z M73.1785083,7.94562151 C73.1785083,9.63489286 71.686217,10.9750964 69.8870132,10.9750964 C68.0878097,10.9750964 66.5973558,9.63489286 66.5973558,7.94562151 C66.5973558,6.25635013 68.0859718,4.89986881 69.8870132,4.89986881 C71.6880548,4.89986881 73.1766705,6.27081925 73.1766705,7.9546647 L73.1785083,7.94562151 Z M63.6587176,6.14602298 C63.4069395,5.74088722 63.1073784,5.5057638 62.568904,5.5057638 C62.0304294,5.5057638 61.5231971,5.88015265 61.5231971,6.41008468 C61.5231971,6.91650436 62.0837252,7.14981913 62.5100943,7.3306833 L62.929112,7.50069563 C63.7506075,7.83710299 64.445295,8.22415234 64.445295,9.15379418 C64.445295,10.1811027 63.5576388,10.9624359 62.4604738,10.9624359 C61.5144498,11.0011371 60.6804113,10.3567652 60.4940307,9.44317685 L61.179529,9.26231267 C61.2651766,9.88472733 61.8057136,10.3486474 62.4439336,10.3474977 C63.1220808,10.3474977 63.7414186,9.86459038 63.7414186,9.20262749 C63.7414186,8.54066463 63.1643502,8.28383749 62.5780929,8.03424494 L62.1939933,7.87870177 C61.4588742,7.56761538 60.8193207,7.21673887 60.8193207,6.37572046 C60.8193207,5.47139962 61.6500051,4.87997375 62.5872818,4.87997375 C63.2582448,4.86555097 63.8838444,5.21221463 64.2192461,5.78429463 L63.6587176,6.14602298 Z M55.4897081,7.71954128 L55.708406,7.71954128 C56.5023345,7.71954128 57.3072898,7.57846722 57.3072898,6.66691178 C57.3072898,5.7010971 56.544604,5.60704773 55.6992172,5.60704773 L55.4897081,5.60704773 L55.4897081,7.71954128 Z M55.4897081,10.8738125 L54.7858317,10.8738125 L54.7858317,5.00838733 L55.7047304,5.00838733 C56.9029745,5.00838733 58.0148418,5.30500456 58.0148418,6.63616488 C58.0148418,7.54048576 57.4046932,8.17893628 56.4324984,8.26394243 L58.4430488,10.8973248 L57.5792838,10.8973248 L55.6642991,8.30373255 L55.4805192,8.30373255 L55.4897081,10.8738125 Z M48.7817476,5.00838733 L52.0548647,5.00838733 L52.0548647,5.61609095 L49.4819483,5.61609095 L49.4819483,7.36143021 L51.9758397,7.36143021 L51.9758397,7.96913385 L49.485624,7.96913385 L49.485624,10.2733434 L52.0585404,10.2733434 L52.0585404,10.881047 L48.7817476,10.881047 L48.7817476,5.00838733 Z M43.6984,7.70507215 L44.1670382,7.70507215 C44.9462643,7.70507215 45.6060337,7.48622651 45.6060337,6.6452081 C45.6060337,5.68662798 44.7771871,5.61609095 43.952016,5.61609095 L43.6928865,5.61609095 L43.6984,7.70507215 Z M43.6984,10.8828557 L42.9945236,10.8828557 L42.9945236,5.00838733 L44.0420681,5.00838733 C44.5934073,5.00838733 45.1447465,5.02466511 45.6078715,5.32128234 C46.0543084,5.62238068 46.3178712,6.12348959 46.3099101,6.65605994 C46.3154205,7.14640737 46.0935094,7.6124851 45.7071125,7.92210917 C45.2807434,8.2494733 44.7367556,8.31277577 44.2093076,8.31277577 L43.6984,8.31277577 L43.6984,10.8828557 Z M37.9093381,5.99952299 L37.9093381,7.29270184 L39.7912427,7.29270184 L39.7912427,8.29107208 L37.9093381,8.29107208 L37.9093381,9.88086816 L39.8629166,9.88086816 L39.8629166,10.8774297 L36.7276343,10.8774297 L36.7276343,5.01019596 L39.8629166,5.01019596 L39.8629166,6.00675755 L37.9093381,5.99952299 Z M31.8133641,8.4954486 L33.2578728,5.0029614 L34.5296287,5.0029614 L31.8372554,11.2029853 L29.1650979,5.01019596 L30.4423671,5.01019596 L31.8133641,8.4954486 Z M26.9799567,10.8774297 L25.7964152,10.8774297 L25.7964152,5.01019596 L26.9799567,5.01019596 L26.9799567,10.8774297 Z M21.8616909,9.88086816 L23.5340866,9.88086816 L23.5340866,10.8774297 L20.6799872,10.8774297 L20.6799872,5.01019596 L21.8616909,5.01019596 L21.8616909,9.88086816 Z' id='Shape' fill='#98999A' fill-rule='nonzero'></path></g></g></g></g></g></svg></span></div></div><div class='lp_location_center' data-lp-point='engagement_area' tabindex='-1'></div><div class='lp_location_bottom lpc_composer lpc_composer_maximized {{deviceClass}}' data-lp-point='bottom' data-lp-cust-id='input'></div></div>",thankYouTimeout:3e3,fadeOutTimeout:500,fadeInTimeout:150,disableFileDragAndDrop:!1,endedHash:"#RIP",tooltipType:{notification:"notification",success:"success",call:"call",process:"process"},LPViewMap:{bottomLogo:"^bottom_logo",mainArea:"^main_area",engagementArea:"^engagement_area",waitArea:"^wait",locationBottom:"^bottom",bottomArea:".lp_location_bottom",mainWindow:"^maximized",dragImageArea:"^drag_image_area",emojiBar:"^emoji_bar",linesArea:"^lines_area",actionsBar:"^actions_bar",emojiButton:"^emoji_button",actionButton:"^actions_button",fileAttachment:"^file_button",input:"^chat_input",headerArea:".lpc_maximized-header",sharedImage:".lp_image_sharing_link",transcriptArea:".lp_transcript_widget",titleArea:".lp_title",extendedTitleArea:".lp_extended_title",title:".lp_title-text",brandLogoImage:".lp_brand-logo-asset",subTitle:".lp_top-text",minimizeSliderButton:"^minimize-slider"},LPClassesMap:{actionsVisibility:"lp_actions_visible",noAnimation:"lp_no-animation",logo_top_margin:"lp_logo_top_margin",lpDropImageContainer:"lp_drop_image_wrapper",lpDropImage:"lp_drop_image"},initialize:function(e){this.transcriptState={isShownAfterChatEnd:!1};this.models=e.models;this.slider=e.slider;this.unifiedConf=this.appContext.conf.unifiedConf;this.windowConf=this.appContext.conf.windowConf;this.chatDOMAdded=!1;this.logoDOMAdded=!1;this.addLogo=this.appContext.conf.windowConf&&this.appContext.conf.windowConf.logoPinToTop;this.chatViewsDisposed=!1;this.isLogoEnabled=!this.unifiedConf.hide_lp_logo;this.dialogVC=null;this.accessibilityManager=this.appContext.accessibilityManager;this.disableFileDragAndDrop=!!this.unifiedConf.disableFileDragAndDrop;this.disableDragTimeout=null;this.dragItems=null;if(this.unifiedConf&&"useIconSetting"===this.unifiedConf.disableFileDragAndDrop){var e=this.windowConf&&this.windowConf.menuLocation,t=this.windowConf&&this.windowConf.sendImage,i=this.windowConf&&this.windowConf.attachmentIcon;this.disableFileDragAndDrop="bottom"===e?!t:!i}else!this.unifiedConf||"true"!==this.unifiedConf.disableFileDragAndDrop&&!0!==this.unifiedConf.disableFileDragAndDrop?this.disableFileDragAndDrop=!1:this.disableFileDragAndDrop=!0;this.windowConf&&this.windowConf.hasOwnProperty("disableFileDragAndDrop")&&(this.disableFileDragAndDrop=this.windowConf.disableFileDragAndDrop)},events:function(){this.appContext.events.bind({appName:"*",eventName:this.VCEvents.DIALOG,context:this,func:u});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.DIALOG_CLOSED,context:this,func:h});this.appContext.events.bind({appName:"tooltip",eventName:"show",func:this.showTooltip,context:this});this.appContext.events.bind({appName:"tooltip",eventName:"close",func:this.closeTooltip,context:this});this.appContext.events.bind({appName:"tooltipButton",eventName:"show",func:this.showTooltipButton,context:this});this.appContext.events.bind({appName:"tooltipButton",eventName:"close",func:this.closeTooltipButton,context:this});this.appContext.events.bind({appName:"*",eventName:this.EventName.application.PROCESSING,func:this.showWait,context:this});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.EventName.application.POST_CHAT_SURVEY,func:T,context:this});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.chat.MULTIPLE_CHANNELS_REQUESTED,func:g,context:this});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.FILE_VALIDATION,func:v,context:this});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.CHAT,eventName:lpTag.unifiedWindow.events.chat.FAILED_START_CONVERSATION,func:w,context:this});this.appContext.events.bind({appName:"*",eventName:lpTag.unifiedWindow.events.uiState.ACTIONS_TOGGLE,func:r,context:this});this.appContext.events.bind({appName:"*",eventName:lpTag.unifiedWindow.events.uiState.FOCUS_CHANGE_EVENT,func:t,context:this});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.OVERLAY_CLOSED,func:s,context:this});this.bindModel({path:this.chatPath.SURVEYS_PRECHAT,callback:this.handlePreChatSurvey,context:this});this.bindModel({path:this.chatPath.SURVEYS_EXIT,callback:this.handleExitSurvey,context:this});this.bindModel({path:this.chatPath.SURVEYS_OFFLINE,callback:this.handleOfflineSurvey,context:this});this.bindModel({path:this.uiPath.STATE,callback:this.stateChanged,context:this});this.bindModel({path:this.uiPath.ACTIONS_VISIBLE,callback:r,context:this});this.bindModel({path:this.uiPath.TOP_MENU_VISIBLE,context:this,callback:l});this.bindModel({path:this.chatPath.SURVEYS_PRESMS,callback:this.handlePreSmsSurvey,context:this});if(lpTag.device.browser()){this.bindViewEvent({view:this.getFirstElement(this.LPViewMap.dragImageArea),DOMEvent:"drop",callback:E,context:this});this.bindViewEvent({view:this.getFirstElement(this.LPViewMap.dragImageArea),DOMEvent:"dragleave",callback:I,context:this});this.bindViewEvent({view:this.getFirstElement(this.LPViewMap.mainArea),DOMEvent:"dragover",callback:S,context:this});this.bindViewEvent({view:document.body,DOMEvent:"dragover",callback:y,context:this})}this.appContext.deviceDetector.isAndroid()&&this.bindViewEvent({view:window.visualViewport,DOMEvent:"resize",callback:P,context:this});this.bindViewEvent({view:this.getFirstElement(this.LPViewMap.sharedImage),DOMEvent:"click",callback:this.handleIOSClick,context:this});this.bindViewEvent({inView:document.body,selector:this.LPViewMap.mainWindow,callback:this.onKeyDown,DOMEvent:"keydown",context:this});this.appContext.events.bind({appName:"*",eventName:"adjust_styles",context:this,func:x});this.appContext.events.bind({appName:"*",eventName:"remove_styles",context:this,func:A});this.appContext.events.bind({appName:"*",eventName:"keyboard_visible",context:this,func:M});this.appContext.events.bind({appName:"*",eventName:"reset_window",context:this,func:D});o=function(){this.mainWindow&&(this.mainWindow.style.top=(window.scrollY||window.pageYOffset||window.document.documentElement.scrollTop)-this.scrollingDelta+"px")}.bind(this)},render:function(){if(!this.rendered){this.rendered=!0;this.mainWindow=this.getFirstElement(this.LPViewMap.mainWindow,document.body);this.mainWindow=this.mainWindow.length?this.mainWindow[0]:this.mainWindow;this.engagementArea=this.getFirstElement(this.LPViewMap.engagementArea);this.bottomArea=this.getFirstElement(this.LPViewMap.locationBottom);this.waitArea=this.getFirstElement(this.LPViewMap.waitArea);this.headerArea=this.getFirstElement(this.LPViewMap.headerArea,document.body);this.titleArea=this.getFirstElement(this.LPViewMap.titleArea,this.headerArea);this.extendedTitleArea=this.getFirstElement(this.LPViewMap.extendedTitleArea,this.headerArea);this.brandLogoImage=this.getFirstElement(this.LPViewMap.brandLogoImage,this.headerArea);this.title=this.getFirstElement(this.LPViewMap.title,this.headerArea);this.subTitle=this.getFirstElement(this.LPViewMap.subTitle,this.extendedTitleArea);this.topMenuIcon=this.getFirstElement("^menu-top-btn",this.mainWindow);this.topMenuIcon.setAttribute("aria-label",this.translate("tooltip_ExpandActionMenu"));this.sharedImage=this.getFirstElement(this.LPViewMap.sharedImage);this.createView({template:"<div class='lp_skeleton-window-body'><div class='lp_skeleton-header'><div class='lp_skeleton-box'></div></div><div class='lp_skeleton-message lp_skeleton-agent'><div class='lp_skeleton-box'></div></div><div class='lp_skeleton-message lp_skeleton-visitor'><div class='lp_skeleton-box'></div></div><div class='lp_skeleton-input'><div class='lp_skeleton-box'></div></div></div>",target:this.waitArea,wrapWithDiv:!1});!function(){var e=this.getFirstElement(this.LPViewMap.bottomLogo);this.isLogoEnabled?this.show(e):this.hide(e)}.call(this);!function(){if(this.appContext&&this.appContext.conf&&this.appContext.conf.windowConf&&this.appContext.conf.windowConf.headerEnhancedUi){var e=document.querySelectorAll(".lp_maximized .lp_main")[0],t=this.appContext.conf.windowConf.headerAddLogoUrl,i=this.appContext.conf.windowConf.headerLogoUrl,n=this.appContext.conf.windowConf.barTitleText,a=this.appContext.conf.windowConf.headerAddSubtitle,o=this.appContext.conf.windowConf.barSubtitleText,t={isHeaderLogo:t,logoUrl:i,title:n,subTitle:{show:a,defaultText:o}};this.addClass(this.headerArea,"lpc_extended-header");this.addClass(this.titleArea,"lpHide");this.removeClass(this.extendedTitleArea,"lpHide");e&&(e.style.top="48px");this.title.innerHTML=""+lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(t.title).cleanText;this.title.setAttribute("aria-label",t.title);if(t.isHeaderLogo&&t.logoUrl){this.addClass(this.extendedTitleArea,"show-logo");this.brandLogoImage.setAttribute("src",t.logoUrl)}if(t.subTitle&&t.subTitle.show){this.addClass(this.extendedTitleArea,"show-subtitle");this.subTitle.innerHTML=""+lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(t.subTitle.defaultText).cleanText;this.subTitle.setAttribute("aria-label",t.subTitle.defaultText);t.subTitle.font&&(this.subTitle.style.font=t.subTitle.font);t.subTitle.color&&(this.subTitle.style.color=t.subTitle.color)}}}.call(this);this.addClass(this.bottomArea,this.LPClassesMap.noAnimation,500);this.addClass(this.engagementArea,this.LPClassesMap.noAnimation,500);lpTag.unifiedWindow.Translator&&this.appContext.events.trigger({appName:"*",eventName:"translatorReady",data:{}})}}});(e=lpTag.unifiedWindow.MaximizedViewController.prototype).showWait=function(e){var t={view:this.waitArea,useClasses:!0};if(e=void 0===e||e){this.closeSurvey();f.call(this);this.appContext.wrapperWindow.setTitle(this.translate("connecting"));this.show(t)}else this.hide(t)};e.disposeChatViews=function(){if(!this.chatViewsDisposed){D.call(this);this.appContext&&this.appContext.conf.widgetSDK?this.slider.getSelectedViewType()!==lpTag.unifiedWindow.consts.slider.viewType.widgetSDKView&&this.slider.hideSlider():this.slider&&this.slider.dispose();this.secureFormManagerVC&&this.secureFormManagerVC.dispose();this.cobrowseInvitationVC&&this.cobrowseInvitationVC.dispose();this.richContentWidgetManagerVC&&this.richContentWidgetManagerVC.dispose();this.datePickerVC&&this.datePickerVC.dispose();this.scheduleListVC&&this.scheduleListVC.dispose();this.flutterVC&&this.flutterVC.dispose();this.chatViewsDisposed=!0}};e.addChatViews=function(){this.secureFormManagerVC=this.secureFormManagerVC||new lpTag.unifiedWindow.SecureFormsManagerViewController({models:this.models,appContext:this.appContext,sliderAPI:this.slider});this.cobrowseInvitationVC=this.cobrowseInvitationVC||new lpTag.unifiedWindow.CoBrowseInvitationManagerViewController({models:this.models,appContext:this.appContext,sliderAPI:this.slider});this.richContentWidgetManagerVC=this.richContentWidgetManagerVC||new lpTag.unifiedWindow.RichContentWidgetManagerViewController({appContext:this.appContext,sliderAPI:this.slider});this.mavenPayWidgetManagerVC=this.mavenPayWidgetManagerVC||new lpTag.unifiedWindow.MavenPayWidgetManagerViewController({appContext:this.appContext,sliderAPI:this.slider});this.flutterVC=this.flutterVC||new lpTag.unifiedWindow.FlutterViewController({models:this.models,appContext:this.appContext,target:this.getFirstElement(this.LPViewMap.mainArea),textInjection:this.appContext.conf.unifiedConf});this.datePickerVC=this.datePickerVC||new lpTag.unifiedWindow.DatePickerViewController({models:this.models,appContext:this.appContext});this.scheduleListVC=this.scheduleListVC||new lpTag.unifiedWindow.ScheduleListViewController({models:this.models,appContext:this.appContext})};e.handlePreChatSurvey=function(e){c.call(this,e,lpTag.unifiedWindow.SurveyType.PRE_CHAT)};e.handleExitSurvey=function(e){c.call(this,e,lpTag.unifiedWindow.SurveyType.EXIT_CHAT)};e.handleOfflineSurvey=function(e){c.call(this,e,lpTag.unifiedWindow.SurveyType.OFFLINE)};e.handlePreSmsSurvey=function(e){c.call(this,e,lpTag.unifiedWindow.SurveyType.PRE_SMS)};e.showTranscriptArea=function(){this.show(this.engagementArea);this.appContext&&this.appContext.conf&&this.appContext.conf.unifiedConf&&!this.appContext.conf.unifiedConf.connectorsSfConfig&&this.show(this.LPViewMap.locationBottom);this.chatVC&&(this.chatVC.transcriptWasShown=!0)};e.hideTranscriptArea=function(){this.hide(this.engagementArea);this.hide(this.LPViewMap.locationBottom)};e.addLogoViewController=function(){this.logoVC=new lpTag.unifiedWindow.LogoViewController({appContext:this.appContext,parent:this});a.addClass(this.getFirstElement(this.LPViewMap.mainArea),this.LPClassesMap.logo_top_margin);this.addViewController({viewController:this.logoVC,target:this.LPViewMap.mainArea});this.logoDOMAdded=!0};e.stateChanged=function(e){e=e.newValue;switch(e){case lpTag.unifiedWindow.State.APP_ENDED:case lpTag.unifiedWindow.State.NOT_FOUND:var t=this.survey&&this.survey.surveyType===lpTag.unifiedWindow.SurveyType.PRE_SMS;this.chatVC&&this.chatVC.closeActions();this.closeSurvey();this.showThankYouPage(t);break;case lpTag.unifiedWindow.State.REQUESTED:this.closeSurvey();break;case lpTag.unifiedWindow.State.WAITING:this.showWait(!1);f.call(this);this.closeSurvey();d.call(this);this.showTranscriptArea();this.addChatViews();break;case lpTag.unifiedWindow.State.CHATTING:this.showWait(!1);f.call(this);this.closeSurvey();this.addChatViews();d.call(this);this.showTranscriptArea();this.transcriptState.isShownAfterChatEnd=!0;break;case lpTag.unifiedWindow.State.POST_CHAT:this.showWait(!1);d.call(this);this.showTranscriptArea();this.transcriptState.isShownAfterChatEnd=!0;break;case lpTag.unifiedWindow.State.ENDED:this.chatVC&&this.chatVC.agentIsTyping(!1);this.disposeChatViews();break;case lpTag.unifiedWindow.State.AUTH_ERROR:this.enableCloseBtnOnAuthError();this.dispose();break;case lpTag.unifiedWindow.State.CONNECTION_ISSUE:!function(){this.appContext.connectionUnavailable=!0;this.showTooltip({text:this.translate("tooltip_ConnectionIssue"),type:this.tooltipType.notification})}.call(this);break;case lpTag.unifiedWindow.State.RESTART_AUTHENTICATION:!function(){var t=this;this.appContext.wrapperWindow.showClose(!1);u.call(this,{context:this,data:{header_key:"relogin",appContext:this.appContext,callbackTimeout:6e3,ControllerName:lpTag.unifiedWindow.ReauthenticationDialogViewController.ControllerName,callback:function(){var e=t.appContext.conf.engConf&&t.appContext.conf.engConf.connector;e&&e.configuration&&e.configuration.pkceEnabled?window.location.href=t.appContext.pkceManager.getExternalWindowURLForPKCE(t.appContext):window.location.href=t.appContext.appConfigurationManager.getExternalResourceURL(t.appContext.conf.engConf,t.appContext.conf.unifiedConf,t.appContext.conf.unifiedConf.poppedOut)}}})}.call(this)}e!==lpTag.unifiedWindow.State.CONNECTION_ISSUE&&!function(){if(this.appContext.connectionUnavailable){this.appContext.connectionUnavailable=!1;this.showTooltip({text:this.translate("tooltip_ConnectionReEstablished"),type:this.tooltipType.success,tooltipTimeout:3e3})}}.call(this)};e.enableCloseBtnOnAuthError=function(){var e=this.getFirstElement("^close",this.headerArea),t=this.getFirstElement("^menu-top-btn",this.headerArea);e&&(e.style.display="inline-block");t&&(t.style.display="none")};e.closeSurvey=function(){if(this.survey){this.removeViewController(this.survey);this.survey=null}};e.showThankYouPage=function(e){function t(e){var t=function(){this.rendered&&this.closeThankYouPage()}.bind(i);i.thankYouView=e;i.bindViewEvent({view:i.thankYouView,DOMEvent:"click",callback:t});i.animate(e,{duration:i.fadeInTimeout},null);i.appContext.events.trigger({appName:i.ControllerName,eventName:i.VCEvents.THANK_YOU_PAGE});i.closeThankYouTimeout=setTimeout(t,i.thankYouTimeout)}var i,n={imagesRepository:(i=this).appContext.conf.unifiedConf.imagesRepository};if(e){e=this.models.uiModel.get(lpTag.unifiedWindow.uiModelPath.PRE_SMS_CONTEXT);n.message=this.injectTextDefaults(this.appContext.translator.translate("thankYouMessagePreSms",!0),{phoneNumber:e&&e.From})}else n.message=this.appContext.translator.translate("thankYouMessage");this.thankYouView||a.getPropertyFromObject(this.appContext,"conf.engConf.async")&&!a.getPropertyFromObject(this.appContext,"conf.engConf.externalTargets.0")?this.transcriptState.isShownAfterChatEnd&&this.showTranscriptArea():function(e,t,i){this.createView({template:"<div class='lp_lpview_mp lp_thank_you_container' data-lp-cust-id='dialogArea' role='alert'><div class='lp_image'><img src='{{imagesRepository}}/thank-you-dark.png' alt=''></div><div class='lp_lpview_title lp_title'>{{message}}</div></div>",target:this.LPViewMap.mainArea,wrapWithDiv:!1,textInjection:e,callback:t,context:i})}.call(this,n,t,this)};e.closeThankYouPage=function(){var e=this;this.closeThankYouTimeout&&clearTimeout(this.closeThankYouTimeout);!this.unifiedConf.poppedOut&&!this.unifiedConf.external||a.getPropertyFromObject(this.appContext,"conf.engConf.async")||(window.location.hash=this.endedHash);if(this.transcriptState.isShownAfterChatEnd)this.animate(this.thankYouView,{duration:this.fadeOutTimeout,opacity:"0"},function(){e.hide(e.thankYouView);e.removeView(e.thankYouView);e.thankYouView=null;if(e.appContext.unAuthUserTriesAuth){e.appContext.unAuthUserTriesAuth=!1;e.appContext.events.trigger({appName:"Application",eventName:e.EventName.application.ENDED})}else e.showTranscriptArea()});else if(!this.unifiedConf.poppedOut&&!this.unifiedConf.external){e.hide(e.thankYouView);e.removeView(e.thankYouView);e.thankYouView=null;e.appContext.events.trigger({appName:"Application",eventName:e.EventName.application.ENDED})}};e.showTooltip=function(i){var n=this;n.getTooltip(i.text,i.type,function(e){var t={duration:n.fadeInTimeout};t.opacity=i.type===n.tooltipType.success?"1":"0.92";n.animate(e,t,null);isNaN(i.tooltipTimeout)||(n.closeTooltip=setTimeout(function(){_.call(n)},i.tooltipTimeout))})};e.showTooltipButton=function(i){var n=this;n.getTooltipButton(i.text,i.type,function(e){var t={duration:n.fadeInTimeout};t.opacity=i.type===n.tooltipType.success?"1":"0.92";n.animate(e,t,null);isNaN(i.tooltipTimeout)||(n.closeTooltip=setTimeout(function(){C.call(n)},i.tooltipTimeout))},i.maximizeSliderBtnTitle)};e.closeTooltip=function(){_.call(this)};e.closeTooltipButton=function(){C.call(this)};e.getTooltip=function(e,t,i){var n=this;this.tooltip&&this.tooltip.parentNode.removeChild(this.tooltip);this.createView({template:"<div class='lp_tooltip lp_tooltip_{{type}}'><div class='lp_title' role='log' aria-live='assertive' aria-relevant='all' aria-atomic='false'>{{text}}</div></div>",target:this.LPViewMap.mainArea,beforeView:this.LPViewMap.engagementArea,wrapWithDiv:!1,textInjection:{text:e,type:t||this.tooltipType.notification},callback:function(e){n.tooltip=e;i&&"function"==typeof i&&i(n.tooltip)}});return this.tooltip};e.getTooltipButton=function(e,t,i,n){var a=this;this.tooltipButton&&this.tooltipButton.parentNode.removeChild(this.tooltipButton);this.createView({template:"<div class='lp_tooltip lp_tooltip_{{type}}'><button class='lp_maximize' data-lp-point='maximize-slider' title='{{tooltip_maximize_slider}}' tabindex='0'><span class='lp_minimize-right-slider-icon lp_icon-white' data-lp-point='minimize-icon' data-lp-type='icon'><img src='{{iconsRepository}}/sprites_v1.png' alt='{{tooltip_maximize_slider}}' aria-hidden='true' data-lp-point='maximize-img'> </span><span class='lp_title' role='log' aria-live='assertive' aria-relevant='all' aria-atomic='false'>{{text}}</span></button></div>",target:this.LPViewMap.mainArea,beforeView:this.LPViewMap.engagementArea,wrapWithDiv:!1,textInjection:{text:e,type:t||this.tooltipType.notification,tooltip_maximize_slider:n||this.translate("tooltip_maximize_slider"),iconsRepository:this.unifiedConf.iconsRepository},callback:function(e){this.bindViewEvent({selector:".lp_tooltip",DOMEvent:"click",context:this,callback:function(){if(t===this.tooltipType.call){this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.coBrowseEvents.MAXIMIZE});this.closeTooltipButton()}}});a.tooltipButton=e;i&&"function"==typeof i&&i(a.tooltipButton)}});return this.tooltipButton};e.onChatVCResize=function(e){this.bottomArea.style.height=e.bottomAreaSize+"px";this.engagementArea.style.height="calc(100% - "+(e.bottomAreaSize+e.actionsAreaSize+15)+"px)"};e.handleIOSClick=function(e){e=e.target.parentNode.parentNode.getAttribute("data-lp-point");m=e};e.setTabindexToEdgeLine=function(e,t){for(var i,n=this.getFirstElement(this.LPViewMap.linesArea).children,a=0;a<n.length;a++)n[a].removeAttribute("tabindex");if(0<n.length){"first"===e&&(i=0);n[i="last"===e?n.length-1:i].setAttribute("tabindex",0);t&&n[i].focus()}};e.onKeyDown=function(e){this.accessibilityManager.getKeyboardOnlyFocus()&&!this.accessibilityManager.getKeyboardNavigationDetected()&&this.accessibilityManager.checkForKeyboardNavigation(e);var t="which"in e?e.which:e.keyCode;if(this.appContext.deviceDetector.isIOS()&&9===t){e.preventDefault();var i=e,n=O(document.querySelector(".lp_maximized")),a=Array.prototype.filter.call(n,function(e,t){return e==document.activeElement}),a=Array.prototype.indexOf.call(n,a[0]);i.shiftKey||i.target!=n[a]||(a!==n.length-1?n[a+1]:n[0]).focus();i.shiftKey&&i.target==n[a]&&(0!==a?n[a-1]:n[n.length-1]).focus()}if(13===e.keyCode||32===e.keyCode){if(document.activeElement.classList.contains("lp_image_sharing_link")){i=e.target.getAttribute("data-lp-point");m=i}if(document.activeElement.classList.contains("lpc_maximized-header__close-button")){this.appContext.events.trigger({appName:this.ControllerName,eventName:this.EventName.viewController.INITIATE_END_CHAT,data:!0});this.appContext.uiStateManager.setVisibility(this.uiPath.TOP_MENU_VISIBLE,!1)}document.activeElement.classList.contains("lpc_maximized-header__minimize-button")&&this.appContext.uiStateManager.setWindowState(!1)}var a=this.getFocusableHeaderButton(this.getFirstElement(this.LPViewMap.mainWindow,document.body)),n=this.getFirstElement(this.chatVC.sendIconTypeToUse),o=n.disabled,s=this.getFirstElement(this.LPViewMap.emojiButton),r=this.getFirstElement(this.LPViewMap.input),l="none"==s.style.display,d=this.chatVC.getModelParam(this.uiPath.EMOJI_VISIBLE),c=this.getFirstElement(this.LPViewMap.emojiBar).querySelector("ul:first-child li:first-child button:first-child"),u=this.getFirstElement(this.LPViewMap.emojiBar).querySelector("ul:last-child li:last-child button:last-child"),p=document.getElementsByClassName("lpc_maximized-header__minimize-button")[0],h=this.getFirstElement("^top_menu").querySelectorAll(".lp_action_items_wrapper_top:last-child button:not([disabled])"),h=h[h.length-1],f=this.topMenuIcon.getAttribute("aria-expanded");if(e.target===p&&e.shiftKey&&9===t&&"true"===f){e.preventDefault();h.focus()}if(e.shiftKey&&9===t&&e.target===a&&!this.appContext.deviceDetector.isIOS()){if(l&&o){e.preventDefault();g=r}if(!l&&o){e.preventDefault();g=s}if(!o){e.preventDefault();g=n}if(o&&d){e.preventDefault();g=u}g.focus()}p=this.getFirstElement(this.LPViewMap.actionButton),f=this.getFirstElement(this.LPViewMap.fileAttachment),h=this.windowConf&&this.windowConf.attachmentIcon;if(d){if(!e.shiftKey&&9===t&&(document.activeElement===p||document.activeElement===f)){e.preventDefault();r.focus()}if(!e.shiftKey&&9===t&&document.activeElement===s){e.preventDefault();c.focus()}if(e.shiftKey&&9===t&&document.activeElement===r){e.preventDefault();"none"!==p.style.display?p.focus():h?f.focus():this.setTabindexToEdgeLine("last",!0)}if(e.shiftKey&&9===t&&document.activeElement===n){e.preventDefault();u.focus()}}if(e.shiftKey&&9===t&&document.activeElement===this.mainWindow){if(this.slider&&this.slider.isSliderOpen){l=W(this.slider.view);l&&l.focus()}else if(this.dialogVC){var g=W(this.dialogVC.view);g&&g.focus()}else if(this.chatVC.isActionBarVisible()&&o)if(d)this.getFirstElement(this.LPViewMap.emojiBar).querySelector("tr:last-child td:last-child button:last-child").focus();else{c=this.getFirstElement(this.LPViewMap.actionsBar).querySelectorAll("button:not(:disabled)");c[c.length-1].focus()}else o?this.chatVC&&this.chatVC.emojiIconStyle.value?this.focusOnElement(this.LPViewMap.emojiButton):this.focusOnElement(this.LPViewMap.input):this.focusOnElement(this.chatVC.sendIconTypeToUse);e.preventDefault()}else if(this.slider&&this.slider.isSliderOpen){r=this.appContext&&this.appContext.coBrowseManager&&this.appContext.coBrowseManager.isInActiveCall(),p=this.getFirstElement(this.LPViewMap.minimizeSliderButton,document.body);if(9===t&&!e.shiftKey){(document.activeElement===u&&d&&o||!o&&e.target===n||!d&&e.target===s)&&p.focus();h=W(this.slider.view);if(document.activeElement===h){e.preventDefault();this.mainWindow.focus()}}9===t&&e.shiftKey&&e.target===a&&(!r&&W(this.slider.view)?W(this.slider.view):p).focus()}};var o=null;function t(e){var e=e&&e.type||"",t=this.appContext.conf.unifiedConf.isExtraFocusEnabledForTextInput;"focus"!==e||t?"blur"===e&&(this.bottomArea.style.borderTop="1px solid #d6d6d6"):this.bottomArea.style.borderTop="1px solid #0085ef"}function n(e){e.setAttribute("tabindex","0");e.blur();var t=0,i=window.setInterval(function(){e.focus();10<=++t&&window.clearInterval(i)},10)}function s(){var e=document.querySelectorAll(".lp_image_sharing_link"),e=e[e.length-1],t=m;if(null==(m=document.querySelector("[data-lp-point="+t+"]"))){e.focus();this.appContext.deviceDetector.isIOS()&&n(e)}else{m.focus();this.appContext.deviceDetector.isIOS()&&n(m)}}function r(e){e&&e.visible?this.addClass(this.view,this.LPClassesMap.actionsVisibility):this.removeClass(this.view,this.LPClassesMap.actionsVisibility)}function l(e){var e=e&&e.newValue,t=this.getFirstElement("^top_menu"),i=this.getFirstElement(".lp_top_menu-logo-icon",this.mainWindow);if(e){this.topMenuIcon.title=this.translate("tooltip_CollapseActionMenu");this.topMenuIcon.setAttribute("aria-expanded","true");this.removeClass(t,"lpHide");i.setAttribute("aria-label",this.translate("PoweredBy"))}else{this.topMenuIcon.title=this.translate("tooltip_ExpandActionMenu");this.topMenuIcon.setAttribute("aria-expanded","false");this.addClass(t,"lpHide")}this.topMenuIcon.setAttribute("aria-label",this.topMenuIcon.title)}function d(){if(!this.chatDOMAdded&&this.appContext){this.addLogo&&!this.logoDOMAdded&&this.addLogoViewController();this.transcriptVC=new lpTag.unifiedWindow.TranscriptViewController({models:this.models,appContext:this.appContext,wrapWithDiv:!1,sliderAPI:this.slider});this.chatVC=new lpTag.unifiedWindow.ChatViewController({models:this.models,appContext:this.appContext,textInjection:this.unifiedConf,wrapWithDiv:!1,resizeEvent:{onResize:this.onChatVCResize,onResizeContext:this,transitionView:this.view},sliderAPI:this.slider});this.actionsVc=new lpTag.unifiedWindow.ActionsManagerViewController({models:this.models,appContext:this.appContext,textInjection:this.appContext.conf.unifiedConf});this.addViewController({viewController:this.transcriptVC,target:this.LPViewMap.engagementArea});this.addViewController({viewController:this.chatVC,target:this.LPViewMap.bottomArea});this.addViewController({viewController:this.coBrowseVC});this.addViewController({viewController:this.actionsVc,target:"^top_menu",beforeView:this.getFirstElement("^bottom_logo")});this.transcriptVC.show();this.chatVC.show();this.chatDOMAdded=!0}}function c(e,t){f.call(this);this.chatVC&&this.chatVC.closeActions();this.addLogo&&!this.logoDOMAdded&&this.addLogoViewController();this.survey=new lpTag.unifiedWindow.SurveyViewController({models:this.models,appContext:this.appContext,target:this.LPViewMap.mainArea,survey:e,surveyType:t,defaultSelect:this.translate("defaultSelect"),iconsRepository:this.unifiedConf.iconsRepository,imagesRepository:this.unifiedConf.imagesRepository});this.hideTranscriptArea();this.addViewController(this.survey);lpTag.hooks&&lpTag.hooks.exec&&lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.AFTER_LOAD_SURVEY,data:{context:this.appContext,surveyType:t,surveyData:e}})}function u(e){e=e.data;e.appContext=this.appContext;e.target=this.getFirstElement(this.LPViewMap.mainArea);e.wrapWithDiv=!1;e.cancelCallback=function(){this.dialogVC=null}.bind(this);var t=new lpTag.unifiedWindow[e.ControllerName](e);this.addViewController({viewController:t,target:e.target});p.call(this,!1);return this.dialogVC=t}function p(e){if(e){this.show(this.bottomArea);this.show(this.engagementArea)}else{this.hide(this.bottomArea);this.hide(this.engagementArea)}}function h(){p.call(this,!0)}function f(){this.appContext&&this.appContext.wrapperWindow&&this.appContext.wrapperWindow.removeMessage(!0)}function g(e){var t,e=e.channelType;e===lpTag.unifiedWindow.consts.engagementTypes.CHAT_ENGAGEMENT?t="tooltip_CloseToStartConversation":e===lpTag.unifiedWindow.consts.engagementTypes.MESSAGING_ENGAGEMENT&&(t="tooltip_CloseToStartChat");this.showTooltip({text:this.translate(t),type:this.tooltipType.notification,tooltipTimeout:5e3})}function v(e){var t;if(e.validation===lpTag.unifiedWindow.consts.fileSharing.fileAttributes.TYPE)t="tooltip_FileTypeValidationExpanded";else if(e.validation===lpTag.unifiedWindow.consts.fileSharing.fileAttributes.SIZE){t="tooltip_FileSizeValidation";e.extraData&&15===e.extraData&&(t="tooltip_FileSizeValidation15")}this.showTooltip({text:this.translate(t),type:this.tooltipType.notification,tooltipTimeout:5e3})}function w(){this.showTooltip({text:this.translate("startConversationError"),type:this.tooltipType.notification})}function _(){this.animate(this.tooltip,{duration:this.fadeOutTimeout,opacity:"0"},function(){if(this.tooltip){this.tooltip.parentNode.removeChild(this.tooltip);delete this.tooltip}})}function C(){this.animate(this.tooltipButton,{duration:this.fadeOutTimeout,opacity:"0"},function(){if(this.tooltipButton){this.tooltipButton.parentNode.removeChild(this.tooltipButton);delete this.tooltipButton}})}function T(e){if(e&&"SKIPPED"===e.status){this.closeSurvey();this.showTranscriptArea()}}function E(e){e.preventDefault();if(this.appContext.featureStateManager.isFileSharingEnabled()&&this.appContext.fileSharingManager&&!this.disableFileDragAndDrop){this.animate(this.dragImageView,{duration:this.fadeOutTimeout,opacity:"0"},function(){this.hide(this.dragImageView);this.removeView(this.dragImageView);this.dragImageView=null});this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.IMAGE_SELECTED,data:{image:e.dataTransfer.files[0]}})}}function y(e){e.preventDefault();if(this.appContext.featureStateManager.isFileSharingEnabled()&&this.appContext.fileSharingManager&&!this.disableFileDragAndDrop){this.dragImageView||(this.dragImageView=this.createView({template:"<div class='lp_lpview_mp lp_drop_image_wrapper' data-lp-point='drag_image_area' role='alert'><div class='lp_drop_image'><div class='lp_lpview_title lp_title'>{{message}}</div><div class='lp_image'><img src='{{imagesRepository}}/drop-images-icon.svg' alt=''></div></div></div>",target:this.LPViewMap.mainArea,wrapWithDiv:!1,textInjection:{imagesRepository:this.appContext.conf.unifiedConf.imagesRepository,message:this.appContext.translator.translate("dragFilesMessage")}}));e.dataTransfer&&(this.dragItems=e.dataTransfer.items);b.call(this)}}function b(){var e=function(){this.dragItems&&0!==this.dragItems.length?b.call(this):this.animate(this.dragImageView,{duration:this.fadeOutTimeout,opacity:"0"},function(){if(this.dragImageView){this.hide(this.dragImageView);this.removeView(this.dragImageView);this.dragImageView=null}})}.bind(this);this.disableDragTimeout&&clearTimeout(this.disableDragTimeout);this.disableDragTimeout=setTimeout(function(){e()},250)}function S(e){e.preventDefault();N.call(this,this.appContext.translator.translate("dropFilesMessage"))}function I(e){e.preventDefault();N.call(this,this.appContext.translator.translate("dragFilesMessage"))}function N(e){if(this.dragImageView){var t=this.getFirstElement(this.LPViewMap.titleArea,this.dragImageView);t&&(t.innerText=e)}}function x(){this.bottomArea.style.position="relative";this.bottomArea.style.bottom="3%"}function A(){this.bottomArea.style.removeProperty("position");this.bottomArea.style.removeProperty("bottom")}function M(){!function(t){i&&clearTimeout(i);i=setTimeout(function(){if(!this.isWinPositionSet){this.scrollingDelta=0;if(this.mainWindow.getBoundingClientRect().top<0){var e=window.visualViewport.height;this.mainWindow.style.maxHeight=e+"px";this.appContext.deviceDetector.isSafari()&&!function(){var t=this;this.mainWindow&&setTimeout(function(){var e=window.visualViewport.height;t.mainWindow.style.maxHeight=e+"px"},500)}.call(this);if(this.appContext.deviceDetector.isOldIOS15()&&this.appContext.deviceDetector.isSafari()){this.getFirstElement(this.LPViewMap.bottomArea).classList.add("lp_ios15_kb_visible");this.getFirstElement(this.LPViewMap.transcriptArea).classList.add("lp_ios15_kb_visible")}this.isWinPositionSet=!0;t&&window.scrollTo(0,0);if(!window.isOnScrollWithKeyboard&&t){window.addEventListener("scroll",o);window.isOnScrollWithKeyboard=!0}}else!function(){0<window.outerWidth&&0<window.outerHeight?window.outerWidth>window.outerHeight&&L.call(this):window.innerWidth>window.innerHeight&&L.call(this)}.call(this);this.appContext.events.trigger({appName:"*",eventName:lpTag.unifiedWindow.events.viewController.SCROLL_CONVERSATION_TO_BOTTOM,data:{}})}}.bind(this),400)}.call(this,!0)}function L(){if(window.screen.width<=375){var e=this.mainWindow.getBoundingClientRect().top,t=this.mainWindow.getBoundingClientRect().height,i=this.bottomArea.getBoundingClientRect().top,n=window.getComputedStyle(this.mainWindow).top;isNaN(n)&&(n=parseInt(n,10));this.mainWindow.style.maxHeight=t+"px";this.scrollingDelta=i-e;this.mainWindow.style.top=n-this.scrollingDelta+"px"}else{window.screen.width<=414?window.innerHeight<370?this.mainWindow.style.maxHeight="38vh":this.mainWindow.style.maxHeight="43vh":this.mainWindow.style.maxHeight="45vh";this.mainWindow.style.top=(window.scrollY||window.pageYOffset||window.document.documentElement.scrollTop)+"px"}this.isWinPositionSet=!0;if(!window.isOnScrollWithKeyboard){window.addEventListener("scroll",o);window.isOnScrollWithKeyboard=!0}}function D(){i&&clearTimeout(i);var e=this.getFirstElement(this.LPViewMap.bottomArea),t=this.getFirstElement(this.LPViewMap.transcriptArea);this.isWinPositionSet=!1;if(this.mainWindow){this.mainWindow.style.maxHeight="";this.mainWindow.style.removeProperty("top")}e&&e.classList&&e.classList.remove("lp_ios15_kb_visible");t&&t.classList&&t.classList.remove("lp_ios15_kb_visible");if(window.isOnScrollWithKeyboard){window.removeEventListener("scroll",o);window.isOnScrollWithKeyboard=!1}}function P(){var e=this.models&&this.models.uiModel&&this.models.uiModel.get(this.uiPath.WINDOW_MAXIMIZED),t=this.appContext&&this.appContext.conf&&this.appContext.conf.unifiedConf,t=t&&t.shouldCoverGapWhenKBOpenedAndroid;if(this.mainWindow)if(e){this.mainWindow.style.height=Math.round(window.visualViewport.height)+"px";t&&!this.appContext.conf.unifiedConf.external&&setTimeout(function(){if(this.mainWindow){this.mainWindow.style.removeProperty("height");var e=this.getFirstElement(this.LPViewMap.mainArea),t=this.mainWindow.getBoundingClientRect().height,i=window.visualViewport.height,n=t-i;this.bottomArea.style.marginBottom=n+"px";e.style.paddingBottom=n+"px";20<100*i/t?this.bottomArea.style.borderBottom="1px solid #d6d6d6":this.bottomArea.style.removeProperty("borderBottom")}}.bind(this),0)}else this.mainWindow.style.removeProperty("height")}function O(e){return Array.prototype.filter.call(e.querySelectorAll('button:not(:disabled), input:not(:disabled), [href], select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not(:disabled)'),function(e){var t=window.getComputedStyle(e);return"none"!==t.display&&"none"!==e.parentNode.style.display&&"hidden"!==t.visibility&&"hidden"!==e.parentNode.style.visibility&&0<e.getBoundingClientRect().width&&0<e.getBoundingClientRect().height})}function W(e){e=O(e);return 0<e.length?e[e.length-1]:null}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e;lpTag.unifiedWindow.ActionViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"ActionViewController",template:"<li class='lp_action_item lpc_menu__item {{deviceClass}}'><button class='lp_action_item_btn' disabled tabindex='0'><span class='lp_action_wrapper'><span data-lp-point='icon' class='lp_{{className}}' data-lp-type='icon'><img src='{{iconsRepository}}/sprites_v1.png' alt=''> </span><span class='lp_title' data-lp-point='title' data-lp-cust-id='actionsMenu_actionItem_text'>{{title}}</span></span></button></li>",iconClass:"",shouldDisableOnActionsHidden:!0,LPViewMap:{title:"^title",icon:"^icon"},spriteName:"sprites_v1.png",initialize:function(e){this.textInjection=e.textInjection;this.models=e.models;this.isEnabled=!0;this.icon=this.getFirstElement(this.LPViewMap.icon);this.wrapper=this.getFirstElement(this.LPViewMap.wrapper);this.featureStateManager=e.appContext.featureStateManager;this.parser=new DOMParser},events:function(){this.bindModel({path:this.uiPath.STATE,callback:i,context:this});this.bindViewEvent({view:this.view,DOMEvent:"click",callback:t});this.appContext.events.bind({appName:"*",eventName:this.EventName.uiState.ACTIONS_TOGGLE,context:this,func:n});this.bindModel({path:this.uiPath.TOP_MENU_VISIBLE,context:this,callback:a})},render:function(){this.setTitle();this.addIconImage();this.setIconClass();void 0!==this.isEnabled&&this.setActionState(this.isEnabled)}});(e=lpTag.unifiedWindow.ActionViewController.prototype).addIconImage=function(){if(this.featureStateManager.isMenuTop()){var e=this.getFirstElement("img",this);this.icon.removeChild(e);if(this.svgFile){var t=this.getFirstElement(this.LPViewMap.icon),i=document.createElement("img");i.setAttribute("src",this.textInjection.iconsRepository+"/"+this.spriteName);this.loadResource(this.svgFile,function(e){e=this.parser.parseFromString(e,"image/svg+xml").lastChild;if(e&&e instanceof SVGElement){e.appendChild(i);t.appendChild(e)}else t.appendChild(i)},function(){t.appendChild(i)})}else this.svgFiles&&this.loadSvgMap()}};e.loadSvgMap=function(){var e,t=[],i=[];for(e in this.svgFiles)if(!(this.svgFiles[e]instanceof SVGElement)){i.push(e);t.push(this.svgFiles[e])}t.length&&this.loadMultiResource(t,function(e){for(var t=0;t<e.length;t++)this.svgFiles[i[t]]=this.parser.parseFromString(e[t],"image/svg+xml").lastChild})};e.setIconClass=function(){this.iconClass&&this.icon&&this.addClass(this.icon,this.iconClass)};e.setTitle=function(e){var e=e||this.translate(this.title),t=(this.featureStateManager.isMenuTop()&&(e=this.replaceCharacter(e,"\n"," ")),this.getFirstElement(this.LPViewMap.title));t?(i=e,(t=t).innerText?t.innerText=i:t.innerHTML=i):this.view.title=e;this.view.firstElementChild.setAttribute("aria-label",e);var t=this.icon,i=e;if(t){t.alt=i;t.setAttribute("aria-hidden","true")}};e.enableAction=function(){this.view.firstElementChild.removeAttribute("disabled")};e.disableAction=function(){this.view.firstElementChild.setAttribute("disabled","disabled")};function i(e){e=e.newValue;if(Array.isArray(this.enableState)&&0<=this.enableState.indexOf(e)||this.enableState===e)this.enable();else if(Array.isArray(this.disableState)&&0<=this.disableState.indexOf(e)||this.disableState===e)this.disable();else if(this.enableState||this.disableState||this.disableOnEnd||!this.enableOnStart)switch(e){case lpTag.unifiedWindow.State.APP_ENDED:case lpTag.unifiedWindow.State.NOT_FOUND:case lpTag.unifiedWindow.State.ERROR:case lpTag.unifiedWindow.State.POST_CHAT:this.disableOnEnd&&this.disable();break;case lpTag.unifiedWindow.State.WAITING:case lpTag.unifiedWindow.State.CHATTING:this.enableOnStart&&this.enable()}else this.enable()}e.setActionState=function(e){e?this.enableAction():this.disableAction()};e.setIconURL=function(e){if(this.icon){e.indexOf("/")<0&&(e=this.appContext.conf.unifiedConf.iconsRepository+"/"+e);this.icon.width=this.iconWidth;this.icon.height=this.iconHeight;this.icon.src=e;this.icon.children&&0<this.icon.children.length&&this.icon.children[0]&&(this.icon.children[0].src=e)}};e.disable=function(){if(this.isEnabled){this.isEnabled=!1;this.setActionState(this.isEnabled,this.iconDisabled)}};e.enable=function(){if(!this.isEnabled){this.isEnabled=!0;this.setActionState(this.isEnabled,this.iconEnabled)}};e.focusOnView=function(e){e.origin===this.appConsts.dialog.actions.CANCEL&&e.dialogOpenedFrom!==this.appConsts.views.TOP_MENU&&setTimeout(function(e){(e.children&&e.children.length&&"button"===e.children[0].tagName.toLowerCase()?e.children[0]:e).focus()},0,this.view)};e.toggleSvg=function(e){var t=this.getFirstElement("svg",this.icon);t&&this.icon.removeChild(t);e?this.icon.appendChild(this.svgFiles.disabled):this.icon.appendChild(this.svgFiles.enabled)};function t(e){var e=e.context,t={context:e,data:{}};e.clicked&&!1===e.clicked.call(e,t)||e.appContext.events.trigger({appName:e.ControllerName,eventName:e.VCEvents.CLICKED,data:t})}function n(e){var t=this.getModelParam(this.uiPath.STATE);e.visible?i.call(this,{newValue:t}):this.shouldDisableOnActionsHidden&&!this.featureStateManager.isMenuTop()&&this.disable();this.view.setAttribute("aria-hidden",(!e.visible).toString())}function a(e){this.view.setAttribute("aria-hidden",(!e.newValue).toString())}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};window.lpTag.unifiedWindow.actions=window.lpTag.unifiedWindow.actions||{};!function(){var e;lpTag.unifiedWindow.actions.MuteSoundAction=lpTag.unifiedWindow.ActionViewController.extend({ControllerName:"MuteSoundAction",applicationType:"MuteSoundAction",titles:{mute:"MuteSoundAction"},title:"MuteSoundAction",isEnabled:!0,disableOnEnd:!0,enableState:[lpTag.unifiedWindow.State.WAITING,lpTag.unifiedWindow.State.CHATTING],iconClasses:{mute:"lp_mute-action-icon",unmute:"lp_unmute-action-icon"},svgFiles:{disabled:"<svg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='20' height='20' viewBox='0 0 20 20'><g fill='none' fill-rule='evenodd'><path fill='#98999A' d='M11.845 3.402c.42.43.655 1.006.655 1.606v9.984a2.296 2.296 0 0 1-3.902 1.64L6.13 14.215a1.5 1.5 0 0 0-1.05-.428H3.949A2.448 2.448 0 0 1 1.5 11.339V8.661a2.448 2.448 0 0 1 2.448-2.448H5.08a1.5 1.5 0 0 0 1.049-.428l2.47-2.417a2.296 2.296 0 0 1 3.246.034zm-2.547.68L6.828 6.5a2.5 2.5 0 0 1-1.748.713H3.948c-.8 0-1.448.648-1.448 1.448v2.678c0 .8.648 1.448 1.448 1.448H5.08a2.5 2.5 0 0 1 1.749.713l2.469 2.418a1.296 1.296 0 0 0 2.202-.926V5.008a1.296 1.296 0 0 0-2.202-.926zm8.991 3.134l.707.707-1.789 1.789 1.92 1.92-.708.707-1.919-1.92-1.92 1.92-.707-.707 1.919-1.92-1.788-1.789.707-.707L16.5 9.005l1.79-1.789z'/></g></svg>",enabled:"<svg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='20' height='20' viewBox='0 0 20 20'><g fill='none' fill-rule='evenodd'><path fill='#98999A' d='M11.823 3.161c.433.43.677 1.014.677 1.623v10.432a2.284 2.284 0 0 1-3.907 1.607l-2.466-2.489a1.5 1.5 0 0 0-1.065-.444H3.948A2.448 2.448 0 0 1 1.5 11.442V8.558A2.448 2.448 0 0 1 3.948 6.11h1.114c.4 0 .784-.16 1.065-.444l2.466-2.49a2.284 2.284 0 0 1 3.23-.015zm-2.52.72L6.838 6.37a2.5 2.5 0 0 1-1.776.74H3.948c-.8 0-1.448.648-1.448 1.448v2.884c0 .8.648 1.448 1.448 1.448h1.114a2.5 2.5 0 0 1 1.776.74l2.465 2.49a1.284 1.284 0 0 0 2.197-.904V4.784a1.284 1.284 0 0 0-2.197-.904zm8.91 1.445l.23.443c1.466 2.816 1.548 5.557.147 8.197l-.156.282-.248.434-.868-.496.248-.434c1.336-2.335 1.357-4.72.132-7.24l-.142-.281-.23-.444.887-.461zm-3.097.977l.29.406c1.61 2.253 1.646 4.488-.013 6.6l-.309.393-.786-.618.309-.393c1.374-1.75 1.346-3.497-.014-5.4l-.29-.407.813-.581z'/></g></svg>"},initialize:function(e){this.featureStateManager=e.appContext.featureStateManager;e=this.getModelParam(this.uiPath.WINDOW_SOUND);this.setIconClass(e);this.setButtonAttributes();this.setTitle(this.title.mute);this.overrideTitleWithAriaAttributes()},events:function(){this.bindModel({path:this.uiPath.WINDOW_SOUND,callback:this.soundStateChanged})}});(e=lpTag.unifiedWindow.actions.MuteSoundAction.prototype).setIconClass=function(e){this.removeClass(this.icon,e?this.iconClasses.unmute:this.iconClasses.mute);this.addClass(this.icon,e?this.iconClasses.mute:this.iconClasses.unmute)};e.clicked=function(){this.isEnabled&&this.appContext.uiStateManager.setSoundState(!this.soundMuted)};e.soundStateChanged=function(e){if(e&&e.newValue!==this.soundMuted){this.soundMuted=e.newValue;this.featureStateManager.isMenuTop()?this.toggleSvg(this.soundMuted):this.setIconClass(this.soundMuted);this.overrideTitleWithAriaAttributes();this.setActionState(this.isEnabled,this.isEnabled?this.iconEnabled:this.iconDisabled);this.setAriaCheckedState()}};e.setButtonAttributes=function(){if(this.view&&this.view.firstElementChild&&"button"===this.view.firstElementChild.tagName.toLowerCase()){this.view.firstElementChild.setAttribute("aria-live","polite");this.view.firstElementChild.setAttribute("aria-relevant","text");this.view.firstElementChild.setAttribute("role","switch");this.setAriaCheckedState()}};e.setAriaCheckedState=function(){this.view&&this.view.firstElementChild&&this.view.firstElementChild.setAttribute("aria-checked",String(this.soundMuted))};e.overrideTitleWithAriaAttributes=function(){var e=this.featureStateManager.isMenuTop()?"LP_MuteSoundAction_2":"LP_MuteSoundAction_1",e=document.querySelector("#"+e+" > button span.lp_title"),t=this.soundMuted?this.translate("on"):this.translate("off");e&&(e.innerHTML=this.translate(this.titles.mute)+": <span aria-hidden=true'>"+t+"</span>")}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};window.lpTag.unifiedWindow.actions=window.lpTag.unifiedWindow.actions||{};!function(){var e,m=".lp_print_line_text DIV {display: inline;} .lpHide {display: none}",v=lpTag.unifiedWindow.applicationUtils,o="[{{type}}] {{text}} {{caption}}";lpTag.unifiedWindow.actions.PrintTranscriptAction=lpTag.unifiedWindow.ActionViewController.extend({ControllerName:"PrintTranscriptAction",applicationType:"PrintTranscriptAction",iconClass:"lp_print-transcript-action-icon",title:"PrintTranscriptAction",richContentSentKey:"richContentSent",richContentNotAvailable:"RichContentNotAvailable",imageSentKey:"imageContentSent",templateRepository:{line:"<div class='lp_print_line' role='list'><div class='lp_print__line_time' role='listitem'>{{time}}</div><div class='lp_print_line_text' role='listitem'><span>{{source}}: {{text}}</span></div><div class='lp_print__line_time lp_time_bottom lpHide' role='listitem'>{{time}}</div></div>",systemLine:"<div class='lp_print_line' role='list'><div class='lp_print_line_text' role='listitem'><span>{{source}}: {{text}}</span></div></div>"},titles:{print:"PrintTranscriptAction",download:"DownloadTranscriptAction"},iconClasses:{print:"lp_print-transcript-action-icon",download:"lp_download-transcript-action-icon"},svgFile:"<svg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='20' height='20' viewBox='0 0 20 20'><g fill='none' fill-rule='evenodd'><path fill='#98999A' d='M14.545 2.227a1.41 1.41 0 0 1 1.403 1.274l.007.135v2.227h.409c1.227 0 2.23.954 2.312 2.16l.006.159v4.545a2.318 2.318 0 0 1-2.16 2.313l-.158.005h-.41v2.228c0 .778-.63 1.409-1.409 1.409h-9.09a1.41 1.41 0 0 1-1.41-1.41v-2.227h-.409a2.318 2.318 0 0 1-2.312-2.159l-.006-.159V8.182c0-1.227.953-2.231 2.16-2.313l.158-.005h.41V3.635a1.41 1.41 0 0 1 1.273-1.402l.136-.007h9.09zm.41 10.091h-9.91v4.955c0 .226.184.409.41.409h9.09a.41.41 0 0 0 .41-.41v-4.954zm-2.637 3.091v1H7.682v-1h4.636zm0-1.818v1H7.682v-1h4.636zm4.046-2.273v1h-.41v1.727h.41c.682 0 1.244-.518 1.311-1.183l.007-.135V8.182c0-.683-.519-1.244-1.184-1.312l-.134-.006H3.636c-.682 0-1.244.518-1.311 1.183l-.007.135v4.545c0 .683.519 1.244 1.184 1.312l.134.006h.41v-1.728l-.41.001v-1h12.728zm-.91-2.727v1h-.909v-1h.91zm-1.818 0v1h-.909v-1h.91zm.91-5.364H5.454a.41.41 0 0 0-.401.327l-.009.082v2.228h9.91V3.636a.41.41 0 0 0-.41-.409z'/></g></svg>",svgFiles:{print:"<svg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='20' height='20' viewBox='0 0 20 20'><g fill='none' fill-rule='evenodd'><path fill='#98999A' d='M14.545 2.227a1.41 1.41 0 0 1 1.403 1.274l.007.135v2.227h.409c1.227 0 2.23.954 2.312 2.16l.006.159v4.545a2.318 2.318 0 0 1-2.16 2.313l-.158.005h-.41v2.228c0 .778-.63 1.409-1.409 1.409h-9.09a1.41 1.41 0 0 1-1.41-1.41v-2.227h-.409a2.318 2.318 0 0 1-2.312-2.159l-.006-.159V8.182c0-1.227.953-2.231 2.16-2.313l.158-.005h.41V3.635a1.41 1.41 0 0 1 1.273-1.402l.136-.007h9.09zm.41 10.091h-9.91v4.955c0 .226.184.409.41.409h9.09a.41.41 0 0 0 .41-.41v-4.954zm-2.637 3.091v1H7.682v-1h4.636zm0-1.818v1H7.682v-1h4.636zm4.046-2.273v1h-.41v1.727h.41c.682 0 1.244-.518 1.311-1.183l.007-.135V8.182c0-.683-.519-1.244-1.184-1.312l-.134-.006H3.636c-.682 0-1.244.518-1.311 1.183l-.007.135v4.545c0 .683.519 1.244 1.184 1.312l.134.006h.41v-1.728l-.41.001v-1h12.728zm-.91-2.727v1h-.909v-1h.91zm-1.818 0v1h-.909v-1h.91zm.91-5.364H5.454a.41.41 0 0 0-.401.327l-.009.082v2.228h9.91V3.636a.41.41 0 0 0-.41-.409z'/></g></svg>",download:"<svg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='20' height='20' viewBox='0 0 25 25'><g fill='none' fill-rule='evenodd'><path fill='#98999A' clip-rule='evenodd' d='M12 1.25C12.4142 1.25 12.75 1.58579 12.75 2V12.9726L14.4306 11.0119C14.7001 10.6974 15.1736 10.661 15.4881 10.9306C15.8026 11.2001 15.839 11.6736 15.5694 11.9881L12.5694 15.4881C12.427 15.6543 12.2189 15.75 12 15.75C11.7811 15.75 11.573 15.6543 11.4306 15.4881L8.43056 11.9881C8.16099 11.6736 8.19741 11.2001 8.51191 10.9306C8.8264 10.661 9.29988 10.6974 9.56944 11.0119L11.25 12.9726V2C11.25 1.58579 11.5858 1.25 12 1.25ZM6.99583 8.25196C7.41003 8.24966 7.74768 8.58357 7.74999 8.99778C7.7523 9.41199 7.41838 9.74964 7.00418 9.75194C5.91068 9.75803 5.1356 9.78643 4.54735 9.89448C3.98054 9.99859 3.65246 10.1658 3.40901 10.4092C3.13225 10.686 2.9518 11.0746 2.85315 11.8083C2.75159 12.5637 2.75 13.5648 2.75 15.0002V16.0002C2.75 17.4356 2.75159 18.4367 2.85315 19.1921C2.9518 19.9259 3.13225 20.3144 3.40901 20.5912C3.68577 20.868 4.07435 21.0484 4.80812 21.1471C5.56347 21.2486 6.56458 21.2502 8 21.2502H16C17.4354 21.2502 18.4365 21.2486 19.1919 21.1471C19.9257 21.0484 20.3142 20.868 20.591 20.5912C20.8678 20.3144 21.0482 19.9259 21.1469 19.1921C21.2484 18.4367 21.25 17.4356 21.25 16.0002V15.0002C21.25 13.5648 21.2484 12.5637 21.1469 11.8083C21.0482 11.0746 20.8678 10.686 20.591 10.4092C20.3475 10.1658 20.0195 9.99859 19.4527 9.89448C18.8644 9.78643 18.0893 9.75803 16.9958 9.75194C16.5816 9.74964 16.2477 9.41199 16.25 8.99778C16.2523 8.58357 16.59 8.24966 17.0042 8.25196C18.0857 8.25799 18.9871 8.28387 19.7236 8.41916C20.4816 8.55839 21.1267 8.82364 21.6517 9.34857C22.2536 9.95048 22.5125 10.7084 22.6335 11.6085C22.75 12.4754 22.75 13.5778 22.75 14.9453V16.0551C22.75 17.4227 22.75 18.525 22.6335 19.392C22.5125 20.2921 22.2536 21.0499 21.6517 21.6519C21.0497 22.2538 20.2919 22.5127 19.3918 22.6337C18.5248 22.7503 17.4225 22.7502 16.0549 22.7502H7.94513C6.57754 22.7502 5.47522 22.7503 4.60825 22.6337C3.70814 22.5127 2.95027 22.2538 2.34835 21.6519C1.74643 21.0499 1.48754 20.2921 1.36652 19.392C1.24996 18.525 1.24998 17.4227 1.25 16.0551V14.9453C1.24998 13.5778 1.24996 12.4754 1.36652 11.6085C1.48754 10.7084 1.74643 9.95048 2.34835 9.34857C2.87328 8.82363 3.51835 8.55839 4.27635 8.41916C5.01291 8.28387 5.9143 8.25798 6.99583 8.25196Z'></path></g></svg>"},enableOnStart:!0,initialize:function(){this.isAsync=this.appContext.conf.engConf.async;this.hyperlinksHelper=this.appContext.hyperlinksHelper;this.featureStateManager=this.appContext.featureStateManager;this.downloadTranscriptEnabled=this.appContext.conf&&this.appContext.conf.unifiedConf&&this.appContext.conf.unifiedConf.isTranscriptDownloadEnabled;if(this.downloadTranscriptEnabled){this.setDownloadIconClass();this.setDownloadSVG();this.setDownloadTitle()}}});(e=lpTag.unifiedWindow.actions.PrintTranscriptAction.prototype).clicked=function(){var e=this.getModelParam(this.chatPath.LINES);this.printLines(e)};e.printLines=function(e){var t=this;this.loadResource(this.templateRepository.line,function(){!function(e){var t,i="",n="",a="",o="",s="",r="",l=this.appContext.translator.dictionary.getString("transcriptConvResolvedByAgent"),d=this.appContext.translator.dictionary.getString("transcriptConvResolvedByVisitor"),c="";if(e){this.isAsync&&(e=v.sortByKeyValue(e,"time"));if(this.downloadTranscriptEnabled){for(var u=0;u<e.length;++u){(t=_.call(this,e[u]))&&(i+=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(t.innerHTML).cleanText);if("richContent"===e[u].type){var p=this.translate(this.richContentNotAvailable)||" [RICH CONTENT: PREVIEW NOT AVAILABLE]";e[u].text=e[u].text.type+" "+p}switch(e[u].source){case"visitor":s=(e[u].by||"You")+": ";break;case"agent":s=(e[u].by||"Agent")+": ";e[u].text=e[u].text.replace(/<[^>]*>/g,"");break;case"system":"transcriptConvResolvedByVisitor"===e[u].textKey&&(c=d);"transcriptConvResolvedByAgent"===e[u].textKey&&(c=l);s=(s="Info: "+c).replace(/{{time}}/g,w(e[u].time))}if(e[u].convId&&o!==e[u].convId){a=a+"Conversation ID: "+e[u].convId+"\n\n";o=e[u].convId}e[u].time&&(r="["+w(e[u].time)+"] ");a=a+r+s+(e[u].text||"")+"\n\n"}var h=document.createElement("a"),f=new Blob([a],{type:"text/plain;charset=utf-8"});h.href=URL.createObjectURL(f);h.download="transcript.txt";h.click();URL.revokeObjectURL(h.href)}else{for(var g=0;g<e.length;++g)(t=_.call(this,e[g]))&&(i+=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(t.innerHTML).cleanText);f=window.open("","_blank","scrollbars=yes, resizable=yes, left=0, top=0, width=600, height=600");n="<head><style>"+m+"</style></head>";f.document.head.innerHTML=n;f.document.body.innerHTML=i;!function(e,t){if(t){e.style.direction="rtl";e.style.textAlign="right"}else{e.style.direction="ltr";e.style.textAlign="left"}}.call(this,f.document.body,this.isLanguageRTL());f.print();f.opener=null}}}.call(t,e)})};e.setDownloadIconClass=function(){this.removeClass(this.icon,this.iconClasses.print);this.addClass(this.icon,this.iconClasses.download)};e.setDownloadSVG=function(){var n=this;setTimeout(function(){var e=document.querySelectorAll("[id*='LP_PrintTranscriptAction'] > button span.lp_download-transcript-action-icon")[0],t=(n.loadSvgMap(),n.getFirstElement("svg",e)),i=n.svgFiles.download;t&&e.removeChild(t);e.appendChild(i)},400)};e.setDownloadTitle=function(){var i=this,n=i.translate(i.titles.download);setTimeout(function(){var e=document.querySelectorAll("[id*='LP_PrintTranscriptAction'] > button span.lp_title");if(e)for(var t=0;t<e.length;++t){i.featureStateManager.isMenuTop()&&(n=n.replace(/\s/g," "));e[t].innerText=n}},400)};function w(e){var e=new Date(e),t=e.getHours().toString(),i=(t.length<2&&(t="0"+t),e.getMinutes().toString()),n=(i.length<2&&(i="0"+i),e.toLocaleString("default",{month:"short"}));return t+":"+i+", "+n+" "+e.getDate()}function _(e){var t,i,n,a=function(e){return"system"===e.source&&!0===this.appContext.conf.engConf.async}.call(this,e)?this.templateRepository.systemLine:this.templateRepository.line;if(e.time){t=lpTag.lpUtils.getTime(e.time,this.getMonthNames(),this.translate("dayMonthGap"),this.translate("daySuffix"));this.translator.extendDictionary({time:t},{locale:this.appContext.conf.engConf.lang})}return n=(i=function(e){var t;if(e.textKey){e.dictionaryKey&&this.translator.extendDictionary(e.dictionaryKey,{locale:this.appContext.conf.engConf.lang});t=this.translate(e.textKey)}else if(!t&&e.json||e.type===lpTag.unifiedWindow.consts.chatEvents.RICH_CONTENT)t=this.translate(this.richContentSentKey);else if(!t&&e.fileData||e.type===lpTag.unifiedWindow.consts.chatEvents.FILE_SHARING)t=this.templateString(o,{type:e.fileData.fileType,text:this.translate(this.imageSentKey),caption:e.fileData.caption||""});else{e.text=e&&e.text?e.text:"";if(this.appContext.conf.engConf.async&&e&&e.text&&e&&"visitor"!==e.source&&e&&e.type&&"line"===e.type&&this.hyperlinksHelper.textContainsMarkDownSyntax(e.text)){e.text="string"==typeof e.text?e.text.replace(/ /g," "):e.text;var i=this.hyperlinksHelper.convertMarkdownToTempId(e.text),i=this.hyperlinksHelper.convertAHREFToTempId(i),i=(n=!1,this.sanitizeText(i,{noFormatLink:n}).text),i=this.hyperlinksHelper.convertTempIdToMarkdown(i),i=this.hyperlinksHelper.convertTempIdToAHREF(i),i=this.hyperlinksHelper.parseAllMarkdownFormat(i);i=this.reTargetElementsByType(["A","FORM"],i);t=i;this.hyperlinksHelper.setMarkDownToTemp([]);this.hyperlinksHelper.setAHREFToTemp([])}else{e.text="string"==typeof e.text?e.text.replace(/ /g," "):e.text;i=this.hyperlinksHelper.textContainsAHREFSyntax(e.text);this.appContext.conf.engConf.async&&e.text&&i&&"visitor"!==e.source&&e&&e.type&&"line"===e.type&&(e.text=this.hyperlinksHelper.convertAHREFToTempId(e.text));n=!1;e.text=this.sanitizeText(e.text,{noFormatLink:n}).text;if(this.appContext.conf.engConf.async&&e.text&&i&&"visitor"!==e.source&&e&&e.type&&"line"===e.type){var n=this.hyperlinksHelper.convertTempIdToAHREF(e.text),i=this.reTargetElementsByType(["A","FORM"],n);e.text=i;this.hyperlinksHelper.setAHREFToTemp([])}t=e.text}}t=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(t).cleanText;t=this.replaceDuplicatedEncodings(t);"visitor"===e.source&&(t=t.replace(/</g,"<").replace(/>/g,">"));return t="string"==typeof t?function(e){var t=document.createElement("div");t.innerHTML=e;this.removeUnsupportedTagsAndAttributes(t,!1,!1);return t.innerHTML}.call(this,t):t}.call(this,e))&&i.trim()?this.createView({template:a,wrapWithDiv:!0,doNotAddChild:!0,textInjection:{source:function(e){var t="";switch(e.source){case"agent":t="info"===e.by?this.translate("info"):lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(e.by).cleanText;break;case"visitor":t=this.getModelParam(this.chatPath.VISITOR_NAME);break;case"system":t=this.translate("info")}return t}.call(this,e),text:i,time:t||""}}):n}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};window.lpTag.unifiedWindow.actions=window.lpTag.unifiedWindow.actions||{};!function(){lpTag.unifiedWindow.actions.EmailTranscriptAction=lpTag.unifiedWindow.ActionViewController.extend({ControllerName:"EmailTranscriptAction",applicationType:"EmailTranscriptAction",iconClass:"lp_email-transcript-action-icon",title:"EmailTranscriptAction",disableOnEnd:!0,enableOnStart:!0,enableState:lpTag.unifiedWindow.State.CHATTING,isEnabled:!1,iconEnabled:"email_normal.png",iconDisabled:"email_dimmed.png",svgFile:"<svg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='20' height='20' viewBox='0 0 20 20'><g fill='none' fill-rule='evenodd'><path fill='#98999A' d='M16.364 3.136a2.318 2.318 0 0 1 2.318 2.319v10a2.318 2.318 0 0 1-2.318 2.318H3.636a2.318 2.318 0 0 1-2.318-2.318v-10a2.318 2.318 0 0 1 2.318-2.319h12.728zm0 1H3.636c-.728 0-1.318.59-1.318 1.319v10c0 .728.59 1.318 1.318 1.318h12.728c.728 0 1.318-.59 1.318-1.318v-10c0-.728-.59-1.319-1.318-1.319zm-2.169 2.756l.707.707L10 12.501 5.098 7.6l.707-.707L10 11.087l4.195-4.195z'/></g></svg>",initialize:function(){this.isEnabled=!1},events:function(){this.appContext.events.bind({appName:lpTag.unifiedWindow.EmailTranscriptDialogViewController.ControllerName,eventName:this.VCEvents.DIALOG_CLOSED,context:this,func:this.focusOnView})}});lpTag.unifiedWindow.actions.EmailTranscriptAction.prototype.clicked=function(){if(this.isEnabled){var e={context:this,data:{ControllerName:lpTag.unifiedWindow.EmailTranscriptDialogViewController.ControllerName,dialogOpenedFrom:this.appConsts.views.ACTION_MENU}};this.appContext.events.trigger({appName:this.ControllerName,eventName:this.VCEvents.DIALOG,data:e})}}}();window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.actions=lpTag.unifiedWindow.actions||{};!function(){var e,t;lpTag.unifiedWindow.actions.EndChatAction=lpTag.unifiedWindow.ActionViewController.extend({ControllerName:"EndChatAction",applicationType:"EndChatAction",iconClass:"lp_end-chat-action-icon",title:"EndChatAction",isEnabled:!0,disableOnEnd:!0,iconEnabled:"end_normal.png",iconDisabled:"end_dimmed.png",svgFile:"<svg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='20' height='20' viewBox='0 0 20 20'><g fill='none' fill-rule='evenodd'><path fill='#FA5A64' d='M5.58 4.395l.805 1.1a6.136 6.136 0 1 0 7.257.02l.81-1.097a7.5 7.5 0 1 1-8.872-.024zm5.102-1.668v9.091H9.318v-9.09h1.364z'/></g></svg>",initialize:function(){t=!0;if(this.appContext.conf.engConf.async){this.enableState=lpTag.unifiedWindow.State.CHATTING;this.featureStateManager.isMenuTop()||(this.disableState=[lpTag.unifiedWindow.State.WAITING,lpTag.unifiedWindow.State.CONNECTION_ISSUE])}else this.enableState=[lpTag.unifiedWindow.State.WAITING,lpTag.unifiedWindow.State.CHATTING]},events:function(){this.appContext.events.bind({appName:lpTag.unifiedWindow.EndChatDialogViewController.ControllerName,eventName:this.VCEvents.DIALOG_CLOSED,context:this,func:this.focusOnView});this.bindModel({path:this.chatPath.CURRENT_DIALOG_TYPE,callback:this.dialogTypeUpdated,context:this})}});(e=lpTag.unifiedWindow.actions.EndChatAction.prototype).setCloseClass=function(){this.addClass(this,"lp_top_close_action")};e.enable=function(){if(!this.isEnabled&&t){this.isEnabled=!0;this.setActionState(this.isEnabled,this.iconEnabled)}};e.clicked=function(){if(this.isEnabled){this.appContext.events.trigger({appName:this.ControllerName,eventName:this.EventName.viewController.INITIATE_END_CHAT});this.appContext.uiStateManager.setVisibility(this.uiPath.TOP_MENU_VISIBLE,!1)}};e.dialogTypeUpdated=function(e){if(e.newValue===lpTag.AMSStatics.dialog.types.MAIN){t=!0;this.enable()}else if(e.newValue===lpTag.AMSStatics.dialog.types.POST_SURVEY){t=!0;this.enable()}else if(this.featureStateManager.isMenuTop()){t=!0;this.enable()}else{t=!1;this.disable()}this.render()}}();window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.actions=lpTag.unifiedWindow.actions||{};!function(){lpTag.unifiedWindow.actions.ForgetMeAction=lpTag.unifiedWindow.ActionViewController.extend({ControllerName:"ForgetMeAction",applicationType:"ForgetMeAction",iconClass:"lp_actions-forget-me-icon",title:"ForgetMeAction",isEnabled:!1,disableOnEnd:!1,enableState:[lpTag.unifiedWindow.State.CHATTING,lpTag.unifiedWindow.State.WAITING,lpTag.unifiedWindow.State.POST_CHAT],disableState:[lpTag.unifiedWindow.State.ERROR,lpTag.unifiedWindow.State.APP_ENDED],enableOnStart:!0,iconEnabled:"end_normal.png",iconDisabled:"end_dimmed.png",svgFile:"<svg width='20px' height='20px' aria-hidden='true' viewBox='0 0 20 20' version='1.1' xmlns='http://www.w3.org/2000/svg'><g id='20px/light/clearHistory' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'><path d='M13.2272727,11.8181818 L13.2272727,16.3636364 C13.2272727,16.5613292 13.3675017,16.7262698 13.5539175,16.764416 L13.6363636,16.7727273 L17.2727273,16.7727273 C17.4704201,16.7727273 17.6353607,16.6324983 17.6735069,16.4460825 L17.6818182,16.3636364 L17.6818182,11.8181818 L18.6818182,11.8181818 L18.6818182,16.3636364 C18.6818182,17.0960782 18.1229839,17.6979972 17.4084321,17.7662769 L17.2727273,17.7727273 L13.6363636,17.7727273 C12.9039218,17.7727273 12.3020028,17.213893 12.2337231,16.4993412 L12.2272727,16.3636364 L12.2272727,11.8181818 L13.2272727,11.8181818 Z M14.5454545,2.22727273 C15.7724053,2.22727273 16.7767251,3.18046952 16.8582883,4.38673759 L16.8636364,4.54545455 L16.8636364,7.73093484 L15.8636364,7.73093484 L15.8636364,4.54545455 C15.8636364,3.86294356 15.3449322,3.30158243 14.680231,3.23407835 L14.5454545,3.22727273 L3.63636364,3.22727273 C2.95385265,3.22727273 2.39249152,3.74597692 2.32498744,4.41067811 L2.31818182,4.54545455 L2.31818182,11.8181818 C2.31818182,12.5006928 2.83688601,13.0620539 3.5015872,13.129558 L3.63636364,13.1363636 L5.24924538,13.1363636 C5.49470527,13.1363636 5.69885375,13.3132388 5.74118971,13.546488 L5.74924538,13.6363636 L5.74924538,15.9126983 L9.36831813,13.2344498 C9.43287924,13.1866722 9.50766588,13.1553875 9.5862025,13.1427313 L9.66574929,13.1363636 L10.9802246,13.1363636 L10.9802246,14.1363636 L9.8306382,14.1363636 L6.27161396,16.7701739 C5.8478514,17.083774 5.2501009,16.9944696 4.93650085,16.5707071 C4.83920824,16.4392372 4.77774031,16.2855562 4.75704484,16.1246675 L4.74924538,16.0028839 L4.74924538,14.1363636 L3.63636364,14.1363636 C2.40941286,14.1363636 1.40509312,13.1831668 1.32352993,11.9768988 L1.31818182,11.8181818 L1.31818182,4.54545455 C1.31818182,3.31850377 2.27137861,2.31418403 3.47764668,2.23262084 L3.63636364,2.22727273 L14.5454545,2.22727273 Z M15.0454545,13.1818182 L15.0454545,15.9090909 L14.0454545,15.9090909 L14.0454545,13.1818182 L15.0454545,13.1818182 Z M16.8636364,13.1818182 L16.8636364,15.9090909 L15.8636364,15.9090909 L15.8636364,13.1818182 L16.8636364,13.1818182 Z M19.0909091,10.4090909 L19.0909091,11.4090909 L11.8181818,11.4090909 L11.8181818,10.4090909 L19.0909091,10.4090909 Z M16.8181818,9.04545455 L16.8181818,10.0454545 L14.0909091,10.0454545 L14.0909091,9.04545455 L16.8181818,9.04545455 Z M10,8.59090909 L10,9.59090909 L5.45454545,9.59090909 L5.45454545,8.59090909 L10,8.59090909 Z M12.7272727,6.31818182 L12.7272727,7.31818182 L5.45454545,7.31818182 L5.45454545,6.31818182 L12.7272727,6.31818182 Z' fill='#979797' fill-rule='nonzero'></path></g></svg>",initialize:function(){},events:function(){this.appContext.events.bind({appName:lpTag.unifiedWindow.ForgetMeDialogViewController.ControllerName,eventName:this.VCEvents.DIALOG_CLOSED,context:this,func:this.focusOnView})}});lpTag.unifiedWindow.actions.ForgetMeAction.prototype.clicked=function(){if(this.isEnabled){this.appContext.events.trigger({appName:this.ControllerName,eventName:this.EventName.viewController.SHOW_FORGET_ME});this.appContext.uiStateManager.setVisibility(this.uiPath.TOP_MENU_VISIBLE,!1)}}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};window.lpTag.unifiedWindow.actions=window.lpTag.unifiedWindow.actions||{};!function(){var e,i,t;lpTag.unifiedWindow.actions.MarkUrgencyAction=lpTag.unifiedWindow.ActionViewController.extend({ControllerName:"MarkUrgencyAction",applicationType:"MarkUrgencyAction",titles:{urgent:"MarkUrgentAction"},title:"MarkUrgentAction",isEnabled:!0,onOffHours:!1,disableOnEnd:!0,disableState:[lpTag.unifiedWindow.State.WAITING,lpTag.unifiedWindow.State.CONNECTION_ISSUE],enableState:lpTag.unifiedWindow.State.CHATTING,iconClasses:{urgent:"lp_mark_urgency-action-icon",dismiss:"lp_dismiss_urgency-action-icon"},svgFiles:{enabled:"<svg width='20px' height='20px' aria-hidden='true' viewBox='0 0 20 20' version='1.1' xmlns='http://www.w3.org/2000/svg'><g stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'><path d='M11.9519742,1.40909091 C12.6845503,1.40909091 13.2784205,2.00296114 13.2784205,2.73553719 L13.278,3.853 L17.9950521,3.85323307 C18.6818422,3.85323307 19.2467228,4.37518933 19.3146501,5.04405793 L19.3215896,5.17967936 C19.3215896,5.46102315 19.232042,5.73508031 19.0660573,5.96224417 L16.7290457,8.16063924 C16.645225,8.27535494 16.645225,8.43111121 16.7290457,8.54582691 L19.0660573,11.744222 C19.4982559,12.3357218 19.3691167,13.1655933 18.7776169,13.597792 C18.5504531,13.7637766 18.2763959,13.8532331 17.9950521,13.8532331 L8.10039136,13.8532331 C7.36781531,13.8532331 6.77394508,13.2593628 6.77394508,12.5267868 L6.77394508,11.6178755 C6.77394508,11.5431361 6.79034361,11.4722268 6.81973895,11.4085493 L2.6446281,11.4090909 C2.53178543,11.4090909 2.42223382,11.3950002 2.3176368,11.3684823 L2.31818182,18.9075392 C2.31818182,19.1836815 2.09432419,19.4075392 1.81818182,19.4075392 C1.57272193,19.4075392 1.36857345,19.230664 1.32623749,18.9974148 L1.31818182,18.9075392 L1.31818182,2.73553719 C1.31818182,2.00296114 1.91205205,1.40909091 2.6446281,1.40909091 L11.9519742,1.40909091 Z M13.278,4.853 L13.2784205,10.0826446 C13.2784205,10.5426049 13.0443068,10.9478851 12.6887398,11.1858246 C12.6414345,11.2581487 12.573551,11.3193125 12.4890928,11.3598524 L12.4890928,11.3598524 L9.37618182,12.8530909 L17.9950521,12.8532331 C18.0642925,12.8532331 18.1317396,12.8312173 18.1876459,12.7903675 C18.3332176,12.6840009 18.3649995,12.4797646 18.2586328,12.334193 L15.9216213,9.13579789 C15.5810331,8.6696746 15.5810331,8.03679154 15.9216213,7.57066826 L18.2586328,5.37227319 C18.2994826,5.31636682 18.3215208,5.24891973 18.3215208,5.17967936 C18.3215208,4.99938805 18.1753434,4.85323307 17.9950521,4.85323307 L13.278,4.853 Z M10.0771818,11.4080909 L7.72815121,11.4085493 C7.75754655,11.4722268 7.77394508,11.5431361 7.77394508,11.6178755 L7.77318182,12.5140909 L10.0771818,11.4080909 Z M11.9519742,2.40909091 L2.6446281,2.40909091 C2.4643368,2.40909091 2.31818182,2.55524589 2.31818182,2.73553719 L2.31818182,10.0826446 C2.31818182,10.2629359 2.4643368,10.4090909 2.6446281,10.4090909 L11.9519742,10.4090909 C12.1322655,10.4090909 12.2784205,10.2629359 12.2784205,10.0826446 L12.2784205,2.73553719 C12.2784205,2.55524589 12.1322655,2.40909091 11.9519742,2.40909091 Z' fill='#98999A'></path></g></svg>",disabled:"<svg width='20px' height='20px' aria-hidden='true' viewBox='0 0 20 20' version='1.1' xmlns='http://www.w3.org/2000/svg'><g stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'><path d='M1.81818182,5.2265625 C2.06364171,5.2265625 2.26779019,5.40343766 2.31012615,5.63668687 L2.31818182,5.7265625 L2.31818182,10.0826446 C2.31818182,10.2403995 2.43008172,10.3720188 2.57883779,10.4024587 L2.6446281,10.4090909 L8.2489624,10.4090909 C8.52510478,10.4090909 8.7489624,10.6329485 8.7489624,10.9090909 C8.7489624,11.1545508 8.57208724,11.3586993 8.33883803,11.4010352 L8.2489624,11.4090909 L7.72815121,11.4085493 C7.75754655,11.4722268 7.77394508,11.5431361 7.77394508,11.6178755 L7.77394508,12.5267868 C7.77394508,12.7070781 7.92010006,12.8532331 8.10039136,12.8532331 L10.628418,12.8532331 C10.9045603,12.8532331 11.128418,13.0770907 11.128418,13.3532331 C11.128418,13.6293754 10.9045603,13.8532331 10.628418,13.8532331 L8.10039136,13.8532331 C7.36781531,13.8532331 6.77394508,13.2593628 6.77394508,12.5267868 L6.77394508,11.6178755 C6.77394508,11.5431361 6.79034361,11.4722268 6.81973895,11.4085493 L2.6446281,11.4090909 C2.53178543,11.4090909 2.42223382,11.3950002 2.3176368,11.3684823 L2.31818182,18.9075392 C2.31818182,19.1836815 2.09432419,19.4075392 1.81818182,19.4075392 C1.57272193,19.4075392 1.36857345,19.230664 1.32623749,18.9974148 L1.31818182,18.9075392 L1.31818182,5.7265625 C1.31818182,5.45042013 1.54203944,5.2265625 1.81818182,5.2265625 Z M1,1.29289322 L18.2071068,18.5 L17.5,19.2071068 L0.292893219,2 L1,1.29289322 Z M11.9519742,1.40909091 C12.6387643,1.40909091 13.2036449,1.93104716 13.2715722,2.59991576 L13.2784205,2.73553719 L13.278,3.853 L17.9950521,3.85323307 C18.6818422,3.85323307 19.2467228,4.37518933 19.3146501,5.04405793 L19.3215896,5.17967936 C19.3215896,5.41413252 19.2593759,5.64352552 19.1426124,5.84493783 L19.0660573,5.96224417 L16.7290457,8.16063924 C16.6619891,8.2524118 16.6485778,8.37045032 16.6888117,8.47272927 L16.7290457,8.54582691 L19.0660573,11.744222 C19.4982559,12.3357218 19.3691167,13.1655933 18.7776169,13.597792 C18.5883137,13.7361125 18.3664457,13.8212885 18.1349334,13.8458382 L17.9950521,13.8532331 L14.6396484,13.8532331 C14.3635061,13.8532331 14.1396484,13.6293754 14.1396484,13.3532331 C14.1396484,13.1077732 14.3165236,12.9036247 14.5497728,12.8612887 L14.6396484,12.8532331 L17.9950521,12.8532331 C18.0642925,12.8532331 18.1317396,12.8312173 18.1876459,12.7903675 C18.3124216,12.6991961 18.3535967,12.5361205 18.2958315,12.3997161 L18.2586328,12.334193 L15.9216213,9.13579789 C15.6094154,8.70851821 15.5833983,8.141114 15.8435698,7.69048024 L15.9216213,7.57066826 L18.2586328,5.37227319 C18.2994826,5.31636682 18.3214984,5.24891973 18.3214984,5.17967936 C18.3214984,5.02192447 18.2095985,4.8903052 18.0608424,4.8598653 L17.9950521,4.85323307 L13.278,4.853 L13.2784205,10.0826446 C13.2784205,10.7133897 12.8350728,11.2530478 12.2248172,11.3808976 C11.9545424,11.4375207 11.6895394,11.2643218 11.6329163,10.9940471 C11.5762932,10.7237723 11.7494921,10.4587693 12.0197668,10.4021462 C12.1442037,10.3760764 12.2408664,10.2793151 12.2696307,10.1580064 L12.2784205,10.0826446 L12.2784205,2.73553719 C12.2784205,2.5777823 12.1665206,2.44616303 12.0177645,2.41572314 L11.9519742,2.40909091 L3.6446281,2.40909091 C3.36848572,2.40909091 3.1446281,2.18523328 3.1446281,1.90909091 C3.1446281,1.66363102 3.32150326,1.45948254 3.55475247,1.41714658 L3.6446281,1.40909091 L11.9519742,1.40909091 Z' fill='#98999A' fill-rule='nonzero'></path></g></svg>"},initialize:function(){t=!(i=!1)},events:function(){this.bindModel({path:this.chatPath.TTR,callback:this.urgencyStateChanged,context:this});this.bindModel({path:this.chatPath.CURRENT_DIALOG_TYPE,callback:this.dialogTypeUpdated,context:this})},render:function(){this.setIconClass();this.setTitle(this.title.urgent);this.overrideTitleWithAriaAttributes();this.setButtonAttributes();this.featureStateManager.isMenuTop()?this.toggleSvg(i):this.setIconClass()}});(e=lpTag.unifiedWindow.actions.MarkUrgencyAction.prototype).enable=function(){if(!this.isEnabled&&function(){return!!(this.getModelParam(this.chatPath.TTR)||{}).markUrgencyEnabled}.call(this)&&t){this.isEnabled=!0;this.setActionState(this.isEnabled,this.iconEnabled)}};e.urgencyStateChanged=function(e){i=e.newValue.isUrgent;e.newValue.markUrgencyEnabled?this.enable():this.disable();this.render()};e.setIconClass=function(){this.removeClass(this.icon,i?this.iconClasses.urgent:this.iconClasses.dismiss);this.addClass(this.icon,i?this.iconClasses.dismiss:this.iconClasses.urgent)};e.clicked=function(){if(this.isEnabled){i=!i;this.render();this.appContext.conversationManager.setConversationUrgency(i)}};e.dialogTypeUpdated=function(e){if(e.newValue===lpTag.AMSStatics.dialog.types.MAIN){t=!0;this.enable()}else{t=!1;this.disable()}this.render()};e.setButtonAttributes=function(){if(this.view&&this.view.firstElementChild&&"button"===this.view.firstElementChild.tagName.toLowerCase()){this.view.firstElementChild.setAttribute("aria-live","polite");this.view.firstElementChild.setAttribute("aria-relevant","text");this.view.firstElementChild.setAttribute("role","switch");this.view.firstElementChild.setAttribute("aria-checked",String(!i))}};e.overrideTitleWithAriaAttributes=function(){var e=this.featureStateManager.isMenuTop()?"LP_MarkUrgencyAction_2":"LP_MarkUrgencyAction_1",e=document.querySelector("#"+e+" > button span.lp_title"),t=i?this.translate("on"):this.translate("off");e&&(e.innerHTML=this.translate(this.titles.urgent)+": <span aria-hidden='true'>"+t+"</span>")}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};window.lpTag.unifiedWindow.actions=window.lpTag.unifiedWindow.actions||{};!function(){var e,n,a=".png, .jpg, .gif, .pdf, .docx, .xlsx, .pptx";lpTag.unifiedWindow.actions.PhotoSharingAction=lpTag.unifiedWindow.ActionViewController.extend({ControllerName:"PhotoSharingAction",applicationType:"PhotoSharingAction",iconClass:"lp_add-attachment-action-icon",title:"AddAttachmentAction",isEnabled:!0,disableOnEnd:!0,enableOnStart:!0,enableState:lpTag.unifiedWindow.State.CHATTING,initialize:function(e){e=e&&e.appContext;e&&e.conf&&e.conf.unifiedConf.areExtendedFileFormatsEnabled&&(a+=", .txt, .csv")},events:function(){},render:function(){!function(){var e=this.appContext&&this.appContext.conf&&this.appContext.conf.unifiedConf,e=e&&e.enableStrictCspMode,t=(this.setIconURL(this.appContext.conf.unifiedConf.imagesRepository+"/Icon_attach.png"),document.createElement("li"));t.className=this.wrapper.className;t.innerHTML=e?this.wrapper.innerHTML.replace(/style=".+?"/g,""):this.wrapper.innerHTML;this.view.parentNode.replaceChild(t,this.view);this.view=t;var i=document.createElement("input");i.id="LPfileUpload_"+Date.now();i.type="file";i.setAttribute("accept",a);i.setAttribute("class","lp_action_file_input");i.onchange=function(){if(0<this.fileUploader.files.length){n=this.fileUploader.files[0];this.fileUploader.value="";if(n){this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.IMAGE_SELECTED,data:{image:n}});n=null}}}.bind(this);i.style.display="none";this.view.appendChild(i);this.fileUploader=i;t.addEventListener("click",function(){i.click()})}.call(this)}});(e=lpTag.unifiedWindow.actions.PhotoSharingAction.prototype).disable=function(){if(this.isEnabled){this.isEnabled=!1;this.disableAction();this.fileUploader.setAttribute("disabled","disabled")}};e.enable=function(){if(!this.isEnabled){this.isEnabled=!0;this.enableAction();this.fileUploader.removeAttribute("disabled")}}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e,i,n,a,o;lpTag.unifiedWindow.ActionsManagerViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"ActionsManagerViewController",template:"<div class='lp_action_placeholder_wrapper' data-lp-point='action_placeholder_wrapper'></div><ul class='lp_action_items_wrapper' data-lp-point='action_items_wrapper' data-lp-cust-id='action_items_wrapper'></ul>",LPViewMap:{actionsBar:"^actions_bar",actionItemsWrapper:"^action_items_wrapper",actionPlaceholderWrapper:"^action_placeholder_wrapper",actionWrapper:"^action_placeholder"},initialize:function(e){i=this.appContext.conf.unifiedConf;n=this.appContext.conf.engConf;a=this.appContext.deviceDetector;o=this.appContext.featureStateManager;this.actions=[];this.models=e.models},events:function(){},render:function(){var t=this;this.loadResource("<div class='lp_action_placeholder' data-lp-cust-id='actionsMenu_actionItem'></div>",function(e){t.actionsResourceLoaded(e);t.customize(t.view);t.handleWindowLocation(t.view)})}});(e=lpTag.unifiedWindow.ActionsManagerViewController.prototype).addAction=function(e){this.actions.push({action:e});this.getFirstElement(this.LPViewMap.actionItemsWrapper,this.view).appendChild(e.view);o.isMenuTop()&&a.isIE()&&this.css(e.view,{"-ms-grid-row":this.actions.length});"EndChatAction"===e.ControllerName&&o.isMenuTop()&&this.addClass(e.view,"lp_top_close_action")};e.actionsResourceLoaded=function(e){this.addActionsMenuWrappers(e);this.addActions()};e.addActionsMenuWrappers=function(e){for(var t=0;t<6;t++)this.createView({template:e,target:this.LPViewMap.actionPlaceholderWrapper,wrapWithDiv:!1,textInjection:i})};e.addActions=function(){var e=lpTag.unifiedWindow.actions,t=this.appContext.conf.windowConf,i=this.getActionViewData();n.async&&t.sendImage&&!o.isMenuTop()&&this.addAction(new e.PhotoSharingAction(i));t&&(!1===t.email||n.async)||this.addAction(new e.EmailTranscriptAction(i));t&&!1===t.print||!a.isDesktop()||this.addAction(new e.PrintTranscriptAction(i));t&&!1===t.sound||!a.isDesktop()||this.addAction(new e.MuteSoundAction(i));if(n.async){!1!==t.markAsUrgent&&this.addAction(new e.MarkUrgencyAction(i));!0===n.allowUnauthMsg&&t.clearHistory&&this.addAction(new e.ForgetMeAction(i))}this.addAction(new e.EndChatAction(i))};e.handleWindowLocation=function(){o.isMenuTop()&&this.addClass("^action_items_wrapper","lp_action_items_wrapper_top")};e.getActionViewData=function(){return{engConf:n,wrapWithDiv:!1,appContext:this.appContext,models:this.models,unifiedConf:i,textInjection:i}}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){lpTag.unifiedWindow.ActionsBarViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"ActionsBarViewController",templateFile:"<div class='lp_actions_bar_container lpc_menu {{deviceClass}}' data-lp-point='actions_bar_container' data-lp-cust-id='actionsMenu'><div class='lp_actions_bar' data-lp-point='actions_bar'></div><div class='lp_bottom_logo_bar lpc_menu__banner {{deviceClass}} {{logoClass}}' data-lp-point='bottom_logo'><span data-lp-type='icon' class='lp_bottom-logo-icon'><img src='{{imagesRepository}}/LP-logo-bottom.png' data-lp-cust-id='bottomLogo' alt='LivePerson'></span></div></div>",LPViewMap:{actionsBarContainer:"^actions_bar_container",bottomLogo:"^bottom_logo",MENU:"^actions_bar",EMOJI:"^emoji_bar",MENU_TOP:"^top_menu"},ActionType:{EMOJI:"EMOJI",MENU:"MENU",MENU_TOP:"MENU_TOP"},preInitView:function(e){e.textInjection.logoClass=e.textInjection.hide_lp_logo?"lpHide":""},initialize:function(e){this.appContext.conf.unifiedConf;this.appContext.conf.engConf;this.appContext.deviceDetector;this.actions=[];this.featureStateManager=e.appContext.featureStateManager;this.models=e.models;this.isLogoEnabled=!e.textInjection.hide_lp_logo;this.emojiEnabled=this.featureStateManager.emojiEnabled();this.activeMenu=null;this.actionsVC=new lpTag.unifiedWindow.ActionsManagerViewController({models:this.models,appContext:this.appContext,textInjection:this.appContext.conf.unifiedConf});this.addViewController({viewController:this.actionsVC,target:this.LPViewMap.MENU});this.hide(this.getFirstElement(this.LPViewMap[this.ActionType.MENU]))},events:function(){this.bindModel({path:this.uiPath.ACTIONS_VISIBLE,callback:function(e,t){var t=t.newValue,i=this.getFirstElement(this.LPViewMap[e]);if(t){this.activeMenu=e;this.show(i)}else this.hide(i);!function(e){var t=this.getFirstElement(this.LPViewMap.bottomLogo);this.isLogoEnabled&&e!==this.ActionType.EMOJI||this.activeMenu===this.ActionType.MENU?this.show(t):this.hide(t)}.call(this,e)}.bind(this,this.ActionType.MENU)})}});var e=lpTag.unifiedWindow.ActionsBarViewController.prototype;e.getActiveMenu=function(){return this.activeMenu};e.hideActionBar=function(){this.emojiEnabled&&this.appContext.uiStateManager.setVisibility(this.uiPath.EMOJI_VISIBLE,!1);this.appContext.uiStateManager.setVisibility(this.uiPath.ACTIONS_VISIBLE,!1)}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){lpTag.unifiedWindow.EmojiBarViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"EmojiBarViewController",templateFile:"<div class='lp_emoji_bar_container lpc_menu {{deviceClass}}' data-lp-point='emoji_bar_container' data-lp-cust-id='emojiMenu'><div class='lp_emoji_bar' data-lp-point='emoji_bar'></div></div>",LPViewMap:{EMOJI:"^emoji_bar"},ActionType:{EMOJI:"EMOJI"},initialize:function(e){this.appContext.conf.unifiedConf;this.appContext.conf.engConf;this.featureStateManager=e.appContext.featureStateManager;this.models=e.models;this.emojiEnabled=this.featureStateManager.emojiEnabled();this.activeMenu=null;if(this.emojiEnabled){this.emojiVC=new lpTag.unifiedWindow.EmojiManagerViewController({textareaDomEl:e.textareaDomEl,models:this.models,appContext:this.appContext,textInjection:this.appContext.conf.unifiedConf});this.addViewController({viewController:this.emojiVC,target:this.LPViewMap.EMOJI});this.hide(this.getFirstElement(this.LPViewMap[this.ActionType.EMOJI]))}},events:function(){this.bindModel({path:this.uiPath.EMOJI_VISIBLE,callback:function(e,t){this.appContext.uiStateManager.setVisibility(this.uiPath.ACTIONS_VISIBLE,!1);e=this.getFirstElement(this.LPViewMap[e]);this.show(e)}.bind(this,this.ActionType.EMOJI)})}});var e=lpTag.unifiedWindow.EmojiBarViewController.prototype;e.getActiveMenu=function(){return this.activeMenu};e.hideEmojiBar=function(){this.emojiEnabled&&this.appContext.uiStateManager.setVisibility(this.uiPath.EMOJI_VISIBLE,!1)}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){lpTag.unifiedWindow.EmojiManagerViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"EmojiManagerViewController",templateFile:"<div class='lp_emoji_table lp_disable_select'><div class='lp_emoji_table_body'><ul><li><button>😀</button></li><li><button>😁</button></li><li><button>😉</button></li><li><button>😜</button></li><li><button>😕</button></li><li><button>😠</button></li><li><button>😬</button></li><li><button>👍</button></li><li><button>👎</button></li><li><button>😎</button></li><li><button>😂</button></li><li><button>😃</button></li><li><button>😊</button></li><li><button>😋</button></li><li><button>😌</button></li><li><button>😴</button></li><li><button>😫</button></li><li><button>😥</button></li><li><button>😳</button></li><li><button>😏</button></li><li><button>😟</button></li><li><button>😡</button></li><li><button>😱</button></li><li><button>😩</button></li><li><button>😔</button></li><li><button>👏</button></li><li><button>👌</button></li><li><button>🙏</button></li></ul></div></div>",LPViewMap:{button:"^emoji_clicker",emojiTable:"lp_emoji_table"},initialize:function(e){this.textareaDomEl=e.textareaDomEl;this.appContext=e.appContext},events:function(){},render:function(){for(var e=this.getElements("li",this.view),t=0;t<e.length;t++)i.call(this,e[t])}});function i(e){var t=this;e.addEventListener("click",function(e){n.call(t,e)})}function n(e){e=e.target&&e.target.innerText;e&&!function(e){if(e=this.textareaDomEl.value+e){this.textareaDomEl.value=e;!function(){this.appContext.events.trigger({appName:"*",eventName:"sendButton",data:{enabled:!0}})}.call(this);!function(){this.appContext.events.trigger({appName:"*",eventName:"emojiFocus"})}.call(this)}}.call(this,e)}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e,d,t,a,i,n,o,s=!1;lpTag.unifiedWindow.TranscriptViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"TranscriptViewController",applicationType:"TranscriptViewController",template:"<div class='lp_lpview_widgetContent transcript_scroll lpc_layout lpc_layout_maximized {{deviceClass}}' data-lp-cust-id='transcriptArea'><div class='a11y-hidden' data-lp-point='a11y_queue_area'></div><div class='a11y-hidden' data-lp-point='a11y_live_area'></div><div class='a11y-hidden' data-lp-point='a11y_messages_live_area'></div><span id='opens-in-a-new-window' class='sr-only sr-text-for-link lpHide'>opens in a new window</span><div class='lpc_banner-image-area lpc_banner-image-area_maximized {{deviceClass}}' data-lp-point='logo_area'></div><div class='lpc_hero-image-area lpc_hero-image-area_maximized {{deviceClass}}' data-lp-point='agent_image_area'></div><div class='lpc_history-button lpc_history-button_maximized {{deviceClass}}' data-lp-point='history_button_area'></div><div class='lpc_history-spinner lpc_history-spinner_maximized {{deviceClass}}' data-lp-point='rotator_area'></div><div class='lp_transcript_divider lpc_transcript-divider lpc_transcript-divider_maximized {{deviceClass}}' data-lp-point='transcript_divider_area'></div><div class='lpc_transcript_region {{deviceClass}}'><div class='lpc_transcript lpc_transcript_maximized {{deviceClass}}' data-lp-point='lines_area' role='log'></div></div></div>",className:"lp_transcript_widget",scrollToBottomTimeout:300,removeAccessibilityAttrsTimeout:1e3,STATE_CLASS_PREFIX_REGEX:/state_[\w]+/gi,LINE_ID_PREFIX:"lp_line_",LINE_CLASS_PREFIX:"state_",LINE_STATE_TRANSLATE_PREFIX:"messagingState_",DEFAULT_AGENT_IMAGE:"agent1.png",LE_LEGACY_AGENT_URL_PREFIX:"/img/engagementWindow",messageStates:lpTag.unifiedWindow.MessageState,uiPath:lpTag.unifiedWindow.uiModelPath,chatLineErrorState:"<div class='{{wrapperClass}}wrapper'><span id='error_message_{{id}}' class='lp_error_text lp_text' data-lp-point='errorText' role='alert'>{{text}}</span> <span class='lp_warning'>!<span class='lp_voice_error'>{{error}}</span></span></div>",chatLineErrorStateNoIcon:"<div class='{{wrapperClass}}wrapper'><span id='error_message_{{id}}' class='lp_error_text lp_text lp_rtl' data-lp-point='errorText' role='alert'>{{text}}</span></div>",updatePendingStateTimeOut:2e3,scrollOnMaximized:!1,util:lpTag.taglets.lpUtil,LPViewMap:{widgetContent:".lp_lpview_widgetContent",linesArea:"^lines_area",element:".lp_lpview_agent_is_typing",lineState:"^lp_line_state",agentImage:".lp_agent_image_area_wrapper",lineWrapper:".lp_chat_line_wrapper",logoArea:"^logo_area",agentImageArea:"^agent_image_area",historyButtonArea:"^history_button_area",rotatorArea:"^rotator_area",time:".lp_time",dateLine:".lp_chat_line_date_message",a11yHidden:"^a11y_live_area",a11yQueueArea:"^a11y_queue_area",a11yMessagesHidden:"^a11y_messages_live_area"},LPClassMap:{transcriptError:"lp_TranscriptError_"},ScrollChatWindowOnMaximizeOptions:{toBottom:"toBottom",toLastPosition:"toLastPosition"},DateLineState:{},initialize:function(e){this.appContext=e.appContext;this.models=e.models;this.imagesRepository=this.appContext.conf.unifiedConf.imagesRepository;this.errorIconURL=this.imagesRepository+"/error-15x15.png";this.isAsync=this.appContext.conf.engConf.async;this.browserStateManager=this.appContext.browserStateManager;this.windowConf=this.appContext.conf.windowConf;this.addAgentImage=!1!==this.windowConf.agentImage;this.addLogo=this.windowConf&&!this.windowConf.logoPinToTop;this.addRotator=this.isAsync;this.lineStateSupported=e.appContext.conf.engConf.async;this.lastLineViewedOnMinimize={};this.featureStateManager=this.appContext.featureStateManager;this.isLineGroupingEnabled=this.featureStateManager.isLineGroupingEnabled();this.isHistoryLazyLoadEnabled=this.featureStateManager.isHistoryLazyLoadEnabled();this.lastConvId=null;this.createLineTypeFactories();this.lastLine=null;this.lastLineHistory=null;this.groupingTime=null;this.groupingTimeHistory=null;this.lastFirstDateLine=null;this.accessibilityMessages=[];this.isPendingLineSet=!1;this.linesEl=this.getFirstElement(this.LPViewMap.linesArea);this.a11yQueue=this.getFirstElement(this.LPViewMap.a11yQueueArea);this.hide();this.appContext.conf.unifiedConf.isTranscriptStaticMessageFocusEnabled&&(t=function(e){var t,i=Array.prototype.indexOf.call(this.linesEl.children,e.target),n=e.target.classList.contains("chips-item")?e.target.parentNode.parentNode.parentNode:e.target;if(-1!==i||n!=e.target){if((37===e.keyCode||38===e.keyCode)&&n.previousElementSibling){this.setTabindexToEdgeLine("last");if(n.previousElementSibling.classList.contains("chips-wrapper")){(t=n.previousElementSibling.querySelector(".chips-item")).setAttribute("tabindex","0");t.focus()}else{n.previousElementSibling.setAttribute("tabindex","0");n.previousElementSibling.focus()}a=this.linesEl.children.length-i+1}if((39===e.keyCode||40===e.keyCode)&&n.nextElementSibling){this.setTabindexToEdgeLine("last");if(n.nextElementSibling.classList.contains("chips-wrapper")){(t=n.nextElementSibling.querySelector(".chips-item")).setAttribute("tabindex","0");t.focus()}else{n.nextElementSibling.setAttribute("tabindex","0");n.nextElementSibling.focus()}a=this.linesEl.children.length-i}if(36===e.keyCode){a=this.linesEl.children.length;this.setTabindexToEdgeLine("first",!0)}35===e.keyCode&&this.setTabindexToEdgeLine("last",!0);9===e.keyCode&&n==e.target&&this.setTabindexToEdgeLine("last",!0)}}.bind(this))},events:function(){this.appContext.deviceDetector.isDesktop()?this.preventScroll({view:this.view.parentNode}):this.appContext.deviceDetector.isIOS()&&this.limitScroll({view:this.view.parentNode});this.isAsync&&this.appContext.events.bind({appName:"*",eventName:lpTag.unifiedWindow.events.chat.CONVERSATION_CLOSED,func:function(){I.call(this)}.bind(this)});this.bindModel({path:this.chatPath.LINES,callback:function(e){var t,i=e.newValue;this.firstLineView=this.getFirstElement(this.LPViewMap.lineWrapper,this.view);if(i&&0<i.length){var n=function(){return lpTag.unifiedWindow.State.CHATTING===this.getModelParam(this.uiPath.STATE)}.call(this),a=function(e){return(e||this.models.chatModel.get(this.chatPath.LINES)||[]).filter(function(e){return!(function(e){return e.type===this.appConsts.chatEvents.INFO||"system"===e.source}.call(this,e)&&"conversationResolved"!==e.subType||function(e){return"REGULAR"===e.subType&&""===e.text&&"line"===e.type&&"plain"===e.textType}.call(this,e))}.bind(this)).pop()}.call(this,i);a&&"agent"!=a.source&&(a.text=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(a.text).cleanText);if(i[0].isWelcomeMessage&&!i[0].addedFromMD){i[0].text=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(i[0].text).cleanText;if(1<i.length){e=i.shift();i.push(e)}}var e=null,o=null,s=!1;if(this.view&&this.isDOMNode(this.view)&&this.view.parentNode&&this.isDOMNode(this.view.parentNode)&&this.getWidgetContent()){e=this.view.parentNode.scrollTop;o=this.getWidgetContent().scrollHeight-this.view.parentNode.clientHeight;!function(){if(this.view&&this.isDOMNode(this.view)&&this.view.parentNode&&this.isDOMNode(this.view.parentNode))return this.view.parentNode.scrollHeight-this.view.parentNode.scrollTop===this.view.parentNode.clientHeight;return null}.call(this)||(s=!0)}for(var r=0;r<i.length;r++)if((t=i[r]).update)C.call(this,t,i[r-1]);else{g.call(this);this.isLineGroupingEnabled&&w.call(this,t);_.call(this,t);m.call(this,t);if(v.call(this,t)||n&&!t.history&&a&&t.localId===a.localId){I.call(this);S.call(this,t)}this.lastLine=t;this.lastLineHistory=t.history?t:this.lastLineHistory}if(this.view&&this.isDOMNode(this.view)&&this.view.parentNode&&this.isDOMNode(this.view.parentNode)&&this.getWidgetContent()){var l=null;if(s)l=this.getWidgetContent().scrollHeight;else if(0===e&&this.isHistoryLazyLoadEnabled)l=0;else if(0<=e&&o){s=this.getWidgetContent().scrollHeight-this.view.parentNode.clientHeight;l=e+(s-o)}l&&(this.view.parentNode.scrollTop=l)}n&&a&&!a.history&&"visitor"===a.source&&!a.update&&I.call(this);if(!this.isHistoryLazyLoadEnabled)if(this.historyRequested){d&&clearTimeout(d);this.appContext.events.trigger({appName:"tooltip",eventName:"close"});this.historyRequested=!1}else!this.allHistoryLoaded&&this.view.getBoundingClientRect().height<=this.view.parentNode.getBoundingClientRect().height&&this.triggerLoadFromHistory(!0)}}.bind(this)});this.browserStateManager.on(this.browserStateManager.EVENT_NAME.ORIENTATION_CHANGE,f,this);this.appContext.events.bind({appName:"*",eventName:this.VCEvents.MAXIMIZE_VISIBLE,context:this,func:A});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.MINIMIZE_VISIBLE,context:this,func:M});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.LINES_VIEWED,context:this,func:L});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.UPDATE_TIME_STAMP,context:this,func:T});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.SCROLL_CONVERSATION_TO_BOTTOM,context:this,func:this._fastScrollToBottom});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.UPDATE_ACCESSIBILITY_MESSAGE,context:this,func:E});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.RICH_CONTENT,eventName:this.EventName.richContent.UPDATE_RICH_CONTENT_LINE,context:this,func:c});this.appContext.events.bind({appName:"*",eventName:"pendingLineSet",context:this,func:N});this.appContext.events.bind({appName:"*",eventName:"focusLastLine",context:this,func:P});this.isAsync&&this.browserStateManager.on(this.browserStateManager.EVENT_NAME.FOCUS_CHANGE,f,this);if(!this.isHistoryLazyLoadEnabled&&!this.view.parentNode.scrollerAdded){this.scrollListener=this._scrollListenerToLoadHistory.bind(this);this.view.parentNode.addEventListener("scroll",this.scrollListener,!1);this.appContext.events.bind({appName:"*",eventName:this.VCEvents.END_OF_HISTORY,context:this,func:D});this.bindModel({path:this.chatPath.LINES,callback:r});this.view.parentNode.scrollerAdded=!0}this.appContext.conf.unifiedConf.isTranscriptStaticMessageFocusEnabled&&this.view.addEventListener("keyup",t,!1)},render:function(){!function(){if(this.addLogo){this.logoVC=new lpTag.unifiedWindow.LogoViewController({appContext:this.appContext,context:this});this.addViewController({viewController:this.logoVC,target:this.LPViewMap.logoArea})}}.call(this);!function(e,t){if(this.addAgentImage&&!this.appContext.conf.unifiedConf.connectorsSfConfig){void 0===e&&(t=this.DEFAULT_AGENT_IMAGE);this.createView({template:"<div class='lp_agent_image_area_wrapper lpc_hero-image-area__image-wrapper lpc_hero-image-area__image-wrapper_maximized {{deviceClass}}' data-lp-cust-id='agent'><img class='lp_image lpc_hero-image-area__image lpc_hero-image-area__image_maximized {{deviceClass}}' src='{{url}}' alt='' data-lp-cust-id='agentImage' aria-hidden='true'></div>",wrapWithDiv:!1,textInjection:{url:function(e){var t=this.appContext.conf.unifiedConf;return-1<e.indexOf(this.LE_LEGACY_AGENT_URL_PREFIX)?t.agentImageRepository+"/"+e.replace(/^.*[\\\/]/,""):null!==e.match(/^http[s]*/)?e:t.agentImageRepository+"/"+e}.call(this,t)},target:this.getFirstElement(this.LPViewMap.agentImageArea),context:this})}}.call(this,this.windowConf.agentImage,this.windowConf.agentUrl);!function(){if(this.isHistoryLazyLoadEnabled){this.historyButton=new lpTag.unifiedWindow.HistoryButtonViewController({models:this.models,appContext:this.appContext,context:this});this.addViewController({viewController:this.historyButton,target:this.LPViewMap.historyButtonArea})}}.call(this);!function(){if(this.addRotator){this.rotator=new lpTag.unifiedWindow.RotatorViewController({models:this.models,appContext:this.appContext,context:this});this.addViewController({viewController:this.rotator,target:this.LPViewMap.rotatorArea})}}.call(this)}});(e=lpTag.unifiedWindow.TranscriptViewController.prototype).createLineTypeFactories=function(){this.chatLineFactory=new lpTag.unifiedWindow.ChatLineViewController({models:this.models,appContext:this.appContext,wrapWithDiv:!1});this.autoMessageFactory=new lpTag.unifiedWindow.AutoMessageViewController({models:this.models,appContext:this.appContext,wrapWithDiv:!1});this.secureFormLineFactory=new lpTag.unifiedWindow.SecureFormLineViewController({models:this.models,appContext:this.appContext,wrapWithDiv:!1});this.richContentFactory=new lpTag.unifiedWindow.RichContentViewController({models:this.models,appContext:this.appContext,wrapWithDiv:!1});this.quickRepliesDecorator=new lpTag.unifiedWindow.QuickRepliesDecorator({appContext:this.appContext});this.fileContentFactory=new lpTag.unifiedWindow.FileSharingViewController({models:this.models,appContext:this.appContext,wrapWithDiv:!1});this.dateLineFactory=new lpTag.unifiedWindow.DateLineViewController({models:this.models,appContext:this.appContext,wrapWithDiv:!1});this.mavenPayLineFactory=new lpTag.unifiedWindow.MavenPayLineViewController({models:this.models,appContext:this.appContext,wrapWithDiv:!1})};e.addEvent=function(e,t,i){if(i.template){var n=document.createElement("div");n.innerHTML=i.template;i.view=n}n=i.line.isWelcomeMessage&&"agent"===i.line.source;!function(e){if(e){var t=this.browserStateManager&&this.browserStateManager.isHidden(),i=this.models&&this.models.uiModel&&this.models.uiModel.get(this.uiPath.LAST_LINE_VIEWED);if(!t&&i&&e["@id"]>i["@id"]&&e.convId===i.convId&&"visitor"!==e.source&&!e.update&&!e.history)return!0}return!1}.call(this,i.line)&&!n||n&&i.line.quickReplies&&!this.appContext.deviceDetector.isMacOS()&&!this.appContext.deviceDetector.isIOS()||p.call(this,i);this.getModelParam(this.uiPath.WINDOW_MAXIMIZED)||this.accessibilityMessages.push(i);n=document.createDocumentFragment();n.appendChild(i.view);i.replace&&i.targetToReplace?u.call(this,n,i.targetToReplace):function(e,t){var i=this.getWidgetContent(),i=this.getFirstElement(this.LPViewMap.linesArea,i);t&&this.firstLineView?i.insertBefore(e,this.firstLineView):i.appendChild(e)}.call(this,n,e);e||setTimeout(function(){h.call(this)}.bind(this));this.timeStampGroupingEnabled&&!function(e){var t=this.getFirstElement(this.LPViewMap.dateLine,this.view),e=this.getFirstElement(this.LPViewMap.dateLine,e),i=this.getWidgetContent(),i=this.getFirstElement(this.LPViewMap.linesArea,i).firstElementChild,n=e?e.parentElement:null,a=t?t.parentElement:null,n=this.util.getPropertyFromObject(n,"previousElementSibling.classList",!1);n&&n.contains("lp_chat_line_wrapper_auto")&&(e.style.paddingTop="3px");if(a&&i&&a===i){t.style.paddingTop="3px";if(this.lastFirstDateLine!==a){this.lastFirstDateLine&&(this.lastFirstDateLine.style.paddingTop="");this.lastFirstDateLine=a}}}.call(this,i.view);e?this.keepPreviousFocus():this.setTabindexToEdgeLine("last")};e.keepPreviousFocus=function(){var e=this.linesEl.children;if(0<=a){e[e.length-a].setAttribute("tabindex",0);e[e.length-a].focus()}};e.setTabindexToEdgeLine=function(e,t){for(var i,n=this.linesEl.children,a=0;a<n.length;a++)n[a].removeAttribute("tabindex");if(0<n.length){"first"===e&&(i=0);if(n[i="last"===e?n.length-1:i].classList.contains("chips-wrapper")){e=n[i].querySelector(".chips-item");if(e&&t){e.setAttribute("tabindex",0);e.focus();return}}else this.appContext.conf.unifiedConf.isTranscriptStaticMessageFocusEnabled&&n[i].setAttribute("tabindex",0);t&&n[i].focus()}};e._scrollListenerToLoadHistory=(i=300,n=l,function(){o&&clearTimeout(o);o=setTimeout(function(){n.call(this)}.bind(this),i)});e.triggerLoadFromHistory=function(e){this.appContext.events.trigger({appName:"*",eventName:this.VCEvents.CONVERSATIONS_VIEWED,data:{retry:!1,preventRotator:e}})};function r(e){var t=!1,i=e&&e.newValue;if(i&&0<i.length)for(var n=0;n<i.length&&!t;){if(i[n]&&i[n].history){t=!0;break}n++}if(t){s=!0;this.appContext.conversationManager.areAllConversationsLoaded()&&(s=!1)}}function l(){var e,t=this;if(function(e,t,i){e=e.getBoundingClientRect(),t=t.getBoundingClientRect();return Math.abs(e.top-t.top)<=i}(this.view,this.view.parentNode,50)&&s&&!this.isHistoryLazyLoadEnabled&&!function(){return lpTag.unifiedWindow.State.ERROR===this.getModelParam(this.uiPath.STATE)}.call(this)&&!this.historyRequested&&!this.appContext.conversationManager.areAllConversationsLoaded()){this.appContext.dontParseWelcomeMessageFromMetaData=!1;e=this.appContext.conf&&this.appContext.conf.unifiedConf&&this.appContext.conf.unifiedConf.loadingHistoryLabel;this.historyRequested=!0;this.triggerLoadFromHistory(!0);if(this.allHistoryLoaded)this.appContext.dontParseWelcomeMessageFromMetaData=!0;else{d=setTimeout(function(){t.appContext.events.trigger({appName:"tooltip",eventName:"close"});t.historyRequested=!1;l.call(t)},3e3);this.appContext.events.trigger({appName:"tooltip",eventName:"show",data:{text:e||this.translate("transcriptHistoryLazyLoadingLabel"),type:"process"}})}}}function c(e){e={line:e.line,targetToReplace:e.view,callback:this.addEvent.bind(this,e.line.history,e.line.track),context:this,replace:!0};this.chatLineFactory.createLine(e)}function u(e,t){var i=this.getWidgetContent(),i=this.getFirstElement(this.LPViewMap.linesArea,i);e&&this.isDOMNode(t)&&this.isDOMNode(i)&&i.replaceChild(e,t)}function p(e){e=e.view.cloneNode(!0);e.setAttribute("aria-live","polite");this.a11yQueue.appendChild(e);e.id+="_a11y_queue";setTimeout(function(e){e&&this.a11yQueue&&this.a11yQueue.removeChild(e)}.bind(this,e),this.removeAccessibilityAttrsTimeout)}e.getWidgetContent=function(){this.widgetContent||(this.widgetContent=this.getFirstElement(this.LPViewMap.widgetContent));return this.widgetContent};e.scrollToBottom=h;e._fastScrollToBottom=function(){this.scrollToBottom(0)};function h(e,t){var i=this,e="number"==typeof e?e:this.scrollToBottomTimeout;setTimeout(function(){if(i.view&&i.view.parentNode){i.view.parentNode.scrollTop=i.getWidgetContent().scrollHeight;t&&"function"==typeof t&&t.call(i)}},e);f.call(this)}function f(){this.appContext&&this.appContext.events&&this.appContext.events.trigger({appName:"*",eventName:this.VCEvents.LINES_VIEWED})}function g(){this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.RICH_CONTENT,eventName:this.EventName.richContent.DISABLE_RICH_CONTENT})}function m(e){(function(e){if(!e.history&&this.windowConf.welcomeMessage&&this.windowConf.welcomeMessage.quickRepliesState&&this.windowConf.welcomeMessage.quickRepliesState.isRequired&&this.windowConf.welcomeMessage.quickRepliesState.isRenedered&&!this.windowConf.welcomeMessage.quickRepliesState.isRemoved)return this.windowConf.welcomeMessage.quickRepliesState.isRemoved=!0;return!1}).call(this,e)&&I.call(this)}function v(e){if(e.isWelcomeMessage&&this.windowConf.welcomeMessage&&this.windowConf.welcomeMessage.quickRepliesState&&this.windowConf.welcomeMessage.quickRepliesState.isRequired&&!this.windowConf.welcomeMessage.quickRepliesState.isRenedered&&!e.addedFromMD)return this.windowConf.welcomeMessage.quickRepliesState.isRenedered=!0,!(this.windowConf.welcomeMessage.quickRepliesState.isRemoved=!1);return!1}function w(e){var t=this.appContext.featureStateManager.getBubbleStyles(),i=e.history?this.lastLineHistory:this.lastLine,n=e.history?this.groupingTimeHistory:this.groupingTime,a=this.timeStampManager.getEpochTime(e.time);if("visitor"===e.source||"agent"===e.source||"system"===e.source)if(i&&e.source===i.source&&(!!n&&a-n<3e5&&0<a-n))"system"==e.source&&!e.text||(e.grouped="end");else{if(e.history){this.lastLineHistory=null;this.groupingTimeHistory=a}else{this.lastLine=null;this.groupingTime=a}i=null;e.grouped="start"}!i||"visitor"!==i.source&&"agent"!==i.source&&"system"!==i.source||"end"!==e.grouped||"start"===i.grouped&&"default"!==t[i.source]?i&&"start"===i.grouped?b.call(this,i,{dispose:!0,nextLine:e}):i&&b.call(this,i,{dispose:!0}):b.call(this,i,{grouped:"body",nextLine:e})}function _(e){if(e.state===this.messageStates.PENDING&&this.isAsync){delete e.state;setTimeout(function(e){for(var t,i=this.models&&this.models.chatModel?this.models.chatModel.get(this.chatPath.LINES):[],n=0;n<i.length;n++)if(i[n].localId===e){t=i[n];break}t&&t.state===this.messageStates.PENDING&&C.call(this,t)}.bind(this,e.localId),this.updatePendingStateTimeOut)}!function(e){var t={line:e,callback:this.addEvent.bind(this,e.history,e.track),context:this};if(this.timeStampGroupingEnabled){var i=this.timeStampManager.getDayId(t.line.time),n=this.getFirstElement("#lp_date_line_"+i,this.view),a=this.getWidgetContent(),a=this.getFirstElement(this.LPViewMap.linesArea,a),o=n?n.parentElement:null,s=this.timeStampManager.getEpochTime(e.time);if(n){if(s&&s<this.DateLineState[i]){this.firstLineView===o&&(this.firstLineView=this.firstLineView.nextElementSibling);a.removeChild(o);this.DateLineState[i]=s;y.call(this,t,i)}}else{this.DateLineState[i]=s;y.call(this,t,i)}}if(function(e){if(e.line&&e.line.metadata)return 0<e.line.metadata.filter(function(e){return e.type&&("PaymentRequest"===e.type||"PaymentResponse"===e.type)}).length;return}(t))this.mavenPayLineFactory.createMavenPayLine(t);else if(e.textType===this.appConsts.RichContent.RICH_CONTENT_LINE)this.richContentFactory.createRichContentLine(t);else switch(e.type){case this.appConsts.chatEvents.SECURE_FORM:this.secureFormLineFactory.createSecureFormLine(t);break;case this.appConsts.chatEvents.INFO:this.autoMessageFactory.createAutoMessage(t);break;case this.appConsts.chatEvents.RICH_CONTENT:this.richContentFactory.createRichContentLine(t);break;case this.appConsts.chatEvents.FILE_SHARING:this.fileContentFactory.createFileContentLine(t);break;default:this.chatLineFactory.createLine(t)}}.call(this,e)}function C(e){this.isAsync&&"visitor"===e.source&&!function(e){var t=this.appContext.conf.windowConf.readNotificationsType||this.LPReadNotificationsTypes.text.value;if(!isNaN(e.localId)){var i=this.getFirstElement("#"+this.LINE_ID_PREFIX+e.localId,this.view),n=i.className.match(this.STATE_CLASS_PREFIX_REGEX),a=this.LINE_CLASS_PREFIX+e.state;n&&this.removeClass(i,n[0]);e.state===this.messageStates.ERROR&&this.LPReadNotificationsTypes.visual.value===t?this.addClass(i,a+"_"+this.LPReadNotificationsTypes.visual.value):this.addClass(i,a);n=this.getFirstElement(this.LPViewMap.lineState,i);!function(e,t){var i=this.appContext.conf.windowConf.readNotificationsType||this.LPReadNotificationsTypes.text.value,n=this.translate(this.LINE_STATE_TRANSLATE_PREFIX+e.state),a=n;this.lineStateSupported&&(a=this.getLineStateText(i,e));if(e.state===this.messageStates.ERROR){t.innerHTML="";if(e.type!==lpTag.unifiedWindow.consts.chatEvents.FILE_SHARING&&this.LPReadNotificationsTypes.visual.value!==i){a=function(e){if(e.type===lpTag.unifiedWindow.consts.chatEvents.FILE_SHARING)return e.canRetry?this.translate("messagingState_image_RETRY"):this.translate("messagingState_image_ERROR")}.call(this,e)||a;var o=function(e){{if(e.type!==lpTag.unifiedWindow.consts.chatEvents.FILE_SHARING)return this.chatLineErrorState;return this.chatLineErrorStateNoIcon}}.call(this,e);this.createView({template:o,target:t,textInjection:{wrapperClass:this.LPClassMap.transcriptError,text:a,url:this.errorIconURL,id:e.localId,error:this.translate("errorIconAltText")}})}if(e.type===lpTag.unifiedWindow.consts.chatEvents.FILE_SHARING){a=this.getLineStateText(this.LPReadNotificationsTypes.visual.value,e);this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.FILE_DONE_UPLOADED+":"+e.localId,data:{showLoader:!1,error:!0,canRetry:e.canRetry}});t.innerHTML=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(a).cleanText||"";t.title=a?n:""}if(this.LPReadNotificationsTypes.visual.value===i){t.innerHTML=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(a).cleanText||"";t.title=a?n:""}}else{t.innerHTML=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(a).cleanText||"";t.title=a?n:""}}.call(this,e,n);b.call(this,e.localId-1,{nextLine:e})}}.call(this,e)}function T(e){var t=e.line,e=e.timeStamp;if(!isNaN(t.localId)){var i=this.getFirstElement("#"+this.LINE_ID_PREFIX+t.localId,this.view);if(i){var n=this.getFirstElement(this.LPViewMap.time,i),a=this.getFirstElement(this.LPViewMap.time+"_bottom",i),i=this.getFirstElement(this.LPViewMap.time+"_side",i);x.call(this,t,n,e);x.call(this,t,a,e);x.call(this,t,i,e,!0)}}}function E(e){(this.getFirstElement(this.LPViewMap.a11yHidden,this.view)||{}).innerHTML=e}function y(e,t){var i={line:this.util.clone(e.line),callback:this.addEvent.bind(this,e.line.history,e.line.track),context:this},e=this.timeStampManager.getDayString(e.line.time);i.line.source="system";i.line.subType="dateGrouping";i.line.html=e;i.line.localId=t;i.callback=this.addEvent.bind(this,i.line.history,i.line.track);this.dateLineFactory.createDateMessage(i)}function b(e,t){e="number"==typeof e.localId?e.localId:e;"number"==typeof e&&this.appContext.events.trigger({appName:"*",eventName:this.VCEvents.LINE_UPDATE+e,data:{newValue:t}})}e.dispose=function(){this.browserStateManager.off(this.browserStateManager.EVENT_NAME.ORIENTATION_CHANGE,f);this.isAsync&&this.browserStateManager.off(this.browserStateManager.EVENT_NAME.FOCUS_CHANGE,f);this.richContentFactory&&this.richContentFactory.dispose();this.quickRepliesDecorator&&this.quickRepliesDecorator.dispose();this.fileContentFactory&&this.fileContentFactory.dispose();this.historyButton&&this.historyButton.dispose();this.appContext.events.unbind({appName:"*",eventName:this.VCEvents.MAXIMIZE_VISIBLE,context:this,func:A});this.appContext.events.unbind({appName:"*",eventName:this.VCEvents.MINIMIZE_VISIBLE,context:this,func:M});this.appContext.events.unbind({appName:"*",eventName:this.VCEvents.LINES_VIEWED,context:this,func:L});this.appContext.events.unbind({appName:"*",eventName:this.VCEvents.UPDATE_TIME_STAMP,context:this,func:T});this.appContext.events.unbind({appName:lpTag.unifiedWindow.apps.RICH_CONTENT,eventName:this.EventName.richContent.UPDATE_RICH_CONTENT_LINE,context:this,func:u});this.appContext.events.unbind({appName:"*",eventName:"pendingLineSet",context:this,func:N});this.appContext.conf.unifiedConf.isTranscriptStaticMessageFocusEnabled&&this.view.removeEventListener("keyup",t,!1);if(!this.isHistoryLazyLoadEnabled){this.appContext.events.unbind({appName:"*",eventName:this.VCEvents.END_OF_HISTORY,context:this,func:D});this.unbindModel({path:this.chatPath.LINES,callback:r})}if(this.view.parentNode.scrollerAdded){this.view.parentNode.removeEventListener("scroll",this.scrollListener,!1);this.view.parentNode.scrollerAdded=!1}lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};function S(e){if((t=e)&&t.quickReplies){var t=this.getWidgetContent(),t=this.getFirstElement(this.LPViewMap.linesArea,t);this.quickRepliesDecorator.decorate(t,e,this.windowConf);this.quickRepliesDecorator.readOnly(this.isPendingLineSet);h.call(this)}}function I(){this.quickRepliesDecorator&&this.quickRepliesDecorator.dispose()}function N(e){this.isPendingLineSet=!(!e||!e.serverPendingLineExists);this.quickRepliesDecorator.readOnly(this.isPendingLineSet)}function x(e,t,i,n){var a=t&&t.childNodes||[],a=0<a.length?a[a.length-1]:{},i=i.replace(/ /g," ");n&&(i=i.replace(" - ",""));a.textContent=i||"";t&&("visitor"===e.source?t.title=this.getModelParam(this.chatPath.VISITOR_NAME)+i:t.title=e.by+i)}function A(){!function(){var e=this.getModelParam(this.uiPath.WINDOW_MAXIMIZED),t=this.lastLineViewedOnMinimize,i=this.appContext.conf.unifiedConf.scrollChatWindowOnMaximize;if(e&&t&&i===this.ScrollChatWindowOnMaximizeOptions.toBottom){e=this.getModelParam(this.uiPath.LAST_LINE_VIEWED)||{};e&&t.localId!==e.localId&&h.call(this)}this.lastLineViewedOnMinimize={}}.call(this);if(this.scrollOnMaximized){this.scrollOnMaximized=!1;h.call(this,0)}0<this.accessibilityMessages.length&&!function(){var e=this.getFirstElement(this.LPViewMap.a11yMessagesHidden,this.view),t=document.createElement("div"),i=document.createElement("div");i.setAttribute("role","alert");t.innerText=this.translate("transcriptPossibleMessagesShort");this.accessibilityMessages.unshift({view:t});for(var n=0;n<this.accessibilityMessages.length;n++){var a=this.accessibilityMessages[n].view.cloneNode(!0);a.id+="_accessibility";i.appendChild(a)}e.appendChild(i)}.call(this)}function M(){var e=this.getFirstElement(this.LPViewMap.a11yMessagesHidden,this.view);this.lastLineViewedOnMinimize=this.getModelParam(this.uiPath.LAST_LINE_VIEWED)||{};this.accessibilityMessages.length=0;e.innerHTML=""}function L(){var e=this.getModelParam(this.uiPath.WINDOW_MAXIMIZED);this.scrollOnMaximized=!e}function D(){if(!this.isHistoryLazyLoadEnabled&&this.historyRequested){d&&clearTimeout(d);this.appContext.events.trigger({appName:"tooltip",eventName:"close"});this.historyRequested=!1;this.allHistoryLoaded=!0}}function P(){this.setTabindexToEdgeLine("last",!0)}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e,t,o,s,n=lpTag.unifiedWindow.applicationUtils;lpTag.unifiedWindow.ChatViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"ChatViewController",applicationType:"ChatViewController",template:"<div class='lpview_bottom_container'><div class='lp_lpview_agent_is_typing lp_agent_is_typing lpc_typing-indication lpc_typing-indication_agent {{deviceClass}}' data-lp-point='agent_is_typing' aria-live='polite'></div><div class='lp_bottom_area' data-lp-cust-id='input' data-lp-point='bottom_area'><div class='lp_product_details_area_wrapper' data-lp-point='product_details_area_wrapper'></div><button class='lp_actions_button lpc_composer__menu-button {{deviceClass}}' data-lp-point='actions_button' data-lp-cust-id='actions_button' type='button'><span data-lp-point='actions_button_image' data-lp-type='icon' class='lp_actions-closed-icon'><img class='lpc_composer__menu-button-asset {{deviceClass}}' src='{{iconsRepository}}/sprites_v1.png' alt='' aria-hidden='true'></span></button> <button class='lp_file_button lpc_composer__file-attachment-button {{deviceClass}}' data-lp-point='file_button' aria-label='{{AddAttachmentAction}}'><span class='lp_file-icon' data-lp-type='icon' data-lp-point='file_input_image'><svg class='lpc_composer__file-attachment-button-asset {{deviceClass}}' aria-hidden='true' width='24' height='24' viewBox='0 0 23 23' version='1.1' xmlns='http://www.w3.org/2000/svg'><g stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'><path d='M9.00364374,0.931666646 C10.9714618,0.931666646 12.5787125,2.47543931 12.6803584,4.41794732 L12.6854619,4.61348483 L12.6854619,5.4741915 L12.6854619,13.9847117 C12.6854619,15.1394889 11.74933,16.0756208 10.5945528,16.0756208 C9.43977563,16.0756208 8.50364374,15.1394889 8.50364374,13.9847117 L8.50364374,5.17234491 C8.50364374,4.89620254 8.72750137,4.67234491 9.00364374,4.67234491 C9.27978612,4.67234491 9.50364374,4.89620254 9.50364374,5.17234491 L9.50364374,13.9847117 C9.50364374,14.5872042 9.99206038,15.0756208 10.5945528,15.0756208 C11.1970453,15.0756208 11.6854619,14.5872042 11.6854619,13.9847117 L11.6854619,5.4741915 L11.6854619,4.61348483 C11.6854619,3.13235754 10.484771,1.93166665 9.00364374,1.93166665 C7.57948289,1.93166665 6.41460124,3.04177288 6.32710171,4.44388242 L6.32182556,4.61348483 L6.32182556,14.2119845 C6.32182556,16.6972658 8.33654419,18.7119845 10.8218256,18.7119845 C13.2360989,18.7119845 15.2063146,16.810748 15.3169276,14.4238202 L15.3218256,14.2119845 L15.3218256,11.0029779 C15.3218256,10.7268355 15.5456832,10.5029779 15.8218256,10.5029779 C16.0672854,10.5029779 16.2714339,10.6798531 16.3137699,10.9131023 L16.3218256,11.0029779 L16.3218256,14.2119845 C16.3218256,17.2495506 13.8593917,19.7119845 10.8218256,19.7119845 C7.85834641,19.7119845 5.44228642,17.3682045 5.32619276,14.4331916 L5.32182556,14.2119845 L5.32182556,4.61348483 C5.32182556,2.58007279 6.97023171,0.931666646 9.00364374,0.931666646 Z' fill='#848586' transform='translate(10.821826, 10.321826) rotate(45.000000) translate(-10.821826, -10.321826) '></path></g></svg></span></button><div data-lp-point='actionsBar_placeholder_wrapper'></div><div class='lp_input_area lpc_composer__text-area-wrapper {{deviceClass}}' data-lp-point='input_container'></div><button class='lp_emoji_button lpc_composer__emoji-button {{deviceClass}}' data-lp-point='emoji_button' aria-label='{{tooltip_EmojiIcon}}' aria-expanded='false'><span data-lp-point='emoji_button_image' data-lp-type='icon' class='lp_actions-emoji-icon'><svg class='lpc_composer__emoji-button-asset {{deviceClass}}' aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 23 23'><g fill='none'><path d='M10 1C15 1 19 5 19 10 19 15 15 19 10 19 5 19 1 15 1 10 1 5 5 1 10 1ZM10 2C5.6 2 2 5.6 2 10 2 14.4 5.6 18 10 18 14.4 18 18 14.4 18 10 18 5.6 14.4 2 10 2ZM13.5 11.6L14.3 12C13.5 13.8 11.8 15 10 15 8.3 15 6.7 13.9 5.8 12.3L5.7 12 6.5 11.6C7.2 13.2 8.6 14.1 10 14.1 11.5 14.1 12.8 13.2 13.5 11.6ZM13.4 8.2L13.4 9.5 12 9.5 12 8.2 13.4 8.2ZM8 8.2L8 9.5 6.6 9.5 6.6 8.2 8 8.2Z' fill='#65686E'/></g></svg></span></button><div data-lp-point='emojiBar_placeholder_wrapper'></div><button class='lp_paper_plane_button lpc_composer__send-button {{deviceClass}}' data-lp-point='paper_plane_button' aria-label='{{tooltip_SendIcon}}'><span class='lp_paper_plane-icon' data-lp-type='icon' data-lp-point='paper_plane_button_image'><svg class='lpc_composer__send-button-asset {{deviceClass}}' aria-hidden='true' width='24px' height='24px' viewBox='0 0 23 23' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><g id='ic-light-send' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'><polygon id='Fill-7' points='0 22 22 22 22 0 0 0'></polygon><path d='M19,2.19367271 L19,16.7718891 C19,17.2774929 18.4775539,17.6127908 18.0199381,17.4008778 L12.8802219,15.0207741 L8.7725359,19.2871113 C8.34107114,19.7352405 7.58518171,19.4288503 7.58518171,18.8058322 L7.58518171,12.3866797 L2.47708231,10.7201639 C1.89021237,10.5286977 1.82926232,9.72006391 2.38076107,9.44225506 L17.9994769,1.57457178 C18.4587316,1.34322941 19,1.67815395 19,2.19367271 Z M18,2.74685062 L3.62657435,9.98723848 L8.58518171,11.6049826 L8.58518171,17.9985142 L12.6621183,13.7641141 L18,16.2359844 L18,2.74685062 Z M15.4797336,5.51684905 L15.4830453,5.52055333 L15.8984138,5.9969535 C15.9697315,6.07875015 15.9628055,6.20249688 15.8828058,6.27582452 L11.1229586,10.6386934 C11.041532,10.7133288 10.9150188,10.7078236 10.8403833,10.626397 C10.8392641,10.625176 10.8381602,10.6239411 10.8370717,10.6226927 L10.4217031,10.1462925 C10.3503855,10.0644959 10.3573114,9.94074917 10.4373111,9.86742153 L15.1971583,5.50455268 C15.2785849,5.42991722 15.4050982,5.43542249 15.4797336,5.51684905 Z' fill='#000000'></path></g></svg></span></button> <button class='lp_send_button lpc_composer__send-button {{deviceClass}}' data-lp-point='send_button' aria-label='{{tooltip_SendIcon}}'><span class='lp_send-icon' data-lp-type='icon' data-lp-point='send_button_image'><img class='lpc_composer__send-button-asset {{deviceClass}}' width='24px' height='24px' src='{{iconsRepository}}/sprites_v1.png' alt=''></span></button></div></div>",type:"html",dialogDisplayed:!1,visitorTypingTimeoutRef:null,visitorTypingTimeout:1e4,TOOLTIP_TIMEOUT:1e4,VISITOR_TYPING_TIMEOUT_MIN:5e3,actionVisibleAnimationTime:300,lineTemplateFile:{visitor:"<div id='lp_line_{{_id}}' class='lp_chat_line_wrapper lp_{{source}} {{stateClass}} lpc_message-area lpc_message-area_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_visitor_parent' role='list'><div class='lp_time lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div><div id='lp_line_bubble_{{_id}}' class='lp_chat_line lpc_message lpc_message_{{source}} {{deviceClass}} {{grouped}}' data-lp-point='lineBubble' data-lp-cust-id='transcript_bubble_visitor' role='listitem'><div class='lp_chat_arrow_border lpc_message-tail__border lpc_message-tail__border_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_visitorArrowBorder' aria-hidden='true'></div><div class='lp_chat_arrow lpc_message-tail lpc_message-tail_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_visitorArrow' aria-hidden='true'></div><div class='lp_line_state_wrapper'><span class='lp_title_text lpc_message__text lpc_message__text_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_visitor_text'>{{text}}</span> <span title='{{stateToolTip}}' data-lp-point='lp_line_state' data-lp-cust-id='transcript_time' class='lpc_message-area__indicator lpc_message-area__indicator_{{source}} {{deviceClass}} lp_line_state'>{{state}}</span></div><div class='lp_time_side_wrapper'><div class='lp_time lp_time_side lpc_message-area__side-timestamp lpc_message-area__side-timestamp_{{source}} lpc_message-area__side-timestamp_{{avatarCustomModifier}} {{deviceClass}}' title='{{sender}} {{time}}' data-lp-cust-id='transcript_time' aria-hidden='true'>{{sideTime}}</div></div></div><div class='lp_time lp_time_bottom lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} {{deviceClass}} lpHide' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div></div>",agent:"<div id='lp_line_{{_id}}' class='lp_chat_line_wrapper lp_{{source}} {{avatarVisibility}} lpc_message-area lpc_message-area_{{source}} lpc_message-area_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_agent_parent' role='list'><div class='lp_time lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div><img class='agent_avatar lpc_message-area__avatar lpc_message-area__avatar_{{source}} lpc_message-area__avatar_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='agentAvatarUrl' alt='' aria-hidden='true' role='listitem'><div id='lp_line_bubble_{{_id}}' class='lp_chat_line lpc_message lpc_message_{{source}} lpc_message_{{avatarCustomModifier}} {{deviceClass}} {{grouped}}' data-lp-point='lineBubble' data-lp-cust-id='transcript_bubble_agent' role='listitem'><div class='lp_title_text lpc_message__text lpc_message__text_{{source}} lpc_message__text_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_agent_text'>{{text}}</div></div><div class='lp_chat_arrow_border lpc_message-tail__border lpc_message-tail__border_{{source}} lpc_message-tail__border_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_agentArrowBorder' role='listitem' aria-hidden='true'></div><div class='lp_chat_arrow lpc_message-tail lpc_message-tail_{{source}} lpc_message-tail_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_agentArrow' role='listitem' aria-hidden='true'></div><div class='lp_time lp_time_side lpc_message-area__side-timestamp lpc_message-area__side-timestamp_{{source}} lpc_message-area__side-timestamp_{{avatarCustomModifier}} {{deviceClass}}' title='{{sender}} {{time}}' data-lp-cust-id='transcript_time' role='listitem' aria-hidden='true'>{{sideTime}}</div><div class='lp_time lp_time_bottom lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}} lpHide' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div></div>",system:"<div id='lp_line_{{_id}}' class='lp_chat_line_wrapper lp_{{source}} lpc_message-area lpc_message-area_{{source}} {{deviceClass}}' role='list'><div class='lp_time lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_time' role='listitem' aria-hidden='true'><div class='lp_sender'>{{sender}}</div>{{time}}</div><div class='lp_chat_line lpc_message lpc_message_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_message' role='listitem'><div class='lp_title_text lpc_message__text lpc_message__text_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_message'>{{text}}</div></div><div class='lp_chat_arrow_border lpc_message-tail__border lpc_message-tail__border_{{source}} {{deviceClass}}' aria-hidden='true' role='listitem' aria-hidden='true'></div><div class='lp_chat_arrow lpc_message-tail lpc_message-tail_{{source}} {{deviceClass}}' aria-hidden='true' role='listitem' aria-hidden='true'></div><div class='lp_time lp_time_bottom lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} {{deviceClass}} lpHide' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div></div>"},LPViewMap:{sendButton:"^send_button",sendButtonImage:"^send_button_image",paperPlaneButton:"^paper_plane_button",paperPlaneButtonImage:"^paper_plane_button_image",input:"^chat_input",inputContainer:"^input_container",lineText:".lp_title_text",chatViewContainer:".lpview_bottom_container",actionsBarPlaceholderWrapper:"^actionsBar_placeholder_wrapper",emojiBarPlaceholderWrapper:"^emojiBar_placeholder_wrapper",agentIsTyping:"^agent_is_typing",actionsButtonImage:"^actions_button_image",actionsButton:"^actions_button",actionsBarContainer:"^actions_bar_container",fileAttachment:"^file_button",emojiButton:"^emoji_button",emojiBar:"^emoji_bar",actionMenuButton:".lpc_maximized-header__menu-button",actionsBar:"^actions_bar",emojiBarContainer:"^emoji_bar_container",bottomArea:"^bottom_area",transcriptPossibleMessages:"#a11y-transcriptPossibleMessages",mainWindow:"^maximized",productDetailsAreaWrapper:"^product_details_area_wrapper"},LPClassesMap:{actionsVisibility:"lp_actions_visible",noAnimation:"lp_no-animation",actionsClosedIcon:"lp_actions-closed-icon",actionsOpenedIcon:"lp_actions-opened-icon",textAreaClass:"lp_expandable_textarea",emojiSupportedClass:"lp_emoji_supported",attachmentIconClass:"lp_attachment_icon"},actions:{TYPE:{EMOJI_MENU:"EMOJI",ACTION_MENU:"ACTION"},isVisible:{EMOJI:!1,ACTION:!1}},menuLocationMap:{TOP:"top"},ALLOWED_EXTENSIONS:".png, .jpg, .gif, .pdf, .docx, .xlsx, .pptx",BUTTON_TYPES:{ARROW:"arrow",PAPER_PLANE:"paper_plane"},initialize:function(e){this.sliderAPI=e.sliderAPI;this.featureStateManager=this.appContext.featureStateManager;this.renderMap=this.featureStateManager.renderMap;this.isMessaging=!!this.appContext.conf.engConf.async;this.currentImage=null;this.span=1;this.models=e.models;this.transcriptWasShown=!1;this.isInitialFocus=!0;this.attachmentIconStyle=this.featureStateManager.getStyleConfig(this.renderMap.ATTACHMENT_ICON);this.emojiIconStyle=this.featureStateManager.getStyleConfig(this.renderMap.EMOJI_ICON);this.sendIconType=this.featureStateManager.getSendIconType();this.bottomAreaStyle=this.featureStateManager.getStyleConfig(this.renderMap.BOTTOM_AREA);this.actionsButtonStyle=this.featureStateManager.getStyleConfig(this.renderMap.ACTIONS_BUTTON);var t=this.appContext.conf;if(t&&t.unifiedConf&&t.unifiedConf.visitorTypingTimeoutSeconds){var i=parseInt(this.appContext.conf.unifiedConf.visitorTypingTimeoutSeconds,10);if(!isNaN(i)){i=1e3*i;this.visitorTypingTimeout=i>=this.VISITOR_TYPING_TIMEOUT_MIN?i:this.VISITOR_TYPING_TIMEOUT_MIN}}t&&t.unifiedConf&&t.unifiedConf.areExtendedFileFormatsEnabled&&(this.ALLOWED_EXTENSIONS+=", .txt, .csv");if(e.resizeEvent){this.onResize=e.resizeEvent.onResize;this.onResizeContext=e.resizeEvent.onResizeContext;this.bindViewEvent({view:e.resizeEvent.transitionView,DOMEvent:"transition",callback:m,context:this})}this.browserNotificationsManager=this.appContext.browserNotificationsManager;this.textarea=new lpTag.unifiedWindow.ExpandableTextAreaViewController({appContext:this.appContext,targetView:this.getFirstElement(this.LPViewMap.inputContainer),minRows:1,maxRows:4,resizeCallback:T,context:this});this.textareaDomEl=this.textarea.textarea;s=!1;!function(e){var t=this.getFirstElement(this.LPViewMap.emojiButton),i=this.emojiIconStyle.classes||[];if(e){this.show(t);n.addClassByArray(t,i)}else this.hide(t)}.call(this,this.emojiIconStyle.value);!function(e){var t=this.getFirstElement(this.LPViewMap.sendButton),i=this.getFirstElement(this.LPViewMap.paperPlaneButton);if(e===this.BUTTON_TYPES.PAPER_PLANE){this.hide(t);this.show(i)}else{this.hide(i);this.show(t)}}.call(this,this.sendIconType);this.sendIconTypeToUse=this.sendIconType===this.BUTTON_TYPES.PAPER_PLANE?this.LPViewMap.paperPlaneButton:this.LPViewMap.sendButton;this.sendIconImageTypeToUse=this.sendIconType===this.BUTTON_TYPES.PAPER_PLANE?this.LPViewMap.paperPlaneButtonImage:this.LPViewMap.sendButtonImage;i=this.appContext.conf.unifiedConf;i.transcriptPossibleMessage=this.translate("transcriptPossibleMessages");this.actionsBarVc=new lpTag.unifiedWindow.ActionsBarViewController({textareaDomEl:this.textareaDomEl,models:this.models,appContext:this.appContext,textInjection:i,emojiEnabled:this.featureStateManager.emojiEnabled()});this.addViewController({viewController:this.actionsBarVc,target:this.LPViewMap.actionsBarPlaceholderWrapper});this.emojiBarVc=new lpTag.unifiedWindow.EmojiBarViewController({textareaDomEl:this.textareaDomEl,models:this.models,appContext:this.appContext,textInjection:i,emojiEnabled:this.featureStateManager.emojiEnabled()});this.addViewController({viewController:this.emojiBarVc,target:this.LPViewMap.emojiBarPlaceholderWrapper});t=this.getFirstElement(this.LPViewMap.actionsBarContainer);this.actions.isVisible.ACTION=this.getModelParam(this.uiPath.ACTIONS_VISIBLE);this.actions.isVisible.EMOJI=this.getModelParam(this.uiPath.EMOJI_VISIBLE);t&&this.addClass(t,this.LPClassesMap.noAnimation,500);this.fileAttachment=this.getFirstElement(this.LPViewMap.fileAttachment);this.addClass(this.fileAttachment,"lpHide");this.productDetailsVc=new lpTag.unifiedWindow.ProductDetailsAreaViewController({appContext:this.appContext,targetView:this.getFirstElement(this.LPViewMap.productDetailsAreaWrapper),context:this,setPaddingCallback:A,setCallback:x,textareaDomEl:this.textareaDomEl,product:{}});this.bottomArea=this.getFirstElement(this.LPViewMap.bottomArea);n.addClassByArray(this.bottomArea,this.bottomAreaStyle.classes);this.hide()},events:function(){this.bindViewEvent({selector:this.sendIconTypeToUse,callback:this.sendButtonClicked,DOMEvent:"click"});this.bindViewEvent({selector:this.sendIconTypeToUse,callback:this.sendButtonClicked,DOMEvent:this.appContext.deviceDetector.isMobile()||this.appContext.deviceDetector.isTablet()&&"touchend"});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.CLOSE_ACTIONS,context:this,func:f});this.appContext.events.bind({appName:"actions",eventName:"close",func:f,context:this});this.appContext.events.bind({appName:"*",eventName:this.EventName.uiState.EMOJI_FOCUS_ON_CLICK,func:this.focusOnChatInput,context:this});if(!this.appContext.deviceDetector.isDesktop()){this.appContext.events.bind({appName:"input",eventName:"focus",func:f,context:this});this.bindViewEvent({selector:this.LPViewMap.emojiButton,callback:this._closeActions,DOMEvent:"keydown",context:this});this.bindViewEvent({selector:this.LPViewMap.actionMenuButton,callback:this._closeEmojis,DOMEvent:"keydown",context:this})}this.appContext.events.bind({appName:"*",eventName:this.VCEvents.MAXIMIZE_VISIBLE,context:this,func:this.focusOnChatInput});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.DIALOG,context:this,func:this.dialogOpen});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.DIALOG_CLOSED,context:this,func:this.dialogClose});this.appContext.events.bind({appName:"*",eventName:this.EventName.uiState.POP_OUT,context:this,func:m});this.appContext.events.bind({appName:"*",eventName:this.EventName.uiState.SEND_BUTTON,context:this,func:this.setSendButtonStateHandler});this.appContext.events.bind({appName:"*",eventName:"pendingLineSet",context:this,func:this.setPendingLineStatus});this.appContext.events.bind({appName:"*",eventName:this.EventName.uiState.INPUT,context:this,func:this.setInputStateHandler});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.coBrowseEvents.DECLINE,context:this,func:this.handleCoBrowseClose});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.accessibility.SET_INPUT_FOCUS,context:this,func:this.focusOnChatInput});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.coBrowseEvents.CANCELED,context:this,func:this.handleCoBrowseClose});this.bindViewEvent({selector:this.LPViewMap.input,callback:this.inputKeyPress,DOMEvent:"keypress",context:this});this.bindViewEvent({selector:this.LPViewMap.input,callback:this.inputKeyUp,DOMEvent:"keyup",context:this});this.bindViewEvent({selector:this.LPViewMap.input,callback:this.inputPaste,DOMEvent:"paste",context:this});this.bindViewEvent({selector:this.LPViewMap.input,callback:this.inputBlur,DOMEvent:"blur",context:this});this.bindViewEvent({selector:this.sendIconTypeToUse,callback:this._setFocusToMainWindow,DOMEvent:"keydown",context:this});this.bindViewEvent({selector:this.input,callback:this._setInputA11yFocus,DOMEvent:"keyup",context:this});this.bindViewEvent({selector:this.input,callback:this._removeInputA11yFocus,DOMEvent:"keydown",context:this});if(this.emojiIconStyle.value){this.bindViewEvent({selector:this.LPViewMap.emojiButton,callback:this._setFocusToMainWindow,DOMEvent:"keydown",context:this});this.bindViewEvent({selector:this.LPViewMap.emojiBar,callback:this._handleEmojiBarFocus,DOMEvent:"keydown",context:this})}else this.bindViewEvent({selector:this.LPViewMap.input,callback:this._setFocusToMainWindow,DOMEvent:"keydown",context:this});this.bindViewEvent({view:window,callback:this.onBeforeUnload.bind(this),DOMEvent:"beforeunload",context:this});this.bindViewEvent({selector:this.LPViewMap.actionsBarContainer,callback:this._handleActionBarFocus,DOMEvent:"keydown",context:this});this.bindViewEvent({selector:this.LPViewMap.actionsButton,DOMEvent:"click",callback:p,context:this});this.bindViewEvent({selector:this.LPViewMap.emojiButton,DOMEvent:"click",callback:h,context:this});this.bindViewEvent({selector:this.LPViewMap.actionsButton,DOMEvent:"mouseover",callback:r,context:this});this.bindViewEvent({selector:this.LPViewMap.emojiButton,DOMEvent:"mouseover",callback:l,context:this});this.bindViewEvent({selector:this.LPViewMap.sendButton,DOMEvent:"mouseover",callback:d,context:this});this.bindViewEvent({selector:this.LPViewMap.paperPlaneButton,DOMEvent:"mouseover",callback:c,context:this});this.bindViewEvent({selector:this.LPViewMap.fileAttachment,DOMEvent:"mouseover",callback:u,context:this});this.appContext.deviceDetector.isAndroid()&&this.bindViewEvent({selector:this.LPViewMap.input,callback:this.inputFocus,DOMEvent:"focus"});if(this.appContext.deviceDetector.isIpadChrome()){this.bindViewEvent({selector:this.LPViewMap.input,callback:E,DOMEvent:"click"});this.bindViewEvent({selector:this.LPViewMap.input,callback:y,DOMEvent:"blur"})}this.bindModel({path:this.uiPath.ACTIONS_VISIBLE,callback:g.bind(this,this.actions.TYPE.ACTION_MENU)});this.featureStateManager.emojiEnabled()&&this.bindModel({path:this.uiPath.EMOJI_VISIBLE,callback:g.bind(this,this.actions.TYPE.EMOJI_MENU)});this.bindModel({path:this.uiPath.STATE,callback:this.stateChanged});this.bindModel({path:this.chatPath.AGENT_IS_TYPING,callback:this.agentIsTyping});this.bindModel({path:lpTag.unifiedWindow.chatModelPath.LINES,callback:this.onChatLines});this.appContext.deviceDetector.isDesktop()&&this.preventScroll({view:this.textareaDomEl});if(this.appContext.deviceDetector.isIOS()){this.limitScroll({view:this.textareaDomEl});window.addEventListener("orientationchange",function(){var e=this.getFirstElement(this.LPViewMap.input);e&&e.blur()}.bind(this),!1);this.bindViewEvent({selector:this.LPViewMap.input,callback:S,DOMEvent:"click"});this.bindViewEvent({selector:this.LPViewMap.input,callback:I,DOMEvent:"blur"});this.bindViewEvent({selector:this.LPViewMap.input,callback:b,DOMEvent:"focus"});this.bindViewEvent({selector:this.LPViewMap.paperPlaneButton,callback:S,DOMEvent:"click"});this.bindViewEvent({selector:this.LPViewMap.sendButton,callback:S,DOMEvent:"click"})}this.appContext.deviceDetector.isDesktop()||this.bindViewEvent({selector:this.LPViewMap.input,callback:this.setTypingState,DOMEvent:"input"});this.browserNotificationsManager.nativeEnabled&&!this.browserNotificationsManager.permissionDenied()&&this.appContext.deviceDetector.isMobile()&&this.bindViewEvent({selector:this.LPViewMap.input,DOMEvent:(this.appContext.deviceDetector.isMobile()||this.appContext.deviceDetector.isTablet())&&this.appContext.deviceDetector.isIOS()?"touchend":"click",callback:this.browserNotificationsManager.requestPermission.bind(this,N),context:this})},render:function(){this.agentTyping=this.getFirstElement(this.LPViewMap.agentIsTyping);this.actionsButtonImage=this.getFirstElement(this.LPViewMap.actionsButtonImage);this.actionsButton=this.getFirstElement(this.LPViewMap.actionsButton);this.mainWindow=this.getFirstElement(this.LPViewMap.mainWindow);this.show();this.focusOnChatInput();if(this.attachmentIconStyle.value){!function(){this.fileAttachment.setAttribute("aria-label",this.translate("AddAttachmentAction"));var e=document.createElement("input");e.id="LPfileUpload_"+Date.now();e.type="file";e.setAttribute("accept",this.ALLOWED_EXTENSIONS);e.setAttribute("class","lp_file_input");e.style.display="none";e.onchange=function(){if(0<this.fileUploader.files.length){this.currentImage=this.fileUploader.files[0];this.fileUploader.value="";if(this.currentImage){this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.IMAGE_SELECTED,data:{image:this.currentImage}});this.currentImage=null}}}.bind(this);this.fileAttachment.appendChild(e);this.fileUploader=e;this.bindViewEvent({selector:this.LPViewMap.fileAttachment,callback:function(){this.fileUploader.click()},DOMEvent:"click"})}.call(this);this.removeClass(this.fileAttachment,"lpHide")}this.actionsButtonStyle.value||this.hide(this.actionsButton);A.call(this,this.getFirstElement(this.LPViewMap.productDetailsAreaWrapper))},_handleActionBarFocus:function(e){var t=C(e),i=this.getFirstElement(this.LPViewMap.actionsButton),n=this.getFirstElement(this.LPViewMap.actionsBarContainer).querySelector("li:first-child button:first-child"),a=this.getFirstElement(this.LPViewMap.actionsBarContainer).querySelectorAll(".lp_action_items_wrapper:last-child button:not([disabled])");a[a.length-1];if(9===t&&e.shiftKey&&document.activeElement===n){e.preventDefault();i.focus()}else if(27===t){e.stopPropagation();this.appContext.uiStateManager.setVisibility(this.uiPath.ACTIONS_VISIBLE,!1);i.focus()}},_handleEmojiBarFocus:function(e){var t=C(e),i=this.getFirstElement(this.LPViewMap.emojiButton),n=this.getFirstElement(this.LPViewMap.emojiBar).querySelector("ul:first-child li:first-child button:first-child"),a=this.getFirstElement(this.LPViewMap.emojiBar).querySelector("ul:last-child li:last-child button:last-child"),o=this.getFirstElement(this.sendIconTypeToUse);if(9===t){if(e.shiftKey&&document.activeElement===n){e.preventDefault();i.focus();return}if(!e.shiftKey&&document.activeElement===a){e.preventDefault();(o.disabled?this.getFocusableHeaderButton(this.getFirstElement(this.LPViewMap.mainWindow,document.body)):o).focus();return}}if(27===t){e.stopPropagation();this.appContext.uiStateManager.setVisibility(this.uiPath.EMOJI_VISIBLE,!1);i.setAttribute("aria-expanded",!1);i.focus()}},_setInputA11yFocus:function(e){var e=C(e),t=this.appContext.conf.unifiedConf.isExtraFocusEnabledForTextInput;if(9===e){e=document.activeElement;if(e.classList.contains("lpview_form_textarea"))if(t)e.style.outline="#3a61d4 2px solid";else{e.parentNode.parentNode.parentNode.parentNode.style.borderTop="none";e.parentNode.parentNode.style.border="2px solid #3a61d4"}}},_removeInputA11yFocus:function(e){if(9===C(e)){e=document.activeElement;if(e.classList.contains("lpview_form_textarea")){e.parentNode.parentNode.style.border="none";e.style.removeProperty("outline")}}},_setFocusToMainWindow:function(e){var t=C(e);if(!e.shiftKey&&9===t){var t=this.getFirstElement(this.sendIconTypeToUse),i=this.getFirstElement(this.sendIconTypeToUse).disabled,n=this.getFirstElement(this.LPViewMap.emojiButton),a=this.getFirstElement(this.LPViewMap.input),o=this.getModelParam(this.uiPath.EMOJI_VISIBLE),s="none"==n.style.display,r=document.activeElement==a&&s&&!i&&this.isActionBarVisible(),a=document.activeElement==a&&s&&!i&&!this.isActionBarVisible();if(!r&&!a){s=document.activeElement==n&&!i&&this.isActionBarVisible(),r=document.activeElement==n&&!i&&!this.isActionBarVisible();if(!(s||r||o&&document.activeElement!==t)){e.preventDefault();this.getFocusableHeaderButton(this.getFirstElement(this.LPViewMap.mainWindow,document.body)).focus()}}}}});(e=lpTag.unifiedWindow.ChatViewController.prototype).dispose=function(){clearTimeout(this.visitorTypingTimeoutRef);this.appContext.events.unbind({appName:"actions",eventName:"close",func:f,context:this});this.appContext.deviceDetector.isDesktop()||this.appContext.events.unbind({appName:"input",eventName:"focus",func:f,context:this});lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};e.stateChanged=function(e){var t=!!this.appContext.conf.engConf.async;if(e.newValue)switch(e.newValue){case lpTag.unifiedWindow.State.WAITING:this.setInputState(!0);this.setSendButtonState(t);m.call(this);break;case lpTag.unifiedWindow.State.CONNECTION_ISSUE:case lpTag.unifiedWindow.State.PENDING:this.setSendButtonState(!1);break;case lpTag.unifiedWindow.State.CHATTING:this.setTypingState(!1);this.setInputState(!0);this.setSendButtonState(!0);break;case lpTag.unifiedWindow.State.APP_ENDED:this.setInputState(!1);this.setSendButtonState(!1);m.call(this);break;default:this.setInputState(!0);this.setSendButtonState(!0)}};e.setSendButtonStateHandler=function(e){"boolean"==typeof e.enabled&&this.setSendButtonState.call(this,e.enabled)};e.setSendButtonState=function(e,t){var i=this.getModelParam(this.uiPath.STATE),n=this.getFirstElement(this.sendIconTypeToUse),a=this.getFirstElement(this.sendIconImageTypeToUse);t=t||this.getFirstElement(this.LPViewMap.input).value;if(e){"boolean"!=typeof s||s||i!==lpTag.unifiedWindow.State.CHATTING||(s=!0);if("boolean"==typeof o&&!s)return;this.removeClass(a,"lp_disabled")}else this.addClass(a,"lp_disabled");n.disabled=e&&!/^\s*$/.test(t)?null:"disabled"};e.setInputStateHandler=function(e){"boolean"==typeof e.enabled&&this.setInputState.call(this,e.enabled)};e.setInputState=function(e){var t=this.getFirstElement(this.LPViewMap.input);if(e){this.alignInput();t.placeholder=this.translate("insertTextHere");t.disabled=null}else{t.value="";t.placeholder="";t.disabled="disabled"}};e.inputKeyPress=function(e){if(13===C(e)){if(i.call(this)){var t=v.call(this,!0);w.call(this,t);this.focusOnChatInput()}this.stopPropagation(e);this.preventDefault(e)}};e.alignInput=function(){this.applyDirOnElement(this.textareaDomEl,this.textarea.getValue())};e.inputFocus=function(){this.appContext.uiStateManager.setActionsVisibility(!1)};e.inputBlur=function(){_.call(this,!1);var e=this.getFirstElement(this.LPViewMap.input);e.parentNode.parentNode.style.border="none";e.style.removeProperty("outline");this.setTypingState(!1)};e.inputKeyUp=function(){_.call(this,this.hasInputValue());i.call(this)&&this.setTypingState();this.alignInput()};e.inputPaste=function(){var e=this;setTimeout(function(){e.inputKeyUp()},0)};e.setTypingState=function(e){(e="boolean"!=typeof e?this.hasInputValue():e)?function(){clearTimeout(this.visitorTypingTimeoutRef);this.visitorTypingTimeoutRef=setTimeout(this.setTypingState.bind(this,!1),this.visitorTypingTimeout)}.call(this):clearTimeout(this.visitorTypingTimeoutRef);this.appContext.transcriptManager.setVisitorTyping(e);this.setSendButtonState(i.call(this),this.textarea.getValue())};e.hasInputValue=function(){var e=this.textarea.getValue();return void 0!==e&&0<e.length};e.agentIsTyping=function(e){e=e&&e.newValue;!function(e){if(e){var e=""===this.agentTyping.textContent,t=this.translate("agentIsTypingText");e&&(this.agentTyping.textContent="");e&&(this.agentTyping.textContent=t)}else this.agentTyping.textContent=""}.call(this,e)};e.sendButtonClicked=function(e){if(i.call(this)){this.textareaDomEl.blur();var t=v.call(this),t=(w.call(this,t),this.getFirstElement(this.sendIconTypeToUse));t&&t.disabled&&(t.style.backgroundColor="transparent");this.focusOnChatInput()}this.stopPropagation(e);this.preventDefault(e)};e.focusOnChatInput=function(){if(this.uiPath){var e=this.getModelParam(this.uiPath.STATE);!this.isFocusInsideApp()||this.dialogDisplayed||!lpTag.unifiedWindow.State||e!==lpTag.unifiedWindow.State.WAITING&&e!==lpTag.unifiedWindow.State.CHATTING&&e!==lpTag.unifiedWindow.State.APP_ENDED&&e!==lpTag.unifiedWindow.State.PENDING||(e=this.getFirstElement(this.LPViewMap.input))&&e.focus()}};e.closeActions=function(){f.call(this)};e.isActionBarVisible=function(){var e,t=!1;for(e in this.actions.isVisible)if(this.actions.isVisible[e]){t=!0;break}return t};e.dialogOpen=function(){this.dialogDisplayed=!0};e.onBeforeUnload=function(e){this.setTypingState(!1)};e.dialogClose=function(e){this.dialogDisplayed=!1;e=e&&e.origin;if(e&&"confirm"===e){this.appContext.uiStateManager.setWindowClosedByVisitor(!0);var t=this,i=this.focusOnChatInput;setTimeout(function(){i.call(t)},500)}};e.onChatLines=function(e){if(e&&e.newValue&&e.newValue.length)if(e.newValue.filter(function(e){return!e.isWelcomeMessage&&"system"!==e.source}).length){e=this.getFirstElement(this.LPViewMap.transcriptPossibleMessages);if(e){e.innerText=this.translate("transcriptPossibleMessagesShort");this.unbindModel({path:lpTag.unifiedWindow.chatModelPath.LINES,callback:this.onChatLines})}}};e.setVoiceOverFocus=function(e){e.setAttribute("tabindex","0");e.blur();var t=0,i=window.setInterval(function(){e.focus();10<=++t&&window.clearInterval(i)},10)};e.iOSCoBrowseClose=function(){var e=this.getFirstElement("^maximize",document.body);this.setVoiceOverFocus(e)};e.handleCoBrowseClose=function(){this.appContext.deviceDetector.isIOS()?this.iOSCoBrowseClose():this.getFirstElement(this.LPViewMap.mainWindow,document.body).focus()};e.setPendingLineStatus=function(e){o=e&&e.serverPendingLineExists};function i(){var e=this.getModelParam(this.uiPath.STATE),t=e===lpTag.unifiedWindow.State.CHATTING,e=this.appContext.conf.engConf.async&&e!==lpTag.unifiedWindow.State.CONNECTION_ISSUE&&e!==lpTag.unifiedWindow.State.PENDING;return(e="boolean"==typeof o?e&&!o:e)||t}function a(e){if(this.appContext.deviceDetector.isDesktop()){var t=this.getFirstElement(this.LPViewMap.bottomArea),t=function(e){e=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/);return(299*parseInt(e[1],10)+587*parseInt(e[2],10)+114*parseInt(e[3],10))/1e3<40}(getComputedStyle(t).backgroundColor);if(e){t?e.style.setProperty("background-color","rgba(255,255,255,0.3)","important"):e.style.setProperty("background-color","rgba(0,0,0,0.3)","important");e.onmouseleave=function(){e.style.backgroundColor="transparent"}}}}function r(){var e=this.getFirstElement(this.LPViewMap.actionsButton);a.call(this,e)}function l(){var e=this.getFirstElement(this.LPViewMap.emojiButton);a.call(this,e)}function d(){var e=this.getFirstElement(this.LPViewMap.sendButton);a.call(this,e)}function c(){var e=this.getFirstElement(this.LPViewMap.paperPlaneButton);a.call(this,e)}function u(){var e=this.getFirstElement(this.LPViewMap.fileAttachment);a.call(this,e)}function p(){var e=this.getModelParam(this.uiPath.EMOJI_VISIBLE),t=this.getFirstElement(this.LPViewMap.emojiBarContainer);if(e){this.hide(t);this.appContext.uiStateManager.setVisibility(this.uiPath.EMOJI_VISIBLE,!1)}this.appContext.uiStateManager.setVisibility(this.uiPath.ACTIONS_VISIBLE,!this.getModelParam(this.uiPath.ACTIONS_VISIBLE));this.getModelParam(this.uiPath.ACTIONS_VISIBLE);e=this.getFirstElement(this.LPViewMap.actionsBar).querySelectorAll("button");Array.prototype.filter.call(e,function(e){return!e.disabled})}function h(){var e=this.getModelParam(this.uiPath.ACTIONS_VISIBLE),t=this.getModelParam(this.uiPath.EMOJI_VISIBLE);e&&this.appContext.uiStateManager.setVisibility(this.uiPath.ACTIONS_VISIBLE,!1);this.appContext.uiStateManager.setVisibility(this.uiPath.EMOJI_VISIBLE,!this.getModelParam(this.uiPath.EMOJI_VISIBLE));e=this.getFirstElement(this.LPViewMap.emojiButton);t?e.setAttribute("aria-expanded",!1):e.setAttribute("aria-expanded",!0)}function f(){var e=this.getFirstElement(this.LPViewMap.actionsButton);this.appContext.uiStateManager.setActionsVisibility(!1);e.setAttribute("aria-expanded",!1)}function g(e,t){var i=function(){return void 0===this.inProcess}.call(this),n=this.getFirstElement(this.LPViewMap.actionsBarContainer),a=this.getFirstElement(this.LPViewMap.emojiBarContainer);if(this.transcriptWasShown){this.inProcess=!0;this.actions.isVisible[e]=t.newValue;t=t.newValue||this.isActionBarVisible();t&&("ACTION"===e?this.show(n):this.show(a));i?m.call(this):this.appContext.events.trigger({appName:"*",eventName:this.EventName.uiState.ACTIONS_TOGGLE,data:{visible:t}});!function(e,t){var i=this.getFirstElement(this.LPViewMap.actionsButton);if(e&&t===this.actions.TYPE.ACTION_MENU){this.removeClass(this.actionsButtonImage,this.LPClassesMap.actionsClosedIcon);this.addClass(this.actionsButtonImage,this.LPClassesMap.actionsOpenedIcon);i.setAttribute("aria-expanded","true");i.setAttribute("aria-label",this.translate("tooltip_CollapseActionMenu"))}else{this.removeClass(this.actionsButtonImage,this.LPClassesMap.actionsOpenedIcon);this.addClass(this.actionsButtonImage,this.LPClassesMap.actionsClosedIcon);i.setAttribute("aria-label",this.translate("tooltip_ExpandActionMenu"));i.setAttribute("aria-expanded","false")}}.call(this,t,e)}}function m(){var e=this.getFirstElement(this.LPViewMap.emojiBarContainer),t=this.getFirstElement(this.LPViewMap.actionsBarContainer),i=this.isActionBarVisible();if(!i){this.hide(t);this.hide(e)}this.inProcess=!1;this.textareaDomEl&&this.textareaDomEl.clientHeight&&T.call(this,this.textareaDomEl.clientHeight);this.appContext.events.trigger({appName:"*",eventName:this.EventName.uiState.ACTIONS_TOGGLE,data:{visible:i}});t.setAttribute("aria-hidden",(!i).toString());e.setAttribute("aria-hidden",(!i).toString())}function v(e){var t={text:this.textarea.getValue()};t.text=this.trim(t.text);this.textarea.setValue("");e&&this.textarea.lpFocus();return t}function w(e){if(this.productDetailsVc.isActive()){!function(e){if(this.productDetailsVc&&this.productDetailsVc.isActive){var t=this.productDetailsVc.generateStructuredContent(e);this.appContext.transcriptManager.sendStructeredContentLine(t,this,function(){},e)}}.call(this,e);this.productDetailsVc.close()}else{if(e&&e.text&&this.isMessaging&&!this.appContext.transcriptManager.currentConversationActive()){e.text=lpTag.HtmlSanitizerUtils.sanitizeAndCleanHtml(e.text);e.text=e.text.replace(/\&/g,"&");e.text=e.text.replace(/\</g,"<");e.text=e.text.replace(/\>/g,">")}if(e.text&&""!==e.text){e.text=function(e){var t;if(lpTag.taglets&&lpTag.taglets.cleanCCPatterns&&(t=lpTag.taglets.cleanCCPatterns.clean(e))!==e){e=t;!function(){this.appContext.events.trigger({appName:"tooltip",eventName:"show",data:{text:this.translate("tooltip_AutoBlockCreditCardPatternsMessage"),tooltipTimeout:this.TOOLTIP_TIMEOUT}});!function(){this.appContext.deviceDetector.isIOS()&&this.textareaDomEl.blur()}.call(this)}.call(this)}return e}.call(this,e.text);this.appContext.transcriptManager.sendLine(e);this.setTypingState(!1)}if(this.actionsBarVc.getActiveMenu()===this.actionsBarVc.ActionType.EMOJI){this.actionsBarVc.hideActionBar();this.getFirstElement(this.LPViewMap.emojiButton).setAttribute("aria-expanded",!1)}}}function _(e){this.appContext.events.trigger({appName:this.ControllerName,eventName:this.VCEvents.VISITOR_HAS_TYPED,data:{typing:e&&document.activeElement===this.textareaDomEl}})}function C(e){return"which"in e?e.which:e.keyCode}function T(e,t){this.view.style.height=(e=e||0)+"px";this.onResize&&this.onResizeContext&&this.onResize.call(this.onResizeContext,{bottomAreaSize:e+function(){var e=this.getFirstElement(this.LPViewMap.inputContainer),t=0,i=0,n=0;if(e){i=this.getComputedStyle(e,"paddingTop");n=this.getComputedStyle(e,"paddingBottom");t=parseInt(i,10)+parseInt(n,10)}return t}.call(this)+function(){var e=this.getFirstElement(this.LPViewMap.productDetailsAreaWrapper),t=0;e&&this.productDetailsVc&&this.productDetailsVc.isActive()&&(t=e.clientHeight);return t}.call(this),actionsAreaSize:function(){var e=this.getModelParam(this.uiPath.ACTIONS_VISIBLE),t=this.getModelParam(this.uiPath.EMOJI_VISIBLE),i=0;if(e){e=this.getFirstElement(this.LPViewMap.actionsBarContainer);i=e.clientHeight}else if(t){e=this.getFirstElement(this.LPViewMap.emojiBarContainer);i=e.clientHeight}return i}.call(this)})}function E(){this.isActionBarVisible()||this.appContext.events.trigger({appName:"*",eventName:"adjust_styles",data:{}})}function y(){this.appContext.events.trigger({appName:"*",eventName:"remove_styles",data:{}})}function b(){if(this.isInitialFocus)this.isInitialFocus=!1;else{0;S.call(this)}}function S(){0;t&&clearTimeout(t);this.appContext.events.trigger({appName:"*",eventName:"keyboard_visible",data:{}})}function I(){0;t&&clearTimeout(t);t=setTimeout(function(){this.appContext&&this.appContext.events.trigger({appName:"*",eventName:"reset_window",data:{}})}.bind(this),150)}function N(){this.unbindViewEvent({selector:this.LPViewMap.input,DOMEvent:(this.appContext.deviceDetector.isMobile()||this.appContext.deviceDetector.isTablet())&&this.appContext.deviceDetector.isIOS()?"touchend":"click",callback:this.browserNotificationsManager.requestPermission.bind(this,N),context:this})}function x(){A.call(this,this.productDetailsVc.productDetailsArea);T.call(this,this.textareaDomEl.clientHeight)}function A(e){var t=this.getFirstElement(this.LPViewMap.bottomArea);e&&(t.style.paddingTop=e.clientHeight+"px")}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e,c=lpTag.lpUtils,u=lpTag.taglets.lpUtil;lpTag.unifiedWindow.ChatLineViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"ChatLineViewController",applicationType:"ChatLineViewController",STATE_CLASS_PREFIX:"state_",SPACE_HTML_ENTITY:" ",STATE_CLASS_PREFIX_REGEX:/state_[\w]+/gi,lineTemplateFile:{visitor:"<div id='lp_line_{{_id}}' class='lp_chat_line_wrapper lp_{{source}} {{stateClass}} lpc_message-area lpc_message-area_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_visitor_parent' role='list'><div class='lp_time lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div><div id='lp_line_bubble_{{_id}}' class='lp_chat_line lpc_message lpc_message_{{source}} {{deviceClass}} {{grouped}}' data-lp-point='lineBubble' data-lp-cust-id='transcript_bubble_visitor' role='listitem'><div class='lp_chat_arrow_border lpc_message-tail__border lpc_message-tail__border_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_visitorArrowBorder' aria-hidden='true'></div><div class='lp_chat_arrow lpc_message-tail lpc_message-tail_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_visitorArrow' aria-hidden='true'></div><div class='lp_line_state_wrapper'><span class='lp_title_text lpc_message__text lpc_message__text_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_visitor_text'>{{text}}</span> <span title='{{stateToolTip}}' data-lp-point='lp_line_state' data-lp-cust-id='transcript_time' class='lpc_message-area__indicator lpc_message-area__indicator_{{source}} {{deviceClass}} lp_line_state'>{{state}}</span></div><div class='lp_time_side_wrapper'><div class='lp_time lp_time_side lpc_message-area__side-timestamp lpc_message-area__side-timestamp_{{source}} lpc_message-area__side-timestamp_{{avatarCustomModifier}} {{deviceClass}}' title='{{sender}} {{time}}' data-lp-cust-id='transcript_time' aria-hidden='true'>{{sideTime}}</div></div></div><div class='lp_time lp_time_bottom lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} {{deviceClass}} lpHide' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div></div>",agent:"<div id='lp_line_{{_id}}' class='lp_chat_line_wrapper lp_{{source}} {{avatarVisibility}} lpc_message-area lpc_message-area_{{source}} lpc_message-area_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_agent_parent' role='list'><div class='lp_time lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div><img class='agent_avatar lpc_message-area__avatar lpc_message-area__avatar_{{source}} lpc_message-area__avatar_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='agentAvatarUrl' alt='' aria-hidden='true' role='listitem'><div id='lp_line_bubble_{{_id}}' class='lp_chat_line lpc_message lpc_message_{{source}} lpc_message_{{avatarCustomModifier}} {{deviceClass}} {{grouped}}' data-lp-point='lineBubble' data-lp-cust-id='transcript_bubble_agent' role='listitem'><div class='lp_title_text lpc_message__text lpc_message__text_{{source}} lpc_message__text_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_agent_text'>{{text}}</div></div><div class='lp_chat_arrow_border lpc_message-tail__border lpc_message-tail__border_{{source}} lpc_message-tail__border_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_agentArrowBorder' role='listitem' aria-hidden='true'></div><div class='lp_chat_arrow lpc_message-tail lpc_message-tail_{{source}} lpc_message-tail_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_agentArrow' role='listitem' aria-hidden='true'></div><div class='lp_time lp_time_side lpc_message-area__side-timestamp lpc_message-area__side-timestamp_{{source}} lpc_message-area__side-timestamp_{{avatarCustomModifier}} {{deviceClass}}' title='{{sender}} {{time}}' data-lp-cust-id='transcript_time' role='listitem' aria-hidden='true'>{{sideTime}}</div><div class='lp_time lp_time_bottom lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}} lpHide' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div></div>",system:"<div id='lp_line_{{_id}}' class='lp_chat_line_wrapper lp_{{source}} lpc_message-area lpc_message-area_{{source}} {{deviceClass}}' role='list'><div class='lp_time lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_time' role='listitem' aria-hidden='true'><div class='lp_sender'>{{sender}}</div>{{time}}</div><div class='lp_chat_line lpc_message lpc_message_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_message' role='listitem'><div class='lp_title_text lpc_message__text lpc_message__text_{{source}} {{deviceClass}}' data-lp-cust-id='transcript_message'>{{text}}</div></div><div class='lp_chat_arrow_border lpc_message-tail__border lpc_message-tail__border_{{source}} {{deviceClass}}' aria-hidden='true' role='listitem' aria-hidden='true'></div><div class='lp_chat_arrow lpc_message-tail lpc_message-tail_{{source}} {{deviceClass}}' aria-hidden='true' role='listitem' aria-hidden='true'></div><div class='lp_time lp_time_bottom lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} {{deviceClass}} lpHide' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div></div>"},LPViewMap:{avatarImage:".agent_avatar",lineText:".lp_title_text",timeAndSender:".lp_time",bubble:"^lineBubble",state:"^lp_line_state"},LPClassesMap:{avatarDisplay:"agent_avatar_display",avatarHidden:"agent_avatar_hidden",lineBubble:"lp_line_bubble_",lineWrapperBubble:"lp_bubble_style",line:"lp_line_",lineArrow:"lp_chat_arrow",lineBoarder:"lp_chat_arrow_border",grouped:{start:"lp_line_grouped_start",body:"lp_line_grouped_body",end:"lp_line_grouped_end"}},LPCustomizationClasses:{avatarDisplay:"avatar-shown",avatarHidden:"avatar-hidden"},GROUP_STATE:{INIT:"init",START:"start",BODY:"body",END:"end"},LINE_STYLE:{DEFAULT:"default",CURVY:"curvy"},SENT_STATE_MAP:{state_SENT:"SENT",state_ACCEPT:"ACCEPT",state_PENDING:"PENDING",state_READ:"READ",state_ERROR:"ERROR",state_image_ERROR:"image_ERROR",state_image_RETRY:"image_RETRY"},FORMATTER:{markdownToHtml:{regexp:new RegExp("#md#\\[(.*?)]\\((.*?)\\)#/md#","gim")},anchorTagRegex:{regexp:new RegExp("<a[\\s]+([^>]+)>((?:.(?!</a>))*.)</a>","gim")}},markdownToTemp:[],ahrefToTemp:[],initialize:function(e){this.appContext=e.appContext;this.lineStateSupported=this.appContext.conf.engConf.async;this.util=lpTag.unifiedWindow.applicationUtils;this.featureStateManager=this.appContext.featureStateManager;this.hyperlinksHelper=this.appContext.hyperlinksHelper;this.lineStyle=this.featureStateManager.getBubbleStyles();this.isTimeStampAbove=this.featureStateManager.isTimeStampAbove();this.timeStampLocation=this.featureStateManager.timeStampLocationEnabled();this.isLineGroupingEnabled=this.featureStateManager.isLineGroupingEnabled();this.avatarEnabled=this.featureStateManager.avatarEnabled();this.agentAvatarPaddingEnabled=this.featureStateManager.agentAvatarPaddingEnabled()}});(e=lpTag.unifiedWindow.ChatLineViewController.prototype).createLine=function(e){var t=this.getAvatarUrl(e);if((i=e)&&i.line&&(i.line.text||i.line.textKey)){var i={template:this.lineTemplateFile[e.line.source],wrapWithDiv:!1,callback:function(e,t,i){var n,a=this.getFirstElement(this.LPViewMap.lineText,i),o=e.line.type===this.appConsts.messageTypes.secureForm,s=!0,r=this.appContext&&this.appContext.conf&&this.appContext.conf.unifiedConf;r&&r.hasOwnProperty("isTagsTransformDisabled")&&(s=r.isTagsTransformDisabled);s||(e.line.text=function(e){var t;("string"==typeof e||e instanceof String)&&(t=e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/ /g," "));return t||e}(e.line.text));if(this.appContext.conf.engConf.async&&e.line.text&&"visitor"!==e.line.source&&e.line.type===this.appConsts.chatEvents.LINE&&this.hyperlinksHelper.textContainsMarkDownSyntax(e.line.text)){e.line.text="string"==typeof e.line.text?e.line.text.replace(/ /g," "):e.line.text;e.line.text=this.hyperlinksHelper.convertMarkdownToTempId(e.line.text);e.line.text=this.hyperlinksHelper.convertAHREFToTempId(e.line.text);d=!1;p(e.line,a,this,d);e.line.text=this.formatLinks(e.line.text);var r=this.hyperlinksHelper.convertTempIdToMarkdown(e.line.text);e.line.text=r;a.innerHTML=r;r=this.hyperlinksHelper.convertTempIdToAHREF(e.line.text);e.line.text=r;a.innerHTML=r;r=this.hyperlinksHelper.parseAllMarkdownFormat(e.line.text);a.innerHTML=r;r=this.reTargetElementsByType(["A","FORM"],r);e.line.text=r;a.innerHTML=r;this.hyperlinksHelper.setMarkDownToTemp([]);this.hyperlinksHelper.setAHREFToTemp([])}else{e.line.text="string"==typeof e.line.text?e.line.text.replace(/ /g," "):e.line.text;r=this.hyperlinksHelper.textContainsAHREFSyntax(e.line.text);if(this.appContext.conf.engConf.async&&e.line.text&&r&&"visitor"!==e.line.source&&e.line.type===this.appConsts.chatEvents.LINE){var l=this.hyperlinksHelper.convertAHREFToTempId(e.line.text);e.line.text=l;a.innerHTML=l}d=!1;p(e.line,a,this,d);"visitor"===e.line.source&&(a=this.hyperlinksHelper.wrapStandaloneLinks(e.line.text,a));if(this.appContext.conf.engConf.async&&e.line.text&&r&&"visitor"!==e.line.source&&e.line.type===this.appConsts.chatEvents.LINE){var l=this.hyperlinksHelper.convertTempIdToAHREF(a.innerHTML),d=this.reTargetElementsByType(["A","FORM"],l);e.line.text=d;a.innerHTML=d;this.hyperlinksHelper.setAHREFToTemp([])}}s||this.removeUnsupportedTagsAndAttributes(a,!this.appContext.conf.engConf.async,o);"agent"!==e.line.source&&this.applyDirOnElement(a,e.line.text);if(a&&a.innerHTML){a.innerHTML=a.innerHTML.replace(/(\r\n|\n|\r)/gm,"<br/>");a.innerHTML=this.replaceDuplicatedEncodings(a.innerHTML)}t&&"string"==typeof t&&(n=this.getFirstElement(this.LPViewMap.avatarImage,i))&&(n.src=t);if(!t&&(n=this.getFirstElement(this.LPViewMap.avatarImage,i))){n.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D";n.height="0";n.width="0"}if(e&&e.line&&e.line.isWelcomeMessage){r=this.getFirstElement(this.LPViewMap.timeAndSender,i),l=this.getFirstElement(this.LPViewMap.timeAndSender+"_bottom",i);u.addClass(r,"lp_hidden");u.addClass(l,"lp_hidden")}this.addWrapperBubbleClass.call(this,e,i);this.setLineAndTsGrouping.call(this,e,t,i);e.replace&&e.targetToReplace?c.runCallback(e.callback,e.context,{view:i,line:e.line,replace:e.replace,targetToReplace:e.targetToReplace}):c.runCallback(e.callback,e.context,{view:i,line:e.line})}.bind(this,e,t),textInjection:this.getTextInjection(e,t)};e.replace&&(i.doNotAddChild=e.replace);return this.createView(i)}};e.handleLineUpdate=function(e){return function(e,t){a.call(this,e,t);!function(e){var t=this.util.clone(e);r.call(this,e);this.appContext.events.bind({appName:"*",eventName:this.VCEvents.LINE_UPDATE+t.localId,context:this,func:this.handleLineUpdate(t)})}.call(this,e)}.bind(this,e)};e.getTextInjection=function(e,t){var i,n,a=this.appContext.conf.windowConf.readNotificationsType||this.LPReadNotificationsTypes.text.value,o=this.translate("messagingState_"+e.line.state);if(this.lineStateSupported){i=this.getLineStateText(a,e.line);n=e.line.state?this.STATE_CLASS_PREFIX+e.line.state:void 0}if(!this.appContext.conf.engConf.async&&"html"===e.line.textType&&e.line.text&&"agent"===e.line.source){for(var a=document.createElement("div"),s=(a.innerHTML=e.line.text,a.querySelectorAll("span")),r=0;r<s.length;r++)"bold"!==s[r].style.fontWeight&&(s[r].style.fontWeight="inherit");e.line.text=a.innerHTML}var a=e.line.time?this.timeStampManager.getTimeString(e.line.time):"",l=e.line.time?this.timeStampManager.getSideTimeString(e.line.time,!this.timeStampGroupingEnabled):"",a={_id:e.line.localId,source:e.line.source,sender:function(e){var t="";switch(e.source){case"agent":t=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(e.by).cleanText;break;case"visitor":t=this.getModelParam(this.chatPath.VISITOR_NAME)||this.translate("you");break;case"system":t=this.translate("info")}return t}.call(this,e.line),time:a,sideTime:l,state:i||"",stateToolTip:i?o:"",stateClass:n||"",iconsRepository:this.appContext.conf.unifiedConf.iconsRepository,imagesRepository:this.appContext.conf.unifiedConf.imagesRepository,grouped:e.line.grouped?this.LPClassesMap.grouped[e.line.grouped]:""};if(t&&"string"==typeof t){a.avatarVisibility=this.LPClassesMap.avatarDisplay;a.avatarCustomModifier=this.LPCustomizationClasses.avatarDisplay}else{a.avatarVisibility=this.LPClassesMap.avatarHidden;a.avatarCustomModifier=this.LPCustomizationClasses.avatarHidden}return a};e.getAvatarUrl=function(e){var t,i=this.appContext.conf.windowConf.agentAvatar;!0!==i&&"true"!==i||"string"!=typeof(t=function(e){var t=this.getModelParam(this.chatPath.PARTICIPANTS)||{};return t&&t[e]&&t[e].imgUrl}.call(this,e.line.originatorId)||function(e){var t=this.getModelParam(this.uiPath.AGENT_PICTURE_URL);return e.agentPictureUrl||t&&t[e.by]}.call(this,e.line))&&(t=this.appContext.conf.windowConf.agentAvatarUrl);return t};e.setLineAndTsGrouping=function(e,t,i){var n=e.line.localId;this.isLineGroupingEnabled&&this.addClass(i,"lp_grouped");this.isTimeStampAbove||this.addClass(i,"lp_ts_bottom");e.replace&&r.call(this,e.line);this.appContext.events.bind({appName:"*",eventName:this.VCEvents.LINE_UPDATE+n,context:this,func:this.handleLineUpdate(e.line)});this.isLineGroupingEnabled&&!function(e,t){var i=t.localId,i=e.querySelector("#"+this.LPClassesMap.lineBubble+i);{t.textType!==this.appConsts.RichContent.RICH_CONTENT_LINE&&t.type!==this.appConsts.chatEvents.RICH_CONTENT||t.source;this.bindViewEvent({view:i,DOMEvent:"mouseover",callback:l.bind(this,e,!0,t),context:this});this.bindViewEvent({view:i,DOMEvent:"mouseout",callback:l.bind(this,e,!1,t),context:this});if(!this.appContext.deviceDetector.isDesktop()){this.bindViewEvent({view:i,DOMEvent:"touchstart",callback:l.bind(this,e,!0,t),context:this});this.bindViewEvent({view:i,DOMEvent:"touchend",callback:l.bind(this,e,!1,t),context:this})}}}.call(this,i,e.line);this.agentAvatarPaddingEnabled&&this.avatarEnabled&&this.addClass(i,"avatar-padding");n={newValue:{initial:!0},dirOnView:e&&e.replace||!1};a.call(this,e.line,n,i)};e.addWrapperBubbleClass=function(e,t){this.lineStyle[e.line.source]===this.LINE_STYLE.CURVY&&this.addClass(t,this.LPClassesMap.lineWrapperBubble)};function o(e,t,i){var n=e.className.match(this.STATE_CLASS_PREFIX_REGEX),n=this.SENT_STATE_MAP[n];if((t.state=n)===i.nextLine.state&&!function(e){return e===this.SENT_STATE_MAP.state_ERROR||e===this.SENT_STATE_MAP.state_image_ERROR||e===this.SENT_STATE_MAP.state_image_RETRY}.call(this,n)){t=this.getFirstElement(this.LPViewMap.state,e);this.addClass(t,"lpHide")}}function s(e,t){var i=this.getFirstElement(".lp_time",e),e=this.getFirstElement(".lp_time_bottom",e);if(t)if(this.isTimeStampAbove){this.removeClass(i,"lpHide");this.addClass(e,"lpHide")}else{this.removeClass(e,"lpHide");this.addClass(i,"lpHide")}else{this.addClass(i,"lpHide");this.addClass(e,"lpHide")}}function a(e,t,i){var n=t.newValue,a=e.localId,a=this.getFirstElement("#"+this.LPClassesMap.line+a,window)||i;t.dirOnView&&(a=i);if(this.isLineGroupingEnabled){if(n.grouped){!function(e,t,i){if(this.lineStyle[t.source]===this.LINE_STYLE.CURVY){var n=this.getFirstElement(this.LPViewMap.bubble,e);this.removeClass(n,this.LPClassesMap.grouped[t.grouped]);this.addClass(n,this.LPClassesMap.grouped[i.grouped])}else{t=this.getFirstElement("."+this.LPClassesMap.lineArrow,e),n=this.getFirstElement("."+this.LPClassesMap.lineBoarder,e);this.addClass(t,"lpHide");this.addClass(n,"lpHide")}}.call(this,a,e,n);"end"===e.grouped&&(e.grouped=n.grouped)}"start"===e.grouped&&(a.style.marginTop="20px");!n.nextLine||"body"!==e.grouped&&"start"!==e.grouped||"visitor"!==e.source||o.call(this,a,e,n);s.call(this,a,function(e,t){var i=this.isTimeStampAbove&&"start"===e.grouped,t=!this.isTimeStampAbove&&("end"===e.grouped||(!t||t.source!==e.source)&&"start"===e.grouped||t&&t.by!==e.by);return i||t}.call(this,e,n.nextLine));this.avatarEnabled&&"agent"===e.source&&!function(e,t){(e=this.getFirstElement(this.LPViewMap.avatarImage,e))&&(e.style.opacity=t?"1":"0")}.call(this,a,function(e,t){return"agent"===e.source&&(!t||"end"===e.grouped||"start"===t.grouped||"agent"!==t.source)}.call(this,e,n.nextLine))}else s.call(this,a,!0);!0===n.dispose&&r.call(this,e)}function r(e){this.appContext.events.unbind({appName:"*",eventName:this.VCEvents.LINE_UPDATE+e.localId})}function l(e,t,i,n){var a=i.localId,o="visitor"===i.source,a=e.querySelector("#"+this.LPClassesMap.lineBubble+a),s=this.getFirstElement(this.LPViewMap.timeAndSender+"_side",e),r=null;o&&(r=this.getFirstElement(this.LPViewMap.state,e));if(t){s.style.display="inline-block";if(r){r.style.width="auto";s.style.position="absolute";this.appConsts.chatEvents.FILE_SHARING===i.type&&"visitor"===i.source?s.style.right=132+r.offsetWidth+10+"px":s.style.right=0+a.offsetWidth+r.offsetWidth+4+"px";0===r.offsetWidth?s.style.bottom="-10px":0<r.childElementCount&&(s.style.bottom="-8px");r.style.width=""}else if((i.textType===this.appConsts.RichContent.RICH_CONTENT_LINE||i.type===this.appConsts.chatEvents.RICH_CONTENT)&&"agent"===i.source){o=this.getFirstElement(".lp-json-pollock-layout-carousel",e);o?o.style.display="inline-block":s.style.display="none"}}else s.style.display="none"}function p(e,t,i,n){var a,o=e.text||i.translate(e.textKey);if("visitor"===e.source){t.innerHTML="";a=i.sanitizeText(o,{noFormatLink:!0}).text;t.innerHTML=a}else if(!1===i.sanitize)t.innerHTML=o;else{-1!==(a=i.sanitizeText(o,{noFormatLink:n}).text).indexOf("idnv_question")&&(a=i.removeElementByType(["IMG","A"],a));t.innerHTML=a}}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var o=lpTag.lpUtils;lpTag.unifiedWindow.AutoMessageViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"AutoMessageViewController",applicationType:"AutoMessageViewController",templateFileName:"<div class='lp_chat_line_wrapper lp_chat_line_wrapper_auto lpc_message-area lpc_message-area_auto {{deviceClass}}' role='list'><div class='lp_time lp_chat_line_auto_message lpc_message-area__timestamp lpc_message-area__timestamp_auto {{deviceClass}}' data-lp-cust-id='transcript_time' role='listitem'><span>{{text}}</span><span class='lp_time_separator'> - </span><time class='lp_time_value' data-lp-cust-id='transcript_time_value' datetime='{{datetime}}'>{{time}}</time></div>{{html}}</div>",LPViewMap:{autoMessage:".lp_chat_line_auto_message"},LPClassesMap:{underline:"lp_underline"},initialize:function(e){this.featureStateManager=this.appContext.featureStateManager;this.isLineGroupingEnabled=this.featureStateManager.isLineGroupingEnabled();!function(){var e;if(this.appContext.conf.unifiedConf.displayShortlyMessage){e=this.appContext.translator.dictionary.getString("transcriptShortlyMessage");this.appContext.translator.extendDictionary({transcriptTtrMessage:e},{locale:this.appContext.conf.engConf.lang})}}.call(this)},events:function(){this.appContext.events.bind({appName:"*",eventName:this.VCEvents.UPDATE_TIME_STAMP,context:this,func:e})},dispose:function(){this.appContext.events.unbind({appName:"*",eventName:this.VCEvents.UPDATE_TIME_STAMP,context:this,func:e})}});lpTag.unifiedWindow.AutoMessageViewController.prototype.createAutoMessage=function(e){var i,t=e.line.time?this.timeStampManager.getSideTimeString(e.line.time):"",n=e.line.time?new Date(e.line.time).toISOString():"",a=this.translate(e.line.textKey);this.view=this.createView({template:this.templateFileName,wrapWithDiv:!1,callback:function(e){var t=this.getFirstElement(this.LPViewMap.autoMessage,e);t&&t.innerHTML&&(t.innerHTML=t.innerHTML.replace(/(\r\n|\n|\r)/gm,"<br/>"));this.isLineGroupingEnabled&&this.addClass(e,"lp_grouped");o.runCallback(i.callback,i.context,{view:e,line:i.line})},textInjection:{text:a,html:(i=e).line.html||"",time:t,datetime:n,_id:e.line.localId||""}});e.line.hasSeparator&&this.addClass(this.LPViewMap.autoMessage,this.LPClassesMap.underline)};function e(e){var t=this.getFirstElement(this.LPViewMap.autoMessage,this.view),t=this.getFirstElement("time",t);if(t){var i=e.line.time?this.timeStampManager.getSideTimeString(e.line.time,!1,!0):"",e=e.line.time?new Date(e.line.time).toISOString():"";t.textContent=i;t.dateTime=e}}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e,n=lpTag.lpUtils;lpTag.unifiedWindow.SecureFormLineViewController=lpTag.unifiedWindow.ChatLineViewController.extend({ControllerName:"SecureFormLineViewController",applicationType:"SecureFormLineViewController",appName:"secureForm",sanitize:!0,LINK_TEMPLATE:"<a href='javascript:void(0);' role='button' id='{{uniqueId}}' data-lp-point='lp_secure_form_line' title='{{title}}' target='_self' class='{{className}}'>{{formName}}</a>",TITLE_KEY_PREFIX:"secureForm_link_title_",LPViewMap:{link:".lp_secure_form_line"},LPClassesMap:{link:"lp_secure_form_line"},initialize:function(e){this.hide()},events:function(){this.appContext.events.bind({appName:"*",eventName:this.VCEvents.SLIDER_CLOSED,context:this,func:t});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.SECURE_FORM,eventName:lpTag.unifiedWindow.consts.SecureForm.HIDE_CONVO,context:this,func:a})}});(e=lpTag.unifiedWindow.SecureFormLineViewController.prototype).dispose=function(){this.appContext.events.unbind({appName:"*",eventName:this.VCEvents.SLIDER_CLOSED,context:this,func:t});this.appContext.events.unbind({appName:lpTag.unifiedWindow.apps.SECURE_FORM,eventName:lpTag.unifiedWindow.consts.SecureForm.HIDE_CONVO,context:this,func:a});lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};e.createSecureFormLine=function(e){var i,t=e&&e.line;t&&this.createLine({line:function(e){var t,i=e.by||this.appContext.translator.translate("agent");for(t in e)e[t]&&"string"==typeof e[t]&&(e[t]=this.sanitizeText(e[t]).text);i=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(i).cleanText;this.translator.extendDictionary({agentName:i},{locale:this.appContext.conf.engConf.lang});i=this.createView({template:this.LINK_TEMPLATE,wrapWithDiv:!1,doNotAddChild:!0,textInjection:{uniqueId:e.uniqueId,className:this.LPClassesMap.link,formName:e.formName,title:this.translate(this.TITLE_KEY_PREFIX+e.textKey)}});this.translator.extendDictionary({secureFormName:i.outerHTML},{locale:this.appContext.conf.engConf.lang});e.text=this.translate(e.textKey);return e}.call(this,t),callback:(i=e,function(e){e=e.view||e;!function(e){e=this.getFirstElement(this.LPViewMap.link,e);this.bindViewEvent({view:e,DOMEvent:"click",callback:this.fireClickEvent,context:this})}.call(this,e);n.runCallback(i.callback,i.context,{view:e,line:i.line});e=i&&i.line;if(this.appContext.conf.unifiedConf.connectorsSfConfig&&e){var e=e.uniqueId,t=this.appContext.conf.unifiedConf.connectorsSfConfig.invitationId;if(e&&t&&e===t){t=document.getElementById(e);if(t){t.setAttribute("data-sf-connector","true");t.click();a()}}}}),context:this})};e.fireClickEvent=function(e){var t=e&&e.target&&e.target.getAttribute("data-sf-connector");if(!navigator.onLine||this.appContext.connectionUnavailable)return e.preventDefault(),!1;this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.SECURE_FORM,eventName:lpTag.unifiedWindow.consts.SecureForm.LINK_CLICKED,data:{uniqueId:e.sourceElement.id,isFromConnector:t}});this.currentOpenSFLink=e.sourceElement};function a(){var e=document.getElementsByClassName("lp_header"),t=document.getElementsByClassName("lp_main");i(e);i(t);e=document.getElementsByClassName("lp_slider");e[1]&&(e[1].style.width="100%")}function i(e){for(var t=0;t<e.length;t++)e[t]&&(e[t].hidden=!0)}function t(){var e;(e=this.currentOpenSFLink||(e=this.getElements(this.LPViewMap.link))[e.length-1])&&e.focus&&e.focus()}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var a,e,o,u=lpTag.lpUtils,i=lpTag.unifiedWindow.consts,s=lpTag.unifiedWindow.MessageState,r=lpTag.JsonPollock,l=lpTag.unifiedWindow.richContentStates,p=lpTag.unifiedWindow.consts.richContentActionTypes,t=lpTag.unifiedWindow.structuredContentTypes,n=lpTag.unifiedWindow.events.richContent,d=lpTag.unifiedWindow.apps.RICH_CONTENT,c="data-conv-id",h={};lpTag.unifiedWindow.RichContentViewController=lpTag.unifiedWindow.ChatLineViewController.extend({ControllerName:"RichContentViewController",applicationType:"RichContentViewController",templateFileName:"<div id='lp_line_{{_id}}' class='lp_chat_line_wrapper lp_{{source}} {{avatarVisibility}} lpc_message-area lpc_message-area_{{source}} lpc_message-area_{{avatarCustomModifier}} {{deviceClass}}' role='list'><div class='lp_time lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div><img class='agent_avatar lpc_message-area__avatar lpc_message-area__avatar_{{source}} lpc_message-area__avatar_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='agentAvatarUrl' alt='{{sender}}' role='listitem' aria-hidden='true'><div id='lp_line_bubble_{{_id}}' tabindex='-1' class='lp_rich_content_line lpc_message lpc_message_{{source}} lpc_message_card lpc_message_{{avatarCustomModifier}} {{deviceClass}} {{grouped}}' data-lp-point='lineBubble' data-lp-cust-id='transcript_bubble_rich_content' role='listitem'><div class='lp_title_text lpc_message__text lpc_message__text_{{source}} lpc_message__text_card lpc_message__text_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_rich_content_text'></div></div><div class='lp_time lp_time_bottom lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}} lpHide' data-lp-cust-id='transcript_time' role='listitem'><span title='{{stateToolTip}}' aria-label='{{stateToolTip}}' data-lp-point='lp_line_state' data-lp-cust-id='transcript_time' class='lpc_message-area__indicator lpc_message-area__indicator_{{source}} {{deviceClass}} lp_line_state lp_{{source}}_rich_content_state'>{{state}}</span><div class='lp_sender'>{{sender}}</div>{{time}}</div></div>",LPViewMap:{avatarImage:".agent_avatar",lineText:".lp_title_text",richContentRoot:".lp_rich_content_line"},LPCustomizationClasses:{button:"lpc_card__button",horizontal:"lpc_card_horizontal",image:"lpc_card__image",map:"lpc_card__map",text:"lpc_card__text",vertical:"lpc_card_vertical",card:"lpc_card",avatarDisplay:"avatar-shown",avatarHidden:"avatar-hidden"},initialize:function(e){a=e.appContext.events;this.lineStateSupported=e.appContext.conf.engConf.async;this.SCToDisable=[];f.call(this);r.init({onAfterElementRendered:function(e,t){!function(e,t){switch(t.type){case r.TEMPLATE_TYPES.VERTICAL:e.classList.add(this.LPCustomizationClasses.card);e.classList.add(this.LPCustomizationClasses[t.type]);break;case r.TEMPLATE_TYPES.IMAGE:case r.TEMPLATE_TYPES.BUTTON:case r.TEMPLATE_TYPES.MAP:case r.TEMPLATE_TYPES.TEXT:e.classList.add(this.LPCustomizationClasses[t.type]);break;case r.TEMPLATE_TYPES.HORIZONTAL:e.classList.add(this.LPCustomizationClasses.card);e.classList.add(this.LPCustomizationClasses[t.type]);break;case r.TEMPLATE_TYPES.CAROUSEL:}e.classList.add(lpTag.unifiedWindow.customization.deviceClass);return e}.call(this,e,t);return e}.bind(this)})},events:function(){r.registerAction(p.LINK,function(e){var t=e.actionData.web&&e.actionData.web.uri||e.actionData.uri;"self"===e.actionData.target?window.location.assign(t):"slideout"===e.actionData.target?a.trigger({appName:d,eventName:lpTag.unifiedWindow.consts.RichContent.LINK_CLICKED,data:{url:t,actionData:e.actionData}}):window.open(t,"_blank").opener=null;C.call(this,e)}.bind(this));r.registerAction(p.NAVIGATE,function(e){var t=y(e),t={query:t.la+","+t.lo},t=lpTag.taglets.lpUtil.addQueryParams(i.googleMapsUrl,t);window.open(t,"_blank").opener=null;C.call(this,e)}.bind(this));r.registerAction(p.PUBLISH_TEXT,function(e){w.call(this)&&C.call(this,e)}.bind(this));r.registerAction(p.CAROUSEL_OFFSET_CHANGE,function(e){var t=lpTag.taglets.lpUtil.getPropertyFromObject(e,"uiEvent.target.parentElement.parentElement.parentElement.parentElement.parentElement");if(t&&t.classList.contains("lp_chat_line_wrapper")){var i=this.getFirstElement(this.LPViewMap.avatarImage,t),t=this.getFirstElement(this.LPViewMap.richContentRoot,t);if(0===e.offset&&0===e.prevOffset){this.removeClass(i,"shown");this.addClass(i,"hidden");this.addClass(t,"stretch")}else{this.removeClass(i,"hidden");this.addClass(i,"shown");this.removeClass(t,"stretch")}}else this.logger.error("Error while trying to set Carousel Offset",this.ControllerName)}.bind(this));r.registerAction(p.CHECKED,function(e){var t,i=e.actionData&&e.actionData.type,n=!this.appContext.conf.unifiedConf.isMessaging||_.call(this,e.uiEvent.target);e.groupID&&(t=e.groupID);var a=T(e),o=E(e),s=y(e),r=Array.isArray(o)?o[0]:o;if(n&&!a&&i===p.CHECKED&&t){this.SCActionData||(this.SCActionData={});this.SCMetadata||(this.SCMetadata={});n=s.publishText;this.SCMetadata[t]||(this.SCMetadata[t]=[]);this.SCActionData[t]||(this.SCActionData[t]=[]);if(e.uiEvent.target.checked){this.SCActionData[t].push(n);this.SCMetadata[t]=this.SCMetadata[t].concat(o)}else{for(var a=lpTag.taglets.lpUtil.indexOf(this.SCActionData[t],n),l=(-1<a?this.SCActionData[t].splice(a,1):this.logger.error("checked actionData item does not exist!!!",this.ControllerName),-1),d=0;d<this.SCMetadata[t].length;d++){var c=this.SCMetadata[t][d];if(u.isSameObject(c,r)){l=d;break}}-1<l?this.SCMetadata[t].splice(l,1):this.logger.error("checked metadata item does not exist!!!",this.ControllerName)}}}.bind(this));r.registerAction(p.SUBMIT_AS_TEXT,function(e){if(function(){var e=!1,t=!1;if(this.SCMetadata)for(var i in this.SCMetadata)if(Array.isArray(this.SCMetadata[i])&&0<this.SCMetadata[i].length){e=!0;break}if(this.SCActionData)for(var n in this.SCActionData)if(Array.isArray(this.SCActionData[n])&&0<this.SCActionData[n].length){t=!0;break}return e&&t}.call(this)&&w.call(this)){var t=e.actionData&&e.actionData.type,i=this.appContext.conf.unifiedConf,n=!i.isMessaging||_.call(this,e.uiEvent.target),a=[],o=[],s=T(e);if(n&&!s){a=v.call(this,this.SCMetadata);b.call(this,a,l.ACTION_EVENT)}if(t===p.SUBMIT_AS_TEXT){a=v.call(this,this.SCMetadata);o=v.call(this,this.SCActionData);b.call(this,a,l.SUBMIT_AS_TEXT,o);i&&i.setInputFocusAfterPublishTextClick&&S(this.appContext.events)}f.call(this);e.formEl&&!function(e,t){var i;if("checkbox"===t){if(0<(i=e.querySelectorAll("input[type=checkbox]")).length)for(var n=0;n<i.length;n++){var a=i[n];(a.checked||a.getAttribute("checked"))&&(a.checked=!1)}}else this.logger.error("the element is currently not supported!!!")}.call(this,e.formEl,"checkbox")}}.bind(this));r.registerAction(p.DATE_PICKER,function(e){var t=y(e);a.trigger({appName:lpTag.unifiedWindow.apps.DATE_PICKER,eventName:lpTag.unifiedWindow.events.viewController.DATE_PICKER_SHOW,data:{header:t.title,type:t.class,minDate:t.minDate,maxDate:t.maxDate,dateFormat:t.dateFormat}});C.call(this,e)}.bind(this));r.registerAction(p.SCHEDULE_SLOT_LIST,function(e){var t=y(e);a.trigger({appName:lpTag.unifiedWindow.apps.SCHEDULE_LIST,eventName:lpTag.unifiedWindow.events.viewController.SCHEDULE_LIST_SHOW,data:{header:t.title,slots:t.slots,firstDayOfTheWeek:t.firstDayOfTheWeek}});C.call(this,e)}.bind(this));r.registerAction(p.ADD_TO_CART,function(e){lpTag.hooks&&lpTag.hooks.exec&&lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.ON_ADD_TO_CART,data:e})}.bind(this));!function(){this.appContext.events.bind({appName:d,eventName:n.DISABLE_RICH_CONTENT,context:this,func:g})}.call(this)}});(e=lpTag.unifiedWindow.RichContentViewController.prototype).createRichContentLine=function(e){if(e){var t=function(e){var t,i=this.appContext.conf.windowConf.agentAvatar;!0!==i&&"true"!==i||"string"!=typeof(t=function(e){var t=this.getModelParam(this.chatPath.PARTICIPANTS)||{};return t&&t[e]&&t[e].imgUrl}.call(this,e.line.originatorId)||function(e){var t=this.getModelParam(this.uiPath.AGENT_PICTURE_URL);return e.agentPictureUrl||t&&t[e.by]}.call(this,e.line))&&(t=this.appContext.conf.windowConf.agentAvatarUrl);return t}.call(this,e);if((i=e)&&i.line&&(i.line.text||i.line.textKey||i.line.json)){o=e.line.sequenceId;this.view=this.createView({template:this.templateFileName,wrapWithDiv:!1,callback:function(e,t,i){var n,a=this.getFirstElement(this.LPViewMap.lineText,i);this.getFirstElement(this.LPViewMap.timeAndSender+"_side",i);!function(t,e){var i,n;i=function(t){function n(e){for(var t=new RegExp("#md#\\[(.*?)]\\((.*?)\\)#/md#","gim");null!==(a=t.exec(e));){var i=a[0],n=a[2]||"",a=a[1]||"";n&&a&&(e=e.replace(i,"<a href='"+n+"' target='_blank'>"+a+"</a>"))}return e}try{"string"==typeof t?t=n(t):function t(i){"object"==typeof i&&Object.keys(i).forEach(function(e){"string"==typeof i[e]?i[e]=n(i[e]):t(i[e])})}(t);return t}catch(e){this.logger.error("Error when trying to convert markdown links to HTML in rich content: "+e.message,this.ControllerName);return t}}(i=lpTag.HtmlSanitizerUtils.sanitizeHtml(t.text).cleanText||t.json);try{n=r.render(i);t.convId&&!function(e,t){var i=e.querySelectorAll("*");if(0<i.length)for(var n=0;n<i.length;n++)"function"==typeof i[n].onclick&&i[n].setAttribute(c,t)}(n,t.convId);e.appendChild(n);b.call(this,t,l.DISPLAYED)}catch(e){t.state=s.FAILED;this.logger.error("Error when trying to render rich content: "+e.message,this.ControllerName)}}.call(this,e.line,a);"agent"!==e.line.source&&this.applyDirOnElement(a,e.line.text);if(t&&"string"==typeof t&&(n=this.getFirstElement(this.LPViewMap.avatarImage,i))){n.src=t;n.style.marginBottom="8px"}if(!t&&(n=this.getFirstElement(this.LPViewMap.avatarImage,i))){n.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D";n.height="0";n.width="0"}this.addWrapperBubbleClass.call(this,e,i);this.setLineAndTsGrouping.call(this,e,t,i);u.runCallback(e.callback,e.context,{view:i,line:e.line})}.bind(this,e,t),textInjection:function(e,t){var i,n,a=this.appContext.conf.windowConf.readNotificationsType||this.LPReadNotificationsTypes.text.value,o=this.translate("messagingState_"+e.line.state);if(e&&e.line){if(this.lineStateSupported){i=this.getLineStateText(a,e.line);n=e.line.state?this.STATE_CLASS_PREFIX+e.line.state:void 0}var a=e.line.time?this.timeStampManager.getTimeString(e.line.time):"",s=e.line.time?this.timeStampManager.getSideTimeString(e.line.time,!this.timeStampGroupingEnabled):"";s={_id:e.line.localId,source:e.line.source,sender:function(e){var t="";switch(e.source){case"agent":t=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(e.by).cleanText;break;case"visitor":t=this.getModelParam(this.chatPath.VISITOR_NAME);break;case"system":t=this.translate("info")}return t}.call(this,e.line),time:a,sideTime:s,state:i||"",stateToolTip:i?o:"",stateClass:n||"",grouped:e.line.grouped?this.LPClassesMap.grouped[e.line.grouped]:""};if(t&&"string"==typeof t){s.avatarVisibility=this.LPClassesMap.avatarDisplay;s.avatarCustomModifier=this.LPCustomizationClasses.avatarDisplay}else{s.avatarVisibility=this.LPClassesMap.avatarHidden;s.avatarCustomModifier=this.LPCustomizationClasses.avatarHidden}}return s}.call(this,e,t)});f.call(this);!function(e){if(e&&e.line&&e.line.state!==s.FAILED){var t=lpTag.HtmlSanitizerUtils.sanitizeHtml(e.line.text).cleanText||e.line.json,e=lpTag.unifiedWindow.applicationUtils.cloneObj(e.line);try{"string"==typeof t&&(e.text=JSON.parse(t));if(e&&m.call(this,e)){var i={view:this.view,line:e,updated:!1};this.SCToDisable.push(i)}}catch(e){this.logger.error("Error when trying to disable rich content: "+e.message,this.ControllerName);this.logger.error(e,this.ControllerName)}}}.call(this,e);a.trigger({appName:d,eventName:this.EventName.viewController.UPDATE_ACCESSIBILITY_MESSAGE,data:this.translate("a11yNewStructuredContent")})}}var i};e.dispose=function(){r&&r.unregisterAllActions&&r.unregisterAllActions();!function(){this.appContext.events.unbind({appName:d,eventName:n.DISABLE_RICH_CONTENT,context:this,func:g})}.call(this);lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};function f(){this.SCMetadata={};this.SCActionData={}}function g(){if(Array.isArray(this.SCToDisable)){var i=function(){var e=this.models.chatModel.get(this.chatPath.LINES);e=lpTag.unifiedWindow.applicationUtils.sortByKeyValue(e,"time");return Array.isArray(e)&&0<e.length&&e[e.length-1]||{}}.call(this);this.SCToDisable.forEach(function(e){try{if(function(e){return!e.updated&&m.call(this,e.line)}.call(this,e)&&!function(e,t){return e&&t&&u.isSameObject(e.text,t.text)&&e.localId===t.localId&&e.convId===t.convId}.call(this,i,e.line)||!function(){return lpTag.unifiedWindow.State.CHATTING===this.getModelParam(this.uiPath.STATE)}.call(this)){var t=function(e){e=this.getFirstElement(this.LPViewMap.richContentRoot,e);if(e&&this.isDOMNode(e))return 0<(e=e.querySelectorAll(".lp-json-pollock-element-text")).length&&e[0]&&e[0].textContent;return null}.call(this,e.view);if(t){e.line.text=t;e.line.type="line";a.trigger({appName:d,eventName:this.EventName.richContent.UPDATE_RICH_CONTENT_LINE,data:e});e.updated=!0}}}catch(e){this.logger.error("Error when trying to disable rich content: "+e.message,this.ControllerName);this.logger.error(e,this.ControllerName)}},this);this.SCToDisable=this.SCToDisable.filter(function(e){return!e.updated})||[]}}function m(e){return lpTag.taglets.lpUtil.getPropertyFromObject(e,"text.type")===t.LIST}function v(t){var i=[];t&&lpTag.unifiedWindow.applicationUtils.objectKeysAsArray(t).forEach(function(e){i=i.concat(t[e])});return i}function w(){var e=this.getModelParam(this.uiPath.STATE),t=e===lpTag.unifiedWindow.State.CHATTING;return this.appContext.conf.engConf.async&&e!==lpTag.unifiedWindow.State.CONNECTION_ISSUE&&e!==lpTag.unifiedWindow.State.PENDING||t}function _(e){e=e.getAttribute(c);return!!e&&function(e){return this.appContext.conversationManager.isCurrentConversation(e)}.call(this,e)}function C(e){var t=e.actionData&&e.actionData.type,i=this.appContext.conf.unifiedConf,n=!i.isMessaging||_.call(this,e.uiEvent.target),a=y(e),o=T(e);n&&!o&&b.call(this,E(e),l.ACTION_EVENT);if(t===p.PUBLISH_TEXT){b.call(this,E(e),l.PUBLISH_TEXT,a);i&&i.setInputFocusAfterPublishTextClick&&S(this.appContext.events)}}function T(e){e=e.uiEvent.timeStamp;if(h[e])return!0;h[e]=!0;setInterval(function(e){delete h[e]},10);return!1}function E(e){return e&&e.metadata||[]}function y(e){return e&&e.actionData||{}}function b(e,t,i){var n={metadata:e};isNaN(parseInt(o,10))?isNaN(parseInt(e.sequenceId,10))?n.uniqueId=e.uniqueId:n.uniqueId=e.sequenceId:n.uniqueId=o;i&&(n.actionData=i);a.trigger({appName:d,eventName:t,data:n})}function S(e){e&&e.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.accessibility.SET_INPUT_FOCUS})}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var s,r,e,l,d=lpTag.lpUtils,c=lpTag.unifiedWindow.apps.FILE_SHARE;lpTag.unifiedWindow.FileSharingViewController=lpTag.unifiedWindow.ChatLineViewController.extend({ControllerName:"FileSharingViewController",applicationType:"FileSharingViewController",lineTemplateFile:{visitor:"<div id='lp_line_{{_id}}' class='lp_chat_line_wrapper lp_image_line_wrapper lp_{{source}} {{stateClass}} {{avatarVisibility}} lpc_message-area lpc_message-area_{{source}} lpc_message-area_{{source}}-fs lpc_message-area_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_{{source}}_parent' role='list'><div class='lp_time lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{source}}-fs lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}}' title='{{sender}} {{time}}' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div><div id='lp_line_bubble_{{_id}}' class='lp_chat_line lp_image_sharing_line lpc_message lpc_message_{{source}} lpc_message_{{avatarCustomModifier}} lpc_message_{{source}}-fs {{deviceClass}} {{grouped}}' data-lp-point='lineBubble' data-lp-cust-id='transcript_bubble_{{source}}' role='listitem'><div class='lp_file_loader lpHide' id='lp_file_loader_{{_id}}'></div><div class='lp_chat_arrow_error_overlay lpHide' data-lp-cust-id='transcript_bubble_visitorArrow_error_overlay'></div><div class='lp_chat_arrow_border lpc_message-tail__border lpc_message-tail__border_{{source}} lpc_message-arrow-border_{{source}}-fs lpc_message-tail__border_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_{{source}}ArrowBorder'></div><div class='lp_chat_arrow lpc_message-tail lpc_message-tail_{{source}} lpc_message-arrow_{{source}}-fs lpc_message-tail_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_{{source}}Arrow'></div><a class='lp_image_sharing_link' data-lp-point='image_link_{{_id}}' href='#' aria-labelledby='lp_image_caption_{{_id}}'><div class='lp_image_sharing_line_content_wrapper'><img class='lp_image_sharing_line_content'></div></a><div class='lp_image_sharing_upload_error_overlay lpHide'><div class='lp_image_sharing_upload_error'><div class='lp_TranscriptError_wrapper'><span class='lp_error_internal_text'></span></div></div></div><div class='lp_line_state_wrapper'><span id='lp_image_caption_{{_id}}' class='lp_title_text lpc_message__text lpc_message__text_{{source}} lpc_message__text lpc_message__text_{{source}}-fs lpc_message__text_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_{{source}}_text'>{{previewAttachmentLabel}}</span> <span data-lp-point='lp_line_state' data-lp-cust-id='transcript_time' class='lpc_message-area__indicator lpc_message-area__indicator_{{source}} lpc_message-area__indicator_{{source}}-fs lpc_message-area__indicator_{{avatarCustomModifier}} {{deviceClass}} lp_line_state'>{{state}}</span></div><div class='lp_time_side_wrapper'><div class='lp_time lp_time_side lpc_message-area__side-timestamp lpc_message-area__side-timestamp_{{source}} lpc_message-area__timestamp_{{source}}-fs lpc_message-area__side-timestamp_{{avatarCustomModifier}} {{deviceClass}}' title='{{sender}} {{time}}' data-lp-cust-id='transcript_time'>{{sideTime}}</div></div></div><div class='lp_time lp_time_bottom lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{source}}-fs lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}} lpHide' title='{{sender}} {{time}}' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div></div>",agent:"<div id='lp_line_{{_id}}' class='lp_chat_line_wrapper lp_image_line_wrapper lp_{{source}} {{stateClass}} {{avatarVisibility}} lpc_message-area lpc_message-area_{{source}} lpc_message-area_{{source}}-fs lpc_message-area_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_{{source}}_parent' role='list'><div class='lp_time lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{source}}-fs lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}}' title='{{sender}} {{time}}' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div><img class='agent_avatar lpc_message-area__avatar lpc_message-area__avatar_{{source}} lpc_message-area__avatar_{{source}}-fs lpc_message-area__avatar_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='agentAvatarUrl' alt='{{sender}}' role='listitem' aria-hidden='true'><div id='lp_line_bubble_{{_id}}' class='lp_chat_line lp_image_sharing_line lpc_message lpc_message_{{source}} lpc_message_{{avatarCustomModifier}} lpc_message_{{source}}-fs {{deviceClass}} {{grouped}}' data-lp-point='lineBubble' data-lp-cust-id='transcript_bubble_{{source}}' role='listitem'><div class='lp_file_loader lpHide' id='lp_file_loader_{{_id}}'></div><div class='lp_chat_arrow_border lpc_message-tail__border lpc_message-tail__border_{{source}} lpc_message-arrow-border_{{source}}-fs lpc_message-tail__border_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_{{source}}ArrowBorder'></div><div class='lp_chat_arrow lpc_message-tail lpc_message-tail_{{source}} lpc_message-arrow_{{source}}-fs lpc_message-tail_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_{{source}}Arrow'></div><a class='lp_image_sharing_link' data-lp-point='image_link_{{_id}}' href='#' aria-label='{{file_sent_from}} {{sender}}'><div class='lp_image_sharing_line_content_wrapper'><img class='lp_image_sharing_line_content' alt=''></div></a><div class='lp_image_sharing_upload_error_overlay lpHide'><div class='lp_image_sharing_upload_error'><div class='lp_image lp_failed_photo_upload lpHide'><img src='{{imagesRepository}}/error-icon.svg' alt='' aria-hidden='true'></div><div class='lp_image lp_retry_photo_upload'><img src='{{imagesRepository}}/retry-icon.svg' alt='' aria-hidden='true'></div></div></div><span class='lp_title_text lpc_message__text lpc_message__text_{{source}} lpc_message__text lpc_message__text_{{source}}-fs lpc_message__text_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_{{source}}_text'>{{text}}</span></div><div class='lp_time lp_time_side lpc_message-area__side-timestamp lpc_message-area__side-timestamp_{{source}} lpc_message-area__side-timestamp_{{avatarCustomModifier}} {{deviceClass}}' title='{{sender}} {{time}}' data-lp-cust-id='transcript_time' role='listitem'>{{sideTime}}</div><div class='lp_time lp_time_bottom lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{source}}-fs lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}} lpHide' title='{{sender}} {{time}}' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div></div>"},LPViewMap:{avatarImage:".agent_avatar",lineText:".lp_title_text",image:".lp_image_sharing_line_content",imageWrapper:".lp_image_sharing_line_content_wrapper",loader:"#lp_file_loader_",wrapper:".lp_line_state_wrapper",arrow:".lp_chat_arrow",arrowBorder:".lp_chat_arrow_border",imageLink:"^image_link_",uploadError:".lp_image_sharing_upload_error_overlay",retryUpload:".lp_retry_photo_upload",failedUpload:".lp_failed_photo_upload",lpErrorInternalText:".lp_error_internal_text",lpChatArrowErrorOverlay:".lp_chat_arrow_error_overlay"},initialize:function(e){s=e.appContext.events;r=e.appContext},events:function(){}});(e=lpTag.unifiedWindow.FileSharingViewController.prototype).createFileContentLine=function(e){if(e){var t=this.getAvatarUrl(e);if((i=e)&&i.line&&i.line.fileData){this.uniqueId=e.line.sequenceId;this.viewId=e.line.localId;i=this.getTextInjection(e,t);this.view=this.createView({template:this.lineTemplateFile[e.line.source],wrapWithDiv:!1,callback:function(e,t,i){this.view=i;var n=this.getFirstElement(this.LPViewMap.lineText,i),a=this.getFirstElement(this.LPViewMap.image,i),o=this.getFirstElement(this.LPViewMap.state,i);this.loader=this.getFirstElement(this.LPViewMap.loader+this.viewId);this.wrapper=this.getFirstElement(this.LPViewMap.wrapper,i);this.imageLink=this.getFirstElement(this.LPViewMap.imageLink+this.viewId,i);this.uploadErrorElement=this.getFirstElement(this.LPViewMap.uploadError,i);this.imageWrapper=this.getFirstElement(this.LPViewMap.imageWrapper,this.imageLink);this.retryUploadButton=this.getFirstElement(this.LPViewMap.retryUpload,i);this.failedUploadIcon=this.getFirstElement(this.LPViewMap.failedUpload,i);!function(e,t,i){var e=e.fileData,n=(i.src=e.preview,e.relativePath||""),a=n.split(".");if((n=a[a.length-1].toUpperCase())&&!u.call(this,e))switch(n){case"PNG":case"JPG":case"JPEG":case"GIF":break;case"PDF":case"DOCX":case"XLSX":case"PPTX":i.src=r.conf.unifiedConf.imagesRepository+"/"+n.toLowerCase()+"_m.png";this.addClass(this.imageWrapper,"icon");this.addClass(this.uploadErrorElement,"icon");break;default:i.src=r.conf.unifiedConf.imagesRepository+"/generic_m.png";this.addClass(this.imageWrapper,"icon");this.addClass(this.uploadErrorElement,"icon")}if(0<e.caption.length){t.innerText=lpTag.HtmlSanitizerUtils.sanitizeHtml(e.caption).cleanText;this.addClass(this.wrapper,"lp_image_caption")}else{!function(e){var t=this.getFirstElement(this.LPViewMap.arrow),i=this.getFirstElement(this.LPViewMap.arrowBorder);if(!this.featureStateManager.isLineGroupingEnabled()){this.addClass(t,"lpHide");this.addClass(i,"lpHide")}this.addClass(e,"lpHide")}.call(this,t);u.call(this,e)&&(i.style.top="unset")}}.call(this,e.line,n,a);!function(e,t){var i=r.translator.translate("previewAttachmentLabel"),t=t&&t.innerHTML&&"text"!==t.innerHTML.toLowerCase()&&""!==t.innerHTML?t.innerHTML:i;e&&e instanceof HTMLImageElement&&e.setAttribute("alt",t)}.call(this,a,n);!function(){s.bind({appName:c,eventName:lpTag.unifiedWindow.events.imageShare.FILE_DONE_UPLOADED+":"+this.viewId,func:p,context:this})}.call(this);!function(t){this.imageLink.onclick=function(e){e.preventDefault();s.trigger({appName:c,eventName:lpTag.unifiedWindow.events.imageShare.FILE_DOWNLOAD_REQUEST,data:t})}}.call(this,e.line);!function(t){var i=this;l=function(e){e.preventDefault();p.call(i,{showLoader:!0});s.trigger({appName:c,eventName:lpTag.unifiedWindow.events.imageShare.FILE_UPLOAD_RETRY,data:t})}}.call(this,e.line);"agent"!==e.line.source?this.applyDirOnElement(n,e.line.text):this.addClass(o,"lp_hidden");t&&"string"==typeof t&&(a=this.getFirstElement(this.LPViewMap.avatarImage,i))&&(a.src=t);this.addWrapperBubbleClass.call(this,e,i);this.setLineAndTsGrouping.call(this,e,t,i);d.runCallback(e.callback,e.context,{view:i,line:e.line})}.bind(this,e,t),textInjection:i})}}var i};e.dispose=function(){lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this);s.unbind({appName:c,eventName:lpTag.unifiedWindow.events.imageShare.FILE_DONE_UPLOADED+":"+this.viewId,func:p,context:this})};function u(e){return e&&e.preview===lpTag.unifiedWindow.consts.fileSharing.fallbackThumbnail.URI}function p(e){var t=this.getFirstElement(this.LPViewMap.lpErrorInternalText);this.lpChatArrowErrorOverlayElement=this.getFirstElement(this.LPViewMap.lpChatArrowErrorOverlay);e.showLoader?this.removeClass(this.loader,"lpHide"):this.addClass(this.loader,"lpHide");this.removeClass(this.uploadErrorElement,"lpHide");this.removeClass(this.uploadErrorElement,"can_retry");this.uploadErrorElement.removeAttribute("aria-labelledby");this.uploadErrorElement.removeAttribute("role");if(e.error){if(e.canRetry){this.uploadErrorElement.onclick=l;this.addClass(this.uploadErrorElement,"can_retry");this.uploadErrorElement.setAttribute("aria-labelledby","error_message_"+this.viewId);this.uploadErrorElement.setAttribute("role","button")}else{this.addClass(this.retryUploadButton,"lpHide");this.removeClass(this.failedUploadIcon,"lpHide");this.uploadErrorElement.onclick=null;delete this.uploadErrorElement.onclick}t.innerHTML=e.canRetry?r.translator.translate("messagingState_image_RETRY"):r.translator.translate("messagingState_image_ERROR");"default"===this.featureStateManager.getCustomStyle(this.featureStateManager.customStyleMap.VISITOR_BUBBLE,"default")&&this.removeClass(this.lpChatArrowErrorOverlayElement,"lpHide")}else this.addClass(this.uploadErrorElement,"lpHide")}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e;lpTag.unifiedWindow.DateLineViewController=lpTag.unifiedWindow.AutoMessageViewController.extend({ControllerName:"DateLineViewController",applicationType:"DateLineViewController",templateFileName:"<div class='lp_chat_line_wrapper lpc_message-area lpc_message-area_date {{deviceClass}}'><div id='lp_date_line_{{_id}}' class='lp_time lp_chat_line_date_message lpc_message-area__timestamp lpc_message-area__timestamp_date {{deviceClass}}' data-lp-cust-id='transcript_message' role='heading' aria-level='3'>{{html}}</div></div>",initialize:function(e){e.appContext.events;e.appContext},events:function(){}});(e=lpTag.unifiedWindow.DateLineViewController.prototype).createDateMessage=function(e){this.createAutoMessage.call(this,e)};e.dispose=function(){lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e,a=lpTag.lpUtils,n=lpTag.unifiedWindow.log;lpTag.unifiedWindow.MavenPayLineViewController=lpTag.unifiedWindow.ChatLineViewController.extend({ControllerName:"MavenPayLineViewController",applicationType:"MavenPayLineViewController",paymentRequestTemplateFileName:"<div id='lp_line_{{_id}}' class='lp_chat_line_wrapper lp_{{source}} {{avatarVisibility}} lpc_message-area lpc_message-area_{{source}} lpc_message-area_{{avatarCustomModifier}} {{deviceClass}}' role='list'><div class='lp_time lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div><img class='agent_avatar lpc_message-area__avatar lpc_message-area__avatar_{{source}} lpc_message-area__avatar_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='agentAvatarUrl' alt='{{sender}}' role='listitem' aria-hidden='true'><div id='lp_line_bubble_{{_id}}' tabindex='0' class='lp_maven_payment_line lp_maven_payment_request_line lpc_message lpc_message_{{source}} lpc_message_card lpc_message_{{avatarCustomModifier}} {{deviceClass}} {{grouped}}' data-lp-point='lineBubble' data-lp-cust-id='transcript_bubble_rich_content' role='listitem'>{{html}}<div class='lp_title_text lpc_message__text lpc_message__text_{{source}} lpc_message__text_card lpc_message__text_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_rich_content_text'><div class='lp_maven_payment_request'><div class='lp_checkout_summary'><img class='lp_maven_pay_request_icon' alt='secure lock icon' src='{{imagesRepository}}/maven-pay-request-icon.png'><div class='lp_summary_text'><div role='heading' aria-level='3' class='checkout_text'>{{checkoutText}}</div><div class='transaction_info'>{{transactionInfo}}</div><div class='checkout_total'>{{checkoutTotal}}</div></div></div><button class='lp_payment_request_button lp_maven_pay_line'>{{paymentRequestText}}</button><div class='lp_powered_by'>{{poweredByTextLeft}} <img class='lp_maven_powered_icon' alt='maven pay logo' src='{{imagesRepository}}/maven-pay-icon.png'> {{poweredByTextRight}}</div></div></div></div><div class='lp_time lp_time_bottom lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}} lpHide' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div></div>",paymentResponseTemplateFileName:"<div id='lp_line_{{_id}}' class='lp_chat_line_wrapper lp_{{source}} {{avatarVisibility}} lpc_message-area lpc_message-area_{{source}} lpc_message-area_{{avatarCustomModifier}} {{deviceClass}}' role='list'><div class='lp_time lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div><img class='agent_avatar lpc_message-area__avatar lpc_message-area__avatar_{{source}} lpc_message-area__avatar_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='agentAvatarUrl' alt='{{sender}}' role='listitem' aria-hidden='true'><div id='lp_line_bubble_{{_id}}' class='lp_maven_payment_line lp_maven_payment_response_line lpc_message lpc_message_{{source}} lpc_message_card lpc_message_{{avatarCustomModifier}} {{deviceClass}} {{grouped}}' data-lp-point='lineBubble' data-lp-cust-id='transcript_bubble_rich_content' role='listitem'>{{html}}<div class='lp_title_text lpc_message__text lpc_message__text_{{source}} lpc_message__text_card lpc_message__text_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_rich_content_text'><div class='lp_maven_payment_response'><div class='lp_success_summary'><img class='lp_maven_pay_response_icon' alt='success check mark' src='{{imagesRepository}}/maven-pay-response-icon.png'><div class='lp_summary_text'><div role='heading' aria-level='3' class='response_text'>{{responseText}}</div><div class='transaction_info'>{{transactionInfo}}</div><div class='final_price'>{{finalPrice}}</div></div></div><div class='lp_powered_by'>{{poweredByTextLeft}} <img class='lp_maven_powered_icon' alt='maven pay logo' src='{{imagesRepository}}/maven-pay-icon.png'> {{poweredByTextRight}}</div></div></div></div><div class='lp_time lp_time_bottom lpc_message-area__timestamp lpc_message-area__timestamp_{{source}} lpc_message-area__timestamp_{{avatarCustomModifier}} {{deviceClass}} lpHide' data-lp-cust-id='transcript_time' role='listitem'><div class='lp_sender'>{{sender}}</div>{{time}}</div></div>",appName:"mavenPay",sanitize:!0,LINK_TEMPLATE:"maven_pay_link.html",TITLE_KEY_PREFIX:"mavenPay_link_title_",LPViewMap:{link:".lp_maven_pay_line"},LPClassesMap:{link:"lp_maven_pay_line"},initialize:function(e){e.appContext.events;e.appContext.conf.engConf.lang||e.appContext.conf.windowConf.lang;this.lineStateSupported=e.appContext.conf.engConf.async;this.hide()},events:function(){}});(e=lpTag.unifiedWindow.MavenPayLineViewController.prototype).dispose=function(){lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};e.createMavenPayLine=function(e){try{if(e&&(i=e)&&i.line&&(i.line.text||i.line.textKey||i.line.json)){var t=function(e){var t,i=this.appContext.conf.windowConf.agentAvatar;!0!==i&&"true"!==i||"string"!=typeof(t=function(e){var t=this.getModelParam(this.chatPath.PARTICIPANTS)||{};return t&&t[e]&&t[e].imgUrl}.call(this,e.line.originatorId)||function(e){var t=this.getModelParam(this.uiPath.AGENT_PICTURE_URL);return e.agentPictureUrl||t&&t[e.by]}.call(this,e.line))&&(t=this.appContext.conf.windowConf.agentAvatarUrl);return t}.call(this,e);!function(e,t){var i=[],n=[];if(e&&e.line&&e.line.metadata){i=e.line.metadata.filter(function(e){return e.type&&"PaymentRequest"===e.type});n=e.line.metadata.filter(function(e){return e.type&&"PaymentResponse"===e.type})}0<i.length&&!function(e,t,i){e.line.sequenceId;e.line.paymentMetadata=t;this.view=this.createView({template:this.paymentRequestTemplateFileName,wrapWithDiv:!1,callback:o.bind(this,e,i),textInjection:s.call(this,e,i)})}.call(this,e,i[0],t);0<n.length&&!function(e,t,i){e.line.sequenceId;e.line.paymentMetadata=t;this.view=this.createView({template:this.paymentResponseTemplateFileName,wrapWithDiv:!1,callback:o.bind(this,e,i),textInjection:s.call(this,e,i)})}.call(this,e,n[0],t)}.call(this,e,t)}}catch(e){n.error("Error rendering maven pay: "+e)}var i};e.fireClickEvent=function(e){var t=e&&e.currentTarget&&e.currentTarget.getAttribute("data-mp-url");this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.MAVEN_PAY,eventName:lpTag.unifiedWindow.consts.MavenPay.LINK_CLICKED,data:{url:t}});this.currentOpenMPLink=e.sourceElement};function o(e,t,i){var n;if(t&&"string"==typeof t&&(n=this.getFirstElement(this.LPViewMap.avatarImage,i))){n.src=t;n.style.marginBottom="8px"}e.line&&e.line.paymentMetadata&&"PaymentRequest"===e.line.paymentMetadata.type&&!function(e,t){e=this.getFirstElement(this.LPViewMap.link,e),t=t.line&&t.line.paymentMetadata?t.line.paymentMetadata.paymentUrl:void 0;e.setAttribute("data-mp-url",t);this.bindViewEvent({view:e,DOMEvent:"click",callback:this.fireClickEvent,context:this})}.call(this,i,e);a.runCallback(e.callback,e.context,{view:i,line:e.line})}function s(i,e){var t,n;if(i&&i.line){if(this.lineStateSupported){t=this.translate("messagingState_"+i.line.state);n=i.line.state?this.STATE_CLASS_PREFIX+i.line.state:void 0}var a=i.line.time?this.timeStampManager.getTimeString(i.line.time):"",o=i.line.time?this.timeStampManager.getSideTimeString(i.line.time,!this.timeStampGroupingEnabled):"",s={_id:i.line.localId,source:i.line.source,sender:function(e){var t="";"agent"===e.source&&(t=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(e.by).cleanText);return t}.call(this,i.line),time:a,sideTime:o,state:t||"",stateClass:n||"",grouped:i.line.grouped?this.LPClassesMap.grouped[i.line.grouped]:"",imagesRepository:this.appContext.conf.unifiedConf.imagesRepository,checkoutText:this.translate("paymentRequest_CheckoutTitle"),transactionInfo:function(e){if(e&&e.line&&e.line.paymentMetadata){var t=e.line.paymentMetadata.brandTransactionLabel||e.line.paymentMetadata.transactionLabel,e=e.line.paymentMetadata.brandTransactionId||e.line.paymentMetadata.transactionId;if(t&&e&&"string"==typeof t&&"string"==typeof e&&0<t.length&&0<e.length)return t+" "+e}return""}(i),checkoutTotal:l.call(this,i.line.paymentMetadata.subtotalAmount,i.line.paymentMetadata.currencyCode),paymentRequestText:"PAY NOW",responseText:this.translate("paymentResponse_ResponseText"),finalPrice:l.call(this,i.line.paymentMetadata.transactionTotalAmount,i.line.paymentMetadata.currencyCode),poweredByTextLeft:this.translate("paymentRequest_PoweredByLeftText"),poweredByTextRight:this.translate("paymentRequest_PoweredByRightText"),html:""};if(i.line.paymentMetadata.lineItems&&0<i.line.paymentMetadata.lineItems.length){var r=this;this.loadResource("<div class='lp_title_text lpc_bottom_gap lpc_message__text lpc_message__text_{{source}} lpc_message__text_card lpc_message__text_{{avatarCustomModifier}} {{deviceClass}}' data-lp-cust-id='transcript_bubble_rich_content_text'><div class='lp_maven_payment_request_items'><div class='lp_checkout_items_header'><div class='lp_maven_pay_items_title'>{{YourCart}}</div><div class='lp_maven_pay_items_brand'>{{brandName}}</div></div><div class='lp_checkout_items'>{{html}}</div></div></div>",function(e){i.line.paymentMetadata.lineItems.forEach(function(e){var t=Object.assign({priceFormatted:l.call(this,e.price,i.line.paymentMetadata.currencyCode),imageClass:"",YourCart:r.translate("paymentRequest_YourCart")},e);if(!t.imageUrl){t.imageUrl="";t.imageClass="hide"}r.loadResource("<div class='lp_checkout_item_row'><div class='item_image {{imageClass}}'><img src='{{imageUrl}}' alt='Image of {{name}}'></div><div class='item_texts'><div class='item_name' title='{{name}}'>{{name}}</div><div class='item_description'>{{description}}</div></div><div class='item_price' title='{{priceFormatted}}'>{{priceFormatted}}</div></div>",function(e){e=r.injectTextDefaults(e,t);s.html+=e})});s.brandName=i.line.paymentMetadata.brandName;e=r.injectTextDefaults(e,s);s.html=e})}if(e&&"string"==typeof e){s.avatarVisibility=this.LPClassesMap.avatarDisplay;s.avatarCustomModifier=this.LPCustomizationClasses.avatarDisplay}else{s.avatarVisibility=this.LPClassesMap.avatarHidden;s.avatarCustomModifier=this.LPCustomizationClasses.avatarHidden}}return s}function l(e,t){t=t||"USD";return new Intl.NumberFormat(this.language,{style:"currency",currency:t,currencyDisplay:"narrowSymbol"}).format(e)}}();!function(){var t,e,i=".close_overlay",n=".lp_download_inline",a=".lp_preview_download_message",o=".lp_file_loader",s=".lp_preview_image",r=".lp_preview_title",l=".lp_preview_caption",d=".lp_overlay",c=1,u=5,p=40,h="lp_overlay",f=300,g=300,m=!0,v=!0;lpTag.unifiedWindow.PhotoOverlayViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"PhotoOverlayViewController",initialize:function(e){this.appContext=t=e.appContext;this.imageURL=e.imageURL;this.timestamp=this.getTimestampString(e.timestamp);this.captionText=e.caption||"";this.line=e.line;this.type=e.type},render:function(){this.view=this.createView({template:"<div class='lp_overlay' role='dialog' aria-modal='true' aria-label='{{previewAttachmentLabel}}'><div class='lp_overlay_header'></div><div class='lp_preview_title' tabindex='-1' aria-label='{{timeStamp}}'>{{timeStamp}}</div><button title='{{tooltip_Close}}' aria-label='{{tooltip_Close}}' class='lp_close close_overlay' data-lp-point='close' role='button'><img src='{{imagesRepository}}/close-icon.svg' alt='{{tooltip_Close}}'></button><div class='lp_file_loader'></div><img src='{{imageURL}}' class='lp_preview_image'><div class='lp_preview_caption lpHide' aria-label='{{caption}}'>{{caption}}</div><div class='lp_preview_download_message lpHide'>{{tooltip_Download}}</div><button title='{{tooltip_Download}}' aria-label='{{tooltip_Download}}' class='lp_download lp_download_inline lpHide' data-lp-point='download' role='button'><img src='{{imagesRepository}}/download-icon.png' alt='{{tooltip_Download}}'></button></div>",wrapWithDiv:!1,callback:function(e){this.closeButton=this.getFirstElement(i,e);this.downloadButton=this.getFirstElement(n,e);this.downloadMessage=this.getFirstElement(a,e);this.loader=this.getFirstElement(o,e);this.image=this.getFirstElement(s,e);this.title=this.getFirstElement(r,e);this.caption=this.getFirstElement(l,e);this.overlay=this.getFirstElement(d,e);this.closeButton.onclick=C.bind(this);this.closeButton.onkeypress=C.bind(this);this.image.onload=function(){this.addClass(this.loader,"lpHide");v=!0;this._showInformation();if(0<this.captionText.length){this.removeClass(this.caption,"lpHide");this.caption.setAttribute("tabindex","0");window.addEventListener("resize",_.bind(this));_.call(this)}else if(this.type){window.addEventListener("resize",_.bind(this));_.call(this)}this.downloadButton.classList.contains("lpHide")&&this.downloadButton.remove();this._showInformation()}.bind(this);this.image.onerror=C.bind(this);if(this.type){this.addClass(this.image,"clickable");this.image.onclick=T.bind(this);this.removeClass(this.downloadMessage,"lpHide");this.removeClass(this.downloadButton,"lpHide");this.downloadMessage.onclick=T.bind(this);this.downloadButton.onclick=T.bind(this)}this.downloadButton.classList.contains(".lpHide")&&this.downloadButton.setAttribute("tabindex","-1");this._hideInformation=S.bind(this);this._showInformation=b.bind(this);if(this.appContext.deviceDetector.isDesktop()){this.bindViewEvent({selector:d,callback:b,DOMEvent:"mousemove",context:this});this.bindViewEvent({selector:d,callback:S,DOMEvent:"mouseleave",context:this});this._hideInformation()}else this.bindViewEvent({selector:s,callback:E,DOMEvent:"click",context:this});this.bindViewEvent({selector:d,callback:y,DOMEvent:"click",context:this});this.bindViewEvent({selector:d,DOMEvent:"keydown",callback:w,context:this});t.events.trigger({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.SHOW_PREVIEW,data:e})}.bind(this),textInjection:{tooltip_Close:this.translate("close")||"close",previewAttachmentLabel:this.translate("attachedImageLabel")||"Attached image",imagesRepository:this.appContext.conf.unifiedConf.imagesRepository,imageURL:this.imageURL,timeStamp:this.timestamp,caption:this.captionText}});this.closeButton.focus()},getTimestampString:function(e){var e=new Date(e),t="";if(e.getTime()){var i=e.getMonth(),n=e.getDate(),a=e.getHours(),e=e.getMinutes(),o=this.getMonthNames(),s="",r="am",o=(o&&(s=o[i]),(e<10?"0":"")+e);if(12<=a){r="pm";13<=a&&(a-=12)}else a<1&&(a+=12);t=this.templateString("{{dayOfMonth}} {{month}}, {{hour}}:{{minutes}} {{ampm}}",{month:s,dayOfMonth:n,hour:a,minutes:o,ampm:r})}return t}});function w(e){var t=e.keyCode,t=9===t||"Tab"===t.key;if(t){this._showInformation();var i=this.overlay.querySelectorAll('a:not([tabindex="-1"]), button:not([tabindex="-1"]), input:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"]), iframe:not([tabindex="-1"])');if(0!==i.length){var n=i[0],i=i[i.length-1];if(t&&e.target===i){e.preventDefault();n.focus()}if(t&&e.shiftKey&&e.target===n){e.preventDefault();i.focus()}}}}function _(){if(this.image){var e=this.type&&this.captionText.length?p:0,t=this.type&&this.captionText.length?e+u+this.caption.clientHeight:0,t=this.image.offsetHeight+this.image.offsetTop-this.caption.clientHeight+c+t;this.caption.style.top=t+"px";t+this.caption.clientHeight>window.innerHeight&&0<window.innerHeight-t&&(this.caption.style.height=window.innerHeight-t+"px");t=this.image.offsetLeft-c-4*e,t=(this.caption.style.left=(t=t<0?0:t)+"px",this.image.width+2*c+8*e);t>window.innerWidth&&(t=window.innerWidth);this.caption.style.width=t+"px";this.downloadMessage.style.top=this.image.offsetHeight+this.image.offsetTop+u+"px";this.downloadMessage.style.left=this.image.offsetLeft+this.image.offsetWidth/2-this.downloadMessage.offsetWidth/2-p/2+"px";this.downloadButton.style.top=this.image.offsetHeight+this.image.offsetTop+u+"px";this.downloadButton.style.left=this.image.offsetLeft+this.image.offsetWidth/2+this.downloadMessage.offsetWidth/2+"px"}}function C(){t.events.trigger({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.OVERLAY_CLOSED});window.removeEventListener("resize",_.bind(this));this.dispose();v=!1}function T(){t.events.trigger({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.FILE_DOWNLOAD_REQUEST,data:{fileData:this.line&&this.line.fileData,convId:this.line&&this.line.convId,download:!0}})}function E(){m?this._hideInformation():this._showInformation()}function y(e){e=this.hasClass(e.target,h);e&&0<e.length&&e[0]&&C.call(this)}function b(){if(!m){m=!0;this.animate(this.closeButton,{duration:g,opacity:"1"});this.animate(this.title,{duration:g,opacity:"1"});0<=this.captionText.length&&this.animate(this.caption,{duration:g,opacity:"1"})}if(this.appContext.deviceDetector.isDesktop()){clearTimeout(e);e=setTimeout(this._hideInformation,3e5)}}function S(){m=!1;this.animate(this.closeButton,{duration:f,opacity:"0"});this.animate(this.title,{duration:f,opacity:"0"});this.captionText&&0<=this.captionText.length&&this.animate(this.caption,{duration:f,opacity:"0"});v&&this.appContext.deviceDetector.isDesktop()&&clearTimeout(e)}}();!function(){var n,a={closeButton:".lp_close",image:".lp_image_preview",overlay:".lp_image_preview_background",contentWrapper:".lp_image_preview_content",inputContainer:".lp_input_area",caption:".lp_preview_caption",arrowIconButton:".lp_send_button",paperPlaneButton:"^paper_plane_button",input:".photoPreviewCaption"},o={OPEN_PREVIEW_CLASS:"open",INPUT_MARGIN_HEIGHT:20,IMAGE_TRANSITION_TIME:500,TEXT_AREA_CLASS:"photoPreviewCaption"};lpTag.unifiedWindow.PhotoPreviewViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"PhotoPreviewViewController",BUTTON_TYPES:{ARROW:"arrow",PAPER_PLANE:"paper_plane"},initialize:function(e){this.appContext=n=e.appContext;this.image=e.image;this.type=e.type;this.featureStateManager=this.appContext.featureStateManager;this.sendIconType=this.featureStateManager.getSendIconType()},render:function(){this.view=this.createView({template:"<div class='lp_image_preview_background' aria-modal='true' role='dialog' aria-labelledby='preview-header'><div class='lp_image_preview_content'><div class='lp_preview_close_wrapper'><button aria-label='{{closeAttachmentLabel}}' class='lp_close' data-lp-point='close' role='button'><span class='lp_close-icon' data-lp-type='icon'><img src='{{iconsRepository}}/sprites_v1.png' alt='{{tooltip_Close}}'></span></button></div><div class='lp_image_preview_wrapper'><h3 id='preview-header'>{{fileAttachmentPreviewLabel}}</h3><div class='lp_image_preview'></div><div class='lp_preview_caption lp_bottom_area'><div class='lp_input_area'></div><button class='lp_paper_plane_button lpc_composer__send-button {{deviceClass}}' data-lp-point='paper_plane_button' title='{{tooltip_SendIcon}}'><span class='lp_paper_plane-icon' data-lp-type='icon' data-lp-point='paper_plane_button_image'><svg class='lpc_composer__send-button-asset {{deviceClass}}' width='24px' height='24px' viewBox='0 0 23 23' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><g id='ic/light/send' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'><polygon id='Fill-7' points='0 22 22 22 22 0 0 0'></polygon><path d='M19.5,2.23218009 L19.5,17.619667 C19.5,18.1533381 18.9468217,18.5072492 18.4622874,18.2835724 L13.0202349,15.7713436 L8.67092037,20.2745151 C8.21407533,20.747521 7.41372181,20.4241223 7.41372181,19.7665191 L7.41372181,12.9910246 L2.00514597,11.2319965 C1.38375428,11.0299017 1.31921893,10.1763787 1.90315878,9.88314805 L18.4406226,1.57871144 C18.9268923,1.33452671 19.5,1.68804369 19.5,2.23218009 Z M18.5250237,2.62732828 L2.87073871,10.4882687 L8.38869809,12.2828715 L8.38869809,19.1632964 L12.8000787,14.5958634 L18.5250237,17.2386846 L18.5250237,2.62732828 Z M10.3411214,11.5458808 L9.95124199,11.1235575 C9.87631682,11.0423975 9.88137122,10.9158654 9.96253129,10.8409402 C9.96409632,10.8394954 9.96568434,10.8380757 9.96729473,10.8366816 L14.5930363,6.83228649 C14.6746678,6.76161998 14.7976521,6.76850182 14.8708901,6.84783439 L15.2607695,7.27015767 C15.3356947,7.35131775 15.3306403,7.47784983 15.2494802,7.55277499 C15.2479152,7.5542198 15.2463272,7.55563951 15.2447168,7.55703359 L10.6189753,11.5614287 C10.5373437,11.6320952 10.4143594,11.6252134 10.3411214,11.5458808 Z' fill='#000000'></path></g></svg></span></button> <button class='lp_send_button' title='{{tooltip_SendIcon}}' aria-label='{{tooltip_SendIcon}}' role='button'><span class='lp_send-icon' data-lp-type='icon'><img src='{{iconsRepository}}/sprites_v1.png' alt=''></span></button></div></div></div></div>",wrapWithDiv:!1,callback:function(e){!function(e,t){var i=this.getFirstElement(a.arrowIconButton,t),t=this.getFirstElement(a.paperPlaneButton,t);if(e===this.BUTTON_TYPES.PAPER_PLANE){this.hide(i);this.show(t)}else{this.hide(t);this.show(i)}}.call(this,this.sendIconType,e);this.closeButton=this.getFirstElement(a.closeButton,e);this.sendIconTypeToUse=this.sendIconType===this.BUTTON_TYPES.PAPER_PLANE?a.paperPlaneButton:a.arrowIconButton;this.submitButton=this.getFirstElement(this.sendIconTypeToUse,e);this.imageElement=this.getFirstElement(a.image,e);this.captionView=this.getFirstElement(a.caption,e);this.overlayElement=this.getFirstElement(a.overlay,e);this.closeButton.onclick=i.bind(this,!0);this.submitButton.onclick=i.bind(this,!1);this.textarea=new lpTag.unifiedWindow.ExpandableTextAreaViewController({appContext:this.appContext,targetView:this.getFirstElement(a.inputContainer,e),minRows:1,maxRows:10,resizeCallback:t,context:this});this.textareaDomEl=this.textarea.textarea;this.textareaDomEl.placeholder=this.translate("attachmentCaptionLabel")||"Attachment caption";this.addClass(this.textareaDomEl,o.TEXT_AREA_CLASS);!function(){var e=this.imageElement,t=this.overlayElement,i=this;if(this.type){e.style["background-image"]="url('"+this.appContext.conf.unifiedConf.imagesRepository+"/"+this.type.toLowerCase()+".png')";this.addClass(e,"icon");setTimeout(function(){i.addClass(t,o.OPEN_PREVIEW_CLASS)},10)}else{var n=new FileReader,a=new Image;n.onloadend=function(){a.src=n.result;a.onload=function(){e.style["background-image"]="url('"+n.result+"')";setTimeout(function(){i.addClass(t,o.OPEN_PREVIEW_CLASS)},10)}};n.readAsDataURL(this.image)}}.call(this);this.bindViewEvent({selector:a.input,callback:s,DOMEvent:"keypress",context:this});setTimeout(function(){this.textareaDomEl.addEventListener("keyup",function(e){"Escape"===e.key&&i.call(this,!0)}.bind(this))}.bind(this));n.events.trigger({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.IMAGE_PREVIEW_SHOW,data:e});this.appContext.deviceDetector.isDesktop()&&(this.appContext.deviceDetector.isIE()?setTimeout(function(){this.textareaDomEl.focus()}.bind(this),100):this.textareaDomEl.focus())}.bind(this),textInjection:{tooltip_Close:this.translate("close")||"close",imagesRepository:this.appContext.conf.unifiedConf.imagesRepository,iconsRepository:this.appContext.conf.unifiedConf.iconsRepository,image:this.image}})}});function i(i){this.removeClass(this.overlayElement,o.OPEN_PREVIEW_CLASS);i||n.uiStateManager.setActionsVisibility(!1);setTimeout(function(e){var t={caption:e.textarea.getValue(),image:e.image};n.events.trigger({appName:lpTag.unifiedWindow.apps.FILE_SHARE,eventName:lpTag.unifiedWindow.events.imageShare.IMAGE_PREVIEW_CLOSED,data:!i&&t});e.dispose()},o.IMAGE_TRANSITION_TIME,this)}function t(e){this.captionView.style.height=e+o.INPUT_MARGIN_HEIGHT+"px"}function s(e){var t;if(13===("which"in(t=e)?t.which:t.keyCode)){e.stopPropagation();e.preventDefault();i.call(this,!1)}}}();!function(){window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};var e,r,n,l,d="QuickRepliesDecorator",c=lpTag.chips.default,a=lpTag.taglets.lpUtil,u=lpTag.unifiedWindow.log,o=lpTag.unifiedWindow.consts,s=lpTag.unifiedWindow.apps.QUICK_REPLIES,p=lpTag.unifiedWindow.quickRepliesStates;lpTag.unifiedWindow.QuickRepliesDecorator=lpTag.unifiedWindow.QuickRepliesDecorator||function(e){u.info("construct",d);r=e.appContext;n=e.appContext.events};(e=lpTag.unifiedWindow.QuickRepliesDecorator.prototype).decorate=function(e,t,i){!function(e,t,i){try{var n=r.conf&&r.conf.unifiedConf&&r.conf.unifiedConf.rowLimit||3,a=t.quickReplies.accessibility||{},o=lpTag.unifiedWindow.language&&lpTag.unifiedWindow.language.isRTL(lpTag.unifiedWindow.language.getLocale()),s=(l=new c({el:e,items:t.quickReplies.replies,rowSize:t.quickReplies.itemsPerRow,rowLimit:n,rowWrap:i.welcomeMessage.wrapQuickReplies,accessibility:t.quickReplies.accessibility,renderer:c.Renderer.StructuredContentButton,direction:o?"rtl":"ltr"}),e.childNodes[e.childNodes.length-1]);if(s){a.web&&a.web.role||s.setAttribute("role","group");s.setAttribute("aria-labelledby","lp_line_"+t.localId);i&&i.agentAvatar&&(s.style.marginLeft="37px")}}catch(e){u.error("error when trying to render quick replies: "+e.message,d)}}(e,t,i);!function(e){if(l){l.on("action:publishText",f(function(e,t){h(e,g(t),p.ACTION_EVENT);h(e,t,p.PUBLISH_TEXT)}.bind(null,e)));l.on("action:link",f(function(e,t){var i=function(e){e=m(e);return e.web&&e.web.uri||e.uri}(t);i&&window.open(i,"_blank");h(e,g(t),p.ACTION_EVENT)}.bind(null,e)));l.on("action:navigate",f(function(e,t){var i=function(e){e=m(e),e={query:e.la+","+e.lo};return a.addQueryParams(o.googleMapsUrl,e)}(t);i&&window.open(i,"_blank");h(e,g(t),p.ACTION_EVENT)}.bind(null,e)))}else u.debug("no chips instance to bind, skipping",d)}(t)};e.dispose=t;e.readOnly=function(e){if(l){l.readonly(e);for(var t=l.el&&lpTag.lpUtils.getElementsByClass(l.el,"chips-item",[]),i=0;i<t.length;i++){var n=t[i];n.disabled=e;n.style.opacity=e?"0.5":"1.0"}}else u.debug("no chips instance to set readonly, skipping",d)};function t(){if(l){l.dispose();l=null}else u.debug("no chips instance to dispose, skipping",d)}function h(e,t,i){n.trigger({appName:s,eventName:i,data:{payload:t,sequenceId:e.sequenceId}})}function f(e){return function(){if(l){l.off("action:publishText");l.off("action:link");l.off("action:navigate")}else u.debug("no chips instance to unbind, skipping",d);t();return e.apply(null,arguments)}}function g(e){return e&&e.metadata||[]}function m(e){return e&&e.action||{}}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e,a=lpTag.taglets.lpUtil,o=null,s=!1,r=!1;lpTag.unifiedWindow.SurveyViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"SurveyViewController",applicationType:"SurveyViewController",className:"lp_survey_area",errorTemplateFileName:"<div class='{{wrapperClass}}wrapper' role='alert'><img class='lp_error_img' src='{{url}}' alt='{{error}}'><div id='{{id}}' class='lp_error_text lp_text' data-lp-point='errorText' aria-live='polite'>{{text}}</div></div>",QUESTION_TYPE:{TEXT_FIELD:"Text Field",TEXT_AREA:"Text Area",SELECT:"Dropdown Box",RADIO:"Radio Button",RADIO_HORIZONTAL:"Radio Button (side by side)",CHECKBOX:"Checkbox",CSAT:"CSAT"},VALIDATION_TYPE:{PHONE:"phoneNumber"},LPViewMap:{lpSurveyArea:".lp_survey_area",question:".lp_question",label:".lp_question_label",container:".lp_survey_container",surveyView:".lp_survey_view_container",headerError:".lp_survey_header_error",headerArea:".lpc_maximized-header",stars:"^star",cancelButton:"^cancel_button",ratingDiv:"^current_rating"},LPClassMap:{content:"lp_lpview_content",headerError:"lp_survey_header_error",SurveyError:"lp_surveyError_",logo_top_margin:"lp_logo_top_margin"},LPCustomizationClass:{logo_top_margin:"lpc_survey-area_logo"},questionTemplates:["<input id='{{id}}' class='lp_input-field' aria-labelledby='{{ariaLabel}}' type='{{type}}' placeholder='{{defaultTextArea}}' aria-required='{{isMandatory}}'>","<span class='lp_radio_button'><input id='{{inputId}}' role='radio' type='radio' value='{{value}}' aria-labelledby='label-{{inputId}}' name='{{name}}'> <label for='{{inputId}}' id='label-{{inputId}}'>{{label}}</label></span>","<select id='{{id}}' class='lp_select_field' role='listbox' aria-labelledby='{{ariaLabel}}' aria-required='{{isMandatory}}'></select>","<div class='lp_checkbox_button'><input id='{{inputId}}' type='checkbox' value='{{value}}' name='{{name}}'> <label for='{{inputId}}'>{{label}}</label></div>","<div class='lp_question'><div id='{{id}}' class='lp_question_label lpc_survey-area__question-label {{deviceClass}}'>{{label}}</div><div class='lp_lpview_content lp_content lpc_survey-area__question-content {{deviceClass}}'></div></div>","<textarea id='{{id}}' class='lp_textarea_field' aria-labelledby='{{ariaLabel}}' type='{{type}}' aria-required='{{isMandatory}}'></textarea>","<div id='{{id}}' class='lp_csat_rater lpc_survey-area__question-content {{deviceClass}}'><form><fieldset class='lp_csat_rater_stars' data-lp-point='stars-area' data-lp-cust-id='stars-area'><a href='javascript:void(0)' class='lp_csat_rater_star' role='button' data-lp-point='star' data-lp-cust-id='star' data-lp-rating='5' aria-pressed='false' aria-label='{{labelStar5}} 5 {{of}} {{numberOfStars}}'></a> <a href='javascript:void(0)' class='lp_csat_rater_star' role='button' data-lp-point='star' data-lp-cust-id='star' data-lp-rating='4' aria-pressed='false' aria-label='{{labelStar4}} 4 {{of}} {{numberOfStars}}'></a> <a href='javascript:void(0)' class='lp_csat_rater_star' role='button' data-lp-point='star' data-lp-cust-id='star' data-lp-rating='3' aria-pressed='false' aria-label='{{labelStar3}} 3 {{of}} {{numberOfStars}}'></a> <a href='javascript:void(0)' class='lp_csat_rater_star' role='button' data-lp-point='star' data-lp-cust-id='star' data-lp-rating='2' aria-pressed='false' aria-label='{{labelStar2}} 2 {{of}} {{numberOfStars}}'></a> <a href='javascript:void(0)' class='lp_csat_rater_star' role='button' data-lp-point='star' data-lp-cust-id='star' data-lp-rating='1' aria-pressed='false' aria-label='{{labelStar1}} 1 {{of}} {{numberOfStars}}'></a></fieldset></form><div class='lp_csat_rater_current_rating lpc_survey-area__current-rating {{deviceClass}}' data-lp-point='current_rating'>{{rating}}</div><div id='disclaimer-id' class='lp_survey_disclaimer lpc_survey-area__disclaimer {{deviceClass}}'>{{csatDisclaimer}}</div></div>","<div class='{{wrapperClass}}wrapper' role='alert'><img class='lp_error_img' src='{{url}}' alt='{{error}}'><div id='{{id}}' class='lp_error_text lp_text' data-lp-point='errorText' aria-live='polite'>{{text}}</div></div>"],initialize:function(e){o=null;r=!1;var t=e.survey&&e.survey.newValue;this.hasHeaderError=!1;this.isCloseSurveyVisible=!1;this.isSubmitSurveyDisabled=!1;this.activeIndex=0;this.questionViews=[];this.models=e.models;this.iconsRepository=e.iconsRepository;this.imagesRepository=e.imagesRepository;this.errorIconURL=this.imagesRepository+"/error-15x15.png";this.appContext=e.appContext;this.surveyType=e.surveyType;this.defaultSelect=e.defaultSelect;this.sendDataOnCancel=this.appContext.conf.engConf.async;this.consts=lpTag.unifiedWindow.consts;this.addLogo=a.getPropertyFromObject(this.appContext,"conf.windowConf.logoPinToTop");this.deviceClass=lpTag.unifiedWindow.customization.deviceClass;this.view.setAttribute("data-lp-cust-id","surveyArea");this.createView({elementType:"div",className:"lp_survey_bottom_spacer"});(e=this.createView({elementType:"div",className:"lp_survey_container"})).classList.add("lpc_survey-area-wrapper");e.classList.add(this.deviceClass);e.setAttribute("data-lp-cust-id","surveyArea");s=!this.appContext.deviceDetector.isDesktop()&&this.appContext.deviceDetector.isIOS();var i=this.appContext.translator.translate("surveyLabel")||"Complete the survey",n=this.appContext.deviceDetector.isDesktop();if(n){e.setAttribute("aria-label",i);e.setAttribute("role","region")}else{e.setAttribute("aria-live","polite");e.setAttribute("role","dialog");e.setAttribute("aria-modal","true")}if(t){this.headerText=t.header;this.headerText=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(this.headerText).cleanText;this.footerText=t.footer;this.footerText=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(this.footerText).cleanText;this.isLogicalSurvey=function(e){if(!e.questions||!e.questions.question)return!1;for(var t=!1,i=e.questions.question,n=0;n<i.length;n++)if(i[n]&&i[n].entry&&i[n].entry[0]&&i[n].entry[0].logic){t=!0;break}return t}(t);this.surveyLogic=new lpTag.taglets.SurveyLogic({survey:t});this.loadResource(this.questionTemplates,l)}if(this.addLogo){a.addClass(this.getFirstElement(this.LPViewMap.lpSurveyArea),this.LPClassMap.logo_top_margin);a.addClass(this.getFirstElement(this.LPViewMap.lpSurveyArea),this.LPCustomizationClasses.logo_top_margin)}},render:function(){this.customize(this.view)},events:function(){0!==this.questionViews.length&&this.appContext.events.bind({appName:"*",eventName:this.VCEvents.MAXIMIZE_VISIBLE,context:this,func:d});this.appContext.deviceDetector.isDesktop()?this.preventScroll({selector:this.LPViewMap.container,inView:this.view}):this.appContext.deviceDetector.isIOS()&&this.limitScroll({view:this.view.parentNode});this.appContext.browserStateManager.on(this.appContext.browserStateManager.EVENT_NAME.ORIENTATION_CHANGE,this.onActiveIndexChange,this);this.bindModel({path:this.uiPath.STATE,callback:p,context:this});this.appContext.events.bind({appName:"*",eventName:this.EventName.chat.SURVEY_ERROR,context:this,func:this.onSubmitError});this.appContext.events.bind({appName:"survey",eventName:this.EventName.chat.SURVEY_SERVER_ERROR,context:this,func:this.onSubmitServerError});this.appContext.events.bind({appName:"survey",eventName:"blur",func:this.validateQuestionOnBlur,context:this});this.appContext.events.bind({appName:"survey",eventName:"submitAnswer",func:this.submitAnswer,context:this});this.appContext.deviceDetector.isIOS()&&this.bindViewEvent({selector:this.LPViewMap.container,DOMEvent:"touchstart",callback:this.viewTapped});0!==this.questionViews.length&&this.appContext.events.bind({appName:"*",eventName:this.VCEvents.MAXIMIZE_VISIBLE,context:this,func:d});this.appContext.deviceDetector.isDesktop()?this.preventScroll({selector:this.LPViewMap.container,inView:this.view}):this.appContext.deviceDetector.isIOS()&&this.limitScroll({view:this.view.parentNode});this.bindViewEvent({view:this.getFirstElement(this.LPViewMap.cancelButton),DOMEvent:"keydown",callback:this.handleCancelFocus,context:this});this.bindViewEvent({view:this.getFirstElement(this.LPViewMap.ratingDiv),DOMEvent:"keydown",callback:this.handleRatingFocus,context:this});this.bindViewEvent({selector:this.LPViewMap.surveyView,DOMEvent:"keydown",callback:this.handleFocus})}});(e=lpTag.unifiedWindow.SurveyViewController.prototype).handleRatingFocus=function(e){var t=document.querySelector(".lp_csat_rater_stars a:first-child"),i=document.getElementsByClassName("lp_csat_rater_current_rating")[0];if(9===e.keyCode&&e.shiftKey&&i){e.preventDefault();t.focus()}};e.handleCancelFocus=function(e){var t=document.querySelector(".lp_csat_rater_stars a:first-child"),i=document.getElementsByClassName("lp_csat_rater_current_rating")[0],n=i.innerHTML.trim();if(9===e.keyCode&&e.shiftKey&&t)if(""!==n){e.preventDefault();i.focus()}else{e.preventDefault();t.focus()}};e.viewTapped=function(e){"INPUT"===document.activeElement.tagName&&"INPUT"!==e.target.tagName&&t()};e.handleFocus=function(e){var t=e.keyCode,i=this.getFirstElement(this.LPViewMap.surveyView).querySelectorAll('a, button:not(.lpHide), input, textarea, select, details, [tabindex]:not([tabindex="-1"])');if(0<i.length&&9===t){var t=i[0],i=i[i.length-1],n=this.getFocusableHeaderButton(this.getFirstElement(this.LPViewMap.headerArea,document.body)),a=this.getFocusableHeaderButton(this.getFirstElement(this.LPViewMap.headerArea,document.body),!0);if(e.shiftKey&&e.target===t){e.preventDefault();a.focus()}else if(e.target===i&&!e.shiftKey){e.preventDefault();n.focus()}}};e.submitAnswer=function(e){var t=e.isAnswerArray?e.answer:e.answer[0];this.surveyLogic.submitAnswer(e.questionId,t);this.isSubmitSurveyDisabled=!1;if(this.pagingVC){this.pagingVC.updateActivePages(this.surveyLogic.getActiveQuestionsIds());this.getModelParam(this.uiPath.STATE)!==lpTag.unifiedWindow.State.CONNECTION_ISSUE&&this.pagingVC.enableSubmit(!0)}};e.getErrorText=function(e){var t="";switch(e.error){case this.surveyLogic.errorTypes.EMAIL:t=this.translate("surveyRequireValidEmail");break;case this.surveyLogic.errorTypes.NUMBER:t=this.translate("surveyRequireNumericField");break;case this.surveyLogic.errorTypes.ILLEGAL_CHARS:t=this.translate("surveyIllilgalCharacters");break;case this.surveyLogic.errorTypes.REQUIRED:t=i.call(this,e.type,e.entry);break;case this.surveyLogic.errorTypes.LENGTH:this.translator.extendDictionary({specify_number:this.surveyLogic.questionsText.MAX_LENGTH});t=this.translate("surveyMaximumChars");break;case this.surveyLogic.errorTypes.PHONE:t=this.translate("surveyRequireValidPhone");break;default:t=i.call(this,e.type,e.entry)}return t};function i(e,t){var i=this.translate("surveyRequireField");switch(e){case this.QUESTION_TYPE.CHECKBOX:i=t&&1<t.length?this.translate("surveyRequireCheckbox"):this.translate("surveyRequireOption");break;case this.QUESTION_TYPE.RADIO:case this.QUESTION_TYPE.RADIO_HORIZONTAL:case this.QUESTION_TYPE.SELECT:i=this.translate("surveyRequireOption")}return i}e.addHeaderError=function(e){if(!this.hasHeaderError){this.hasHeaderError=!0;var e=this.createView({template:this.errorTemplateFileName,wrapWithDiv:!0,doNotAddChild:!0,textInjection:{wrapperClass:this.LPClassMap.SurveyError,text:e,url:this.errorIconURL,error:this.translate("errorIconAltText")}}),t=(e.className+=" "+this.LPClassMap.headerError,this.questionViews[0]);if(t)if(this.appContext.deviceDetector.isDesktop()){t.view.parentNode.insertBefore(e,t.view);t.setFocus()}else{t.view.insertBefore(e,t.view.firstChild);this.pagingVC.setActiveIndex(0)}}};e.removeHeaderError=function(){if(this.hasHeaderError){this.hasHeaderError=!1;var e=this.getFirstElement(this.LPViewMap.headerError);e&&e.parentNode.removeChild(e)}};e.onActiveIndexChange=function(e){"number"!=typeof e&&(e=this.activeIndex);0<=this.activeIndex&&lpTag.uiframework.scrollManager.unregisterView(this.questionViews[this.activeIndex]);this.activeIndex=e;e=lpTag.lpUtils.getElementsByClass(this.questionViews[this.activeIndex].view,this.LPClassMap.content,[])[0];this.getComputedStyle(e.parentNode,"height",10)<e.clientHeight&&lpTag.uiframework.scrollManager.registerView(e,this.appContext.deviceDetector.isIOS())};e.validateQuestion=function(e){var t=this.getQuestionViewById(e.id);if(t)return s||!function(e){if(!s){var t=this.appContext.deviceDetector.isDesktop();if(0!==this.questionViews.length&&r&&o){var i=this.questionViews&&this.questionViews[0];if(e===i){e=this.view.getElementsByClassName("lp_survey_container");if(e&&0<e.length){e[0].setAttribute("aria-label",o);i.revertLabel(t);o=null}}}}}.call(this,t),this.surveyLogic.validateQuestion(e)&&t.isValid()?(t.cleanError(),!0):(t.setError(this.getErrorText(e)),!1)};e.validateQuestionOnNext=function(e){this.removeHeaderError();return this.validateQuestion(this.surveyLogic.getQuestionByIndex(e))};e.validateQuestionOnBlur=function(e){var t=this;this.validationTimeout=setTimeout(function(){t.validateQuestion(e.question)},150)};e.validateSurvey=function(){for(var e=!0,t=this.surveyLogic.validateSurvey(!0),i=this.surveyLogic.getAllQuestions(!0),n=!0,a=0;a<i.length;a++){var o,s=(o=this.getQuestionViewById(i[a].id)).isValid(),n=n&&s;if(0<=function(e,t){if(e)for(var i=0;i<e.length;i++)if(e[i].id===t)return i;return-1}(t.questionsNeeded,i[a].id)||!s){o.setError(this.getErrorText(i[a]));if(e){o.setFocus();o.view.scrollIntoView(!1);e=!1}}else o.cleanError()}this.removeHeaderError();return t.surveyValid&&n};e.getQuestionViewById=function(e){for(var t,i=0;i<this.questionViews.length;i++)if(this.questionViews[i].question.id===e){t=this.questionViews[i];break}return t};e.dispose=function(){clearTimeout(this.validationTimeout);lpTag.uiframework.scrollManager.unregisterView(this.view);if(this.questionViews){for(var e=0;e<this.questionViews.length;e++){this.questionViews[e].dispose();this.questionViews[e]=null;this.appContext.deviceDetector.isIOS()&&this.unbindViewEvent({view:this.questionViews[e],DOMEvent:"touchstart",callback:this.viewTapped})}this.questionViews.length=0}this.surveyLogic.dispose();this.appContext&&this.appContext.browserStateManager&&this.appContext.browserStateManager.off(this.appContext.browserStateManager.EVENT_NAME.ORIENTATION_CHANGE,this.onActiveIndexChange);this.appContext.events.unbind({appName:"survey",eventName:"blur",func:this.validateQuestionOnBlur,context:this});this.appContext.events.unbind({appName:"survey",eventName:"submitAnswer",func:this.submitAnswer,context:this});this.appContext.events.unbind({appName:"survey",eventName:this.EventName.chat.SURVEY_SERVER_ERROR,context:this,func:this.onSubmitServerError});lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};e.createQuestion=function(e){var t,i={appContext:this.appContext,question:e,defaultSelect:this.defaultSelect,iconsRepository:this.iconsRepository,imagesRepository:this.imagesRepository,deviceClass:this.deviceClass,surveyArea:this.getFirstElement(this.LPViewMap.lpSurveyArea)};if(e){switch(e.type){case this.QUESTION_TYPE.TEXT_FIELD:t=new(e.validationType===this.VALIDATION_TYPE.PHONE&&this.surveyType===lpTag.unifiedWindow.SurveyType.PRE_SMS?lpTag.unifiedWindow.Survey.PhoneFieldQuestion:lpTag.unifiedWindow.Survey.TextFieldQuestion)(i);break;case this.QUESTION_TYPE.TEXT_AREA:t=new lpTag.unifiedWindow.Survey.TextAreaQuestion(i);break;case this.QUESTION_TYPE.SELECT:t=new lpTag.unifiedWindow.Survey.DropDownQuestion(i);break;case this.QUESTION_TYPE.RADIO:case this.QUESTION_TYPE.RADIO_HORIZONTAL:t=new lpTag.unifiedWindow.Survey.RadioButtonQuestion(i);break;case this.QUESTION_TYPE.CHECKBOX:t=new lpTag.unifiedWindow.Survey.CheckBoxQuestion(i);break;case this.QUESTION_TYPE.CSAT:t=new lpTag.unifiedWindow.Survey.CSATQuestion(i)}return t}};e.onSubmitError=function(){if(this.appContext.deviceDetector.isDesktop()){var e=this.getFirstElement(this.LPViewMap.container);e&&(e.scrollTop=0)}this.addHeaderError(this.translate("surveyGeneralError"))};e.onSubmitServerError=function(){if(this.appContext.deviceDetector.isDesktop()){var e=this.getFirstElement(this.LPViewMap.container);e&&(e.scrollTop=0)}this.addHeaderError(this.translate("surveyServerError"))};function l(){for(var e,t,i=this.surveyLogic.getAllQuestions(!0),n=0;n<i.length;++n){e=this.createQuestion(i[n]);this.questionViews.push(e);this.appContext.deviceDetector.isIOS()&&this.bindViewEvent({view:this.questionViews[n],DOMEvent:"touchstart",callback:this.viewTapped})}!function(){if(this.questionViews&&this.questionViews[0]&&this.questionViews[0].question.type===this.QUESTION_TYPE.CSAT)return!0;return!1}.call(this)||(this.isSubmitSurveyDisabled=!0);this.pagingVC=new lpTag.unifiedWindow.PagingViewController({onInitialize:function(){d.call(t);this.onInitialize&&this.onInitialize()},submitCallback:c,cancelCallback:u,validatorCallback:(t=this).validateQuestionOnNext,activeIndexCallback:this.onActiveIndexChange,context:this,template:"<div class='lp_survey_view_container lpc_survey-area {{deviceClass}}' data-lp-cust-id='surveyArea'><div class='lp_pages_area' data-lp-point='pages_area'></div><div class='lp_pagination-area'><div class='lp_buttons_area'><button class='lp_prev_button lpc_survey-area__previous-button {{deviceClass}}' data-lp-point='prev_button' data-lp-cust-id='cancel_button'>{{back}}</button> <button class='lp_cancel_button lpc_survey-area__cancel-button {{deviceClass}}' data-lp-point='cancel_button' data-lp-cust-id='cancel_button'>{{cancel}}</button> <button class='lp_next_button lpc_survey-area__next-button {{deviceClass}}' data-lp-point='next_button' data-lp-cust-id='button'>{{next}}</button> <button class='lp_submit_button lpc_survey-area__submit-button {{deviceClass}}' data-lp-point='submit_button' data-lp-cust-id='button' aria-describedby='disclaimer-id'>{{submit}}</button> <button class='lp_close_survey_button lpc_survey-area__close-button {{deviceClass}}' data-lp-point='close_survey_button' data-lp-cust-id='close_survey_button'>{{close}}</button></div><div class='lp_pager' data-lp-point='pager'></div></div></div>",appContext:this.appContext,pages:this.questionViews,target:this.LPViewMap.container,parent:this,headerText:this.headerText,footerText:this.footerText,textInjection:function(e){{if(0<e)return{};switch(this.surveyType){case lpTag.unifiedWindow.SurveyType.PRE_CHAT:return{submit:this.appContext.translator.translate("startChat")};case lpTag.unifiedWindow.SurveyType.EXIT_CHAT:case lpTag.unifiedWindow.SurveyType.OFFLINE:this.isCloseSurveyVisible=!0;return{};default:return{}}}}.call(this,i.length),isLogicalSurvey:this.isLogicalSurvey,activeQuestions:this.surveyLogic.getActiveQuestionsIds()})}function d(){!this.appContext.deviceDetector.isDesktop()&&this.questionViews&&this.questionViews[0]&&this.questionViews[0].question.type===this.QUESTION_TYPE.CSAT?t():this.isFocusInsideApp()&&this.questionViews&&this.questionViews[0]&&"function"==typeof this.questionViews[0].setFocus&&this.questionViews[0].setFocus()}function t(){document.activeElement.blur()}function c(){var e;this.validateSurvey()&&(e=this.surveyLogic.getJSONSurvey())&&n.call(this,{survey:e.survey,status:e.survey&&0<e.survey.question.length?this.consts.csatStatus.FILLED:this.consts.csatStatus.SKIPPED,onError:this.onSubmitError,context:this})}function u(){var e=this.surveyType,t=this.appContext,i=this.sendDataOnCancel?{status:this.consts.csatStatus.SKIPPED}:null;n.call(this,i);lpTag.hooks&&lpTag.hooks.exec&&lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.AFTER_ABANDONED_SURVEY,data:{context:t,surveyType:e,surveyData:i}})}function n(e){var t,i;switch(this.surveyType){case lpTag.unifiedWindow.SurveyType.PRE_CHAT:t=lpTag.unifiedWindow.events.application.PRE_CHAT_SURVEY;break;case lpTag.unifiedWindow.SurveyType.EXIT_CHAT:e&&e.survey&&(e.survey.emailTranscriptSubject="Your chat transcript");t=lpTag.unifiedWindow.events.application.POST_CHAT_SURVEY;break;case lpTag.unifiedWindow.SurveyType.OFFLINE:t=lpTag.unifiedWindow.events.application.OFFLINE_SURVEY;break;case lpTag.unifiedWindow.SurveyType.PRE_SMS:t=e&&e.survey?lpTag.unifiedWindow.events.application.PRE_SMS_FORM:lpTag.unifiedWindow.events.application.PRE_SMS_FORM_EXIT;break;default:t=lpTag.unifiedWindow.events.application.OFFLINE_SURVEY}lpTag.hooks&&lpTag.hooks.exec&&(e=(i=lpTag.hooks.exec({name:lpTag.unifiedWindow.hooks.BEFORE_SUBMIT_SURVEY,data:{surveyType:t,questionsInfo:this.surveyLogic.getAllQuestions(),surveyData:e}}))&&i.data&&i.data.surveyData||e);this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:t,data:e})}function p(e){e=e.newValue;this.pagingVC&&(e===lpTag.unifiedWindow.State.CONNECTION_ISSUE?this.pagingVC.enableSubmit(!1):this.pagingVC.enableSubmit(!0))}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e;lpTag.unifiedWindow.ExpandableTextAreaViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"ExpandableTextAreaViewController",applicationType:"ExpandableTextAreaViewController",templateName:"<textarea class='lpview_form_textarea lpc_composer__text-area {{deviceClass}} {{cssClass}}' data-lp-cust-id='input_text' data-lp-point='chat_input' rows='{{rows}}' maxlength='{{maxLength}}' aria-label='{{defaultTextArea}}' autocomplete='{{autocompleteOption}}'></textarea>",LPViewMap:{textarea:"lp_expandable_textarea"},initialize:function(e){this.appContext=e.appContext;this.targetView=e.targetView;this.beforeView=e.beforeView;this.textareaClass=this.LPViewMap.textarea;this.minRows=e.minRows||3;this.maxRows=e.maxRows||10;this.maxLength=2e3;this.resizeCallback=e.resizeCallback;this.scrollCallback=e.scrollCallback;this.context=e.context||this;this.createTextAreaView()},events:function(){this.bindViewEvent({view:this.textarea,DOMEvent:"keyup",callback:this.handleKeyUp});this.bindViewEvent({view:this.textarea,DOMEvent:"paste",callback:this.resizeTextarea});this.bindViewEvent({view:this.textarea,DOMEvent:"cut",callback:this.resizeTextarea});this.bindViewEvent({view:this.textarea,DOMEvent:"dragend",callback:this.resizeTextarea});this.bindViewEvent({view:this.textarea,DOMEvent:"drop",callback:this.resizeTextarea});this.bindViewEvent({view:this.textarea,DOMEvent:"input",callback:this.resizeTextarea});this.bindViewEvent({view:this.textarea,DOMEvent:"focus",callback:this.focusChanged});this.bindViewEvent({view:this.textarea,DOMEvent:"blur",callback:this.focusChanged})},render:function(){}});(e=lpTag.unifiedWindow.ExpandableTextAreaViewController.prototype).setDefaultValues=function(){this.textareaLineHeight=this.getComputedStyle(this.textarea,"lineHeight",10);this.textareaMinHeight=this.textareaLineHeight*this.minRows;this.textareaMaxHeight=this.textareaLineHeight*this.maxRows;this.textareaHeight=this.getComputedStyle(this.textarea,"height",10);this.textareaMinHeight=this.textareaHeight>=this.textareaLineHeight?this.textareaHeight:this.textareaMinHeight;this.defaultValues=!0};e.createTextAreaView=function(){var e=this.appContext&&this.appContext.conf,e=e&&e.unifiedConf&&e.unifiedConf.autocomplete,e={cssClass:this.textareaClass,rows:this.minRows,maxLength:this.maxLength,defaultTextArea:this.translate("defaultTextArea"),autocompleteOption:"on"===e?e:"off"};this.textarea=this.createView({template:this.templateName,textInjection:e,wrapWithDiv:!1,target:this.targetView,beforeView:this.beforeView});this.setScroll(!1)};e.setScroll=function(e){if(this.scrollEnabled!==e){var t=e?"auto":"hidden";this.textarea.style.overflowY=t;this.scrollEnabled=e;this.applyScrollCallback(e)}};e.applyResizeCallback=function(e,t){this.resizeCallback&&this.context&&this.resizeCallback.call(this.context,e,t)};e.applyScrollCallback=function(e){this.scrollCallback&&this.context&&this.scrollCallback.call(this.context,e)};e.resizeTextarea=function(){if(!this.resizeTextareaTimeout){var e=this;this.resizeTextareaTimeout=setTimeout(function(){e.resizeTextareaTimeout=null;e.delayedResizeTextarea()},0)}};e.delayedResizeTextarea=function(){var e,t,i,n=!window.addEventListener;this.defaultValues||this.setDefaultValues();if(n){e=this.getSelection();t=this.textarea.scrollHeight}this.textarea.style.height="auto";if((t=n?t:this.textarea.scrollHeight)!==this.textareaHeight){if(t>this.textareaMaxHeight){i=this.textareaMaxHeight;this.setScroll(!0)}else{i=t<this.textareaMinHeight?this.textareaMinHeight:t;this.setScroll(!1)}n=i-this.textareaHeight;n&&this.applyResizeCallback(i,n);this.textareaHeight=i}this.textarea.style.height=this.textareaHeight+"px";e&&this.setSelection(e.start,e.end)};e.getValue=function(){return this.textarea.value};e.setValue=function(e){if(this.textarea.value!==e){this.textarea.value=e;this.resizeTextarea()}else this.lpFocus()};e.lpFocus=function(){this.textarea&&!this.textarea.disabled&&this.getComputedStyle(this.textarea,"height",10)&&this.textarea.focus()};e.handleKeyUp=function(e){switch((e=e||event).keyCode||e.which){case 13:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:break;default:this.resizeTextarea()}!function(){var e=this.getValue();this.textarea.title=""===e?"":this.translate("defaultTextArea")}.call(this)};e.focusChanged=function(e){e=(e=e||event)&&e.type||"";this.appContext.events.trigger({appName:"*",eventName:this.EventName.uiState.FOCUS_CHANGE_EVENT,data:{type:e}})}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var l,d=!1,c=null;lpTag.unifiedWindow.CoBrowseInvitationViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"CoBrowseInvitationViewController",template:"<div class='lp_cobrowse_invitation_widget'><div class='lp_image'><img src='{{imagesRepository}}/{{icon}}' alt=''></div><p role='alert' class='lp_cb_invitation_text'>{{invitationText}}</p><p class='lp_cb_invitation_text_sub'>{{connectingPermissionText}}</p><div class='lp_cb_offer'><button data-lp-cust-id='button' class='lp_cb_button lp_cb_button_accept' aria-label='{{acceptBtnLabel}}'>{{acceptBtn}}</button> <button data-lp-cust-id='button' class='lp_cb_button lp_cb_button_reject' aria-label='{{rejectBtnLabel}}'>{{rejectBtn}}</button></div></div>",coBrowseEvents:lpTag.unifiedWindow.events.coBrowseEvents,focusElement:void 0,LPViewMap:{inviteText:".lp_cb_invitation_text",acceptButton:".lp_cb_button_accept",rejectButton:".lp_cb_button_reject",subText:".lp_cb_invitation_text_sub",invitation_container:".lp_cobrowse_invitation_widget",callScreenContainer:".lp_cobrowse_callscreen_container"},LPClassesMap:{invitation_container:"lp_cobrowse_invitation_widget",hidden:"lp_hidden"},preInitView:function(e){this.appContext=e.appContext;l=e.appContext.coBrowseManager;c=e.mode;var t="";switch(e.mode){case"VIDEO_CALL":d=!0;t="cobrowse_video_call.png";break;case"VOICE_CALL":d=!0;t="cobrowse_voice_call.png";break;default:d=!(t="cobrowse_icon.png")}"ERROR"!==e.mode&&(this.templateFile=(void 0!==e.templateFile?e:this).templateFile);var i=l.customizeTranslation("cobrowseInvitationHeading",e.mode),n=l.customizeTranslation("cobrowseInvitation",e.mode),a=l.customizeTranslation("cobrowseAcceptBtn",e.mode),o=l.customizeTranslation("cobrowseRejectBtn",e.mode),s=l.customizeTranslation("cobrowseConnecting",e.mode),r=l.customizeTranslation("cobrowseConnectingPermission",e.mode);this.textInjection={invitationText:this.sanitizeText(n).text,connectingText:this.sanitizeText(s).text,connectingPermissionText:this.sanitizeText(r).text,acceptBtn:this.sanitizeText(a).text,rejectBtn:this.sanitizeText(o).text,acceptBtnLabel:this.sanitizeText(a).text+" "+this.sanitizeText(i).text,rejectBtnLabel:this.sanitizeText(o).text+" "+this.sanitizeText(i).text,imagesRepository:e.appContext.conf.unifiedConf.imagesRepository,errorHeadline:this.appContext.translator.translate("error"),errorText:e.errorText,icon:t}},events:function(){this.bindViewEvent({selector:this.LPViewMap.acceptButton,callback:this.onAccept,DOMEvent:"click",context:this});this.bindViewEvent({selector:this.LPViewMap.rejectButton,callback:this.onReject,DOMEvent:"click",context:this});this.bindViewEvent({selector:this.LPViewMap.invitation_container,callback:this.onKeyDown,DOMEvent:"keydown",context:this});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.coBrowseEvents.RENDER_CALL_SCREEN,context:this,func:this.onRenderCallScreen})},initialize:function(e){this.serviceId=e.serviceId;this.appContext=e.appContext;this.focusElement=this.getFirstElement(this.LPViewMap.acceptButton)},onAccept:function(){this.appContext.coBrowseManager.publishCoBrowseEvent(this.coBrowseEvents.ACCEPTED,this.serviceId,c);if(d){var e=l.customizeTranslation("cobrowseConnecting",c);this.getFirstElement(this.LPViewMap.inviteText).textContent=this.sanitizeText(e).text;this.getFirstElement(this.LPViewMap.subText).style.display="block"}else{e=l.customizeTranslation("cobrowseSessionStarting");this.getFirstElement(this.LPViewMap.inviteText).textContent=this.sanitizeText(e).text}this.getFirstElement(this.LPViewMap.acceptButton).style.display="none";this.getFirstElement(this.LPViewMap.rejectButton).style.display="none"},onReject:function(){this.appContext.coBrowseManager.publishCoBrowseEvent(this.coBrowseEvents.DECLINE,this.serviceId,c);this.inputMainWindow=document.querySelector(".lpview_form_textarea");var e=l.customizeTranslation("cobrowseInvitationRejected",c);this.getFirstElement(this.LPViewMap.inviteText).textContent=this.sanitizeText(e).text;this.getFirstElement(this.LPViewMap.subText).style.display="none";this.getFirstElement(this.LPViewMap.acceptButton).style.display="none";this.getFirstElement(this.LPViewMap.rejectButton).style.display="none";this.inputMainWindow&&this.inputMainWindow.focus()},onRenderCallScreen:function(){var e=document.createElement("div");e.className="lp_cobrowse_callscreen_container";this.getFirstElement(this.LPViewMap.invitation_container).innerHTML="";this.getFirstElement(this.LPViewMap.invitation_container).style.padding="0px";this.getFirstElement(this.LPViewMap.invitation_container).appendChild(e)},onInitialize:function(){var e=this;setTimeout(function(){void 0!==e.focusElement&&e.focusElement.focus()},100)},onKeyDown:function(e){var t=this.appContext&&this.appContext.coBrowseManager&&this.appContext.coBrowseManager.isInActiveCall();27!==e.keyCode||t||this.onReject();if(27===e.keyCode&&t){e.preventDefault();this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:"endCobrowse",global:!0})}}})}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e;lpTag.unifiedWindow.CoBrowseInvitationManagerViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"CoBrowseInvitationManagerViewController",coBrowseEvents:lpTag.unifiedWindow.events.coBrowseEvents,chatEvents:lpTag.unifiedWindow.events.chat,chatState:lpTag.unifiedWindow.State,rendered:!1,currentMode:"",startTimeOfCurrentSession:null,initialize:function(e){this.sliderAPI=e.sliderAPI;this.isEmbedded=!this.appContext.conf.unifiedConf.poppedOut&&!this.appContext.conf.unifiedConf.external;this.bindEvents();this.invitationActive=!1;this.isEmbedded&&this.bindModel({path:this.uiPath.STATE,callback:this.stateChanged,context:this});this.checkResume();this.isDisposed=!1},checkResume:function(){var e=window.lpTag.events.hasFired(lpTag.unifiedWindow.apps.COBROWSE,this.coBrowseEvents.RESUME);e&&e[0]&&e[0].data?r.call(this,e[0].data):lpTag.events.bind({appName:lpTag.unifiedWindow.apps.COBROWSE,eventName:this.coBrowseEvents.RESUME,context:this,func:r})},bindEvents:function(){this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.coBrowseEvents.INVITED,context:this,func:i});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.coBrowseEvents.CANCELED,context:this,func:n});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.coBrowseEvents.DECLINE,context:this,func:t});lpTag.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.coBrowseEvents.ACCEPTED,context:this,func:a});lpTag.events.bind({appName:lpTag.unifiedWindow.apps.COBROWSE,eventName:this.coBrowseEvents.STARTED,context:this,func:o});this.appContext.events.bind({appName:"slider",eventName:this.VCEvents.SLIDER_CLOSED,context:this,func:d});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.CHAT,eventName:this.chatEvents.STATE,context:this,func:c});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.coBrowseEvents.MAXIMIZE,context:this,func:s});lpTag.events.bind({appName:lpTag.unifiedWindow.apps.COBROWSE,eventName:this.coBrowseEvents.ERROR,context:this,func:l})},render:function(){this.hide();this.rendered=!0}});(e=lpTag.unifiedWindow.CoBrowseInvitationManagerViewController.prototype).dispose=function(){if(!this.isDisposed){p.call(this);!function(){this.appContext.events.unbind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.coBrowseEvents.INVITED,context:this,func:i});this.appContext.events.unbind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.coBrowseEvents.CANCELED,context:this,func:n});this.appContext.events.unbind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.coBrowseEvents.DECLINE,context:this,func:t});lpTag.events.unbind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.coBrowseEvents.ACCEPTED,context:this,func:a});lpTag.events.unbind({appName:lpTag.unifiedWindow.apps.COBROWSE,eventName:this.coBrowseEvents.STARTED,context:this,func:o});this.appContext.events.unbind({appName:"slider",eventName:this.VCEvents.SLIDER_CLOSED,context:this,func:d});lpTag.events.unbind({appName:lpTag.unifiedWindow.apps.COBROWSE,eventName:this.coBrowseEvents.RESUME,context:this,func:r});this.appContext.events.unbind({appName:lpTag.unifiedWindow.apps.CHAT,eventName:this.chatEvents.STATE,context:this,func:c});this.appContext.events.unbind({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:this.coBrowseEvents.MAXIMIZE,context:this,func:s});lpTag.events.unbind({appName:lpTag.unifiedWindow.apps.COBROWSE,eventName:this.coBrowseEvents.ERROR,context:this,func:l})}.call(this);lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this);this.isDisposed=!0}};e.stateChanged=function(e){e=e.newValue;e===lpTag.unifiedWindow.State.ENDED||e===lpTag.unifiedWindow.State.NOT_FOUND?function(){this.appContext&&this.appContext.coBrowseManager&&this.appContext.coBrowseManager.publishCoBrowseEvent(this.coBrowseEvents.DECLINE,this.serviceId)}.call(this):e!==lpTag.unifiedWindow.State.APP_ENDED&&e!==lpTag.unifiedWindow.State.NOT_FOUND||p.call(this)};function t(){this.invitationActive=!1;this.delayRemoveDeclinedViewTimeoutReference=window.setTimeout(p.bind(this),3e3)}function i(e){this.currentMode=e.mode;if(this.isEmbedded){this.invitationActive=!0;this.serviceId=e.serviceId;this.startTimeOfCurrentSession=Date.now();this.appContext.coBrowseManager.publishCoBrowseEvent(this.coBrowseEvents.OFFERED,this.serviceId,e.mode,e.agentId);!function(e){var t=new lpTag.unifiedWindow.CoBrowseInvitationViewController({models:this.models,appContext:this.appContext,serviceId:e.serviceId,mode:e.mode,wrapWithDiv:!1}),i=this.appContext.coBrowseManager.customizeTranslation("cobrowseInvitationHeading",e.mode),n=this.appContext.translator.translate("cobrowseInvitationMinimizeTitle");this.cobrowseMinimizeBtnTitle=this.appContext.coBrowseManager.customizeTranslation("cobrowseInvitationMinimizeTitle",e.mode);this.sliderAPI.addView(t.view,this.sanitizeText(i).text,"coBrowseInvitationView",lpTag.unifiedWindow.consts.slider.viewType.CoBrowseInvite,null,n)}.call(this,e);h.call(this,"coBrowseInvitationView",null);this.offerExpiredTimeoutReference=setTimeout(function(){this.invitationActive=!1;p.call(this);this.appContext.coBrowseManager.publishCoBrowseEvent(this.coBrowseEvents.TIMEOUT,this.serviceId,this.currentMode)}.bind(this),this.appContext.coBrowseManager.COBROWSE_OFFER_TIMEOUT)}}function n(e){if(this.startTimeOfCurrentSession&&e.endTs&&this.startTimeOfCurrentSession<e.endTs){this.appContext.coBrowseManager.setActiveCall(!1);this.invitationActive=!1;p.call(this);this.startTimeOfCurrentSession=null}}function a(){this.sliderAPI.setMinimizeButtonTitle(this.cobrowseMinimizeBtnTitle)}function o(){u.call(this);this.invitationActive=!1;this.startTimeOfCurrentSession=Date.now();if(this.appContext.coBrowseManager.isCall(this.currentMode)){this.appContext.coBrowseManager.publishCoBrowseEvent(this.coBrowseEvents.RENDER_CALL_SCREEN);this.appContext.coBrowseManager.setActiveCall(!0)}else{this.delayRemoveAcceptedViewTimeoutReference=window.setTimeout(p.bind(this),3e3);this.appContext.deviceDetector.isDesktop()||this.appContext.uiStateManager.setWindowState(!1)}}function s(){if(this.appContext.coBrowseManager.isInActiveCall()){this.sliderAPI.showSlider();this.appContext.coBrowseManager.publishCoBrowseEvent(this.coBrowseEvents.SLIDER_OPENED)}}function r(e){this.invitationActive=!1;this.currentMode=e.mode;this.startTimeOfCurrentSession=Date.now();var t=new lpTag.unifiedWindow.CoBrowseInvitationViewController({models:this.models,appContext:this.appContext,serviceId:"",mode:e.mode,wrapWithDiv:!1,template:"<div class='lp_cobrowse_invitation_widget'><div class='lp_image'><img src='{{imagesRepository}}/cobrowse_icon.png' alt=''></div><p role='alert' class='lp_cb_invitation_text'>{{connectingText}}</p><p class='lp_cb_invitation_text_sub'>{{connectingPermissionText}}</p></div>"}),i=this.appContext.coBrowseManager.customizeTranslation("cobrowseInvitationHeading",e.mode),e=this.appContext.coBrowseManager.customizeTranslation("cobrowseInvitationMinimizeTitle",e.mode);this.sliderAPI.addView(t.view,i,"connectingView",lpTag.unifiedWindow.consts.slider.viewType.CoBrowseInvite,null,e);h.call(this,"connectingView");var n=this;setTimeout(function(){n.appContext.coBrowseManager.publishCoBrowseEvent(n.coBrowseEvents.RENDER_CALL_SCREEN);n.appContext.coBrowseManager.publishCoBrowseEvent(n.coBrowseEvents.SLIDER_OPENED)},120);this.appContext.coBrowseManager.isCall(this.currentMode)&&this.appContext.coBrowseManager.setActiveCall(!0)}function l(e){e=new lpTag.unifiedWindow.CoBrowseInvitationViewController({models:this.models,appContext:this.appContext,serviceId:"",mode:"ERROR",wrapWithDiv:!1,template:"<div class='lp_cobrowse_error_widget'><p class='lp_cb_error_headline'>{{errorHeadline}}</p><div class='lp_image'><img src='{{imagesRepository}}/connect-error-dark.png' alt=''></div><p role='alert' class='lp_cb_error_text'>{{errorText}}</p></div>",errorText:e.msg});this.sliderAPI.addView(e.view,this.appContext.translator.translate("error"),"cobrowseErrorView",lpTag.unifiedWindow.consts.slider.viewType.CoBrowseInvite);h.call(this,"cobrowseErrorView",8e3)}function d(e){e.type===lpTag.unifiedWindow.consts.slider.viewType.CoBrowseInvite&&(this.invitationActive?this.appContext.coBrowseManager.publishCoBrowseEvent(this.coBrowseEvents.DECLINE,this.serviceId,this.currentMode):this.appContext.coBrowseManager.isInActiveCall()&&this.appContext.events.trigger({appName:"tooltipButton",eventName:"show",data:{text:this.appContext.coBrowseManager.customizeTranslation("cobrowseActiveCallTooltip",this.currentMode),maximizeSliderBtnTitle:this.appContext.coBrowseManager.customizeTranslation("cobrowseActiveCallTooltipMaximizeTitle",this.currentMode),type:"call"},global:!0}))}function c(e){if(e===this.chatState.WAITING){this.invitationActive=!1;p.call(this)}}function u(){clearTimeout(this.offerExpiredTimeoutReference);clearTimeout(this.delayRemoveAcceptedViewTimeoutReference);clearTimeout(this.delayRemoveDeclinedViewTimeoutReference);clearTimeout(this.sliderViewCloseTimeoutRef)}function p(){u.call(this);this.sliderAPI.hideSlider();this.currentSliderViewId&&this.sliderAPI.removeView(this.currentSliderViewId);this.currentSliderViewId=null}function h(e,t){u.call(this);this.currentSliderViewId&&this.currentSliderViewId!==e&&this.sliderAPI.removeView(this.currentSliderViewId);this.sliderAPI.setSelectedView(e);this.sliderAPI.showSlider();t&&(this.sliderViewCloseTimeoutRef=setTimeout(p.bind(this),t));this.currentSliderViewId=e}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e=lpTag.unifiedWindow.apps.SECURE_FORM;lpTag.unifiedWindow.SecureFormsManagerViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"SecureFormsManagerViewController",rendered:!1,initialize:function(e){this.sliderAPI=e.sliderAPI;this.secureForms=[];this.pendingLoading=[]},events:function(){this.appContext.events.bind({appName:e,eventName:lpTag.unifiedWindow.consts.SecureForm.LINK_CLICKED,context:this,func:o});this.bindModel({path:this.chatPath.SECURE_FORMS,callback:t,context:this})},render:function(){this.hide();this.rendered=!0}});lpTag.unifiedWindow.SecureFormsManagerViewController.prototype.dispose=function(){if(this.secureForms)for(var e=0;e<this.secureForms.length;e++)if(this.secureForms[e].dispose){this.secureForms[e].dispose();this.sliderAPI.removeView(this.secureForms[e].uniqueId)}lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};function t(e){var t=e&&e.newValue;if(t&&this.pendingLoading)for(var i=0;i<this.pendingLoading.length;i++)if(this.pendingLoading[i]){var n=t[this.pendingLoading[i].uniqueId];n&&n.info&&o.call(this,this.pendingLoading.splice(i,1)[0].data)}}function a(e){if(!function(e){for(var t=0;t<this.secureForms.length;t++)if(this.secureForms[t].uniqueId===e)return this.secureForms[t]}.call(this,e&&e.info&&e.info.uniqueId)){e.info.secureFormName=this.sanitizeText(e.info.secureFormName).text;var t=new lpTag.unifiedWindow.SecureFormViewController({models:this.models,appContext:this.appContext,secureForm:e,wrapWithDiv:!1,textInjection:{formName:e.info.secureFormName,imagesRepository:this.appContext.conf.unifiedConf.imagesRepository}});this.secureForms.push({uniqueId:e.info.uniqueId,view:t});this.sliderAPI.addView(t.view,e.info.secureFormName,e.info.uniqueId,lpTag.unifiedWindow.consts.slider.viewType.PCIFormView,null,this.translate("tooltip_minimize_slider")+" "+e.info.secureFormName)}}function o(e){var t=e&&e.uniqueId,i=e&&e.isFromConnector;if(void 0!==t){var n=function(e){var t=this.chatPath.SECURE_FORMS;return this.getModelParam({name:t.name,path:t.path+"."+e})}.call(this,t);if(n&&n.info){a.call(this,n);this.sliderAPI.setSelectedView(t);this.sliderAPI.showSlider();this.sliderAPI.focusOnMinimize();i&&this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.SECURE_FORM,eventName:lpTag.unifiedWindow.consts.SecureForm.HIDE_CONVO,data:{}})}else this.pendingLoading&&Array.isArray(this.pendingLoading)&&this.pendingLoading.push({uniqueId:t,data:e})}}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e,i,n=lpTag.unifiedWindow.secureFormStates,a="about:blank",t=lpTag.unifiedWindow.settingsIDs;lpTag.unifiedWindow.SecureFormViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"SecureFormViewController",template:"<div class='secure_form_container'><iframe class='lp_secure_form_iframe' src='about:blank' title='{{formName}}'></iframe><div class='secure_form_message' role='alert' tabindex='-1'><div class='lp_image'><img src='{{imagesRepository}}/secure_form_icon.png' alt=''></div><div class='lp_lpview_title lp_title'>{{secureFormMessage}}</div></div></div>",CLASS_STATE_PREFIX:"_secure_form_state",LPViewMap:{iFrame:"iframe",loader:".lp_centralizer",message:".lp_title",messageContainer:".secure_form_message"},LPClassesMap:{secure_form_container:"secure_form_container"},timeoutRef:null,currentFormState:null,fetchingForm:!1,formLoaded:!1,events:function(){this.bindModel({path:this.uiPath.STATE,callback:o,context:this});this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.SECURE_FORM,eventName:"SF_ERROR",func:this.retrySFLoad,context:this})},initialize:function(e){this.secureFormData=e.secureForm;this.appContext=e.appContext;this.bindModel({path:this.getModelPath(e.secureForm),callback:this.handleStateChanged});this.appContext.conf.unifiedConf.connectorsSfConfig&&(this.getFirstElement(this.LPViewMap.messageContainer).style.visibility="hidden");this.appContext.conf.unifiedConf.secureFormTimeout&&6e4<(i=(i=parseInt(this.appContext.conf.unifiedConf.secureFormTimeout,10)||1e4)<1e4?1e4:i)&&(i=6e4);i=(i=2<this.appContext.featureStateManager.getSettingsValue(t.OTK_RETRIES)?i||3e4:i)||6e4}});(e=lpTag.unifiedWindow.SecureFormViewController.prototype).loadIFrame=function(){var t=this.getFirstElement(this.LPViewMap.iFrame);!function(){if(this.view){var e=this.createView({template:"<table class='lp_centralizer'><tbody><td><div class='lp_rotator-container'><div class='lp_rotator-container-bg'></div><div class='lp_rotator' role='alert'><img src='{{imagesRepository}}/{{imageUrl}}' alt='{{loading}}'></div></div></td></tbody></table>",target:this.waitArea,wrapWithDiv:!1,textInjection:{imagesRepository:this.appContext.conf.unifiedConf.imagesRepository,imageUrl:"loader_on_warmGray5_75.gif",loading:this.translate("loading")+" "+this.secureFormData.info.secureFormName}});this.view.appendChild(e);this.hide(this.getFirstElement(this.LPViewMap.iFrame))}}.call(this);!function(){this.timeoutRef=setTimeout(function(){if(this.secureFormData.formState===n.SEND||this.secureFormData.formState===n.RECEIVED){this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.SECURE_FORM,eventName:n.ERROR,data:{uniqueId:this.secureFormData.info.uniqueId,message:{errorReason:"Secure form load failed (Waited for "+i/1e3+" seconds)"},isTimeOut:!0}});this.logger.error("_addTimeout - secure form load failed after waiting "+i/1e3+" seconds",this.ControllerName)}}.bind(this),i)}.call(this);if(!this.formLoaded&&!this.fetchingForm&&t.src===a){this.fetchingForm=!0;this.logger.info("loadIFrame - about to fetch form URL",this.ControllerName);this.appContext.SecureFormManager.getFormUrl(this.secureFormData.info.uniqueId,function(e){this.fetchingForm=!1;this.formLoaded=!0;if(e){t.src=e;!function(e,t,i){this.receiveMessageCallback=function(t,i,n){return function(e){if("string"==typeof t&&e.origin!==t||"[object Function]"===Object.prototype.toString.call(t))return!1;lpTag.lpUtils.runCallback(i,n,e)}}(e,t,i);this.bindViewEvent({view:window,DOMEvent:"message",callback:this.receiveMessageCallback})}.call(this,"https://"+lpTag.csds.getDomain("tokenizer"),l,this);this.logger.info("loadIFrame - set the iframe with URL "+e,this.ControllerName)}else{this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.SECURE_FORM,eventName:n.ERROR,data:{uniqueId:this.secureFormData.info.uniqueId,message:{errorReason:"There is a problem with the form url"}}});this.logger.error("loadIFrame - there was a problem fetching the form URL",this.ControllerName)}}.bind(this))}};e.retrySFLoad=function(){var e=this.getFirstElement(this.LPViewMap.iFrame);this.formLoaded=!1;e.src=a;r.call(this);this.loadIFrame()};e.unloadIFrame=function(){this.getFirstElement(this.LPViewMap.iFrame).src=a;this.unbindViewEvent({view:window,DOMEvent:"message",callback:this.receiveMessageCallback});this.receiveMessageCallback=null};e.handleStateChanged=function(){var e;this.secureFormData=this.getModelParam(this.getModelPath(this.secureFormData));if((e=this.secureFormData.formState)&&this.currentFormState!==e){this.currentFormState=e;this.view.className="";this.addClass(this.view,e+this.CLASS_STATE_PREFIX);this.addClass(this.view,this.LPClassesMap.secure_form_container);switch(this.currentFormState){case n.SEND:case n.RECEIVED:this.loadIFrame();break;case n.VIEWED:s.call(this);r.call(this);break;default:s.call(this);r.call(this);!function(e){this.getFirstElement(this.LPViewMap.messageContainer).style.visibility="visible";var t="";switch(e){case n.SUBMIT:t=this.translate("secureFormSubmittedMessage");break;case n.ABORTED:case n.ERROR:t=this.secureFormData.isTimeOut?this.translate("secureFormTimeOutErrorMessage"):this.translate("secureFormErrorMessage");break;case n.VIEWED_ON_ANOTHER_TAB:t=this.appContext.conf.engConf.async?this.translate("secureFormErrorMessage"):this.translate("secureFormOpenedInAnotherTabMessage")}e=this.getFirstElement(this.LPViewMap.message);if(e&&""!==t){e.innerHTML=lpTag.HtmlSanitizerUtils&&lpTag.HtmlSanitizerUtils.sanitizeHtml(t).cleanText;this.getFirstElement(this.LPViewMap.messageContainer).focus()}}.call(this,this.secureFormData.formState);this.unloadIFrame()}}};e.getModelPath=function(e){var t=this.chatPath.SECURE_FORMS;return{name:t.name,path:t.path+"."+e.info.uniqueId}};function o(e){if(e&&e.newValue===lpTag.unifiedWindow.State.WAITING&&(this.secureFormData.formState===n.SEND||this.secureFormData.formState===n.RECEIVED||this.secureFormData.formState===n.VIEWED)){this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.SECURE_FORM,eventName:n.ABORTED,data:{uniqueId:this.secureFormData.info.uniqueId}});this.logger.info("_onChatStateChanged - form abondonment triggered/reported back",this.ControllerName)}}function s(){if(this.view){var e=this.getFirstElement(this.LPViewMap.loader);if(e){this.view.removeChild(e);this.show(this.getFirstElement(this.LPViewMap.iFrame))}}}function r(){this.timeoutRef&&clearTimeout(this.timeoutRef)}function l(e){var t=this.getFirstElement(this.LPViewMap.iFrame);if(e.source===t.contentWindow){t=function(t){try{var e=JSON.parse(t);e.state=e.state||n.SUBMIT;return e}catch(e){return{state:t}}}(e.data);this.translator.extendDictionary({secureFormName:this.secureFormData.info.secureFormName},{locale:this.appContext.conf.engConf.lang});this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.SECURE_FORM,eventName:t.state,data:{uniqueId:this.secureFormData.info.uniqueId,message:t,text:this.translate("secureForm_line_"+t.state)}});this.logger.info("_receiveMessage - recieved message from iframe: "+JSON.stringify(e||{}),this.ControllerName)}}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){lpTag.unifiedWindow.WidgetManagerViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"WidgetManagerViewController",windowSDKEvents:null,widgetSDKEventNames:null,wsdkModel:null,widgetModelPath:null,util:null,currentWidgetVC:null,sliderAPI:null,widgetsVC:[],widgetLifeCyleBindingMap:{},widgetNotifications:{},isParentWindow:null,disableWidgetAutoShow:!1,windowIsPaused:!1,isWidgetVisible:!1,isSliderVisible:!1,lastShownWidgetId:null,OPEN_SLIDER_DELAY:400,MAX_WIDGETS:5,initialize:function(e){this.log=lpTag.unifiedWindow.log;this.sliderAPI=e.sliderAPI;this.windowSDKEvents=e.windowSDKEvents;this.wsdkModel=e.wsdkModel;this.widgetSDKEventNames=lpTag.unifiedWindow.events.widgetSDK;this.widgetModelPath=lpTag.unifiedWindow.widgetModelPath;this.widgetSDKAPI=lpTag.LPWidgetSDK.API;this.util=lpTag.taglets.lpUtil;this.appContext=e.appContext;this.widgetLifeCyleBindingMap={};this.widgetNotifications={};this.widgetsVC=[];this.isParentWindow=!this.appContext.conf.unifiedConf.poppedOut;e=(e=this._validateWidgetsConfig(Array.isArray(this.appContext.conf.widgetSDK)&&this.appContext.conf.widgetSDK[0]&&this.appContext.conf.widgetSDK[0].widgets)).slice(0,this.MAX_WIDGETS);if(Array.isArray(e)&&0<e.length){this._createLifecycleBindingEntries();this._createWidgetViewControllers(e);this._restoreNotificationsCount();this._bindEvents();this._onEngagementInfoEvent();this.appContext.deviceDetector.isDesktop()&&(this.disableWidgetAutoShow=!1===this.appContext.WidgetManager.getLastSliderState())}},events:function(){this.sliderAPI.models.uiModel.bind(this.uiPath.WIDGET_SLIDER_VISIBLE,e,this)},_onEngagementInfoEvent:function(){this._triggerEventToAllWidgets(this.widgetSDKAPI.events.ENGAGEMENT_INFO,this.util.getPropertyFromObject(this.appContext,"conf.engConf"))},_createLifecycleBindingEntries:function(){var e,t;for(t in this.widgetSDKAPI.states){e=this.widgetSDKAPI.states[t];Array.isArray(this.widgetLifeCyleBindingMap[e])||(this.widgetLifeCyleBindingMap[e]=[])}},_restoreNotificationsCount:function(){this.widgetNotifications=this.appContext.WidgetManager.getWidgetsNotifications();this._publishNotifications()},_createWidgetViewControllers:function(e){var t,i=this.appContext.WidgetManager.getWidgetsStatus();e.forEach(function(e){if(e&&!1!==i[e.id]){t=new lpTag.unifiedWindow.WidgetViewController({widgetsConfig:e,sliderAPI:this.sliderAPI,windowSDKEvents:this.windowSDKEvents,wsdkModel:this.wsdkModel,appContext:this.appContext});this.widgetsVC.push(t);this._addWidgetStateHandling(t);if(!0===i[e.id]){this._removeWidgetStateHandling(e.id);t.init()}}}.bind(this))},_addWidgetStateHandling:function(e){Array.isArray(this.widgetLifeCyleBindingMap[e.getWidgetStartState()])&&this.widgetLifeCyleBindingMap[e.getWidgetStartState()].push(e)},_removeWidgetStateHandling:function(e){var t;if("string"==typeof e)for(var i in this.widgetLifeCyleBindingMap)0<=(t=(i=this.widgetLifeCyleBindingMap[i]).map(function(e){return e.getId()}).indexOf(e))&&i.splice(t,1)},_bindEvents:function(){this.bindedEvents=this.bindedEvents||[];this.bindedEvents.push(this.windowSDKEvents.bind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:this.widgetSDKEventNames.INIT,context:this,func:this._onSDKButtonClicked}));this.bindedEvents.push(this.windowSDKEvents.bind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:this.widgetSDKEventNames.WIDGET_AREA_STATE,context:this,func:this._onSliderStateChanged}));this.wsdkModel.bind(this.widgetModelPath.WINDOW_UI,this._onWindowStateChanged,this);this.bindedEvents.push(this.windowSDKEvents.bind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:this.widgetSDKEventNames.CONVERSATION_STATE,context:this,func:this._onChatStateChanged}));this.bindedEvents.push(this.windowSDKEvents.bind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:this.widgetSDKEventNames.PARTICIPANTS,context:this,func:this._onParticipantsEvent}));this.bindedEvents.push(this.windowSDKEvents.bind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:this.widgetSDKEventNames.CONVERSATION_INFO,context:this,func:this._onConversationInfoEvent}));this.bindedEvents.push(this.windowSDKEvents.bind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:this.widgetSDKEventNames.MESSAGES,context:this,func:this._onLineEvent}));this.bindedEvents.push(this.windowSDKEvents.bind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:lpTag.unifiedWindow.events.widgetSDK.WIDGET_NOTIFICATION,context:this,func:this._onWidgetNotification}));this.bindedEvents.push(this.windowSDKEvents.bind({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:lpTag.unifiedWindow.events.widgetSDK.DISPOSED_WIDGET_ID,context:this,func:this._disposeWidgetVC}));this.bindedEvents.push(this.appContext.events.bind({appName:lpTag.unifiedWindow.apps.UISTATE,eventName:lpTag.unifiedWindow.events.uiState.EMBEDDED_CHANGED,context:this,func:this._handleEmbeddedStateChanged}))},_onSDKButtonClicked:function(){var e=this.sliderAPI.models.uiModel.get(this.uiPath.WIDGET_SLIDER_VISIBLE);this.appContext.WidgetManager.onWidgetStateChanged(!e);this.disableWidgetAutoShow=!1},_handleEmbeddedStateChanged:function(){this.isWidgetVisible=this.appContext.WidgetManager.getLastSliderState()},_onSliderStateChanged:function(e){this.log.info("_onSliderStateChanged: "+e.isOpened+" "+e.type,this.ControllerName);var t=this.currentWidgetVC&&this.currentWidgetVC.getId(),i=this.lastShownWidgetId&&this.lastShownWidgetId!==t,n=e.type===lpTag.unifiedWindow.consts.slider.viewType.widgetSDKView;this.isSliderVisible=e.isOpened;this.isWidgetVisible=this.isSliderVisible&&n;if(this.isWidgetVisible)if(i)this._handleSwappedWidgets(this.lastShownWidgetId,t);else{this._triggerEventToWidget(this.widgetSDKAPI.events.UI_WIDGET,{isShown:!0},t);this.lastShownWidgetId=t}else{this._triggerEventToWidget(this.widgetSDKAPI.events.UI_WIDGET,{isShown:!1},t);this.lastShownWidgetId=null;this.currentWidgetVC=null}},_handleSwappedWidgets:function(e,t){this._triggerEventToWidget(this.widgetSDKAPI.events.UI_WIDGET,{isShown:!0},t);this.lastShownWidgetId=t;e&&e!==t&&this._triggerEventToWidget(this.widgetSDKAPI.events.UI_WIDGET,{isShown:!1},e)},_onWindowStateChanged:function(e){this.isMaximized=e&&e.newValue&&e.newValue.isMaximized;this._triggerEventToAllWidgets(this.widgetSDKAPI.events.UI_WINDOW,{isMaximized:this.isMaximized});this.isMaximized&&(this.isWidgetVisible?this._clearWidgetNotification(this.currentWidgetVC.getId()):this.pendingWidgetToShow&&this._showPendingWidget())},_showPendingWidget:function(){setTimeout(function(){this._showWidget(this.pendingWidgetToShow);this.pendingWidgetToShow=null}.bind(this),this.OPEN_SLIDER_DELAY)},_onChatStateChanged:function(e){var t=this.widgetLifeCyleBindingMap[e];if(lpTag.unifiedWindow.State.PAUSED===e)this.windowIsPaused=!0;else if(lpTag.unifiedWindow.State.RESUME_PAUSED===e){this.windowIsPaused=!1;this._onReturnFromPopout()}else this._handleWidgetsStates(t)},_onReturnFromPopout:function(){var e,t=this.appContext.WidgetManager.getLastShownWidgetId(),i=this.appContext.WidgetManager.getWidgetsStatus();this._restoreNotificationsCount();if(i)for(var n in i){e=this._getWidgetDataById(n).widget;if(!1===i[n])this._disposeWidgetVC(n);else if(!0===i[n]&&e){e.init();this._removeWidgetStateHandling(n)}}t?(e=this._getWidgetDataById(t).widget)&&setTimeout(function(){this._showWidget(e)}.bind(this),this.OPEN_SLIDER_DELAY):!1===this.appContext.WidgetManager.getLastSliderState()&&this.util.runCallback(this.sliderAPI.hideSlider,this.sliderAPI)},_handleWidgetsStates:function(e){var t=[];if(Array.isArray(e)){e.forEach(function(e){if(e&&!e.isDisposed()){e.init();this.appContext.deviceDetector.isDesktop()&&e.showAfterInitiation()&&t.push(e)}}.bind(this));e=this._getWidgetToShow(t);this.disableWidgetAutoShow||!e||this.isSliderVisible||this.appContext.WidgetManager.onWidgetStateChanged(!0)}},_onParticipantsEvent:function(e){e&&this._triggerEventToAllWidgets(this.widgetSDKAPI.events.PARTICIPANTS,e)},_onConversationInfoEvent:function(e){e&&this._triggerEventToAllWidgets(this.widgetSDKAPI.events.CONVERSATION_INFO,e)},_onLineEvent:function(e){e&&this._triggerEventToAllWidgets(this.widgetSDKAPI.events.MESSAGES,e)},_onWidgetNotification:function(e){e=e.widgetId;this.isMaximized&&this.isWidgetVisible&&e===this.currentWidgetVC.getId()||this._handleWidgetNotification(e)},_triggerEventToAllWidgets:function(e,t,i){var n=this.util.getUID();i=i||[];for(var a=0;a<this.widgetsVC.length;a++){for(var o=this.widgetsVC[a].getId(),s=!1,r=0;r<i.length;r++)if(i[r]===o){s=!0;break}s||this._triggerEventToWidget(e,t,o,n)}},_triggerEventToWidget:function(e,t,i,n){if(!this.windowIsPaused){i=this._getWidgetDataById(i).widget;n=n||this.util.getUID();i&&i.trigger&&i.trigger(e,{id:n,type:e,data:t})}},_showWidget:function(e){var t;if(e){t=this.appContext.WidgetManager.isWindowMaximized();this.sliderAPI.isSliderOpen=!0;if(t){this.currentWidgetVC=e;this.currentWidgetVC.showWidget();this._clearWidgetNotification(this.currentWidgetVC.getId());this._removeWidgetStateHandling(this.currentWidgetVC.getId())}else this.pendingWidgetToShow=e}},_getWidgetToShow:function(e){var e=Array.isArray(e)&&0<e.length&&e||[],t=e[0];e.forEach(function(e){e.getPriority()>t.getPriority()&&(t=e)}.bind(this));return t},_getWidgetDataById:function(e){var t={widget:null,index:-1};if(e)for(var i=0;i<this.widgetsVC.length;i++)if(this.widgetsVC[i].getId()===e){t.widget=this.widgetsVC[i];t.index=i;break}return t},_getInitiatedWidgets:function(){return this.widgetsVC.filter(function(e){return!0===e.isInitiated()||e.isError()})||[]},_validateWidgetsConfig:function(e){var t,i,n,a=[];if(Array.isArray(e))for(var o=0;o<e.length;o++){i=n=!1;if("object"==typeof(t=e[o])&&"string"==typeof t.url&&0<t.url.length&&"string"==typeof t.name&&0<t.name.length){if("string"==typeof t.startState)for(var s=Object.keys(this.widgetSDKAPI.states),r=0;r<s.length;r++)this.widgetSDKAPI.states[s[r]]===t.startState&&(n=!0);n||(t.startState=this.isAsync?this.widgetSDKAPI.states.IN_QUEUE:this.widgetSDKAPI.states.ACCEPTED);"boolean"!=typeof t.showOnInit&&(t.showOnInit=!1);t.id=encodeURIComponent(t.name.trim().replace(" ","_"));t.url=decodeURIComponent(t.url.trim());t.priority=e.length-o;for(var l=0;l<a.length;l++)if(a[l].id===t.id){i=!0;break}i||a.push(t)}}return a},_disposeWidgetVC:function(e){var t=this._getWidgetDataById(e),i=t.widget,t=t.index;if(i){i.dispose();this.widgetsVC.splice(t,1);this._removeWidgetStateHandling(e);this.currentWidgetVC=this.currentWidgetVC&&this.currentWidgetVC.getId()===e?null:this.currentWidgetVC;this.appContext.WidgetManager.handleWidgetDisposal(e)}},_handleWidgetNotification:function(e){if(!this.windowIsPaused){this.widgetNotifications[e]=this.widgetNotifications[e]||0;this.widgetNotifications[e]+=1;this.appContext.WidgetManager.setWIdgetsNotifications(this.widgetNotifications);this._publishNotifications()}},_clearWidgetNotification:function(e){if(!this.windowIsPaused){this.widgetNotifications[e]=0;this.appContext.WidgetManager.setWIdgetsNotifications(this.widgetNotifications);this._publishNotifications()}},_publishNotifications:function(){var e=0;if(this.widgetNotifications){for(var t in this.widgetNotifications)e+=this.widgetNotifications[t];this.windowSDKEvents.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:lpTag.unifiedWindow.events.widgetSDK.NOTIFICATION,data:e})}},_unbindEvents:function(){this.bindedEvents.forEach(function(e){this.windowSDKEvents.unbind(e)}.bind(this));this.wsdkModel.unbind(this.widgetModelPath.WINDOW_UI,this._onWindowStateChanged,this)}});lpTag.unifiedWindow.WidgetManagerViewController.prototype.dispose=function(){this._unbindEvents();this.widgetsVC.forEach(function(e){e&&this._disposeWidgetVC(e.getId())}.bind(this));this.widgetsVC=[];this.widgetLifeCyleBindingMap={};this.sliderAPI.dispose()};function e(){this.sliderAPI.models.uiModel.get(this.uiPath.WIDGET_SLIDER_VISIBLE)?this._showWidget(this._getWidgetToShow(this._getInitiatedWidgets())):this.util.runCallback(this.sliderAPI.hideSlider,this.sliderAPI)}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e,i;lpTag.unifiedWindow.WidgetViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"WidgetViewController",sliderAPI:null,widgetsConfig:null,imageRepository:null,windowSDKEvents:null,initialEvents:null,util:null,showOnInit:!1,priority:-1,courier:null,state:null,WAIT_FOR_SLIDER_AVAILABILITY_TIME:400,MAX_OPEN_SLIDER_TRIES:5,STATE_TYPE:{inititating:"initiating",initiated:"initiated",errorOnInitiation:"errorOnInitiation",disposed:"disposed"},MAX_LOADING_TIME:3e3,initialize:function(e){this.sliderAPI=e.sliderAPI;this.widgetsConfig=e.widgetsConfig;this.windowSDKEvents=e.windowSDKEvents;this.appContext=e.appContext;this.util=lpTag.taglets.lpUtil;this.widgetSDKAPI=lpTag.LPWidgetSDK.API;(i={})[this.widgetSDKAPI.events.PARTICIPANTS]=!0;i[this.widgetSDKAPI.events.CONVERSATION_INFO]=!0;i[this.widgetSDKAPI.events.MESSAGES]=!0;i[this.widgetSDKAPI.events.ENGAGEMENT_INFO]=!0},_initWidget:function(){var e=this.widgetsConfig;this.state=this.STATE_TYPE.inititating;this.showOnInit=e.showOnInit;this.priority=e.priority;if(e&&e.url&&"string"==typeof e.name){this._createWidgetCourier();this.state=this.STATE_TYPE.initiated;this.windowSDKEvents.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:lpTag.unifiedWindow.events.widgetSDK.INITIATED_WIDGET_ID,data:this.getId()})}},_createWidgetCourier:function(){var e,t=this._getParametesForWidgetCreation()||this.widgetsConfig.url,i={context:this,reload:this.reloadWidget},n={width:"100%",height:"100%","border-color":"transparent"};try{e=new lpTag.Chronos.PostMessageCourier({target:{url:t,callback:this._onCourierInitiatedCallback,context:this,useObjects:!this.appContext.deviceDetector.isIE(),style:n,container:this.getFirstElement(this.view)},removeDispose:!0});this.sliderAPI.addView(this.getFirstElement(this.view),"",this.getId(),lpTag.unifiedWindow.consts.slider.viewType.widgetSDKView,i)}catch(e){this.logger.error("Error on courier initiation for: "+this.getId(),this.ControllerName);this._handleError()}this.courierErrorTimeout=setTimeout(function(){this.state!==this.STATE_TYPE.initiated&&this._handleError()}.bind(this),this.MAX_LOADING_TIME);this.courier=e},_getParametesForWidgetCreation:function(){var e=[];this.getId()&&e.push({key:lpTag.unifiedWindow.consts.widgetSDK.WIDGET_NAME,value:this.getId()});this.appContext.conf.unifiedConf.accountId&&e.push({key:lpTag.unifiedWindow.consts.widgetSDK.ACCOUNT_ID,value:this.appContext.conf.unifiedConf.accountId});return this.util.addQueryParams(this.widgetsConfig.url,e)},_onCourierInitiatedCallback:function(e,t){if(e)this._handleError();else{this.iframe=this._setIframeAccessibilityAttrs(t);this._runPendingEventsData();this.setWidgetCommandEvents()}},_runPendingEventsData:function(){for(var e in this.initialEvents)if(this.initialEvents.hasOwnProperty(e))for(var t=0;t<this.initialEvents[e].length;t++)this.trigger(this.initialEvents[e][t].eventName,this.initialEvents[e][t].data)},_handleError:function(){if(this.STATE_TYPE.errorOnInitiation!==this.state||this.STATE_TYPE.disposed!==this.state){this.logger.error("_handleError: Failed to init widget communication",this.ControllerName);this.state=this.STATE_TYPE.errorOnInitiation}},_setIframeAccessibilityAttrs:function(e){if(e.constructor===HTMLIFrameElement){e.setAttribute("tabindex","0");e.setAttribute("role","region");e.setAttribute("aria-label","widget area");e.setAttribute("title","widget area");e.setAttribute("aria-hidden","false");return e}},setWidgetCommandEvents:function(){if(this.courier){this.courier.comply({appName:this.widgetSDKAPI.appName,cmdName:this.widgetSDKAPI.commands.NOTIFICATION,func:this._onWidgetNotification,context:this});this.courier.comply({appName:this.widgetSDKAPI.appName,cmdName:this.widgetSDKAPI.commands.DISPOSE,func:this._onDisposeCommand,context:this})}},_onWidgetNotification:function(e){this.logger.info("_onNotification: on notification",this.ControllerName);(e=e||{}).widgetId=e.id||this.getId();this.windowSDKEvents.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:lpTag.unifiedWindow.events.widgetSDK.WIDGET_NOTIFICATION,data:e})},_onDisposeCommand:function(e){e===this.getId()&&this.windowSDKEvents.trigger({appName:lpTag.unifiedWindow.apps.WINDOW_SDK,eventName:lpTag.unifiedWindow.events.widgetSDK.DISPOSED_WIDGET_ID,data:e})},_addToSlider:function(){this.sliderAPI.setSelectedView(this.getId());this.sliderAPI.showSlider()}});(e=lpTag.unifiedWindow.WidgetViewController.prototype).getId=function(){return this.widgetsConfig&&this.widgetsConfig.id};e.showAfterInitiation=function(){return this.showOnInit};e.getPriority=function(){return this.priority};e.getWidgetStartState=function(){return this.widgetsConfig.startState};e.getEvents=function(){return this.widgetsConfig.events};e.trigger=function(e,t){this.courier?this.courier.trigger({appName:this.widgetSDKAPI.appName,eventName:e,data:t}):function(e,t){if(i[e]){this.initialEvents=this.initialEvents||{};this.initialEvents[e]=this.initialEvents[e]||[];this.initialEvents[e].push({eventName:e,data:t})}}.call(this,e,t)};e.reloadWidget=function(){if(this.state!==this.STATE_TYPE.inititating){if(this.courier){this.courier.dispose();this.courier=null}this.iframe=null;this._initWidget()}};e.init=function(){null===this.state&&this._initWidget()};e.showWidget=function(){var e,t=0;if(this.sliderAPI.isInProgress())e=setInterval(function(){t++;if(this.sliderAPI.isInProgress())this.MAX_OPEN_SLIDER_TRIES===t&&clearInterval(e);else{this.init();this._addToSlider();clearInterval(e)}}.bind(this),this.WAIT_FOR_SLIDER_AVAILABILITY_TIME);else{this.init();this._addToSlider()}};e.isInitiated=function(){return this.state===this.STATE_TYPE.initiated};e.isDisposed=function(){return this.state===this.STATE_TYPE.disposed};e.isError=function(){return this.state===this.STATE_TYPE.errorOnInitiation};e.dispose=function(){if(this.state!==this.STATE_TYPE.disposed){this.state=this.STATE_TYPE.disposed;this.sliderAPI.getSelectedViewId()===this.getId()&&this.util.runCallback(this.sliderAPI.hideSlider,this.sliderAPI);this.sliderAPI.removeView(this.getId());if(this.courierErrorTimeout){clearTimeout(this.courierErrorTimeout);this.courierErrorTimeout=null}this.courier.dispose()}}}();!function(){lpTag.unifiedWindow.LogoViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"LogoViewController",initialize:function(e){this.appContext=e.appContext;this.windowConf=this.appContext.conf.windowConf;this.unifiedConf=this.appContext.conf.unifiedConf},render:function(){var e=this.appContext.conf.conversationOwnerBrandInfo,e=this.windowConf.brandLogoEnabled&&e&&e.logoImg?e.logoImg:this.windowConf.logoUrl;this.windowConf.logoImage&&e&&this.createView({template:this.unifiedConf.hasDeflectionHeader?"<div class='lp_logo_area_wrapper' title='{{altText}}' data-lp-cust-id='logoAltText'><div class='lp_logo_image_wrapper lpc_banner-image-area__image-wrapper lpc_banner-image-area__image-wrapper_maximized {{deviceClass}}' data-lp-cust-id='logo'><img src='{{url}}' alt='{{altText}}' class='lp_image lpc_banner-image-area__image lpc_banner-image-area__image_maximized {{deviceClass}}' data-lp-cust-id='logoImage'></div><div class='lp_logo_divider'></div><a class='lp_logo_link lpc_banner-image-area__link lpc_banner-image-area__link_maximized {{deviceClass}} {{disableLinkClass}}' href='{{targetUrl}}' target='_blank' rel='noopener noreferrer' title='{{altText}}' data-lp-cust-id='logoTarget' {{tabindex}}><div class='lp_deflection-area'><div class='lp_deflection-icon'></div><div class='lp_deflection-message'>Find us on Maven Messenger</div></div></a></div>":"<div class='lp_logo_area_wrapper' title='{{altText}}' data-lp-cust-id='logoAltText'><a class='lp_logo_link lpc_banner-image-area__link lpc_banner-image-area__link_maximized {{deviceClass}} {{disableLinkClass}}' href='{{targetUrl}}' target='_blank' rel='noopener noreferrer' title='{{altText}}' data-lp-cust-id='logoTarget' {{tabindex}}><div class='lp_logo_image_wrapper lpc_banner-image-area__image-wrapper lpc_banner-image-area__image-wrapper_maximized {{deviceClass}}' data-lp-cust-id='logo'><img src='{{url}}' alt='{{altText}}' class='lp_image lpc_banner-image-area__image lpc_banner-image-area__image_maximized {{deviceClass}}' data-lp-cust-id='logoImage'></div></a></div>",wrapWithDiv:!1,textInjection:{url:e,targetUrl:this.windowConf.logoRedirectUrl||"javascript:void(0);",disableLinkClass:this.windowConf.logoRedirectUrl?"":"disableLinkClass",tabIndex:this.windowConf.logoRedirectUrl?"":"tabindex='0'",altText:this.windowConf.logoAltText||this.translate("defaultAltLogoText")},callback:function(e){if(!this.windowConf.logoRedirectUrl){e=e.getElementsByClassName("lp_logo_link")[0];e.removeAttribute("href");e.outerHTML=e.outerHTML.replace("<a","<span").replace("a>","span>")}if(this.unifiedConf.hasDeflectionHeader){var t=document.getElementsByClassName("lpc_banner-image-area__image"),i=document.getElementsByClassName("lp_location_center");if(t&&0<t.length&&i&&0<i.length){n(a(t[0],i[0]));i[0].addEventListener("scroll",function(){n(a(t[0],i[0]))})}}}})}});function n(e){var t=document.getElementsByClassName("lpc_maximized-header__text-wrapper");t&&0<t.length&&(t[0].style.display=e?"none":"inline-block")}function a(e,t){var i=e.offsetTop,e=i+e.clientHeight,n=t.scrollTop,t=n+t.clientHeight;return n<=i&&e<=t||i<n&&n<e||i<t&&t<e}}();!function(){var e;lpTag.unifiedWindow.HistoryButtonViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"HistoryButtonViewController",LPViewMap:{wrapper:"^history_button_wrapper",button:"^history_button"},isRendered:!1,wrapper:void 0,button:void 0,initialize:function(e){this.appContext=e.appContext},events:function(){this.bindModel({path:this.chatPath.LINES,callback:i});this.appContext.events.bind({appName:"rotator",eventName:this.VCEvents.HISTORY_TRY_NEXT,context:this,func:o});this.appContext.events.bind({appName:"*",eventName:lpTag.unifiedWindow.events.chat.CONVERSATION_HISTORY,context:this,func:t});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.END_OF_HISTORY,context:this,func:n})},render:function(){this.createView({template:"<div class='lp_history_button_wrapper lpHide' data-lp-point='history_button_wrapper'><button class='lp_history_button' aria-label='{{buttonAriaLabelText}}' data-lp-point='history_button'>{{buttonDisplayText}}</button></div>",wrapWithDiv:!1,textInjection:{buttonDisplayText:this.translate("transcriptHistoryButtonDisplayText"),buttonAriaLabelText:this.translate("transcriptHistoryButtonAriaLabelText")},callback:function(){this.isRendered=!0;this.wrapper=this.getFirstElement(this.LPViewMap.wrapper);this.button=this.getFirstElement(this.LPViewMap.button);if(this.button){var e=this;this.button.onclick=function(){o.call(e)}}var t=this.appContext.conversationManager.getConversationList();a.call(this,t)}.bind(this)})},dispose:function(){this.unbindModel({path:this.chatPath.LINES,callback:i});this.appContext.events.unbind({appName:"rotator",eventName:this.VCEvents.HISTORY_TRY_NEXT,context:this,func:o});this.appContext.events.unbind({appName:"*",eventName:lpTag.unifiedWindow.events.chat.CONVERSATION_HISTORY,context:this,func:t});this.appContext.events.unbind({appName:"*",eventName:this.VCEvents.END_OF_HISTORY,context:this,func:n})}});(e=lpTag.unifiedWindow.HistoryButtonViewController.prototype).showHistoryButton=function(){this.removeClass(this.wrapper,"lpHide")};e.hideHistoryButton=function(){this.addClass(this.wrapper,"lpHide")};e.enableHistoryButton=function(){this.setEnabled(!0,this.button)};e.disableHistoryButton=function(){this.setEnabled(!1,this.button)};function t(e){this.isRendered&&a.call(this,e)}function i(e){var t=!1,i=e&&e.newValue;if(i&&0<i.length)for(var n=0;n<i.length&&!t;){if(i[n]&&i[n].history){t=!0;break}n++}if(t){this.enableHistoryButton();this.appContext.conversationManager.areAllConversationsLoaded()&&this.hideHistoryButton()}}function n(){this.hideHistoryButton()}function a(e){Array.isArray(e)&&2<e.length&&this.showHistoryButton()}function o(){this.disableHistoryButton();this.appContext.events.trigger({appName:"*",eventName:this.VCEvents.CONVERSATIONS_VIEWED,data:{retry:!1}})}}();!function(){lpTag.unifiedWindow.RotatorViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"RotatorViewController",updateRotatorTimeouts:[],LPViewMap:{wrapper:".lp_transcript_rotator_wrapper",text:"^lp_transcript_rotator_text",link:"^lp_transcript_rotator_link",image:".lp_transcript_rotator_image"},initialize:function(e){this.appContext=e.appContext;this.updateRotatorTimeoutIDs=[];this.failedToLoadHistory=this.appContext.conf.unifiedConf.failedToLoadHistory;this.hideRotatorView=!1;var e=this.appContext.conf.unifiedConf.transcriptRotatorFirstMessageTimeout||2e3,t=this.appContext.conf.unifiedConf.transcriptRotatorSecondMessageTimeout||4e3;this.updateRotatorTimeouts=[e,t]},events:function(){this.bindModel({path:this.chatPath.LINES,callback:e});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.CONVERSATIONS_VIEWED,context:this,func:t});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.END_OF_HISTORY,context:this,func:i})},render:function(){this.createView({template:"<div class='lp_transcript_rotator_wrapper lpHide'><div class='lp_transcript_rotator_image'><img src='{{imagesRepository}}/{{imageUrl}}' alt='' class='lp_image'></div><div class='lp_transcript_rotator_text'><span class='text' data-lp-point='lp_transcript_rotator_text'>{{text}}</span> <a href='#' data-lp-point='lp_transcript_rotator_link'>{{linkText}}</a></div></div>",wrapWithDiv:!1,textInjection:{imagesRepository:this.appContext.conf.unifiedConf.imagesRepository,imageUrl:"loader_anim_bgwhite_16.gif",text:this.translate("transcriptRotatorDefaultMessage"),linkText:this.translate("transcriptRotatorLinkText")},callback:function(){this.getFirstElement(this.LPViewMap.link).onclick=function(){this.appContext.events.trigger({appName:"rotator",eventName:this.VCEvents.HISTORY_TRY_NEXT})}.bind(this);this.failedToLoadHistory&&t.call(this)}.bind(this)})}});function e(e){var t=!1,i=e&&e.newValue;if(i&&0<i.length)for(var n=0;n<i.length&&!t;){i[n]&&i[n].history&&(t=!0);n++}t&&this.hideRotator()}lpTag.unifiedWindow.RotatorViewController.prototype.hideRotator=function(){var e=this.getFirstElement(this.LPViewMap.wrapper);if(e){n.call(this);this.addClass(e,"lpHide")}};function i(e){this.hideRotatorView=e&&e.shouldHide||!1}function t(e){var t=e&&e.changedScroll||!1,e=e&&e.preventRotator||!1;if(!t&&!e)if(this.hideRotatorView){this.hideRotator();i.call(this,{shouldHide:!1})}else{t=this.getFirstElement(this.LPViewMap.wrapper);this.removeClass(t,"lpHide");n.call(this);!function(){for(var e,t=[{message:this.translate("transcriptRotatorFirstMessage"),hideImage:!1,hideLink:!0},{message:this.translate("transcriptRotatorSecondMessage"),hideImage:!0,hideLink:!1}],i=0;i<t.length;i++){e=setTimeout(a.bind(this,t[i]),this.updateRotatorTimeouts[i]);this.updateRotatorTimeoutIDs.push(e)}}.call(this)}}function n(){for(var e=0;e<this.updateRotatorTimeoutIDs.length;e++)clearTimeout(this.updateRotatorTimeoutIDs[e]);this.updateRotatorTimeoutIDs=[];a.call(this,{message:this.translate("transcriptRotatorDefaultMessage"),hideImage:!1,hideLink:!0})}function a(e){var t=this.getFirstElement(this.LPViewMap.wrapper),i=this.getFirstElement(this.LPViewMap.text,t),n=this.getFirstElement(this.LPViewMap.link,t),t=this.getFirstElement(this.LPViewMap.image,t);i&&(i.innerText=e&&e.message);t&&this.toggle(e&&!e.hideImage,{view:t,useClasses:!0});n&&this.toggle(e&&!e.hideLink,{view:n,useClasses:!0})}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};var STORAGE={KEY:"-richContentWidgetKey",DOMAIN:"leCdnDomain"};!function(){var i=lpTag.unifiedWindow.apps.RICH_CONTENT;lpTag.unifiedWindow.RichContentWidgetManagerViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"RichContentWidgetViewController",initialize:function(e){this.appContext=e.appContext||{};this.sliderAPI=e.sliderAPI;this.sliders={};this.slidersPersistedData={};this.accountId=this.appContext.conf&&this.appContext.conf.unifiedConf&&this.appContext.conf.unifiedConf.accountId||lpTag.site;this._loadState()},events:function(){this.appContext.events.bind({appName:i,eventName:lpTag.unifiedWindow.consts.RichContent.LINK_CLICKED,context:this,func:this._onLinkClicked});this.appContext.events.bind({appName:"slider",eventName:this.VCEvents.SLIDER_CLOSED,context:this,func:this._onSliderClosed})},dispose:function(){this._disposeSliders();this._unbindEvents();lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)},_unbindEvents:function(){this.appContext.events.unbind({appName:i,eventName:lpTag.unifiedWindow.consts.RichContent.LINK_CLICKED,context:this,func:this._onLinkClicked});this.appContext.events.unbind({appName:"slider",eventName:this.VCEvents.SLIDER_CLOSED,context:this,func:this._onSliderClosed})},_onLinkClicked:function(e){if(e.url){this.sliders[e.url]?this.sliders[e.url].reload():this._initWidgetInstance(e);this.sliders[e.url].addToSlider();this._saveState(this.sliders[e.url].getId(),{url:e.url,actionData:e.actionData})}else this.logger.error("Cannot open RichContentWidget: url is missing",this.ControllerName)},_initWidgetInstance:function(e,t){this.sliders[e.url]=new lpTag.unifiedWindow.RichContentWidgetViewController({sliderAPI:this.sliderAPI,url:e.url,sliderId:t,actionData:e.actionData,appContext:this.appContext})},_onSliderClosed:function(e){e.type===lpTag.unifiedWindow.consts.slider.viewType.RichContentLinkAction&&this._disposeSliders()},_disposeSliders:function(){for(var e in this.sliders)this.sliders[e]&&this.sliders[e].dispose();this.sliders={};this._saveState()},_getStorageKey:function(){return STORAGE.KEY+"_"+(this.appContext.conf&&this.appContext.conf.engConf&&this.appContext.conf.engConf.ssid)},_saveState:function(e,t){if(e){this.slidersPersistedData[e]=t;this.slidersPersistedData.activeId=e}else this.slidersPersistedData={};lpTag.taglets.lpSecureStorage.setValue({key:this._getStorageKey(),site:this.accountId,app:i,value:this.slidersPersistedData,success:this._onSaveSuccess.bind(this),error:this._onSaveError.bind(this),appName:i,domain:n(),firstParty:!0})},_onSaveSuccess:function(){this.logger.info("successfully saved RC content",this.ControllerName)},_onSaveError:function(e){this.logger.error("fail to saved RC content "+e,this.ControllerName)},_loadState:function(){lpTag.taglets.lpSecureStorage.getValue({key:this._getStorageKey(),site:this.accountId,app:i,success:this._onLoadSuccess.bind(this),error:this._onLoadError.bind(this),appName:i,domain:n(),firstParty:!0})},_onLoadSuccess:function(e){this.logger.info("successfully loaded RC content",this.ControllerName);if(e)for(var t in this.slidersPersistedData=e)if(t&&"activeId"!==t){this._initWidgetInstance(e[t],t);e.activeId===t&&this.sliders[e[t].url].addToSlider()}},_onLoadError:function(e){this.logger.error("fail to load RC content "+e,this.ControllerName)}});function n(){var e=window.lpTag.taglets.lpSecureStorage.v;return"https://"+lpTag.csds.getDomain(STORAGE.DOMAIN)+"/le_secure_storage/"+(e||"")}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.RichContentWidgetViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"RichContentWidgetViewController",sliderAPI:null,initialize:function(e){this.url=e.url;this.sliderAPI=e.sliderAPI;this.actionData=e.actionData||{};this.sliderId=e.sliderId||"richContent_"+Date.now();this.appContext=e.appContext;this.log=lpTag.unifiedWindow.log;this._createIFrame()},dispose:function(){this.sliderAPI.removeView(this.sliderId);lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)},addToSlider:function(){this.sliderAPI.setSelectedView(this.sliderId);this.sliderAPI.showSlider();this.sliderAPI.focusOnMinimize()},reload:function(){if(this.iframe)this.iframe.src=this.iframe.src;else if(this.courier){this.courier.dispose();this._createIFrame()}},getId:function(){return this.sliderId},_createIFrame:function(){(this.appContext&&this.appContext.conf&&this.appContext.conf.unifiedConf).widgetSDK?this._createChronosCourier():this._createPlainIFrame();this.sliderAPI.addView(this.getFirstElement(this.view),this.actionData.name||"",this.sliderId,lpTag.unifiedWindow.consts.slider.viewType.RichContentLinkAction)},_createChronosCourier:function(){this.courier=new lpTag.Chronos.PostMessageCourier({target:{url:this.url,callback:this._onCourierInitiatedCallback,context:this,useObjects:!this.appContext.deviceDetector.isIE(),style:{width:"100%",height:"100%",borderColor:"transparent"},container:this.getFirstElement(this.view)},removeDispose:!0})},_createPlainIFrame:function(){this.iframe=document.createElement("IFRAME");this.iframe.style.width="100%";this.iframe.style.height="100%";this.iframe.style.borderColor="transparent";this.iframe.setAttribute("src",this.url);this._setIframeAccessibilityAttrs(this.iframe);this.view.appendChild(this.iframe)},_setIframeAccessibilityAttrs:function(e){if(e.constructor===HTMLIFrameElement){e.setAttribute("tabindex","0");e.setAttribute("role","region");e.setAttribute("aria-label","widget area");e.setAttribute("title","widget area");return e}},_onCourierInitiatedCallback:function(e,t){if(e)this.log.error("_handleError: Failed to init widget communication",this.ControllerName);else{this._setIframeAccessibilityAttrs(t);this._setWidgetCommandEvents()}},_setWidgetCommandEvents:function(){this.courier&&this.courier.comply({appName:lpTag.LPWidgetSDK.API.appName,cmdName:lpTag.LPWidgetSDK.API.commands.DISPOSE,func:this._onDisposeCommand,context:this})},_onDisposeCommand:function(){this.appContext.events.trigger({appName:"RichContentWidget",eventName:"CloseRichContentWidget"})}});window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};var proto,STORAGE={KEY:"-mavenPayWidgetKey",DOMAIN:"leCdnDomain"};!function(){var i=lpTag.unifiedWindow.apps.MAVEN_PAY;lpTag.unifiedWindow.MavenPayWidgetManagerViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"MavenPayWidgetViewController",initialize:function(e){this.appContext=e.appContext||{};this.sliderAPI=e.sliderAPI;this.sliders={};this.slidersPersistedData={};this.accountId=this.appContext.conf&&this.appContext.conf.unifiedConf&&this.appContext.conf.unifiedConf.accountId||lpTag.site;this._loadState()},events:function(){this.appContext.events.bind({appName:i,eventName:lpTag.unifiedWindow.consts.MavenPay.LINK_CLICKED,context:this,func:this._onLinkClicked});this.appContext.events.bind({appName:"slider",eventName:this.VCEvents.SLIDER_CLOSED,context:this,func:this._onSliderClosed})},dispose:function(){this._disposeSliders();this._unbindEvents();lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)},_unbindEvents:function(){this.appContext.events.unbind({appName:i,eventName:lpTag.unifiedWindow.consts.MavenPay.LINK_CLICKED,context:this,func:this._onLinkClicked});this.appContext.events.unbind({appName:"slider",eventName:this.VCEvents.SLIDER_CLOSED,context:this,func:this._onSliderClosed})},_onLinkClicked:function(e){if(e.url){this.sliders[e.url]?this.sliders[e.url].reload():this._initWidgetInstance(e);this.sliders[e.url].addToSlider();e.actionData=e.actionData||{};e.actionData.name=this.translate("paymentRequest_SlideoutTitle");this._saveState(this.sliders[e.url].getId(),{url:e.url,actionData:e.actionData})}else this.logger.error("Cannot open MavenPayWidget: url is missing",this.ControllerName)},_initWidgetInstance:function(e,t){this.sliders[e.url]=new lpTag.unifiedWindow.MavenPayWidgetViewController({sliderAPI:this.sliderAPI,url:e.url,sliderId:t,actionData:e.actionData,appContext:this.appContext})},_onSliderClosed:function(e){e.type===lpTag.unifiedWindow.consts.slider.viewType.MavenPayLinkView&&this._disposeSliders()},_disposeSliders:function(){for(var e in this.sliders)this.sliders[e]&&this.sliders[e].dispose();this.sliders={};this._saveState()},_getStorageKey:function(){return STORAGE.KEY+"_"+(this.appContext.conf&&this.appContext.conf.engConf&&this.appContext.conf.engConf.ssid)},_saveState:function(e,t){if(e){this.slidersPersistedData[e]=t;this.slidersPersistedData.activeId=e}else this.slidersPersistedData={};lpTag.taglets.lpSecureStorage.setValue({key:this._getStorageKey(),site:this.accountId,app:i,value:this.slidersPersistedData,success:this._onSaveSuccess.bind(this),error:this._onSaveError.bind(this),appName:i,domain:n(),firstParty:!0})},_onSaveSuccess:function(){this.logger.info("successfully saved Maven Pay content",this.ControllerName)},_onSaveError:function(e){this.logger.error("failed to save Maven Pay content "+e,this.ControllerName)},_loadState:function(){lpTag.taglets.lpSecureStorage.getValue({key:this._getStorageKey(),site:this.accountId,app:i,success:this._onLoadSuccess.bind(this),error:this._onLoadError.bind(this),appName:i,domain:n(),firstParty:!0})},_onLoadSuccess:function(e){this.logger.info("successfully loaded Maven Pay content",this.ControllerName);if(e)for(var t in this.slidersPersistedData=e)if(t&&"activeId"!==t){this._initWidgetInstance(e[t],t);e.activeId===t&&this.sliders[e[t].url].addToSlider()}},_onLoadError:function(e){this.logger.error("failed to load Maven Pay content "+e,this.ControllerName)}});function n(){var e=window.lpTag.taglets.lpSecureStorage.v;return"https://"+lpTag.csds.getDomain(STORAGE.DOMAIN)+"/le_secure_storage/"+(e||"")}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.MavenPayWidgetViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"MavenPayWidgetViewController",sliderAPI:null,initialize:function(e){this.url=e.url;this.sliderAPI=e.sliderAPI;this.actionData=e.actionData||{};this.sliderId=e.sliderId||"mavenPay_"+Date.now();this.appContext=e.appContext;this._createIFrame()},dispose:function(){this.sliderAPI.removeView(this.sliderId);lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)},addToSlider:function(){this.sliderAPI.setSelectedView(this.sliderId);this.sliderAPI.showSlider();this.sliderAPI.focusOnMinimize()},reload:function(){this.iframe&&(this.iframe.src=this.iframe.src)},getId:function(){return this.sliderId},_createIFrame:function(){this.iframe=document.createElement("IFRAME");this.iframe.style.width="100%";this.iframe.style.height="100%";this.iframe.style.borderColor="transparent";this.iframe.setAttribute("src",this.url);this.iframe.setAttribute("tabindex","0");this.iframe.setAttribute("role","region");this.iframe.setAttribute("aria-label","widget area");this.iframe.setAttribute("title","widget area");this.view.appendChild(this.iframe);this.sliderAPI.addView(this.getFirstElement(this.view),this.actionData.name||"",this.sliderId,lpTag.unifiedWindow.consts.slider.viewType.MavenPayLinkView)}});window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e;lpTag.unifiedWindow.ProductDetailsAreaViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"ProductDetailsAreaViewController",applicationType:"ProductDetailsAreaViewController",templateName:"<div class='lp_product_details_area' data-lp-point='product_details_area'><img class='lp_product_details_image' src='{{productImage}}' onerror='this.src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAgCAYAAABpRpp6AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAAB3RJTUUH4QUYCiwdGyEQJgAAA/BJREFUWMPNmL+LXFUUxz8zbCESdQUrC9lGxSpj/AO819qESSdJxCGNjcHNriCisBOCTTRhgpIihU4kbkRQHo7Yybm7EruQQbQJiMMKi4XimAjaafN98nJz78ybyU7wNI99c++73/M93/PjboM9NrPQAtrA2HvX2+vvL+0BwGUBdHo+BPwBrLAAW7pLFtvAfmALKIC+nh3v3XgRgBtzsjgGgsCFEpxZKAC8d20WZEtTWHRAJ2Kx570bJtaXDq3MGK0O8GGNpeeBbiNi0VWYJMXihAiMJIViBrA9EeJSJFTWrQjHsFHxsqdD+wI4nOHgmaQgB/uKRtt7N6q55/eG0P8EeO9dmCMB2+XhdRJNBwflQXuW5DQLwyWF5NKcYEumOjXBtkqZee86c+TcuEy6eUtQVw2iqJlcPWDVe9dP/N4FVlXHt7TuDlk2gWElyWa1HrBsFvpTwK5qbScDtldJ9ofLRJdcbwcsdvYrvDOZksUBbYHKmZMMikwFeLWsFN67sqUXYvwOhlEI5ir2CpsDugp7ylaBl1KMqVJsJXKgD7RygMNdyKIKupcCrUiclyxiGwHPJiLckVyTgIscYLOwkmEmBTpMiFQXcGbBZZz5T7OSVzvlYLNy2HIG2CfAd2bhdI16XLbylENjAehmnAnA0Cz8U+l+o+zwo24VqjOsWTgKvKMPrgP3Ay/GNVuODqe1ZtXh68DTs3TSyv7QrPx9myykqTPAWeAacAT4FBiYhc1Ic32gPwVsRyyenAdsaloLkWbeAH7R+9I2gYEY3zELa8C+ciaoMeS05+mo2XnYLIz04ZHmi0PAbmbvM8DbwCO5ECsKBbAcDzlm4ThwGDhRZ/hJSaJa3jaBixPAIpmMgTMZsC1gB7gZJ5DA9oBbSui1ugzHgAvgBYX4ypS968Df3rvXE2CPA9vAt/FQXwH7svLjNWDdLHxZp9umGH4SuCDvmSCH54GDCbCnBegU8CZwDtg2C60I7I1KpI4qF3biOj3xiuS9G5uFH4C/Jux5ANjQNDWK9HoZeDwCNNBzW8/qb6XdUsQOAl+YhUveuxN173QmBsOEjnXde/dBpNfLwK8CFEdnoHe7CbDxumvAu2bhe+BYnB/NxKbPgAMTpq4DwLGow20DV8VSTkphCtjSdlXzr0pKa1Ov+WqPcUl7FPgYOFTWUrNwCjgpnQ4WcKt/Qon5o+QyzF3zv5IsqoA3gI+8d0F6fR94LqPJvbIbYnsd+BnY18ws/FqASzsC3Ae8pbnhG+ApvV8U2GpCXgR+A67kGP5coSjb8Zq62Vij34PAY0rQe2E39c+WbmNCG3wPeAX4Ezjnvdvg/25mwU25q91z+xfs9+kVfxd53AAAAABJRU5ErkJggg==''><div class='lp_product_details_info'><div class='lp_product_details_title'>{{productTitle}}</div><div class='lp_product_details_price'>{{productPrice}}</div></div><button class='lp_product_details_close product_details_close lp_close_button' data-lp-point='close_button'><svg width='9' height='9' viewBox='0 0 9 9' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M0.561035 7.66064C0.33252 7.89551 0.319824 8.29541 0.561035 8.53027C0.795898 8.77148 1.20215 8.76514 1.43066 8.53662L4.42041 5.54688L7.41016 8.53662C7.64502 8.76514 8.04492 8.77148 8.27979 8.53027C8.521 8.29541 8.51465 7.89551 8.28613 7.66064L5.29639 4.6709L8.28613 1.6875C8.51465 1.45264 8.521 1.05273 8.27979 0.811523C8.04492 0.570312 7.64502 0.57666 7.41016 0.811523L4.42041 3.80127L1.43066 0.811523C1.20215 0.583008 0.795898 0.570312 0.561035 0.811523C0.319824 1.04639 0.33252 1.45264 0.561035 1.6875L3.55078 4.6709L0.561035 7.66064Z' fill='#9095A6'/></svg></button></div>",LPViewMap:{productDetailsArea:"^product_details_area",productDetailsClose:"^product_details_close"},initialize:function(e){this.appContext=e.appContext;this.targetView=e.targetView;this.context=e.context||this;this.product=e.product;this.beforeView=e.beforeView;this.setPaddingCallback=e.setPaddingCallback;this.setProductDetailsCallback=e.setCallback;this.productDetailsArea={};this.windowMinimized=!1;window.lpTag.productDetailsContext=this.appContext;this.closeButton=this.getFirstElement(this.LPViewMap.productDetailsClose,this.view);this.createProductDetailsView()},events:function(){if(lpTag||lpTag.events){lpTag.events.bind({appName:"*",eventName:this.VCEvents.ADD_PRODUCT_DETAILS,context:this,func:this.addProductDetails});lpTag.events.bind({appName:"*",eventName:this.EventName.uiState.MINIMIZED,context:this,func:this.setWindowMinimized});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.DIALOG_CLOSED,context:this,func:this.close});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.MAXIMIZE_VISIBLE,context:this,func:this.setWindowMaximized});this.bindCloseEvents();var e=lpTag.events.hasFired("*",this.VCEvents.ADD_PRODUCT_DETAILS);0<e.length&&this.addProductDetails(e[e.length-1].data)}else console.error("lpTag.events not found")},render:function(){}});(e=lpTag.unifiedWindow.ProductDetailsAreaViewController.prototype).createProductDetailsView=function(){if(this.product&&this.product.text&&!this.product.productImage){if(this.productDetailsArea&&this.productDetailsArea instanceof HTMLElement){this.unbindCloseEvents();this.removeView(this.productDetailsArea)}this.view.style.display="block";var e={cssClass:this.productDetailsAreaClass,productImage:this.product.imageURL,productPrice:this.product.price,productTitle:this.product.text};this.productDetailsArea=this.createView({template:this.templateName,textInjection:e,wrapWithDiv:!1,target:this.targetView,beforeView:this.beforeView});this.setProductDetailsCallback.call(this.context);this.bindCloseEvents();lpTag.events.trigger("*",this.VCEvents.ADD_PRODUCT_DETAILS,{})}};e.close=function(){this.product={};this.unbindCloseEvents();this.removeView(this.productDetailsArea);this.view.style.display="none";this.setProductDetailsCallback.call(this.context)};e.getProduct=function(){return this.product};e.isActive=function(){return this.product&&this.product.text&&this.productDetailsArea};e.addProductDetails=function(e){if(e&&e.text){this.product={text:e.text,price:e.price||"",imageURL:e.imageURL||"",link:e.link||""};this.windowMinimized||this.createProductDetailsView()}};e.setWindowMinimized=function(){this.windowMinimized=!0};e.setWindowMaximized=function(){this.windowMinimized=!1;this.product&&this.product.text&&this.product.imageURL&&this.createProductDetailsView()};e.generateStructuredContent=function(e){var t=function(e){if(e){e=e.text;if(e&&"string"==typeof e&&0<e.length)return{type:"text",tag:"product question",text:e,style:{"background-color":"#4E43CC",color:"#FFFFFF"}}}}(e),i=function(e){if(e&&"string"==typeof e&&2<e.length)return{type:"image",url:e}}(this.product.imageURL),n=function(e){if(e&&"string"==typeof e&&0<e.length)return{type:"text",tag:"title",text:e}}(this.product.text),a=function(e){if(e&&"string"==typeof e&&0<e.length)return{type:"text",tag:"price",text:e}}(this.product.price),o=[];i&&o.push(i);t&&(t.click={actions:[{type:"custom",data:[{key:"id",value:""+((i=this.product).id||"")},{key:"title",value:""+(i.text||"")},{key:"caption",value:""+(e.text||"")},{key:"image",value:""+(i.imageURL||"")},{key:"webViewLink",value:""+(i.link||"")},{key:"currency",value:""+(i.currency||"USD")},{key:"minPrice",value:""+(s(i.price)||"")},{key:"compareAtPrice",value:""+(s(i.price)||"")},{key:"onSale",value:""+(i.onSale||"false")},{key:"variantText",value:""+(i.variant||"")}]}]});n&&o.push(n);a&&o.push(a);e={json:{type:"vertical",elements:[],tag:"Product",alt:""}};e.json.elements.push(t);e.json.elements.push({type:"horizontal",elements:o});return e};e.dispose=function(){this.appContext.events.unbind({appName:"*",eventName:"addProductDetails",context:this,func:this.addProductDetails});this.unbindCloseEvents()};e.bindCloseEvents=function(){if(this.productDetailsArea&&this.productDetailsArea instanceof HTMLElement){this.bindViewEvent({selector:"^close_button",callback:this.close,DOMEvent:"click",inView:this.productDetailsArea});this.bindViewEvent({selector:"^close_button",callback:this.close,DOMEvent:this.appContext.deviceDetector.isMobile()||this.appContext.deviceDetector.isTablet()&&"touchend",inView:this.productDetailsArea})}};e.unbindCloseEvents=function(){this.unbindViewEvent({selector:"^close_button",callback:this.close,DOMEvent:"click",inView:this.productDetailsArea});this.unbindViewEvent({selector:"^close_button",callback:this.close,DOMEvent:this.appContext.deviceDetector.isMobile()||this.appContext.deviceDetector.isTablet()&&"touchend",inView:this.productDetailsArea})};function s(e){e=e.match(/([\d,]+(.\d{1,2})?)/);return 0<e.length?e[0]:""}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e;lpTag.unifiedWindow.DialogViewController=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"DialogViewController",template:"<div class='lp_lpview_mp lp_dialog_container lpc_confirmation-dialog {{deviceClass}}' data-lp-cust-id='dialogArea'><div class='lp_center_div_wrapper'><div class='lp_center_div_inner'><div class='lp_center_div_inner_content' role='dialog' aria-labelledby='dialog_title'><div class='lp_lpview_title lp_title lpc_confirmation-dialog__title {{deviceClass}}' id='dialog_title' role='heading' aria-level='3'>{{title}}</div><div class='lp_lpview_title lp_subtitle lp_hidden' id='dialog_subtitle' data-lp-point='subtitle_text'>{{subtitle}}</div><div class='lp_buttons_area'><button type='button' class='lp_cancel_button lpc_confirmation-dialog__cancel-button {{deviceClass}}' data-lp-point='cancel_button' data-lp-cust-id='cancel_button'>{{cancel}}</button> <button tabindex='0' type='button' class='lp_confirm_button lpc_confirmation-dialog__confirm-button {{deviceClass}}' data-lp-point='confirm_button' data-lp-cust-id='button'>{{confirm}}</button></div></div></div></div></div>",focusElement:void 0,errorId:void 0,LPViewMap:{confirmButton:"^confirm_button",cancelButton:"^cancel_button",innerContainer:"^center_div_inner",error:"^dialog_input_error"},LPClassesMap:{error:"lp_error"},initialize:function(e){e.successCallback&&(this.successCallback=e.successCallback);e.cancelCallback&&(this.cancelCallback=e.cancelCallback);this.appContext=e.appContext;this.dialogOpenedFrom=e.dialogOpenedFrom;e=this.appContext.deviceDetector.isDesktop()?"1":"0.92";this.animate(this.view,{duration:300,opacity:e})},onInitialize:function(){this.focusOnElement()},events:function(){this.bindViewEvent({selector:this.LPViewMap.confirmButton,DOMEvent:"click",callback:this.confirmClicked});this.bindViewEvent({selector:this.LPViewMap.cancelButton,DOMEvent:"click",callback:this.cancelClicked});this.bindViewEvent({selector:this.LPViewMap.cancelButton,DOMEvent:"keydown",callback:this.cancelDialog});this.bindViewEvent({view:this.view,DOMEvent:"keydown",callback:this.checkIfCancel});(this.appContext.deviceDetector.isMobile()||this.appContext.deviceDetector.isTablet())&&this.bindViewEvent({view:this.view,DOMEvent:"touchstart",callback:this.viewTapped});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.MAXIMIZE_VISIBLE,context:this,func:this.focusOnElement})}});(e=lpTag.unifiedWindow.DialogViewController.prototype).viewTapped=function(){"INPUT"===document.activeElement.tagName&&this.hasInputFocused&&document.activeElement.blur()};e.successCallback=function(){};e.cancelCallback=function(){};e.confirmClicked=function(){if(this.validate()){this.successCallback();this.closeDialog(this.appConsts.dialog.actions.CONFIRM)}};e.cancelClicked=function(){this.closeDialog(this.appConsts.dialog.actions.CANCEL,this.cancelCallback)};e.cancelDialog=function(e){e=e.keyCode;(13===e||32===e)&&this.cancelClicked()};e.checkIfCancel=function(e){27===e.keyCode&&this.cancelClicked()};e.focusOnElement=function(){this.focusElement&&this.focusElement.focus()};e.validate=function(){return!0};e.showError=function(e,t){var i=this;this.errorView||this.createView({template:"<img class='lp_email_error_img' data-lp-point='email_error_img' src='{{url}}' alt='' aria-hidden='true'><div id='{{id}}' class='lp_email_error_text' class='lp_text' data-lp-point='email_error_text' aria-live='polite'>{{text}}</div>",wrapWithDiv:!0,target:this.LPViewMap.error,textInjection:{text:e,url:this.appContext.conf.unifiedConf.imagesRepository+"/error-15x15.png",id:this.errorId},callback:function(e){i.errorView=e;i.errorView.setAttribute("role","alert");i.errorView.setAttribute("class","lp_dialog_alert")}});this.setErrorAttrs(t);this.shakeX(this.getFirstElement(this.LPViewMap.innerContainer))};e.hideError=function(){this.removeView(this.errorView);this.errorView=null;this.removeErrorAttrs()};e.setErrorAttrs=function(){this.addClass(this.LPViewMap.innerContainer,this.LPClassesMap.error);this.setErrorAccessibilityAttrs()};e.removeErrorAttrs=function(){this.removeClass(this.LPViewMap.innerContainer,this.LPClassesMap.error);this.removeErrorAccessibilityAttrs()};e.setErrorAccessibilityAttrs=function(){var e=this.focusElement;e.setAttribute("aria-describedby",this.errorId);e.setAttribute("aria-invalid","true");e.focus()};e.removeErrorAccessibilityAttrs=function(){var e=this.focusElement;e.removeAttribute("aria-describedby");e.removeAttribute("aria-invalid")};e.closeDialog=function(e,t){!function(e){this.appContext.events.trigger({appName:this.ControllerName,eventName:this.VCEvents.DIALOG_CLOSED,data:{origin:e,dialogOpenedFrom:this.dialogOpenedFrom}});this.appContext.events.trigger({appName:"*",eventName:lpTag.unifiedWindow.events.viewController.MAXIMIZE_VISIBLE})}.call(this,e);this.view.removeAttribute("role");var i=this;this.animate(this.view,{duration:500,opacity:"0"},function(){t&&"function"==typeof t&&t.call(i);i.dispose()})}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e;lpTag.unifiedWindow.EmailTranscriptDialogViewController=lpTag.unifiedWindow.DialogViewController.extend({ControllerName:"EmailTranscriptDialogViewController",template:"<div class='lp_lpview_mp lp_dialog_container lpc_confirmation-dialog {{deviceClass}}' data-lp-cust-id='dialogArea'><div class='lp_center_div_wrapper'><div class='lp_center_div_inner' data-lp-point='center_div_inner'><div class='lp_center_div_inner_content'><div id='lp_transcript_title' class='lp_lpview_title lp_title lp_email_transcript lpc_confirmation-dialog__title {{deviceClass}}'>{{title}}</div><input class='lp_dialog_input' data-lp-point='dialog_input' type='email' aria-labelledby='lp_transcript_title'><div class='lp_dialog_input_error' data-lp-point='dialog_input_error'></div><div class='lp_buttons_area'><button class='lp_cancel_button lp_email_transcript lpc_confirmation-dialog__cancel-button {{deviceClass}}' data-lp-point='cancel_button' data-lp-cust-id='cancel_button'>{{cancel}}</button> <button class='lp_confirm_button lp_email_transcript lpc_confirmation-dialog__confirm-button {{deviceClass}}' data-lp-point='confirm_button' data-lp-cust-id='button'>{{confirm}}</button></div></div></div></div></div>",TOOLTIP_TIMEOUT:3e3,emailAddress:void 0,errorId:"lp_transcript_error",LPViewMap:{confirmButton:"^confirm_button",cancelButton:"^cancel_button",input:"^dialog_input",error:"^dialog_input_error",innerContainer:"^center_div_inner"},LPClassesMap:{error:"lp_error"},preInitView:function(){this.textInjection={title:this.translate("dialog_email_transcript"),confirm:this.translate("submit"),cancel:this.translate("cancel")}},initialize:function(){this.focusElement=this.getFirstElement(this.LPViewMap.input)}});(e=lpTag.unifiedWindow.EmailTranscriptDialogViewController.prototype).cancelCallback=function(){this.hideError()};e.validate=function(){var e,t=this.focusElement.value;if(e=t,new RegExp(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(e)){this.emailAddress=t;this.appContext.events.trigger({appName:"tooltip",eventName:"show",data:{text:this.translate("tooltip_EmailTranscriptSentConfirmation"),tooltipTimeout:this.TOOLTIP_TIMEOUT}});this.hideError();return!0}return this.showError(this.translate("inputEmailError")),!1};e.successCallback=function(){this.appContext.chatStateManager.emailTranscript(this.emailAddress,"Your chat transcript");this.view.focus()}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){lpTag.unifiedWindow.EndChatDialogViewController=lpTag.unifiedWindow.DialogViewController.extend({ControllerName:"EndChatDialogViewController",LPViewMap:{confirmButton:"^confirm_button",cancelButton:"^cancel_button",mainWindow:"^maximized",buttonsArea:".lp_buttons_area"},preInitView:function(){this.textInjection={title:this.translate("end_chat_alert"),confirm:this.translate("yes"),cancel:this.translate("no")}},events:function(){this.bindModel({path:this.uiPath.STATE,callback:e,context:this});this.bindViewEvent({selector:this.LPViewMap.buttonsArea,callback:this._maintainFocus,DOMEvent:"keydown",context:this});this.appContext.deviceDetector.isIOS()&&this.bindViewEvent({selector:this.LPViewMap.confirmButton,callback:this._handleIOSFocus,DOMEvent:"blur",context:this})},initialize:function(){this.focusElement=this.getFirstElement(this.LPViewMap.cancelButton)},_handleIOSFocus:function(e){var t=this.getFirstElement(".lp_buttons_area").querySelectorAll("button"),i=t[0],t=t[t.length-1];if(e.target===t){e.preventDefault();i.focus();var n=i;n.setAttribute("tabindex","0");n.blur();var a=0,o=window.setInterval(function(){n.focus();10<=++a&&window.clearInterval(o)},10)}},_maintainFocus:function(e){var t="which"in e?e.which:e.keyCode,i=this.getFirstElement(".lp_buttons_area").querySelectorAll("button"),n=i[0],i=i[i.length-1];if(9===t&&e.shiftKey||9===t)if(e.target===i){n.focus();e.preventDefault()}else if(e.target===n){i.focus();e.preventDefault()}}});lpTag.unifiedWindow.EndChatDialogViewController.prototype.successCallback=function(){this.appContext.uiStateManager.setActionsVisibility(!1);this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.application.END_CHAT})};function e(e){var t=this.getFirstElement(this.LPViewMap.confirmButton);e.newValue===lpTag.unifiedWindow.State.CONNECTION_ISSUE?t.setAttribute("disabled","disabled"):t.removeAttribute("disabled")}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};lpTag.unifiedWindow.ForgetMeDialogViewController=lpTag.unifiedWindow.DialogViewController.extend({ControllerName:"ForgetMeDialogViewController",LPViewMap:{confirmButton:"^confirm_button",cancelButton:"^cancel_button",subtitleElement:"^subtitle_text"},ConversationOwnerAccountId:lpTag.site,preInitView:function(e){var t=this.models.uiModel.get(lpTag.unifiedWindow.uiModelPath.STATE.path),i=[lpTag.unifiedWindow.State.ENDED,lpTag.unifiedWindow.State.PENDING,lpTag.unifiedWindow.State.APP_ENDED,lpTag.unifiedWindow.State.WAITING],n=this.translate("forget_me_dialog_subtitle_on_active_chat_close_window");-1!==i.indexOf(t)&&(n=this.translate("forget_me_dialog_subtitle_close_window"));this.textInjection={title:this.translate("forget_me_dialog_close_window"),confirm:this.translate("yes"),cancel:this.translate("no"),subtitle:n};e.appContext.conf.engConf.subscription&&(this.ConversationOwnerAccountId=e.appContext.conf.engConf.subscription.conversationowneraccountid)},render:function(){lpTag.taglets.lpUtil.removeClass(this.subtitleElement,"lp_hidden")},events:function(){this.bindModel({path:this.uiPath.STATE,callback:_stateChanged,context:this})},initialize:function(){this.focusElement=this.getFirstElement(this.LPViewMap.cancelButton);this.subtitleElement=this.getFirstElement(this.LPViewMap.subtitleElement)}});(proto=lpTag.unifiedWindow.ForgetMeDialogViewController.prototype).successCallback=function(){this.appContext.uiStateManager.setActionsVisibility(!1);this.appContext.events.trigger({appName:"*",eventName:lpTag.unifiedWindow.events.chat.FORGET_ME,global:!0,data:{conversationOwnerAccountId:this.ConversationOwnerAccountId,endChatAfterClearing:function(){this.appContext.events.trigger({appName:lpTag.unifiedWindow.apps.UNIFIED_WINDOW,eventName:lpTag.unifiedWindow.events.application.END_CHAT});this.appContext.events.trigger({appName:"*",eventName:lpTag.unifiedWindow.events.chat.CLOSE_WINDOW_FORGET_ME})}.bind(this)}});this.appContext.clearingHistory=!0};function _stateChanged(e){var t=this.getFirstElement(this.LPViewMap.confirmButton);e.newValue===lpTag.unifiedWindow.State.CONNECTION_ISSUE?t.setAttribute("disabled","disabled"):t.removeAttribute("disabled")}window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e;lpTag.unifiedWindow.IdnvDialogViewController=lpTag.unifiedWindow.DialogViewController.extend({ControllerName:"IdnvDialogViewController",template:"<div class='lp_lpview_mp lp_dialog_container lpc_confirmation-dialog {{deviceClass}}' data-lp-cust-id='dialogArea' role='dialog'><div class='lp_center_div_wrapper'><div class='lp_center_div_inner' data-lp-point='center_div_inner'><fieldset class='lp_center_div_inner_content'><legend class='lp_lpview_title lp_title lpc_confirmation-dialog__title {{deviceClass}}' id='idnv_dialog_title'>{{title}}</legend><div class='lp_idnv_container'><div class='lp_idnv_wrapper'><label for='idnv_input_1'>{{idnvChar1}}</label> <input id='idnv_input_1' class='lp_dialog_input lp_idnv_input' data-lp-point='dialog_input_1' aria-describedby='idnv_dialog_title' type='password' maxlength='1' aria-required='true'></div><div class='lp_idnv_wrapper'><label for='idnv_input_2'>{{idnvChar2}}</label> <input id='idnv_input_2' class='lp_dialog_input lp_idnv_input' data-lp-point='dialog_input_2' aria-describedby='idnv_dialog_title' type='password' maxlength='1' aria-required='true'></div><div class='lp_dialog_input_error' data-lp-point='dialog_input_error' role='alert' aria-atomic='true'></div></div><div class='lp_buttons_area'><button class='lp_cancel_button lpc_confirmation-dialog__cancel-button {{deviceClass}}' data-lp-point='cancel_button' data-lp-cust-id='cancel_button'>{{cancel}}</button> <button tabindex='0' class='lp_confirm_button lpc_confirmation-dialog__confirm-button {{deviceClass}}' data-lp-point='confirm_button' data-lp-cust-id='button'>{{confirm}}</button></div></fieldset></div></div></div>",errorId:"lp_idnv_error",LPViewMap:{confirmButton:"^confirm_button",cancelButton:"^cancel_button",input1:"^dialog_input_1",input2:"^dialog_input_2",error:"^dialog_input_error",innerContainer:"^center_div_inner"},preInitView:function(e){this.idnvData=e.idnvData;e=this.idnvData.fields;this.textInjection={title:this.injectTextDefaults(this.translate("idnvDialogTitle",!0),{idnvChar1:e.firstChar,idnvChar2:e.secondChar,idnvType:e.typeField}),confirm:this.translate("submit"),cancel:this.translate("cancel"),idnvChar1:e.firstChar,idnvChar2:e.secondChar}},initialize:function(){this.inputs=function(){for(var e,t=[],i=1;i<=2;i++){e=this.getFirstElement(this.LPViewMap["input"+i]);t.push(e)}return t}.call(this);this.focusElement=this.inputs[0]},events:function(){this.appContext.events.bind({appName:"*",eventName:this.EventName.chatState.ENDED,context:this,func:this.closeDialog});this.appContext.events.bind({appName:"*",eventName:this.VCEvents.DIALOG_STATE_CHANGED,context:this,func:this.closeDialog})}});(e=lpTag.unifiedWindow.IdnvDialogViewController.prototype).cancelCallback=function(){this.hideError();this.appContext.idnvManager.sendIdnvCancelLine(this.idnvData.encodedFields)};e.successCallback=function(){var e={firstChar:this.inputs[0].value,secondChar:this.inputs[1].value,idnvData:this.idnvData};this.appContext.idnvManager.sendIdnvSubmitLine(e)};e.validate=function(){var e=function(){for(var e=[],t=0;t<this.inputs.length;t++)this.inputs[t].value||e.push(this.inputs[t]);return e}.call(this);if(0===e.length)return this.hideError(),!0;this.hideError();this.showError(this.translate("idnvInputError"),e);return!1};e.setErrorAttrs=function(e){i.call(this);for(var t=0;t<e.length;t++)this.addClass(e[t],this.LPClassesMap.error);this.addClass(this.LPViewMap.error,this.LPClassesMap.error);this.focusElement=e[0];this.setErrorAccessibilityAttrs()};e.removeErrorAttrs=function(){i.call(this);this.removeClass(this.LPViewMap.error,this.LPClassesMap.error);this.removeErrorAccessibilityAttrs()};function i(){for(var e=0;e<this.inputs.length;e++)this.removeClass(this.inputs[e],this.LPClassesMap.error)}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){lpTag.unifiedWindow.ReauthenticationDialogViewController=lpTag.unifiedWindow.DialogViewController.extend({ControllerName:"ReauthenticationDialogViewController",template:"<div class='lp_lpview_mp lp_dialog_container lpc_confirmation-dialog {{deviceClass}}' data-lp-cust-id='dialogArea' role='alertdialog' aria-labelledby='dialog_title'><div class='lp_center_div_wrapper'><div class='lp_center_div_inner'><div class='lp_center_div_inner_content'><div class='lp_icons_area'><div class='icon'><img src='{{imagesRepository}}/embedded-error.png' alt='' aria-hidden='true'></div></div><div class='lp_lpview_title lp_title lp_title_large_padding lpc_confirmation-dialog__title {{deviceClass}}' id='dialog_title'>{{title}}</div><div class='lp_buttons_area'><button class='lp_confirm_button lp_single_button lpc_confirmation-dialog__confirm-button {{deviceClass}}' data-lp-point='confirm_button' data-lp-cust-id='button'>{{confirm}}</button></div></div></div></div></div>",LPViewMap:{confirmButton:"^confirm_button"},preInitView:function(e){this.data=e;var t=this.translate("authExpired"),i=this.translate("redirect");if(e.appContext.conf.engConf.allowUnauthMsg){t=this.translate("unauthExpired");i=this.translate("reload")}this.textInjection={title:t,confirm:i,imagesRepository:e.appContext.conf.unifiedConf.imagesRepository};isNaN(e.callbackTimeout)||(this.timeout=setTimeout(function(){lpTag.lpUtils.runCallback(e.callback,e.context)},e.callbackTimeout))},initialize:function(){this.focusElement=this.getFirstElement(this.LPViewMap.confirmButton);this.data.header_key&&this.appContext.wrapperWindow.setTitle(this.translate(this.data.header_key))}});lpTag.unifiedWindow.ReauthenticationDialogViewController.prototype.successCallback=function(){this.timeout&&clearTimeout(this.timeout);lpTag.lpUtils.runCallback(this.data.callback,this.data.context)}}();window.lpTag=window.lpTag||{};window.lpTag.unifiedWindow=window.lpTag.unifiedWindow||{};!function(){var e;lpTag.unifiedWindow.BaseSurveyQuestion=lpTag.unifiedWindow.BaseViewController.extend({ControllerName:"BaseSurveyQuestion",applicationType:"BaseSurveyQuestion",errorTemplateFileName:"<div class='{{wrapperClass}}wrapper' role='alert'><img class='lp_error_img' src='{{url}}' alt='{{error}}'><div id='{{id}}' class='lp_error_text lp_text' data-lp-point='errorText' aria-live='polite'>{{text}}</div></div>",wrapperTemplateFileName:"<div class='lp_question'><div id='{{id}}' class='lp_question_label lpc_survey-area__question-label {{deviceClass}}'>{{label}}</div><div class='lp_lpview_content lp_content lpc_survey-area__question-content {{deviceClass}}'></div></div>",wrapperTemplateFileNameCsat:"<div class='lp_question'><div id='{{id}}' class='lp_question_label lpc_survey-area__question-label {{deviceClass}}' data-lp-point='csat-question-label' data-lp-cust-id='csat-question-label' role='heading' aria-level='3' tabindex='0'>{{label}}</div><div class='lp_lpview_content lp_content'></div></div>",customizationClassName:"lpc_survey-area__question-wrapper",prefixMap:{label:"lbl_",error:"err_"},LPViewMap:{errorWrapper:".surveyError_wrapper",errorText:"^errorText"},LPClassMap:{label:"lp_question_label",content:"lp_lpview_content",error:"lp_error",surveyError:"lp_surveyError_"},initialize:function(e){this.hasError=!1;if(e.question){this.question=e.question;this.errorIconURL=e.imagesRepository+"/error-15x15.png";this.appContext=e.appContext;this.deviceClass=lpTag.unifiedWindow.customization.deviceClass;this.container=this.createDivWrapper(e.question);this.defaultSelect=e.defaultSelect;this.containerId=this.container.getAttribute("id");this.answerArea=lpTag.lpUtils.getElementsByClass(this.container,this.LPClassMap.content,[])[0];this.errorId=this.prefixMap.error+this.question.id;this.surveyArea=e.surveyArea}}});(e=lpTag.unifiedWindow.BaseSurveyQuestion.prototype).getQuestionType=function(e){if(!this.appContext.deviceDetector.isDesktop()){if("email"===e)return"email";if("numeric"===e)return"number"}return"text"};e.bindFocusAndBlurEvents=function(e){this.appContext.deviceDetector.isDesktop()||this.bindViewEvent({view:e,DOMEvent:"blur",appName:"input",eventData:{focusOnField:!0},callback:this.fireBlurEvent})};e.bindTextFieldEvents=function(e){this.bindViewEvent({view:e,DOMEvent:"keyup",callback:this.submitInputAnswer});this.bindViewEvent({view:e,DOMEvent:"input",callback:this.submitInputAnswer});this.bindViewEvent({view:e,DOMEvent:"paste",callback:this.submitInputAnswer});this.bindViewEvent({view:e,DOMEvent:"cut",callback:this.submitInputAnswer});this.bindViewEvent({view:e,DOMEvent:"dragend",callback:this.delaySubmitInputAnswer});this.bindViewEvent({view:e,DOMEvent:"drop",callback:this.delaySubmitInputAnswer});if(this.appContext.deviceDetector.isDesktop()){this.bindViewEvent({view:e,DOMEvent:"keypress",callback:this.stopBubblingUp});this.bindViewEvent({view:e,DOMEvent:"blur",callback:this.fireBlurEvent})}this.bindFocusAndBlurEvents(e)};e.submitInputAnswer=function(e){"number"===e.target.type&&e.target.validity&&e.target.validity.badInput?e.target.value="":e.sourceElement.id&&this.submitAnswer(this.question.id,this.extractAnswerByValue(e.sourceElement.value))};e.delaySubmitInputAnswer=function(e){var t=this;setTimeout(function(){t.submitInputAnswer(e)},0)};e.setError=function(e){if(this.hasError)e!==this.errorText&&(this.getFirstElement(this.LPViewMap.errorText,this.errorView).innerHTML=e);else{this.hasError=!0;this.addClass(this.container,this.LPClassMap.error);this.errorView=this.createView({template:this.errorTemplateFileName,wrapWithDiv:!1,doNotAddChild:!0,textInjection:{wrapperClass:this.LPClassMap.surveyError,text:e,url:this.errorIconURL,id:this.errorId}});this.appContext.deviceDetector.isMobile()&&this.errorView.setAttribute("role","alert");this.container.appendChild(this.errorView);!function(e){for(var t=this.getElements(this.tagName),i=0;i<t.length;i++)t[i].setAttribute("aria-describedby",e)}.call(this,this.errorId)}this.errorText=e};e.cleanError=function(){this.removeClass(this.container,this.LPClassMap.error);this.errorView&&this.container.removeChild(this.errorView);this.errorView=null;this.errorText="";this.errorText="";this.hasError=!1;!function(){for(var e=this.getElements(this.tagName),t=0;t<e.length;t++)e[t].removeAttribute("aria-describedby")}.call(this,this.errorId)};e.setFocus=function(){this.focusOnElement(this.tagName)};e.dispose=function(){lpTag.unifiedWindow.BaseViewController.prototype.dispose.call(this)};e.createDivWrapper=function(e){var t=e.type==lpTag.unifiedWindow.SurveyType.CSAT?this.wrapperTemplateFileNameCsat:this.wrapperTemplateFileName,t=this.createView({template:t,wrapWithDiv:!1,textInjection:{label:e.label,id:this.prefixMap.label+e.id}}),i=lpTag.lpUtils.getElementsByClass(t,this.LPClassMap.label,[])[0],n=lpTag.lpUtils.getElementsByClass(t,this.LPClassMap.content,[])[0];if(e.mandatory){e=document.createElement("SPAN");e.innerHTML="*";e.className="lp_mandatory";i.appendChild(e)}t.appendChild(n);return t};e.stopBubblingUp=function(e){if(13===("which"in e?e.which:e.keyCode)){this.stopPropagation(e);"TEXTAREA"!==document.activeElement.tagName&&this.preventDefault(e)}};e.fireBlurEvent=function(){this.appContext.events.trigger({appName:"survey",eventName:"blur",data:{question:this.question}})};e.extractAnswerByValue=function(e){return this.question.entry&&this.question.entry[e]?this.question.entry[e].value:e};e.submitAnswer=function(e,t){var i=t.constructor===Array;this.appContext.events.trigger({appName:"survey",eventName:"submitAnswer",data:{questionId:e,answer:t=i?t:[t],isAnswerArray:i}})};e.addToLabel=function(e,t){return(this.addToLabelOverride||this.addToLabelBase).call(this,e,t)};e.revertLabel=function(e){return(this.revertLabelOverride||this.revertLabelBase).call(this,e)};e.addToLabelBase=function(e,t){var i=lpTag.lpUtils.getElementsByClass(this.container,this.LPClassMap.label,[]);if(i&&0<i.length)for(var n=e+". "+i[0].textContent,a=this.getElements(this.tagName),o=0;o<a.length;o++)s(a[o],n)||s(a[o].parentElement,n)};e.revertLabelBase=function(e){var t=lpTag.lpUtils.getElementsByClass(this.container,this.LPClassMap.label,[]);if(t&&0<t.length)for(var i=t[0].getAttribute("id"),n=this.getElements(this.tagName),a=0;a<n.length;a++)o(n[a],i)||o(n[a].parentElement,i)};e.isValid=function(){return!0};function s(e,t){if(e.getAttribute("aria-labelledby")){e.removeAttribute("aria-labelledby");e.setAttribute("aria-label",t);return 1}}function o(e,t){if(e.getAttribute("aria-label")){e.removeAttribute("aria-label");e.setAttribute("aria-labelledby",t);return 1}}}();window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.Survey=lpTag.unifiedWindow.Survey||{};!function(){var e;lpTag.unifiedWindow.Survey.CheckBoxQuestion=lpTag.unifiedWindow.BaseSurveyQuestion.extend({ControllerName:"CheckBoxQuestion",className:"lp_question_wrapper",checkboxWrapperClass:"lp_checkbox_wrapper",templateFileName:"<div class='lp_checkbox_button'><input id='{{inputId}}' type='checkbox' value='{{value}}' name='{{name}}'> <label for='{{inputId}}'>{{label}}</label></div>",wrapperTemplateFileName:"<div role='radiogroup' class='lp_question' aria-labelledby='{{id}}'><span id='{{id}}' class='lp_question_label'>{{label}}</span><div class='lp_lpview_content lp_content'></div></div>",prefix:"inp_",tagName:"input",initialize:function(){this.answers=[]},render:function(){this.view.classList.add(this.customizationClassName);this.view.classList.add(this.deviceClass);var e,t,i=document.createElement("div");i.className=this.checkboxWrapperClass;for(var n=0;n<this.question.entry.length;++n){e=this.question.entry[n];t=this.createView({template:this.templateFileName,wrapWithDiv:!1,textInjection:{inputId:n+"_"+this.question.id,value:n,name:this.prefix+this.question.id,type:this.getQuestionType(this.question.validationType),label:e.displayValue||e.value,isMandatory:this.question.mandatory.toString()}});if(!0===e.checked||"true"==e.checked){t.setAttribute("checked","checked");this.answers.push(e.value)}i.appendChild(t);this.answerArea.appendChild(i);this.bindViewEvent({view:t,DOMEvent:"click",callback:this.submitCheckboxAnswer})}}});(e=lpTag.unifiedWindow.Survey.CheckBoxQuestion.prototype).submitCheckboxAnswer=function(e){if(e.sourceElement&&void 0!==e.sourceElement.checked){var t=this.extractAnswerByValue(e.sourceElement.value);if(e.sourceElement.checked)this.answers.push(t);else{e=this.answers.indexOf(t);-1!==e&&this.answers.splice(e,1)}this.submitAnswer(this.question.id,this.answers)}};e.addToLabelOverride=function(e,t){this.oldTitle=this.container.getAttribute("title");for(var i=this.getElements("label"),n=this.getElements(this.tagName),a=0;a<n.length&&a<i.length;a++)n[a].setAttribute("aria-label",e+". "+this.oldTitle+" "+i[a].textContent)};e.revertLabelOverride=function(e){for(var t=this.getElements(this.tagName),i=0;i<t.length;i++)t[i].removeAttribute("aria-label");this.oldTitle=null}}();window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.Survey=lpTag.unifiedWindow.Survey||{};!function(){lpTag.unifiedWindow.Survey.DropDownQuestion=lpTag.unifiedWindow.BaseSurveyQuestion.extend({ControllerName:"DropDownQuestion",className:"lp_question_wrapper",templateFileName:"<select id='{{id}}' class='lp_select_field' role='listbox' aria-labelledby='{{ariaLabel}}' aria-required='{{isMandatory}}'></select>",prefix:"sel_",tagName:"select",render:function(){this.view.classList.add(this.customizationClassName);this.view.classList.add(this.deviceClass);for(var e,t,i=this.createView({template:this.templateFileName,wrapWithDiv:!1,textInjection:{id:this.prefix+this.question.id,ariaLabel:this.prefixMap.label+this.question.id,isMandatory:this.question.mandatory.toString()}}),n=(n=[{value:this.defaultSelect||"pick one..."}]).concat(this.question.entry),a=0;a<n.length;++a){e=n[a];(t=document.createElement("OPTION")).setAttribute("value",a-1);t.innerHTML=lpTag.HtmlSanitizerUtils.sanitizeHtml(e.value).cleanText;!0!==e.checked&&"true"!=e.checked||t.setAttribute("selected","selected");i.appendChild(t)}this.answerArea.appendChild(i);this.bindDropdownEvents(i)}});lpTag.unifiedWindow.Survey.DropDownQuestion.prototype.bindDropdownEvents=function(e){this.bindViewEvent({view:e,DOMEvent:"change",callback:this.submitInputAnswer});this.bindFocusAndBlurEvents(e)}}();window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.Survey=lpTag.unifiedWindow.Survey||{};lpTag.unifiedWindow.Survey.TextAreaQuestion=lpTag.unifiedWindow.BaseSurveyQuestion.extend({ControllerName:"TextAreaQuestion",className:"lp_question_wrapper",templateFileName:"<textarea id='{{id}}' class='lp_textarea_field' aria-labelledby='{{ariaLabel}}' type='{{type}}' aria-required='{{isMandatory}}'></textarea>",prefix:"txt_",tagName:"textarea",render:function(){this.view.classList.add(this.customizationClassName);this.view.classList.add(this.deviceClass);var e=this.createView({template:this.templateFileName,wrapWithDiv:!1,textInjection:{id:this.prefix+this.question.id,ariaLabel:this.prefixMap.label+this.question.id,type:this.getQuestionType(this.question.validationType),isMandatory:this.question.mandatory.toString()}});e.placeholder=this.translate("defaultTextArea");this.question.lastKnownValue&&(e.value=this.question.lastKnownValue);this.answerArea.appendChild(e);this.bindTextFieldEvents(e)}});window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.Survey=lpTag.unifiedWindow.Survey||{};lpTag.unifiedWindow.Survey.TextFieldQuestion=lpTag.unifiedWindow.BaseSurveyQuestion.extend({ControllerName:"TextFieldQuestion",className:"lp_question_wrapper",templateFileName:"<input id='{{id}}' class='lp_input-field' aria-labelledby='{{ariaLabel}}' type='{{type}}' placeholder='{{defaultTextArea}}' aria-required='{{isMandatory}}'>",prefix:"txt_",tagName:"input",render:function(){this.view.classList.add(this.customizationClassName);this.view.classList.add(this.deviceClass);var e=this.createView({template:this.templateFileName,wrapWithDiv:!1,textInjection:{id:this.prefix+this.question.id,ariaLabel:this.prefixMap.label+this.question.id,type:this.getQuestionType(this.question.validationType),isMandatory:this.question.mandatory.toString()}});this.question.lastKnownValue&&(e.value=this.question.lastKnownValue);this.appContext.deviceDetector.isIOS()&&"number"===e.attributes.type.value&&e.setAttribute("pattern","[0-9]*");this.question.validationType&&"email"==this.question.validationType&&(e.placeholder=this.translate("emailTextArea"));this.answerArea.appendChild(e);this.bindTextFieldEvents(e)}});window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.Survey=lpTag.unifiedWindow.Survey||{};var QUESTION_ERROR_TYPE="phoneNumber";!function(){var i=lpTag.unifiedWindow.settingsIDs;lpTag.unifiedWindow.Survey.PhoneFieldQuestion=lpTag.unifiedWindow.BaseSurveyQuestion.extend({ControllerName:"PhoneFieldQuestion",className:"lp_question_wrapper",templateFileName:"<input id='{{id}}' class='lp_input-field lp_phone-field' aria-labelledby='{{ariaLabel}}' type='{{type}}' placeholder='{{defaultTextArea}}' aria-required='{{isMandatory}}'>",prefix:"txt_",tagName:"input",lpTelInput:null,render:function(){var n=this;this.view.classList.add(this.customizationClassName);this.view.classList.add(this.deviceClass);var a=this.createView({template:this.templateFileName,wrapWithDiv:!1,textInjection:{id:this.prefix+this.question.id,ariaLabel:this.prefixMap.label+this.question.id,type:this.getQuestionType(this.question.validationType),isMandatory:this.question.mandatory.toString()}});this.question.lastKnownValue&&(a.value=this.question.lastKnownValue);this.answerArea.appendChild(a);this.bindTextFieldEvents(a);if(lpTag.lpTelInput){var e=this.appContext&&this.appContext.featureStateManager.getSettingsValue(i.CONTACT_INFO),e=e&&e.addressInfo&&e.addressInfo.countryCode,t={preferredCountries:["us","ca","gb","au"],autoPlaceholder:"aggressive",nationalMode:!0,formatOnDisplay:!0,dropdownContainer:this.surveyArea};e&&this.intlTelInputHasCountry(e)&&(t.initialCountry=e.toLowerCase());this.lpTelInput=lpTag.lpTelInput.lpTelInput(a,t);a.addEventListener("open:countrydropdown",function(){var e=n.lpTelInput.iti.countryList;if(e){var t=a.getBoundingClientRect(),i=n.surveyArea.getBoundingClientRect();e.style.width=t.width+"px";e.parentElement.style.left=t.left-i.left+"px";200<i.bottom-t.bottom?e.parentElement.style.top=t.top-i.top+t.height+"px":e.parentElement.style.top=t.top-i.top+"px"}});a.addEventListener("countrychange",this.submitInputAnswer.bind(this));this.keydownHandler=function(e){e.target!==n.lpTelInput.iti.selectedFlag&&e.target.parentElement!==n.lpTelInput.iti.countryList||n.lpTelInput.iti._handleKeydownOnDropdown(e)};this.surveyArea.addEventListener("keydown",this.keydownHandler)}},submitInputAnswer:function(e){this.lpTelInput?this.submitAnswer(this.question.id,this.lpTelInput.iti.getNumber()):lpTag.unifiedWindow.BaseSurveyQuestion.prototype.submitInputAnswer.call(this.event)},isValid:function(){if(this.lpTelInput&&!this.lpTelInput.iti.isValidNumber())return this.question.error=QUESTION_ERROR_TYPE,!1;delete this.question.error;return!0},dispose:function(){this.surveyArea.removeEventListener("keydown",this.keydownHandler);lpTag.unifiedWindow.BaseSurveyQuestion.prototype.dispose.call(this)},intlTelInputHasCountry:function(e){var t=window.lpIntlTelInputGlobals&&window.lpIntlTelInputGlobals.getCountryData()||[];if(t.length)for(var i=0;i<t.length;i++)if(t[i].iso2===e.toLowerCase())return!0;return!1}})}();window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.Survey=lpTag.unifiedWindow.Survey||{};!function(){lpTag.unifiedWindow.Survey.RadioButtonQuestion=lpTag.unifiedWindow.BaseSurveyQuestion.extend({ControllerName:"RadioButtonQuestion",className:"lp_question_wrapper",radioWrapperClass:"lp_radiobutton_wrapper",templateFileName:"<span class='lp_radio_button'><input id='{{inputId}}' role='radio' type='radio' value='{{value}}' aria-labelledby='label-{{inputId}}' name='{{name}}'> <label for='{{inputId}}' id='label-{{inputId}}'>{{label}}</label></span>",wrapperTemplateFileName:"<div role='radiogroup' class='lp_question' aria-labelledby='{{id}}'><span id='{{id}}' class='lp_question_label'>{{label}}</span><div class='lp_lpview_content lp_content'></div></div>",prefix:"inp_",tagName:"input",render:function(){this.view.classList.add(this.customizationClassName);this.view.classList.add(this.deviceClass);var e,t,i=document.createElement("div");i.className=this.radioWrapperClass;for(var n=0;n<this.question.entry.length;++n){e=this.question.entry[n];t=this.createView({template:this.templateFileName,wrapWithDiv:!1,textInjection:{inputId:n+"_"+this.question.id,value:n,name:this.prefix+this.question.id,type:this.getQuestionType(this.question.validationType),label:e.displayValue||e.value,isMandatory:this.question.mandatory.toString(),ariaLabel:this.prefixMap.label+this.question.id}});!0!==e.checked&&"true"!=e.checked||t.setAttribute("checked","checked");i.appendChild(t);this.answerArea.appendChild(i);this.bindViewEvent({view:t,DOMEvent:"click",callback:this.submitInputAnswer})}}});var e=lpTag.unifiedWindow.Survey.RadioButtonQuestion.prototype;e.addToLabelOverride=function(e,t){this.oldTitle=this.container.getAttribute("title");if(t)this.container.setAttribute("title",e+". "+this.oldTitle);else for(var i=this.getElements("label"),n=this.getElements(this.tagName),a=0;a<n.length;a++)n[a].setAttribute("aria-label",e+". "+this.oldTitle+" "+i[a].textContent)};e.revertLabelOverride=function(e){if(e)this.container.setAttribute("title",this.oldTitle);else for(var t=this.getElements(this.tagName),i=0;i<t.length;i++)t[i].removeAttribute("aria-label");this.oldTitle=null}}();window.lpTag=window.lpTag||{};lpTag.unifiedWindow=lpTag.unifiedWindow||{};lpTag.unifiedWindow.Survey=lpTag.unifiedWindow.Survey||{};!function(){var i=lpTag.unifiedWindow.applicationUtils;lpTag.unifiedWindow.Survey.CSATQuestion=lpTag.unifiedWindow.BaseSurveyQuestion.extend({ControllerName:"CSATQuestion",className:"lp_question_wrapper",templateFileName:"<div id='{{id}}' class='lp_csat_rater lpc_survey-area__question-content {{deviceClass}}'><form><fieldset class='lp_csat_rater_stars' data-lp-point='stars-area' data-lp-cust-id='stars-area'><a href='javascript:void(0)' class='lp_csat_rater_star' role='button' data-lp-point='star' data-lp-cust-id='star' data-lp-rating='5' aria-pressed='false' aria-label='{{labelStar5}} 5 {{of}} {{numberOfStars}}'></a> <a href='javascript:void(0)' class='lp_csat_rater_star' role='button' data-lp-point='star' data-lp-cust-id='star' data-lp-rating='4' aria-pressed='false' aria-label='{{labelStar4}} 4 {{of}} {{numberOfStars}}'></a> <a href='javascript:void(0)' class='lp_csat_rater_star' role='button' data-lp-point='star' data-lp-cust-id='star' data-lp-rating='3' aria-pressed='false' aria-label='{{labelStar3}} 3 {{of}} {{numberOfStars}}'></a> <a href='javascript:void(0)' class='lp_csat_rater_star' role='button' data-lp-point='star' data-lp-cust-id='star' data-lp-rating='2' aria-pressed='false' aria-label='{{labelStar2}} 2 {{of}} {{numberOfStars}}'></a> <a href='javascript:void(0)' class='lp_csat_rater_star' role='button' data-lp-point='star' data-lp-cust-id='star' data-lp-rating='1' aria-pressed='false' aria-label='{{labelStar1}} 1 {{of}} {{numberOfStars}}'></a></fieldset></form><div class='lp_csat_rater_current_rating lpc_survey-area__current-rating {{deviceClass}}' data-lp-point='current_rating'>{{rating}}</div><div id='disclaimer-id' class='lp_survey_disclaimer lpc_survey-area__disclaimer {{deviceClass}}'>{{csatDisclaimer}}</div></div>",prefix:"csat_",csatLevelPrefix:"csatLevel_",tagName:"div",defaultCSATLevel:0,numberOfStars:5,cssClasses:{defaultStarClass:"lp_csat_rater_star",chosenStarClass:"lp_csat_rater_star chosen"},previousChosenRating:void 0,LPViewMap:{star:"^star",current:"^current_rating",questionLabel:"^csat-question-label",starsArea:"^stars-area"},submitCSATAnswer:function(e){if(e.sourceElement.getAttribute("data-lp-rating")){this.submitAnswer(this.question.id,e.sourceElement.getAttribute("data-lp-rating"));this.toggleChosen(e.sourceElement);e.sourceElement.setAttribute("aria-pressed",!0)}},handleStarsNavigation:function(e){var t=document.getElementsByClassName("lp_question_label")[0],i=document.getElementsByClassName("lp_cancel_button")[0],n=document.getElementsByClassName("lp_csat_rater_current_rating")[0],a=n.innerHTML.trim(),o=document.querySelectorAll(".lp_csat_rater_stars a"),s=[].slice.call(o),r=s.indexOf(document.activeElement);if(9==e.keyCode&&-1<r)if(e.shiftKey)if(r===s.length-1){e.preventDefault();t.focus()}else{e.preventDefault();o[r+1].focus()}else if(0===r)if(""!==a){e.preventDefault();n.setAttribute("tabindex","0");n.focus()}else{e.preventDefault();i.focus()}else{e.preventDefault();o[r-1].focus()}},setFocusToFirstStar:function(e){var t=document.querySelector(".lp_csat_rater_stars a:first-child");if(9==e.keyCode&&t){e.preventDefault();t.focus()}},toggleChosen:function(e){var t=(e=i.isDomNode(e)?e:this.getElementsByClass(this.view,this.cssClasses.defaultStarClass,[])[this.numberOfStars-e]).getAttribute("data-lp-rating");if(this.cachedPrevious){this.cachedPrevious.className=this.cssClasses.defaultStarClass;this.cachedPrevious.setAttribute("aria-pressed",!1)}e.className=this.cssClasses.chosenStarClass;this.getElements(this.LPViewMap.current,this.view)[0].innerHTML=this.translate(this.csatLevelPrefix+t);this.cachedPrevious=e},render:function(){this.view.classList.add(this.customizationClassName);this.view.classList.add(this.deviceClass);this.createView({template:this.templateFileName,wrapWithDiv:!1,textInjection:{id:this.prefix+this.question.id,defaultCSATLevel:this.defaultCSATLevel,rating:this.translate(this.csatLevelPrefix+this.defaultCSATLevel),csatDisclaimer:this.translate("csatDisclaimer"),label:this.translate("csatRatingQuestion"),of:this.translate("outOf"),numberOfStars:this.numberOfStars,labelStar1:this.translate("csatLevel_1"),labelStar2:this.translate("csatLevel_2"),labelStar3:this.translate("csatLevel_3"),labelStar4:this.translate("csatLevel_4"),labelStar5:this.translate("csatLevel_5")}});this.bindViewEvent({selector:this.LPViewMap.star,DOMEvent:"click",callback:this.submitCSATAnswer});this.bindViewEvent({selector:this.LPViewMap.questionLabel,callback:this.setFocusToFirstStar,DOMEvent:"keydown",context:this});this.bindViewEvent({selector:this.LPViewMap.starsArea,callback:this.handleStarsNavigation,DOMEvent:"keydown",context:this})}})}();window.lpTag=window.lpTag||{};lpTag.unifiedWindow.Application=function(a,R){var i,n,k,V,o,$,s,r,l,d,c,u,F,p,h,f,g,B,m,U,v,H,w,_,C,T,E,y,b,S,I,z,G,j,q,e,K,Y,X,N,x,J,A,Z,M,Q,L="Application",D=lpTag.unifiedWindow,P=lpTag.taglets.lpUtil,O=D.log,ee=lpTag&&lpTag.features,te=!1,ie=10,ne=0,ae=!1,oe=!1,se={chat:{dev:"e54d98e4810e4c93a8a7738bb3e9a321",qa:"50aae09500274faa9aea8ccf6c78ce28",production:"721c180b09eb463d9f3191c41762bb68"},collaboration:{dev:"a213e4a5450848cbbf12f63747d38376",qa:"c533acb2dd7e439995325014f84b3484",production:"42c22b57e5144838a72d891fbbf160ea"}},t=a;if("object"==typeof t&&"object"==typeof R){G=t.uiState&&t.uiState.engConf.ssoKey;j=t.uiState&&t.uiState.engConf.redirect_uri;A=t.uiState&&t.uiState.engConf.async;Z=t.uiState&&t.uiState.engConf.externalTargets&&!!t.uiState.engConf.externalTargets[lpTag.unifiedWindow.consts.externalTargets.SMS];Q=t.unified&&t.unified.disableOfflineMessaging;N={conf:{},keys:{}};!function(e){var t=e.uiState&&e.uiState.engConf&&e.uiState.engConf.connector;if(e.unified&&e.unified.connectors&&e.unified.connectors.length&&t&&!function(e){e=e&&e.configuration;return!e||"lpTag.taglets.unAuthMessaging"===e.jsContext&&"lpTag.taglets.unAuthMessaging.lpUnauthFunction"===e.jsMethodName}(t)){var t=window.lpTag.identities&&lpTag.identities.safeIdentities||[],i=e.unified.connectors,n=t.filter(function(e){var e=e.acr,t=parseInt(e,10);return 1!==e.length||0!==t});n.length&&i.forEach(function(t){n.forEach(function(e){t.configuration.issuer===e.iss&&(M=t)})});M&&(e.uiState.engConf.connector=M)}N.conf.windowConf=E=e.window;N.conf.accountSettings=e.accountSettings;N.conf.unifiedConf=y=e.unified;y&&(y.authToken=y.authToken||(y.unified&&y.unified.connectorsSfConfig?"connectors":void 0));N.conf.unifiedConf.authToken=N.conf.unifiedConf.authToken||(e.unified.connectorsSfConfig?"connectors":void 0);N.conf.uiState=b=e.uiState;N.conf.engConf=b.engConf;N.conf.authConf=function(e){var t=lpTag.unifiedWindow.consts.authConnectorTypes,i=e.connector&&e.connector.type,n=P.getURLParams(window.location.search);return i===t.OAUTH_CODE||i===t.OAUTH_IMPLICIT||!e.async&&i===t.S2S?{connector:e.connector,ssoKey:fe(n),redirect_uri:ge()}:e.authConnId?{connector:{id:e.authConnId},ssoKey:fe(n),redirect_uri:ge()}:null}(b.engConf);N.conf.widgetSDK=e.unified?e.unified.widgetSDK:void 0;N.conf.widgetSDK&&0<N.conf.widgetSDK.length&&"object"==typeof N.conf.widgetSDK[0]&&(A||!A&&e.unified.widgetSDK[0].widgets&&e.unified.widgetSDK[0].widgets[0]&&e.unified.widgetSDK[0].widgets[0].chat)&&(N.conf.widgetSDK[0].widgets=function(){var t,i,n=[];a.unified.widgetSDK[0].widgets.forEach(function(e){t=e.chat&&!A&&le(e.chat);i=e.messaging&&A&&le(e.messaging);(t||i)&&n.push(e)});return n}())}(t);N.keys.appKey=X=y.debug?se.chat.qa:se.chat.production;!function(e){F=e.sessionManager;N.appConfigurationManager=e.appConfigurationManager;N.pkceManager=V=e.pkceManager;V.setAppContext(N);N.browserStateManager=i=e.browserStateManager;N.deviceDetector=n=e.deviceDetector;N.wrapperWindow=k=e.wrapperWindow;N.events=o=e.events}(R);N.authenticationManager=H=new D.AuthenticationManager({appContext:N});!function(e){var e=e.unified&&e.unified.isMessaging,t=lpTag.events.hasFired("LP_OFFERS","OFFER_CLICK")||[],i=t.length>lpTag.engagementClickEventsSeen;N.isNewConversation=i;lpTag.engagementClickEventsSeen=t.length;oe=!Q&&e&&i}(t);!function(e){N.stepUpManager=w=new D.StepUpManager({appContext:N,configs:e})}(t);if(A&&!Z)if(function(e){var t=e.engConf&&e.engConf.isPopOut,i=e.unified.external,e=e.unified.isStepUpEnabled,t=!t&&!i&&e&&w.shouldStepUp(),i=t?"Stepping up conversation":"Not stepping up";O.info(i);return t}(t)){we(!0);!function(t,i){var n=lpTag.unifiedWindow.consts.authConnectorTypes.STEP_UP;w.stepUpAuthentication(function(e){e?P.runCallback(t,null,{authenticationData:{ssoKey:e,type:n}}):P.runCallback(i)},i)}(W,function(){pe(W,he)})}else{we(!1);N&&N.conf&&N.conf.unifiedConf&&(N.conf.unifiedConf.isConvoSteppedUp=!1);if(oe){W();ve();pe(re,he)}else pe(W,he)}else W()}else O.error("init: Could not init - did not required configuration",L);function W(e){D.UIModelPath();D.ChatModelPath();N.conf.widgetSDK&&D.WidgetModelPath();if(o&&o.bind&&o.once){o.bind({appName:"ChatStateManager",eventName:"ended",func:de});o.bind({appName:"*",eventName:"getChatState",func:ce});o.once({appName:"API",eventName:"initialized",func:ve})}S=new window.liveperson.uiframework.latest.LPModel;N.conf.widgetSDK&&(z=new window.liveperson.uiframework.latest.LPModel);var t=b;t.engConf&&t.engConf.ssoKey&&delete t.engConf.ssoKey;I=new lpTag.uiframework.LPPersistentModel({accountId:y.accountId,storageKey:y.sessionId,secureStorageLocation:y.secureStorageLocation,modelName:"UIState"},b);x={uiModel:I,chatModel:S};N.conf.engConf&&I.bind(lpTag.unifiedWindow.uiModelPath.STATE,ue);t=e;t=e||{};N.translator=new D.Translator(b.engConf.lang);y.external||(N.heartBeatManager=u=new D.HeartBeatManager({accountId:y.accountId,storageKey:y.sessionId,secureStorageLocation:y.secureStorageLocation,poppedOut:y.poppedOut},{browserStateManager:i,events:o}));N.coBrowseManager=m=new D.CoBrowseManager({events:o,lpModel:S,appContext:N});N.idnvManager=B=new D.IdnvManager({lppModel:I,appContext:N});N.uiStateManager=U=new D.UIStateManager({lppModel:I,lpModel:S,events:o,browserStateManager:i,appContext:N,NativeSDK:N.conf.unifiedConf.NativeSDK});N.featureStateManager=new D.FeatureStateManager(E,{appContext:N});N.timeStampManager=T=new D.TimeStampManager({appContext:N,chatModel:S});N.hyperlinksHelper=new D.helpers.HyperLinksHelper;N.accessibilityManager=new D.accessibilityManager(N.conf);n.isDesktop()||(N.viewPortManager=new D.ViewPortManager(n));if(A)if(Z){s=new D.SMSDelegate(me(),o);N.conversationManager=new D.SMSDeflectionManager(E,x,b,{appContext:N,apiDelegate:s,events:o})}else{s=new D.MessagingDelegate(me(),o);w.configure({apiDelegate:s,lppModel:I});N.lineStatesManager=d=new D.LineStatesManager({lppModel:I,lpModel:S,apiDelegate:s,events:o,browserStateManager:i});N.conversationManager=l=new D.ConversationManager(E,x,b,{appContext:N,apiDelegate:s,events:o,authenticationData:t.authenticationData,stepUpManager:w,canEnableOfflineFlow:oe});N.ttrManager=c=new D.TtrManager({lppModel:I,lpModel:S,events:o,features:ee,conversationManager:l});N.fileSharingManager=_=new D.FileSharingManager({apiManager:l,appContext:N,utils:P,log:O,imageParsingHelper:new lpTag.unifiedWindow.helpers.ImageParsingHelper({appContext:N})});E.browserNotifications&&(N.browserNotificationsManager=C=new D.BrowserNotificationsManager(E.browserNotifications,{events:o,chatModel:S,uiModel:I,appContext:N,browserStateManager:i,secureStorageLocation:y.secureStorageLocation}))}else{s=new D.ChatDelegate(me(),o);N.chatStateManager=r=new D.ChatStateManager(E,x,b,{appContext:N,apiDelegate:s,events:o});y.external&&y.NativeSDK&&(v=D.webViewPlugin({events:o,log:O,IOS:y.IOS}))}if(N.conf.widgetSDK){$=new lpTag.Events;N.WidgetManager=new D.WidgetManager({events:o,lpModel:S,lppModel:I,wsdkModel:z,appContext:N,windowSDKEvents:$})}N.transcriptManager=p=new D.TranscriptManager({events:o,lpModel:S,lppModel:I,apiDelegate:s,coBrowseManager:m,idnvManager:B,browserStateManager:i,lineStatesManager:d,appContext:N,canEnableOfflineFlow:oe});N.SecureFormManager=h=new D.SecureFormManager({events:o,lpModel:S,lppModel:I,browserStateManager:i,apiManager:A?l:r,appContext:N});N.richContentManager=f=new D.RichContentManager({lpModel:S,lppModel:I,apiManager:A?l:r,appContext:N});A&&(N.quickRepliesManager=g=new D.QuickRepliesManager({apiManager:l,appContext:N}));N.themer=new lpTag.unifiedWindow.Themer(function(e){return P.isEmpty(e.customStyle)?lpTag.unifiedWindow.defaultStyle:e.customStyle}(E),y,{agentImage:!0,logoImage:!0});D.soundManager(x,n,y,C)}function re(e){O.info("_onAuthenticationSuccess: "+JSON.stringify(e),L);l&&e&&e.authenticationData&&l.authenticate(e.authenticationData)}function le(e){var t=P.getPropertyFromObject(N,"conf.engConf.allowUnauthMsg");return e.enable&&(N.conf.authConf&&e.authenticated||(!N.conf.authConf||t)&&e.unauthenticated)}function de(){te=!0}function ce(e){var t=I.get("chat"),t=t&&t.state;e&&"function"==typeof e.gotChatStateCallback&&e.gotChatStateCallback({state:t,engConf:b.engConf})}function ue(e){if(N.conf.engConf)switch(e&&e.newValue){case lpTag.unifiedWindow.State.APP_ENDED:case lpTag.unifiedWindow.State.POST_CHAT:F.dispose()}}function pe(i,e){O.info("_authenticate for messaging",L);var n=a.uiState&&a.uiState.engConf&&a.uiState.engConf.connector;H.authenticate(function(t){if(t)n&&n.configuration&&n.configuration.pkceEnabled?N.pkceManager.getPKCEFromSecureStorage(function(e){if(!e&&a.unified.external){(e={}).code_verifier=localStorage.getItem("cv");localStorage.removeItem("cv")}if(e&&e.code_verifier){O.debug("Successfully retrieved PKCE value from secure storage");t.code_verifier=e.code_verifier}N.pkceManager.removePKCEFromSecureStorage();P.runCallback(i,null,{authenticationData:t})},function(){O.error("_authenticate: PKCE not available in secure storage",L);P.runCallback(i,null,{authenticationData:t})}):P.runCallback(i,null,{authenticationData:t});else{O.error("There is no authentication data",L);P.runCallback(e)}},e)}function he(){O.info("_onAuthenticationError",L);b.engConf.allowUnauthMsg?o.trigger({appName:lpTag.unifiedWindow.apps.CHAT,eventName:lpTag.unifiedWindow.events.chat.ERROR,data:{errorType:lpTag.unifiedWindow.consts.errorTypes.FAILED_START_CONVERSATION_ERROR,keepError:!0}}):o.trigger({appName:lpTag.unifiedWindow.apps.CHAT,eventName:lpTag.unifiedWindow.events.chat.ERROR,data:{errorType:lpTag.unifiedWindow.consts.errorTypes.AUTH_ERROR,keepError:!0}})}function fe(e){return G||e&&e.ssoKey||y.authToken}function ge(e){var t=y.useOAuth2Standard||N.conf.engConf.connector&&N.conf.engConf.connector.configuration&&N.conf.engConf.connector.configuration.rfcCompliance;return j||e&&e.redirect_uri||(!t||!y.external)&&lpTag.unifiedWindow.consts.defaultRedirectUri||lpTag.lpUtils.getCurrentUrlWithoutParams()}function me(){var e="function"==typeof lpTag.getEnv&&lpTag.getEnv(),e=void 0!==y.isFetchEnabled?JSON.parse(y.isFetchEnabled):"alpha"===e,t=y.fetchCacheMode,e={isStepUpEnabled:y.isStepUpEnabled,connectorsSfConfig:y.connectorsSfConfig,accountId:y.accountId,availabilityPolicy:b.engConf.availabilityPolicy,appKey:X,domain:y.domain,asyncMessagingDomain:y.asyncMessagingDomain,idpDomain:y.idpDomain,shiftStatusDomain:y.shiftStatusDomain,messagingHistoryDomain:y.messagingHistoryDomain,secureStorageLocation:y.secureStorageLocation,sessionId:y.sessionId,useSecureStorage:!b.engConf.isPopOut,failureTolerance:19,reconnectTimeout:function(e){var t=n.getDeviceFamilyName().toLowerCase();if(e&&"number"==typeof e[t])return 1e3*e[t];return null}(y.chatReconnectTimeout),ssoKey:fe(N.conf.authConf),redirect_uri:ge(N.conf.authConf),survey:b.engConf.survey,customVariables:b.engConf.customVariables,svid:b.engConf.svid,ssid:b.engConf.ssid,scid:b.engConf.scid,eid:b.engConf.eid,ename:b.engConf.ename,cid:b.engConf.cid,connectorId:function(e){var t=e.stepUpConnector||e.connector;{if(a.unified&&a.unified.connectors&&a.unified.connectors.length&&M)return M.id;if(a.unified&&a.unified.external&&lpTag.features.getFeature("Common.Multiple_Consumer_IDP"))return t.id}return e&&e.allowUnauthMsg&&t.id}(b.engConf),lang:b.engConf.lang,runWithRules:b.engConf.runWithRules,visitorId:b.engConf.visitorId,interactionTimeout:F.getSessionTimeout(),skill:b.engConf.skill,skillId:b.engConf.skillId,agent:b.engConf.agent,maxWaitTime:b.engConf.maxWaitTime,visitorProfile:b.engConf.visitorProfile,surveyName:b.engConf.surveyName,visitorIp:b.engConf.visitorIp,serviceQueue:b.engConf.serviceQueue,queuePriority:b.engConf.queuePriority,subscription:b.engConf.subscription,preSurveyId:E.surveyPreChatId,preChatLines:b.engConf.preChatLines,surveyOfflineId:b.engConf.isOffline&&b.engConf.surveyOfflineId||E.surveyOfflineId,exitSurveyId:E.surveyPostChatId,smsPreFormId:E.smsPreFormId,offsiteEngContext:b.engConf.isOffline&&b.engConf.offsiteEngContext,isExternalWindow:b.engConf.isPopOut||y.external,isFetchEnabled:e,fetchCacheMode:t,isSignalEnabled:y.isSignalEnabled};y.chatPollInterval&&1e3<=Number(y.chatPollInterval)&&(e.chatPollInterval=y.chatPollInterval);y.chatExitSurveyInterval&&1e3<=Number(y.chatExitSurveyInterval)&&(e.chatExitSurveyInterval=y.chatExitSurveyInterval);void 0!==y.throttlingSupportEnabled&&(e.throttlingSupportEnabled=y.throttlingSupportEnabled);y.throttlingTimeoutValue&&(e.throttlingTimeoutValue=y.throttlingTimeoutValue);y.amsClientConfig&&"object"==typeof y.amsClientConfig&&(e.amsClientConfig=y.amsClientConfig);N.featureStateManager&&N.featureStateManager.isUMSConnectionTimeoutEnabled()?y.connectionTimeoutValue&&!isNaN(Number(y.connectionTimeoutValue))&&(e.connectionTimeoutValue=Number(y.connectionTimeoutValue)):e.connectionTimeoutValue=-1;return e}function ve(){if(!ae){J&&clearTimeout(J);if(N){q=new lpTag.unifiedWindow.WrapperWindowExtender({models:x,appContext:N,wrapWithDiv:!1});Y=new lpTag.unifiedWindow.SliderViewController({models:x,appContext:N,target:N.wrapperWindow.getMaximizedElement(),textInjection:N.conf.unifiedConf});e=new lpTag.unifiedWindow.MaximizedViewController({models:x,appContext:N,textInjection:N.conf.unifiedConf,target:document.querySelector('[data-lp-point="maximized"] [data-lp-point="main"]'),slider:Y});K=new lpTag.unifiedWindow.MinimizedViewController({models:x,appContext:N,textInjection:N.conf.unifiedConf,view:document.querySelector('[data-lp-point="minimized"] [data-lp-point="main"]')});N.conf.widgetSDK&&new lpTag.unifiedWindow.WidgetManagerViewController({appContext:N,sliderAPI:Y,windowSDKEvents:$,wsdkModel:z});ae=!0}else if(ne<=ie){O.info("_createViewControllers: retrying numberOfRetries="+ne,L);ne++;J=setTimeout(ve,0)}else O.error("_createViewControllers: number of retries exceeded.",L)}}function we(e){lpTag.taglets.lpUnifiedWindow.stepUpChecked={isStepUp:e};lpTag.events.trigger({eventName:"STEPUP_CHECKED",appName:"*",data:{isStepUp:e}})}return{methods:{isDisposed:function(){return te},end:function(){if(o&&o.unbind){o.unbind({appName:"ChatStateManager",eventName:"ended",func:de});o.unbind({appName:"API",eventName:"initialized",func:ve});o.unbind({appName:"*",eventName:"getChatState",func:ce})}if(u){u.dispose();u=null}U&&U.clear();if(p){p.dispose();p=null}if(r){r.dispose();r=null}if(l){l.dispose();l=null}if(d){d.dispose();d=null}if(c){c.dispose();c=null}if(h){h.dispose();h=null}if(f){f.dispose();f=null}if(g){g.dispose();g=null}q&&q.dispose();if(e){e.disposeChatViews();e.dispose()}K&&K.dispose();if(s){s.dispose();s=null}if(v){v.dispose();v=null}if(_){_.dispose();_=null}if(C){C.dispose();C=null}if(m){m.dispose();m=null}if(T){T.dispose();T=null}k.dispose()}}}};lpTag.unifiedWindow.Application.v="10.39.0-release_1402625749";