');if(n){var a=n.split("/");l().each(a,(function(e,t){if(""===(t=a.pop()))return!1;i.prepend(o.octemplate({dir:a.join("/")+"/"+t,name:t}))}))}o.octemplate({dir:"",name:t("core","Home"),classList:"icon-home"},{escapeFunction:null}).addClass("crumb svg crumbhome").prependTo(i),this.$dirTree.find("> nav").prepend(i)},_handleTreeListSelect:function(e,t){var n=e.data,o=l()(e.target).closest(".crumb").data("dir");n._fillFilePicker(o,t);var i=e.target.closest(".oc-dialog"),a=l()(".primary",i);this._changeButtonsText(t,o.split(/[/]+/).pop()),-1!==this.$filePicker.data("mimetype").indexOf("httpd/unix-directory")||this.$filePicker.data("allowDirectoryChooser")?a.prop("disabled",!1):a.prop("disabled",!0)},_handlePickerClick:function(e,t,n){var o=this.$filePicker.closest(".oc-dialog").find(".primary");"file"===t.data("type")?(!0===this.$filePicker.data("multiselect")&&e.ctrlKey||this.$filelist.find(".filepicker_element_selected").removeClass("filepicker_element_selected"),t.toggleClass("filepicker_element_selected"),o.prop("disabled",!1)):"dir"===t.data("type")&&(this._fillFilePicker(this.$filePicker.data("path")+"/"+t.data("entryname"),n),this._changeButtonsText(n,t.data("entryname")),-1!==this.$filePicker.data("mimetype").indexOf("httpd/unix-directory")||this.$filePicker.data("allowDirectoryChooser")?o.prop("disabled",!1):o.prop("disabled",!0))},_changeButtonsText:function(e,n){var o=""===n?t("core","Copy"):t("core","Copy to {folder}",{folder:n}),i=""===n?t("core","Move"):t("core","Move to {folder}",{folder:n}),a=l()(".oc-dialog-buttonrow button");switch(e){case this.FILEPICKER_TYPE_CHOOSE:case this.FILEPICKER_TYPE_CUSTOM:break;case this.FILEPICKER_TYPE_COPY:a.text(o);break;case this.FILEPICKER_TYPE_MOVE:a.text(i);break;case this.FILEPICKER_TYPE_COPY_MOVE:a.eq(0).text(o),a.eq(1).text(i)}}},ne=te,oe=((e,t)=>{let n=e.getElementsByTagName("head")[0].getAttribute("data-requesttoken");return{getToken:()=>n,setToken:e=>{n=e,t("csrf-token-update",{token:n})}}})(document,r.j8),ie=oe.getToken,ae=(oe.setToken,function(e,t){var n,o,i="";if(this.typelessListeners=[],this.closed=!1,this.listeners={},t)for(n in t)i+=n+"="+encodeURIComponent(t[n])+"&";if(i+="requesttoken="+encodeURIComponent(ie()),this.useFallBack||"undefined"==typeof EventSource){var a="oc_eventsource_iframe_"+ae.iframeCount;ae.fallBackSources[ae.iframeCount]=this,this.iframe=l()(""),this.iframe.attr("id",a),this.iframe.hide(),o="&",-1===e.indexOf("?")&&(o="?"),this.iframe.attr("src",e+o+"fallback=true&fallback_id="+ae.iframeCount+"&"+i),l()("body").append(this.iframe),this.useFallBack=!0,ae.iframeCount++}else o="&",-1===e.indexOf("?")&&(o="?"),this.source=new EventSource(e+o+i),this.source.onmessage=function(e){for(var t=0;t18e5},requirePasswordConfirmation(e,n,o){n=void 0!==n?n:{};const i={title:t("core","Authentication required"),text:t("core","This action requires you to confirm your password"),confirm:t("core","Confirm"),label:t("core","Password"),error:""},a=f.default.extend(i,n),r=this;this.requiresPasswordConfirmation()&&Se.dialogs.prompt(a.text,a.title,(function(e,t){e&&""!==t?r._confirmPassword(t,a):f.default.isFunction(o)&&o()}),!0,a.label,!0).then((function(){const e=l()(".oc-dialog:visible");if(e.find(".ui-icon").remove(),e.addClass("password-confirmation"),""!==a.error){const t=l()("").addClass("msg warning").text(a.error);e.find(".oc-dialog-content").append(t)}const t=e.find(".oc-dialog-buttonrow");t.addClass("aside");const n=t.find("button");n.eq(0).hide(),n.eq(1).text(a.confirm)})),this.callback=e},_confirmPassword(e,n){const o=this;l().ajax({url:(0,c.generateUrl)("/login/confirm"),data:{password:e},type:"POST",success(e){window.nc_lastLogin=e.lastLogin,f.default.isFunction(o.callback)&&o.callback()},error(){n.error=t("core","Failed to authenticate, try again"),Se.PasswordConfirmation.requirePasswordConfirmation(o.callback,n)}})}},Ce={_plugins:{},register(e,t){let n=this._plugins[e];n||(n=this._plugins[e]=[]),n.push(t)},getPlugins(e){return this._plugins[e]||[]},attach(e,t,n){const o=this.getPlugins(e);for(let e=0;e-1&&parseInt(navigator.userAgent.split("/").pop())<51){const e=document.querySelectorAll('[fill^="url(#"], [stroke^="url(#"], [filter^="url(#invert"]');for(let t,n=0,o=e.length;n=0?e.substr(t+1):e.length?e.substr(1):""},_decodeQuery:e=>e.replace(/\+/g," "),parseUrlQuery(){const e=this._parseHashQuery();let t;return e&&(t=Se.parseQueryString(this._decodeQuery(e))),t=f.default.extend(t||{},Se.parseQueryString(this._decodeQuery(location.search))),t||{}},_onPopState(e){if(this._cancelPop)return void(this._cancelPop=!1);let t;if(this._handlers.length){t=e&&e.state,f.default.isString(t)?t=Se.parseQueryString(t):t||(t=this.parseUrlQuery()||{});for(let e=0;e="0"&&n<="9";r!==a&&(i++,t[i]="",a=r),t[i]+=n,o++}return t}const Te={History:Ae,humanFileSize:(e,t)=>(0,Pe.sS)(e,t,!0).replace("iB","B"),computerFileSize(e){if("string"!=typeof e)return null;const t=e.toLocaleLowerCase((0,me.aj)()).replaceAll(",",".").trim();let n=null;const o=t.match(/^[\s+]?([0-9]*)(\.([0-9]+))?( +)?([kmgtp]?)i?b?$/i);return null===o?null:(n=parseFloat(t),isFinite(n)?(o[5]&&(n*={"":1,b:1,k:1024,m:1048576,g:1073741824,t:1099511627776,p:0x4000000000000}[o[5]]),n=Math.round(n),n):null)},formatDate:(e,t)=>(void 0===window.TESTING&&Se.debug&&ke.warn("OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment"),t=t||"LLL",ye()(e).format(t)),relativeModifiedDate(e){void 0===window.TESTING&&Se.debug&&ke.warn("OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment");const n=ye()().diff(ye()(e));return n>=0&&n<45e3?t("core","seconds ago"):ye()(e).fromNow()},getScrollBarWidth(){if(this._scrollBarWidth)return this._scrollBarWidth;const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t);const n=e.offsetWidth;t.style.overflow="scroll";let o=e.offsetWidth;return n===o&&(o=t.clientWidth),document.body.removeChild(t),this._scrollBarWidth=n-o,this._scrollBarWidth},stripTime:e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),naturalSortCompare(e,t){let n;const o=xe(e),i=xe(t);for(n=0;o[n]&&i[n];n++)if(o[n]!==i[n]){const e=Number(o[n]),t=Number(i[n]);return e==o[n]&&t==i[n]?e-t:o[n].localeCompare(i[n],Se.getLanguage())}return o.length-i.length},waitFor(e,t){const n=function(){!0!==e()&&setTimeout(n,t)};n()},isCookieSetToValue(e,t){const n=document.cookie.split(";");for(let o=0;o!$_",fileIsBlacklisted:e=>!!e.match(R.blacklist_files_regex),Apps:y,addScript:(e,t,n)=>{let o;OC.debug&&d.warn("OC.addScript is deprecated, use OCP.Loader.loadScript instead");const i=(0,c.generateFilePath)(e,"js",t+".js");return u[i]?n&&n():(o=l().Deferred(),l().getScript(i,(()=>o.resolve())),u[i]=o),u[i]},addStyle:(e,t)=>{OC.debug&&d.warn("OC.addStyle is deprecated, use OCP.Loader.loadStylesheet instead");const n=(0,c.generateFilePath)(e,"css",t+".css");-1===p.indexOf(n)&&(p.push(n),document.createStyleSheet?document.createStyleSheet(n):(t=l()(''),l()("head").append(t)))},AppConfig:A,appConfig:C,appSettings:e=>{if(OC.debug&&P.warn("OC.appSettings is deprecated and will be removed with Nextcloud 18"),void 0===e||void 0===e.appid)throw{name:"MissingParameter",message:"The parameter appid is missing"};var n={scriptName:"settings.php",cache:!0};l().extend(n,e);var o=l()("#appsettings");if(0===o.length)throw{name:"MissingDOMElement",message:'There has be be an element with id "appsettings" for the popup to show.'};var i=l()("#appsettings_popup");if(0===i.length&&(l()("body").prepend(''),(i=l()("#appsettings_popup")).addClass(o.hasClass("topright")?"topright":"bottomleft")),i.is(":visible"))i.hide().remove();else{const e=o.hasClass("topright")?"up":"left";l().get((0,c.generateFilePath)(n.appid,"",n.scriptName),(function(o){i.html(o).ready((function(){if(i.prepend('
'+t("core","Settings")+'
').show(),i.find(".close").bind("click",(function(){i.remove()})),void 0!==n.loadJS){var o;if(!0===n.loadJS)o="settings.js";else{if("string"!=typeof n.loadJS)throw{name:"InvalidParameter",message:'The "loadJS" parameter must be either boolean or a string.'};o=n.loadJS}n.cache&&l().ajaxSetup({cache:!0}),l().getScript((0,c.generateFilePath)(n.appid,"js",o)).fail((function(e,t,n){throw n}))}})).show()}),"html")}},appswebroots:k,Backbone:$,ContactsMenu:K,config:R,currentUser:G,dialogs:ne,EventSource:re,getCurrentUser:()=>({uid:G,displayName:V}),isUserAdmin:()=>pe,L10N:ge,_ajaxConnectionLostHandler:v,_processAjaxError:e=>{(0!==e.status||"abort"!==e.statusText&&"timeout"!==e.statusText&&!Se._reloadCalled)&&(f.default.contains([302,303,307,401],e.status)&&Se.currentUser?setTimeout((function(){if(!Se._userIsNavigatingAway&&!Se._reloadCalled){let e=0;const t=5,o=setInterval((function(){g.showUpdate(n("core","Problem loading page, reloading in %n second","Problem loading page, reloading in %n seconds",t-e)),e>=t&&(clearInterval(o),Se.reload()),e++}),1e3);Se._reloadCalled=!0}}),100):0===e.status&&setTimeout((function(){Se._userIsNavigatingAway||Se._reloadCalled||Se._ajaxConnectionLostHandler()}),100))},registerXHRForErrorProcessing:e=>{e.addEventListener&&(e.addEventListener("load",(()=>{4===e.readyState&&(e.status>=200&&e.status<300||304===e.status||l()(document).trigger(new(l().Event)("ajaxError"),e))})),e.addEventListener("error",(()=>{l()(document).trigger(new(l().Event)("ajaxError"),e)})))},getCapabilities:()=>(OC.debug&&le.warn("OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities"),(0,se.getCapabilities)()),hideMenus:ue,registerMenu:function(e,t,n,o){t.addClass("menu");const i="A"===e.prop("tagName")||"BUTTON"===e.prop("tagName");e.on(i?"click.menu":"click.menu keyup.menu",(function(i){i.preventDefault(),i.key&&"Enter"!==i.key||(t.is(ce)?ue():(ce&&ue(),!0===o&&t.parent().addClass("openedMenu"),e.attr("aria-expanded",!0),t.slideToggle(50,n),ce=t,de=e))}))},showMenu:(e,t,n)=>{t.is(ce)||(ue(),ce=t,de=e,t.trigger(new(l().Event)("beforeShow")),t.show(),t.trigger(new(l().Event)("afterShow")),f.default.isFunction(n)&&n())},unregisterMenu:(e,t)=>{t.is(ce)&&ue(),e.off("click.menu").removeClass("menutoggle"),t.removeClass("menu")},basename:F.EZ,encodePath:F.Ec,dirname:F.XX,isSamePath:F.Mg,joinPaths:F.RQ,getHost:()=>window.location.host,getHostName:()=>window.location.hostname,getPort:()=>window.location.port,getProtocol:()=>window.location.protocol.split(":")[0],getCanonicalLocale:me.aj,getLocale:me.Kd,getLanguage:me.G3,buildQueryString:e=>e?l().map(e,(function(e,t){let n=encodeURIComponent(t);return null!=e&&(n+="="+encodeURIComponent(e)),n})).join("&"):"",parseQueryString:e=>{let t,n;const o={};let i;if(!e)return null;t=e.indexOf("?"),t>=0&&(e=e.substr(t+1));const a=e.replace(/\+/g,"%20").split("&");for(let e=0;e=0?[r.substr(0,t),r.substr(t+1)]:[r],n.length&&(i=decodeURIComponent(n[0]),i&&(o[i]=n.length>1?decodeURIComponent(n[1]):null))}return o},msg:ve,Notification:g,PasswordConfirmation:be,Plugins:Ce,theme:_e,Util:Te,debug:Oe,filePath:c.generateFilePath,generateUrl:c.generateUrl,get:(Ne=window,e=>{const t=e.split("."),n=t.pop();for(let e=0;e(t,n)=>{const o=t.split("."),i=o.pop();for(let t=0;t{window.location=e},reload:()=>{window.location.reload()},requestToken:ie(),linkTo:c.linkTo,linkToOCS:(e,t)=>(0,c.generateOcsUrl)(e,{},{ocsVersion:t||1})+"/",linkToRemote:c.generateRemoteUrl,linkToRemoteBase:e=>(0,c.getRootUrl)()+"/remote.php/"+e,webroot:je};var Ne;(0,r.Ld)("csrf-token-update",(e=>{OC.requestToken=e.token,Le.info("OC.requestToken changed",e.token)}));var Ie=i(79954),Ue=i(97047),$e=i(22660),Fe=i.n($e),Re=i(10204),Me=i.n(Re),Be=i(57290),ze=i.n(Be),De=i(10861),qe=i.n(De);const He={name:"LoginButton",components:{ArrowRight:i(39429).default,NcButton:qe()},props:{value:{type:String,default:t("core","Log in")},valueLoading:{type:String,default:t("core","Logging in …")},loading:{type:Boolean,required:!0},invertedColors:{type:Boolean,default:!1}}};var Ye=i(93379),Ke=i.n(Ye),Ze=i(7795),Ve=i.n(Ze),Ge=i(90569),We=i.n(Ge),Je=i(3565),Qe=i.n(Je),Xe=i(19216),et=i.n(Xe),tt=i(44589),nt=i.n(tt),ot=i(76515),it={};it.styleTagTransform=nt(),it.setAttributes=Qe(),it.insert=We().bind(null,"head"),it.domAPI=Ve(),it.insertStyleElement=et(),Ke()(ot.Z,it),ot.Z&&ot.Z.locals&&ot.Z.locals;var at=i(51900);const rt=(0,at.Z)(He,(function(){var e=this,t=e._self._c;return t("NcButton",{attrs:{type:"primary","native-type":"submit",wide:!0},on:{click:function(t){return e.$emit("click")}},scopedSlots:e._u([{key:"icon",fn:function(){return[e.loading?t("div",{staticClass:"submit-wrapper__icon icon-loading-small-dark"}):t("ArrowRight",{staticClass:"submit-wrapper__icon"})]},proxy:!0}])},[e._v("\n\t"+e._s(e.loading?e.valueLoading:e.value)+"\n\t")])}),[],!1,null,"3fa8511b",null).exports,st={name:"LoginForm",components:{LoginButton:rt,NcPasswordField:Fe(),NcTextField:Me(),NcNoteCard:ze()},props:{username:{type:String,default:""},redirectUrl:{type:[String,Boolean],default:!1},errors:{type:Array,default:()=>[]},messages:{type:Array,default:()=>[]},throttleDelay:{type:Number,default:0},autoCompleteAllowed:{type:Boolean,default:!0},directLogin:{type:Boolean,default:!1}},data(){var e,n;return{loading:!1,timezone:null===(e=new Intl.DateTimeFormat)||void 0===e||null===(n=e.resolvedOptions())||void 0===n?void 0:n.timeZone,timezoneOffset:-(new Date).getTimezoneOffset()/60,headline:t("core","Log in to {productName}",{productName:OC.theme.name}),user:"",password:""}},computed:{isError(){return this.invalidPassword||this.userDisabled||this.throttleDelay>5e3},errorLabel(){return this.invalidPassword?t("core","Wrong username or password."):this.userDisabled?t("core","User disabled"):this.throttleDelay>5e3?t("core","We have detected multiple invalid login attempts from your IP. Therefore your next login is throttled up to 30 seconds."):void 0},apacheAuthFailed(){return-1!==this.errors.indexOf("apacheAuthFailed")},csrfCheckFailed(){return-1!==this.errors.indexOf("csrfCheckFailed")},internalException(){return-1!==this.errors.indexOf("internalexception")},invalidPassword(){return-1!==this.errors.indexOf("invalidpassword")},userDisabled(){return-1!==this.errors.indexOf("userdisabled")},loadingIcon:()=>(0,c.imagePath)("core","loading-dark.gif"),loginActionUrl:()=>(0,c.generateUrl)("login")},mounted(){""===this.username?this.$refs.user.$refs.inputField.$refs.input.focus():(this.user=this.username,this.$refs.password.$refs.inputField.$refs.input.focus())},methods:{updateUsername(){this.$emit("update:username",this.user)},submit(){this.loading=!0,this.$emit("submit")}}};var lt=i(54572),ct={};ct.styleTagTransform=nt(),ct.setAttributes=Qe(),ct.insert=We().bind(null,"head"),ct.domAPI=Ve(),ct.insertStyleElement=et(),Ke()(lt.Z,ct),lt.Z&<.Z.locals&<.Z.locals;const dt=(0,at.Z)(st,(function(){var e=this,t=e._self._c;return t("form",{ref:"loginForm",staticClass:"login-form",attrs:{method:"post",name:"login",action:e.loginActionUrl},on:{submit:e.submit}},[t("fieldset",{staticClass:"login-form__fieldset",attrs:{"data-login-form":""}},[e.apacheAuthFailed?t("NcNoteCard",{attrs:{title:e.t("core","Server side authentication failed!"),type:"warning"}},[e._v("\n\t\t\t"+e._s(e.t("core","Please contact your administrator."))+"\n\t\t")]):e._e(),e._v(" "),e.csrfCheckFailed?t("NcNoteCard",{attrs:{heading:e.t("core","Temporary error"),type:"error"}},[e._v("\n\t\t\t"+e._s(e.t("core","Please try again."))+"\n\t\t")]):e._e(),e._v(" "),e.messages.length>0?t("NcNoteCard",e._l(e.messages,(function(n,o){return t("div",{key:o},[e._v("\n\t\t\t\t"+e._s(n)),t("br")])})),0):e._e(),e._v(" "),e.internalException?t("NcNoteCard",{class:e.t("core","An internal error occurred."),attrs:{type:"warning"}},[e._v("\n\t\t\t"+e._s(e.t("core","Please try again or contact your administrator."))+"\n\t\t")]):e._e(),e._v(" "),t("div",{staticClass:"hidden",attrs:{id:"message"}},[t("img",{staticClass:"float-spinner",attrs:{alt:"",src:e.loadingIcon}}),e._v(" "),t("span",{attrs:{id:"messageText"}}),e._v(" "),t("div",{staticStyle:{clear:"both"}})]),e._v(" "),t("h2",{staticClass:"login-form__headline",attrs:{"data-login-form-headline":""},domProps:{innerHTML:e._s(e.headline)}}),e._v(" "),t("NcTextField",{ref:"user",class:{shake:e.invalidPassword},attrs:{id:"user",label:e.t("core","Account name or email"),"label-visible":!0,name:"user",value:e.user,autocapitalize:"none",spellchecking:!1,autocomplete:e.autoCompleteAllowed?"username":"off",required:"","data-login-form-input-user":""},on:{"update:value":function(t){e.user=t},change:e.updateUsername}}),e._v(" "),t("NcPasswordField",{ref:"password",class:{shake:e.invalidPassword},attrs:{id:"password",name:"password","label-visible":!0,value:e.password,spellchecking:!1,autocapitalize:"none",autocomplete:e.autoCompleteAllowed?"current-password":"off",label:e.t("core","Password"),"helper-text":e.errorLabel,error:e.isError,"data-login-form-input-password":"",required:""},on:{"update:value":function(t){e.password=t}}}),e._v(" "),t("LoginButton",{attrs:{"data-login-form-submit":"",loading:e.loading}}),e._v(" "),e.redirectUrl?t("input",{attrs:{type:"hidden",name:"redirect_url"},domProps:{value:e.redirectUrl}}):e._e(),e._v(" "),t("input",{attrs:{type:"hidden",name:"timezone"},domProps:{value:e.timezone}}),e._v(" "),t("input",{attrs:{type:"hidden",name:"timezone_offset"},domProps:{value:e.timezoneOffset}}),e._v(" "),t("input",{attrs:{type:"hidden",name:"requesttoken"},domProps:{value:e.OC.requestToken}}),e._v(" "),e.directLogin?t("input",{attrs:{type:"hidden",name:"direct",value:"1"}}):e._e()],1)])}),[],!1,null,"57e9d1c0",null).exports;var ut=i(4820),pt=i(37838),ft=i(38213),ht=i(25108);class mt extends Error{}const gt={name:"PasswordLessLoginForm",components:{LoginButton:rt,InformationIcon:pt.Z,LockOpenIcon:ft.Z},props:{username:{type:String,default:""},redirectUrl:{type:[String,Boolean],default:!1},autoCompleteAllowed:{type:Boolean,default:!0},isHttps:{type:Boolean,default:!1},isLocalhost:{type:Boolean,default:!1},hasPublicKeyCredential:{type:Boolean,default:!1}},data(){return{user:this.username,loading:!1,validCredentials:!0}},methods:{authenticate(){ht.debug("passwordless login initiated"),this.getAuthenticationData(this.user).then((e=>(ht.debug(e),e))).then(this.sign).then(this.completeAuthentication).catch((e=>{e instanceof mt?this.validCredentials=!1:ht.debug(e)}))},getAuthenticationData(e){const t=function(e){const t=(e=e.replace(/-/g,"+").replace(/_/g,"/")).length%4;if(t){if(1===t)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");e+=new Array(5-t).join("=")}return window.atob(e)};return function(e){const t=(0,c.generateUrl)("/login/webauthn/start");return ut.default.post(t,{loginName:e}).then((e=>e.data))}(e).then((e=>{if(ht.debug("Obtained PublicKeyCredentialRequestOptions"),ht.debug(e),!Object.prototype.hasOwnProperty.call(e,"allowCredentials"))throw ht.debug("No credentials found."),new mt;return e.challenge=Uint8Array.from(t(e.challenge),(e=>e.charCodeAt(0))),e.allowCredentials=e.allowCredentials.map((function(e){return{...e,id:Uint8Array.from(t(e.id),(e=>e.charCodeAt(0)))}})),ht.debug("Converted PublicKeyCredentialRequestOptions"),ht.debug(e),e})).catch((e=>{throw ht.debug("Error while obtaining data"),e}))},sign(e){const t=function(e){return window.btoa(String.fromCharCode(...e))};return navigator.credentials.get({publicKey:e}).then((e=>{return ht.debug(e),ht.debug(new Uint8Array(e.rawId)),ht.debug(t(new Uint8Array(e.rawId))),{id:e.id,type:e.type,rawId:t(new Uint8Array(e.rawId)),response:{authenticatorData:t(new Uint8Array(e.response.authenticatorData)),clientDataJSON:t(new Uint8Array(e.response.clientDataJSON)),signature:t(new Uint8Array(e.response.signature)),userHandle:e.response.userHandle?(n=new Uint8Array(e.response.userHandle),String.fromCharCode(...n)):null}};var n})).then((e=>(ht.debug(e),e))).catch((e=>{ht.debug("GOT AN ERROR!"),ht.debug(e)}))},completeAuthentication(e){ht.debug("TIME TO COMPLETE");const t=this.redirectUrl;return function(e){const t=(0,c.generateUrl)("/login/webauthn/finish");return ut.default.post(t,{data:e}).then((e=>e.data))}(JSON.stringify(e)).then((e=>{let{defaultRedirectUrl:n}=e;ht.debug("Logged in redirecting"),window.location.href=t||n})).catch((e=>{ht.debug("GOT AN ERROR WHILE SUBMITTING CHALLENGE!"),ht.debug(e)}))},submit(){}}};var vt=i(21280),wt={};wt.styleTagTransform=nt(),wt.setAttributes=Qe(),wt.insert=We().bind(null,"head"),wt.domAPI=Ve(),wt.insertStyleElement=et(),Ke()(vt.Z,wt),vt.Z&&vt.Z.locals&&vt.Z.locals;const yt=(0,at.Z)(gt,(function(){var e=this,t=e._self._c;return(e.isHttps||e.isLocalhost)&&e.hasPublicKeyCredential?t("form",{ref:"loginForm",attrs:{method:"post",name:"login"},on:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)}}},[t("fieldset",[t("p",{staticClass:"grouptop groupbottom"},[t("label",{staticClass:"infield",attrs:{for:"user"}},[e._v(e._s(e.t("core","Username or\temail")))]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"}],ref:"user",attrs:{id:"user",type:"text",name:"user",autocomplete:e.autoCompleteAllowed?"on":"off",placeholder:e.t("core","Username or email"),"aria-label":e.t("core","Username or email"),required:""},domProps:{value:e.user},on:{change:function(t){return e.$emit("update:username",e.user)},input:function(t){t.target.composing||(e.user=t.target.value)}}})]),e._v(" "),e.validCredentials?e._e():t("div",{staticClass:"body-login-container update form__message-box"},[e._v("\n\t\t\t"+e._s(e.t("core","Your account is not setup for passwordless login."))+"\n\t\t")]),e._v(" "),e.validCredentials?t("LoginButton",{attrs:{loading:e.loading},on:{click:e.authenticate}}):e._e()],1)]):e.hasPublicKeyCredential?e.isHttps||e.isLocalhost?e._e():t("div",{staticClass:"body-login-container update"},[t("LockOpenIcon",{attrs:{size:"70"}}),e._v(" "),t("h2",[e._v(e._s(e.t("core","Your connection is not secure")))]),e._v(" "),t("p",{staticClass:"infogroup"},[e._v("\n\t\t"+e._s(e.t("core","Passwordless authentication is only available over a secure connection."))+"\n\t")])],1):t("div",{staticClass:"body-login-container update"},[t("InformationIcon",{attrs:{size:"70"}}),e._v(" "),t("h2",[e._v(e._s(e.t("core","Browser not supported")))]),e._v(" "),t("p",{staticClass:"infogroup"},[e._v("\n\t\t"+e._s(e.t("core","Passwordless authentication is not supported in your browser."))+"\n\t")])],1)}),[],!1,null,"7c43fb49",null).exports;var bt=i(25108);const Ct={name:"ResetPassword",components:{LoginButton:rt,NcNoteCard:ze(),NcTextField:Me()},props:{username:{type:String,required:!0},resetPasswordLink:{type:String,required:!0}},data(){return{error:!1,loading:!1,message:void 0,user:this.username}},watch:{username(e){this.user=e}},methods:{updateUsername(){this.$emit("update:username",this.user)},submit(){this.loading=!0,this.error=!1,this.message="";const e=(0,c.generateUrl)("/lostpassword/email"),t={user:this.user};return ut.default.post(e,t).then((e=>e.data)).then((e=>{if("success"!==e.status)throw new Error("got status ".concat(e.status));this.message="send-success"})).catch((e=>{bt.error("could not send reset email request",e),this.error=!0,this.message="send-error"})).then((()=>{this.loading=!1}))}}};var _t=i(72076),At={};At.styleTagTransform=nt(),At.setAttributes=Qe(),At.insert=We().bind(null,"head"),At.domAPI=Ve(),At.insertStyleElement=et(),Ke()(_t.Z,At),_t.Z&&_t.Z.locals&&_t.Z.locals;const Pt=(0,at.Z)(Ct,(function(){var e=this,t=e._self._c;return t("form",{staticClass:"login-form",on:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)}}},[t("fieldset",{staticClass:"login-form__fieldset"},[t("NcTextField",{attrs:{id:"user",value:e.user,name:"user",autocapitalize:"off",label:e.t("core","Account name or email"),"label-visible":!0,required:""},on:{"update:value":function(t){e.user=t},change:e.updateUsername}}),e._v(" "),t("LoginButton",{attrs:{value:e.t("core","Reset password")}}),e._v(" "),"send-success"===e.message?t("NcNoteCard",{attrs:{type:"success"}},[e._v("\n\t\t\t"+e._s(e.t("core","If this account exists, a password reset message has been sent to its email address. If you do not receive it, verify your email address and/or account name, check your spam/junk folders or ask your local administration for help."))+"\n\t\t")]):"send-error"===e.message?t("NcNoteCard",{attrs:{type:"error"}},[e._v("\n\t\t\t"+e._s(e.t("core","Couldn't send reset email. Please contact your administrator."))+"\n\t\t")]):"reset-error"===e.message?t("NcNoteCard",{attrs:{type:"error"}},[e._v("\n\t\t\t"+e._s(e.t("core","Password cannot be changed. Please contact your administrator."))+"\n\t\t")]):e._e(),e._v(" "),t("a",{staticClass:"login-form__link",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.$emit("abort")}}},[e._v("\n\t\t\t"+e._s(e.t("core","Back to login"))+"\n\t\t")])],1)])}),[],!1,null,"6636f1b2",null).exports,kt={name:"UpdatePassword",components:{LoginButton:rt},props:{username:{type:String,required:!0},resetPasswordTarget:{type:String,required:!0}},data(){return{error:!1,loading:!1,message:void 0,user:this.username,password:"",encrypted:!1,proceed:!1}},watch:{username(e){this.user=e}},methods:{async submit(){this.loading=!0,this.error=!1,this.message="";try{const{data:e}=await ut.default.post(this.resetPasswordTarget,{password:this.password,proceed:this.proceed});if(e&&"success"===e.status)this.message="send-success",this.$emit("update:username",this.user),this.$emit("done");else{if(!e||!e.encryption)throw e&&e.msg?new Error(e.msg):new Error;this.encrypted=!0}}catch(e){this.error=!0,this.message=e.message?e.message:t("core","Password cannot be changed. Please contact your administrator.")}finally{this.loading=!1}}}};var xt=i(74778),Tt={};Tt.styleTagTransform=nt(),Tt.setAttributes=Qe(),Tt.insert=We().bind(null,"head"),Tt.domAPI=Ve(),Tt.insertStyleElement=et(),Ke()(xt.Z,Tt),xt.Z&&xt.Z.locals&&xt.Z.locals;const Ot=(0,at.Z)(kt,(function(){var e=this,t=e._self._c;return t("form",{on:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)}}},[t("fieldset",[t("p",[t("label",{staticClass:"infield",attrs:{for:"password"}},[e._v(e._s(e.t("core","New password")))]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],attrs:{id:"password",type:"password",name:"password",autocomplete:"new-password",autocapitalize:"none",autocorrect:"off",required:"",placeholder:e.t("core","New password")},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),e.encrypted?t("div",{staticClass:"update"},[t("p",[e._v("\n\t\t\t\t"+e._s(e.t("core","Your files are encrypted. There will be no way to get your data back after your password is reset. If you are not sure what to do, please contact your administrator before you continue. Do you really want to continue?"))+"\n\t\t\t")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.proceed,expression:"proceed"}],staticClass:"checkbox",attrs:{id:"encrypted-continue",type:"checkbox"},domProps:{checked:Array.isArray(e.proceed)?e._i(e.proceed,null)>-1:e.proceed},on:{change:function(t){var n=e.proceed,o=t.target,i=!!o.checked;if(Array.isArray(n)){var a=e._i(n,null);o.checked?a<0&&(e.proceed=n.concat([null])):a>-1&&(e.proceed=n.slice(0,a).concat(n.slice(a+1)))}else e.proceed=i}}}),e._v(" "),t("label",{attrs:{for:"encrypted-continue"}},[e._v("\n\t\t\t\t"+e._s(e.t("core","I know what I'm doing"))+"\n\t\t\t")])]):e._e(),e._v(" "),t("LoginButton",{attrs:{loading:e.loading,value:e.t("core","Reset password"),"value-loading":e.t("core","Resetting password")}}),e._v(" "),e.error&&e.message?t("p",{class:{warning:e.error}},[e._v("\n\t\t\t"+e._s(e.message)+"\n\t\t")]):e._e()],1)])}),[],!1,null,"4dc21d74",null).exports;var Et=i(25108);const jt=Ue.Z.parse(location.search);if("1"===jt.clear)try{window.localStorage.clear(),window.sessionStorage.clear(),Et.debug("Browser storage cleared")}catch(e){Et.error("Could not clear browser storage",e)}const Lt={name:"Login",components:{LoginForm:dt,PasswordLessLoginForm:yt,ResetPassword:Pt,UpdatePassword:Ot,NcButton:qe(),NcNoteCard:ze()},data:()=>({loading:!1,user:(0,Ie.j)("core","loginUsername",""),passwordlessLogin:!1,resetPassword:!1,errors:(0,Ie.j)("core","loginErrors",[]),messages:(0,Ie.j)("core","loginMessages",[]),redirectUrl:(0,Ie.j)("core","loginRedirectUrl",!1),throttleDelay:(0,Ie.j)("core","loginThrottleDelay",0),canResetPassword:(0,Ie.j)("core","loginCanResetPassword",!1),resetPasswordLink:(0,Ie.j)("core","loginResetPasswordLink",""),autoCompleteAllowed:(0,Ie.j)("core","loginAutocomplete",!0),resetPasswordTarget:(0,Ie.j)("core","resetPasswordTarget",""),resetPasswordUser:(0,Ie.j)("core","resetPasswordUser",""),directLogin:"1"===jt.direct,hasPasswordless:(0,Ie.j)("core","webauthn-available",!1),countAlternativeLogins:(0,Ie.j)("core","countAlternativeLogins",!1),alternativeLogins:(0,Ie.j)("core","alternativeLogins",[]),isHttps:"https:"===window.location.protocol,isLocalhost:"localhost"===window.location.hostname,hasPublicKeyCredential:void 0!==window.PublicKeyCredential,hideLoginForm:(0,Ie.j)("core","hideLoginForm",!1)}),methods:{passwordResetFinished(){this.resetPasswordTarget="",this.directLogin=!0}}};var St=i(88095),Nt={};Nt.styleTagTransform=nt(),Nt.setAttributes=Qe(),Nt.insert=We().bind(null,"head"),Nt.domAPI=Ve(),Nt.insertStyleElement=et(),Ke()(St.Z,Nt),St.Z&&St.Z.locals&&St.Z.locals;const It=(0,at.Z)(Lt,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"guest-box login-box"},[!e.hideLoginForm||e.directLogin?[t("transition",{attrs:{name:"fade",mode:"out-in"}},[e.passwordlessLogin||e.resetPassword||""!==e.resetPasswordTarget?!e.loading&&e.passwordlessLogin?t("div",{key:"reset",staticClass:"login-additional"},[t("PasswordLessLoginForm",{attrs:{username:e.user,"redirect-url":e.redirectUrl,"auto-complete-allowed":e.autoCompleteAllowed,"is-https":e.isHttps,"is-localhost":e.isLocalhost,"has-public-key-credential":e.hasPublicKeyCredential},on:{"update:username":function(t){e.user=t},submit:function(t){e.loading=!0}}}),e._v(" "),t("a",{staticClass:"login-box__link",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.passwordlessLogin=!1}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Back"))+"\n\t\t\t\t")])],1):!e.loading&&e.canResetPassword?t("div",{key:"reset",staticClass:"login-additional"},[t("div",{staticClass:"lost-password-container"},[e.resetPassword?t("ResetPassword",{attrs:{username:e.user,"reset-password-link":e.resetPasswordLink},on:{"update:username":function(t){e.user=t},abort:function(t){e.resetPassword=!1}}}):e._e()],1)]):""!==e.resetPasswordTarget?t("div",[t("UpdatePassword",{attrs:{username:e.user,"reset-password-target":e.resetPasswordTarget},on:{"update:username":function(t){e.user=t},done:e.passwordResetFinished}})],1):e._e():t("div",[t("LoginForm",{attrs:{username:e.user,"redirect-url":e.redirectUrl,"direct-login":e.directLogin,messages:e.messages,errors:e.errors,"throttle-delay":e.throttleDelay,"auto-complete-allowed":e.autoCompleteAllowed},on:{"update:username":function(t){e.user=t},submit:function(t){e.loading=!0}}}),e._v(" "),e.canResetPassword&&""!==e.resetPasswordLink?t("a",{staticClass:"login-box__link",attrs:{id:"lost-password",href:e.resetPasswordLink}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Forgot password?"))+"\n\t\t\t\t")]):e.canResetPassword&&!e.resetPassword?t("a",{staticClass:"login-box__link",attrs:{id:"lost-password",href:e.resetPasswordLink},on:{click:function(t){t.preventDefault(),e.resetPassword=!0}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Forgot password?"))+"\n\t\t\t\t")]):e._e(),e._v(" "),e.hasPasswordless?[e.countAlternativeLogins?t("div",{staticClass:"alternative-logins"},[e.hasPasswordless?t("a",{staticClass:"button",class:{"single-alt-login-option":e.countAlternativeLogins},attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.passwordlessLogin=!0}}},[e._v("\n\t\t\t\t\t\t\t"+e._s(e.t("core","Log in with a device"))+"\n\t\t\t\t\t\t")]):e._e()]):t("a",{attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.passwordlessLogin=!0}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("core","Log in with a device"))+"\n\t\t\t\t\t")])]:e._e()],2)])]:[t("transition",{attrs:{name:"fade",mode:"out-in"}},[t("NcNoteCard",{attrs:{type:"warning",title:e.t("core","Login form is disabled.")}},[e._v("\n\t\t\t\t"+e._s(e.t("core","Please contact your administrator."))+"\n\t\t\t")])],1)],e._v(" "),t("div",{staticClass:"alternative-logins",attrs:{id:"alternative-logins"}},e._l(e.alternativeLogins,(function(n,o){return t("NcButton",{key:o,class:[n.class],attrs:{type:"secondary",wide:!0,role:"link",href:n.href}},[e._v("\n\t\t\t"+e._s(n.name)+"\n\t\t")])})),1)],2)}),[],!1,null,null,null).exports,Ut={data:()=>({OC:Se}),methods:{t:ge.translate.bind(ge),n:ge.translatePlural.bind(ge)}};a.default.mixin(Ut),(new(a.default.extend(It))).$mount("#login")},76515:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var o=n(87537),i=n.n(o),a=n(23645),r=n.n(a)()(i());r.push([e.id,".button-vue[data-v-3fa8511b]{margin-top:.5rem}","",{version:3,sources:["webpack://./core/src/components/login/LoginButton.vue"],names:[],mappings:"AACA,6BACC,gBAAA",sourcesContent:["\n.button-vue {\n\tmargin-top: .5rem;\n}\n"],sourceRoot:""}]);const s=r},54572:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var o=n(87537),i=n.n(o),a=n(23645),r=n.n(a)()(i());r.push([e.id,".login-form[data-v-57e9d1c0]{text-align:left;font-size:1rem}.login-form__fieldset[data-v-57e9d1c0]{width:100%;display:flex;flex-direction:column;gap:.5rem}.login-form__headline[data-v-57e9d1c0]{text-align:center;overflow-wrap:anywhere}","",{version:3,sources:["webpack://./core/src/components/login/LoginForm.vue"],names:[],mappings:"AACA,6BACC,eAAA,CACA,cAAA,CAEA,uCACC,UAAA,CACA,YAAA,CACA,qBAAA,CACA,SAAA,CAGD,uCACC,iBAAA,CACA,sBAAA",sourcesContent:["\n.login-form {\n\ttext-align: left;\n\tfont-size: 1rem;\n\n\t&__fieldset {\n\t\twidth: 100%;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: .5rem;\n\t}\n\n\t&__headline {\n\t\ttext-align: center;\n\t\toverflow-wrap: anywhere;\n\t}\n}\n"],sourceRoot:""}]);const s=r},21280:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var o=n(87537),i=n.n(o),a=n(23645),r=n.n(a)()(i());r.push([e.id,".body-login-container.update[data-v-7c43fb49]{margin:15px 0}.body-login-container.update.form__message-box[data-v-7c43fb49]{width:240px;margin:5px}","",{version:3,sources:["webpack://./core/src/components/login/PasswordLessLoginForm.vue"],names:[],mappings:"AACA,8CACC,aAAA,CAEA,gEACC,WAAA,CACA,UAAA",sourcesContent:["\n.body-login-container.update {\n\tmargin: 15px 0;\n\n\t&.form__message-box {\n\t\twidth: 240px;\n\t\tmargin: 5px;\n\t}\n}\n"],sourceRoot:""}]);const s=r},72076:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var o=n(87537),i=n.n(o),a=n(23645),r=n.n(a)()(i());r.push([e.id,".login-form[data-v-6636f1b2]{text-align:left;font-size:1rem}.login-form__fieldset[data-v-6636f1b2]{width:100%;display:flex;flex-direction:column;gap:.5rem}.login-form__link[data-v-6636f1b2]{display:block;font-weight:normal !important;padding-bottom:1rem;cursor:pointer;font-size:var(--default-font-size);text-align:center;padding:.5rem 1rem 1rem 1rem}","",{version:3,sources:["webpack://./core/src/components/login/ResetPassword.vue"],names:[],mappings:"AACA,6BACC,eAAA,CACA,cAAA,CAEA,uCACC,UAAA,CACA,YAAA,CACA,qBAAA,CACA,SAAA,CAGD,mCACC,aAAA,CACA,6BAAA,CACA,mBAAA,CACA,cAAA,CACA,kCAAA,CACA,iBAAA,CACA,4BAAA",sourcesContent:["\n.login-form {\n\ttext-align: left;\n\tfont-size: 1rem;\n\n\t&__fieldset {\n\t\twidth: 100%;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: .5rem;\n\t}\n\n\t&__link {\n\t\tdisplay: block;\n\t\tfont-weight: normal !important;\n\t\tpadding-bottom: 1rem;\n\t\tcursor: pointer;\n\t\tfont-size: var(--default-font-size);\n\t\ttext-align: center;\n\t\tpadding: .5rem 1rem 1rem 1rem;\n\t}\n}\n"],sourceRoot:""}]);const s=r},88095:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var o=n(87537),i=n.n(o),a=n(23645),r=n.n(a)()(i());r.push([e.id,"body{font-size:var(--default-font-size)}.login-box{width:320px;box-sizing:border-box}.login-box__link{display:block;padding:1rem;font-size:var(--default-font-size);text-align:center;font-weight:normal !important}.fade-enter-active,.fade-leave-active{transition:opacity .3s}.fade-enter,.fade-leave-to{opacity:0}.alternative-logins{display:flex;flex-direction:column;gap:.75rem}.alternative-logins .button-vue{box-sizing:border-box}","",{version:3,sources:["webpack://./core/src/views/Login.vue"],names:[],mappings:"AACA,KACC,kCAAA,CAGD,WAEC,WAAA,CACA,qBAAA,CAEA,iBACC,aAAA,CACA,YAAA,CACA,kCAAA,CACA,iBAAA,CACA,6BAAA,CAIF,sCACC,sBAAA,CAED,2BACC,SAAA,CAGD,oBACC,YAAA,CACA,qBAAA,CACA,UAAA,CAEA,gCACC,qBAAA",sourcesContent:["\nbody {\n\tfont-size: var(--default-font-size);\n}\n\n.login-box {\n\t// Same size as dashboard panels\n\twidth: 320px;\n\tbox-sizing: border-box;\n\n\t&__link {\n\t\tdisplay: block;\n\t\tpadding: 1rem;\n\t\tfont-size: var(--default-font-size);\n\t\ttext-align: center;\n\t\tfont-weight: normal !important;\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .3s;\n}\n.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {\n\topacity: 0;\n}\n\n.alternative-logins {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 0.75rem;\n\n\t.button-vue {\n\t\tbox-sizing: border-box;\n\t}\n}\n"],sourceRoot:""}]);const s=r},74778:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var o=n(87537),i=n.n(o),a=n(23645),r=n.n(a)()(i());r.push([e.id,"\nfieldset[data-v-4dc21d74] {\n\ttext-align: center;\n}\ninput[type=submit][data-v-4dc21d74] {\n\tmargin-top: 20px;\n}\n","",{version:3,sources:["webpack://./core/src/components/login/UpdatePassword.vue"],names:[],mappings:";AA4IA;CACA,kBAAA;AACA;AAEA;CACA,gBAAA;AACA",sourcesContent:["\x3c!--\n - @copyright Copyright (c) 2019 Julius Härtl \n -\n - @author Julius Härtl \n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see .\n -\n --\x3e\n\n\n\t\n\n\n