/*! hibot - v1.67.7 - 2021-03-02 08:03 */ 
"use strict";function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}!function(a,b){"function"==typeof define&&define.amd?define("TinyAnimate",["exports"],function(c){b(a.TinyAnimate=c)}):b("object"==typeof exports?exports:a.TinyAnimate={})}(this,function(a){a.animate=function(a,c,d,e,f,g){function h(){var b=+new Date-k;e(f(b,a,j,d)),b>=d?(e(c),g()):i(h)}if("number"==typeof a&&"number"==typeof c&&"number"==typeof d&&"function"==typeof e){"string"==typeof f&&b[f]&&(f=b[f]),"function"!=typeof f&&(f=b.linear),"function"!=typeof g&&(g=function(){});var i=window.requestAnimationFrame||function(a){window.setTimeout(a,1e3/60)},j=c-a;e(a);var k=+new Date;i(h)}},a.animateCSS=function(b,c,d,e,f,g,h,i){var j=function(a){b.style[c]=a+d};a.animate(e,f,g,j,h,i)};var b=a.easings={};b.linear=function(a,b,c,d){return c*a/d+b},b.easeInQuad=function(a,b,c,d){return c*(a/=d)*a+b},b.easeOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b},b.easeInOutQuad=function(a,b,c,d){return(a/=d/2)<1?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b},b.easeInCubic=function(a,b,c,d){return c*(a/=d)*a*a+b},b.easeOutCubic=function(a,b,c,d){return c*((a=a/d-1)*a*a+1)+b},b.easeInOutCubic=function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b},b.easeInQuart=function(a,b,c,d){return c*(a/=d)*a*a*a+b},b.easeOutQuart=function(a,b,c,d){return-c*((a=a/d-1)*a*a*a-1)+b},b.easeInOutQuart=function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b},b.easeInQuint=function(a,b,c,d){return c*(a/=d)*a*a*a*a+b},b.easeOutQuint=function(a,b,c,d){return c*((a=a/d-1)*a*a*a*a+1)+b},b.easeInOutQuint=function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b},b.easeInSine=function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},b.easeOutSine=function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},b.easeInOutSine=function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},b.easeInExpo=function(a,b,c,d){return 0==a?b:c*Math.pow(2,10*(a/d-1))+b},b.easeOutExpo=function(a,b,c,d){return a==d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b},b.easeInOutExpo=function(a,b,c,d){return 0==a?b:a==d?b+c:(a/=d/2)<1?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b},b.easeInCirc=function(a,b,c,d){return-c*(Math.sqrt(1-(a/=d)*a)-1)+b},b.easeOutCirc=function(a,b,c,d){return c*Math.sqrt(1-(a=a/d-1)*a)+b},b.easeInOutCirc=function(a,b,c,d){return(a/=d/2)<1?-c/2*(Math.sqrt(1-a*a)-1)+b:c/2*(Math.sqrt(1-(a-=2)*a)+1)+b},b.easeInElastic=function(a,b,c,d){var e=0,f=c;if(0==a)return b;if(1==(a/=d))return b+c;if(e||(e=.3*d),f<Math.abs(c)){f=c;var g=e/4}else var g=e/(2*Math.PI)*Math.asin(c/f);return-(f*Math.pow(2,10*(a-=1))*Math.sin(2*(a*d-g)*Math.PI/e))+b},b.easeOutElastic=function(a,b,c,d){var e=0,f=c;if(0==a)return b;if(1==(a/=d))return b+c;if(e||(e=.3*d),f<Math.abs(c)){f=c;var g=e/4}else var g=e/(2*Math.PI)*Math.asin(c/f);return f*Math.pow(2,-10*a)*Math.sin(2*(a*d-g)*Math.PI/e)+c+b},b.easeInOutElastic=function(a,b,c,d){var e=0,f=c;if(0==a)return b;if(2==(a/=d/2))return b+c;if(e||(e=.3*d*1.5),f<Math.abs(c)){f=c;var g=e/4}else var g=e/(2*Math.PI)*Math.asin(c/f);return 1>a?-.5*f*Math.pow(2,10*(a-=1))*Math.sin(2*(a*d-g)*Math.PI/e)+b:f*Math.pow(2,-10*(a-=1))*Math.sin(2*(a*d-g)*Math.PI/e)*.5+c+b},b.easeInBack=function(a,b,c,d,e){return void 0==e&&(e=1.70158),c*(a/=d)*a*((e+1)*a-e)+b},b.easeOutBack=function(a,b,c,d,e){return void 0==e&&(e=1.70158),c*((a=a/d-1)*a*((e+1)*a+e)+1)+b},b.easeInOutBack=function(a,b,c,d,e){return void 0==e&&(e=1.70158),(a/=d/2)<1?c/2*a*a*(((e*=1.525)+1)*a-e)+b:c/2*((a-=2)*a*(((e*=1.525)+1)*a+e)+2)+b},b.easeInBounce=function(a,c,d,e){return d-b.easeOutBounce(e-a,0,d,e)+c},b.easeOutBounce=function(a,b,c,d){return(a/=d)<1/2.75?7.5625*c*a*a+b:2/2.75>a?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:2.5/2.75>a?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},b.easeInOutBounce=function(a,c,d,e){return e/2>a?.5*b.easeInBounce(2*a,0,d,e)+c:.5*b.easeOutBounce(2*a-e,0,d,e)+.5*d+c}}),!function(a){function b(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function c(a,b,c){a.addEventListener(b,c,!1)}function d(a,b,c){a.removeEventListener(b,c,!1)}function e(a){return H+"["+(c="Host page: "+(b=a),window.top!==window.self&&(c=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+b:"Nested host page: "+b),c)+"]";var b,c}function f(a){return M[a]?M[a].log:E}function g(a,b){j("log",a,b,f(a))}function h(a,b){j("info",a,b,f(a))}function i(a,b){j("warn",a,b,!0)}function j(a,b,c,d){!0===d&&"object"==typeof window.console&&console[a](e(b),c)}function k(a){function b(){e("Height"),e("Width"),t(function(){s(E),p(F),x("onResized",E)},E,"init")}function e(a){var b=Number(M[F]["max"+a]),c=Number(M[F]["min"+a]),d=a.toLowerCase(),e=Number(E[d]);g(F,"Checking "+d+" is in range "+c+"-"+b),c>e&&(e=c,g(F,"Set "+d+" to min value")),e>b&&(e=b,g(F,"Set "+d+" to max value")),E[d]=""+e}function f(a){return D.substr(D.indexOf(":")+G+a)}function j(a,b){var c,d,e;c=function(){var c,d;u("Send Page Info","pageInfo:"+(c=document.body.getBoundingClientRect(),d=E.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:d.height,iframeWidth:d.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(d.top-c.top,10),offsetLeft:parseInt(d.left-c.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),a,b)},d=32,P[e=b]||(P[e]=setTimeout(function(){P[e]=null,c()},d))}function k(a){var b=a.getBoundingClientRect();return o(F),{x:Math.floor(Number(b.left)+Number(J.x)),y:Math.floor(Number(b.top)+Number(J.y))}}function m(a){var b=a?k(E.iframe):{x:0,y:0},c={x:Number(E.width)+b.x,y:Number(E.height)+b.y};g(F,"Reposition requested from iFrame (offset x:"+b.x+" y:"+b.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(a?"Offset":"")](c.x,c.y):i(F,"Unable to scroll to requested position, window.parentIFrame not found"):(J=c,w(),g(F,"--"))}function w(){!1!==x("onScroll",J)?p(F):q()}function x(a,b){return l(F,a,b)}var y,z,A,B,C,D=a.data,E={},F=null;"[iFrameResizerChild]Ready"===D?function(){for(var a in M)u("iFrame requested init",v(a),document.getElementById(a),a)}():H===(""+D).substr(0,I)&&D.substr(I).split(":")[0]in M?(C=D.substr(I).split(":"),E={iframe:M[C[0]]&&M[C[0]].iframe,id:C[0],height:C[1],width:C[2],type:C[3]},F=E.id,M[F]&&(M[F].loaded=!0),(B=E.type in{"true":1,"false":1,undefined:1})&&g(F,"Ignoring init message from meta parent page"),!B&&(A=!0,M[z=F]||(A=!1,i(E.type+" No settings for "+z+". Message was: "+D)),A)&&(g(F,"Received: "+D),y=!0,null===E.iframe&&(i(F,"IFrame ("+E.id+") not found"),y=!1),y&&function(){var b,c=a.origin,d=M[F]&&M[F].checkOrigin;if(d&&""+c!="null"&&!(d.constructor===Array?function(){var a=0,b=!1;for(g(F,"Checking connection is from allowed list of origins: "+d);a<d.length;a++)if(d[a]===c){b=!0;break}return b}():(b=M[F]&&M[F].remoteHost,g(F,"Checking connection is from: "+b),c===b)))throw new Error("Unexpected message received from: "+c+" for "+E.iframe.id+". Message was: "+a.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(M[F]&&M[F].firstRun&&M[F]&&(M[F].firstRun=!1),E.type){case"close":M[F].closeRequeston?l(F,"onCloseRequest",M[F].iframe):n(E.iframe);break;case"message":p=f(6),g(F,"onMessage passed: {iframe: "+E.iframe.id+", message: "+p+"}"),x("onMessage",{iframe:E.iframe,message:JSON.parse(p)}),g(F,"--");break;case"scrollTo":m(!1);break;case"scrollToOffset":m(!0);break;case"pageInfo":j(M[F]&&M[F].iframe,F),function(){function a(a,c){function d(){M[e]?j(M[e].iframe,e):b()}["scroll","resize"].forEach(function(b){g(e,a+b+" listener for sendPageInfo"),c(window,b,d)})}function b(){a("Remove ",d)}var e=F;a("Add ",c),M[e]&&(M[e].stopPageInfo=b)}();break;case"pageInfoStop":M[F]&&M[F].stopPageInfo&&(M[F].stopPageInfo(),delete M[F].stopPageInfo);break;case"inPageLink":a=f(9),h=a.split("#")[1]||"",i=decodeURIComponent(h),(o=document.getElementById(i)||document.getElementsByName(i)[0])?(e=k(o),g(F,"Moving to in page link (#"+h+") at x: "+e.x+" y: "+e.y),J={x:e.x,y:e.y},w(),g(F,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(h):g(F,"In page link #"+h+" not found and window.parentIFrame not found"):g(F,"In page link #"+h+" not found");break;case"reset":r(E);break;case"init":b(),x("onInit",E.iframe);break;default:b()}var a,e,h,i,o,p}())):h(F,"Ignored: "+D)}function l(a,b,c){var d=null,e=null;if(M[a]){if("function"!=typeof(d=M[a][b]))throw new TypeError(b+" on iFrame["+a+"] is not a function");e=d(c)}return e}function m(a){var b=a.id;delete M[b]}function n(a){var b=a.id;g(b,"Removing iFrame: "+b);try{a.parentNode&&a.parentNode.removeChild(a)}catch(a){i(a)}l(b,"onClosed",b),g(b,"--"),m(a)}function o(b){null===J&&g(b,"Get page position: "+(J={x:window.pageXOffset!==a?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==a?window.pageYOffset:document.documentElement.scrollTop}).x+","+J.y)}function p(a){null!==J&&(window.scrollTo(J.x,J.y),g(a,"Set page position: "+J.x+","+J.y),q())}function q(){J=null}function r(a){g(a.id,"Size reset requested by "+("init"===a.type?"host page":"iFrame")),o(a.id),t(function(){s(a),u("reset","reset",a.iframe,a.id)},a,"reset")}function s(a){function c(c){F||"0"!==a[c]||(F=!0,g(e,"Hidden iFrame detected, creating visibility listener"),function(){function a(){Object.keys(M).forEach(function(a){!function(a){function b(b){return"0px"===(M[a]&&M[a].iframe.style[b])}M[a]&&(c=M[a].iframe,null!==c.offsetParent)&&(b("height")||b("width"))&&u("Visibility change","resize",M[a].iframe,a);var c}(M[a])})}function c(b){g("window","Mutation observed: "+b[0].target+" "+b[0].type),x(a,16)}var d=b();d&&(e=document.querySelector("body"),f={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0},new d(c).observe(e,f));var e,f}())}function d(b){var d;d=b,a.id?(a.iframe.style[d]=a[d]+"px",g(a.id,"IFrame ("+e+") "+d+" set to "+a[d]+"px")):g("undefined","messageData id not set"),c(b)}var e=a.iframe.id;M[e]&&(M[e].sizeHeight&&d("height"),M[e].sizeWidth&&d("width"))}function t(a,b,c){c!==b.type&&K?(g(b.id,"Requesting animation frame"),K(a)):a()}function u(a,b,c,d,e){var f,h=!1;d=d||c.id,M[d]&&(c&&"contentWindow"in c&&null!==c.contentWindow?(f=M[d]&&M[d].targetOrigin,g(d,"["+a+"] Sending msg to iframe["+d+"] ("+b+") targetOrigin: "+f),c.contentWindow.postMessage(H+b,f)):i(d,"["+a+"] IFrame("+d+") not found"),e&&M[d]&&M[d].warningTimeout&&(M[d].msgTimeout=setTimeout(function(){!M[d]||M[d].loaded||h||(h=!0,i(d,"IFrame has not responded within "+M[d].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))},M[d].warningTimeout)))}function v(a){return a+":"+M[a].bodyMarginV1+":"+M[a].sizeWidth+":"+M[a].log+":"+M[a].interval+":"+M[a].enablePublicMethods+":"+M[a].autoResize+":"+M[a].bodyMargin+":"+M[a].heightCalculationMethod+":"+M[a].bodyBackground+":"+M[a].bodyPadding+":"+M[a].tolerance+":"+M[a].inPageLinks+":"+M[a].resizeFrom+":"+M[a].widthCalculationMethod}function w(d,e){function f(a){var b=a.split("Callback");if(2===b.length){var c="on"+b[0].charAt(0).toUpperCase()+b[0].slice(1);this[c]=this[a],delete this[a],i(s,"Deprecated: '"+a+"' has been renamed '"+c+"'. The old method will be removed in the next major version.")}}var h,j,k,l,o,p,q,s=(""===(h=d.id)&&(d.id=(j=e&&e.id||O.id+D++,null!==document.getElementById(j)&&(j+=D++),h=j),E=(e||{}).log,g(h,"Added missing iframe ID: "+h+" ("+d.src+")")),h);s in M&&"iFrameResizer"in d?i(s,"Ignored iFrame, already setup."):(p=(p=e)||{},M[s]={firstRun:!0,iframe:d,remoteHost:d.src.split("/").slice(0,3).join("/")},function(a){if("object"!=typeof a)throw new TypeError("Options is not an object")}(p),Object.keys(p).forEach(f,p),function(a){for(var b in O)Object.prototype.hasOwnProperty.call(O,b)&&(M[s][b]=Object.prototype.hasOwnProperty.call(a,b)?a[b]:O[b])}(p),M[s]&&(M[s].targetOrigin=!0===M[s].checkOrigin?""===(q=M[s].remoteHost)||"file://"===q?"*":q:"*"),function(){switch(g(s,"IFrame scrolling "+(M[s]&&M[s].scrolling?"enabled":"disabled")+" for "+s),d.style.overflow=!1===(M[s]&&M[s].scrolling)?"hidden":"auto",M[s]&&M[s].scrolling){case"omit":break;case!0:d.scrolling="yes";break;case!1:d.scrolling="no";break;default:d.scrolling=M[s]?M[s].scrolling:"no"}}(),function(){function a(a){1/0!==M[s][a]&&0!==M[s][a]&&(d.style[a]=M[s][a]+"px",g(s,"Set "+a+" = "+M[s][a]+"px"))}function b(a){if(M[s]["min"+a]>M[s]["max"+a])throw new Error("Value for min"+a+" can not be greater than max"+a)}b("Height"),b("Width"),a("maxHeight"),a("minHeight"),a("maxWidth"),a("minWidth")}(),"number"!=typeof(M[s]&&M[s].bodyMargin)&&"0"!==(M[s]&&M[s].bodyMargin)||(M[s].bodyMarginV1=M[s].bodyMargin,M[s].bodyMargin=M[s].bodyMargin+"px"),k=v(s),(o=b())&&(l=o,d.parentNode&&new l(function(a){a.forEach(function(a){Array.prototype.slice.call(a.removedNodes).forEach(function(a){a===d&&n(d)})})}).observe(d.parentNode,{childList:!0})),c(d,"load",function(){var b,c;u("iFrame.onload",k,d,a,!0),b=M[s]&&M[s].firstRun,c=M[s]&&M[s].heightCalculationMethod in L,!b&&c&&r({iframe:d,height:0,width:0,type:"init"})}),u("init",k,d,a,!0),M[s]&&(M[s].iframe.iFrameResizer={close:n.bind(null,M[s].iframe),removeListeners:m.bind(null,M[s].iframe),resize:u.bind(null,"Window resize","resize",M[s].iframe),moveToAnchor:function(a){u("Move to anchor","moveToAnchor:"+a,M[s].iframe,s)},sendMessage:function(a){u("Send Message","message:"+(a=JSON.stringify(a)),M[s].iframe,s)}}))}function x(a,b){null===N&&(N=setTimeout(function(){N=null,a()},b))}function y(){"hidden"!==document.visibilityState&&(g("document","Trigger event: Visiblity change"),x(function(){z("Tab Visable","resize")},16))}function z(a,b){Object.keys(M).forEach(function(c){var d;M[d=c]&&"parent"===M[d].resizeFrom&&M[d].autoResize&&!M[d].firstRun&&u(a,b,document.getElementById(c),c)})}function A(){c(window,"message",k),c(window,"resize",function(){var a;g("window","Trigger event: "+(a="resize")),x(function(){z("Window "+a,"resize")},16)}),c(document,"visibilitychange",y),c(document,"-webkit-visibilitychange",y)}function B(){function b(a,b){b&&(!function(){if(!b.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==b.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+b.tagName+">")}(),w(b,a),c.push(b))}var c;return function(){var a,b=["moz","webkit","o","ms"];for(a=0;a<b.length&&!K;a+=1)K=window[b[a]+"RequestAnimationFrame"];K||g("setup","RequestAnimationFrame not supported")}(),A(),function(d,e){var f;switch(c=[],(f=d)&&f.enablePublicMethods&&i("enablePublicMethods option has been removed, public methods are now always available in the iFrame"),typeof e){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(e||"iframe"),b.bind(a,d));break;case"object":b(d,e);break;default:throw new TypeError("Unexpected data type ("+typeof e+")")}return c}}if("undefined"!=typeof window){var C,D=0,E=!1,F=!1,G="message".length,H="[iFrameSizer]",I=H.length,J=null,K=window.requestAnimationFrame,L={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},M={},N=null,O={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClosed:function(){},onInit:function(){},onMessage:function(){i("onMessage function not defined")},onResized:function(){},onScroll:function(){return!0}},P={};window.jQuery&&((C=window.jQuery).fn?C.fn.iFrameResize||(C.fn.iFrameResize=function(a){return this.filter("iframe").each(function(b,c){w(c,a)}).end()}):h("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof define&&define.amd?define("iFrameResize",[],B):"object"==typeof module&&"object"==typeof module.exports&&(module.exports=B()),window.iFrameResize=window.iFrameResize||B()}}();var _extends=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])}return a},_createClass=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();Array.prototype.forEach||(Array.prototype.forEach=function(a){if(void 0===this||null===this||"function"!=typeof a)throw new TypeError;for(var b=Object(this),c=b.length>>>0,d=arguments.length>=2?arguments[1]:void 0,e=0;c>e;e++)e in b&&a.call(d,b[e],e,b)}),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){if(null===this)throw new TypeError(" this is null or not defined");if("function"!=typeof a)throw new TypeError(a+" is not a function");for(var c=Object(this),d=c.length>>>0,e=0;d>e;e++)e in c&&a.call(b,c[e],e,c)}),function(a,b){function c(a){var c=b[a];b[a]=function(a){return e(c(a))}}function d(b,c,d){return(d=this).attachEvent("on"+b,function(b){b=b||a.event,b.preventDefault=b.preventDefault||function(){b.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){b.cancelBubble=!0},c.call(d,b)})}function e(a,b){if(b=a.length)for(;b--;)a[b].addEventListener=d;else a.addEventListener=d;return a}a.addEventListener||(e([b,a]),"Element"in a?a.Element.prototype.addEventListener=d:(b.attachEvent("onreadystatechange",function(){e(b.all)}),c("getElementsByTagName"),c("getElementById"),c("createElement"),e(b.all)))}(window,document),Array.prototype.find||(Array.prototype.find=function(a){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var b,c=Object(this),d=c.length>>>0,e=arguments[1],f=0;d>f;f++)if(b=c[f],a.call(e,b,f,c))return b}),String.prototype.endsWith||(String.prototype.endsWith=function(a,b){return(void 0===b||b>this.length)&&(b=this.length),this.substring(b-a.length,b)===a}),String.prototype.startsWith||(String.prototype.startsWith=function(a,b){return this.substr(!b||0>b?0:+b,a.length)===a}),function(a){var b=function(b,c){var d="1.82.3",e=function(){var b=!1;return function(a){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))&&(b=!0)}(navigator.userAgent||navigator.vendor||a.opera),b},f=function(){var a=void 0;if(/Edge\/\d./i.test(navigator.userAgent))return 12;if("Microsoft Internet Explorer"===navigator.appName)return a=navigator.userAgent.toLowerCase(),-1!==a.indexOf("msie")?parseInt(a.split("msie")[1],10):!1;if("Netscape"===navigator.appName){var b=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})");return a=navigator.userAgent,null!==b.exec(a)?11:!1}return!1},g=function(){return/Safari\/\d./i.test(navigator.userAgent)?!0:!1},h=function(a){var b=void 0;b=a>=0?Math.PI*a/180:Math.PI*(360+a)/180;var c=Math.cos(b),d=Math.sin(b);return"progid:DXImageTransform.Microsoft.Matrix(M11="+c+",M12="+-d+",M21="+d+",M22="+c+",SizingMethod='auto expand')"},i=function(a){var b=a.split("?");return"undefined"!=typeof b[1]?b[1].split("#")[0]:void 0},j=function(a,b){var c=i(b);if(!c)return void 0;for(var d=c.split("&"),e=0;e<d.length;e++){var f=d[e].split(/=(.+)/);if(f[0]===a)return f[1]}},k=function(a){var b=document.getElementById("dtbot-script").getAttribute("src");return a?j(a,b):b.split("?")[1]},l=function(){var a=document.getElementById("dtbot-script").getAttribute("src");return a.split("/dtbot.js")[0]},m=function(a,b){var c=/^#[0-9A-F]{6}$/i.test("#"+a);return c?"#"+a:b},n=function(a){var b=document.getElementsByTagName("head")[0],c=document.createElement("style");c.setAttribute("type","text/css"),c.styleSheet?c.styleSheet.cssText=a:c.appendChild(document.createTextNode(a)),b.appendChild(c)},o=function(a,b){var c=document.querySelector("html"),d=document.querySelector("body");a?(c.className=b.html+" block-overflow",d.className=b.body+" block-overflow"):(c.className=b.html,d.className=b.body)},p=function(){console.error("Local Storage => Não suportado")},q=function G(a){return _classCallCheck(this,G),this.element=document.createElement("button"),this.element.setAttribute("class","dt-closebutton"),this.element.innerHTML="&times;",this.element.style.width="25px",this.element.style.height="25px",this.element.style.textAlign="center",this.element.style.fontSize="13px",this.element.style.borderRadius="100%",this.element.style.border="2px solid #ffffff",this.element.style.fontFamily="Arial",this.element.style.zIndex="9999999999999",this.element.style.position="fixed",this.element.style.cursor="pointer",this.element.style.padding="0px",this.element.style.outline="0",this.element.style.color=m(k("textcolor"),"#ffffff"),this.element.style.backgroundColor=m(k("bgcolor"),"#735066"),this.element.addEventListener("click",a),this.element},r=function(){function h(){_classCallCheck(this,h),this.loaded=!1,this.botopenned=j("botopenned",a.location.href)||j("botopened",a.location.href),this.isMobile=e(),this.sizeWidth=!0,this.login=!1,this.fakebot=Boolean(j("fakebot",a.location.href)),this.fakebot?this.storageType="sessionStorage":this.storageType="localStorage",this.isMobile&&this.iOSCreation()}return _createClass(h,[{key:"iOSCreation",value:function(){this.defaultClasses={body:document.body.className,html:document.querySelector("html").className},n("\n                    html.block-overflow, body.block-overflow{ \n                    position:relative;\n                    height:100%;\n                    overflow:hidden;\n                }\n                "),this._onShow=function(){o(!0,this.defaultClasses)},this._onHide=function(){o(!1,this.defaultClasses)}}},{key:"loadBegin",value:function(){}},{key:"loadComplete",value:function(){}},{key:"_loadComplete",value:function(){}},{key:"onStart",value:function(){}},{key:"onShow",value:function(){}},{key:"onHide",value:function(){}},{key:"onLogin",value:function(){}},{key:"_onLogin",value:function(){}},{key:"_onShow",value:function(){}},{key:"_onHide",value:function(){}},{key:"fillSurvey",value:function(a){return a}},{key:"saveSession",value:function(b){this.login=!0,a.localStorage?(a[this.storageType]["dt.session.id_"+this.token]=b,a[this.storageType]["dt.session.time_"+this.token]=new Date):p()}},{key:"updateSession",value:function(b){a.localStorage?(a[this.storageType]["dt.session.time_"+this.token]=new Date,a[this.storageType]["dt.session.history_"+this.token]=b):p()}},{key:"saveLastSearch",value:function(b){a.localStorage?a[this.storageType]["dt.session.last_search_"+this.token]=b:p()}},{key:"saveSameAnswers",value:function(b){a.localStorage?a[this.storageType]["dt.session.same_answers_"+this.token]=b:p()}},{key:"saveErrors",value:function(b){a.localStorage?a[this.storageType]["dt.session.errors_"+this.token]=b:p()}},{key:"removeLastSearch",value:function(){a.localStorage?a[this.storageType].removeItem("dt.session.last_search_"+this.token):p()}},{key:"removeSameAnswers",value:function(){a.localStorage?a[this.storageType].removeItem("dt.session.same_answers_"+this.token):p()}},{key:"removeErrors",value:function(){a.localStorage?a[this.storageType].removeItem("dt.session.errors_"+this.token):p()}},{key:"loadSession",value:function(){return a.localStorage?{id:a[this.storageType]["dt.session.id_"+this.token],time:a[this.storageType]["dt.session.time_"+this.token]}:void 0}},{key:"surveysUpdate",value:function(b){a.localStorage?a[this.storageType]["dt.session.surveys_"+this.token]=b:p()}},{key:"getHistory",value:function(){if(a.localStorage){var b=a[this.storageType]["dt.session.history_"+this.token];this.iframe.contentWindow.postMessage("[History]"+b,"*")}else p()}},{key:"getLastSearch",value:function(){if(a.localStorage){var b=a[this.storageType]["dt.session.last_search_"+this.token];this.iframe.contentWindow.postMessage("[LastSearch]"+b,"*")}else p()}},{key:"getSameAnswers",value:function(){if(a.localStorage){var b=a[this.storageType]["dt.session.same_answers_"+this.token];this.iframe.contentWindow.postMessage("[SameAnswers]"+b,"*")}else p()}},{key:"getErrors",value:function(){if(a.localStorage){var b=a[this.storageType]["dt.session.errors_"+this.token];this.iframe.contentWindow.postMessage("[Errors]"+b,"*")}else p()}},{key:"getQuickAnswers",value:function(){if(a.localStorage){var b=a[this.storageType]["dt.session.quick_answers_"+this.token];this.iframe.contentWindow.postMessage("[QuickAnswers]"+b,"*")}else p()}},{key:"removeQuickAnswers",value:function(){a.localStorage?a[this.storageType].removeItem("dt.session.quick_answers_"+this.token):p()}},{key:"saveQuickAnswers",value:function(b){a.localStorage?a[this.storageType]["dt.session.quick_answers_"+this.token]=b:p()}},{key:"verifyActiveBotTrigger",value:function(b){var c=function(b,c){var d={1:function(){return a.location.href===c},2:function(){return a.location.href.startsWith(c)},3:function(){return a.location.href.endsWith(c)},4:function(){return-1!==a.location.href.indexOf(c)}};return d[b]()},d=b.find(function(a){return a.activeBotUrls.find(function(b){var d=c(b.urlComparator,b.url);return d&&(a.fillSurvey=b.fillSurvey),d})}),e=this.getActiveBots(),f=void 0!==e&&e.length>0&&d&&e.find(function(a){return a.id===d.id});d&&!f&&this._fillSurvey(d)}},{key:"triggerActiveBot",value:function(b){var c=this,d="";Object.keys(b.queries).map(function(a){return d=d+"&"+a+"="+b.queries[a]}),this.iframe.contentWindow.postMessage("[ActiveBot]"+b.initializerArticleQuestion+"&queries="+d,"*"),setTimeout(function(){"hidden"===c.iframe.style.visibility&&c.toggle(),a.BOTFLOATER&&a.BOTFLOATER.hide(),c.saveActiveBot(b)},b.timerToExecution?1e3*b.timerToExecution:0)}},{key:"_fillSurvey",value:function(a){var b={};a.initialSurveyFields.forEach(function(a){b[a.field]=a.value}),a.queries=a.fillSurvey?this.fillSurvey(_extends({},b)):b,this.triggerActiveBot(a)}},{key:"getSurveys",value:function(){if(a.localStorage){var b=a[this.storageType]["dt.session.surveys_"+this.token];this.iframe.contentWindow.postMessage("[Surveys]"+b,"*")}else p()}},{key:"getUserData",value:function(){if(a.localStorage){var b=a[this.storageType]["dt.session.userdata_"+this.token];this.iframe.contentWindow.postMessage("[UserData]"+b,"*")}else p()}},{key:"saveUserData",value:function(b){a.localStorage?a[this.storageType]["dt.session.userdata_"+this.token]=b:p()}},{key:"saveActiveBot",value:function(b){if(a.localStorage){var c=this.getActiveBots();c.push(b),a[this.storageType]["hi.active_bot_"+this.token]=JSON.stringify(c)}else p()}},{key:"getActiveBots",value:function(){if(a.localStorage){var b=a[this.storageType]["hi.active_bot_"+this.token];return void 0!==b?JSON.parse(b):[]}p()}},{key:"getWrapper",value:function(){var a=document.getElementById("dtbot-script");return"head"===a.parentNode.nodeName.toLowerCase()?document.body:a.parentNode||document.body}},{key:"redirect",value:function(b,c){c?a.location.href=b.message.redirect:a.opener.location.href=b.message.redirect}},{key:"create",value:function(e,h){var i=this,j=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!a.MSStream,m=k("token");if(i.loadBegin(),i.token=e,i.widget=h.widget||!1,i.automatic=h.automatic||!1,i.automaticBg=h.automaticBg||!1,i.integrationFinished=!1,i.wrapper=i.getWrapper(),i.wrapper.insertAdjacentHTML("afterbegin",'<iframe id="dtbot-iframe" scrolling="no" frameBorder="0"></iframe>'),i.iframe=document.getElementById("dtbot-iframe"),i.iframe.style.border=0,i.iframe.style.display="block",i.iframe.setAttribute("style","border:0 !important;"),i.iframe.setAttribute("overflow","hidden"),i.iframe.setAttribute("allow","microphone"),i.iframe.style.boxShadow="0px 0px 3px #D0D0D0",i.iframe.style.zIndex="900",i.iframe.style.maxHeight="100%",i.iframe.style.maxWidth="100%",i.iframe.style.willChange="left, top",i.initialPosition=h.initialPosition?h.initialPosition.toLowerCase():void 0,i.widget&&(i.iframe.style.position="fixed",i.hide()),i.top=h.top,i.left=h.left,i.top&&(i.iframe.style.top=i.top+"px"),i.left&&(i.iframe.style.left=i.left+"px"),i.isMobile&&(i.posX="0px",i.iframe.style.position="fixed",i.iframe.style.top="0px",i.widget?i.iframe.style.left="-1000px":i.iframe.style.left="0px",i.iframe.style.bottom="0px",i.iframe.style.width="100%",i.sizeWidth=!1),i.querys="?"+k(),(this.fakebot===!0||"true"===this.fakebot)&&(i.dttoken="DT-Fenix-Token "+a.localStorage["dt.admin.token"],i.querys+="&dttoken="+i.dttoken),m!==e){var n=i.querys.split("token=")[1].split(m)[1];i.querys="?token="+e+"&"+n}if(i.session=i.loadSession(),"undefined"!=typeof i.session&&"undefined"!=typeof i.session.id){var o=new Date,p=Math.abs(o-new Date(i.session.time)),q=Math.floor(p/1e3/60);10>q?i.querys+="&session="+i.session.id:i.resetSession()}i.iframe.src=""!==d&&-1===d.indexOf(/@{2}version/g)?l()+"/"+d+"/index.html#!/"+i.querys:l()+"/../index.html#!/"+i.querys,i.iframe.setAttribute("allowFullScreen",!0),i.iframe.setAttribute("webkitAllowFullScreen",!0),i.iframe.setAttribute("mozAllowFullScreen",!0);var r=function(c){if(i.widget&&!i.isMobile){var d=Number(c.width),e=a.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=i.iframe.offsetLeft,j=h+d,k=e-d-10;
j>=e&&k>0&&b.animateCSS(i.iframe,"left","px",h,k,0)}var l=function(){if("transitionend"===c.type||"mutationObserver"===c.type||"interval"===c.type){var b=Number(c.width),d=Number(c.height);a.resizeTo(b+16,d+67),a.focus()}};i.isMobile||(f()||g()?-1!==a.location.href.indexOf("directtalk")&&l():l())},s=function(b){var c=b.message.action,d={autofill:function(){i.autofill(b.message.data)},loaded:function(){i.isMobile&&!j&&i.iframe.contentWindow.postMessage("$resizeFromParent:"+document.documentElement.clientHeight,"*"),D(),i.loaded=!0,i.loadComplete(),i._loadComplete()},close:function(){i.hide(),i.reset(),a.BOTFLOATER&&a.BOTFLOATER.show()},minimize:function(){i.hide(),a.BOTFLOATER&&a.BOTFLOATER.show()},openimage:function(){i.viewer?i.viewer.changeImage(b.message.url):i.viewer=w(i,b.message.url)},dragstart:function(){B(b.message.px,b.message.py)},dragging:function(){C(b.message.px,b.message.py)},dragend:function(){},sessionGenerated:function(){i.saveSession(b.message.session),i._onLogin(),i.onLogin()},sessionUpdate:function(){i.updateSession(b.message.histories)},saveLastSearch:function(){i.saveLastSearch(b.message.search)},saveSameAnswers:function(){i.saveSameAnswers(b.message.sameAnswers)},saveQuickAnswers:function(){i.saveQuickAnswers(b.message.quickAnswers)},removeLastSearch:function(){i.removeLastSearch()},removeQuickAnswers:function(){i.removeQuickAnswers()},removeSameAnswers:function(){i.removeSameAnswers()},saveErrors:function(){i.saveErrors(b.message.errors)},removeErrors:function(){i.removeErrors()},getHistory:function(){i.getHistory()},getLastSearch:function(){i.getLastSearch()},getSameAnswers:function(){i.getSameAnswers()},getQuickAnswers:function(){i.getQuickAnswers()},getErrors:function(){i.getErrors()},getSurveys:function(){i.getSurveys()},surveysUpdate:function(){i.surveysUpdate(b.message.surveys)},saveUserData:function(){i.saveUserData(b.message.data)},getUserData:function(){i.getUserData()},redirect:function(){i.redirect(b,!0)},redirectOpener:function(){i.redirect(b,!1)},reset:function(){i.resetSession(b.message.data)},scroll:function(){i.scroll(b.message.data)},checkActiveBot:function(){i.widget&&!i.isMobile&&i.verifyActiveBotTrigger(b.message.data)},childReady:function(){i.iframe.contentWindow.postMessage("$ready","*")},toggleHiBot:function(){i.integrationFinished=!0,i.widget&&"visible"!==i.iframe.style.visibility&&(i.toggle(),a.BOTFLOATER&&a.BOTFLOATER.toggle())},adjustPosition:function(){i.adjustPosition()}};d[c]()};c({log:!1,checkOrigin:!1,heightCalculationMethod:"bodyScroll",widthCalculationMethod:"taggedElement",sizeWidth:i.sizeWidth,onResized:r,onMessage:s,resizedCallback:r,messageCallback:s},"#dtbot-iframe")}},{key:"reset",value:function(){this.iframe.contentWindow.postMessage("$reset","*")}},{key:"startWithToken",value:function(a,b){this.iframe.contentWindow.postMessage("$startWithToken"+a+"&idd="+b,"*")}},{key:"changeDepartment",value:function(b,c){if(b.token!==this.token){this.iframe.iFrameResizer.close(),this.resetSession();var d=document.currentScript||document.querySelector("#dtbot-script"),e=d.src,f=document.createElement("script"),g=document.querySelector(".dt-BOTfloater");f.id="dtbot-script",f.src=e.replace(this.token,b.token),d.parentNode.removeChild(d),g&&g.parentNode.removeChild(g),delete a.DTBOT,delete a.HiBot,f.onload=function(){c&&c(a.DTBOT)},document.body.appendChild(f)}else c&&c(a.DTBOT)}},{key:"resetSession",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.login=!1,a[this.storageType].removeItem("dt.session.id_"+this.token),a[this.storageType].removeItem("dt.session.time_"+this.token),a[this.storageType].removeItem("dt.session.history_"+this.token),a[this.storageType].removeItem("dt.session.last_search_"+this.token),a[this.storageType].removeItem("dt.session.surveys_"+this.token),a[this.storageType].removeItem("dt.session.userdata_"+this.token),a[this.storageType].removeItem("hi.active_bot_"+this.token),a[this.storageType].removeItem("dt.session.same_answers_"+this.token),b&&b.reinitialize&&this.iframe.contentWindow.postMessage("$triggerReinitialize","*")}},{key:"search",value:function(a){this.login?this.iframe.contentWindow.postMessage("[$search]"+a,"*"):this._onLogin=function(){this.iframe.contentWindow.postMessage("[$search]"+a,"*")}}},{key:"hide",value:function(){this.onHide(),this._onHide(),this.iframe.blur(),this.posX=this.iframe.style.left,this.iframe.style.left="-1000px",this.iframe.style.visibility="hidden",this.iframe.style.opacity=0}},{key:"show",value:function(){this.onShow(),this._onShow(),this.iframe.contentWindow.postMessage("[$botOpened]","*"),this.iframe.style.left=this.posX,this.iframe.style.visibility="visible",this.iframe.style.opacity=1,this.adjustPosition()}},{key:"fadeIn",value:function(){var a=this;if(f()&&8===f())return void this.show();var c=this.iframe;this.iframe.style.visibility="visible",this.iframe.style.left=this.posX,setTimeout(function(){a.adjustPosition(),b.animateCSS(c,"opacity","",0,1,500,b.easeInOutSine),a.onShow(),a._onShow()},200)}},{key:"fadeOut",value:function(){if(f()&&8===f())return void this.hide();var a=this.iframe;this.posX=this.iframe.style.left,a.style.visibility="visible",b.animateCSS(a,"opacity","",1,0,500,b.easeInOutSine,function(){a.style.visibility="hidden",a.style.left="-1000px"}),this.onHide(),this._onHide()}},{key:"toggle",value:function(){"visible"===this.iframe.style.visibility?this.fadeOut():"undefined"!=typeof this.left&&"undefined"!=typeof this.top||this.isMobile?(this.iframe.contentWindow.postMessage("[$botOpened]","*"),this.fadeIn()):(this.iframe.contentWindow.postMessage("[$botOpened]","*"),this.fadeIn())}},{key:"adjustPosition",value:function(){var a={left:v,right:u,bottom:u,bottomright:u,bottomleft:v};a[this.initialPosition]?a[this.initialPosition](this.iframe):a.right(this.iframe)}},{key:"start",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!1;this.startQuerys=b,this.loaded?(""!==b&&"undefined"!=typeof b&&this.iframe.contentWindow.postMessage("[InitData]"+b,"*"),c||(a.BOTFLOATER&&a.BOTFLOATER.hide(),this.toggle()),this.onStart()):this._loadComplete=function(){this.start(this.startQuerys,c)}}},{key:"extendObject",value:function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}},{key:"autofill",value:function(b){var c={},d={};b.forEach(function(b){c[b]=k(b),d[b]=j(b,a.location.href),"undefined"==typeof c[b]&&(c[b]=d[b])});var e=this.extendObject(d,c),f=[];for(var g in e)e.hasOwnProperty(g)&&"undefined"!=typeof e[g]&&f.push(decodeURIComponent(g)+"="+decodeURIComponent(e[g]));var h=f.join("&");this.iframe.contentWindow.postMessage("[Autofill]"+h,"*")}},{key:"scroll",value:function(b){var c={bottom:a.innerHeight};setTimeout(function(){isNaN(b)?a.scrollTo(0,c[b]):a.scrollTo(0,b)},200)}}]),h}(),s=function(){function b(a,c){_classCallCheck(this,b),this.DTBOT=a,this.pos=c,this.text=null,this.bgcolor=null,this.color=null,this.closebutton=null,this.element=null}return _createClass(b,[{key:"create",value:function(){var b=this;this.displayText=k("text")&&decodeURIComponent(k("text")).replace(/undefined/gi,"Alguma dúvida?")||"Alguma dúvida?",this.widgetType=k("widgetType")&&k("widgetType").replace(/undefined/gi,"baloon")||"baloon",this.icon=k("iconId"),this.textColor=k("textcolor"),this.bgColor=k("bgcolor"),this.element=document.createElement("div"),this.element.setAttribute("class","dt-BOTfloater"),this.element.setAttribute("style",JSON.stringify(this.generateStyle(this.widgetType,this.textColor,this.bgColor)).replace(/[{}]/g,"").replace(/,/g,";").replace(/'|"/g,"")),this.element.addEventListener("click",function(){b.element&&(b.DTBOT.adjustPosition(),b.DTBOT.toggle(),b.toggle())}),document.body.appendChild(this.element);var c="baloon"===this.widgetType,d="circle"===this.widgetType;if(c){this.element.innerHTML=this.displayText;var e="";e=document.createElement("div"),e.className="balloon-arrow",e.style.position="absolute",e.style.borderWidth="18px 11px 11px",e.style.borderStyle="solid",e.style.borderImage="initial",e.style.bottom="-26px",e.style.right="33px",e.style.borderColor=m(this.bgColor,"rgba(0,0,0,.85)")+" transparent transparent",this.element.appendChild(e)}if(!c){var f=a.location.href,g=-1!==f.indexOf("localhost"),h=-1!==f.indexOf(".qa."),i=-1!==f.indexOf("hmg"),j="directtalk.com.br/1.0/api/file/public/FILE_ID/content-inline";j=g||h?"//files.qa."+j:i?"//files-hmg."+j:"//files."+j;var l="",n=document.createElement("span");n.innerHTML=this.displayText;var o=this.icon&&""!==this.icon.trim();o?(l=document.createElement("img"),l.src=j.replace(/FILE_ID/gi,this.icon),d?(l.style.width="44px",l.style.height="44px"):(l.style.width="32px",l.style.height="32px",l.style.marginRight="10px",l.style["float"]="left")):d?(l=document.createElement("i"),l.innerHTML="?",l.style.color=m(this.textColor,"#FFF"),l.style.fontSize="44px",l.style.fontStyle="normal",l.style.textAlign="center",l.style.fontWeight="bolder",l.style.display="block",l.style.margin="0 auto"):this.element.style.textAlign="center",d?(n.style.position="absolute",n.style.width="150px",n.style.bottom="-40px",n.style.left="50%",n.style.marginLeft="-75px",n.style.backgroundColor=m(this.bgColor,"rgba(0,0,0,.85)"),n.style.color=m(this.textColor,"#FFF"),n.style.textAlign="center",n.style.borderRadius="5px",n.style.padding="10px 5px",n.style.boxShadow="0 4px 9px rgba(0,0,0,.27)",n.style.boxSizing="border-box",n.style.lineHeight="1"):n.style.lineHeight="32px",this.element.appendChild(n),(o||d)&&this.element.appendChild(l)}this.createByPosition(this.pos)(),this.closebutton=this.createCloseButton(),this.element.appendChild(this.closebutton)}},{key:"createByPosition",value:function(a){var b=this;switch(a){case"right":return function(){b.element.style.top="180px","circle"!==b.widgetType?(b.element.style.right="-"+(b.element.offsetWidth/2-b.element.offsetHeight/2)+"px",b.element.style.webkitTransform="rotate(-90deg)",b.element.style.MozTransform="rotate(-90deg)",b.element.style.msTransform="rotate(-90deg)",b.element.style.transform="rotate(-90deg)",f()<=8&&f()&&(b.element.style.msFilter=h(270),b.element.style.filter=h(270),b.element.style.right=b.element.offsetWidth-b.element.offsetHeight+"px")):b.element.style.right="40px"};case"left":return function(){b.element.style.top="180px","circle"!==b.widgetType?(b.element.style.left="-"+(b.element.offsetWidth/2-b.element.offsetHeight/2)+"px",b.element.style.webkitTransform="rotate(90deg)",b.element.style.MozTransform="rotate(90deg)",b.element.style.msTransform="rotate(90deg)",b.element.style.transform="rotate(90deg)",f()<=8&&f()&&(b.element.style.msFilter=h(90),b.element.style.filter=h(90),b.element.style.left="0")):b.element.style.left="40px"};case"bottomleft":return function(){b.element.style.bottom="circle"===b.widgetType?"60px":"0px",b.element.style.left="60px"};default:return function(){b.element.style.bottom="circle"===b.widgetType?"60px":"0px",b.element.style.right="60px"}}}},{key:"createCloseButton",value:function(){var a=this,b=new q(function(){document.body.removeChild(a.element),a.element=void 0}),c="right"===this.pos||"left"===this.pos?"right":"left";switch(b.style.position="absolute",this.widgetType){case"circle":b.style.top="-3px",b.style[c]="-9px";break;case"oval":b.style.top="5px",b.style[c]="-5px";break;default:b.style.top="-12.5px",b.style[c]="-12.5px"}return b}},{key:"generateStyle",value:function(a,b,c){var d={position:"fixed","z-index":"999999999",cursor:"pointer","box-sizing":"border-box","font-family":"Arial","font-size":"14px",color:m(b,"#FFF"),"background-color":m(c,"#735066"),"box-shadow":"0px 2px 5px #D0D0D0",display:"block"};switch(a){case"baloon":return _extends(d,{width:"220px",padding:"25px","border-radius":"8px"});case"circle":return _extends(d,{width:"75px",height:"75px","border-radius":"75px",padding:"15px"});case"box":return _extends(d,{width:"220px",padding:"15px"});case"oval":return _extends(d,{width:"200px",padding:"25px","border-radius":"100%"});default:return d}}},{key:"hide",value:function(){this.element.style.display="none"}},{key:"show",value:function(){this.element.style.display="block"}},{key:"toggle",value:function(){"block"===this.element.style.display?this.hide():this.show()}}]),b}(),t=function H(a){_classCallCheck(this,H);var b=this;this.DTBOT=a,this.launchers=document.querySelectorAll(".launcher")||[],this.prepareLaunchers=function(){for(var a=0;a<this.launchers.length;a++)this.launchers[a].addEventListener("click",function(){b.DTBOT.start()},!0)},this.prepareLaunchers()},u=function(c){var d=Number(c.style.left.replace("px","")),e=a.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=e-Number(c.style.width.replace("px",""))-10;0>=f&&(f=10),b.animateCSS(c,"left","px",d,f,0)},v=function(a){var c=Number(a.style.left.replace("px",""));b.animateCSS(a,"left","px",c,10,0)},w=function(c,d){function e(){var b=a.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=b/2-g.offsetWidth/2;0>=c&&(c=0),h(c,20)}var f=document.createElement("div");f=document.body.appendChild(f),f.className="bot-openviewer",f.style.padding="10px 0",f.style.position="fixed",f.style.maxWidth="720px",f.style.height="auto",f.style.zIndex="999999";var g=x(f,d),h=function(a,c){b.animateCSS(f,"left","px",i().left,a,100,b.easeOutCubic),b.animateCSS(f,"top","px",i().top,c,100,b.easeOutCubic)},i=function(){return{left:Number(f.style.left.replace("px","")),top:Number(f.style.top.replace("px",""))}};e(),b.animateCSS(f,"opacity","",0,1,300,b.easeInQuart);var j=void 0;a.addEventListener("resize",function(){j&&clearTimeout(j),j=setTimeout(e,300)});var k=new q(function(){f.parentNode.removeChild(f)});return k.style.marginTop="-12px",k.style.marginLeft="-15px",k.style.position="absolute",f.appendChild(k),f.changeImage=function(a){g.src=a,document.body.appendChild(f),e()},f},x=function(a,b){var c=document.createElement("img");return c.src=b,c.style.maxWidth="100%",c.style.height="auto",c.style.boxShadow="0 4px 12px rgba(0,0,0,0.3)",a.appendChild(c),c},y=void 0,z={x:0,y:0},A={x:0,y:0},B=function(a,b){z.x=a,z.y=b,A.x=Number(y.style.left.replace("px","")),A.y=Number(y.style.top.replace("px",""))},C=function(a,b){A.x=A.x+a-z.x,A.y=A.y+b-z.y,A.x>0&&(y.style.left=A.x+"px"),A.y>0&&(y.style.top=A.y+"px")},D=function(){if(a.DTBOT.widget&&!a.DTBOT.isMobile&&a.BOTFLOATER&&a.BOTFLOATER.create(),a.DTBOT.botopenned&&(a.BOTFLOATER&&a.BOTFLOATER.hide(),a.DTBOT.toggle()),a.DTBOT.automatic){var b=JSON.parse(decodeURIComponent(k("initParams"))),c=Object.keys(b).reduce(function(a,c){return a+"&"+c+"="+b[c]},"");a.DTBOT.start(c,a.DTBOT.botopenned||"true"===a.DTBOT.automaticBg)}},E=function(){var b=k("token"),c={initialPosition:k("from"),token:k("token"),widget:k("widget"),top:k("top"),left:k("left"),tab:k("tab"),automatic:k("automatic"),automaticBg:k("automaticBg")};a._launchers=new t(a.DTBOT),"undefined"==typeof c.tab||a.DTBOT.isMobile||(a.BOTFLOATER=new s(a.DTBOT,c.initialPosition)),a.addEventListener("message",function(b){"dtbot.start"===b.data&&a.DTBOT.start()},!1),a.DTBOT.create(b,c),y=a.DTBOT.iframe},F=function(){var b=document.getElementById("dtbot-script");"head"===b.parentNode.nodeName.toLowerCase()?["ready","complete","loaded"].includes(document.readyState)?E():a.addEventListener("load",function(){E()},!0):E()};a.DTBOT=a.HiBot=new r,F()};"function"==typeof define&&define.amd&&"function"==typeof require?require(["TinyAnimate","iFrameResize"],b,function(a){console.log(a)}):b(TinyAnimate,iFrameResize)}(window);