"use strict";(self.webpackChunkcalendar=self.webpackChunkcalendar||[]).push([["node_modules_nextcloud_dialogs_dist_legacy_mjs"],{2608:(e,l,t)=>{t.r(l),t.d(l,{confirm:()=>u,filepicker:()=>r});var a=t(26470),i=t(30518),o=(t(48588),t(20144)),s=t(41215);const n=(e,l,t=(()=>{}))=>{const a=document.createElement("div");(document.querySelector(null==l?void 0:l.container)||document.body).appendChild(a);const i=new o.default({el:a,name:"VueDialogHelper",render:a=>a(e,{props:l,on:{close:()=>{t(),i.$destroy()}}})})};async function r(e,l,t=!1,o,s,r=i.a.Choose,u,c){const y=(e,l)=>{const a=e=>{const l=(null==e?void 0:e.root)||"";let t=(null==e?void 0:e.path)||"";return t.startsWith(l)&&(t=t.slice(l.length)||"/"),t};return t?t=>e(t.map(a),l):t=>e(a(t[0]),l)};let d;r===i.a.Custom?(d=[],(c.buttons||[]).forEach((e=>{d.push({callback:y(l,e.type),label:e.text,type:e.defaultButton?"primary":"secondary"})}))):d=(e,o)=>{var s,n,u;const c=[],d=(null==(n=null==(s=null==e?void 0:e[0])?void 0:s.attributes)?void 0:n.displayName)||(null==(u=null==e?void 0:e[0])?void 0:u.basename),m=d||(0,a.basename)(o);return r===i.a.Choose&&c.push({callback:y(l,i.a.Choose),label:d&&!t?(0,i.t)("Choose {file}",{file:d}):(0,i.t)("Choose"),type:"primary"}),(r===i.a.CopyMove||r===i.a.Copy)&&c.push({callback:y(l,i.a.Copy),label:m?(0,i.t)("Copy to {target}",{target:m}):(0,i.t)("Copy"),type:"primary",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJtZGktZm9sZGVyLW11bHRpcGxlIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0yMiw0SDE0TDEyLDJINkEyLDIgMCAwLDAgNCw0VjE2QTIsMiAwIDAsMCA2LDE4SDIyQTIsMiAwIDAsMCAyNCwxNlY2QTIsMiAwIDAsMCAyMiw0TTIsNkgwVjExSDBWMjBBMiwyIDAgMCwwIDIsMjJIMjBWMjBIMlY2WiIgLz48L3N2Zz4="}),(r===i.a.Move||r===i.a.CopyMove)&&c.push({callback:y(l,i.a.Move),label:m?(0,i.t)("Move to {target}",{target:m}):(0,i.t)("Move"),type:r===i.a.Move?"primary":"secondary",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJtZGktZm9sZGVyLW1vdmUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE0LDE4VjE1SDEwVjExSDE0VjhMMTksMTNNMjAsNkgxMkwxMCw0SDRDMi44OSw0IDIsNC44OSAyLDZWMThBMiwyIDAgMCwwIDQsMjBIMjBBMiwyIDAgMCwwIDIyLDE4VjhDMjIsNi44OSAyMS4xLDYgMjAsNloiIC8+PC9zdmc+"}),c};const m={};"function"==typeof(null==c?void 0:c.filter)&&(m.filterFn=e=>c.filter((e=>{var l,t,a,i,o,s;return{id:e.fileid||null,path:e.path,mimetype:e.mime||null,mtime:(null==(l=e.mtime)?void 0:l.getTime())||null,permissions:e.permissions,name:(null==(t=e.attributes)?void 0:t.displayname)||e.basename,etag:(null==(a=e.attributes)?void 0:a.etag)||null,hasPreview:(null==(i=e.attributes)?void 0:i.hasPreview)||null,mountType:(null==(o=e.attributes)?void 0:o.mountType)||null,quotaAvailableBytes:(null==(s=e.attributes)?void 0:s.quotaAvailableBytes)||null,icon:null,sharePermissions:null}})(e)));const M="string"==typeof o?[o]:o||[];n(i.c,{...m,name:e,buttons:d,multiselect:t,path:u,mimetypeFilter:M,allowPickDirectory:!0===(null==c?void 0:c.allowDirectoryChooser)||M.includes("httpd/unix-directory")})}async function u(e,l,t,a){n(s.D,{name:l,message:e,buttons:[{label:"No",callback:()=>t(!1)},{label:"Yes",type:"primary",callback:()=>t(!0)}],size:"small"},(()=>t(!1)))}}}]);
//# sourceMappingURL=calendar-node_modules_nextcloud_dialogs_dist_legacy_mjs.js.map?v=076ba1741643ead8a423