(()=>{var e,r,s,i={24050(e,r,s){"use strict";var i={};s.r(i),s.d(i,{clearIconCache:()=>gt,getIconUrl:()=>ft});var o=s(85471),a=s(81222),l=s(63814),c=s(82490),u=s(74095),d=s(371),h=s(53334),p=s(46855),f=s(32073),m=s(16044),g=s(82182);const v={name:"LoginButton",components:{ArrowRight:s(33691).A,NcButton:u.A},props:{value:{type:String,default:(0,h.Tl)("core","Log in")},valueLoading:{type:String,default:(0,h.Tl)("core","Logging in …")},loading:{type:Boolean,required:!0},invertedColors:{type:Boolean,default:!1}}};var y=s(85072),b=s.n(y),w=s(97825),A=s.n(w),_=s(77659),x=s.n(_),C=s(55056),k=s.n(C),P=s(10540),E=s.n(P),S=s(41113),T=s.n(S),N=s(14430),O={};O.styleTagTransform=T(),O.setAttributes=k(),O.insert=x().bind(null,"head"),O.domAPI=A(),O.insertStyleElement=E(),b()(N.A,O),N.A&&N.A.locals&&N.A.locals;var j=s(14486);const I=(0,j.A)(v,function(){var e=this,t=e._self._c;return t("NcButton",{attrs:{variant:"primary",type:"submit",wide:!0,disabled:e.loading},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,"bbf83d00",null).exports,L={computed:{userNameInputLengthIs255(){return this.user.length>=255},userInputHelperText(){if(this.userNameInputLengthIs255)return t("core","Email length is at max (255)")}}},M={name:"LoginForm",components:{LoginButton:I,NcCheckboxRadioSwitch:f.A,NcPasswordField:m.A,NcTextField:g.A,NcNoteCard:d.A},mixins:[L],props:{username:{type:String,default:""},redirectUrl:{type:[Boolean,String],default:!1},errors:{type:Array,default:()=>[]},messages:{type:Array,default:()=>[]},throttleDelay:{type:Number,default:0},autoCompleteAllowed:{type:Boolean,default:!0},remembermeAllowed:{type:Boolean,default:!0},directLogin:{type:Boolean,default:!1},emailStates:{type:Array,default:()=>[]}},setup:()=>({t:h.Tl,headlineText:(0,h.Tl)("core","Log in to {productName}",{productName:OC.theme.name},void 0,{sanitize:!1,escape:!1}),loginTimeout:(0,a.C)("core","loginTimeout",300),requestToken:window.OC.requestToken,timezone:(new Intl.DateTimeFormat)?.resolvedOptions()?.timeZone,timezoneOffset:-(new Date).getTimezoneOffset()/60}),data:e=>({loading:!1,user:e.username,password:"",rememberme:["1"],visible:!1}),computed:{resetFormTimeout(){return this.loginTimeout<=0?()=>{}:(0,p.A)(this.handleResetForm,1e3*this.loginTimeout)},isError(){return this.invalidPassword||this.userDisabled||this.throttleDelay>5e3},errorLabel(){return this.invalidPassword?(0,h.Tl)("core","Wrong login or password."):this.userDisabled?(0,h.Tl)("core","This account is disabled"):this.throttleDelay>5e3?(0,h.Tl)("core","Too many incorrect login attempts. Please try again in 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,l.d0)("core","loading-dark.gif"),loginActionUrl:()=>(0,l.Jv)("login"),emailEnabled(){return this.emailStates.every(e=>"1"===e)},loginText(){return this.emailEnabled?(0,h.Tl)("core","Account name or email"):(0,h.Tl)("core","Account name")}},watch:{password(){this.resetFormTimeout()}},mounted(){""===this.username?this.$refs.user.$refs.inputField.$refs.input.focus():this.$refs.password.$refs.inputField.$refs.input.focus()},methods:{handleResetForm(){this.password=""},updateUsername(){this.$emit("update:username",this.user)},submit(e){this.visible=!1,this.loading?e.preventDefault():(this.loading=!0,this.$emit("submit"))}}};var R=s(44098),B={};B.styleTagTransform=T(),B.setAttributes=k(),B.insert=x().bind(null,"head"),B.domAPI=A(),B.insertStyleElement=E(),b()(R.A,B),R.A&&R.A.locals&&R.A.locals;const F=(0,j.A)(M,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","Session error"),type:"error"}},[e._v("\n\t\t\t"+e._s(e.t("core","It appears your session token has expired, please refresh the page and try again."))+"\n\t\t")]):e._e(),e._v(" "),e.messages.length>0?t("NcNoteCard",e._l(e.messages,function(n,r){return t("div",{key:r},[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":""}},[e._v("\n\t\t\t"+e._s(e.headlineText)+"\n\t\t")]),e._v(" "),t("NcTextField",{ref:"user",class:{shake:e.invalidPassword},attrs:{id:"user",label:e.loginText,name:"user",maxlength:255,autocapitalize:"none",spellchecking:!1,autocomplete:e.autoCompleteAllowed?"username":"off",required:"",error:e.userNameInputLengthIs255,"helper-text":e.userInputHelperText,"data-login-form-input-user":""},on:{change:e.updateUsername},model:{value:e.user,callback:function(t){e.user=t},expression:"user"}}),e._v(" "),t("NcPasswordField",{ref:"password",class:{shake:e.invalidPassword},attrs:{id:"password",name:"password",spellchecking:!1,autocapitalize:"none",autocomplete:e.autoCompleteAllowed?"current-password":"off",label:e.t("core","Password"),"helper-text":e.errorLabel,error:e.isError,visible:e.visible,"data-login-form-input-password":"",required:""},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}}),e._v(" "),e.remembermeAllowed?t("NcCheckboxRadioSwitch",{ref:"rememberme",attrs:{id:"rememberme",name:"rememberme",value:"1","data-login-form-input-rememberme":""},model:{value:e.rememberme,callback:function(t){e.rememberme=t},expression:"rememberme"}},[e._v("\n\t\t\t"+e._s(e.t("core","Remember me"))+"\n\t\t")]):e._e(),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.requestToken}}),e._v(" "),e.directLogin?t("input",{attrs:{type:"hidden",name:"direct",value:"1"}}):e._e()],1)])},[],!1,null,"f91ba7fe",null).exports;function H(){return U.stubThis(void 0!==globalThis?.PublicKeyCredential&&"function"==typeof globalThis.PublicKeyCredential)}const U={stubThis:e=>e};class D extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}}const z=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){const e=new Error("Cancelling existing WebAuthn API call for new one");e.name="AbortError",this.controller.abort(e)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}};function q(e){const t=new Uint8Array(e);let n="";for(const e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function $(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,"="),s=atob(r),i=new ArrayBuffer(s.length),o=new Uint8Array(i);for(let e=0;ee;function Y(e){const{id:t}=e;return{...e,id:$(t),transports:e.transports}}const K=["cross-platform","platform"];function W(e){if(e&&!(K.indexOf(e)<0))return e}var J=s(42507),G=s(41423);const X={name:"LockOpenIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Q=(0,j.A)(X,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon lock-open-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports;var Z=s(21777),ee=s(35947);const te=null===(ne=(0,Z.HW)())?(0,ee.YK)().setApp("core").build():(0,ee.YK)().setApp("core").setUid(ne.uid).build();var ne;(0,ee.YK)().setApp("unified-search").detectUser().build();var re=s(19051);class se extends Error{}const ie=(0,o.pM)({name:"PasswordLessLoginForm",components:{LoginButton:I,InformationIcon:G.A,LockOpenIcon:Q,NcEmptyContent:J.A,NcTextField:g.A},props:{username:{type:String,default:""},redirectUrl:{type:[Boolean,String],default:!1},autoCompleteAllowed:{type:Boolean,default:!0},isHttps:{type:Boolean,default:!1},isLocalhost:{type:Boolean,default:!1}},setup:()=>({supportsWebauthn:H()}),data(){return{user:this.username,loading:!1,validCredentials:!0}},methods:{async authenticate(){if(this.$refs.loginForm.checkValidity()){te.debug("passwordless login initiated");try{const e=await async function(e){const t=(0,l.Jv)("/login/webauthn/start"),{data:n}=await re.Ay.post(t,{loginName:e});if(!n.allowCredentials||0===n.allowCredentials.length)throw te.error("No valid credentials returned for webauthn"),new se;return await async function(e){!e.optionsJSON&&e.challenge&&(console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!H())throw new Error("WebAuthn is not supported in this browser");let s;0!==t.allowCredentials?.length&&(s=t.allowCredentials?.map(Y));const i={...t,challenge:$(t.challenge),allowCredentials:s},o={};if(n){if(!await function(){if(!H())return V(new Promise(e=>e(!1)));const e=globalThis.PublicKeyCredential;return V(void 0===e?.isConditionalMediationAvailable?new Promise(e=>e(!1)):e.isConditionalMediationAvailable())}())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&r)throw Error('No with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation="conditional",i.allowCredentials=[]}let a;o.publicKey=i,o.signal=z.createNewAbortSignal();try{a=await navigator.credentials.get(o)}catch(e){throw function({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if("AbortError"===e.name){if(t.signal instanceof AbortSignal)return new D({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if("NotAllowedError"===e.name)return new D({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if("SecurityError"===e.name){const t=globalThis.location.hostname;if("localhost"!==(r=t)&&!/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(r))return new D({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e});if(n.rpId!==t)return new D({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else if("UnknownError"===e.name)return new D({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}var r;return e}({error:e,options:o})}if(!a)throw new Error("Authentication was not completed");const{id:l,rawId:c,response:u,type:d}=a;let h;return u.userHandle&&(h=q(u.userHandle)),{id:l,rawId:q(c),response:{authenticatorData:q(u.authenticatorData),clientDataJSON:q(u.clientDataJSON),signature:q(u.signature),userHandle:h},type:d,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:W(a.authenticatorAttachment)}}({optionsJSON:n})}(this.user);await this.completeAuthentication(e)}catch(e){if(e instanceof se)return void(this.validCredentials=!1);te.debug(e)}}},changeUsername(e){this.user=e,this.$emit("update:username",this.user)},completeAuthentication(e){const t=this.redirectUrl;return async function(e){const t=(0,l.Jv)("/login/webauthn/finish"),{data:n}=await re.Ay.post(t,{data:JSON.stringify(e)});return n}(e).then(({defaultRedirectUrl:e})=>{te.debug("Logged in redirecting"),window.location.href=t||e}).catch(e=>{te.debug("GOT AN ERROR WHILE SUBMITTING CHALLENGE!",{error:e})})},submit(){}}});var oe=s(57056),ae={};ae.styleTagTransform=T(),ae.setAttributes=k(),ae.insert=x().bind(null,"head"),ae.domAPI=A(),ae.insertStyleElement=E(),b()(oe.A,ae),oe.A&&oe.A.locals&&oe.A.locals;var le=(0,j.A)(ie,function(){var e=this,t=e._self._c;return e._self._setupProxy,(e.isHttps||e.isLocalhost)&&e.supportsWebauthn?t("form",{ref:"loginForm",staticClass:"password-less-login-form",attrs:{"aria-labelledby":"password-less-login-form-title",method:"post",name:"login"},on:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)}}},[t("h2",{attrs:{id:"password-less-login-form-title"}},[e._v("\n\t\t"+e._s(e.t("core","Log in with a device"))+"\n\t")]),e._v(" "),t("NcTextField",{attrs:{required:"","model-value":e.user,autocomplete:e.autoCompleteAllowed?"on":"off",error:!e.validCredentials,label:e.t("core","Login or email"),placeholder:e.t("core","Login or email"),"helper-text":e.validCredentials?"":e.t("core","Your account is not setup for passwordless login.")},on:{"update:value":e.changeUsername}}),e._v(" "),e.validCredentials?t("LoginButton",{attrs:{loading:e.loading},on:{click:e.authenticate}}):e._e()],1):e.isHttps||e.isLocalhost?t("NcEmptyContent",{attrs:{name:e.t("core","Browser not supported"),description:e.t("core","Passwordless authentication is not supported in your browser.")},scopedSlots:e._u([{key:"icon",fn:function(){return[t("InformationIcon")]},proxy:!0}])}):t("NcEmptyContent",{attrs:{name:e.t("core","Your connection is not secure"),description:e.t("core","Passwordless authentication is only available over a secure connection.")},scopedSlots:e._u([{key:"icon",fn:function(){return[t("LockOpenIcon")]},proxy:!0}])})},[],!1,null,"0b57a680",null);const ce=le.exports,ue=(0,o.pM)({name:"ResetPassword",components:{LoginButton:I,NcButton:u.A,NcNoteCard:d.A,NcTextField:g.A},mixins:[L],props:{username:{type:String,required:!0},resetPasswordLink:{type:String,required:!0}},data(){return{error:!1,loading:!1,message:"",user:this.username}},watch:{username(e){this.user=e}},methods:{updateUsername(){this.$emit("update:username",this.user)},async submit(){this.loading=!0,this.error=!1,this.message="";const e=(0,l.Jv)("/lostpassword/email");try{const{data:t}=await re.Ay.post(e,{user:this.user});if("success"!==t.status)throw new Error(`got status ${t.status}`);this.message="send-success"}catch(e){te.error("could not send reset email request",{error:e}),this.error=!0,this.message="send-error"}finally{this.loading=!1}}}});var de=s(99322),he={};he.styleTagTransform=T(),he.setAttributes=k(),he.insert=x().bind(null,"head"),he.domAPI=A(),he.insertStyleElement=E(),b()(de.A,he),de.A&&de.A.locals&&de.A.locals;var pe=(0,j.A)(ue,function(){var e=this,t=e._self._c;return e._self._setupProxy,t("form",{staticClass:"reset-password-form",on:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)}}},[t("h2",[e._v(e._s(e.t("core","Reset password")))]),e._v(" "),t("NcTextField",{attrs:{id:"user",name:"user",maxlength:255,autocapitalize:"off",label:e.t("core","Login or email"),error:e.userNameInputLengthIs255,"helper-text":e.userInputHelperText,required:""},on:{change:e.updateUsername},model:{value:e.user,callback:function(t){e.user=t},expression:"user"}}),e._v(" "),t("LoginButton",{attrs:{loading:e.loading,value:e.t("core","Reset password")}}),e._v(" "),t("NcButton",{attrs:{variant:"tertiary",wide:""},on:{click:function(t){return e.$emit("abort")}}},[e._v("\n\t\t"+e._s(e.t("core","Back to login"))+"\n\t")]),e._v(" "),"send-success"===e.message?t("NcNoteCard",{attrs:{type:"success"}},[e._v("\n\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 Login, check your spam/junk folders or ask your local administration for help."))+"\n\t")]):"send-error"===e.message?t("NcNoteCard",{attrs:{type:"error"}},[e._v("\n\t\t"+e._s(e.t("core","Couldn't send reset email. Please contact your administrator."))+"\n\t")]):"reset-error"===e.message?t("NcNoteCard",{attrs:{type:"error"}},[e._v("\n\t\t"+e._s(e.t("core","Password cannot be changed. Please contact your administrator."))+"\n\t")]):e._e()],1)},[],!1,null,"759a0fdd",null);const fe=pe.exports,me={name:"UpdatePassword",components:{LoginButton:I},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 re.Ay.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 ge=s(81604),ve={};ve.styleTagTransform=T(),ve.setAttributes=k(),ve.insert=x().bind(null,"head"),ve.domAPI=A(),ve.insertStyleElement=E(),b()(ge.A,ve),ge.A&&ge.A.locals&&ge.A.locals;var ye=(0,j.A)(me,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",spellcheck:"false",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,r=t.target,s=!!r.checked;if(Array.isArray(n)){var i=e._i(n,null);r.checked?i<0&&(e.proceed=n.concat([null])):i>-1&&(e.proceed=n.slice(0,i).concat(n.slice(i+1)))}else e.proceed=s}}}),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,"2c0ecaf9",null);const be=ye.exports;const we=c.A.parse(location.search);"1"===we.clear&&async function(){try{window.localStorage.clear(),window.sessionStorage.clear();const e=await window.indexedDB.databases();for(const t of e)await window.indexedDB.deleteDatabase(t.name);te.debug("Browser storages cleared")}catch(e){te.error("Could not clear browser storages",{error:e})}}();const Ae={name:"Login",components:{LoginForm:F,PasswordLessLoginForm:ce,ResetPassword:fe,UpdatePassword:be,NcButton:u.A,NcNoteCard:d.A},data:()=>({loading:!1,user:(0,a.C)("core","loginUsername",""),passwordlessLogin:!1,resetPassword:!1,errors:(0,a.C)("core","loginErrors",[]),messages:(0,a.C)("core","loginMessages",[]),redirectUrl:(0,a.C)("core","loginRedirectUrl",!1),throttleDelay:(0,a.C)("core","loginThrottleDelay",0),canResetPassword:(0,a.C)("core","loginCanResetPassword",!1),resetPasswordLink:(0,a.C)("core","loginResetPasswordLink",""),autoCompleteAllowed:(0,a.C)("core","loginAutocomplete",!0),remembermeAllowed:(0,a.C)("core","loginCanRememberme",!0),resetPasswordTarget:(0,a.C)("core","resetPasswordTarget",""),resetPasswordUser:(0,a.C)("core","resetPasswordUser",""),directLogin:"1"===we.direct,hasPasswordless:(0,a.C)("core","webauthn-available",!1),countAlternativeLogins:(0,a.C)("core","countAlternativeLogins",!1),alternativeLogins:(0,a.C)("core","alternativeLogins",[]),isHttps:"https:"===window.location.protocol,isLocalhost:"localhost"===window.location.hostname,hideLoginForm:(0,a.C)("core","hideLoginForm",!1),emailStates:(0,a.C)("core","emailStates",[])}),methods:{passwordResetFinished(){window.location.href=(0,l.Jv)("login")+"?direct=1"}}};var _e=s(11999),xe={};xe.styleTagTransform=T(),xe.setAttributes=k(),xe.insert=x().bind(null,"head"),xe.domAPI=A(),xe.insertStyleElement=E(),b()(_e.A,xe),_e.A&&_e.A.locals&&_e.A.locals;const Ce=(0,j.A)(Ae,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-pw-less",staticClass:"login-additional login-box__wrapper"},[t("PasswordLessLoginForm",{attrs:{username:e.user,"redirect-url":e.redirectUrl,"auto-complete-allowed":e.autoCompleteAllowed,"is-https":e.isHttps,"is-localhost":e.isLocalhost},on:{"update:username":function(t){e.user=t},submit:function(t){e.loading=!0}}}),e._v(" "),t("NcButton",{attrs:{variant:"tertiary","aria-label":e.t("core","Back to login form"),wide:!0},on:{click:function(t){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-can-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",{staticClass:"login-box__wrapper"},[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,"rememberme-allowed":e.remembermeAllowed,"email-states":e.emailStates},on:{"update:username":function(t){e.user=t},submit:function(t){e.loading=!0}}}),e._v(" "),e.hasPasswordless?t("NcButton",{attrs:{variant:"tertiary",wide:""},on:{click:function(t){t.preventDefault(),e.passwordlessLogin=!0}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Log in with a device"))+"\n\t\t\t\t")]):e._e(),e._v(" "),e.canResetPassword&&""!==e.resetPasswordLink?t("NcButton",{attrs:{id:"lost-password",href:e.resetPasswordLink,variant:"tertiary-no-background",wide:""}},[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("NcButton",{attrs:{id:"lost-password",variant:"tertiary",wide:""},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()],1)])]:[t("transition",{attrs:{name:"fade",mode:"out-in"}},[t("NcNoteCard",{attrs:{type:"info",title:e.t("core","Login form is disabled.")}},[e._v("\n\t\t\t\t"+e._s(e.t("core","The Nextcloud login form is disabled. Use another login option if available or contact your administration."))+"\n\t\t\t")])],1)],e._v(" "),t("div",{staticClass:"login-box__alternative-logins",attrs:{id:"alternative-logins"}},e._l(e.alternativeLogins,function(n,r){return t("NcButton",{key:r,class:[n.class],attrs:{variant:"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,"518c0816",null).exports;var ke=s(61338),Pe=s(71225);const Ee=!!window._oc_isadmin,Se=window.oc_appconfig||{};var Te=s(74692),Ne=s.n(Te);let Oe=!1;const je={enableDynamicSlideToggle(){Oe=!0},showAppSidebar:function(e){(e||Ne()("#app-sidebar")).removeClass("disappear").show(),Ne()("#app-content").trigger(new(Ne().Event)("appresized"))},hideAppSidebar:function(e){(e||Ne()("#app-sidebar")).hide().addClass("disappear"),Ne()("#app-content").trigger(new(Ne().Event)("appresized"))}},Ie=je,Le=void 0!==window._oc_appswebroots&&window._oc_appswebroots;var Me=s(21391),Re=s.n(Me),Be=s(78112),Fe=s(86860);const He={create:"POST",update:"PROPPATCH",patch:"PROPPATCH",delete:"DELETE",read:"PROPFIND"};function Ue(e,t){if(Fe.default.isArray(e))return Fe.default.map(e,function(e){return Ue(e,t)});const n={href:e.href};return Fe.default.each(e.propStat,function(e){if("HTTP/1.1 200 OK"===e.status)for(const r in e.properties){let s=r;r in t&&(s=t[r]),n[s]=e.properties[r]}}),n.id||(n.id=De(n.href)),n}function De(e){const t=e.indexOf("?");t>0&&(e=e.substr(0,t));const n=e.split("/");let r;do{r=n[n.length-1],n.pop()}while(!r&&n.length>0);return r}function ze(e){return e>=200&&e<=299}function qe(e,t,n,r){return e.propPatch(t.url,function(e,t){const n={};let r;for(r in e){let s=t[r],i=e[r];s||(te.warn('No matching DAV property for property "'+r),s=r),(Fe.default.isBoolean(i)||Fe.default.isNumber(i))&&(i=""+i),n[s]=i}return n}(n.changed,t.davProperties),r).then(function(e){ze(e.status)?Fe.default.isFunction(t.success)&&t.success(n.toJSON()):Fe.default.isFunction(t.error)&&t.error(e)})}const $e=Re().noConflict();Object.assign($e,{davCall:function(e,t){const n=new Be.dav.Client({baseUrl:e.url,xmlNamespaces:Fe.default.extend({"DAV:":"d","http://owncloud.org/ns":"oc"},e.xmlNamespaces||{})});n.resolveUrl=function(){return e.url};const r=Fe.default.extend({"X-Requested-With":"XMLHttpRequest",requesttoken:OC.requestToken},e.headers);return"PROPFIND"===e.type?function(e,t,n,r){return e.propFind(t.url,Fe.default.values(t.davProperties)||[],t.depth,r).then(function(e){if(ze(e.status)){if(Fe.default.isFunction(t.success)){const n=Fe.default.invert(t.davProperties),r=Ue(e.body,n);t.depth>0&&r.shift(),t.success(r)}}else Fe.default.isFunction(t.error)&&t.error(e)})}(n,e,0,r):"PROPPATCH"===e.type?qe(n,e,t,r):"MKCOL"===e.type?function(e,t,n,r){return e.request(t.type,t.url,r,null).then(function(s){ze(s.status)?qe(e,t,n,r):Fe.default.isFunction(t.error)&&t.error(s)})}(n,e,t,r):function(e,t,n,r){return r["Content-Type"]="application/json",e.request(t.type,t.url,r,t.data).then(function(e){if(ze(e.status)){if(Fe.default.isFunction(t.success)){if("PUT"===t.type||"POST"===t.type||"MKCOL"===t.type){const r=e.body||n.toJSON(),s=e.xhr.getResponseHeader("Content-Location");return"POST"===t.type&&s&&(r.id=De(s)),void t.success(r)}if(207===e.status){const n=Fe.default.invert(t.davProperties);t.success(Ue(e.body,n))}else t.success(e.body)}}else Fe.default.isFunction(t.error)&&t.error(e)})}(n,e,t,r)},davSync:function(e){return(t,n,r)=>{const s={type:He[t]||t},i=n instanceof e.Collection;if("update"===t&&(n.hasInnerCollection?s.type="MKCOL":(n.usePUT||n.collection&&n.collection.usePUT)&&(s.type="PUT")),r.url||(s.url=Fe.default.result(n,"url")||function(){throw new Error('A "url" property or function must be specified')}()),null!=r.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(s.data=JSON.stringify(r.attrs||n.toJSON(r))),"PROPFIND"!==s.type&&(s.processData=!1),"PROPFIND"===s.type||"PROPPATCH"===s.type){let e=n.davProperties;!e&&n.model&&(e=n.model.prototype.davProperties),e&&(Fe.default.isFunction(e)?s.davProperties=e.call(n):s.davProperties=e),s.davProperties=Fe.default.extend(s.davProperties||{},r.davProperties),Fe.default.isUndefined(r.depth)&&(r.depth=i?1:0)}const o=r.error;r.error=function(e,t,n){r.textStatus=t,r.errorThrown=n,o&&o.call(r.context,e,t,n)};const a=r.xhr=e.davCall(Fe.default.extend(s,r),n);return n.trigger("request",n,a,r),a}}($e)});const Ve=$e;var Ye=s(87485);const Ke=window._oc_config||{},We=document.getElementsByTagName("head")[0].getAttribute("data-user"),Je=document.getElementsByTagName("head")[0].getAttribute("data-user-displayname"),Ge=void 0!==We&&We,Xe=window._oc_debug;var Qe=s(21363),Ze=s(85168),et=s(98469),tt=s(43627);const nt={YES_NO_BUTTONS:70,OK_BUTTONS:71,FILEPICKER_TYPE_CHOOSE:1,FILEPICKER_TYPE_MOVE:2,FILEPICKER_TYPE_COPY:3,FILEPICKER_TYPE_COPY_MOVE:4,FILEPICKER_TYPE_CUSTOM:5,alert:function(e,t,n,r){this.message(e,t,"alert",nt.OK_BUTTON,n,r)},info:function(e,t,n,r){this.message(e,t,"info",nt.OK_BUTTON,n,r)},confirm:function(e,t,n,r){return this.message(e,t,"notice",nt.YES_NO_BUTTONS,n,r)},confirmDestructive:function(e,t,n=nt.OK_BUTTONS,r=()=>{}){return(new Ze.ik).setName(t).setText(e).setButtons(n===nt.OK_BUTTONS?[{label:(0,h.t)("core","Yes"),variant:"error",callback:()=>{r.clicked=!0,r(!0)}}]:nt._getLegacyButtons(n,r)).build().show().then(()=>{r.clicked||r(!1)})},confirmHtml:function(e,t,n){return(new Ze.ik).setName(t).setText("").setButtons([{label:(0,h.t)("core","No"),callback:()=>{}},{label:(0,h.t)("core","Yes"),variant:"primary",callback:()=>{n.clicked=!0,n(!0)}}]).build().setHTML(e).show().then(()=>{n.clicked||n(!1)})},prompt:function(e,t,n,r,i,a){return new Promise(r=>{(0,et.S)((0,o.$V)(()=>Promise.all([s.e(4208),s.e(9553)]).then(s.bind(s,99553))),{text:e,name:t,callback:n,inputName:i,isPassword:!!a},(...e)=>{n(...e),r()})})},filepicker(e,t,n=!1,r=void 0,s=void 0,i=Ze.bh.Choose,o=void 0,a=void 0){const l=(e,t)=>{const r=e=>{const t=e?.root||"";let n=e?.path||"";return n.startsWith(t)&&(n=n.slice(t.length)||"/"),n};return n?n=>e(n.map(r),t):n=>e(r(n[0]),t)},c=(0,Ze.a1)(e);i===this.FILEPICKER_TYPE_CUSTOM?(a.buttons||[]).forEach(e=>{c.addButton({callback:l(t,e.type),label:e.text,variant:e.defaultButton?"primary":"secondary"})}):c.setButtonFactory((e,n)=>{const r=[],[s]=e,o=s?.displayname||s?.basename||(0,tt.basename)(n);return i===Ze.bh.Choose&&r.push({callback:l(t,Ze.bh.Choose),label:s&&!this.multiSelect?(0,h.t)("core","Choose {file}",{file:o}):(0,h.t)("core","Choose"),variant:"primary"}),i!==Ze.bh.CopyMove&&i!==Ze.bh.Copy||r.push({callback:l(t,Ze.bh.Copy),label:o?(0,h.t)("core","Copy to {target}",{target:o}):(0,h.t)("core","Copy"),variant:"primary",icon:Qe}),i!==Ze.bh.Move&&i!==Ze.bh.CopyMove||r.push({callback:l(t,Ze.bh.Move),label:o?(0,h.t)("core","Move to {target}",{target:o}):(0,h.t)("core","Move"),variant:i===Ze.bh.Move?"primary":"secondary",icon:''}),r}),r&&c.setMimeTypeFilter("string"==typeof r?[r]:r||[]),"function"==typeof a?.filter&&c.setFilter(e=>a.filter((e=>({id:e.fileid||null,path:e.path,mimetype:e.mime||null,mtime:e.mtime?.getTime()||null,permissions:e.permissions,name:e.attributes?.displayName||e.basename,etag:e.attributes?.etag||null,hasPreview:e.attributes?.hasPreview||null,mountType:e.attributes?.mountType||null,quotaAvailableBytes:e.attributes?.quotaAvailableBytes||null,icon:null,sharePermissions:null}))(e))),c.allowDirectories(!0===a?.allowDirectoryChooser||r?.includes("httpd/unix-directory")||!1).setMultiSelect(n).startAt(o).build().pick()},message:function(e,t,n,r,s=()=>{},i,o){const a=(new Ze.ik).setName(t).setText(o?"":e).setButtons(nt._getLegacyButtons(r,s));switch(n){case"alert":a.setSeverity("warning");break;case"notice":a.setSeverity("info")}const l=a.build();return o&&l.setHTML(e),l.show().then(()=>{s._clicked||s(!1)})},_getLegacyButtons(e,t){const n=[];switch("object"==typeof e?e.type:e){case nt.YES_NO_BUTTONS:n.push({label:e?.cancel??(0,h.t)("core","No"),callback:()=>{t._clicked=!0,t(!1)}}),n.push({label:e?.confirm??(0,h.t)("core","Yes"),variant:"primary",callback:()=>{t._clicked=!0,t(!0)}});break;case nt.OK_BUTTONS:n.push({label:e?.confirm??(0,h.t)("core","OK"),variant:"primary",callback:()=>{t._clicked=!0,t(!0)}});break;default:te.error("Invalid call to OC.dialogs")}return n},_fileexistsshown:!1,fileexists:function(e,t,r,s){const i=this,o=new(Ne().Deferred),a=function(t,n,r){const s=t.find(".template").clone().removeClass("template").addClass("conflict"),i=s.find(".original"),o=s.find(".replacement");s.data("data",e),s.find(".filename").text(n.name),i.find(".size").text(Lt.Util.humanFileSize(n.size)),i.find(".mtime").text(Lt.Util.formatDate(n.mtime)),r.size&&r.lastModified&&(o.find(".size").text(Lt.Util.humanFileSize(r.size)),o.find(".mtime").text(Lt.Util.formatDate(r.lastModified)));let a=n.directory+"/"+n.name;const l={file:a,x:96,y:96,c:n.etag,forceIcon:0};let c=Files.generatePreviewUrl(l);c=c.replace(/'/g,"%27"),i.find(".icon").css({"background-image":"url('"+c+"')"}),function(e){const t=new(Ne().Deferred),n=e.type&&e.type.split("/").shift();if(window.FileReader&&"image"===n){const n=new FileReader;n.onload=function(e){const n=new Blob([e.target.result]);window.URL=window.URL||window.webkitURL;const r=window.URL.createObjectURL(n),s=new Image;s.src=r,s.onload=function(){const e=function(e){const t=document.createElement("canvas"),n=e.width,r=e.height;let s,i;n>r?(i=0,s=(n-r)/2):(i=(r-n)/2,s=0);const o=Math.min(n,r);return t.width=o,t.height=o,t.getContext("2d").drawImage(e,s,i,o,o,0,0,o,o),function(e,t,n,r,s){r=Math.round(r),s=Math.round(s);const i=e.getContext("2d").getImageData(0,0,t,n),o=e.getContext("2d").getImageData(0,0,r,s),a=i.data,l=o.data,c=t/r,u=n/s,d=Math.ceil(c/2),h=Math.ceil(u/2);for(let e=0;e=-1&&c<=1&&(i=2*c*c*c-3*c*c+1,i>0&&(n=4*(e+r*t),v+=i*a[n+3],p+=i,a[n+3]<255&&(i=i*a[n+3]/250),f+=i*a[n],m+=i*a[n+1],g+=i*a[n+2],o+=i))}}l[s]=f/o,l[s+1]=m/o,l[s+2]=g/o,l[s+3]=v/p}e.getContext("2d").clearRect(0,0,Math.max(t,r),Math.max(n,s)),e.width=r,e.height=s,e.getContext("2d").putImageData(o,0,0)}(t,o,o,96,96),t.toDataURL("image/png",.7)}(s);t.resolve(e)}},n.readAsArrayBuffer(e)}else t.reject();return t}(r).then(function(e){o.find(".icon").css("background-image","url("+e+")")},function(){a=Lt.MimeType.getIconUrl(r.type),o.find(".icon").css("background-image","url("+a+")")});const u=t.find(".conflict").length;i.find("input:checkbox").attr("id","checkbox_original_"+u),o.find("input:checkbox").attr("id","checkbox_replacement_"+u),t.append(s),r.lastModified>n.mtime?o.find(".mtime").css("font-weight","bold"):r.lastModifiedn.size?o.find(".size").css("font-weight","bold"):r.size&&r.size0?(Ne()(c).find(".allnewfiles").prop("checked",!1),Ne()(c).find(".allnewfiles + .count").text((0,h.t)("core","({count} selected)",{count:e}))):(Ne()(c).find(".allnewfiles").prop("checked",!1),Ne()(c).find(".allnewfiles + .count").text("")),m()}),Ne()(c).on("click",".original,.allexistingfiles",function(){const e=Ne()(c).find('.conflict .original input[type="checkbox"]:checked').length;e===Ne()(c+" .conflict").length?(Ne()(c).find(".allexistingfiles").prop("checked",!0),Ne()(c).find(".allexistingfiles + .count").text((0,h.t)("core","(all selected)"))):e>0?(Ne()(c).find(".allexistingfiles").prop("checked",!1),Ne()(c).find(".allexistingfiles + .count").text((0,h.t)("core","({count} selected)",{count:e}))):(Ne()(c).find(".allexistingfiles").prop("checked",!1),Ne()(c).find(".allexistingfiles + .count").text("")),m()}),o.resolve()}).fail(function(){o.reject(),alert((0,h.t)("core","Error loading file exists template"))});return o.promise()},_getFileExistsTemplate:function(){const e=Ne().Deferred();if(this.$fileexistsTemplate)e.resolve(this.$fileexistsTemplate);else{const t=this;Ne().get(Lt.filePath("core","templates/legacy","fileexists.html"),function(n){t.$fileexistsTemplate=Ne()(n),e.resolve(t.$fileexistsTemplate)}).fail(function(){e.reject()})}return e.promise()}},rt=nt;function st(){return document.head.dataset.requesttoken}function it(e,t){let n,r,s="";if(this.typelessListeners=[],this.closed=!1,this.listeners={},t)for(n in t)s+=n+"="+encodeURIComponent(t[n])+"&";if(s+="requesttoken="+encodeURIComponent(st()),this.useFallBack||"undefined"==typeof EventSource){const t="oc_eventsource_iframe_"+it.iframeCount;it.fallBackSources[it.iframeCount]=this;const n=document.createElement("iframe");n.id=t,n.style.display="none",r="&",-1===e.indexOf("?")&&(r="?"),n.src=e+r+"fallback=true&fallback_id="+it.iframeCount+"&"+s,this.iframe=n,document.body.appendChild(this.iframe),this.useFallBack=!0,it.iframeCount++}else r="&",-1===e.indexOf("?")&&(r="?"),this.source=new EventSource(e+r+s),this.source.onmessage=function(e){for(let t=0;te.cancel()),n.style.display="block")},finishedSaving(e,t){this.finishedAction(e,t)},finishedAction(e,t){"success"===t.status?this.finishedSuccess(e,t.data.message):this.finishedError(e,t.data.message)},finishedSuccess(e,t){const n=document.querySelector(e);n&&n instanceof HTMLElement&&(n.textContent=t,n.classList.remove("error"),n.classList.add("success"),n.getAnimations?.().forEach(e=>e.cancel()),window.setTimeout(function(){if(!(n&&n instanceof HTMLElement))return;const e=n.animate?.([{opacity:1},{opacity:0}],{duration:900,fill:"forwards"});e?e.addEventListener("finish",()=>{n.style.display="none"}):window.setTimeout(()=>{n.style.display="none"},900)},3e3),n.style.display="block")},finishedError(e,t){const n=document.querySelector(e);n&&n instanceof HTMLElement&&(n.textContent=t,n.classList.remove("success"),n.classList.add("error"),n.style.display="block")}},yt={updatableNotification:null,getDefaultNotificationFunction:null,setDefault(e){this.getDefaultNotificationFunction=e},hide(e,t){Fe.default.isFunction(e)&&(t=e,e=void 0),e?(e.each(function(){Ne()(this)[0].toastify?Ne()(this)[0].toastify.hideToast():te.error("cannot hide toast because object is not set"),this===this.updatableNotification&&(this.updatableNotification=null)}),t&&t.call(),this.getDefaultNotificationFunction&&this.getDefaultNotificationFunction()):te.error("Missing argument $row in OC.Notification.hide() call, caller needs to be adjusted to only dismiss its own notification")},showHtml(e,t){(t=t||{}).isHTML=!0,t.timeout=t.timeout?t.timeout:Ze.DH;const n=(0,Ze.rG)(e,t);return n.toastElement.toastify=n,Ne()(n.toastElement)},show(e,t){(t=t||{}).timeout=t.timeout?t.timeout:Ze.DH;const n=(0,Ze.rG)(function(e){return e.toString().split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'")}(e),t);return n.toastElement.toastify=n,Ne()(n.toastElement)},showUpdate(e){return this.updatableNotification&&this.updatableNotification.hideToast(),this.updatableNotification=(0,Ze.rG)(e,{timeout:Ze.DH}),this.updatableNotification.toastElement.toastify=this.updatableNotification,Ne()(this.updatableNotification.toastElement)},showTemporary(e,t){(t=t||{}).timeout=t.timeout||Ze.aR;const n=(0,Ze.rG)(e,t);return n.toastElement.toastify=n,Ne()(n.toastElement)},isHidden:()=>!Ne()("#content").find(".toastify").length};var bt=s(47176);const wt={requiresPasswordConfirmation:()=>(0,bt.oB)(),requirePasswordConfirmation(e,t,n){(0,bt.C5)().then(e,n)}},At={_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 r=this.getPlugins(e);for(let e=0;e").join(">").split('"').join(""").split("'").join("'")},async rebuildNavigation(){const{data:e}=await re.Ay.get((0,l.KT)("core/navigation",2)+"/apps?format=json");200===e.ocs.meta.statuscode&&((0,ke.Ic)("nextcloud:app-menu.refresh",{apps:e.ocs.data}),window.dispatchEvent(new Event("resize")))},setupGroupsSelect:function(e,n,r){const s=this;r=r||{},e.length>0&&Ne().ajax({url:(0,l.KT)("cloud/groups/details"),dataType:"json",success:function(i){const o=[];i.ocs.data.groups&&i.ocs.data.groups.length>0?(i.ocs.data.groups.forEach(function(e){r.excludeAdmins&&"admin"===e.id||o.push({id:e.id,displayname:e.displayname})}),e.select2(Fe.default.extend({placeholder:t("core","Groups"),allowClear:!0,multiple:!0,toggleSelect:!0,separator:"|",data:{results:o,text:"displayname"},initSelection:function(e,t){const n=Ne()(e).val();let r;n&&o.length>0?r=Fe.default.map(Fe.default.filter((n||[]).split("|").sort(),function(e){return void 0!==o.find(function(t){return t.id===e})}),function(e){return{id:e,displayname:o.find(function(t){return t.id===e}).displayname}}):n&&(r=Fe.default.map((n||[]).split("|").sort(),function(e){return{id:e,displayname:e}})),t(r)},formatResult:function(e){return s.escapeHTML(e.displayname)},formatSelection:function(e){return s.escapeHTML(e.displayname)},escapeMarkup:function(e){return e}},n||{}))):(OC.Notification.show(t("core","Group list is empty"),{type:"error"}),te.debug(i))},error:function(e){OC.Notification.show(t("core","Unable to retrieve the group list"),{type:"error"}),te.debug(e)}})}},xt=window._theme||{};s(70970);var Ct=s(380);Object.freeze({DEFAULT:"default",HIDDEN:"hidden"}),Ct.m,Object.freeze({UploadFromDevice:0,CreateNew:1,Other:2}),Object.freeze({ReservedName:"reserved name",Character:"character",Extension:"extension"}),Error;const kt=["B","KB","MB","GB","TB","PB"],Pt=["B","KiB","MiB","GiB","TiB","PiB"];Object.freeze({Name:"basename",Modified:"mtime",Size:"size"});var Et=s(95093),St=s.n(Et);const Tt={_handlers:[],_pushState(e,t,n){let r;if(r="string"==typeof e?e:Lt.buildQueryString(e),window.history.pushState){if(t=t||location.pathname+"?"+r,navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&parseInt(navigator.userAgent.split("/").pop())<51){const e=document.querySelectorAll('[fill^="url(#"], [stroke^="url(#"], [filter^="url(#invert"]');for(let t,n=0,r=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=Lt.parseQueryString(this._decodeQuery(e))),t=Fe.default.extend(t||{},Lt.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,Fe.default.isString(t)?t=Lt.parseQueryString(t):t||(t=this.parseUrlQuery()||{});for(let e=0;e="0"&&n<="9";o!==i&&(s++,t[s]="",i=o),t[s]+=n,r++}return t}const Ot={History:Tt,humanFileSize:function(e,t=!1,n=!1,r=!1){n=n&&!r,"string"==typeof e&&(e=Number(e));let s=e>0?Math.floor(Math.log(e)/Math.log(r?1e3:1024)):0;s=Math.min((n?Pt.length:kt.length)-1,s);const i=n?Pt[s]:kt[s];let o=(e/Math.pow(r?1e3:1024,s)).toFixed(1);return!0===t&&0===s?("0.0"!==o?"< 1 ":"0 ")+(n?Pt[1]:kt[1]):(o=s<2?parseFloat(o).toFixed(0):parseFloat(o).toLocaleString((0,h.lO)()),o+" "+i)},computerFileSize(e){if("string"!=typeof e)return null;const t=e.toLowerCase().trim();let n=null;const r=t.match(/^[\s+]?([0-9]*)(\.([0-9]+))?( +)?([kmgtp]?b?)$/i);return null===r?null:(n=parseFloat(t),isFinite(n)?(r[5]&&(n*={b:1,k:1024,kb:1024,mb:1048576,m:1048576,gb:1073741824,g:1073741824,tb:1099511627776,t:1099511627776,pb:0x4000000000000,p:0x4000000000000}[r[5]]),n=Math.round(n),n):null)},formatDate:(e,t)=>(void 0===window.TESTING&&Lt.debug&&te.warn("OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment"),t=t||"LLL",St()(e).format(t)),relativeModifiedDate(e){void 0===window.TESTING&&Lt.debug&&te.warn("OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment");const n=St()().diff(St()(e));return n>=0&&n<45e3?t("core","seconds ago"):St()(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 r=e.offsetWidth;return n===r&&(r=t.clientWidth),document.body.removeChild(t),this._scrollBarWidth=n-r,this._scrollBarWidth},stripTime:e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),naturalSortCompare(e,t){let n;const r=Nt(e),s=Nt(t);for(n=0;r[n]&&s[n];n++)if(r[n]!==s[n]){const e=Number(r[n]),t=Number(s[n]);return e==r[n]&&t==s[n]?e-t:r[n].localeCompare(s[n],Lt.getLanguage())}return r.length-s.length},waitFor(e,t){const n=function(){!0!==e()&&setTimeout(n,t)};n()},isCookieSetToValue(e,t){const n=document.cookie.split(";");for(let r=0;r!$_",Apps:Ie,appConfig:Se,appswebroots:Le,Backbone:Ve,config:Ke,currentUser:Ge,dialogs:rt,EventSource:ot,MimeType:i,getCurrentUser:function(){return{uid:Ge,displayName:Je}},isUserAdmin:()=>Ee,L10N:ct,registerXHRForErrorProcessing:()=>{},getCapabilities:function(){return OC.debug&&te.warn("OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities"),(0,Ye.F)()},hideMenus:ht,registerMenu:function(e,t,n,r){t.addClass("menu");const s="A"===e.prop("tagName")||"BUTTON"===e.prop("tagName");e.on(s?"click.menu":"click.menu keyup.menu",function(s){s.preventDefault(),s.key&&"Enter"!==s.key||(t.is(ut)?ht():(ut&&ht(),!0===r&&t.parent().addClass("openedMenu"),e.attr("aria-expanded",!0),t.slideToggle(50,n),ut=t,dt=e))})},showMenu:function(e,t,n){t.is(ut)||(ht(),ut=t,dt=e,t.trigger(new(Ne().Event)("beforeShow")),t.show(),t.trigger(new(Ne().Event)("afterShow")),Fe.default.isFunction(n)&&n())},unregisterMenu:function(e,t){t.is(ut)&&ht(),e.off("click.menu").removeClass("menutoggle"),t.removeClass("menu")},basename:Pe.P8,encodePath:Pe.O0,dirname:Pe.pD,isSamePath:Pe.ys,joinPaths:Pe.fj,getCanonicalLocale:h.lO,getLocale:h.JK,getLanguage:h.Z0,buildQueryString:function(e){return e?new URLSearchParams(e).toString():""},parseQueryString:function(e){const t=new URLSearchParams(e);return Object.fromEntries(t.entries())},msg:vt,Notification:yt,PasswordConfirmation:wt,Plugins:At,Settings:_t,theme:xt,Util:Ot,debug:Xe,filePath:l.fg,generateUrl:l.Jv,getRootPath:l.aU,imagePath:l.d0,requestToken:st(),linkTo:l.uM,linkToOCS:(e,t)=>(0,l.KT)(e,{},{ocsVersion:t||1})+"/",linkToRemote:l.dC,linkToRemoteBase:function(e){return(0,l.aU)()+"/remote.php/"+e},webroot:It};(0,ke.B1)("csrf-token-update",e=>{OC.requestToken=e.token,te.info("OC.requestToken changed",{token:e.token})});const Mt={data:()=>({OC:Lt}),methods:{t:ct.translate.bind(ct),n:ct.translatePlural.bind(ct)}};o.Ay.mixin(Mt),(new(o.Ay.extend(Ce))).$mount("#login")},21391(e,t,n){var r,s,i;i="object"==typeof self&&self.self===self&&self||"object"==typeof globalThis&&globalThis.global===globalThis&&globalThis,r=[n(86860),n(74692),t],s=function(e,t,n){i.Backbone=function(e,t,n,r){var s=e.Backbone,i=Array.prototype.slice;t.VERSION="1.6.1",t.$=r,t.noConflict=function(){return e.Backbone=s,this},t.emulateHTTP=!1,t.emulateJSON=!1;var o,a=t.Events={},l=/\s+/,c=function(e,t,r,s,i){var o,a=0;if(r&&"object"==typeof r){void 0!==s&&"context"in i&&void 0===i.context&&(i.context=s);for(o=n.keys(r);athis.length&&(s=this.length),s<0&&(s+=this.length+1);var i,o,a=[],l=[],c=[],u=[],d={},h=t.add,p=t.merge,f=t.remove,m=!1,g=this.comparator&&null==s&&!1!==t.sort,v=n.isString(this.comparator)?this.comparator:null;for(o=0;o0&&!t.silent&&delete t.index,n},_isModel:function(e){return e instanceof v},_addReference:function(e,t){this._byId[e.cid]=e;var n=this.modelId(e.attributes,e.idAttribute);null!=n&&(this._byId[n]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var n=this.modelId(e.attributes,e.idAttribute);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if(t){if(("add"===e||"remove"===e)&&n!==this)return;if("destroy"===e&&this.remove(t,r),"changeId"===e){var s=this.modelId(t.previousAttributes(),t.idAttribute),i=this.modelId(t.attributes,t.idAttribute);null!=s&&delete this._byId[s],null!=i&&(this._byId[i]=t)}}this.trigger.apply(this,arguments)},_forwardPristineError:function(e,t,n){this.has(e)||this._onModelEvent("error",e,t,n)}});var _="function"==typeof Symbol&&Symbol.iterator;_&&(y.prototype[_]=y.prototype.values);var x=function(e,t){this._collection=e,this._kind=t,this._index=0},C=1,k=2,P=3;_&&(x.prototype[_]=function(){return this}),x.prototype.next=function(){if(this._collection){if(this._index7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(D,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,s=r.insertBefore(this.iframe,r.firstChild).contentWindow;s.document.open(),s.document.close(),s.location.hash="#"+this.fragment}var i=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._usePushState?i("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?i("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),H.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t===this.fragment)return!this.matchRoot()&&this.notfound();this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return this.matchRoot()?(e=this.fragment=this.getFragment(e),n.some(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0})||this.notfound()):this.notfound()},notfound:function(){return this.trigger("notfound"),!1},navigate:function(e,t){if(!H.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var n=this.root;this._trailingSlash||""!==e&&"?"!==e.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+e;e=e.replace(z,"");var s=this.decodeFragment(e);if(this.fragment!==s){if(this.fragment=s,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;t.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new H;v.extend=y.extend=L.extend=E.extend=H.extend=function(e,t){var r,s=this;return r=e&&n.has(e,"constructor")?e.constructor:function(){return s.apply(this,arguments)},n.extend(r,s,t),r.prototype=n.create(s.prototype,e),r.prototype.constructor=r,r.__super__=s.prototype,r};var q=function(){throw new Error('A "url" property or function must be specified')},$=function(e,t){var n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger("error",e,r,t)}};return t._debug=function(){return{root:e,_:n}},t}(i,n,e,t)}.apply(t,r),void 0===s||(e.exports=s)},14430(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(71354),s=n.n(r),i=n(76314),o=n.n(i)()(s());o.push([e.id,".button-vue[data-v-bbf83d00]{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 a=o},44098(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(71354),s=n.n(r),i=n(76314),o=n.n(i)()(s());o.push([e.id,".login-form[data-v-f91ba7fe]{text-align:start;font-size:1rem;margin:0}.login-form__fieldset[data-v-f91ba7fe]{width:100%;display:flex;flex-direction:column;gap:.5rem}.login-form__headline[data-v-f91ba7fe]{text-align:center;overflow-wrap:anywhere}.login-form[data-v-f91ba7fe] input:invalid:not(:user-invalid){border-color:var(--color-border-maxcontrast) !important}","",{version:3,sources:["webpack://./core/src/components/login/LoginForm.vue"],names:[],mappings:"AACA,6BACC,gBAAA,CACA,cAAA,CACA,QAAA,CAEA,uCACC,UAAA,CACA,YAAA,CACA,qBAAA,CACA,SAAA,CAGD,uCACC,iBAAA,CACA,sBAAA,CAID,8DACC,uDAAA",sourcesContent:["\n.login-form {\n\ttext-align: start;\n\tfont-size: 1rem;\n\tmargin: 0;\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\t// Only show the error state if the user interacted with the login box\n\t:deep(input:invalid:not(:user-invalid)) {\n\t\tborder-color: var(--color-border-maxcontrast) !important;\n\t}\n}\n"],sourceRoot:""}]);const a=o},57056(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(71354),s=n.n(r),i=n(76314),o=n.n(i)()(s());o.push([e.id,".password-less-login-form[data-v-0b57a680]{display:flex;flex-direction:column;gap:.5rem;margin:0}","",{version:3,sources:["webpack://./core/src/components/login/PasswordLessLoginForm.vue"],names:[],mappings:"AACA,2CACC,YAAA,CACA,qBAAA,CACA,SAAA,CACA,QAAA",sourcesContent:["\n.password-less-login-form {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 0.5rem;\n\tmargin: 0;\n}\n"],sourceRoot:""}]);const a=o},99322(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(71354),s=n.n(r),i=n(76314),o=n.n(i)()(s());o.push([e.id,".reset-password-form[data-v-759a0fdd]{display:flex;flex-direction:column;gap:.5rem;width:100%}","",{version:3,sources:["webpack://./core/src/components/login/ResetPassword.vue"],names:[],mappings:"AACA,sCACC,YAAA,CACA,qBAAA,CACA,SAAA,CACA,UAAA",sourcesContent:["\n.reset-password-form {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: .5rem;\n\twidth: 100%;\n}\n"],sourceRoot:""}]);const a=o},11999(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(71354),s=n.n(r),i=n(76314),o=n.n(i)()(s());o.push([e.id,".login-box[data-v-518c0816]{width:320px;box-sizing:border-box}.login-box__wrapper[data-v-518c0816]{display:flex;flex-direction:column;gap:calc(2*var(--default-grid-baseline))}.login-box__alternative-logins[data-v-518c0816]{display:flex;flex-direction:column;gap:.75rem}.fade-enter-active[data-v-518c0816],.fade-leave-active[data-v-518c0816]{transition:opacity .3s}.fade-enter[data-v-518c0816],.fade-leave-to[data-v-518c0816]{opacity:0}","",{version:3,sources:["webpack://./core/src/views/Login.vue"],names:[],mappings:"AACA,4BAEC,WAAA,CACA,qBAAA,CAEA,qCACC,YAAA,CACA,qBAAA,CACA,wCAAA,CAGD,gDACC,YAAA,CACA,qBAAA,CACA,UAAA,CAIF,wEACC,sBAAA,CAGD,6DACC,SAAA",sourcesContent:["\n.login-box {\n\t// Same size as dashboard panels\n\twidth: 320px;\n\tbox-sizing: border-box;\n\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: calc(2 * var(--default-grid-baseline));\n\t}\n\n\t&__alternative-logins {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 0.75rem;\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .3s;\n}\n\n.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {\n\topacity: 0;\n}\n"],sourceRoot:""}]);const a=o},81604(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(71354),s=n.n(r),i=n(76314),o=n.n(i)()(s());o.push([e.id,"\nfieldset[data-v-2c0ecaf9] {\n\ttext-align: center;\n}\ninput[type=submit][data-v-2c0ecaf9] {\n\tmargin-top: 20px;\n}\n","",{version:3,sources:["webpack://./core/src/components/login/UpdatePassword.vue"],names:[],mappings:";AAmIA;CACA,kBAAA;AACA;AAEA;CACA,gBAAA;AACA",sourcesContent:["\x3c!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n\n\n\n