From 2bcceb17db4ba2999394b4f291cae4a8afd86215 Mon Sep 17 00:00:00 2001 From: Justoverclock Date: Fri, 9 Jul 2021 23:53:09 +0200 Subject: [PATCH] Css for mobile --- js/dist/forum.js | 2 +- js/dist/forum.js.map | 2 +- js/src/forum/index.js | 2 +- less/forum.less | 19 +++++++++++++++++++ 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/js/dist/forum.js b/js/dist/forum.js index 1f2dce9..18e2b99 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,2 +1,2 @@ -module.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=6)}([function(t,e){t.exports=flarum.core.compat["forum/app"]},,function(t,e){t.exports=flarum.core.compat["common/extend"]},function(t,e,n){t.exports=function t(e,n,o){function r(i,c){if(!n[i]){if(!e[i]){if(a)return a(i,!0);var d=new Error("Cannot find module '"+i+"'");throw d.code="MODULE_NOT_FOUND",d}var s=n[i]={exports:{}};e[i][0].call(s.exports,(function(t){return r(e[i][1][t]||t)}),s,s.exports,t,e,n,o)}return n[i].exports}for(var a=!1,i=0;it.length)&&(e=t.length);for(var n=0,o=new Array(e);n\n\t\t\t\t\n\t\t\t\n\t\t");this.root.innerHTML=e,document.getElementById("feedback-btn").addEventListener("click",(function(){t.renderModal()}))}}},{key:"renderModal",value:function(){var t=this;if(this.root){var e='\n\t\t\t\n\t\t');this.root.innerHTML=e,document.getElementById("feedback-close").addEventListener("click",(function(){t.closeModal()})),Object.keys(this.options.types).forEach((function(e){document.getElementById("feedback-item-".concat(e)).onclick=function(){t.renderForm(e)}}))}}},{key:"renderForm",value:function(t){var e=this;if(this.root){var n=this.options.types[t],o='\n\t\t\t\n\t\t');this.current=t,this.root.innerHTML=o,document.getElementById("feedback-message").focus(),document.getElementById("feedback-close").addEventListener("click",(function(){e.closeModal()})),document.getElementById("feedback-back").addEventListener("click",(function(){e.renderModal()})),document.getElementById("feedback-submit").addEventListener("click",(function(){e.submitForm()}))}}},{key:"closeModal",value:function(){this.root.innerHTML="",this.showDefaultBtn&&this.renderButton()}},{key:"submitForm",value:function(){var t=document.getElementById("feedback-message").value,e=this.options.emailField?document.getElementById("feedback-email").value:void 0,n={id:this.options.id,email:e,feedbackType:this.current,url:window.location.href,message:t};if(this.options.events){var o=new CustomEvent("feedback-submit",{detail:n});return window.dispatchEvent(o),void this.renderSuccess()}this.sendToEndpoint(n)}},{key:"sendToEndpoint",value:function(t){var e=this;this.renderLoading();var n=new XMLHttpRequest;n.open("POST",this.options.endpoint),n.setRequestHeader("Content-type","application/json"),n.send(JSON.stringify(t)),n.onreadystatechange=function(){if(4===n.readyState){if(200===n.status)return e.renderSuccess();e.renderFailed()}}}},{key:"renderLoading",value:function(){var t=this;this.root&&(document.getElementById("feedback-actions").innerHTML='\n\t\t\t\n\t\t',document.getElementById("feedback-close").addEventListener("click",(function(){t.closeModal()})))}},{key:"renderSuccess",value:function(){var t=this;if(this.root){var e='\n\t\t\t\n\t\t");this.root.innerHTML=e,setTimeout((function(){t.renderButton()}),3e3)}}},{key:"renderFailed",value:function(){var t=this;if(this.root){var e='\n\t\t\t\n\t\t');this.root.innerHTML=e,document.getElementById("feedback-close").addEventListener("click",(function(){t.closeModal()}))}}},{key:"_addStyle",value:function(){var t="\n\t\t\t#feedback-root{\n\t\t\t\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\n\t\t\t}\n\n\t\t\t.feedback-wrapper{\n\t\t\t\tposition: fixed;\n\t\t\t\tz-index: 1000;\n\t\t\t\tbottom: 0;\n\t\t\t\t".concat("left"===this.options.position?"left: 0":"right: 0",";\n\t\t\t\tmargin: 2rem;\n\t\t\t\twidth: 100%;\n\t\t\t\tmax-width: 20rem;\n\t\t\t}\n\n\t\t\t.feedback-main{\n\t\t\t\tbackground-color: ").concat(this.options.background,";\n\t\t\t\tcolor: ").concat(this.options.color,";\n\t\t\t\tborder-radius: 0.6rem;\n\t\t\t\ttext-align: center;\n\t\t\t\toverflow: hidden;\n\t\t\t\tbox-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);\n\t\t\t}\n\n\t\t\t.feedback-header{\n\t\t\t\tcolor: ").concat(this.options.background,";\n\t\t\t\tbackground-color: ").concat(this.options.primary,";\n\t\t\t\tpadding: 0.8rem 1.25rem;\n\t\t\t}\n\n\t\t\t.feedback-header p{\n\t\t\t\tmargin: 0;\n\t\t\t\tfont-weight: 600;\n\t\t\t\tfont-size: 1.2rem;\n\t\t\t}\n\n\t\t\t.feedback-header a{\n\t\t\t\tmargin: 0;\n\t\t\t\toutline: 0;\n\t\t\t\tfont-size: 1rem;\n\t\t\t\tmargin-top: 0.5rem;\n\t\t\t\tdisplay: block;\n\t\t\t\tcolor: ").concat(this.options.background,";\n\t\t\t\tborder: 2px solid ").concat(this.options.primary,";\n\t\t\t\ttext-decoration: none;\n\t\t\t\tpadding: 5px 10px\n\t\t\t}\n\n\t\t\t.feedback-header a:hover{\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\n\t\t\t.feedback-header a:focus{\n\t\t\t\tborder: 2px solid ").concat(this.options.background,";\n\t\t\t\tborder-radius: 5px;\n\t\t\t}\n\n\t\t\t.feedback-content{\n\t\t\t\tpadding: 0.7rem 1.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tflex-direction: column;\n\t\t\t}\n\n\t\t\t.feedback-content p{\n\t\t\t\tmargin: 0;\n\t\t\t\tfont-size: 1rem;\n\t\t\t\tfont-weight: 600;\n\t\t\t\tmargin-top: 0.5rem;\n\t\t\t\tmargin-bottom: 0.6rem;\n\t\t\t}\n\n\t\t\t.feedback-content input{\n\t\t\t\tborder: 3px solid ").concat(this.options.background,";\n\t\t\t\tfilter: brightness(95%);\n\t\t\t\tborder-radius: 10px;\n\t\t\t\toutline: 0;\n\t\t\t\tpadding: 10px;\n\t\t\t\tmargin-bottom: 0.5rem;\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tfont-size: 1rem;\n\t\t\t\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\n\t\t\t}\n\n\t\t\t.feedback-content textarea{\n\t\t\t\toverflow: auto;\n\t\t\t\tborder: 3px solid ").concat(this.options.background,";\n\t\t\t\tfilter: brightness(95%);\n\t\t\t\tborder-radius: 10px;\n\t\t\t\toutline: 0;\n\t\t\t\tpadding: 10px;\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tresize: none;\n\t\t\t\tfont-size: 1rem;\n\t\t\t\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\n\t\t\t}\n\n\t\t\t.feedback-content textarea:focus,\n\t\t\t.feedback-content input:focus{\n\t\t\t\tborder: 3px solid ").concat(this.options.primary,";\n\t\t\t}\n\n\t\t\t.feedback-actions{\n\t\t\t\tdisplay: flex;\n\t\t\t\tmargin-top: 1rem;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t.feedback-actions button{\n\t\t\t\tpadding: 0.5rem;\n\t\t\t\tborder-radius: 10px;\n\t\t\t\tcursor: pointer;\n\t\t\t\tmargin: 0;\n\t\t\t\toutline: 0;\n\t\t\t\tborder: 3px solid rgba(255, 255, 255, 0);\n\t\t\t\tappearance: none;\n\t\t\t\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\n\t\t\t\tuser-select: none;\n\t\t\t\tbox-shadow: 0 1px 3px 0 rgba(0,0,0,.1);\n\t\t\t}\n\n\t\t\t.feedback-actions button:focus {\n\t\t\t\tborder: 3px solid ").concat(this.options.primary,";\n\t\t\t\tfilter: brightness(105%);\n\t\t\t}\n\t\t\t\n\t\t\t.feedback-actions button:active {\n\t\t\t\ttransform: scale(0.95);\n\t\t\t}\n\n\t\t\t#feedback-back{\n\t\t\t\tbackground: ").concat(this.options.background,";\n\t\t\t\tcolor: rgba(58,71,65);\n\t\t\t}\n\n\t\t\t#feedback-submit{\n\t\t\t\tmargin-left: auto;\n\t\t\t\tbackground: ").concat(this.options.primary,";\n\t\t\t\tcolor: ").concat(this.options.background,";\n\t\t\t\tfont-weight: 700;\n\t\t\t}\n\n\t\t\t#feedback-loading{\n\t\t\t\tmargin-left: auto;\n\t\t\t\tbackground: ").concat(this.options.primary,";\n\t\t\t\tcolor: ").concat(this.options.background,";\n\t\t\t\tfont-weight: 700;\n\t\t\t}\n\n\t\t\t.feedback-loader{\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 15px;\n\t\t\t\theight: 15px;\n\t\t\t\tmargin-right: 1rem;\n\t\t\t}\n\n\t\t\t.feedback-loader div {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t\tmargin: 0;\n\t\t\t\tborder: 3px solid ").concat(this.options.background,";\n\t\t\t\tborder-radius: 50%;\n\t\t\t\tanimation: feedback-loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n\t\t\t\tborder-color: ").concat(this.options.background," transparent transparent transparent;\n\t\t\t}\n\n\t\t\t.feedback-loader div:nth-child(1) {\n\t\t\t\tanimation-delay: -0.45s;\n\t\t\t}\n\n\t\t\t.feedback-loader div:nth-child(2) {\n\t\t\t\tanimation-delay: -0.3s;\n\t\t\t}\n\n\t\t\t.feedback-loader div:nth-child(3) {\n\t\t\t\tanimation-delay: -0.15s;\n\t\t\t}\n\n\t\t\t@keyframes feedback-loader {\n\t\t\t\t0% {\n\t\t\t\t\ttransform: rotate(0deg);\n\t\t\t\t}\n\t\t\t\t100% {\n\t\t\t\t\ttransform: rotate(360deg);\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t\t.feedback-content-list{\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: flex-start;\n\t\t\t\tmargin-left: auto;\n\t\t\t\tmargin-right: auto;\n\t\t\t\tmargin-bottom: 1rem;\n\t\t\t}\n\n\t\t\t.feedback-item {\n\t\t\t\twidth: 100%;\n\t\t\t\tcursor: pointer;\n\t\t\t\tuser-select:none;\n\t\t\t\tborder:0;\n\t\t\t\toutline: 0;\n\t\t\t\tbackground: 0;\n\t\t\t\tfont-size: 0.9rem;\n\t\t\t\ttext-align: left;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tflex-direction: row;\n\t\t\t\tcolor: ").concat(this.options.color,";\n\t\t\t\tbackground-color: ").concat(this.options.background,";\n\t\t\t\tborder: 2px solid ").concat(this.options.background,";\n\t\t\t\tborder-radius: 10px;\n\t\t\t\tpadding: 10px;\n\t\t\t}\n\n\t\t\t.feedback-item:hover{\n\t\t\t\tfilter: brightness(95%);\n\t\t\t}\n\n\t\t\t.feedback-item:focus{\n\t\t\t\tborder: 2px solid ").concat(this.options.primary,";\n\t\t\t\tborder-radius: 5px;\n\t\t\t}\n\n\t\t\t.feedback-item span{\n\t\t\t\twidth: 1.5rem;\n\t\t\t\tmargin-right: 0.2rem;\n\t\t\t\tdisplay: block;\n\t\t\t\ttext-align: center;\n\t\t\t}\n\n\t\t\t.feedback-close{\n\t\t\t\tmargin-top: .75rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: ").concat("left"===this.options.position?"flex-start":"flex-end",";\n\t\t\t\tflex-direction: row;\n\t\t\t}\n\n\t\t\t.feedback-close button{\n\t\t\t\tbox-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);\n\t\t\t\tcursor: pointer;\n\t\t\t\tuser-select:none;\n\t\t\t\tborder:0;\n\t\t\t\toutline: 0;\n\t\t\t\tborder-radius: 9999px;\n\t\t\t\tpadding: .5rem;\n\t\t\t\tbackground: ").concat(this.options.background,";\n\t\t\t\tcolor: ").concat(this.options.color,";\n\t\t\t\tborder: 2px solid ").concat(this.options.background,";\n\t\t\t}\n\n\t\t\t.feedback-close button:focus{\n\t\t\t\tborder: 2px solid ").concat(this.options.primary,";\n\t\t\t}\n\n\t\t\t.feedback-close button:hover{\n\t\t\t\tfilter: brightness(95%);\n\t\t\t}\n\n\t\t\t.feedback-close button:active {\n\t\t\t\ttransform: scale(0.95);\n\t\t\t}\n\n\t\t\t.feedback-close svg{\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 1.25rem;\n\t\t\t\theight: 1.25rem;\n\t\t\t}\n\n\t\t\t.feedback-btn-wrapper{\n\t\t\t\tposition: fixed;\n\t\t\t\tz-index: 1000;\n\t\t\t\tbottom: 0;\n\t\t\t\t").concat("left"===this.options.position?"left: 0":"right: 0",";\n\t\t\t\tmargin: 2rem;\n\t\t\t}\n\n\t\t\t#feedback-btn{\n\t\t\t\theight: 30px;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tpadding: 1.2rem 0.7rem;\n\t\t\t\tborder-radius: 0.4rem;\n\t\t\t\tcursor: pointer;\n\t\t\t\tbox-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);\n\t\t\t\tuser-select:none;\n\t\t\t\tborder:0;\n\t\t\t\toutline: 0;\n\t\t\t\tcolor: ").concat(this.options.background,";\n\t\t\t\tbackground-color: ").concat(this.options.primary,";\n\t\t\t\ttransition: filter .4s ease;\n\t\t\t}\n\n\t\t\t#feedback-btn:hover, #feedback-btn:focus{\n\t\t\t\tfilter: brightness(105%);\n\t\t\t}\n\n\t\t\t#feedback-btn:active {\n\t\t\t\ttransform: scale(0.95);\n\t\t\t}\n\n\t\t\t#feedback-btn svg{\n\t\t\t\twidth: 1.25rem;\n\t\t\t\theight: 1.25rem;\n\t\t\t}\n\n\t\t\t#feedback-btn span{\n\t\t\t\tfont-weight: 700;\n\t\t\t\tfont-size: 1rem;\n\t\t\t\tmargin-left: .5rem;\n\t\t\t}\n\t\t"),e=document.createComment("feedback-js stylesheet");document.head.appendChild(e);var n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("href","data:text/css;charset=UTF-8,"+encodeURIComponent(t)),document.head.appendChild(n)}}])&&a(e.prototype,n),t}();n.default=c},{}],2:[function(t,e,n){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==o(t)&&"function"!=typeof t)return{default:t};var e=function(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return t}();if(e&&e.has(t))return e.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var i=r?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=t[a]}return n.default=t,e&&e.set(t,n),n}(t("./feedback")),a=r.default;n.default=a,r.IS_BROWSER?function(){var t=document.querySelector("[data-feedback-opts]"),e=document.querySelector("[data-feedback-endpoint]"),n=document.querySelectorAll("[data-feedback-trigger]");if(!t&&!e&&n.length<1)window.Feedback=r.default;else{var o=t&&t.getAttribute("data-feedback-opts")||"{}",a=e&&{endpoint:e.getAttribute("data-feedback-endpoint")}||{},i=Object.assign({},JSON.parse(o),a);window.addEventListener("load",(function(){window.feedback=new r.default(i);var t=n.length<1;(t||window.feedback.options.forceShowButton)&&window.feedback.renderButton(),t||n.forEach((function(t){t.addEventListener("click",(function(){window.feedback.renderModal()}))}))}))}}():console.warn("[feedback-js] Detected environment without a `window` object")},{"./feedback":1}]},{},[2])(2)},function(t,e){t.exports=flarum.core.compat["forum/components/HeaderPrimary"]},,function(t,e,n){"use strict";n.r(e);var o=n(0),r=n.n(o),a=n(2),i=n(3),c=n.n(i),d=n(4),s=n.n(d);r.a.initializers.add("justoverclock/flarum-ext-feedback",(function(){Object(a.extend)(s.a.prototype,"oninit",(function(){var t=r.a.forum.attribute("apiUrl")+"/feedback",e=r.a.forum.attribute("feedback");if(e){var n={endpoint:t,events:!0,emailField:e.email,btnTitle:r.a.translator.trans("justoverclock-feedback.forum.button-title"),title:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.title"),inputPlaceholder:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.placeholder"),submitText:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.submit"),backText:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.back"),contactText:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.contact-text"),typeMessage:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.type-message"),success:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.success"),position:e.position,primary:r.a.forum.attribute("themePrimaryColor"),background:e.backgroundColor,color:e.fontColor,types:{general:{text:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.types.general"),icon:"⚠️"},idea:{text:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.types.idea"),icon:"💡"},love:{text:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.types.bug"),icon:"🐛"}}};new c.a(n).renderButton(),window.addEventListener("feedback-submit",(function(e){r.a.request({method:"POST",url:t,body:e.detail})}))}else console.warn("justoverclock/flarum-ext-feedback is not correctly configured!")}))}))}]); +module.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=6)}([function(t,e){t.exports=flarum.core.compat["forum/app"]},,function(t,e){t.exports=flarum.core.compat["common/extend"]},function(t,e,n){t.exports=function t(e,n,o){function r(i,c){if(!n[i]){if(!e[i]){if(a)return a(i,!0);var d=new Error("Cannot find module '"+i+"'");throw d.code="MODULE_NOT_FOUND",d}var s=n[i]={exports:{}};e[i][0].call(s.exports,(function(t){return r(e[i][1][t]||t)}),s,s.exports,t,e,n,o)}return n[i].exports}for(var a=!1,i=0;it.length)&&(e=t.length);for(var n=0,o=new Array(e);n\n\t\t\t\t\n\t\t\t\n\t\t");this.root.innerHTML=e,document.getElementById("feedback-btn").addEventListener("click",(function(){t.renderModal()}))}}},{key:"renderModal",value:function(){var t=this;if(this.root){var e='\n\t\t\t\n\t\t');this.root.innerHTML=e,document.getElementById("feedback-close").addEventListener("click",(function(){t.closeModal()})),Object.keys(this.options.types).forEach((function(e){document.getElementById("feedback-item-".concat(e)).onclick=function(){t.renderForm(e)}}))}}},{key:"renderForm",value:function(t){var e=this;if(this.root){var n=this.options.types[t],o='\n\t\t\t\n\t\t');this.current=t,this.root.innerHTML=o,document.getElementById("feedback-message").focus(),document.getElementById("feedback-close").addEventListener("click",(function(){e.closeModal()})),document.getElementById("feedback-back").addEventListener("click",(function(){e.renderModal()})),document.getElementById("feedback-submit").addEventListener("click",(function(){e.submitForm()}))}}},{key:"closeModal",value:function(){this.root.innerHTML="",this.showDefaultBtn&&this.renderButton()}},{key:"submitForm",value:function(){var t=document.getElementById("feedback-message").value,e=this.options.emailField?document.getElementById("feedback-email").value:void 0,n={id:this.options.id,email:e,feedbackType:this.current,url:window.location.href,message:t};if(this.options.events){var o=new CustomEvent("feedback-submit",{detail:n});return window.dispatchEvent(o),void this.renderSuccess()}this.sendToEndpoint(n)}},{key:"sendToEndpoint",value:function(t){var e=this;this.renderLoading();var n=new XMLHttpRequest;n.open("POST",this.options.endpoint),n.setRequestHeader("Content-type","application/json"),n.send(JSON.stringify(t)),n.onreadystatechange=function(){if(4===n.readyState){if(200===n.status)return e.renderSuccess();e.renderFailed()}}}},{key:"renderLoading",value:function(){var t=this;this.root&&(document.getElementById("feedback-actions").innerHTML='\n\t\t\t\n\t\t',document.getElementById("feedback-close").addEventListener("click",(function(){t.closeModal()})))}},{key:"renderSuccess",value:function(){var t=this;if(this.root){var e='\n\t\t\t\n\t\t");this.root.innerHTML=e,setTimeout((function(){t.renderButton()}),3e3)}}},{key:"renderFailed",value:function(){var t=this;if(this.root){var e='\n\t\t\t\n\t\t');this.root.innerHTML=e,document.getElementById("feedback-close").addEventListener("click",(function(){t.closeModal()}))}}},{key:"_addStyle",value:function(){var t="\n\t\t\t#feedback-root{\n\t\t\t\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\n\t\t\t}\n\n\t\t\t.feedback-wrapper{\n\t\t\t\tposition: fixed;\n\t\t\t\tz-index: 1000;\n\t\t\t\tbottom: 0;\n\t\t\t\t".concat("left"===this.options.position?"left: 0":"right: 0",";\n\t\t\t\tmargin: 2rem;\n\t\t\t\twidth: 100%;\n\t\t\t\tmax-width: 20rem;\n\t\t\t}\n\n\t\t\t.feedback-main{\n\t\t\t\tbackground-color: ").concat(this.options.background,";\n\t\t\t\tcolor: ").concat(this.options.color,";\n\t\t\t\tborder-radius: 0.6rem;\n\t\t\t\ttext-align: center;\n\t\t\t\toverflow: hidden;\n\t\t\t\tbox-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);\n\t\t\t}\n\n\t\t\t.feedback-header{\n\t\t\t\tcolor: ").concat(this.options.background,";\n\t\t\t\tbackground-color: ").concat(this.options.primary,";\n\t\t\t\tpadding: 0.8rem 1.25rem;\n\t\t\t}\n\n\t\t\t.feedback-header p{\n\t\t\t\tmargin: 0;\n\t\t\t\tfont-weight: 600;\n\t\t\t\tfont-size: 1.2rem;\n\t\t\t}\n\n\t\t\t.feedback-header a{\n\t\t\t\tmargin: 0;\n\t\t\t\toutline: 0;\n\t\t\t\tfont-size: 1rem;\n\t\t\t\tmargin-top: 0.5rem;\n\t\t\t\tdisplay: block;\n\t\t\t\tcolor: ").concat(this.options.background,";\n\t\t\t\tborder: 2px solid ").concat(this.options.primary,";\n\t\t\t\ttext-decoration: none;\n\t\t\t\tpadding: 5px 10px\n\t\t\t}\n\n\t\t\t.feedback-header a:hover{\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\n\t\t\t.feedback-header a:focus{\n\t\t\t\tborder: 2px solid ").concat(this.options.background,";\n\t\t\t\tborder-radius: 5px;\n\t\t\t}\n\n\t\t\t.feedback-content{\n\t\t\t\tpadding: 0.7rem 1.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tflex-direction: column;\n\t\t\t}\n\n\t\t\t.feedback-content p{\n\t\t\t\tmargin: 0;\n\t\t\t\tfont-size: 1rem;\n\t\t\t\tfont-weight: 600;\n\t\t\t\tmargin-top: 0.5rem;\n\t\t\t\tmargin-bottom: 0.6rem;\n\t\t\t}\n\n\t\t\t.feedback-content input{\n\t\t\t\tborder: 3px solid ").concat(this.options.background,";\n\t\t\t\tfilter: brightness(95%);\n\t\t\t\tborder-radius: 10px;\n\t\t\t\toutline: 0;\n\t\t\t\tpadding: 10px;\n\t\t\t\tmargin-bottom: 0.5rem;\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tfont-size: 1rem;\n\t\t\t\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\n\t\t\t}\n\n\t\t\t.feedback-content textarea{\n\t\t\t\toverflow: auto;\n\t\t\t\tborder: 3px solid ").concat(this.options.background,";\n\t\t\t\tfilter: brightness(95%);\n\t\t\t\tborder-radius: 10px;\n\t\t\t\toutline: 0;\n\t\t\t\tpadding: 10px;\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tresize: none;\n\t\t\t\tfont-size: 1rem;\n\t\t\t\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\n\t\t\t}\n\n\t\t\t.feedback-content textarea:focus,\n\t\t\t.feedback-content input:focus{\n\t\t\t\tborder: 3px solid ").concat(this.options.primary,";\n\t\t\t}\n\n\t\t\t.feedback-actions{\n\t\t\t\tdisplay: flex;\n\t\t\t\tmargin-top: 1rem;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t.feedback-actions button{\n\t\t\t\tpadding: 0.5rem;\n\t\t\t\tborder-radius: 10px;\n\t\t\t\tcursor: pointer;\n\t\t\t\tmargin: 0;\n\t\t\t\toutline: 0;\n\t\t\t\tborder: 3px solid rgba(255, 255, 255, 0);\n\t\t\t\tappearance: none;\n\t\t\t\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\n\t\t\t\tuser-select: none;\n\t\t\t\tbox-shadow: 0 1px 3px 0 rgba(0,0,0,.1);\n\t\t\t}\n\n\t\t\t.feedback-actions button:focus {\n\t\t\t\tborder: 3px solid ").concat(this.options.primary,";\n\t\t\t\tfilter: brightness(105%);\n\t\t\t}\n\t\t\t\n\t\t\t.feedback-actions button:active {\n\t\t\t\ttransform: scale(0.95);\n\t\t\t}\n\n\t\t\t#feedback-back{\n\t\t\t\tbackground: ").concat(this.options.background,";\n\t\t\t\tcolor: rgba(58,71,65);\n\t\t\t}\n\n\t\t\t#feedback-submit{\n\t\t\t\tmargin-left: auto;\n\t\t\t\tbackground: ").concat(this.options.primary,";\n\t\t\t\tcolor: ").concat(this.options.background,";\n\t\t\t\tfont-weight: 700;\n\t\t\t}\n\n\t\t\t#feedback-loading{\n\t\t\t\tmargin-left: auto;\n\t\t\t\tbackground: ").concat(this.options.primary,";\n\t\t\t\tcolor: ").concat(this.options.background,";\n\t\t\t\tfont-weight: 700;\n\t\t\t}\n\n\t\t\t.feedback-loader{\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 15px;\n\t\t\t\theight: 15px;\n\t\t\t\tmargin-right: 1rem;\n\t\t\t}\n\n\t\t\t.feedback-loader div {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t\tmargin: 0;\n\t\t\t\tborder: 3px solid ").concat(this.options.background,";\n\t\t\t\tborder-radius: 50%;\n\t\t\t\tanimation: feedback-loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n\t\t\t\tborder-color: ").concat(this.options.background," transparent transparent transparent;\n\t\t\t}\n\n\t\t\t.feedback-loader div:nth-child(1) {\n\t\t\t\tanimation-delay: -0.45s;\n\t\t\t}\n\n\t\t\t.feedback-loader div:nth-child(2) {\n\t\t\t\tanimation-delay: -0.3s;\n\t\t\t}\n\n\t\t\t.feedback-loader div:nth-child(3) {\n\t\t\t\tanimation-delay: -0.15s;\n\t\t\t}\n\n\t\t\t@keyframes feedback-loader {\n\t\t\t\t0% {\n\t\t\t\t\ttransform: rotate(0deg);\n\t\t\t\t}\n\t\t\t\t100% {\n\t\t\t\t\ttransform: rotate(360deg);\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t\t.feedback-content-list{\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: flex-start;\n\t\t\t\tmargin-left: auto;\n\t\t\t\tmargin-right: auto;\n\t\t\t\tmargin-bottom: 1rem;\n\t\t\t}\n\n\t\t\t.feedback-item {\n\t\t\t\twidth: 100%;\n\t\t\t\tcursor: pointer;\n\t\t\t\tuser-select:none;\n\t\t\t\tborder:0;\n\t\t\t\toutline: 0;\n\t\t\t\tbackground: 0;\n\t\t\t\tfont-size: 0.9rem;\n\t\t\t\ttext-align: left;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tflex-direction: row;\n\t\t\t\tcolor: ").concat(this.options.color,";\n\t\t\t\tbackground-color: ").concat(this.options.background,";\n\t\t\t\tborder: 2px solid ").concat(this.options.background,";\n\t\t\t\tborder-radius: 10px;\n\t\t\t\tpadding: 10px;\n\t\t\t}\n\n\t\t\t.feedback-item:hover{\n\t\t\t\tfilter: brightness(95%);\n\t\t\t}\n\n\t\t\t.feedback-item:focus{\n\t\t\t\tborder: 2px solid ").concat(this.options.primary,";\n\t\t\t\tborder-radius: 5px;\n\t\t\t}\n\n\t\t\t.feedback-item span{\n\t\t\t\twidth: 1.5rem;\n\t\t\t\tmargin-right: 0.2rem;\n\t\t\t\tdisplay: block;\n\t\t\t\ttext-align: center;\n\t\t\t}\n\n\t\t\t.feedback-close{\n\t\t\t\tmargin-top: .75rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: ").concat("left"===this.options.position?"flex-start":"flex-end",";\n\t\t\t\tflex-direction: row;\n\t\t\t}\n\n\t\t\t.feedback-close button{\n\t\t\t\tbox-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);\n\t\t\t\tcursor: pointer;\n\t\t\t\tuser-select:none;\n\t\t\t\tborder:0;\n\t\t\t\toutline: 0;\n\t\t\t\tborder-radius: 9999px;\n\t\t\t\tpadding: .5rem;\n\t\t\t\tbackground: ").concat(this.options.background,";\n\t\t\t\tcolor: ").concat(this.options.color,";\n\t\t\t\tborder: 2px solid ").concat(this.options.background,";\n\t\t\t}\n\n\t\t\t.feedback-close button:focus{\n\t\t\t\tborder: 2px solid ").concat(this.options.primary,";\n\t\t\t}\n\n\t\t\t.feedback-close button:hover{\n\t\t\t\tfilter: brightness(95%);\n\t\t\t}\n\n\t\t\t.feedback-close button:active {\n\t\t\t\ttransform: scale(0.95);\n\t\t\t}\n\n\t\t\t.feedback-close svg{\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 1.25rem;\n\t\t\t\theight: 1.25rem;\n\t\t\t}\n\n\t\t\t.feedback-btn-wrapper{\n\t\t\t\tposition: fixed;\n\t\t\t\tz-index: 1000;\n\t\t\t\tbottom: 0;\n\t\t\t\t").concat("left"===this.options.position?"left: 0":"right: 0",";\n\t\t\t\tmargin: 2rem;\n\t\t\t}\n\n\t\t\t#feedback-btn{\n\t\t\t\theight: 30px;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tpadding: 1.2rem 0.7rem;\n\t\t\t\tborder-radius: 0.4rem;\n\t\t\t\tcursor: pointer;\n\t\t\t\tbox-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);\n\t\t\t\tuser-select:none;\n\t\t\t\tborder:0;\n\t\t\t\toutline: 0;\n\t\t\t\tcolor: ").concat(this.options.background,";\n\t\t\t\tbackground-color: ").concat(this.options.primary,";\n\t\t\t\ttransition: filter .4s ease;\n\t\t\t}\n\n\t\t\t#feedback-btn:hover, #feedback-btn:focus{\n\t\t\t\tfilter: brightness(105%);\n\t\t\t}\n\n\t\t\t#feedback-btn:active {\n\t\t\t\ttransform: scale(0.95);\n\t\t\t}\n\n\t\t\t#feedback-btn svg{\n\t\t\t\twidth: 1.25rem;\n\t\t\t\theight: 1.25rem;\n\t\t\t}\n\n\t\t\t#feedback-btn span{\n\t\t\t\tfont-weight: 700;\n\t\t\t\tfont-size: 1rem;\n\t\t\t\tmargin-left: .5rem;\n\t\t\t}\n\t\t"),e=document.createComment("feedback-js stylesheet");document.head.appendChild(e);var n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("href","data:text/css;charset=UTF-8,"+encodeURIComponent(t)),document.head.appendChild(n)}}])&&a(e.prototype,n),t}();n.default=c},{}],2:[function(t,e,n){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==o(t)&&"function"!=typeof t)return{default:t};var e=function(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return t}();if(e&&e.has(t))return e.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var i=r?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=t[a]}return n.default=t,e&&e.set(t,n),n}(t("./feedback")),a=r.default;n.default=a,r.IS_BROWSER?function(){var t=document.querySelector("[data-feedback-opts]"),e=document.querySelector("[data-feedback-endpoint]"),n=document.querySelectorAll("[data-feedback-trigger]");if(!t&&!e&&n.length<1)window.Feedback=r.default;else{var o=t&&t.getAttribute("data-feedback-opts")||"{}",a=e&&{endpoint:e.getAttribute("data-feedback-endpoint")}||{},i=Object.assign({},JSON.parse(o),a);window.addEventListener("load",(function(){window.feedback=new r.default(i);var t=n.length<1;(t||window.feedback.options.forceShowButton)&&window.feedback.renderButton(),t||n.forEach((function(t){t.addEventListener("click",(function(){window.feedback.renderModal()}))}))}))}}():console.warn("[feedback-js] Detected environment without a `window` object")},{"./feedback":1}]},{},[2])(2)},function(t,e){t.exports=flarum.core.compat["forum/components/HeaderPrimary"]},,function(t,e,n){"use strict";n.r(e);var o=n(0),r=n.n(o),a=n(2),i=n(3),c=n.n(i),d=n(4),s=n.n(d);r.a.initializers.add("justoverclock/flarum-ext-feedback",(function(){Object(a.extend)(s.a.prototype,"oninit",(function(){var t=r.a.forum.attribute("apiUrl")+"/feedback",e=r.a.forum.attribute("feedback");if(e){var n={endpoint:t,events:!0,emailField:e.email,btnTitle:r.a.translator.trans("justoverclock-feedback.forum.button-title"),title:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.title"),inputPlaceholder:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.placeholder"),submitText:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.submit"),backText:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.back"),contactText:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.contact-text"),typeMessage:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.type-message"),success:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.success"),position:e.position,primary:r.a.forum.attribute("themePrimaryColor"),background:e.backgroundColor,color:e.fontColor,types:{general:{text:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.types.general"),icon:"⚠️"},idea:{text:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.types.idea"),icon:"💡"},bug:{text:r.a.translator.trans("justoverclock-feedback.forum.feedback-widget.types.bug"),icon:"🐛"}}};new c.a(n).renderButton(),window.addEventListener("feedback-submit",(function(e){r.a.request({method:"POST",url:t,body:e.detail})}))}else console.warn("justoverclock/flarum-ext-feedback is not correctly configured!")}))}))}]); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index d91160b..544fe2a 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@justoverclock/flarum-ext-feedback/webpack/bootstrap","webpack://@justoverclock/flarum-ext-feedback/external \"flarum.core.compat['forum/app']\"","webpack://@justoverclock/flarum-ext-feedback/external \"flarum.core.compat['common/extend']\"","webpack://@justoverclock/flarum-ext-feedback/./node_modules/@betahuhn/feedback-js/dist/feedback-js.min.js","webpack://@justoverclock/flarum-ext-feedback/external \"flarum.core.compat['forum/components/HeaderPrimary']\"","webpack://@justoverclock/flarum-ext-feedback/./src/forum/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","e","a","Error","code","length","1","Array","isArray","iterator","next","done","push","toString","slice","constructor","from","test","TypeError","configurable","writable","IS_BROWSER","window","this","options","assign","id","endpoint","events","emailField","forceShowButton","btnTitle","title","contactText","contactLink","typeMessage","success","inputPlaceholder","submitText","backText","failedTitle","failedMessage","position","primary","background","color","types","general","text","icon","idea","bug","document","createElement","body","insertBefore","firstChild","root","createComment","_addStyle","console","warn","showDefaultBtn","concat","innerHTML","getElementById","addEventListener","renderModal","entries","reduce","closeModal","keys","forEach","onclick","renderForm","current","focus","submitForm","renderButton","email","feedbackType","url","location","href","message","CustomEvent","detail","dispatchEvent","renderSuccess","sendToEndpoint","renderLoading","XMLHttpRequest","open","setRequestHeader","send","JSON","stringify","onreadystatechange","readyState","status","renderFailed","setTimeout","head","appendChild","setAttribute","encodeURIComponent","2","default","WeakMap","has","getOwnPropertyDescriptor","set","querySelector","querySelectorAll","Feedback","getAttribute","parse","feedback","app","initializers","add","extend","HeaderPrimary","apiUrl","forum","attribute","opts","translator","trans","backgroundColor","fontColor","love","event","request","method"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CA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file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","module.exports = flarum.core.compat['forum/app'];","module.exports = flarum.core.compat['common/extend'];","!function(t){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this).feedbackJs=t()}}((function(){return function t(e,n,o){function i(r,c){if(!n[r]){if(!e[r]){var d=\"function\"==typeof require&&require;if(!c&&d)return d(r,!0);if(a)return a(r,!0);var s=new Error(\"Cannot find module '\"+r+\"'\");throw s.code=\"MODULE_NOT_FOUND\",s}var l=n[r]={exports:{}};e[r][0].call(l.exports,(function(t){return i(e[r][1][t]||t)}),l,l.exports,t,e,n,o)}return n[r].exports}for(var a=\"function\"==typeof require&&require,r=0;rt.length)&&(e=t.length);for(var n=0,o=new Array(e);n\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\");this.root.innerHTML=e,document.getElementById(\"feedback-btn\").addEventListener(\"click\",(function(){t.renderModal()}))}}},{key:\"renderModal\",value:function(){var t=this;if(this.root){var e='\\n\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t

'.concat(this.options.title,\"

\\n\\t\\t\\t\\t\\t\\t\").concat(this.options.contactLink.length>0?\"\"+this.options.contactText+\"\":\"\",'\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t

').concat(this.options.typeMessage,'

\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t\\t').concat(Object.entries(this.options.types).reduce((function(t,e){var n=o(e,2),i=n[0],a=n[1];return t+'\")}),\"\"),'\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t');this.root.innerHTML=e,document.getElementById(\"feedback-close\").addEventListener(\"click\",(function(){t.closeModal()})),Object.keys(this.options.types).forEach((function(e){document.getElementById(\"feedback-item-\".concat(e)).onclick=function(){t.renderForm(e)}}))}}},{key:\"renderForm\",value:function(t){var e=this;if(this.root){var n=this.options.types[t],o='\\n\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t

'.concat(n.icon,\" \").concat(n.text,'

\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t\\t').concat(this.options.emailField?'':\"\",'\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t');this.current=t,this.root.innerHTML=o,document.getElementById(\"feedback-message\").focus(),document.getElementById(\"feedback-close\").addEventListener(\"click\",(function(){e.closeModal()})),document.getElementById(\"feedback-back\").addEventListener(\"click\",(function(){e.renderModal()})),document.getElementById(\"feedback-submit\").addEventListener(\"click\",(function(){e.submitForm()}))}}},{key:\"closeModal\",value:function(){this.root.innerHTML=\"\",this.showDefaultBtn&&this.renderButton()}},{key:\"submitForm\",value:function(){var t=document.getElementById(\"feedback-message\").value,e=this.options.emailField?document.getElementById(\"feedback-email\").value:void 0,n={id:this.options.id,email:e,feedbackType:this.current,url:window.location.href,message:t};if(this.options.events){var o=new CustomEvent(\"feedback-submit\",{detail:n});return window.dispatchEvent(o),void this.renderSuccess()}this.sendToEndpoint(n)}},{key:\"sendToEndpoint\",value:function(t){var e=this;this.renderLoading();var n=new XMLHttpRequest;n.open(\"POST\",this.options.endpoint),n.setRequestHeader(\"Content-type\",\"application/json\"),n.send(JSON.stringify(t)),n.onreadystatechange=function(){if(4===n.readyState){if(200===n.status)return e.renderSuccess();e.renderFailed()}}}},{key:\"renderLoading\",value:function(){var t=this;this.root&&(document.getElementById(\"feedback-actions\").innerHTML='\\n\\t\\t\\t\\n\\t\\t',document.getElementById(\"feedback-close\").addEventListener(\"click\",(function(){t.closeModal()})))}},{key:\"renderSuccess\",value:function(){var t=this;if(this.root){var e='\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t
\\n\\t\\t\");this.root.innerHTML=e,setTimeout((function(){t.renderButton()}),3e3)}}},{key:\"renderFailed\",value:function(){var t=this;if(this.root){var e='\\n\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t

'.concat(this.options.failedTitle,'

\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t

').concat(this.options.failedMessage,'

\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t');this.root.innerHTML=e,document.getElementById(\"feedback-close\").addEventListener(\"click\",(function(){t.closeModal()}))}}},{key:\"_addStyle\",value:function(){var t=\"\\n\\t\\t\\t#feedback-root{\\n\\t\\t\\t\\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-wrapper{\\n\\t\\t\\t\\tposition: fixed;\\n\\t\\t\\t\\tz-index: 1000;\\n\\t\\t\\t\\tbottom: 0;\\n\\t\\t\\t\\t\".concat(\"left\"===this.options.position?\"left: 0\":\"right: 0\",\";\\n\\t\\t\\t\\tmargin: 2rem;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\tmax-width: 20rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-main{\\n\\t\\t\\t\\tbackground-color: \").concat(this.options.background,\";\\n\\t\\t\\t\\tcolor: \").concat(this.options.color,\";\\n\\t\\t\\t\\tborder-radius: 0.6rem;\\n\\t\\t\\t\\ttext-align: center;\\n\\t\\t\\t\\toverflow: hidden;\\n\\t\\t\\t\\tbox-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-header{\\n\\t\\t\\t\\tcolor: \").concat(this.options.background,\";\\n\\t\\t\\t\\tbackground-color: \").concat(this.options.primary,\";\\n\\t\\t\\t\\tpadding: 0.8rem 1.25rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-header p{\\n\\t\\t\\t\\tmargin: 0;\\n\\t\\t\\t\\tfont-weight: 600;\\n\\t\\t\\t\\tfont-size: 1.2rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-header a{\\n\\t\\t\\t\\tmargin: 0;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tfont-size: 1rem;\\n\\t\\t\\t\\tmargin-top: 0.5rem;\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\tcolor: \").concat(this.options.background,\";\\n\\t\\t\\t\\tborder: 2px solid \").concat(this.options.primary,\";\\n\\t\\t\\t\\ttext-decoration: none;\\n\\t\\t\\t\\tpadding: 5px 10px\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-header a:hover{\\n\\t\\t\\t\\ttext-decoration: underline;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-header a:focus{\\n\\t\\t\\t\\tborder: 2px solid \").concat(this.options.background,\";\\n\\t\\t\\t\\tborder-radius: 5px;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-content{\\n\\t\\t\\t\\tpadding: 0.7rem 1.5rem;\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\talign-items: center;\\n\\t\\t\\t\\tflex-direction: column;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-content p{\\n\\t\\t\\t\\tmargin: 0;\\n\\t\\t\\t\\tfont-size: 1rem;\\n\\t\\t\\t\\tfont-weight: 600;\\n\\t\\t\\t\\tmargin-top: 0.5rem;\\n\\t\\t\\t\\tmargin-bottom: 0.6rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-content input{\\n\\t\\t\\t\\tborder: 3px solid \").concat(this.options.background,\";\\n\\t\\t\\t\\tfilter: brightness(95%);\\n\\t\\t\\t\\tborder-radius: 10px;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tpadding: 10px;\\n\\t\\t\\t\\tmargin-bottom: 0.5rem;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\tbox-sizing: border-box;\\n\\t\\t\\t\\tfont-size: 1rem;\\n\\t\\t\\t\\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-content textarea{\\n\\t\\t\\t\\toverflow: auto;\\n\\t\\t\\t\\tborder: 3px solid \").concat(this.options.background,\";\\n\\t\\t\\t\\tfilter: brightness(95%);\\n\\t\\t\\t\\tborder-radius: 10px;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tpadding: 10px;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\tbox-sizing: border-box;\\n\\t\\t\\t\\tresize: none;\\n\\t\\t\\t\\tfont-size: 1rem;\\n\\t\\t\\t\\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-content textarea:focus,\\n\\t\\t\\t.feedback-content input:focus{\\n\\t\\t\\t\\tborder: 3px solid \").concat(this.options.primary,\";\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-actions{\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\tmargin-top: 1rem;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-actions button{\\n\\t\\t\\t\\tpadding: 0.5rem;\\n\\t\\t\\t\\tborder-radius: 10px;\\n\\t\\t\\t\\tcursor: pointer;\\n\\t\\t\\t\\tmargin: 0;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tborder: 3px solid rgba(255, 255, 255, 0);\\n\\t\\t\\t\\tappearance: none;\\n\\t\\t\\t\\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\\n\\t\\t\\t\\tuser-select: none;\\n\\t\\t\\t\\tbox-shadow: 0 1px 3px 0 rgba(0,0,0,.1);\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-actions button:focus {\\n\\t\\t\\t\\tborder: 3px solid \").concat(this.options.primary,\";\\n\\t\\t\\t\\tfilter: brightness(105%);\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t.feedback-actions button:active {\\n\\t\\t\\t\\ttransform: scale(0.95);\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-back{\\n\\t\\t\\t\\tbackground: \").concat(this.options.background,\";\\n\\t\\t\\t\\tcolor: rgba(58,71,65);\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-submit{\\n\\t\\t\\t\\tmargin-left: auto;\\n\\t\\t\\t\\tbackground: \").concat(this.options.primary,\";\\n\\t\\t\\t\\tcolor: \").concat(this.options.background,\";\\n\\t\\t\\t\\tfont-weight: 700;\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-loading{\\n\\t\\t\\t\\tmargin-left: auto;\\n\\t\\t\\t\\tbackground: \").concat(this.options.primary,\";\\n\\t\\t\\t\\tcolor: \").concat(this.options.background,\";\\n\\t\\t\\t\\tfont-weight: 700;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-loader{\\n\\t\\t\\t\\tdisplay: inline-block;\\n\\t\\t\\t\\tposition: relative;\\n\\t\\t\\t\\twidth: 15px;\\n\\t\\t\\t\\theight: 15px;\\n\\t\\t\\t\\tmargin-right: 1rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-loader div {\\n\\t\\t\\t\\tbox-sizing: border-box;\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\twidth: 20px;\\n\\t\\t\\t\\theight: 20px;\\n\\t\\t\\t\\tmargin: 0;\\n\\t\\t\\t\\tborder: 3px solid \").concat(this.options.background,\";\\n\\t\\t\\t\\tborder-radius: 50%;\\n\\t\\t\\t\\tanimation: feedback-loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\\n\\t\\t\\t\\tborder-color: \").concat(this.options.background,\" transparent transparent transparent;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-loader div:nth-child(1) {\\n\\t\\t\\t\\tanimation-delay: -0.45s;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-loader div:nth-child(2) {\\n\\t\\t\\t\\tanimation-delay: -0.3s;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-loader div:nth-child(3) {\\n\\t\\t\\t\\tanimation-delay: -0.15s;\\n\\t\\t\\t}\\n\\n\\t\\t\\t@keyframes feedback-loader {\\n\\t\\t\\t\\t0% {\\n\\t\\t\\t\\t\\ttransform: rotate(0deg);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t100% {\\n\\t\\t\\t\\t\\ttransform: rotate(360deg);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t \\n\\t\\t\\t.feedback-content-list{\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\tflex-direction: column;\\n\\t\\t\\t\\talign-items: flex-start;\\n\\t\\t\\t\\tmargin-left: auto;\\n\\t\\t\\t\\tmargin-right: auto;\\n\\t\\t\\t\\tmargin-bottom: 1rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-item {\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\tcursor: pointer;\\n\\t\\t\\t\\tuser-select:none;\\n\\t\\t\\t\\tborder:0;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tbackground: 0;\\n\\t\\t\\t\\tfont-size: 0.9rem;\\n\\t\\t\\t\\ttext-align: left;\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\talign-items: center;\\n\\t\\t\\t\\tflex-direction: row;\\n\\t\\t\\t\\tcolor: \").concat(this.options.color,\";\\n\\t\\t\\t\\tbackground-color: \").concat(this.options.background,\";\\n\\t\\t\\t\\tborder: 2px solid \").concat(this.options.background,\";\\n\\t\\t\\t\\tborder-radius: 10px;\\n\\t\\t\\t\\tpadding: 10px;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-item:hover{\\n\\t\\t\\t\\tfilter: brightness(95%);\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-item:focus{\\n\\t\\t\\t\\tborder: 2px solid \").concat(this.options.primary,\";\\n\\t\\t\\t\\tborder-radius: 5px;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-item span{\\n\\t\\t\\t\\twidth: 1.5rem;\\n\\t\\t\\t\\tmargin-right: 0.2rem;\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\ttext-align: center;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-close{\\n\\t\\t\\t\\tmargin-top: .75rem;\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\talign-items: center;\\n\\t\\t\\t\\tjustify-content: \").concat(\"left\"===this.options.position?\"flex-start\":\"flex-end\",\";\\n\\t\\t\\t\\tflex-direction: row;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-close button{\\n\\t\\t\\t\\tbox-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);\\n\\t\\t\\t\\tcursor: pointer;\\n\\t\\t\\t\\tuser-select:none;\\n\\t\\t\\t\\tborder:0;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tborder-radius: 9999px;\\n\\t\\t\\t\\tpadding: .5rem;\\n\\t\\t\\t\\tbackground: \").concat(this.options.background,\";\\n\\t\\t\\t\\tcolor: \").concat(this.options.color,\";\\n\\t\\t\\t\\tborder: 2px solid \").concat(this.options.background,\";\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-close button:focus{\\n\\t\\t\\t\\tborder: 2px solid \").concat(this.options.primary,\";\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-close button:hover{\\n\\t\\t\\t\\tfilter: brightness(95%);\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-close button:active {\\n\\t\\t\\t\\ttransform: scale(0.95);\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-close svg{\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\twidth: 1.25rem;\\n\\t\\t\\t\\theight: 1.25rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-btn-wrapper{\\n\\t\\t\\t\\tposition: fixed;\\n\\t\\t\\t\\tz-index: 1000;\\n\\t\\t\\t\\tbottom: 0;\\n\\t\\t\\t\\t\").concat(\"left\"===this.options.position?\"left: 0\":\"right: 0\",\";\\n\\t\\t\\t\\tmargin: 2rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-btn{\\n\\t\\t\\t\\theight: 30px;\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\talign-items: center;\\n\\t\\t\\t\\tpadding: 1.2rem 0.7rem;\\n\\t\\t\\t\\tborder-radius: 0.4rem;\\n\\t\\t\\t\\tcursor: pointer;\\n\\t\\t\\t\\tbox-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);\\n\\t\\t\\t\\tuser-select:none;\\n\\t\\t\\t\\tborder:0;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tcolor: \").concat(this.options.background,\";\\n\\t\\t\\t\\tbackground-color: \").concat(this.options.primary,\";\\n\\t\\t\\t\\ttransition: filter .4s ease;\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-btn:hover, #feedback-btn:focus{\\n\\t\\t\\t\\tfilter: brightness(105%);\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-btn:active {\\n\\t\\t\\t\\ttransform: scale(0.95);\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-btn svg{\\n\\t\\t\\t\\twidth: 1.25rem;\\n\\t\\t\\t\\theight: 1.25rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-btn span{\\n\\t\\t\\t\\tfont-weight: 700;\\n\\t\\t\\t\\tfont-size: 1rem;\\n\\t\\t\\t\\tmargin-left: .5rem;\\n\\t\\t\\t}\\n\\t\\t\"),e=document.createComment(\"feedback-js stylesheet\");document.head.appendChild(e);var n=document.createElement(\"link\");n.setAttribute(\"rel\",\"stylesheet\"),n.setAttribute(\"type\",\"text/css\"),n.setAttribute(\"href\",\"data:text/css;charset=UTF-8,\"+encodeURIComponent(t)),document.head.appendChild(n)}}])&&a(e.prototype,n),i&&a(e,i),t}();n.default=c},{}],2:[function(t,e,n){\"use strict\";function o(t){return(o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}Object.defineProperty(n,\"__esModule\",{value:!0}),n.default=void 0;var i=function(t){if(t&&t.__esModule)return t;if(null===t||\"object\"!==o(t)&&\"function\"!=typeof t)return{default:t};var e=a();if(e&&e.has(t))return e.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var c=i?Object.getOwnPropertyDescriptor(t,r):null;c&&(c.get||c.set)?Object.defineProperty(n,r,c):n[r]=t[r]}n.default=t,e&&e.set(t,n);return n}(t(\"./feedback\"));function a(){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap;return a=function(){return t},t}var r=i.default;n.default=r;i.IS_BROWSER?function(){var t=document.querySelector(\"[data-feedback-opts]\"),e=document.querySelector(\"[data-feedback-endpoint]\"),n=document.querySelectorAll(\"[data-feedback-trigger]\");if(!t&&!e&&n.length<1)window.Feedback=i.default;else{var o=t&&t.getAttribute(\"data-feedback-opts\")||\"{}\",a=e&&{endpoint:e.getAttribute(\"data-feedback-endpoint\")}||{},r=Object.assign({},JSON.parse(o),a);window.addEventListener(\"load\",(function(){window.feedback=new i.default(r);var t=n.length<1;(t||window.feedback.options.forceShowButton)&&window.feedback.renderButton(),t||n.forEach((function(t){t.addEventListener(\"click\",(function(){window.feedback.renderModal()}))}))}))}}():console.warn(\"[feedback-js] Detected environment without a `window` object\")},{\"./feedback\":1}]},{},[2])(2)}));","module.exports = flarum.core.compat['forum/components/HeaderPrimary'];","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Feedback from '@betahuhn/feedback-js';\nimport HeaderPrimary from \"flarum/forum/components/HeaderPrimary\";\n\napp.initializers.add('justoverclock/flarum-ext-feedback', () => {\n extend(HeaderPrimary.prototype, 'oninit', function () {\n const apiUrl = app.forum.attribute('apiUrl') + '/feedback';\n const opts = app.forum.attribute('feedback');\n\n if (!opts) {\n console.warn('justoverclock/flarum-ext-feedback is not correctly configured!');\n return;\n }\n\n const options = {\n endpoint: apiUrl,\n events: true,\n emailField: opts.email, // show email input field, default: false\n btnTitle: app.translator.trans('justoverclock-feedback.forum.button-title'), // title of button\n title: app.translator.trans('justoverclock-feedback.forum.feedback-widget.title'), // text at the top\n inputPlaceholder: app.translator.trans('justoverclock-feedback.forum.feedback-widget.placeholder'),\n submitText: app.translator.trans('justoverclock-feedback.forum.feedback-widget.submit'), //'Submit', // text for submit button\n backText: app.translator.trans('justoverclock-feedback.forum.feedback-widget.back'), //'Back', // text for back button\n contactText: app.translator.trans('justoverclock-feedback.forum.feedback-widget.contact-text'), // text for other contact option\n typeMessage: app.translator.trans('justoverclock-feedback.forum.feedback-widget.type-message'), // message for selecting feedback type\n success: app.translator.trans('justoverclock-feedback.forum.feedback-widget.success'), // message displayed on successfull submission\n position: opts.position, // position of button left/right\n primary: app.forum.attribute('themePrimaryColor'), // primary color\n background: opts.backgroundColor, // background color\n color: opts.fontColor, // font color\n types: {\n general: {\n text: app.translator.trans('justoverclock-feedback.forum.feedback-widget.types.general'),\n icon: '⚠️',\n },\n idea: {\n text: app.translator.trans('justoverclock-feedback.forum.feedback-widget.types.idea'),\n icon: '💡',\n },\n love: {\n text: app.translator.trans('justoverclock-feedback.forum.feedback-widget.types.bug'),\n icon: '🐛',\n },\n },\n };\n new Feedback(options).renderButton();\n\n window.addEventListener('feedback-submit', (event) => {\n app.request({\n method: 'POST',\n url: apiUrl,\n body: event.detail,\n });\n });\n });\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@justoverclock/flarum-ext-feedback/webpack/bootstrap","webpack://@justoverclock/flarum-ext-feedback/external \"flarum.core.compat['forum/app']\"","webpack://@justoverclock/flarum-ext-feedback/external \"flarum.core.compat['common/extend']\"","webpack://@justoverclock/flarum-ext-feedback/./node_modules/@betahuhn/feedback-js/dist/feedback-js.min.js","webpack://@justoverclock/flarum-ext-feedback/external \"flarum.core.compat['forum/components/HeaderPrimary']\"","webpack://@justoverclock/flarum-ext-feedback/./src/forum/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","e","a","Error","code","length","1","Array","isArray","iterator","next","done","push","toString","slice","constructor","from","test","TypeError","configurable","writable","IS_BROWSER","window","this","options","assign","id","endpoint","events","emailField","forceShowButton","btnTitle","title","contactText","contactLink","typeMessage","success","inputPlaceholder","submitText","backText","failedTitle","failedMessage","position","primary","background","color","types","general","text","icon","idea","bug","document","createElement","body","insertBefore","firstChild","root","createComment","_addStyle","console","warn","showDefaultBtn","concat","innerHTML","getElementById","addEventListener","renderModal","entries","reduce","closeModal","keys","forEach","onclick","renderForm","current","focus","submitForm","renderButton","email","feedbackType","url","location","href","message","CustomEvent","detail","dispatchEvent","renderSuccess","sendToEndpoint","renderLoading","XMLHttpRequest","open","setRequestHeader","send","JSON","stringify","onreadystatechange","readyState","status","renderFailed","setTimeout","head","appendChild","setAttribute","encodeURIComponent","2","default","WeakMap","has","getOwnPropertyDescriptor","set","querySelector","querySelectorAll","Feedback","getAttribute","parse","feedback","app","initializers","add","extend","HeaderPrimary","apiUrl","forum","attribute","opts","translator","trans","backgroundColor","fontColor","event","request","method"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE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MAAO,CACHC,QAAS,CACLC,KAAMsE,IAAIS,WAAWC,MAAM,8DAC3B/E,KAAM,MAEVC,KAAM,CACFF,KAAMsE,IAAIS,WAAWC,MAAM,2DAC3B/E,KAAM,MAEVE,IAAK,CACDH,KAAMsE,IAAIS,WAAWC,MAAM,0DAC3B/E,KAAM,QAIlB,IAAIiE,IAAS1F,GAASsD,eAEtBxD,OAAO4C,iBAAiB,mBAAmB,SAACiE,GACxCb,IAAIc,QAAQ,CACRC,OAAQ,OACRpD,IAAK0C,EACLrE,KAAM6E,EAAM7C,iBAzChB1B,QAAQC,KAAK","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","module.exports = flarum.core.compat['forum/app'];","module.exports = flarum.core.compat['common/extend'];","!function(t){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this).feedbackJs=t()}}((function(){return function t(e,n,o){function i(r,c){if(!n[r]){if(!e[r]){var d=\"function\"==typeof require&&require;if(!c&&d)return d(r,!0);if(a)return a(r,!0);var s=new Error(\"Cannot find module '\"+r+\"'\");throw s.code=\"MODULE_NOT_FOUND\",s}var l=n[r]={exports:{}};e[r][0].call(l.exports,(function(t){return i(e[r][1][t]||t)}),l,l.exports,t,e,n,o)}return n[r].exports}for(var a=\"function\"==typeof require&&require,r=0;rt.length)&&(e=t.length);for(var n=0,o=new Array(e);n\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\");this.root.innerHTML=e,document.getElementById(\"feedback-btn\").addEventListener(\"click\",(function(){t.renderModal()}))}}},{key:\"renderModal\",value:function(){var t=this;if(this.root){var e='\\n\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t

'.concat(this.options.title,\"

\\n\\t\\t\\t\\t\\t\\t\").concat(this.options.contactLink.length>0?\"\"+this.options.contactText+\"\":\"\",'\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t

').concat(this.options.typeMessage,'

\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t\\t').concat(Object.entries(this.options.types).reduce((function(t,e){var n=o(e,2),i=n[0],a=n[1];return t+'\")}),\"\"),'\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t');this.root.innerHTML=e,document.getElementById(\"feedback-close\").addEventListener(\"click\",(function(){t.closeModal()})),Object.keys(this.options.types).forEach((function(e){document.getElementById(\"feedback-item-\".concat(e)).onclick=function(){t.renderForm(e)}}))}}},{key:\"renderForm\",value:function(t){var e=this;if(this.root){var n=this.options.types[t],o='\\n\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t

'.concat(n.icon,\" \").concat(n.text,'

\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t\\t').concat(this.options.emailField?'':\"\",'\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t');this.current=t,this.root.innerHTML=o,document.getElementById(\"feedback-message\").focus(),document.getElementById(\"feedback-close\").addEventListener(\"click\",(function(){e.closeModal()})),document.getElementById(\"feedback-back\").addEventListener(\"click\",(function(){e.renderModal()})),document.getElementById(\"feedback-submit\").addEventListener(\"click\",(function(){e.submitForm()}))}}},{key:\"closeModal\",value:function(){this.root.innerHTML=\"\",this.showDefaultBtn&&this.renderButton()}},{key:\"submitForm\",value:function(){var t=document.getElementById(\"feedback-message\").value,e=this.options.emailField?document.getElementById(\"feedback-email\").value:void 0,n={id:this.options.id,email:e,feedbackType:this.current,url:window.location.href,message:t};if(this.options.events){var o=new CustomEvent(\"feedback-submit\",{detail:n});return window.dispatchEvent(o),void this.renderSuccess()}this.sendToEndpoint(n)}},{key:\"sendToEndpoint\",value:function(t){var e=this;this.renderLoading();var n=new XMLHttpRequest;n.open(\"POST\",this.options.endpoint),n.setRequestHeader(\"Content-type\",\"application/json\"),n.send(JSON.stringify(t)),n.onreadystatechange=function(){if(4===n.readyState){if(200===n.status)return e.renderSuccess();e.renderFailed()}}}},{key:\"renderLoading\",value:function(){var t=this;this.root&&(document.getElementById(\"feedback-actions\").innerHTML='\\n\\t\\t\\t\\n\\t\\t',document.getElementById(\"feedback-close\").addEventListener(\"click\",(function(){t.closeModal()})))}},{key:\"renderSuccess\",value:function(){var t=this;if(this.root){var e='\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t
\\n\\t\\t\");this.root.innerHTML=e,setTimeout((function(){t.renderButton()}),3e3)}}},{key:\"renderFailed\",value:function(){var t=this;if(this.root){var e='\\n\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t

'.concat(this.options.failedTitle,'

\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t

').concat(this.options.failedMessage,'

\\n\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t');this.root.innerHTML=e,document.getElementById(\"feedback-close\").addEventListener(\"click\",(function(){t.closeModal()}))}}},{key:\"_addStyle\",value:function(){var t=\"\\n\\t\\t\\t#feedback-root{\\n\\t\\t\\t\\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-wrapper{\\n\\t\\t\\t\\tposition: fixed;\\n\\t\\t\\t\\tz-index: 1000;\\n\\t\\t\\t\\tbottom: 0;\\n\\t\\t\\t\\t\".concat(\"left\"===this.options.position?\"left: 0\":\"right: 0\",\";\\n\\t\\t\\t\\tmargin: 2rem;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\tmax-width: 20rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-main{\\n\\t\\t\\t\\tbackground-color: \").concat(this.options.background,\";\\n\\t\\t\\t\\tcolor: \").concat(this.options.color,\";\\n\\t\\t\\t\\tborder-radius: 0.6rem;\\n\\t\\t\\t\\ttext-align: center;\\n\\t\\t\\t\\toverflow: hidden;\\n\\t\\t\\t\\tbox-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-header{\\n\\t\\t\\t\\tcolor: \").concat(this.options.background,\";\\n\\t\\t\\t\\tbackground-color: \").concat(this.options.primary,\";\\n\\t\\t\\t\\tpadding: 0.8rem 1.25rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-header p{\\n\\t\\t\\t\\tmargin: 0;\\n\\t\\t\\t\\tfont-weight: 600;\\n\\t\\t\\t\\tfont-size: 1.2rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-header a{\\n\\t\\t\\t\\tmargin: 0;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tfont-size: 1rem;\\n\\t\\t\\t\\tmargin-top: 0.5rem;\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\tcolor: \").concat(this.options.background,\";\\n\\t\\t\\t\\tborder: 2px solid \").concat(this.options.primary,\";\\n\\t\\t\\t\\ttext-decoration: none;\\n\\t\\t\\t\\tpadding: 5px 10px\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-header a:hover{\\n\\t\\t\\t\\ttext-decoration: underline;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-header a:focus{\\n\\t\\t\\t\\tborder: 2px solid \").concat(this.options.background,\";\\n\\t\\t\\t\\tborder-radius: 5px;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-content{\\n\\t\\t\\t\\tpadding: 0.7rem 1.5rem;\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\talign-items: center;\\n\\t\\t\\t\\tflex-direction: column;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-content p{\\n\\t\\t\\t\\tmargin: 0;\\n\\t\\t\\t\\tfont-size: 1rem;\\n\\t\\t\\t\\tfont-weight: 600;\\n\\t\\t\\t\\tmargin-top: 0.5rem;\\n\\t\\t\\t\\tmargin-bottom: 0.6rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-content input{\\n\\t\\t\\t\\tborder: 3px solid \").concat(this.options.background,\";\\n\\t\\t\\t\\tfilter: brightness(95%);\\n\\t\\t\\t\\tborder-radius: 10px;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tpadding: 10px;\\n\\t\\t\\t\\tmargin-bottom: 0.5rem;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\tbox-sizing: border-box;\\n\\t\\t\\t\\tfont-size: 1rem;\\n\\t\\t\\t\\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-content textarea{\\n\\t\\t\\t\\toverflow: auto;\\n\\t\\t\\t\\tborder: 3px solid \").concat(this.options.background,\";\\n\\t\\t\\t\\tfilter: brightness(95%);\\n\\t\\t\\t\\tborder-radius: 10px;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tpadding: 10px;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\tbox-sizing: border-box;\\n\\t\\t\\t\\tresize: none;\\n\\t\\t\\t\\tfont-size: 1rem;\\n\\t\\t\\t\\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-content textarea:focus,\\n\\t\\t\\t.feedback-content input:focus{\\n\\t\\t\\t\\tborder: 3px solid \").concat(this.options.primary,\";\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-actions{\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\tmargin-top: 1rem;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-actions button{\\n\\t\\t\\t\\tpadding: 0.5rem;\\n\\t\\t\\t\\tborder-radius: 10px;\\n\\t\\t\\t\\tcursor: pointer;\\n\\t\\t\\t\\tmargin: 0;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tborder: 3px solid rgba(255, 255, 255, 0);\\n\\t\\t\\t\\tappearance: none;\\n\\t\\t\\t\\tfont-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;\\n\\t\\t\\t\\tuser-select: none;\\n\\t\\t\\t\\tbox-shadow: 0 1px 3px 0 rgba(0,0,0,.1);\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-actions button:focus {\\n\\t\\t\\t\\tborder: 3px solid \").concat(this.options.primary,\";\\n\\t\\t\\t\\tfilter: brightness(105%);\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t.feedback-actions button:active {\\n\\t\\t\\t\\ttransform: scale(0.95);\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-back{\\n\\t\\t\\t\\tbackground: \").concat(this.options.background,\";\\n\\t\\t\\t\\tcolor: rgba(58,71,65);\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-submit{\\n\\t\\t\\t\\tmargin-left: auto;\\n\\t\\t\\t\\tbackground: \").concat(this.options.primary,\";\\n\\t\\t\\t\\tcolor: \").concat(this.options.background,\";\\n\\t\\t\\t\\tfont-weight: 700;\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-loading{\\n\\t\\t\\t\\tmargin-left: auto;\\n\\t\\t\\t\\tbackground: \").concat(this.options.primary,\";\\n\\t\\t\\t\\tcolor: \").concat(this.options.background,\";\\n\\t\\t\\t\\tfont-weight: 700;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-loader{\\n\\t\\t\\t\\tdisplay: inline-block;\\n\\t\\t\\t\\tposition: relative;\\n\\t\\t\\t\\twidth: 15px;\\n\\t\\t\\t\\theight: 15px;\\n\\t\\t\\t\\tmargin-right: 1rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-loader div {\\n\\t\\t\\t\\tbox-sizing: border-box;\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\twidth: 20px;\\n\\t\\t\\t\\theight: 20px;\\n\\t\\t\\t\\tmargin: 0;\\n\\t\\t\\t\\tborder: 3px solid \").concat(this.options.background,\";\\n\\t\\t\\t\\tborder-radius: 50%;\\n\\t\\t\\t\\tanimation: feedback-loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\\n\\t\\t\\t\\tborder-color: \").concat(this.options.background,\" transparent transparent transparent;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-loader div:nth-child(1) {\\n\\t\\t\\t\\tanimation-delay: -0.45s;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-loader div:nth-child(2) {\\n\\t\\t\\t\\tanimation-delay: -0.3s;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-loader div:nth-child(3) {\\n\\t\\t\\t\\tanimation-delay: -0.15s;\\n\\t\\t\\t}\\n\\n\\t\\t\\t@keyframes feedback-loader {\\n\\t\\t\\t\\t0% {\\n\\t\\t\\t\\t\\ttransform: rotate(0deg);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t100% {\\n\\t\\t\\t\\t\\ttransform: rotate(360deg);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t \\n\\t\\t\\t.feedback-content-list{\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\tflex-direction: column;\\n\\t\\t\\t\\talign-items: flex-start;\\n\\t\\t\\t\\tmargin-left: auto;\\n\\t\\t\\t\\tmargin-right: auto;\\n\\t\\t\\t\\tmargin-bottom: 1rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-item {\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\tcursor: pointer;\\n\\t\\t\\t\\tuser-select:none;\\n\\t\\t\\t\\tborder:0;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tbackground: 0;\\n\\t\\t\\t\\tfont-size: 0.9rem;\\n\\t\\t\\t\\ttext-align: left;\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\talign-items: center;\\n\\t\\t\\t\\tflex-direction: row;\\n\\t\\t\\t\\tcolor: \").concat(this.options.color,\";\\n\\t\\t\\t\\tbackground-color: \").concat(this.options.background,\";\\n\\t\\t\\t\\tborder: 2px solid \").concat(this.options.background,\";\\n\\t\\t\\t\\tborder-radius: 10px;\\n\\t\\t\\t\\tpadding: 10px;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-item:hover{\\n\\t\\t\\t\\tfilter: brightness(95%);\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-item:focus{\\n\\t\\t\\t\\tborder: 2px solid \").concat(this.options.primary,\";\\n\\t\\t\\t\\tborder-radius: 5px;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-item span{\\n\\t\\t\\t\\twidth: 1.5rem;\\n\\t\\t\\t\\tmargin-right: 0.2rem;\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\ttext-align: center;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-close{\\n\\t\\t\\t\\tmargin-top: .75rem;\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\talign-items: center;\\n\\t\\t\\t\\tjustify-content: \").concat(\"left\"===this.options.position?\"flex-start\":\"flex-end\",\";\\n\\t\\t\\t\\tflex-direction: row;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-close button{\\n\\t\\t\\t\\tbox-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);\\n\\t\\t\\t\\tcursor: pointer;\\n\\t\\t\\t\\tuser-select:none;\\n\\t\\t\\t\\tborder:0;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tborder-radius: 9999px;\\n\\t\\t\\t\\tpadding: .5rem;\\n\\t\\t\\t\\tbackground: \").concat(this.options.background,\";\\n\\t\\t\\t\\tcolor: \").concat(this.options.color,\";\\n\\t\\t\\t\\tborder: 2px solid \").concat(this.options.background,\";\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-close button:focus{\\n\\t\\t\\t\\tborder: 2px solid \").concat(this.options.primary,\";\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-close button:hover{\\n\\t\\t\\t\\tfilter: brightness(95%);\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-close button:active {\\n\\t\\t\\t\\ttransform: scale(0.95);\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-close svg{\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\twidth: 1.25rem;\\n\\t\\t\\t\\theight: 1.25rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.feedback-btn-wrapper{\\n\\t\\t\\t\\tposition: fixed;\\n\\t\\t\\t\\tz-index: 1000;\\n\\t\\t\\t\\tbottom: 0;\\n\\t\\t\\t\\t\").concat(\"left\"===this.options.position?\"left: 0\":\"right: 0\",\";\\n\\t\\t\\t\\tmargin: 2rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-btn{\\n\\t\\t\\t\\theight: 30px;\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\talign-items: center;\\n\\t\\t\\t\\tpadding: 1.2rem 0.7rem;\\n\\t\\t\\t\\tborder-radius: 0.4rem;\\n\\t\\t\\t\\tcursor: pointer;\\n\\t\\t\\t\\tbox-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);\\n\\t\\t\\t\\tuser-select:none;\\n\\t\\t\\t\\tborder:0;\\n\\t\\t\\t\\toutline: 0;\\n\\t\\t\\t\\tcolor: \").concat(this.options.background,\";\\n\\t\\t\\t\\tbackground-color: \").concat(this.options.primary,\";\\n\\t\\t\\t\\ttransition: filter .4s ease;\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-btn:hover, #feedback-btn:focus{\\n\\t\\t\\t\\tfilter: brightness(105%);\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-btn:active {\\n\\t\\t\\t\\ttransform: scale(0.95);\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-btn svg{\\n\\t\\t\\t\\twidth: 1.25rem;\\n\\t\\t\\t\\theight: 1.25rem;\\n\\t\\t\\t}\\n\\n\\t\\t\\t#feedback-btn span{\\n\\t\\t\\t\\tfont-weight: 700;\\n\\t\\t\\t\\tfont-size: 1rem;\\n\\t\\t\\t\\tmargin-left: .5rem;\\n\\t\\t\\t}\\n\\t\\t\"),e=document.createComment(\"feedback-js stylesheet\");document.head.appendChild(e);var n=document.createElement(\"link\");n.setAttribute(\"rel\",\"stylesheet\"),n.setAttribute(\"type\",\"text/css\"),n.setAttribute(\"href\",\"data:text/css;charset=UTF-8,\"+encodeURIComponent(t)),document.head.appendChild(n)}}])&&a(e.prototype,n),i&&a(e,i),t}();n.default=c},{}],2:[function(t,e,n){\"use strict\";function o(t){return(o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}Object.defineProperty(n,\"__esModule\",{value:!0}),n.default=void 0;var i=function(t){if(t&&t.__esModule)return t;if(null===t||\"object\"!==o(t)&&\"function\"!=typeof t)return{default:t};var e=a();if(e&&e.has(t))return e.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var c=i?Object.getOwnPropertyDescriptor(t,r):null;c&&(c.get||c.set)?Object.defineProperty(n,r,c):n[r]=t[r]}n.default=t,e&&e.set(t,n);return n}(t(\"./feedback\"));function a(){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap;return a=function(){return t},t}var r=i.default;n.default=r;i.IS_BROWSER?function(){var t=document.querySelector(\"[data-feedback-opts]\"),e=document.querySelector(\"[data-feedback-endpoint]\"),n=document.querySelectorAll(\"[data-feedback-trigger]\");if(!t&&!e&&n.length<1)window.Feedback=i.default;else{var o=t&&t.getAttribute(\"data-feedback-opts\")||\"{}\",a=e&&{endpoint:e.getAttribute(\"data-feedback-endpoint\")}||{},r=Object.assign({},JSON.parse(o),a);window.addEventListener(\"load\",(function(){window.feedback=new i.default(r);var t=n.length<1;(t||window.feedback.options.forceShowButton)&&window.feedback.renderButton(),t||n.forEach((function(t){t.addEventListener(\"click\",(function(){window.feedback.renderModal()}))}))}))}}():console.warn(\"[feedback-js] Detected environment without a `window` object\")},{\"./feedback\":1}]},{},[2])(2)}));","module.exports = flarum.core.compat['forum/components/HeaderPrimary'];","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Feedback from '@betahuhn/feedback-js';\nimport HeaderPrimary from \"flarum/forum/components/HeaderPrimary\";\n\napp.initializers.add('justoverclock/flarum-ext-feedback', () => {\n extend(HeaderPrimary.prototype, 'oninit', function () {\n const apiUrl = app.forum.attribute('apiUrl') + '/feedback';\n const opts = app.forum.attribute('feedback');\n\n if (!opts) {\n console.warn('justoverclock/flarum-ext-feedback is not correctly configured!');\n return;\n }\n\n const options = {\n endpoint: apiUrl,\n events: true,\n emailField: opts.email, // show email input field, default: false\n btnTitle: app.translator.trans('justoverclock-feedback.forum.button-title'), // title of button\n title: app.translator.trans('justoverclock-feedback.forum.feedback-widget.title'), // text at the top\n inputPlaceholder: app.translator.trans('justoverclock-feedback.forum.feedback-widget.placeholder'),\n submitText: app.translator.trans('justoverclock-feedback.forum.feedback-widget.submit'), //'Submit', // text for submit button\n backText: app.translator.trans('justoverclock-feedback.forum.feedback-widget.back'), //'Back', // text for back button\n contactText: app.translator.trans('justoverclock-feedback.forum.feedback-widget.contact-text'), // text for other contact option\n typeMessage: app.translator.trans('justoverclock-feedback.forum.feedback-widget.type-message'), // message for selecting feedback type\n success: app.translator.trans('justoverclock-feedback.forum.feedback-widget.success'), // message displayed on successfull submission\n position: opts.position, // position of button left/right\n primary: app.forum.attribute('themePrimaryColor'), // primary color\n background: opts.backgroundColor, // background color\n color: opts.fontColor, // font color\n types: {\n general: {\n text: app.translator.trans('justoverclock-feedback.forum.feedback-widget.types.general'),\n icon: '⚠️',\n },\n idea: {\n text: app.translator.trans('justoverclock-feedback.forum.feedback-widget.types.idea'),\n icon: '💡',\n },\n bug: {\n text: app.translator.trans('justoverclock-feedback.forum.feedback-widget.types.bug'),\n icon: '🐛',\n },\n },\n };\n new Feedback(options).renderButton();\n\n window.addEventListener('feedback-submit', (event) => {\n app.request({\n method: 'POST',\n url: apiUrl,\n body: event.detail,\n });\n });\n });\n});\n"],"sourceRoot":""} \ No newline at end of file diff --git a/js/src/forum/index.js b/js/src/forum/index.js index 5d78a0b..e4c92f3 100644 --- a/js/src/forum/index.js +++ b/js/src/forum/index.js @@ -38,7 +38,7 @@ app.initializers.add('justoverclock/flarum-ext-feedback', () => { text: app.translator.trans('justoverclock-feedback.forum.feedback-widget.types.idea'), icon: '💡', }, - love: { + bug: { text: app.translator.trans('justoverclock-feedback.forum.feedback-widget.types.bug'), icon: '🐛', }, diff --git a/less/forum.less b/less/forum.less index e69de29..f9a6d82 100644 --- a/less/forum.less +++ b/less/forum.less @@ -0,0 +1,19 @@ +@media (max-width: 600px) { + #feedback-btn span { + text-indent: 100%; + white-space: nowrap; + overflow: hidden; + } + svg.inline.w-5.h-5 { + width: 69.25rem !important; + margin: -10px; + margin-left: -1px; + } + #feedback-btn { + width: 35px; + } + #feedback-btn span { + font-size: 0rem; + + } +}