Merge pull request #46631 from nextcloud/feat/file-request-cypress

This commit is contained in:
John Molakvoæ 2024-07-19 17:33:14 +02:00 committed by GitHub
commit bc531be406
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 200 additions and 39 deletions

View file

@ -3,13 +3,15 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<NcDialog :name="name"
<NcDialog data-cy-files-new-node-dialog
:name="name"
:open="open"
close-on-click-outside
out-transition
@update:open="onClose">
<template #actions>
<NcButton type="primary"
<NcButton data-cy-files-new-node-dialog-submit
type="primary"
:disabled="!isUniqueName"
@click="onCreate">
{{ t('files', 'Create') }}
@ -17,6 +19,7 @@
</template>
<form @submit.prevent="onCreate">
<NcTextField ref="input"
data-cy-files-new-node-dialog-input
:error="!isUniqueName"
:helper-text="errorMessage"
:label="label"

View file

@ -23,7 +23,7 @@ interface ILabels {
* @param defaultName Default name to use
* @param folderContent Nodes with in the current folder to check for unique name
* @param labels Labels to set on the dialog
* @return string if successfull otherwise null if aborted
* @return string if successful otherwise null if aborted
*/
export function newNodeName(defaultName: string, folderContent: Node[], labels: ILabels = {}) {
const contentNames = folderContent.map((node: Node) => node.basename)

View file

@ -270,19 +270,15 @@ export default defineComponent({
async createShare() {
this.loading = true
// This should never happen
if (this.expirationDate == null) {
throw new Error('Expiration date is missing')
let expireDate = ''
if (this.expirationDate) {
const year = this.expirationDate.getFullYear()
const month = (this.expirationDate.getMonth() + 1).toString().padStart(2, '0')
const day = this.expirationDate.getDate().toString().padStart(2, '0')
// Format must be YYYY-MM-DD
expireDate = `${year}-${month}-${day}`
}
const year = this.expirationDate.getFullYear()
const month = (this.expirationDate.getMonth() + 1).toString().padStart(2, '0')
const day = this.expirationDate.getDate().toString().padStart(2, '0')
// Format must be YYYY-MM-DD
const expireDate = this.expirationDate
? `${year}-${month}-${day}`
: undefined
const shareUrl = generateOcsUrl('apps/files_sharing/api/v1/shares')
try {
const request = await axios.post<OCSResponse>(shareUrl, {
@ -296,7 +292,7 @@ export default defineComponent({
note: this.note,
password: this.password || undefined,
expireDate,
expireDate: expireDate || undefined,
// Empty string
shareWith: '',

View file

@ -201,7 +201,7 @@ export default defineComponent({
methods: {
onToggleDeadline(checked: boolean) {
this.$emit('update:expirationDate', checked ? new Date() : null)
this.$emit('update:expirationDate', checked ? (this.maxDate || this.minDate) : null)
},
async onTogglePassword(checked: boolean) {

View file

@ -17,6 +17,7 @@
:readonly="true"
:show-trailing-button="true"
:trailing-button-label="t('files_sharing', 'Copy to clipboard')"
data-cy-file-request-dialog-fieldset="link"
@click="copyShareLink"
@trailing-button-click="copyShareLink">
<template #trailing-button-icon>
@ -30,6 +31,7 @@
<NcTextField :value.sync="email"
:label="t('files_sharing', 'Send link via email')"
:placeholder="t('files_sharing', 'Enter an email address or paste a list')"
data-cy-file-request-dialog-fieldset="email"
type="email"
@keypress.enter.stop="addNewEmail"
@paste.stop.prevent="onPasteEmails"

View file

@ -14,8 +14,10 @@ const NewFileRequestDialogVue = defineAsyncComponent(() => import('../components
const sharingConfig = new Config()
export const EntryId = 'file-request'
export const entry = {
id: 'file-request',
id: EntryId,
displayName: t('files_sharing', 'Create file request'),
iconSvgInline: FileUploadSvg,
order: 30,

View file

@ -5,6 +5,7 @@
<template>
<NcDialog class="public-auth-prompt"
data-cy-public-auth-prompt-dialog
dialog-classes="public-auth-prompt__dialog"
:can-close="false"
:name="dialogName">
@ -26,16 +27,18 @@
@submit.prevent.stop="">
<NcTextField ref="input"
class="public-auth-prompt__input"
data-cy-public-auth-prompt-dialog-name
:label="t('files_sharing', 'Enter your name')"
name="name"
:required="true"
:minlength="2"
:value.sync="name" />
:required="true"
:value.sync="name"
name="name" />
</form>
<!-- Submit -->
<template #actions>
<NcButton ref="submit"
data-cy-public-auth-prompt-dialog-submit
:disabled="name.trim() === ''"
@click="onSubmit">
{{ t('files_sharing', 'Submit name') }}

View file

@ -121,3 +121,18 @@ export const clickOnBreadcrumbs = (label: string) => {
cy.get('[data-cy-files-content-breadcrumbs]').contains(label).click()
cy.wait('@propfind')
}
export const createFolder = (folderName: string) => {
cy.intercept('MKCOL', /\/remote.php\/dav\/files\//).as('createFolder')
// TODO: replace by proper data-cy selectors
cy.get('[data-cy-upload-picker] .action-item__menutoggle').first().click()
cy.contains('.upload-picker__menu-entry button', 'New folder').click()
cy.get('[data-cy-files-new-node-dialog]').should('be.visible')
cy.get('[data-cy-files-new-node-dialog-input]').type(`{selectall}${folderName}`)
cy.get('[data-cy-files-new-node-dialog-submit]').click()
cy.wait('@createFolder')
getRowForFile(folderName).should('be.visible')
}

View file

@ -5,6 +5,8 @@
/* eslint-disable jsdoc/require-jsdoc */
import { triggerActionForFile } from '../files/FilesUtils'
import { EntryId as FileRequestEntryID } from '../../../apps/files_sharing/src/new/newFileRequest'
export interface ShareSetting {
read: boolean
update: boolean
@ -96,3 +98,82 @@ export function openSharingPanel(fileName: string) {
.get('[aria-controls="tab-sharing"]')
.click()
}
type FileRequestOptions = {
label?: string
note?: string
password?: string
/* YYYY-MM-DD format */
expiration?: string
}
/**
* Create a file request for a folder
* @param path The path of the folder, leading slash is required
* @param options The options for the file request
*/
export const createFileRequest = (path: string, options: FileRequestOptions = {}) => {
if (!path.startsWith('/')) {
throw new Error('Path must start with a slash')
}
// Navigate to the folder
cy.visit('/apps/files/files?dir=' + path)
// Open the file request dialog
cy.get('[data-cy-upload-picker] .action-item__menutoggle').first().click()
cy.contains('.upload-picker__menu-entry button', 'Create file request').click()
cy.get('[data-cy-file-request-dialog]').should('be.visible')
// Check and fill the first page options
cy.get('[data-cy-file-request-dialog-fieldset="label"]').should('be.visible')
cy.get('[data-cy-file-request-dialog-fieldset="destination"]').should('be.visible')
cy.get('[data-cy-file-request-dialog-fieldset="note"]').should('be.visible')
cy.get('[data-cy-file-request-dialog-fieldset="destination"] input').should('contain.value', path)
if (options.label) {
cy.get('[data-cy-file-request-dialog-fieldset="label"] input').type(`{selectall}${options.label}`)
}
if (options.note) {
cy.get('[data-cy-file-request-dialog-fieldset="note"] textarea').type(`{selectall}${options.note}`)
}
// Go to the next page
cy.get('[data-cy-file-request-dialog-controls="next"]').click()
cy.get('[data-cy-file-request-dialog-fieldset="expiration"] input[type="checkbox"]').should('exist')
cy.get('[data-cy-file-request-dialog-fieldset="expiration"] input[type="date"]').should('not.exist')
cy.get('[data-cy-file-request-dialog-fieldset="password"] input[type="checkbox"]').should('exist')
cy.get('[data-cy-file-request-dialog-fieldset="password"] input[type="password"]').should('not.exist')
if (options.expiration) {
cy.get('[data-cy-file-request-dialog-fieldset="expiration"] input[type="checkbox"]').check({ force: true })
cy.get('[data-cy-file-request-dialog-fieldset="expiration"] input[type="date"]').type(`{selectall}${options.expiration}`)
}
if (options.password) {
cy.get('[data-cy-file-request-dialog-fieldset="password"] input[type="checkbox"]').check({ force: true })
cy.get('[data-cy-file-request-dialog-fieldset="password"] input[type="password"]').type(`{selectall}${options.password}`)
}
// Create the file request
cy.get('[data-cy-file-request-dialog-controls="next"]').click()
// Get the file request URL
cy.get('[data-cy-file-request-dialog-fieldset="link"]').then(($link) => {
const url = $link.val()
cy.log(`File request URL: ${url}`)
cy.wrap(url).as('fileRequestUrl')
})
// Close
cy.get('[data-cy-file-request-dialog-controls="finish"]').click()
}
export const enterGuestName = (name: string) => {
cy.get('[data-cy-public-auth-prompt-dialog]').should('be.visible')
cy.get('[data-cy-public-auth-prompt-dialog-name]').should('be.visible')
cy.get('[data-cy-public-auth-prompt-dialog-submit]').should('be.visible')
cy.get('[data-cy-public-auth-prompt-dialog-name]').type(`{selectall}${name}`)
cy.get('[data-cy-public-auth-prompt-dialog-submit]').click()
cy.get('[data-cy-public-auth-prompt-dialog]').should('not.exist')
}

View file

@ -0,0 +1,59 @@
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import type { User } from '@nextcloud/cypress'
import { createFolder, getRowForFile } from '../files/FilesUtils'
import { createFileRequest, enterGuestName } from './FilesSharingUtils'
describe('Files', { testIsolation: true }, () => {
let user: User
let url = ''
let folderName = 'test-folder'
it('Login with a user and create a file request', () => {
cy.createRandomUser().then((_user) => {
user = _user
cy.login(user)
})
cy.visit('/apps/files')
createFolder(folderName)
createFileRequest(`/${folderName}`)
cy.get('@fileRequestUrl').should('contain', '/s/').then((_url: string) => {
cy.logout()
url = _url
})
})
it('Open the file request as a guest', () => {
cy.visit(url)
enterGuestName('Guest')
// Check various elements on the page
cy.get('#public-upload .emptycontent').should('be.visible')
cy.get('#public-upload h2').contains(`Upload files to ${folderName}`)
cy.get('#public-upload input[type="file"]').as('fileInput').should('exist')
cy.intercept('PUT', '/public.php/dav/files/*/*').as('uploadFile')
// Upload a file
cy.get('@fileInput').selectFile({
contents: Cypress.Buffer.from('abcdef'),
fileName: 'file.txt',
mimeType: 'text/plain',
lastModified: Date.now(),
}, { force: true })
cy.wait('@uploadFile').its('response.statusCode').should('eq', 201)
})
it('Check the uploaded file', () => {
cy.login(user)
cy.visit(`/apps/files/files?dir=/${folderName}`)
getRowForFile('Guest').should('be.visible').get('a[data-cy-files-list-row-name-link]').click()
getRowForFile('file.txt').should('be.visible')
})
})

View file

@ -4,7 +4,7 @@
*/
/* eslint-disable jsdoc/require-jsdoc */
import type { User } from '@nextcloud/cypress'
import { createShare, type ShareSetting } from '../files_sharing/filesSharingUtils'
import { createShare, type ShareSetting } from '../files_sharing/FilesSharingUtils'
export const uploadThreeVersions = (user: User, fileName: string) => {
// A new version will not be created if the changes occur

2
dist/4589-4589.js vendored
View file

@ -1,2 +0,0 @@
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[4589],{7869:(t,e,n)=>{n.d(e,{A:()=>l});var a=n(71354),i=n.n(a),s=n(76314),o=n.n(s)()(i());o.push([t.id,".public-auth-prompt__subtitle{font-size:16px;margin-block:12px}.public-auth-prompt__header{margin-block:12px}.public-auth-prompt__form{margin-block:24px}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/PublicAuthPrompt.vue"],names:[],mappings:"AAEC,8BAEC,cAAA,CACA,iBAAA,CAGD,4BAEC,iBAAA,CAGD,0BAEC,iBAAA",sourcesContent:["\n.public-auth-prompt {\n\t&__subtitle {\n\t\t// Smaller than dialog title\n\t\tfont-size: 16px;\n\t\tmargin-block: 12px;\n\t}\n\n\t&__header {\n\t\t// Fix extra margin generating an unwanted gap\n\t\tmargin-block: 12px;\n\t}\n\n\t&__form {\n\t\t// Double the margin of the header\n\t\tmargin-block: 24px;\n\t}\n}\n"],sourceRoot:""}]);const l=o},4589:(t,e,n)=>{n.r(e),n.d(e,{default:()=>v});var a=n(85471),i=n(53334),s=n(54332),o=n(94219),l=n(52201),r=n(82182),p=n(32981);const u=(0,a.pM)({name:"PublicAuthPrompt",components:{NcButton:s.A,NcDialog:o.A,NcNoteCard:l.A,NcTextField:r.A},setup:()=>({t:i.t,owner:(0,p.C)("files_sharing","owner",""),ownerDisplayName:(0,p.C)("files_sharing","ownerDisplayName",""),label:(0,p.C)("files_sharing","label",""),note:(0,p.C)("files_sharing","note",""),filename:(0,p.C)("files_sharing","filename","")}),data:()=>({name:""}),computed:{dialogName(){return this.t("files_sharing","Upload files to {folder}",{folder:this.label||this.filename})}},beforeMount(){const t=localStorage.getItem("nick");t&&(this.name=t)},methods:{onSubmit(){const t=this.$refs.form;t.checkValidity()?""!==this.name.trim()&&(localStorage.setItem("nick",this.name),this.$emit("close")):t.reportValidity()}}});var c=n(85072),m=n.n(c),h=n(97825),d=n.n(h),_=n(77659),f=n.n(_),b=n(55056),g=n.n(b),A=n(10540),C=n.n(A),y=n(41113),x=n.n(y),N=n(7869),k={};k.styleTagTransform=x(),k.setAttributes=g(),k.insert=f().bind(null,"head"),k.domAPI=d(),k.insertStyleElement=C(),m()(N.A,k),N.A&&N.A.locals&&N.A.locals;const v=(0,n(14486).A)(u,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcDialog",{staticClass:"public-auth-prompt",attrs:{"dialog-classes":"public-auth-prompt__dialog","can-close":!1,name:t.dialogName},scopedSlots:t._u([{key:"actions",fn:function(){return[e("NcButton",{ref:"submit",attrs:{disabled:""===t.name.trim()},on:{click:t.onSubmit}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Submit name"))+"\n\t\t")])]},proxy:!0}])},[t.owner?e("h3",{staticClass:"public-auth-prompt__subtitle"},[t._v("\n\t\t"+t._s(t.t("files_sharing","{ownerDisplayName} shared a folder with you.",{ownerDisplayName:t.ownerDisplayName}))+"\n\t")]):t._e(),t._v(" "),e("NcNoteCard",{staticClass:"public-auth-prompt__header",attrs:{type:"info"}},[e("p",{staticClass:"public-auth-prompt__description",attrs:{id:"public-auth-prompt-dialog-description"}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","To upload files, you need to provide your name first."))+"\n\t\t")])]),t._v(" "),e("form",{ref:"form",staticClass:"public-auth-prompt__form",attrs:{"aria-describedby":"public-auth-prompt-dialog-description"},on:{submit:function(t){t.preventDefault(),t.stopPropagation()}}},[e("NcTextField",{ref:"input",staticClass:"public-auth-prompt__input",attrs:{label:t.t("files_sharing","Enter your name"),name:"name",required:!0,minlength:2,value:t.name},on:{"update:value":function(e){t.name=e}}})],1)],1)}),[],!1,null,null,null).exports}}]);
//# sourceMappingURL=4589-4589.js.map?v=f528d9600121156d9e2c

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
4589-4589.js.license

2
dist/5315-5315.js vendored Normal file
View file

@ -0,0 +1,2 @@
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[5315],{63090:(t,e,a)=>{a.d(e,{A:()=>l});var n=a(71354),i=a.n(n),s=a(76314),o=a.n(s)()(i());o.push([t.id,".public-auth-prompt__subtitle{font-size:16px;margin-block:12px}.public-auth-prompt__header{margin-block:12px}.public-auth-prompt__form{margin-block:24px}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/PublicAuthPrompt.vue"],names:[],mappings:"AAEC,8BAEC,cAAA,CACA,iBAAA,CAGD,4BAEC,iBAAA,CAGD,0BAEC,iBAAA",sourcesContent:["\n.public-auth-prompt {\n\t&__subtitle {\n\t\t// Smaller than dialog title\n\t\tfont-size: 16px;\n\t\tmargin-block: 12px;\n\t}\n\n\t&__header {\n\t\t// Fix extra margin generating an unwanted gap\n\t\tmargin-block: 12px;\n\t}\n\n\t&__form {\n\t\t// Double the margin of the header\n\t\tmargin-block: 24px;\n\t}\n}\n"],sourceRoot:""}]);const l=o},45315:(t,e,a)=>{a.r(e),a.d(e,{default:()=>v});var n=a(85471),i=a(53334),s=a(54332),o=a(94219),l=a(52201),r=a(82182),p=a(32981);const u=(0,n.pM)({name:"PublicAuthPrompt",components:{NcButton:s.A,NcDialog:o.A,NcNoteCard:l.A,NcTextField:r.A},setup:()=>({t:i.t,owner:(0,p.C)("files_sharing","owner",""),ownerDisplayName:(0,p.C)("files_sharing","ownerDisplayName",""),label:(0,p.C)("files_sharing","label",""),note:(0,p.C)("files_sharing","note",""),filename:(0,p.C)("files_sharing","filename","")}),data:()=>({name:""}),computed:{dialogName(){return this.t("files_sharing","Upload files to {folder}",{folder:this.label||this.filename})}},beforeMount(){const t=localStorage.getItem("nick");t&&(this.name=t)},methods:{onSubmit(){const t=this.$refs.form;t.checkValidity()?""!==this.name.trim()&&(localStorage.setItem("nick",this.name),this.$emit("close")):t.reportValidity()}}});var c=a(85072),m=a.n(c),h=a(97825),d=a.n(h),_=a(77659),b=a.n(_),f=a(55056),g=a.n(f),A=a(10540),C=a.n(A),y=a(41113),x=a.n(y),N=a(63090),k={};k.styleTagTransform=x(),k.setAttributes=g(),k.insert=b().bind(null,"head"),k.domAPI=d(),k.insertStyleElement=C(),m()(N.A,k),N.A&&N.A.locals&&N.A.locals;const v=(0,a(14486).A)(u,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcDialog",{staticClass:"public-auth-prompt",attrs:{"data-cy-public-auth-prompt-dialog":"","dialog-classes":"public-auth-prompt__dialog","can-close":!1,name:t.dialogName},scopedSlots:t._u([{key:"actions",fn:function(){return[e("NcButton",{ref:"submit",attrs:{"data-cy-public-auth-prompt-dialog-submit":"",disabled:""===t.name.trim()},on:{click:t.onSubmit}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Submit name"))+"\n\t\t")])]},proxy:!0}])},[t.owner?e("h3",{staticClass:"public-auth-prompt__subtitle"},[t._v("\n\t\t"+t._s(t.t("files_sharing","{ownerDisplayName} shared a folder with you.",{ownerDisplayName:t.ownerDisplayName}))+"\n\t")]):t._e(),t._v(" "),e("NcNoteCard",{staticClass:"public-auth-prompt__header",attrs:{type:"info"}},[e("p",{staticClass:"public-auth-prompt__description",attrs:{id:"public-auth-prompt-dialog-description"}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","To upload files, you need to provide your name first."))+"\n\t\t")])]),t._v(" "),e("form",{ref:"form",staticClass:"public-auth-prompt__form",attrs:{"aria-describedby":"public-auth-prompt-dialog-description"},on:{submit:function(t){t.preventDefault(),t.stopPropagation()}}},[e("NcTextField",{ref:"input",staticClass:"public-auth-prompt__input",attrs:{"data-cy-public-auth-prompt-dialog-name":"",label:t.t("files_sharing","Enter your name"),minlength:2,required:!0,value:t.name,name:"name"},on:{"update:value":function(e){t.name=e}}})],1)],1)}),[],!1,null,null,null).exports}}]);
//# sourceMappingURL=5315-5315.js.map?v=16aff37ab8dbc31a4bc1

1
dist/5315-5315.js.map vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/5315-5315.js.map.license vendored Symbolic link
View file

@ -0,0 +1 @@
5315-5315.js.license

2
dist/6968-6968.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
6968-6968.js.license

2
dist/8832-8832.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/8832-8832.js.map vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/8832-8832.js.map.license vendored Symbolic link
View file

@ -0,0 +1 @@
8832-8832.js.license

4
dist/files-init.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
(()=>{"use strict";var e,t,r,o={38943:(e,t,r)=>{var o=r(85168),n=r(85471);const a=(0,r(35947).YK)().setApp("files_sharing").detectUser().build(),i=localStorage.getItem("nick"),l=localStorage.getItem("publicAuthPromptShown");i&&l?a.debug("Public auth prompt already shown. Current nickname is '".concat(i,"'")):(0,o.Ss)((0,n.$V)((()=>Promise.all([r.e(4208),r.e(4589)]).then(r.bind(r,4589)))),{},(()=>localStorage.setItem("publicAuthPromptShown","true")))}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return o[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=o,e=[],a.O=(t,r,o,n)=>{if(!r){var i=1/0;for(s=0;s<e.length;s++){r=e[s][0],o=e[s][1],n=e[s][2];for(var l=!0,c=0;c<r.length;c++)(!1&n||i>=n)&&Object.keys(a.O).every((e=>a.O[e](r[c])))?r.splice(c--,1):(l=!1,n<i&&(i=n));if(l){e.splice(s--,1);var u=o();void 0!==u&&(t=u)}}return t}n=n||0;for(var s=e.length;s>0&&e[s-1][2]>n;s--)e[s]=e[s-1];e[s]=[r,o,n]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,r)=>(a.f[r](e,t),t)),[])),a.u=e=>e+"-"+e+".js?v="+{4254:"5c2324570f66dff0c8a1",4589:"f528d9600121156d9e2c",9480:"f3ebcf41e93bbd8cd678"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="nextcloud:",a.l=(e,o,n,i)=>{if(t[e])t[e].push(o);else{var l,c;if(void 0!==n)for(var u=document.getElementsByTagName("script"),s=0;s<u.length;s++){var d=u[s];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+n){l=d;break}}l||(c=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.setAttribute("data-webpack",r+n),l.src=e),t[e]=[o];var p=(r,o)=>{l.onerror=l.onload=null,clearTimeout(f);var n=t[e];if(delete t[e],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach((e=>e(o))),r)return r(o)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),c&&document.head.appendChild(l)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=9804,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={9804:0};a.f.j=(t,r)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=n);var i=a.p+a.u(t),l=new Error;a.l(i,(r=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+n+": "+i+")",l.name="ChunkLoadError",l.type=n,l.request=i,o[1](l)}}),"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,i=r[0],l=r[1],c=r[2],u=0;if(i.some((t=>0!==e[t]))){for(o in l)a.o(l,o)&&(a.m[o]=l[o]);if(c)var s=c(a)}for(t&&t(r);u<i.length;u++)n=i[u],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(s)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),a.nc=void 0;var i=a.O(void 0,[4208],(()=>a(38943)));i=a.O(i)})();
//# sourceMappingURL=files_sharing-public-file-request.js.map?v=4ee42b64953b65a29438
(()=>{"use strict";var e,t,r,o={38943:(e,t,r)=>{var o=r(85168),n=r(85471);const a=(0,r(35947).YK)().setApp("files_sharing").detectUser().build(),i=localStorage.getItem("nick"),l=localStorage.getItem("publicAuthPromptShown");i&&l?a.debug("Public auth prompt already shown. Current nickname is '".concat(i,"'")):(0,o.Ss)((0,n.$V)((()=>Promise.all([r.e(4208),r.e(5315)]).then(r.bind(r,45315)))),{},(()=>localStorage.setItem("publicAuthPromptShown","true")))}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return o[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=o,e=[],a.O=(t,r,o,n)=>{if(!r){var i=1/0;for(s=0;s<e.length;s++){r=e[s][0],o=e[s][1],n=e[s][2];for(var l=!0,c=0;c<r.length;c++)(!1&n||i>=n)&&Object.keys(a.O).every((e=>a.O[e](r[c])))?r.splice(c--,1):(l=!1,n<i&&(i=n));if(l){e.splice(s--,1);var u=o();void 0!==u&&(t=u)}}return t}n=n||0;for(var s=e.length;s>0&&e[s-1][2]>n;s--)e[s]=e[s-1];e[s]=[r,o,n]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,r)=>(a.f[r](e,t),t)),[])),a.u=e=>e+"-"+e+".js?v="+{4254:"5c2324570f66dff0c8a1",5315:"16aff37ab8dbc31a4bc1",9480:"f3ebcf41e93bbd8cd678"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="nextcloud:",a.l=(e,o,n,i)=>{if(t[e])t[e].push(o);else{var l,c;if(void 0!==n)for(var u=document.getElementsByTagName("script"),s=0;s<u.length;s++){var d=u[s];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+n){l=d;break}}l||(c=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.setAttribute("data-webpack",r+n),l.src=e),t[e]=[o];var p=(r,o)=>{l.onerror=l.onload=null,clearTimeout(f);var n=t[e];if(delete t[e],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach((e=>e(o))),r)return r(o)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),c&&document.head.appendChild(l)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=9804,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={9804:0};a.f.j=(t,r)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=n);var i=a.p+a.u(t),l=new Error;a.l(i,(r=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+n+": "+i+")",l.name="ChunkLoadError",l.type=n,l.request=i,o[1](l)}}),"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,i=r[0],l=r[1],c=r[2],u=0;if(i.some((t=>0!==e[t]))){for(o in l)a.o(l,o)&&(a.m[o]=l[o]);if(c)var s=c(a)}for(t&&t(r);u<i.length;u++)n=i[u],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(s)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),a.nc=void 0;var i=a.O(void 0,[4208],(()=>a(38943)));i=a.O(i)})();
//# sourceMappingURL=files_sharing-public-file-request.js.map?v=b5261a2bac981593d805

File diff suppressed because one or more lines are too long