(()=>{"use strict";vare,o={54878:(e,o,n)=>{varr=n(32981),i=n(63814);window.OCA.Sharing=window.OCA.Sharing||{},window.OCA.Sharing.showAddExternalDialog=function(e,o,n){constr=e.remote,i=e.ownerDisplayName||e.owner,a=e.name,s=r.replace(/^https?:\/\//,"").replace(/\/$/,"");o?window.OC.dialogs.prompt(t("files_sharing","Do you want to add the remote share {name} from {owner}@{remote}?",{name:a,owner:i,remote:s}),t("files_sharing","Remote share"),(function(o,t){e.password=t,n(o,e)}),!0,t("files_sharing","Remote share password"),!0).then(this._adjustDialog):window.OC.dialogs.confirm(t("files_sharing","Do you want to add the remote share {name} from {owner}@{remote}?",{name:a,owner:i,remote:s}),t("files_sharing","Remote share"),(function(o){n(o,e)}),!0).then(this._adjustDialog)},window.OCA.Sharing._adjustDialog=function(){conste=$(".oc-dialog:visible"),o=e.find("button");e.find(".ui-icon").remove(),o.eq(1).text(t("core","Cancel")),o.eq(2).text(t("files_sharing","Add remote share"))};consta=function(){window?.OCP?.Files?.Router?.goToRoute?window.OCP.Files.Router.goToRoute(null,{...window.OCP.Files.Router.params,fileid:void0},{...window.OCP.Files.Router.query,dir:"/",openfile:void0}):window.location.reload()};!function(){conste=window.OC.Util.History.parseUrlQuery();if(e.remote&&e.token&&e.name){consto=function(e,o){constn=o.password||"";e&&$.post((0,i.Jv)("apps/federatedfilesharing/askForFederatedShare"),{remote:o.remote,token:o.token,owner:o.owner,ownerDisplayName:o.ownerDisplayName||o.owner,name:o.name,password:n}).done((function(e){Object.hasOwn(e,"legacyMount")?a():window.OC.Notification.showTemporary(e.message)})).fail((function(e){window.OC.Notification.showTemporary(JSON.parse(e.responseText).message)}))};location.hash="",e.passwordProtected=1===parseInt(e.protected,10),window.OCA.Sharing.showAddExternalDialog(e,e.passwordProtected,o)}}(),!0!==(0,r.C)("federatedfilesharing","notificationsEnabled",!0)&&$.get((0,i.Jv)("/apps/files_sharing/api/externalShares"),{},(function(e){leto;for(o=0;o<e.length;++o)window.OCA.Sharing.showAddExternalDialog(e[o],!1,(function(e,o){e?$.post((0,i.Jv)("/apps/files_sharing/api/externalShares"),{id:o.id}).then((function(){a()})):$.ajax({url:(0,i.Jv)("/apps/files_sharing/api/externalShares/"+o.id),type:"DELETE"})}))})),$("body").on("window.OCA.Notification.Action",(function(e){"files_sharing"===e.notification.app&&"remote_share"===e.notification.object_type&&"POST"===e.action.type&&a()}))}},n={};functionr(e){vart=n[e];if(void0!==t)returnt.exports;vari=n[e]={id:e,loaded:!1,exports:{}};returno[e].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=o,e=[],r.O=(o,n,t,i)=>{if(!n){vara=1/0;for(f=0;f<e.length;f++){n=e[f][0],t=e[f][1],i=e[f][2];for(vars=!0,d=0;d<n.length;d++)(!1&i||a>=i)&&Object.keys(r.O).every((e=>r.O[e](n[d])))?n.splice(d--,1):(s=!1,i<a&&(a=i));if(s){e.splice(f--,1);varl=t();void0!==l&&(o=l)}}returno}i=i||0;for(varf=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[n,t,i]},r.n=e=>{varo=e&&e.__esModule?()=>e.default:()=>e;returnr.d(o,{a:o}),o},r.d=(e,o)=>{for(varnino)r.o(o,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},r.e=()=>Promise.resolve(),r.g=function(){if("object"==typeofglobalThis)returnglobalThis;try{returnthis||newFunction("return this")()}catch(e){if("object"==typeofwindow)returnwindow}}(),r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r.r=e=>{"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.j=2299,(()=>{r.b=document.baseURI||self.location.href;vare={2299:0};r.O.j=o=>0===e[o];varo=(o,n)=>{vart,i,a=n[0],s=n[1],d=n[2],l=0;if(a.some((o=>0!==e[o]))){for(tins)r.o(s,t)&&(r.m[t]=s[t]);if(d)varf=d(r)}for(o&&o(n);l<a.length;l++)i=a[l],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;returnr.O(f)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(o.bind(null,0)),n.push=o.bind(null,n.push.bind(n))})(),r.nc=void0;vari=r.O(void0,[4208],(()=>r(54878)))