diff --git a/public/assets/chat/chat.coffee b/public/assets/chat/chat.coffee index 798d39f4c..124114c5d 100644 --- a/public/assets/chat/chat.coffee +++ b/public/assets/chat/chat.coffee @@ -130,7 +130,7 @@ do($ = window.jQuery, window) -> close: -> remainerHeight = @el.height() - @el.find('.zammad-chat-header').outerHeight() - @el.animate { bottom: -remainerHeight }, 500, onCloseAnimationEnd + @el.animate { bottom: -remainerHeight }, 500, @onCloseAnimationEnd onCloseAnimationEnd: => @el.removeClass('zammad-chat-is-open') @@ -143,7 +143,7 @@ do($ = window.jQuery, window) -> show: -> @el.addClass('zammad-chat-is-visible') - remainerHeight = @el.height() - @el.find('.zammad-chat-header').outerHeight() + remainerHeight = @el.outerHeight() - @el.find('.zammad-chat-header').outerHeight() @el.css 'bottom', -remainerHeight diff --git a/public/assets/chat/chat.js b/public/assets/chat/chat.js index 3c194037d..672659fce 100644 --- a/public/assets/chat/chat.js +++ b/public/assets/chat/chat.js @@ -222,7 +222,7 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); remainerHeight = this.el.height() - this.el.find('.zammad-chat-header').outerHeight(); return this.el.animate({ bottom: -remainerHeight - }, 500, onCloseAnimationEnd); + }, 500, this.onCloseAnimationEnd); }; ZammadChat.prototype.onCloseAnimationEnd = function() { @@ -238,7 +238,8 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); ZammadChat.prototype.show = function() { var remainerHeight; this.el.addClass('zammad-chat-is-visible'); - remainerHeight = this.el.height() - this.el.find('.zammad-chat-header').outerHeight(); + console.log(this.el.outerHeight(), this.el.find('.zammad-chat-header').outerHeight()); + remainerHeight = this.el.outerHeight() - this.el.find('.zammad-chat-header').outerHeight(); return this.el.css('bottom', -remainerHeight); }; diff --git a/public/assets/chat/chat.min.js b/public/assets/chat/chat.min.js index 85739d6d4..51d971908 100644 --- a/public/assets/chat/chat.min.js +++ b/public/assets/chat/chat.min.js @@ -1 +1 @@ -window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.chat=function(t){t||(t={});var e,a=[],n=t.safe,s=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},s||(s=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){a.push('
\n
\n
\n Online\n \n \n \n \n
\n
\n \n \n Adam is helping you.\n \n
\n
\n \n Chat with us!\n
\n
\n
\n \n \n \n \n \n Connecting\n
\n
\n
\n \n \n
\n
')}).call(this)}.call(t),t.safe=n,t.escape=s,a.join("")};var bind=function(t,e){return function(){return t.apply(e,arguments)}};!function(t,e){var a;return a=function(){function a(e,a){this.setAgentOnlineState=bind(this.setAgentOnlineState,this),this.onConnectionEstablished=bind(this.onConnectionEstablished,this),this.onConnectionReestablished=bind(this.onConnectionReestablished,this),this.reconnect=bind(this.reconnect,this),this.onAgentTypingEnd=bind(this.onAgentTypingEnd,this),this.onAgentTypingStart=bind(this.onAgentTypingStart,this),this.onCloseAnimationEnd=bind(this.onCloseAnimationEnd,this),this.onOpenAnimationEnd=bind(this.onOpenAnimationEnd,this),this.toggle=bind(this.toggle,this),this.receiveMessage=bind(this.receiveMessage,this),this.onSubmit=bind(this.onSubmit,this),this.onTypingEnd=bind(this.onTypingEnd,this),this.onInput=bind(this.onInput,this),this.checkForEnter=bind(this.checkForEnter,this),this.options=t.extend({},this.defaults,a),this.el=t(this.view("chat")()),this.options.target.append(this.el),this.setAgentOnlineState(this.isOnline),this.options.show&&this.show(),this.el.find(".zammad-chat-header").click(this.toggle),this.el.find(".zammad-chat-controls").on("submit",this.onSubmit),this.el.find(".zammad-chat-input").on({keydown:this.checkForEnter,input:this.onInput}).autoGrow({extraLine:!1})}return a.prototype.defaults={invitationPhrase:"Chat with us!",agentPhrase:"%%agent%% is helping you",show:!0,target:t("body")},a.prototype.isOpen=!1,a.prototype.blinkOnlineInterval=null,a.prototype.stopBlinOnlineStateTimeout=null,a.prototype.showTimeEveryXMinutes=1,a.prototype.lastTimestamp=null,a.prototype.lastAddedType=null,a.prototype.inputTimeout=null,a.prototype.isTyping=!1,a.prototype.isOnline=!0,a.prototype.strings={Online:"Online",Offline:"Offline",Connecting:"Connecting","Connection re-established":"Connection re-established",Today:"Today"},a.prototype.T=function(t){return this.strings[t]},a.prototype.view=function(t){return e.zammadChatTemplates[t]},a.prototype.checkForEnter=function(t){return t.shiftKey||13!==t.keyCode?void 0:(t.preventDefault(),this.sendMessage())},a.prototype.onInput=function(){return this.el.find(".zammad-chat-message--unread").removeClass("zammad-chat-message--unread"),this.inputTimeout&&clearTimeout(this.inputTimeout),this.inputTimeout=setTimeout(this.onTypingEnd,5e3),this.isTyping?this.onTypingStart():void 0},a.prototype.onTypingStart=function(){return this.isTyping=!0},a.prototype.onTypingEnd=function(){return this.isTyping=!1},a.prototype.onSubmit=function(t){return t.preventDefault(),this.sendMessage()},a.prototype.sendMessage=function(){var t,e;return t=this.el.find(".zammad-chat-input").val(),t?(e=this.view("message")({message:t,from:"customer"}),this.maybeAddTimestamp(),this.el.find(".zammad-chat-message--typing").size()?(this.lastAddedType="typing-placeholder",this.el.find(".zammad-chat-message--typing").before(e)):(this.lastAddedType="message--customer",this.el.find(".zammad-chat-body").append(e)),this.el.find(".zammad-chat-input").val(""),this.scrollToBottom(),this.isTyping=!1):void 0},a.prototype.receiveMessage=function(t){var e,a;return this.onAgentTypingEnd(),this.maybeAddTimestamp(),this.lastAddedType="message--agent",a=null!=(e=document.hidden)?e:{" zammad-chat-message--unread":""},this.el.find(".zammad-chat-body").append(this.view("message")({message:t,from:"agent"})),this.scrollToBottom()},a.prototype.toggle=function(){return this.isOpen?this.close():this.open()},a.prototype.open=function(){return this.el.addClass("zammad-chat-is-open").animate({bottom:0},500,this.onOpenAnimationEnd)},a.prototype.onOpenAnimationEnd=function(){return this.isOpen=!0,setTimeout(this.onConnectionEstablished,1180),setTimeout(this.onAgentTypingStart,2e3),setTimeout(this.receiveMessage,5e3,"Hello! How can I help you?"),this.connect()},a.prototype.close=function(){var t;return t=this.el.height()-this.el.find(".zammad-chat-header").outerHeight(),this.el.animate({bottom:-t},500,onCloseAnimationEnd)},a.prototype.onCloseAnimationEnd=function(){return this.el.removeClass("zammad-chat-is-open"),this.disconnect(),this.isOpen=!1},a.prototype.hide=function(){return this.el.removeClass("zammad-chat-is-visible")},a.prototype.show=function(){var t;return this.el.addClass("zammad-chat-is-visible"),t=this.el.height()-this.el.find(".zammad-chat-header").outerHeight(),this.el.css("bottom",-t)},a.prototype.onAgentTypingStart=function(){return this.el.find(".zammad-chat-message--typing").size()?void 0:(this.maybeAddTimestamp(),this.el.find(".zammad-chat-body").append(this.view("typingIndicator")()),this.scrollToBottom())},a.prototype.onAgentTypingEnd=function(){return this.el.find(".zammad-chat-message--typing").remove()},a.prototype.maybeAddTimestamp=function(){var t,e,a;return a=Date.now(),!this.lastTimestamp||a-this.lastTimestamp>6e4*this.showTimeEveryXMinutes?(t=this.T("Today"),e=(new Date).toTimeString().substr(0,5),"timestamp"===this.lastAddedType?(this.updateLastTimestamp(t,e),this.lastTimestamp=a):(this.addStatus(t,e),this.lastTimestamp=a,this.lastAddedType="timestamp")):void 0},a.prototype.updateLastTimestamp=function(t,e){return this.el.find(".zammad-chat-body").find(".zammad-chat-status").last().replaceWith(this.view("status")({label:t,time:e}))},a.prototype.addStatus=function(t,e){return this.el.find(".zammad-chat-body").append(this.view("status")({label:t,time:e}))},a.prototype.scrollToBottom=function(){return this.el.find(".zammad-chat-body").scrollTop(t(".zammad-chat-body").prop("scrollHeight"))},a.prototype.connect=function(){},a.prototype.reconnect=function(){return this.lastAddedType="status",this.el.find(".zammad-chat-agent-status").attr("data-status","connecting").text(this.T("Connecting")),this.addStatus(this.T("Connection lost"))},a.prototype.onConnectionReestablished=function(){return this.lastAddedType="status",this.el.find(".zammad-chat-agent-status").attr("data-status","online").text(this.T("Online")),this.addStatus(this.T("Connection re-established"))},a.prototype.disconnect=function(){return this.el.find(".zammad-chat-loader").removeClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-welcome").removeClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-agent").addClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-agent-status").addClass("zammad-chat-is-hidden")},a.prototype.onConnectionEstablished=function(){return this.el.find(".zammad-chat-loader").addClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-welcome").addClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-agent").removeClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-agent-status").removeClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-input").focus()},a.prototype.setAgentOnlineState=function(t){return this.isOnline=t,this.el.find(".zammad-chat-agent-status").toggleClass("zammad-chat-is-online",t).text(t?this.T("Online"):this.T("Offline"))},a}(),t(document).ready(function(){return e.zammadChat=new a})}(window.jQuery,window),jQuery.fn.autoGrow=function(t){return this.each(function(){var e=jQuery.extend({extraLine:!0},t),a=function(t){return jQuery(t).after('
'),jQuery(t).next(".autogrow-textarea-mirror")[0]},n=function(t){i.innerHTML=String(t.value).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/ /g," ").replace(/\n/g,"
")+(e.extraLine?".
.":""),jQuery(t).height()!=jQuery(i).height()&&jQuery(t).height(jQuery(i).height())},s=function(){n(this)},i=a(this);i.style.display="none",i.style.wordWrap="break-word",i.style.whiteSpace="normal",i.style.padding=jQuery(this).css("paddingTop")+" "+jQuery(this).css("paddingRight")+" "+jQuery(this).css("paddingBottom")+" "+jQuery(this).css("paddingLeft"),i.style.width=jQuery(this).css("width"),i.style.fontFamily=jQuery(this).css("font-family"),i.style.fontSize=jQuery(this).css("font-size"),i.style.lineHeight=jQuery(this).css("line-height"),this.style.overflow="hidden",this.style.minHeight=this.rows+"em",this.onkeyup=s,n(this)})},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.message=function(t){t||(t={});var e,a=[],n=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?i(t):""},s=t.safe,i=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},i||(i=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){a.push('
\n '),a.push(this.message),a.push("\n
")}).call(this)}.call(t),t.safe=s,t.escape=i,a.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.status=function(t){t||(t={});var e,a=[],n=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?i(t):""},s=t.safe,i=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},i||(i=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){a.push('
'),a.push(n(this.label)),a.push(""),a.push(n(this.time)),a.push("
")}).call(this)}.call(t),t.safe=s,t.escape=i,a.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.typingIndicator=function(t){t||(t={});var e,a=[],n=t.safe,s=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},s||(s=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){a.push('
\n \n \n \n \n \n \n \n
')}).call(this)}.call(t),t.safe=n,t.escape=s,a.join("")}; \ No newline at end of file +window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.chat=function(t){t||(t={});var e,a=[],n=t.safe,s=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},s||(s=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){a.push('
\n
\n
\n Online\n \n \n \n \n
\n
\n \n \n Adam is helping you.\n \n
\n
\n \n Chat with us!\n
\n
\n
\n \n \n \n \n \n Connecting\n
\n
\n
\n \n \n
\n
')}).call(this)}.call(t),t.safe=n,t.escape=s,a.join("")};var bind=function(t,e){return function(){return t.apply(e,arguments)}};!function(t,e){var a;return a=function(){function a(e,a){this.setAgentOnlineState=bind(this.setAgentOnlineState,this),this.onConnectionEstablished=bind(this.onConnectionEstablished,this),this.onConnectionReestablished=bind(this.onConnectionReestablished,this),this.reconnect=bind(this.reconnect,this),this.onAgentTypingEnd=bind(this.onAgentTypingEnd,this),this.onAgentTypingStart=bind(this.onAgentTypingStart,this),this.onCloseAnimationEnd=bind(this.onCloseAnimationEnd,this),this.onOpenAnimationEnd=bind(this.onOpenAnimationEnd,this),this.toggle=bind(this.toggle,this),this.receiveMessage=bind(this.receiveMessage,this),this.onSubmit=bind(this.onSubmit,this),this.onTypingEnd=bind(this.onTypingEnd,this),this.onInput=bind(this.onInput,this),this.checkForEnter=bind(this.checkForEnter,this),this.options=t.extend({},this.defaults,a),this.el=t(this.view("chat")()),this.options.target.append(this.el),this.setAgentOnlineState(this.isOnline),this.options.show&&this.show(),this.el.find(".zammad-chat-header").click(this.toggle),this.el.find(".zammad-chat-controls").on("submit",this.onSubmit),this.el.find(".zammad-chat-input").on({keydown:this.checkForEnter,input:this.onInput}).autoGrow({extraLine:!1})}return a.prototype.defaults={invitationPhrase:"Chat with us!",agentPhrase:"%%agent%% is helping you",show:!0,target:t("body")},a.prototype.isOpen=!1,a.prototype.blinkOnlineInterval=null,a.prototype.stopBlinOnlineStateTimeout=null,a.prototype.showTimeEveryXMinutes=1,a.prototype.lastTimestamp=null,a.prototype.lastAddedType=null,a.prototype.inputTimeout=null,a.prototype.isTyping=!1,a.prototype.isOnline=!0,a.prototype.strings={Online:"Online",Offline:"Offline",Connecting:"Connecting","Connection re-established":"Connection re-established",Today:"Today"},a.prototype.T=function(t){return this.strings[t]},a.prototype.view=function(t){return e.zammadChatTemplates[t]},a.prototype.checkForEnter=function(t){return t.shiftKey||13!==t.keyCode?void 0:(t.preventDefault(),this.sendMessage())},a.prototype.onInput=function(){return this.el.find(".zammad-chat-message--unread").removeClass("zammad-chat-message--unread"),this.inputTimeout&&clearTimeout(this.inputTimeout),this.inputTimeout=setTimeout(this.onTypingEnd,5e3),this.isTyping?this.onTypingStart():void 0},a.prototype.onTypingStart=function(){return this.isTyping=!0},a.prototype.onTypingEnd=function(){return this.isTyping=!1},a.prototype.onSubmit=function(t){return t.preventDefault(),this.sendMessage()},a.prototype.sendMessage=function(){var t,e;return t=this.el.find(".zammad-chat-input").val(),t?(e=this.view("message")({message:t,from:"customer"}),this.maybeAddTimestamp(),this.el.find(".zammad-chat-message--typing").size()?(this.lastAddedType="typing-placeholder",this.el.find(".zammad-chat-message--typing").before(e)):(this.lastAddedType="message--customer",this.el.find(".zammad-chat-body").append(e)),this.el.find(".zammad-chat-input").val(""),this.scrollToBottom(),this.isTyping=!1):void 0},a.prototype.receiveMessage=function(t){var e,a;return this.onAgentTypingEnd(),this.maybeAddTimestamp(),this.lastAddedType="message--agent",a=null!=(e=document.hidden)?e:{" zammad-chat-message--unread":""},this.el.find(".zammad-chat-body").append(this.view("message")({message:t,from:"agent"})),this.scrollToBottom()},a.prototype.toggle=function(){return this.isOpen?this.close():this.open()},a.prototype.open=function(){return this.el.addClass("zammad-chat-is-open").animate({bottom:0},500,this.onOpenAnimationEnd)},a.prototype.onOpenAnimationEnd=function(){return this.isOpen=!0,setTimeout(this.onConnectionEstablished,1180),setTimeout(this.onAgentTypingStart,2e3),setTimeout(this.receiveMessage,5e3,"Hello! How can I help you?"),this.connect()},a.prototype.close=function(){var t;return t=this.el.height()-this.el.find(".zammad-chat-header").outerHeight(),this.el.animate({bottom:-t},500,this.onCloseAnimationEnd)},a.prototype.onCloseAnimationEnd=function(){return this.el.removeClass("zammad-chat-is-open"),this.disconnect(),this.isOpen=!1},a.prototype.hide=function(){return this.el.removeClass("zammad-chat-is-visible")},a.prototype.show=function(){var t;return this.el.addClass("zammad-chat-is-visible"),console.log(this.el.outerHeight(),this.el.find(".zammad-chat-header").outerHeight()),t=this.el.outerHeight()-this.el.find(".zammad-chat-header").outerHeight(),this.el.css("bottom",-t)},a.prototype.onAgentTypingStart=function(){return this.el.find(".zammad-chat-message--typing").size()?void 0:(this.maybeAddTimestamp(),this.el.find(".zammad-chat-body").append(this.view("typingIndicator")()),this.scrollToBottom())},a.prototype.onAgentTypingEnd=function(){return this.el.find(".zammad-chat-message--typing").remove()},a.prototype.maybeAddTimestamp=function(){var t,e,a;return a=Date.now(),!this.lastTimestamp||a-this.lastTimestamp>6e4*this.showTimeEveryXMinutes?(t=this.T("Today"),e=(new Date).toTimeString().substr(0,5),"timestamp"===this.lastAddedType?(this.updateLastTimestamp(t,e),this.lastTimestamp=a):(this.addStatus(t,e),this.lastTimestamp=a,this.lastAddedType="timestamp")):void 0},a.prototype.updateLastTimestamp=function(t,e){return this.el.find(".zammad-chat-body").find(".zammad-chat-status").last().replaceWith(this.view("status")({label:t,time:e}))},a.prototype.addStatus=function(t,e){return this.el.find(".zammad-chat-body").append(this.view("status")({label:t,time:e}))},a.prototype.scrollToBottom=function(){return this.el.find(".zammad-chat-body").scrollTop(t(".zammad-chat-body").prop("scrollHeight"))},a.prototype.connect=function(){},a.prototype.reconnect=function(){return this.lastAddedType="status",this.el.find(".zammad-chat-agent-status").attr("data-status","connecting").text(this.T("Connecting")),this.addStatus(this.T("Connection lost"))},a.prototype.onConnectionReestablished=function(){return this.lastAddedType="status",this.el.find(".zammad-chat-agent-status").attr("data-status","online").text(this.T("Online")),this.addStatus(this.T("Connection re-established"))},a.prototype.disconnect=function(){return this.el.find(".zammad-chat-loader").removeClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-welcome").removeClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-agent").addClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-agent-status").addClass("zammad-chat-is-hidden")},a.prototype.onConnectionEstablished=function(){return this.el.find(".zammad-chat-loader").addClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-welcome").addClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-agent").removeClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-agent-status").removeClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-input").focus()},a.prototype.setAgentOnlineState=function(t){return this.isOnline=t,this.el.find(".zammad-chat-agent-status").toggleClass("zammad-chat-is-online",t).text(t?this.T("Online"):this.T("Offline"))},a}(),t(document).ready(function(){return e.zammadChat=new a})}(window.jQuery,window),jQuery.fn.autoGrow=function(t){return this.each(function(){var e=jQuery.extend({extraLine:!0},t),a=function(t){return jQuery(t).after('
'),jQuery(t).next(".autogrow-textarea-mirror")[0]},n=function(t){i.innerHTML=String(t.value).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/ /g," ").replace(/\n/g,"
")+(e.extraLine?".
.":""),jQuery(t).height()!=jQuery(i).height()&&jQuery(t).height(jQuery(i).height())},s=function(){n(this)},i=a(this);i.style.display="none",i.style.wordWrap="break-word",i.style.whiteSpace="normal",i.style.padding=jQuery(this).css("paddingTop")+" "+jQuery(this).css("paddingRight")+" "+jQuery(this).css("paddingBottom")+" "+jQuery(this).css("paddingLeft"),i.style.width=jQuery(this).css("width"),i.style.fontFamily=jQuery(this).css("font-family"),i.style.fontSize=jQuery(this).css("font-size"),i.style.lineHeight=jQuery(this).css("line-height"),this.style.overflow="hidden",this.style.minHeight=this.rows+"em",this.onkeyup=s,n(this)})},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.message=function(t){t||(t={});var e,a=[],n=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?i(t):""},s=t.safe,i=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},i||(i=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){a.push('
\n '),a.push(this.message),a.push("\n
")}).call(this)}.call(t),t.safe=s,t.escape=i,a.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.status=function(t){t||(t={});var e,a=[],n=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?i(t):""},s=t.safe,i=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},i||(i=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){a.push('
'),a.push(n(this.label)),a.push(""),a.push(n(this.time)),a.push("
")}).call(this)}.call(t),t.safe=s,t.escape=i,a.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.typingIndicator=function(t){t||(t={});var e,a=[],n=t.safe,s=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},s||(s=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){a.push('
\n \n \n \n \n \n \n \n
')}).call(this)}.call(t),t.safe=n,t.escape=s,a.join("")}; \ No newline at end of file