"use strict";(self.webpackChunkcalendar=self.webpackChunkcalendar||[]).push([["node_modules_nextcloud_dialogs_dist_legacy_mjs"],{28592:(e,l,t)=>{t.r(l),t.d(l,{confirm:()=>y,filepicker:()=>c});var a=t(71504),i=t(53032),o=(t(17220),t(7768)),s=t(85512);const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJtZGktZm9sZGVyLW11bHRpcGxlIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0yMiw0SDE0TDEyLDJINkEyLDIgMCAwLDAgNCw0VjE2QTIsMiAwIDAsMCA2LDE4SDIyQTIsMiAwIDAsMCAyNCwxNlY2QTIsMiAwIDAsMCAyMiw0TTIsNkgwVjExSDBWMjBBMiwyIDAgMCwwIDIsMjJIMjBWMjBIMlY2WiIgLz48L3N2Zz4=",r="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJtZGktZm9sZGVyLW1vdmUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE0LDE4VjE1SDEwVjExSDE0VjhMMTksMTNNMjAsNkgxMkwxMCw0SDRDMi44OSw0IDIsNC44OSAyLDZWMThBMiwyIDAgMCwwIDQsMjBIMjBBMiwyIDAgMCwwIDIyLDE4VjhDMjIsNi44OSAyMS4xLDYgMjAsNloiIC8+PC9zdmc+",u=(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 c(e,l,t=!1,o,s,c=i.a.Choose,y,d){const m=(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 M;c===i.a.Custom?(M=[],(d.buttons||[]).forEach((e=>{M.push({callback:m(l,e.type),label:e.text,type:e.defaultButton?"primary":"secondary"})}))):M=(e,o)=>{var s,u,y;const d=[],M=(null==(u=null==(s=null==e?void 0:e[0])?void 0:s.attributes)?void 0:u.displayName)||(null==(y=null==e?void 0:e[0])?void 0:y.basename),p=M||(0,a.basename)(o);return c===i.a.Choose&&d.push({callback:m(l,i.a.Choose),label:M&&!t?(0,i.t)("Choose {file}",{file:M}):(0,i.t)("Choose"),type:"primary"}),(c===i.a.CopyMove||c===i.a.Copy)&&d.push({callback:m(l,i.a.Copy),label:p?(0,i.t)("Copy to {target}",{target:p}):(0,i.t)("Copy"),type:"primary",icon:n}),(c===i.a.Move||c===i.a.CopyMove)&&d.push({callback:m(l,i.a.Move),label:p?(0,i.t)("Move to {target}",{target:p}):(0,i.t)("Move"),type:c===i.a.Move?"primary":"secondary",icon:r}),d};const p={};"function"==typeof(null==d?void 0:d.filter)&&(p.filterFn=e=>d.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 v="string"==typeof o?[o]:o||[];u(i.c,{...p,name:e,buttons:M,multiselect:t,path:y,mimetypeFilter:v,allowPickDirectory:!0===(null==d?void 0:d.allowDirectoryChooser)||v.includes("httpd/unix-directory")})}async function y(e,l,t,a){u(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=e33a6e762e59d81fb5fa