text: !function(){var e=window,t=document;new function(n){var a=navigator.userAgent,o=function(){},i=function(){return n.appLocation?n.appLocation:e.location.protocol+"//"+e.location.host},l=function(e,n){var a;return e&&(a=t.createElement(e),n.forEach(function(e){var t=e.length>0?e[0]:"",n=e.length>1?e[1]:"";t&&a.setAttribute(t,n)},this)),a},s=function(e,n,a){var o,i,s=t.head,r=l("link",[["type","text/css"],["rel","stylesheet"],["href",e]]);"sheet"in r?(o="sheet",i="cssRules"):(o="styleSheet",i="rules");var c=setInterval(function(){try{console.log("setInterval called while loading stylesheet"),r[o]&&r[o][i].length&&(clearInterval(c),clearTimeout(f),n.call(a||window,!0,r))}catch(e){}},10),f=setTimeout(function(){console.log("setTimeout called while loading stylesheet"),clearInterval(c),clearTimeout(f),s.removeChild(r),n.call(a||window,!1,r)},15e3);return s.appendChild(r),r},r=function(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")},c=function(e){var t=e.method||"GET",n=e.url,a=e.success||o,i=e.error||o,l=e.params||null,s=e.contentType||"application/x-www-form-urlencoded",r=e.dataType||"json";"application/json"===s&&l&&"string"!=typeof l&&(l=JSON.stringify(l));var c=new XMLHttpRequest,f="responseType"in c;return c.open(t,n,!0),c.setRequestHeader("Content-Type",s),f&&(c.responseType=r),c.onreadystatechange=function(){c.readyState===XMLHttpRequest.DONE&&(200===c.status?a(f&&"json"===r?c.response:c.responseText):i(f&&"json"===r?c.response:c.responseText,c.status))},c.send(l),c},f=function(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},d=function(e,t){e.classList?e.classList.add(t):f(e,t)||(e.className+=" "+t)},p=function(e,t){if(e.classList)e.classList.remove(t);else if(f(e,t)){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}},u=function(e,t){f(e,t)?p(e,t):d(e,t)},h=function(){p(t.body,"body-overflow");var e=t.querySelector(".ffw-modal"),n=t.querySelector(".ffw-modal-content");n.style.display="none",n.innerHTML="",e.style.visibility="hidden",e.style.opacity="0"},m=function(){d(t.body,"body-overflow");var e=t.querySelector(".ffw-modal"),n=t.querySelector(".ffw-modal-content");e.style.visibility="visible",e.style.opacity="1",n.style.display="inline-block",e.addEventListener("click",function(e){e.preventDefault(),(f(e.target,"ffw-modal-container")||f(e.target,"ffw-modal"))&&h()}.bind(this))},v=function(){var e=l("div",[["class","ffw-container"]]),t=l("a",[["class","ffw-btn"],["href","javascript:void(0);"]]);t.appendChild(l("i",[["class","fa fa-info fw"]])),e.appendChild(t);var n=l("ul",[["class","ffw-ops"]]),a=l("li",[["class","ffw-op"]]),o=l("a",[["href","javascript:void(0);"]]),i=l("span",[["class","ffw-op-btn-tooltip"]]),s=a.cloneNode(!1),r=o.cloneNode(!1);r.setAttribute("class","ffw-op-btn green ffw-contact"),r.appendChild(l("i",[["class","fa fa-user fw"]]));var c=i.cloneNode(!1);c.innerHTML="Contact Us",s.appendChild(r),s.appendChild(c),n.appendChild(s);var f=a.cloneNode(!1),d=o.cloneNode(!1);d.setAttribute("class","ffw-op-btn red ffw-report"),d.appendChild(l("i",[["class","fa fa-bug fw"]]));var p=i.cloneNode(!1);p.innerHTML="Report Problems",f.appendChild(d),f.appendChild(p),n.appendChild(f);var u=a.cloneNode(!1),h=o.cloneNode(!1);h.setAttribute("class","ffw-op-btn blue ffw-comments"),h.appendChild(l("i",[["class","fa fa-bullhorn fw"]]));var m=i.cloneNode(!1);return m.innerHTML="Share Feedback",u.appendChild(h),u.appendChild(m),n.appendChild(u),e.appendChild(n),e},w=function(){var e=t.querySelector(".ffw-container"),n=l("div",[["class","ffw-modal"]]);e.appendChild(n);var a=l("div",[["class","ffw-modal-content"]]);e.appendChild(a)},b=function(){t.body.appendChild(v()),w()},y=function(){var e=l("div",[["class","ffw-form"]]),t=l("h4",[["class","ffw-form-header"]]);t.innerHTML="Share Feedback",e.appendChild(t);var n=l("div",[["class","ffw-form-field"]]),a=l("input",[["class","ffw-form-text-input"],["type","text"],["maxlength","50"]]),o=l("textarea",[["class","ffw-form-textarea-input"],["rows","5"]]),i=n.cloneNode(!1),s=a.cloneNode(!1);s.setAttribute("name","ffw-form-name"),s.setAttribute("placeholder","Name");try{ffwName&&s.setAttribute("value",ffwName)}catch(e){}i.appendChild(s),e.appendChild(i);var r=n.cloneNode(!1),c=o.cloneNode(!1);c.setAttribute("name","ffw-form-description"),c.setAttribute("placeholder","Description"),r.appendChild(c),e.appendChild(r);var f=n.cloneNode(!1);f.setAttribute("style","text-align: center;");var d=l("button",[["class","ffw-button ffw-form-submit-btn"],["type","button"]]);d.innerHTML="Submit";var p=l("button",[["class","ffw-button ffw-form-cancel-btn"],["type","button"]]);return p.setAttribute("style","margin-left:10px;"),p.innerHTML="Cancel",f.appendChild(d),f.appendChild(p),e.appendChild(f),e},C=function(){var e=t.querySelector(".ffw-form-submit-btn");e&&e.addEventListener("click",function(e){e.preventDefault();var n=t.querySelector('input[name="ffw-form-name"]'),o=t.querySelector('textarea[name="ffw-form-description"]'),l=n.value&&n.value.trim().length>0?n.value.trim():"",s=o.value&&o.value.trim().length>0?o.value.trim():"";c({url:i()+"/feedback",method:"POST",params:r({currentUrl:window.self.location.href,userAgent:a,name:l||ffwName,subjectId:ffwSubjectId,gbsCode:ffwGbsCode,description:s||""}),success:function(e){console.log("Feedback submitted successfully!"),h()}.bind(this),error:function(e,t){console.log("Error while submitting feedback!"),h()}.bind(this)})}.bind(this));var n=t.querySelector(".ffw-form-cancel-btn");n&&n.addEventListener("click",function(e){e.preventDefault(),h()}.bind(this))},g=function(){t.querySelector(".ffw-modal-content").appendChild(y()),C(),m()},N=function(){var e=t.querySelector(".ffw-btn");e&&e.addEventListener("click",function(t){u(e,"active")}.bind(this));var n=t.querySelector(".ffw-comments");n&&n.addEventListener("click",function(){u(e,"active"),g()}.bind(this))};return{userAgent:a,init:function(){s(i()+"/dist/css/widget-app.min.css",function(){b(),N()},this)},xhrReq:c}}({appLocation:"http://localhost:8082"}).init()}();