(()=>{function e(e,s,t,m,o){function u(e,t,a,n){e.send=function(){a.send(e.formdata.name,e.formdata.email,e.formdata.subject,e.formdata.msg).then(function(){t.close(),n.success(o("Support request sent"))})},e.dismiss=t.dismiss}return{send:function(n,o,r,c){var i=e.defer();return m.current().then(function(e){var t="".concat(e.tenant,": ").concat(n||"".concat(e.firstName," ").concat(e.lastName)||e.name),e=o||e.email,e=$.param({name:t||void 0,email:e||void 0,description:(t=c,"".concat(navigator.userAgent," \n").concat(window.location.href,"\n ---------------\n").concat(t)),subject:r}),a=$('<iframe id="#zendeskiframe">');a.attr("src","https://cumulocity.zendesk.com/requests/embedded/create/?"+e).on("load",function(){a.remove(),i.resolve()}),a.appendTo("body")}),i.promise},open:function(a,n,o,r){var c=t.$new(!0),i={size:"lg",scope:c,ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",templateUrl:":::PLUGIN_PATH:::/ui/views/support.html",controller:["$scope","$uibModalInstance","c8ySupport","c8yAlert",u]};return m.current().then(function(e){c.formdata={};var t=c.formdata;return t.name=a||"".concat(e.firstName," ").concat(e.lastName),t.email=n||e.email,t.subject=o,t.msg=r,s.open(i).result})}}}e.$inject=["$q","$uibModal","$rootScope","c8yUser","gettext"],angular.module("c8y.ui").factory("c8ySupport",e)})();