File: D:/web/matomo.circ/plugins/TwoFactorAuth/vue/dist/TwoFactorAuth.umd.min.js
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("Login"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome","Login",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["TwoFactorAuth"]=t(require("CoreHome"),require("Login"),require("vue"),require("CorePluginsAdmin")):e["TwoFactorAuth"]=t(e["CoreHome"],e["Login"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,o,n){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="plugins/TwoFactorAuth/vue/dist/",o(o.s="fae3")}({"19dc":function(t,o){t.exports=e},"5b81":function(e,o){e.exports=t},"8bbf":function(e,t){e.exports=o},a5a2:function(e,t){e.exports=n},fae3:function(e,t,o){"use strict";if(o.r(t),o.d(t,"ShowRecoveryCodes",(function(){return f})),o.d(t,"ShowRecoveryCodesPage",(function(){return T})),o.d(t,"SetupTwoFactorAuth",(function(){return he})),o.d(t,"LoginTwoFactorAuth",(function(){return Ye})),o.d(t,"SetupFinished",(function(){return tt})),o.d(t,"UserSettings",(function(){return Nt})),"undefined"!==typeof window){var n=window.document.currentScript,r=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(o.p=r[1])}var c=o("8bbf"),a=Object(c["createElementVNode"])("br",null,null,-1),l=Object(c["createElementVNode"])("br",null,null,-1),i={class:"alert alert-warning"},s={key:0,class:"twoFactorRecoveryCodes browser-default"},u={key:1,class:"alert alert-danger"},d=Object(c["createElementVNode"])("br",null,null,-1),b=["value"],p=["value"],m=["value"];function O(e,t,o,n,r,O){var j,h=Object(c["resolveDirective"])("select-on-focus");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",null,[Object(c["createElementVNode"])("p",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("TwoFactorAuth_RecoveryCodesExplanation")),1),a,l]),Object(c["createElementVNode"])("div",i,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_RecoveryCodesSecurity")),1),null!==(j=e.codes)&&void 0!==j&&j.length?Object(c["withDirectives"])((Object(c["openBlock"])(),Object(c["createElementBlock"])("ul",s,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.codes,(function(e,t){return Object(c["openBlock"])(),Object(c["createElementBlock"])("li",{key:t},Object(c["toDisplayString"])(e.toUpperCase().match(/.{1,4}/g).join("-")),1)})),128))],512)),[[h,{}]]):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",u,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_RecoveryCodesAllUsed")),1)),Object(c["createElementVNode"])("p",null,[d,Object(c["createElementVNode"])("input",{type:"button",class:"btn backupRecoveryCode",onClick:t[0]||(t[0]=function(t){e.downloadRecoveryCodes(),e.$emit("downloaded")}),value:e.translate("General_Download"),style:{"margin-right":"3.5px"}},null,8,b),Object(c["createElementVNode"])("input",{type:"button",class:"btn backupRecoveryCode",onClick:t[1]||(t[1]=function(t){e.print(),e.$emit("downloaded")}),value:e.translate("General_Print"),style:{"margin-right":"3.5px"}},null,8,p),Object(c["createElementVNode"])("input",{type:"button",class:"btn backupRecoveryCode",onClick:t[2]||(t[2]=function(t){e.copyRecoveryCodesToClipboard(),e.$emit("downloaded")}),value:e.translate("General_Copy")},null,8,m)])])}var j=o("19dc"),h=Object(c["defineComponent"])({props:{codes:{type:Array,default:function(){return[]}}},directives:{SelectOnFocus:j["SelectOnFocus"]},emits:["downloaded"],methods:{copyRecoveryCodesToClipboard:function(){var e=document.createElement("textarea");e.value=this.codes.join("\n"),e.setAttribute("readonly",""),e.style.position="absolute",e.style.left="-9999px",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)},downloadRecoveryCodes:function(){j["Matomo"].helper.sendContentAsDownload("analytics_recovery_codes.txt",this.codes.join("\n"))},print:function(){window.print()}}});h.render=O;var f=h,y=Object(c["createElementVNode"])("br",null,null,-1),w=Object(c["createElementVNode"])("br",null,null,-1),g={key:0,class:"alert alert-success"},v={key:1,class:"alert alert-danger"},C=["action"],N=["value"],E=["value"];function V(e,t,o,n,r,a){var l=Object(c["resolveComponent"])("ShowRecoveryCodes"),i=Object(c["resolveComponent"])("ContentBlock");return Object(c["openBlock"])(),Object(c["createBlock"])(i,{"content-title":e.contentTitle},{default:Object(c["withCtx"])((function(){return[Object(c["createVNode"])(l,{codes:e.codes},null,8,["codes"]),Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_GenerateNewRecoveryCodes")),1),Object(c["createElementVNode"])("p",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("TwoFactorAuth_GenerateNewRecoveryCodesInfo")),1),y,w]),e.regenerateSuccess?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",g,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_RecoveryCodesRegenerated")),1)):Object(c["createCommentVNode"])("",!0),e.regenerateError?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",v,Object(c["toDisplayString"])(e.translate("General_ExceptionSecurityCheckFailed")),1)):Object(c["createCommentVNode"])("",!0),Object(c["createElementVNode"])("form",{method:"post",action:e.showRecoveryCodesLink},[Object(c["createElementVNode"])("input",{type:"hidden",name:"regenerateNonce",value:e.regenerateNonce},null,8,N),Object(c["createElementVNode"])("input",{type:"submit",class:"btn",value:e.translate("TwoFactorAuth_GenerateNewRecoveryCodes")},null,8,E)],8,C)]})),_:1},8,["content-title"])}var S=Object(c["defineComponent"])({props:{codes:Array,regenerateSuccess:Boolean,regenerateError:Boolean,regenerateNonce:{type:String,required:!0}},components:{ContentBlock:j["ContentBlock"],ShowRecoveryCodes:f},computed:{contentTitle:function(){var e=Object(j["translate"])("TwoFactorAuth_TwoFactorAuthentication"),t=Object(j["translate"])("TwoFactorAuth_RecoveryCodes");return"".concat(e," - ").concat(t)},showRecoveryCodesLink:function(){return"?".concat(j["MatomoUrl"].stringify(Object.assign(Object.assign({},j["MatomoUrl"].urlParsed.value),{},{module:"TwoFactorAuth",action:"showRecoveryCodes"})))}}});S.render=V;var T=S,A={class:"setupTwoFactorAuthentication",ref:"root"},F={key:0,class:"alert alert-warning"},k=["disabled"],_=Object(c["createElementVNode"])("a",{name:"twoFactorStep2",id:"twoFactorStep2",style:{opacity:"0"}},null,-1),D=["innerHTML"],x=Object(c["createElementVNode"])("br",null,null,-1),B=Object(c["createElementVNode"])("a",{name:"twoFactorStep3",id:"twoFactorStep3",style:{opacity:"0"}},null,-1),M={key:0,class:"message_container"},L=Object(c["createTextVNode"])(": "),R=["innerHTML"],q=Object(c["createElementVNode"])("br",null,null,-1),U=["action"],P=["value"],G=["disabled","value"],I={class:"ui-confirm two-fa-qr-code-dialog"},H={class:"row"},$={class:"col l8 offset-l2 m10 offset-m1 s12 center-align"},z={id:"qrcode",ref:"qrcode",title:""},Q={class:"text-code"},X=["innerHTML"],Y={class:"row"},W={class:"col l8 offset-l2 m10 offset-m1 s12"},J=["value"],K=["value"];function Z(e,t,o,n,r,a){var l=this,i=Object(c["resolveComponent"])("ShowRecoveryCodes"),s=Object(c["resolveComponent"])("InstallOTPApp"),u=Object(c["resolveComponent"])("Notification"),d=Object(c["resolveComponent"])("Field"),b=Object(c["resolveComponent"])("MatomoDialog"),p=Object(c["resolveComponent"])("ContentBlock"),m=Object(c["resolveDirective"])("copy-to-clipboard");return Object(c["openBlock"])(),Object(c["createBlock"])(p,{"content-title":e.standalone?e.translate("TwoFactorAuth_RequiredToSetUpTwoFactorAuthentication"):e.translate("TwoFactorAuth_SetUpTwoFactorAuthentication")},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",A,[e.isAlreadyUsing2fa?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",F,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_WarningChangingConfiguredDevice")),1)):Object(c["createCommentVNode"])("",!0),Object(c["createElementVNode"])("p",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_SetupIntroFollowSteps")),1),Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_StepX",1))+" - "+Object(c["toDisplayString"])(e.translate("TwoFactorAuth_RecoveryCodes")),1),Object(c["createVNode"])(i,{codes:e.codes,onDownloaded:t[0]||(t[0]=function(e){return l.hasDownloadedRecoveryCode=!0})},null,8,["codes"]),Object(c["withDirectives"])(Object(c["createElementVNode"])("div",{class:"alert alert-info backupRecoveryCodesAlert"},Object(c["toDisplayString"])(e.translate("TwoFactorAuth_SetupBackupRecoveryCodes")),513),[[c["vShow"],1===e.step]]),Object(c["createElementVNode"])("p",null,[Object(c["withDirectives"])(Object(c["createElementVNode"])("button",{class:"btn goToStep2",onClick:t[1]||(t[1]=function(t){return e.nextStep()}),disabled:!e.hasDownloadedRecoveryCode},Object(c["toDisplayString"])(e.translate("General_Next")),9,k),[[c["vShow"],1===e.step]])]),_,Object(c["withDirectives"])(Object(c["createElementVNode"])("div",null,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_StepX",2))+" - "+Object(c["toDisplayString"])(e.translate("TwoFactorAuth_SetupAuthenticatorOnDevice")),1),Object(c["createVNode"])(s),Object(c["createElementVNode"])("p",{innerHTML:e.$sanitize(e.setupAuthenticatorOnDeviceStep2ShowCodes)},null,8,D),Object(c["createElementVNode"])("p",null,[x,Object(c["withDirectives"])(Object(c["createElementVNode"])("button",{class:"btn showOtpCodes",onClick:t[2]||(t[2]=function(t){return e.showQrCodeModal()})},Object(c["toDisplayString"])(e.translate("TwoFactorAuth_ShowCodes")),513),[[c["vShow"],e.step>=2]])])],512),[[c["vShow"],e.step>=2]]),B,Object(c["withDirectives"])(Object(c["createElementVNode"])("div",null,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_StepX",3))+" - "+Object(c["toDisplayString"])(e.translate("TwoFactorAuth_ConfirmSetup")),1),Object(c["createElementVNode"])("p",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_VerifyAuthCodeIntro")),1),e.accessErrorString?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",M,[Object(c["createElementVNode"])("div",null,[Object(c["createVNode"])(u,{noclear:!0,context:"error"},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("strong",null,Object(c["toDisplayString"])(e.translate("General_Error")),1),L,Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.accessErrorString)},null,8,R),q]})),_:1})])])):Object(c["createCommentVNode"])("",!0),Object(c["createElementVNode"])("form",{method:"post",class:"setupConfirmAuthCodeForm",autocorrect:"off",autocapitalize:"none",autocomplete:"off",action:e.linkTo({module:"TwoFactorAuth",action:e.submitAction})},[Object(c["createElementVNode"])("div",null,[Object(c["createVNode"])(d,{uicontrol:"text",name:"authCode",title:e.translate("TwoFactorAuth_AuthenticationCode"),modelValue:e.authCode,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.authCode=t}),maxlength:6,placeholder:"123456",autocomplete:"one-time-code","inline-help":e.translate("TwoFactorAuth_VerifyAuthCodeHelp")},null,8,["title","modelValue","inline-help"])]),Object(c["createElementVNode"])("input",{type:"hidden",name:"authCodeNonce",value:e.authCodeNonce},null,8,P),Object(c["createElementVNode"])("input",{type:"submit",class:"btn confirmAuthCode",disabled:6!==e.authCode.length,value:e.translate("General_Confirm")},null,8,G)],8,U)],512),[[c["vShow"],e.step>=3]]),Object(c["createVNode"])(b,{modelValue:e.qrCodeDialogVisible,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.qrCodeDialogVisible=t}),onValidation:t[5]||(t[5]=function(t){e.closeQrCodeModal(),e.nextStep()}),options:{focusSelector:".modal-action.btn"}},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",I,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_Your2FaAuthSecret")),1),Object(c["createElementVNode"])("div",H,[Object(c["createElementVNode"])("div",$,[Object(c["createElementVNode"])("p",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_ShowCodeModalInstructions1")),1),Object(c["createElementVNode"])("p",null,[Object(c["createElementVNode"])("span",z,null,512)]),Object(c["createElementVNode"])("p",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_ShowCodeModalInstructions2")),1),Object(c["createElementVNode"])("div",Q,[Object(c["withDirectives"])(Object(c["createElementVNode"])("pre",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.newSecret),1)],512),[[m,{}]])]),Object(c["createElementVNode"])("p",{innerHTML:e.$sanitize(e.showCodeModalInstructions3)},null,8,X)])]),Object(c["createElementVNode"])("div",Y,[Object(c["createElementVNode"])("div",W,[Object(c["createElementVNode"])("h3",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_DontHaveOTPApp")),1),Object(c["createVNode"])(s)])]),Object(c["createElementVNode"])("input",{role:"validation",type:"button",value:e.translate("General_Continue")},null,8,J),Object(c["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_Cancel")},null,8,K)])]})),_:1},8,["modelValue","options"])],512)]})),_:1},8,["content-title"])}var ee=o("a5a2"),te=Object(c["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:"https://github.com/andOTP/andOTP#downloads"},"andOTP",-1),oe=Object(c["createTextVNode"])(", "),ne=Object(c["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:"https://authy.com/guides/github/"},"Authy",-1),re=Object(c["createTextVNode"])(", "),ce=Object(c["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:"https://support.1password.com/one-time-passwords/"},"1Password",-1),ae=Object(c["createTextVNode"])(", "),le=Object(c["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:"https://helpdesk.lastpass.com/multifactor-authentication-options/lastpass-authenticator/"},"LastPass Authenticator",-1),ie=Object(c["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:"https://support.google.com/accounts/answer/1066447"},"Google Authenticator",-1),se=Object(c["createTextVNode"])(". ");
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/function ue(e,t,o,n,r,a){return Object(c["openBlock"])(),Object(c["createElementBlock"])("p",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("TwoFactorAuth_SetupAuthenticatorOnDeviceStep1"))+" ",1),te,oe,ne,re,ce,ae,le,Object(c["createTextVNode"])(", "+Object(c["toDisplayString"])(e.translate("General_Or"))+" ",1),ie,se])}var de=Object(c["defineComponent"])({});de.render=ue;var be=de,pe=window,me=pe.QRCode,Oe=pe.$,je=Object(c["defineComponent"])({props:{isAlreadyUsing2fa:Boolean,accessErrorString:String,submitAction:{type:String,required:!0},authCodeNonce:{type:String,required:!0},newSecret:{type:String,required:!0},codes:Array,twoFaBarCodeSetupUrl:{type:String,required:!0},standalone:Boolean},components:{InstallOTPApp:be,MatomoDialog:j["MatomoDialog"],ShowRecoveryCodes:f,Notification:j["Notification"],Field:ee["Field"],ContentBlock:j["ContentBlock"]},directives:{CopyToClipboard:j["CopyToClipboard"]},data:function(){return{step:1,hasDownloadedRecoveryCode:!1,authCode:"",qrCodeDialogVisible:!1}},mounted:function(){var e=this;setTimeout((function(){var t=e.$refs.qrcode;new me(t,{text:e.twoFaBarCodeSetupUrl,width:200,height:200}),Oe(t).attr("title",""),e.accessErrorString&&(e.step=3,e.scrollToEnd())}))},methods:{scrollToEnd:function(){var e=this;setTimeout((function(){var t="";2===e.step?t="#twoFactorStep2":3===e.step&&(t="#twoFactorStep3"),t&&j["Matomo"].helper.lazyScrollTo(t,50,!0)}),50)},showQrCodeModal:function(){this.qrCodeDialogVisible=!0},closeQrCodeModal:function(){this.qrCodeDialogVisible=!1},nextStep:function(){this.step+=1,this.step>3&&(this.step=3),this.scrollToEnd()},linkTo:function(e){return"?".concat(j["MatomoUrl"].stringify(Object.assign(Object.assign({},j["MatomoUrl"].urlParsed.value),e)))}},computed:{setupAuthenticatorOnDeviceStep2ShowCodes:function(){return Object(j["translate"])("TwoFactorAuth_SetupAuthenticatorOnDeviceStep2ShowCodes",Object(j["translate"])("TwoFactorAuth_ShowCodes"))},showCodeModalInstructions3:function(){return Object(j["translate"])("TwoFactorAuth_ShowCodeModalInstructions3",Object(j["translate"])("General_Continue"))}}});je.render=Z;var he=je,fe={class:"message_container"},ye=Object(c["createTextVNode"])(": "),we=["innerHTML"],ge=Object(c["createElementVNode"])("br",null,null,-1),ve={class:"row"},Ce={class:"col s12 input-field"},Ne=["value"],Ee=Object(c["createElementVNode"])("input",{type:"text",name:"form_authcode",placeholder:"",id:"form_authcode",class:"input",value:"",size:"20",autocorrect:"off",autocapitalize:"none",autocomplete:"one-time-code",tabindex:"10",autofocus:"autofocus"},null,-1),Ve={for:"form_authcode"},Se=Object(c["createElementVNode"])("i",{class:"icon-user icon"},null,-1),Te={class:"row actions"},Ae={class:"col s12"},Fe=["value"],ke=["innerHTML"],_e=Object(c["createElementVNode"])("br",null,null,-1),De=Object(c["createElementVNode"])("br",null,null,-1),xe=Object(c["createElementVNode"])("br",null,null,-1),Be=["href"],Me=Object(c["createElementVNode"])("br",null,null,-1),Le=["href"],Re=Object(c["createElementVNode"])("br",null,null,-1),qe=["href"];function Ue(e,t,o,n,r,a){var l=Object(c["resolveComponent"])("FormErrors"),i=Object(c["resolveComponent"])("Notification"),s=Object(c["resolveComponent"])("ContentBlock");return Object(c["openBlock"])(),Object(c["createBlock"])(s,{"content-title":e.translate("TwoFactorAuth_TwoFactorAuthentication")},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",fe,[Object(c["createVNode"])(l,{"form-errors":e.formData.errors},null,8,["form-errors"]),e.accessErrorString?(Object(c["openBlock"])(),Object(c["createBlock"])(i,{key:0,noclear:!0,context:"error"},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("strong",null,Object(c["toDisplayString"])(e.translate("General_Error")),1),ye,Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.accessErrorString)},null,8,we),ge]})),_:1})):Object(c["createCommentVNode"])("",!0)]),Object(c["createElementVNode"])("form",Object(c["mergeProps"])(e.formDataAttributes,{class:"loginTwoFaForm"}),[Object(c["createElementVNode"])("div",ve,[Object(c["createElementVNode"])("div",Ce,[Object(c["createElementVNode"])("input",{type:"hidden",name:"form_nonce",id:"login_form_nonce",value:e.formNonce},null,8,Ne),Ee,Object(c["createElementVNode"])("label",Ve,[Se,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("TwoFactorAuth_AuthenticationCode")),1)])])]),Object(c["createElementVNode"])("div",Te,[Object(c["createElementVNode"])("div",Ae,[Object(c["createElementVNode"])("input",{class:"submit btn",id:"login_form_submit",type:"submit",value:e.translate("TwoFactorAuth_Verify"),tabindex:"100"},null,8,Fe)])])],16),Object(c["createElementVNode"])("p",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("TwoFactorAuth_VerifyIdentifyExplanation"))+" ",1),Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.learnMoreText)},null,8,ke),_e,De,Object(c["createElementVNode"])("strong",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_DontHaveYourMobileDevice")),1),xe,Object(c["createElementVNode"])("a",{href:e.externalRawLink("https://matomo.org/faq/how-to/faq_27248"),rel:"noreferrer noopener",target:"_blank"},Object(c["toDisplayString"])(e.translate("TwoFactorAuth_EnterRecoveryCodeInstead")),9,Be),Me,Object(c["createElementVNode"])("a",{href:e.mailToLink,rel:"noreferrer noopener"},Object(c["toDisplayString"])(e.translate("TwoFactorAuth_AskSuperUserResetAuthenticationCode")),9,Le),Re,Object(c["createElementVNode"])("a",{href:e.logoutLink,rel:"noreferrer noopener"},Object(c["toDisplayString"])(e.translate("General_Logout")),9,qe)])]})),_:1},8,["content-title"])}var Pe=o("5b81");function Ge(e,t){return Qe(e)||ze(e,t)||He(e,t)||Ie()}function Ie(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function He(e,t){if(e){if("string"===typeof e)return $e(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?$e(e,t):void 0}}function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function ze(e,t){var o=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,c=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done);a=!0)if(c.push(n.value),t&&c.length===t)break}catch(i){l=!0,r=i}finally{try{a||null==o["return"]||o["return"]()}finally{if(l)throw r}}return c}}function Qe(e){if(Array.isArray(e))return e}var Xe=Object(c["defineComponent"])({props:{formData:{type:Object,required:!0},accessErrorString:String,formNonce:{type:String,required:!0},loginModule:{type:String,required:!0},piwikUrl:String,userLogin:{type:String,required:!0},contactEmail:{type:String,required:!0}},components:{ContentBlock:j["ContentBlock"],Notification:j["Notification"],FormErrors:Pe["FormErrors"]},computed:{learnMoreText:function(){return Object(j["translate"])("General_LearnMore",Object(j["externalLink"])("https://matomo.org/faq/general/faq_27245"),"</a>")},mailToLink:function(){return"mailto:".concat(this.contactEmail,"?").concat(j["MatomoUrl"].stringify({subject:Object(j["translate"])("TwoFactorAuth_NotPossibleToLogIn"),body:Object(j["translate"])("TwoFactorAuth_LostAuthenticationDevice","\n\n","\n\n",this.piwikUrl||"","\n\n",this.userLogin,Object(j["externalRawLink"])("https://matomo.org/faq/how-to/faq_27248"))}))},logoutLink:function(){return"?".concat(j["MatomoUrl"].stringify({module:this.loginModule,action:"logout"}))},formDataAttributes:function(){return Object.fromEntries(this.formData.attributes.split(/\s+/g).filter((function(e){return e})).map((function(e){return e.split("=")})).map((function(e){var t=Ge(e,2),o=t[0],n=t[1];return[o,j["Matomo"].helper.htmlDecode(n.substr(1,n.length-2))]})))}}});Xe.render=Ue;var Ye=Xe,We={class:"successMessage"},Je=Object(c["createElementVNode"])("br",null,null,-1),Ke=["href"];function Ze(e,t,o,n,r,a){var l=Object(c["resolveComponent"])("ContentBlock");return Object(c["openBlock"])(),Object(c["createBlock"])(l,{class:"twoFactorSetupFinished"},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("h2",We,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_SetupFinishedTitle")),1),Object(c["createElementVNode"])("h3",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_SetupFinishedSubtitle")),1),Object(c["createElementVNode"])("p",null,[Je,Object(c["createElementVNode"])("a",{class:"btn",href:e.userSecurityLink},Object(c["toDisplayString"])(e.translate("General_Continue")),9,Ke)])]})),_:1})}var et=Object(c["defineComponent"])({components:{ContentBlock:j["ContentBlock"]},computed:{userSecurityLink:function(){return"?".concat(j["MatomoUrl"].stringify(Object.assign(Object.assign({},j["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"userSecurity"})))}}});et.render=Ze;var tt=et,ot=["innerHTML"],nt={key:0},rt={class:"twoFaStatusEnabled"},ct={key:1},at={key:0},lt=Object(c["createElementVNode"])("br",null,null,-1),it=Object(c["createElementVNode"])("br",null,null,-1),st=["href"],ut={key:1},dt=["href"],bt=["href"],pt=["value"],mt=["href"],Ot={key:2},jt=Object(c["createElementVNode"])("br",null,null,-1),ht=Object(c["createElementVNode"])("br",null,null,-1),ft=["href"],yt={id:"confirmDisable2FA",class:"ui-confirm",ref:"confirmDisable2FA"},wt=["value"],gt=["value"];function vt(e,t,o,n,r,a){var l=Object(c["resolveComponent"])("ContentBlock");return Object(c["openBlock"])(),Object(c["createBlock"])(l,{"content-title":e.contentTitle,class:"userSettings2FA"},{default:Object(c["withCtx"])((function(){return[Object(c["createElementVNode"])("p",{innerHTML:e.$sanitize(e.twoFactorAuthIntro)},null,8,ot),e.isEnabled?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",nt,[Object(c["createElementVNode"])("strong",rt,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_TwoFactorAuthenticationIsEnabled")),1)])):Object(c["createCommentVNode"])("",!0),e.isEnabled?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",ct,[e.isForced?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",at,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("TwoFactorAuth_TwoFactorAuthenticationRequired"))+" ",1),lt,it,Object(c["createElementVNode"])("a",{class:"btn btn-link enable2FaLink",href:e.setupTwoFactorAuthLink,style:{"margin-right":"3.5px"}},Object(c["toDisplayString"])(e.translate("TwoFactorAuth_ConfigureDifferentDevice")),9,st)])):(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",ut,[Object(c["createElementVNode"])("a",{class:"btn btn-link enable2FaLink",href:e.setupTwoFactorAuthLink,style:{"margin-right":"3.5px"}},Object(c["toDisplayString"])(e.translate("TwoFactorAuth_ConfigureDifferentDevice")),9,dt),Object(c["createElementVNode"])("a",{href:e.disableTwoFactorAuthLink,style:{display:"none"},id:"disable2fa"},"disable2fa",8,bt),Object(c["createElementVNode"])("input",{type:"button",class:"btn btn-link disable2FaLink",onClick:t[0]||(t[0]=function(t){return e.onDisable2FaLinkClick()}),value:e.translate("TwoFactorAuth_DisableTwoFA"),style:{"margin-right":"3.5px"}},null,8,pt)])),Object(c["createElementVNode"])("a",{class:"btn btn-link showRecoveryCodesLink",href:e.showRecoveryCodesLink},Object(c["toDisplayString"])(e.translate("TwoFactorAuth_ShowRecoveryCodes")),9,mt)])):(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",Ot,[Object(c["createElementVNode"])("strong",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_TwoFactorAuthenticationIsDisabled")),1),jt,ht,Object(c["createElementVNode"])("a",{class:"btn btn-link enable2FaLink",href:e.setupTwoFactorAuthLink},Object(c["toDisplayString"])(e.translate("TwoFactorAuth_EnableTwoFA")),9,ft)])),Object(c["createElementVNode"])("div",yt,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("TwoFactorAuth_ConfirmDisableTwoFA")),1),Object(c["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,wt),Object(c["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,gt)],512)]})),_:1},8,["content-title"])}var Ct=Object(c["defineComponent"])({props:{isEnabled:Boolean,isForced:Boolean,disableNonce:{type:String,required:!0}},components:{ContentBlock:j["ContentBlock"]},computed:{contentTitle:function(){var e=Object(j["translate"])("TwoFactorAuth_TwoFactorAuthentication"),t=Object(j["translate"])("TwoFactorAuth_TwoFAShort");return"".concat(e," (").concat(t,")")},twoFactorAuthIntro:function(){return Object(j["translate"])("TwoFactorAuth_TwoFactorAuthenticationIntro",Object(j["externalLink"])("https://matomo.org/faq/general/faq_27245"),"</a>")},setupTwoFactorAuthLink:function(){return"?".concat(j["MatomoUrl"].stringify(Object.assign(Object.assign({},j["MatomoUrl"].urlParsed.value),{},{module:"TwoFactorAuth",action:"setupTwoFactorAuth"})))},disableTwoFactorAuthLink:function(){return"?".concat(j["MatomoUrl"].stringify(Object.assign(Object.assign({},j["MatomoUrl"].urlParsed.value),{},{module:"TwoFactorAuth",action:"disableTwoFactorAuth",disableNonce:this.disableNonce})))},showRecoveryCodesLink:function(){return"?".concat(j["MatomoUrl"].stringify(Object.assign(Object.assign({},j["MatomoUrl"].urlParsed.value),{},{module:"TwoFactorAuth",action:"showRecoveryCodes"})))}},methods:{onDisable2FaLinkClick:function(){var e=this.disableNonce;j["Matomo"].helper.modalConfirm(this.$refs.confirmDisable2FA,{yes:function(){j["MatomoUrl"].updateUrl({module:"TwoFactorAuth",action:"disableTwoFactorAuth",disableNonce:e})}})}}});Ct.render=vt;var Nt=Ct;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/}})}));
//# sourceMappingURL=TwoFactorAuth.umd.min.js.map