!function(){function e(e,t,o,n){function i(t){if(e.jivo_config=N=t,v())throw new Error("Placing widget is forbidden on "+e.top.location.host);x&&N.disable_mobile||(a(),m())}function a(){O.src="javascript:false",O.title="",O.role="presentation",O.setAttribute("name","jivo_container"),O.setAttribute("id","jivo_container"),O.setAttribute("frameborder","no"),P.className+="jivo-no-transition","undefined"==typeof SVGRect&&(P.className+=" no-svg"),(O.frameElement||O).style.cssText="width:100%;height:100%;border:0",e.jivo_init=function(){F=0,A=!1,r()},e.atob&&"complete"!==t.readyState?s(e,"load",r):r(),s(e,"message",function(o){if(!o)return void(console&&console.log&&console.log("Error receive postMessage, window message event is empty."));var n,i,a=o.data;if("in_node_webkit"==a.name&&(n||(n=o.source,i=o.origin),n&&i)){e.jivo_cobrowse={source:n,origin:i};var r="jv_"+encodeURIComponent("langpack")+"_"+N.widget_id+"="+encodeURIComponent(JSON.stringify(a.langpack));N.cookie_domain&&(r+="; domain="+N.cookie_domain),r+="; path=/",t.cookie=r,n.postMessage({name:"widget_ready"},i)}"iframe_url_changed"!=a.name&&"iframe_url_changed"!=a||d()},!1)}function r(){var e=t.getElementsByTagName("head")[0],o=t.createElement("script"),n=N.bundle_folder?N.bundle_folder:"",i=u()+n+"/js/bundle_"+N.locale+".js?rand="+N.build_number;o.type="text/javascript",o.async=!0,o.charset="UTF-8",o.className="js-jivo-bundle",o.src=i,S.bundleSrc=i,e.appendChild(o),o.onerror=function(){_("error")},g()}function c(){C=t.body.lastChild,P.style&&(P.style.visibility="hidden"),P.setAttribute("id","jivo-iframe-container"),P.appendChild(O),C.parentNode.insertBefore(P,C.nextSibling),d()}function d(){if(!(F++>3)){if(!B)return F--,r();try{T=O.contentWindow.document}catch(e){L=t.domain,O.src="javascript:var d=document.open();d.domain='"+L+"';void(0);",T=O.contentWindow.document}T.write('
'),T.close()}}function s(t,o,n){t.addEventListener?t.addEventListener(o,n,!1):t.attachEvent&&(t.attachEvent("on"+o,function(t){return function(){n.call(t,e.event)}}(t)),t=null)}function l(){if(S.hasStorage)var e=parseInt(localStorage.getItem("jv_store_cdn_resolve_time"),10);return e&&e>=(new Date).getTime()||S.cdnUnavailableState}function u(){return N.static_host&&!l()?"//"+N.static_host:N.base_url}function v(){return N.host_blacklist!==n&&N.host_blacklist.indexOf(e.location.host)>=0}function m(){N.cp_tracker_id&&N.cp_tracker_url&&(e._cp={trackerId:N.cp_tracker_id},w(N.cp_tracker_url))}function _(e){clearTimeout(U),++W>=M||A||(S.hasStorage&&(localStorage.setItem("jv_store_cdn_resolve_time",((new Date).getTime()+V).toString()),localStorage.setItem("jv_store_cdn_unavailable",e)),S.cdnUnavailableState=!0,r())}function g(){l()||(U=setTimeout(function(){!A&&_("timeout")},R))}function f(e){A||(clearTimeout(U),A=!0,B=e,c())}function p(e){e.globalStore=S,h()}function h(){B=null;for(var e=t.getElementsByTagName("head")[0],o=e.getElementsByClassName("js-jivo-bundle"),n=0;n1&&(j=I[1],b=I[2])}}if(!b||!j)throw new Error("Failed to evaluate the widgetId or configHost");var N,L,T,C,U,A,B,x=/iPhone|iPad|iPod|Android|Windows Phone/i.test(navigator.userAgent),O=t.createElement("iframe"),P=t.createElement("div"),F=0,R=x?8e3:6e3,V=12e4,M=3,W=0;e.__jivoConfigOnLoad=i,e.__jivoBundleOnLoad=f,e.__jivoBundleInit=p,w("//"+j+"/script/widget/config/"+b)}}var t=.1;window.__hasStorage=!1;try{localStorage.setItem("testLocalStorage","ok"),localStorage.removeItem("testLocalStorage"),window.__hasStorage=!0}catch(e){}var o=e,n=null;if(window.__hasStorage){try{n=JSON.parse(localStorage.getItem("__jivoLoader"))}catch(e){}n&&n.version>=t&&(o=new Function("window","document","jivoLoaderVersion","("+n.code+")(window, document, jivoLoaderVersion)"))}o(window,document,t)}(window,document);