Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Feedback.umd.min.js « dist « vue « Feedback « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 423148b782d22a1b3f0efc6f6e132f7ffdd2e5f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["Feedback"]=t(require("CoreHome"),require("vue")):e["Feedback"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function a(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)a.d(n,l,function(t){return e[t]}.bind(null,l));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="plugins/Feedback/vue/dist/",a(a.s="fae3")}({"19dc":function(t,a){t.exports=e},"8bbf":function(e,a){e.exports=t},fae3:function(e,t,a){"use strict";if(a.r(t),a.d(t,"ReviewLinks",(function(){return re})),a.d(t,"RateFeature",(function(){return be})),a.d(t,"FeedbackQuestion",(function(){return Se})),"undefined"!==typeof window){var n=window.document.currentScript,l=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(a.p=l[1])}var o=a("19dc"),c=a("8bbf"),i=["title"],r={class:"ui-confirm ratefeatureDialog"},s={key:0},d={key:0},u={key:1},b=Object(c["createElementVNode"])("br",null,null,-1),k={class:"row"},m={style:{"text-align":"left","margin-top":"16px"}},p={for:"useful",class:"ratelabel"},j=Object(c["createElementVNode"])("br",null,null,-1),O={for:"easy",class:"ratelabel"},f=Object(c["createElementVNode"])("br",null,null,-1),g={for:"configurable",class:"ratelabel"},v=Object(c["createElementVNode"])("br",null,null,-1),h={for:"likeother",class:"ratelabel"},F={key:1},V={key:0},y={key:1},N=Object(c["createElementVNode"])("br",null,null,-1),E={class:"row"},R={style:{"text-align":"left"}},w={for:"missingfeatures",class:"ratelabel"},M=Object(c["createElementVNode"])("br",null,null,-1),D={for:"makeeasier",class:"ratelabel"},x=Object(c["createElementVNode"])("br",null,null,-1),B={for:"speedup",class:"ratelabel"},_=Object(c["createElementVNode"])("br",null,null,-1),C={for:"fixbugs",class:"ratelabel"},S=Object(c["createElementVNode"])("br",null,null,-1),T={for:"dislikeother",class:"ratelabel"},L=Object(c["createElementVNode"])("br",null,null,-1),H={key:2,class:"messageContainer",style:{"text-align":"left"}},U={key:0},q={key:1},z={key:2},Q={key:3},$={key:4},I={key:5},P={key:6},A={key:7},G={key:8},J={key:9,class:"error-text"},Y=["innerHTML"],K=["title","value"],W=["value"],X={class:"ui-confirm ratefeatureDialog"},Z=["innerHTML"],ee={key:0},te={key:1},ae=["value"];function ne(e,t,a,n,l,o){var ne=Object(c["resolveComponent"])("MatomoDialog"),le=Object(c["resolveComponent"])("ReviewLinks");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{title:e.translate("Feedback_RateFeatureTitle",e.$sanitize(e.title)),class:"ratefeature"},[Object(c["createElementVNode"])("div",{class:"iconContainer",onMouseenter:t[2]||(t[2]=function(t){return e.expanded=!0}),onMouseleave:t[3]||(t[3]=function(t){return e.expanded=!1})},[Object(c["createElementVNode"])("img",{onClick:t[0]||(t[0]=function(t){e.likeFeature()}),class:"like-icon",src:"plugins/Feedback/vue/src/RateFeature/thumbs-up.png"}),Object(c["createElementVNode"])("img",{onClick:t[1]||(t[1]=function(t){e.dislikeFeature()}),class:"dislike-icon",src:"plugins/Feedback/vue/src/RateFeature/thumbs-down.png"})],32),Object(c["createVNode"])(ne,{modelValue:e.showFeedbackForm,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.showFeedbackForm=t}),onYes:t[15]||(t[15]=function(t){return e.sendFeedback()}),onValidation:t[16]||(t[16]=function(t){return e.sendFeedback()})},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",r,[e.like?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",s,[e.title?(Object(c["openBlock"])(),Object(c["createElementBlock"])("h2",d,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeNamedFeature",e.title)),1)):Object(c["createCommentVNode"])("",!0),e.title?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("h2",u,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLike")),1)),b,Object(c["createElementVNode"])("div",k,[Object(c["createElementVNode"])("div",m,[Object(c["createElementVNode"])("label",p,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"useful",value:"useful","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.likeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.likeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureUsefulInfo")),1)]),j,Object(c["createElementVNode"])("label",O,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"easy",value:"easy","onUpdate:modelValue":t[5]||(t[5]=function(t){return e.likeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.likeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureEasyToUse")),1)]),f,Object(c["createElementVNode"])("label",g,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"configurable",value:"configurable","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.likeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.likeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureConfigurable")),1)]),v,Object(c["createElementVNode"])("label",h,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"likeother",value:"likeother","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.likeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.likeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureOtherReason")),1)])])])])):Object(c["createCommentVNode"])("",!0),e.like?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",F,[e.title?(Object(c["openBlock"])(),Object(c["createElementBlock"])("h2",V,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeNamedFeature",e.title)),1)):Object(c["createCommentVNode"])("",!0),e.title?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("h2",y,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislike")),1)),N,Object(c["createElementVNode"])("div",E,[Object(c["createElementVNode"])("div",R,[Object(c["createElementVNode"])("label",w,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"missingfeatures",value:"missingfeatures","onUpdate:modelValue":t[8]||(t[8]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.dislikeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeAddMissingFeatures")),1)]),M,Object(c["createElementVNode"])("label",D,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"makeeasier",value:"makeeasier","onUpdate:modelValue":t[9]||(t[9]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.dislikeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeMakeEasier")),1)]),x,Object(c["createElementVNode"])("label",B,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"speedup",value:"speedup","onUpdate:modelValue":t[10]||(t[10]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.dislikeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeSpeedUp")),1)]),_,Object(c["createElementVNode"])("label",C,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"fixbugs",value:"fixbugs","onUpdate:modelValue":t[11]||(t[11]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.dislikeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeFixBugs")),1)]),S,Object(c["createElementVNode"])("label",T,[Object(c["withDirectives"])(Object(c["createElementVNode"])("input",{type:"radio",id:"dislikeother",value:"dislikeother","onUpdate:modelValue":t[12]||(t[12]=function(t){return e.dislikeReason=t}),class:"rateradio"},null,512),[[c["vModelRadio"],e.dislikeReason]]),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureOtherReason")),1)]),L])])])),e.likeReason||e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",H,[e.likeReason&&"useful"===e.likeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",U,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtraUseful")),1)):Object(c["createCommentVNode"])("",!0),e.likeReason&&"easy"===e.likeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",q,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtraEasy")),1)):Object(c["createCommentVNode"])("",!0),e.likeReason&&"configurable"===e.likeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",z,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtraConfigurable")),1)):Object(c["createCommentVNode"])("",!0),e.likeReason&&"likeother"===e.likeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",Q,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtra")),1)):Object(c["createCommentVNode"])("",!0),e.dislikeReason&&"missingfeatures"===e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",$,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraMissing")),1)):Object(c["createCommentVNode"])("",!0),e.dislikeReason&&"makeeasier"===e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",I,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraEasier")),1)):Object(c["createCommentVNode"])("",!0),e.dislikeReason&&"fixbugs"===e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",P,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraBugs")),1)):Object(c["createCommentVNode"])("",!0),e.dislikeReason&&"speedup"===e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",A,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraSpeed")),1)):Object(c["createCommentVNode"])("",!0),e.dislikeReason&&"dislikeother"===e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",G,Object(c["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtra")),1)):Object(c["createCommentVNode"])("",!0),e.errorMessage?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",J,Object(c["toDisplayString"])(e.errorMessage),1)):Object(c["createCommentVNode"])("",!0),Object(c["withDirectives"])(Object(c["createElementVNode"])("textarea",{ref:"feedbackText",class:Object(c["normalizeClass"])(["materialize-textarea",{"has-error":e.errorMessage}]),id:"feedbacktext","onUpdate:modelValue":t[13]||(t[13]=function(t){return e.feedbackMessage=t})},null,2),[[c["vModelText"],e.feedbackMessage]]),e.likeReason||e.dislikeReason?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",{key:10,innerHTML:e.$sanitize(e.translate("Feedback_Policy","\n            <a rel='nofollow' href='https://matomo.org/privacy-policy/' target='_blank'>","</a>"))},null,8,Y)):Object(c["createCommentVNode"])("",!0)])):Object(c["createCommentVNode"])("",!0),Object(c["createElementVNode"])("input",{class:"btn",type:"button",role:"validation",title:e.translate("Feedback_RateFeatureSendFeedbackInformation"),value:e.translate("Feedback_SendFeedback")},null,8,K),Object(c["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Cancel")},null,8,W)])]})),_:1},8,["modelValue"]),Object(c["createVNode"])(ne,{modelValue:e.ratingDone,"onUpdate:modelValue":t[17]||(t[17]=function(t){return e.ratingDone=t})},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",X,[Object(c["createElementVNode"])("h2",{innerHTML:e.$sanitize(e.translate("Feedback_ThankYouHeart","<i class='icon-heart red-text'></i>"))},null,8,Z),e.like?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",ee,[Object(c["createVNode"])(le)])):Object(c["createCommentVNode"])("",!0),e.like?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",te,Object(c["toDisplayString"])(e.translate("Feedback_AppreciateFeedback")),1)),Object(c["createElementVNode"])("input",{type:"button",value:e.translate("General_Close"),role:"yes"},null,8,ae)])]})),_:1},8,["modelValue"])],8,i)}var le={class:"requestReview"},oe=Object(c["createStaticVNode"])('<br><br><div class="review-links"><div class="review-link"><a href="https://www.capterra.com/p/182627/Matomo-Analytics/" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/capterra.svg"></div><div class="link">Capterra</div></a></div><div class="review-link"><a href="https://www.g2crowd.com/products/matomo-formerly-piwik/details" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/g2crowd.svg"></div><div class="link">G2 Crowd</div></a></div><div class="review-link"><a href="https://www.producthunt.com/posts/matomo-2" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/producthunt.svg"></div><div class="link">Product Hunt</div></a></div><div class="review-link"><a href="https://www.saasworthy.com/product/matomo" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/saasworthy.png"></div><div class="link">SaaSworthy</div></a></div><div class="review-link"><a href="https://www.trustradius.com/products/matomo/reviews" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/trustradius.svg"></div><div class="link">TrustRadius</div></a></div></div>',3);function ce(e,t,a,n,l,o){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",le,[Object(c["createElementVNode"])("p",null,Object(c["toDisplayString"])(e.translate("Feedback_PleaseLeaveExternalReviewForMatomo")),1),oe])}var ie=Object(c["defineComponent"])({});ie.render=ce;var re=ie,se=window,de=se.$,ue=Object(c["defineComponent"])({props:{title:String},components:{MatomoDialog:o["MatomoDialog"],ReviewLinks:re},data:function(){return{like:!1,likeReason:null,dislikeReason:null,ratingDone:!1,expanded:!1,showFeedbackForm:!1,feedbackMessage:"",errorMessage:null}},watch:{likeReason:"doFocusInput",dislikeReason:"doFocusInput"},methods:{dislikeFeature:function(){this.ratingDone=!1,this.like=!1,this.showFeedbackForm=!0,this.errorMessage=null,this.likeReason=null,this.dislikeReason=null,this.feedbackMessage=""},likeFeature:function(){this.ratingDone=!1,this.like=!0,this.showFeedbackForm=!0,this.errorMessage=null,this.likeReason=null,this.dislikeReason=null,this.feedbackMessage=""},doFocusInput:function(){var e=this;this.$nextTick((function(){e.focusInput()}))},focusInput:function(){null!=this.$refs.feedbackText&&this.$refs.feedbackText.focus()},sendFeedback:function(){var e=this;this.errorMessage=null,o["AjaxHelper"].fetch({method:"Feedback.sendFeedbackForFeature",featureName:this.title,like:this.like?1:0,choice:this.like?this.likeReason:this.dislikeReason,message:this.feedbackMessage}).then((function(t){"success"===t.value?(de(".modal").modal("close"),e.ratingDone=!0,e.feedbackMessage=""):e.errorMessage=t.value}))}}});ue.render=ne;var be=ue,ke=(Object(o["createAngularJsAdapter"])({component:be,scope:{title:{angularJsBind:"@"}},directiveName:"piwikRateFeature"}),{key:0,class:"bannerHeader"}),me=Object(c["createElementVNode"])("i",{class:"icon-heart red-text"},null,-1),pe=Object(c["createElementVNode"])("i",{class:"icon-close white-text"},null,-1),je=[pe],Oe={class:"ratefeature"},fe={class:"ui-confirm ratefeatureDialog"},ge=["innerHTML"],ve=Object(c["createElementVNode"])("br",null,null,-1),he={class:"messageContainer"},Fe={key:0,class:"error-text"},Ve=Object(c["createElementVNode"])("br",null,null,-1),ye=["innerHTML"],Ne=["value"],Ee=["value"],Re={class:"ui-confirm ratefeatureDialog"},we=["innerHTML"],Me=["value"];
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function De(e,t,a,n,l,o){var i=Object(c["resolveComponent"])("MatomoDialog");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",null,[e.isHidden?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",ke,[Object(c["createElementVNode"])("span",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("Feedback_FeedbackTitle"))+" ",1),me]),Object(c["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(){return e.showQuestion&&e.showQuestion.apply(e,arguments)}),class:"btn"},Object(c["toDisplayString"])(e.translate("Feedback_Question".concat(e.question))),1),Object(c["createElementVNode"])("a",{class:"close-btn",onClick:t[1]||(t[1]=function(){return e.disableReminder&&e.disableReminder.apply(e,arguments)})},je)])),Object(c["createElementVNode"])("div",Oe,[Object(c["createVNode"])(i,{modelValue:e.showFeedbackForm,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.showFeedbackForm=t}),onValidation:t[4]||(t[4]=function(t){return e.sendFeedback()})},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",fe,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("Feedback_Question".concat(e.question))),1),Object(c["createElementVNode"])("p",{innerHTML:e.$sanitize(e.translate("Feedback_FeedbackSubtitle","<i class='icon-heart red-text'></i>"))},null,8,ge),ve,Object(c["createElementVNode"])("div",he,[e.errorMessage?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",Fe,Object(c["toDisplayString"])(e.errorMessage),1)):Object(c["createCommentVNode"])("",!0),Object(c["withDirectives"])(Object(c["createElementVNode"])("textarea",{id:"message",class:Object(c["normalizeClass"])({"has-error":e.errorMessage}),"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.feedbackMessage=t})},null,2),[[c["vModelText"],e.feedbackMessage]])]),Ve,Object(c["createElementVNode"])("p",{innerHTML:e.$sanitize(e.feedbackPolicy)},null,8,ye),Object(c["createElementVNode"])("input",{type:"button",role:"validation",value:e.translate("Feedback_SendFeedback")},null,8,Ne),Object(c["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Cancel")},null,8,Ee)])]})),_:1},8,["modelValue"]),Object(c["createVNode"])(i,{modelValue:e.feedbackDone,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.feedbackDone=t})},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",Re,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("Feedback_ThankYou")),1),Object(c["createElementVNode"])("p",{innerHTML:e.$sanitize(e.translate("Feedback_ThankYourForFeedback","<i class='icon-heart red-text'></i>"))},null,8,we),Object(c["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Close")},null,8,Me)])]})),_:1},8,["modelValue"])])])}var xe=window,Be=xe.$,_e="feedback-question",Ce=Object(c["defineComponent"])({props:{showQuestionBanner:String},components:{MatomoDialog:o["MatomoDialog"]},computed:{isHidden:function(){return"0"===this.showQuestionBanner||!!this.hide},feedbackPolicy:function(){return Object(o["translate"])("Feedback_Policy",'<a rel="nofollow" href="https://matomo.org/privacy-policy/" target="_blank">',"</a>")}},data:function(){return{questionText:"",question:0,hide:null,feedbackDone:!1,expanded:!1,showFeedbackForm:!1,feedbackMessage:null,errorMessage:null}},watch:{showFeedbackForm:function(e){this.questionText=Object(o["translate"])("Feedback_Question".concat(this.question)),e&&setInterval((function(){Be("#message").focus()}),500)}},created:function(){"0"!==this.showQuestionBanner&&this.initQuestion()},methods:{initQuestion:function(){Object(o["getCookie"])(_e)?this.question=parseInt(Object(o["getCookie"])(_e)):this.question=this.getRandomIntBetween(0,4);var e=(this.question+1)%4,t=6048e5;Object(o["setCookie"])(_e,"".concat(e),t)},getRandomIntBetween:function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)},showQuestion:function(){this.showFeedbackForm=!0,this.errorMessage=null},disableReminder:function(){o["AjaxHelper"].fetch({method:"Feedback.updateFeedbackReminderDate"}),this.hide=!0},sendFeedback:function(){var e=this;this.errorMessage=null,o["AjaxHelper"].fetch({method:"Feedback.sendFeedbackForSurvey",question:this.questionText,message:this.feedbackMessage}).then((function(t){"success"===t.value?(Be(".modal").modal("close"),e.feedbackDone=!0,e.hide=!0):e.errorMessage=t.value}))}}});Ce.render=De;var Se=Ce;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */Object(o["createAngularJsAdapter"])({component:Se,scope:{showQuestionBanner:{angularJsBind:"@"}},directiveName:"piwikFeedbackQuestion"})}})}));
//# sourceMappingURL=Feedback.umd.min.js.map