r2-explorer 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/README.md +101 -44
  2. package/dashboard/assets/{AuthLayout.47bc4d6b.js → AuthLayout.7618f480.js} +1 -1
  3. package/dashboard/{spa/assets/EmailFilePage.5146dfaa.js → assets/EmailFilePage.bbf7a6c5.js} +1 -1
  4. package/dashboard/{spa/assets/ErrorNotFound.2be1d090.js → assets/ErrorNotFound.699f3886.js} +1 -1
  5. package/dashboard/{spa/assets/LoginPage.e449cd8d.js → assets/LoginPage.149f1ef8.js} +1 -1
  6. package/dashboard/assets/{auth-store.1a4593f8.js → auth-store.f621e290.js} +1 -1
  7. package/dashboard/assets/{auth.a5ffeab6.js → auth.9b526521.js} +1 -1
  8. package/dashboard/assets/{bus.67913454.js → bus.18b30314.js} +1 -1
  9. package/dashboard/assets/{index.ddf53a58.js → index.69bcbd86.js} +2 -2
  10. package/dashboard/index.html +1 -1
  11. package/dashboard/spa/assets/{AuthLayout.47bc4d6b.js → AuthLayout.7618f480.js} +1 -1
  12. package/dashboard/{assets/EmailFilePage.5146dfaa.js → spa/assets/EmailFilePage.bbf7a6c5.js} +1 -1
  13. package/dashboard/{assets/ErrorNotFound.2be1d090.js → spa/assets/ErrorNotFound.699f3886.js} +1 -1
  14. package/dashboard/{assets/LoginPage.e449cd8d.js → spa/assets/LoginPage.149f1ef8.js} +1 -1
  15. package/dashboard/spa/assets/{auth-store.1a4593f8.js → auth-store.f621e290.js} +1 -1
  16. package/dashboard/spa/assets/{auth.a5ffeab6.js → auth.9b526521.js} +1 -1
  17. package/dashboard/spa/assets/{bus.67913454.js → bus.18b30314.js} +1 -1
  18. package/dashboard/spa/assets/{index.ddf53a58.js → index.69bcbd86.js} +2 -2
  19. package/dashboard/spa/index.html +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/index.mjs +1 -1
  22. package/package.json +1 -1
package/README.md CHANGED
@@ -11,67 +11,124 @@
11
11
  <p align="center">
12
12
  <a href="https://github.com/G4brym/R2-Explorer/commits/main" target="_blank">
13
13
  <img src="https://img.shields.io/github/commit-activity/m/G4brym/R2-Explorer?label=Commits&style=social" alt="R2-Explorer Commits">
14
- </a>
14
+ </a>
15
15
  <a href="https://github.com/G4brym/R2-Explorer/issues" target="_blank">
16
16
  <img src="https://img.shields.io/github/issues/G4brym/R2-Explorer?style=social" alt="Issues">
17
- </a>
17
+ </a>
18
18
  <a href="https://github.com/G4brym/R2-Explorer/blob/main/LICENSE" target="_blank">
19
19
  <img src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=social" alt="Software License">
20
- </a>
20
+ </a>
21
21
  </p>
22
22
 
23
- <hr />
23
+ # R2-Explorer
24
+
25
+ R2-Explorer brings a familiar Google Drive-like interface to your Cloudflare R2 storage buckets, making file management simple and intuitive.
26
+
27
+ ## Quick Links
28
+
29
+ - 📚 **Documentation**: [r2explorer.dev](https://r2explorer.dev)
30
+ - 🎮 **Live Demo**: [demo.r2explorer.dev](https://demo.r2explorer.dev)
31
+ - 💻 **Source Code**: [github.com/G4brym/R2-Explorer](https://github.com/G4brym/R2-Explorer)
32
+
33
+ Available in multiple languages:
34
+ [English](https://r2explorer.dev) |
35
+ [Español](https://r2explorer-dev.translate.goog/?_x_tr_sl=en&_x_tr_tl=es) |
36
+ [Português](https://r2explorer-dev.translate.goog/?_x_tr_sl=en&_x_tr_tl=pt-PT) |
37
+ [Français](https://r2explorer-dev.translate.goog/?_x_tr_sl=en&_x_tr_tl=fr)
38
+
39
+ ## Overview
40
+
41
+ R2-Explorer transforms your Cloudflare R2 storage experience with a modern, user-friendly interface. It provides powerful file management capabilities while maintaining enterprise-grade security through Cloudflare's infrastructure.
42
+
43
+ ## Key Features
44
+
45
+ - **🔒 Security**
46
+ - Basic Authentication support
47
+ - Cloudflare Access integration
48
+ - Self-hosted on your Cloudflare account
49
+
50
+ - **📁 File Management**
51
+ - Drag-and-drop file upload
52
+ - Folder creation and organization
53
+ - Multi-part upload for large files
54
+ - Right-click context menu for advanced options
55
+ - HTTP/Custom metadata editing
24
56
 
25
- **Documentation**: <a href="https://r2explorer.dev/">r2explorer.dev</a>
57
+ - **👀 File Handling**
58
+ - In-browser file preview
59
+ - PDF documents
60
+ - Images
61
+ - Text files
62
+ - Markdown
63
+ - CSV
64
+ - Logpush files
65
+ - In-browser file editing
66
+ - Folder upload support
67
+
68
+ - **📧 Email Integration**
69
+ - Receive and process emails via Cloudflare Email Routing
70
+ - View email attachments directly in the interface
26
71
 
27
- **Demo**: <a href="https://demo.r2explorer.dev/">demo.r2explorer.dev</a>
72
+ ## Installation Methods
28
73
 
29
- **Source Code**: <a href="https://github.com/G4brym/R2-Explorer/">github.com/G4brym/R2-Explorer</a>
74
+ Choose the method that best suits your needs:
30
75
 
31
- <hr />
76
+ 1. **GitHub Action (Recommended)**
77
+ ```bash
78
+ # Follow the guide at:
79
+ https://r2explorer.dev/getting-started/creating-a-new-project/#1st-method-github-action-recommended
80
+ ```
32
81
 
33
- Read this in other languages: [Español](https://r2explorer-dev.translate.goog/?_x_tr_sl=en&_x_tr_tl=es&_x_tr_hl=es&_x_tr_pto=wapp),
34
- [Português](https://r2explorer-dev.translate.goog/?_x_tr_sl=en&_x_tr_tl=pt-PT&_x_tr_hl=pt-PT&_x_tr_pto=wapp),
35
- [Français](https://r2explorer-dev.translate.goog/?_x_tr_sl=en&_x_tr_tl=fr&_x_tr_hl=fr&_x_tr_pto=wapp)
82
+ 2. **Cloudflare CLI**
83
+ ```bash
84
+ # Follow the guide at:
85
+ https://r2explorer.dev/getting-started/creating-a-new-project/#2nd-method-create-cloudflare
86
+ ```
36
87
 
37
- ## Features
88
+ 3. **Template Repository**
89
+ ```bash
90
+ # Use our template at:
91
+ https://github.com/G4brym/R2-Explorer/tree/main/template
92
+ ```
38
93
 
39
- - Self-hosted/Deployed on your own Cloudflare Account
40
- - [Receive and read emails](https://r2explorer.dev/guides/setup-email-explorer/) (via Cloudflare Email Routing)
41
- - Security:
42
- - [Basic Auth](https://r2explorer.dev/getting-started/security/#basic-auth)
43
- - [Cloudflare Access](https://r2explorer.dev/getting-started/security/#authenticating-with-cloudflare-access)
44
- - Managing files:
45
- - In-browser File preview (pdf, image, txt, markdown, csv, logpush...)
46
- - In-browser File editing
47
- - Drag-and-Drop upload
48
- - Upload files or folders with files
49
- - Multipart upload for big files
50
- - HTTP/Custom metadata edit
51
- - Organization:
52
- - Create folders
53
- - Upload/Rename/Download/Delete files
54
- - Right click in file for extra options
94
+ For detailed instructions on maintaining and updating your installation, visit our [update guide](https://r2explorer.dev/getting-started/updating-your-project/).
55
95
 
56
- ## Installation
96
+ ## Roadmap
57
97
 
58
- 1. Method: [Github Action](https://r2explorer.dev/getting-started/creating-a-new-project/#1st-method-github-action-recommended)
59
- 2. Method: [Create Cloudflare CLI](https://r2explorer.dev/getting-started/creating-a-new-project/#2nd-method-create-cloudflare)
60
- 3. Method: [Template](https://github.com/G4brym/R2-Explorer/tree/main/template)
98
+ We're actively working on these exciting features:
61
99
 
62
- Learn more about keeping your instance updated in the [Updating your project docs](https://r2explorer.dev/getting-started/updating-your-project/).
100
+ - **File Management**
101
+ - Support for bucket names with spaces
102
+ - File search functionality
103
+ - Folder renaming capability
104
+ - Image thumbnails generation
105
+
106
+ - **AI Integration**
107
+ - Object detection using workers-ai
108
+
109
+ - **User Experience**
110
+ - Enhanced timestamp tooltips
111
+ - Email response capabilities
112
+ - Advanced file type-specific editing
113
+
114
+ ## Known Issues
63
115
 
64
- ## Coming soon
116
+ - When using basic authentication, email inline images and assets don't load properly
117
+ - Additional issues can be found and reported on our [GitHub Issues](https://github.com/G4brym/R2-Explorer/issues) page
65
118
 
66
- - allow bucket names with spaces
67
- - Search files
68
- - Rename folders
69
- - Image thumbnail's ?
70
- - Object detection on images using workers-ai ?
71
- - Tooltip when hovering a file with absolute time in "x days time ago" format
72
- - support for responding to emails
73
- - More advanced file editing with more validations per file type
119
+ ## Contributing
74
120
 
75
- ## Known issues
121
+ We welcome contributions! Whether it's bug fixes, new features, or documentation improvements, please feel free to:
76
122
 
77
- - Email inline images and assets don't load when using basic auth
123
+ 1. Fork the repository
124
+ 2. Create a feature branch
125
+ 3. Submit a Pull Request
126
+
127
+ ## Support
128
+
129
+ - 📚 Documentation: [r2explorer.dev](https://r2explorer.dev)
130
+ - 🐛 Issue Tracker: [GitHub Issues](https://github.com/G4brym/R2-Explorer/issues)
131
+
132
+ ## License
133
+
134
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
@@ -1 +1 @@
1
- import{_ as a,c as n,r,o as s,e as c,w as e,Q as _,f as o,g as p}from"./index.ddf53a58.js";const u=n({name:"AuthLayout",components:{}});function f(i,d,l,m,h,v){const t=r("router-view");return s(),c(_,{view:"hHh lpR fFf"},{default:e(()=>[o(p,{class:"container"},{default:e(()=>[o(t)]),_:1})]),_:1})}var x=a(u,[["render",f]]);export{x as default};
1
+ import{_ as a,c as n,r,o as s,e as c,w as e,Q as _,f as o,g as p}from"./index.69bcbd86.js";const u=n({name:"AuthLayout",components:{}});function f(i,d,l,m,h,v){const t=r("router-view");return s(),c(_,{view:"hHh lpR fFf"},{default:e(()=>[o(p,{class:"container"},{default:e(()=>[o(t)]),_:1})]),_:1})}var x=a(u,[["render",f]]);export{x as default};
@@ -1,2 +1,2 @@
1
- import{h as te,G as _e,H as Se,I as q,J as W,K as Te,L as $e,M as Pe,N as x,k as _,O as N,P as Be,R as Ce,S as qe,T as He,U as Ee,V as Me,W as Ae,X as z,Y as D,Z as U,$ as V,a0 as Fe,a1 as j,a2 as R,a3 as Oe,l as M,a4 as Ie,n as Le,a5 as Qe,m as ae,a6 as We,_ as xe,c as Ne,a7 as G,a8 as J,a9 as ze,aa as w,u as De,ab as Ue,o as u,ac as p,f as s,w as o,F as K,ad as Ve,x as $,E as P,z as b,ae as X,e as H,B as Y,y as d,A as v,t as Z,af as ee,ag as je,ah as Re}from"./index.ddf53a58.js";var E=te({name:"QTooltip",inheritAttrs:!1,props:{..._e,...Se,...q,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null},transitionShow:{...q.transitionShow,default:"jump-down"},transitionHide:{...q.transitionHide,default:"jump-up"},anchor:{type:String,default:"bottom middle",validator:W},self:{type:String,default:"top middle",validator:W},offset:{type:Array,default:()=>[14,14],validator:Te},scrollTarget:$e,delay:{type:Number,default:0},hideDelay:{type:Number,default:0},persistent:Boolean},emits:[...Pe],setup(e,{slots:t,emit:m,attrs:l}){let a,n;const r=Le(),{proxy:{$q:c}}=r,g=x(null),S=x(!1),se=_(()=>N(e.anchor,c.lang.rtl)),le=_(()=>N(e.self,c.lang.rtl)),ne=_(()=>e.persistent!==!0),{registerTick:oe,removeTick:ie}=Be(),{registerTimeout:T}=Ce(),{transitionProps:re,transitionStyle:de}=qe(e),{localScrollTarget:A,changeScrollEvent:ce,unconfigureScrollTarget:ue}=He(e,L),{anchorEl:f,canShow:fe,anchorEvents:k}=Ee({showing:S,configureAnchorEl:ye}),{show:me,hide:B}=Me({showing:S,canShow:fe,handleShow:pe,handleHide:ve,hideOnRouteChange:ne,processOnMount:!0});Object.assign(k,{delayShow:ge,delayHide:ke});const{showPortal:F,hidePortal:O,renderPortal:he}=Ae(r,g,be,"tooltip");if(c.platform.is.mobile===!0){const i={anchorEl:f,innerRef:g,onClickOutside(h){return B(h),h.target.classList.contains("q-dialog__backdrop")&&We(h),!0}},C=_(()=>e.modelValue===null&&e.persistent!==!0&&S.value===!0);z(C,h=>{(h===!0?Qe:U)(i)}),D(()=>{U(i)})}function pe(i){F(),oe(()=>{n=new MutationObserver(()=>y()),n.observe(g.value,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),y(),L()}),a===void 0&&(a=z(()=>c.screen.width+"|"+c.screen.height+"|"+e.self+"|"+e.anchor+"|"+c.lang.rtl,y)),T(()=>{F(!0),m("show",i)},e.transitionDuration)}function ve(i){ie(),O(),I(),T(()=>{O(!0),m("hide",i)},e.transitionDuration)}function I(){n!==void 0&&(n.disconnect(),n=void 0),a!==void 0&&(a(),a=void 0),ue(),V(k,"tooltipTemp")}function y(){Fe({targetEl:g.value,offset:e.offset,anchorEl:f.value,anchorOrigin:se.value,selfOrigin:le.value,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function ge(i){if(c.platform.is.mobile===!0){j(),document.body.classList.add("non-selectable");const C=f.value,h=["touchmove","touchcancel","touchend","click"].map(Q=>[C,Q,"delayHide","passiveCapture"]);R(k,"tooltipTemp",h)}T(()=>{me(i)},e.delay)}function ke(i){c.platform.is.mobile===!0&&(V(k,"tooltipTemp"),j(),setTimeout(()=>{document.body.classList.remove("non-selectable")},10)),T(()=>{B(i)},e.hideDelay)}function ye(){if(e.noParentEvent===!0||f.value===null)return;const i=c.platform.is.mobile===!0?[[f.value,"touchstart","delayShow","passive"]]:[[f.value,"mouseenter","delayShow","passive"],[f.value,"mouseleave","delayHide","passive"]];R(k,"anchor",i)}function L(){if(f.value!==null||e.scrollTarget!==void 0){A.value=Oe(f.value,e.scrollTarget);const i=e.noParentEvent===!0?y:B;ce(A.value,i)}}function we(){return S.value===!0?M("div",{...l,ref:g,class:["q-tooltip q-tooltip--style q-position-engine no-pointer-events",l.class],style:[l.style,de.value],role:"tooltip"},ae(t.default)):null}function be(){return M(Ie,re.value,we)}return D(I),Object.assign(r.proxy,{updatePosition:y}),he}}),Ge=te({name:"QBtnGroup",props:{unelevated:Boolean,outline:Boolean,flat:Boolean,rounded:Boolean,square:Boolean,push:Boolean,stretch:Boolean,glossy:Boolean,spread:Boolean},setup(e,{slots:t}){const m=_(()=>{const l=["unelevated","outline","flat","rounded","square","push","stretch","glossy"].filter(a=>e[a]===!0).map(a=>`q-btn-group--${a}`).join(" ");return`q-btn-group row no-wrap${l.length!==0?" "+l:""}`+(e.spread===!0?" q-btn-group--spread":" inline")});return()=>M("div",{class:m.value},ae(t.default))}});const Je=Ne({name:"EmailFolderPage",data:()=>({srcdoc:null,file:null,fileHead:null,timeInterval:null,attachments:[]}),computed:{selectedBucket:function(){return this.$route.params.bucket},selectedFolder:function(){return this.$route.params.folder},selectedFile:function(){return this.$route.params.file},filePath:function(){const e=G(this.selectedFile);return`.r2-explorer/emails/${this.selectedFolder}/${e}`}},watch:{selectedBucket(e){this.$router.push({name:"email-folder",params:{bucket:e,folder:J(this.selectedFolder)}})}},methods:{timeSince:ze,contentFinishedLoading(){clearInterval(this.timeInterval),this.timeInterval=null,this.resizeIframe()},resizeIframe(){this.$refs.renderWindow&&(this.$refs.renderWindow.style.height=`${this.$refs.renderWindow.contentWindow.document.documentElement.scrollHeight}px`)},fetchEmail:async function(){const e=G(this.selectedFile),t=await w.downloadFile(this.selectedBucket,this.filePath,{}),m=e.split(".json")[0];this.file=t.data;let l=t.data.html;if(l){l=l.replaceAll(/<a(.*?)>(.*?)<\/a>/gi,'<a$1 target="_blank">$2</a>');for(const a of t.data.attachments){a.display=!0,a.downloadUrl=`${this.mainStore.serverUrl}/api/buckets/${this.selectedBucket}/${J(`.r2-explorer/emails/${this.selectedFolder}/${m}/${a.filename}`)}`;let n=a.contentId;if(n){n.startsWith("<")&&n.endsWith(">")&&(n=n.substring(1,n.length-1));const r=`cid:${n}`;l.includes(r)&&(l=l.replaceAll(`cid:${n}`,a.downloadUrl),a.display=!1)}}this.srcdoc=l}this.attachments=t.data.attachments.filter(a=>a.display),w.headFile(this.selectedBucket,this.filePath).then(async a=>{a.customMetadata.read==="false"?this.fileHead=await w.updateMetadata(this.selectedBucket,this.filePath,{...a.customMetadata,read:!0}):this.fileHead=a}),setTimeout(()=>{this.contentFinishedLoading()},1e4),this.timeInterval=setInterval(()=>{this.resizeIframe()},400)},markAsUnread:async function(){this.fileHead=await w.updateMetadata(this.selectedBucket,this.filePath,{...this.fileHead.customMetadata,read:!1}),this.q.notify({group:!1,icon:"done",spinner:!1,message:"Email marked as unread!",timeout:2500})},markAsRead:async function(){this.fileHead=await w.updateMetadata(this.selectedBucket,this.filePath,{...this.fileHead.customMetadata,read:!0}),this.q.notify({group:!1,icon:"done",spinner:!1,message:"Email marked as read!",timeout:2500})},downloadAtt:e=>{console.log(e);const t=document.createElement("a");t.download=e.filename,t.href=e.downloadUrl,document.body.appendChild(t),t.click(),document.body.removeChild(t)}},created(){this.fetchEmail()},setup(){return{mainStore:De(),q:Ue()}}}),Ke={key:0},Xe={class:"font-18 q-my-none"},Ye={class:"d-flex row"},Ze={class:"d-flex column"},et={class:"text-muted"},tt={class:"q-ml-auto"},at={class:""},st={class:"overflow-auto d-block email-wrapper"},lt=["srcdoc"],nt=["innerHTML"],ot={class:"row attachments"},it={key:1,class:"text-center q-my-lg"};function rt(e,t,m,l,a,n){return this.file?(u(),p("div",Ke,[s(K,null,{default:o(()=>[s($,{class:"bg-grey-2 text-black",vertical:""},{default:o(()=>[s(Ge,{unelevated:""},{default:o(()=>[s(P,{push:"",icon:"arrow_back",to:{name:"email-folder",params:{bucket:e.$route.params.bucket,folder:e.$route.params.folder}}},{default:o(()=>[s(E,null,{default:o(()=>t[1]||(t[1]=[b("Back")])),_:1})]),_:1},8,["to"]),e.fileHead?(u(),p(X,{key:0},[e.fileHead.customMetadata.read==="true"?(u(),H(P,{key:0,push:"",icon:"mark_email_unread",onClick:e.markAsUnread},{default:o(()=>[s(E,null,{default:o(()=>t[2]||(t[2]=[b("Mark email as unread")])),_:1})]),_:1},8,["onClick"])):(u(),H(P,{key:1,push:"",icon:"mark_email_read",onClick:e.markAsRead},{default:o(()=>[s(E,null,{default:o(()=>t[3]||(t[3]=[b("Mark email as read")])),_:1})]),_:1},8,["onClick"]))],64)):Y("",!0)]),_:1})]),_:1}),s($,{vertical:""},{default:o(()=>[d("h5",Xe,v(e.file.subject),1)]),_:1}),s($,{horizontal:"",class:"q-px-sm"},{default:o(()=>[d("div",Ye,[s(Z,{name:"account_circle",size:"xl",class:"q-mr-sm"}),d("div",Ze,[d("span",null,[b(v(e.file.from.name)+" ",1),d("small",et,"<"+v(e.file.from.address)+">",1)]),d("span",null,"to "+v(e.file.to[0].address),1)])]),d("div",tt,[d("small",at,v(e.file.date)+" ("+v(e.timeSince(new Date(e.file.date)))+")",1)])]),_:1}),s(ee,{vertical:""},{default:o(()=>[d("div",st,[e.srcdoc?(u(),p("iframe",{key:0,frameborder:"0",scrolling:"no",class:"w-100 d-block",onLoad:t[0]||(t[0]=(...r)=>e.contentFinishedLoading&&e.contentFinishedLoading(...r)),ref:"renderWindow",id:"renderWindow",srcdoc:e.srcdoc,sandbox:"allow-popups allow-popups-to-escape-sandbox allow-same-origin",csp:"script-src 'none'"},null,40,lt)):(u(),p("div",{key:1,innerHTML:e.file.text.replaceAll(`
1
+ import{h as te,G as _e,H as Se,I as q,J as W,K as Te,L as $e,M as Pe,N as x,k as _,O as N,P as Be,R as Ce,S as qe,T as He,U as Ee,V as Me,W as Ae,X as z,Y as D,Z as U,$ as V,a0 as Fe,a1 as j,a2 as R,a3 as Oe,l as M,a4 as Ie,n as Le,a5 as Qe,m as ae,a6 as We,_ as xe,c as Ne,a7 as G,a8 as J,a9 as ze,aa as w,u as De,ab as Ue,o as u,ac as p,f as s,w as o,F as K,ad as Ve,x as $,E as P,z as b,ae as X,e as H,B as Y,y as d,A as v,t as Z,af as ee,ag as je,ah as Re}from"./index.69bcbd86.js";var E=te({name:"QTooltip",inheritAttrs:!1,props:{..._e,...Se,...q,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null},transitionShow:{...q.transitionShow,default:"jump-down"},transitionHide:{...q.transitionHide,default:"jump-up"},anchor:{type:String,default:"bottom middle",validator:W},self:{type:String,default:"top middle",validator:W},offset:{type:Array,default:()=>[14,14],validator:Te},scrollTarget:$e,delay:{type:Number,default:0},hideDelay:{type:Number,default:0},persistent:Boolean},emits:[...Pe],setup(e,{slots:t,emit:m,attrs:l}){let a,n;const r=Le(),{proxy:{$q:c}}=r,g=x(null),S=x(!1),se=_(()=>N(e.anchor,c.lang.rtl)),le=_(()=>N(e.self,c.lang.rtl)),ne=_(()=>e.persistent!==!0),{registerTick:oe,removeTick:ie}=Be(),{registerTimeout:T}=Ce(),{transitionProps:re,transitionStyle:de}=qe(e),{localScrollTarget:A,changeScrollEvent:ce,unconfigureScrollTarget:ue}=He(e,L),{anchorEl:f,canShow:fe,anchorEvents:k}=Ee({showing:S,configureAnchorEl:ye}),{show:me,hide:B}=Me({showing:S,canShow:fe,handleShow:pe,handleHide:ve,hideOnRouteChange:ne,processOnMount:!0});Object.assign(k,{delayShow:ge,delayHide:ke});const{showPortal:F,hidePortal:O,renderPortal:he}=Ae(r,g,be,"tooltip");if(c.platform.is.mobile===!0){const i={anchorEl:f,innerRef:g,onClickOutside(h){return B(h),h.target.classList.contains("q-dialog__backdrop")&&We(h),!0}},C=_(()=>e.modelValue===null&&e.persistent!==!0&&S.value===!0);z(C,h=>{(h===!0?Qe:U)(i)}),D(()=>{U(i)})}function pe(i){F(),oe(()=>{n=new MutationObserver(()=>y()),n.observe(g.value,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),y(),L()}),a===void 0&&(a=z(()=>c.screen.width+"|"+c.screen.height+"|"+e.self+"|"+e.anchor+"|"+c.lang.rtl,y)),T(()=>{F(!0),m("show",i)},e.transitionDuration)}function ve(i){ie(),O(),I(),T(()=>{O(!0),m("hide",i)},e.transitionDuration)}function I(){n!==void 0&&(n.disconnect(),n=void 0),a!==void 0&&(a(),a=void 0),ue(),V(k,"tooltipTemp")}function y(){Fe({targetEl:g.value,offset:e.offset,anchorEl:f.value,anchorOrigin:se.value,selfOrigin:le.value,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function ge(i){if(c.platform.is.mobile===!0){j(),document.body.classList.add("non-selectable");const C=f.value,h=["touchmove","touchcancel","touchend","click"].map(Q=>[C,Q,"delayHide","passiveCapture"]);R(k,"tooltipTemp",h)}T(()=>{me(i)},e.delay)}function ke(i){c.platform.is.mobile===!0&&(V(k,"tooltipTemp"),j(),setTimeout(()=>{document.body.classList.remove("non-selectable")},10)),T(()=>{B(i)},e.hideDelay)}function ye(){if(e.noParentEvent===!0||f.value===null)return;const i=c.platform.is.mobile===!0?[[f.value,"touchstart","delayShow","passive"]]:[[f.value,"mouseenter","delayShow","passive"],[f.value,"mouseleave","delayHide","passive"]];R(k,"anchor",i)}function L(){if(f.value!==null||e.scrollTarget!==void 0){A.value=Oe(f.value,e.scrollTarget);const i=e.noParentEvent===!0?y:B;ce(A.value,i)}}function we(){return S.value===!0?M("div",{...l,ref:g,class:["q-tooltip q-tooltip--style q-position-engine no-pointer-events",l.class],style:[l.style,de.value],role:"tooltip"},ae(t.default)):null}function be(){return M(Ie,re.value,we)}return D(I),Object.assign(r.proxy,{updatePosition:y}),he}}),Ge=te({name:"QBtnGroup",props:{unelevated:Boolean,outline:Boolean,flat:Boolean,rounded:Boolean,square:Boolean,push:Boolean,stretch:Boolean,glossy:Boolean,spread:Boolean},setup(e,{slots:t}){const m=_(()=>{const l=["unelevated","outline","flat","rounded","square","push","stretch","glossy"].filter(a=>e[a]===!0).map(a=>`q-btn-group--${a}`).join(" ");return`q-btn-group row no-wrap${l.length!==0?" "+l:""}`+(e.spread===!0?" q-btn-group--spread":" inline")});return()=>M("div",{class:m.value},ae(t.default))}});const Je=Ne({name:"EmailFolderPage",data:()=>({srcdoc:null,file:null,fileHead:null,timeInterval:null,attachments:[]}),computed:{selectedBucket:function(){return this.$route.params.bucket},selectedFolder:function(){return this.$route.params.folder},selectedFile:function(){return this.$route.params.file},filePath:function(){const e=G(this.selectedFile);return`.r2-explorer/emails/${this.selectedFolder}/${e}`}},watch:{selectedBucket(e){this.$router.push({name:"email-folder",params:{bucket:e,folder:J(this.selectedFolder)}})}},methods:{timeSince:ze,contentFinishedLoading(){clearInterval(this.timeInterval),this.timeInterval=null,this.resizeIframe()},resizeIframe(){this.$refs.renderWindow&&(this.$refs.renderWindow.style.height=`${this.$refs.renderWindow.contentWindow.document.documentElement.scrollHeight}px`)},fetchEmail:async function(){const e=G(this.selectedFile),t=await w.downloadFile(this.selectedBucket,this.filePath,{}),m=e.split(".json")[0];this.file=t.data;let l=t.data.html;if(l){l=l.replaceAll(/<a(.*?)>(.*?)<\/a>/gi,'<a$1 target="_blank">$2</a>');for(const a of t.data.attachments){a.display=!0,a.downloadUrl=`${this.mainStore.serverUrl}/api/buckets/${this.selectedBucket}/${J(`.r2-explorer/emails/${this.selectedFolder}/${m}/${a.filename}`)}`;let n=a.contentId;if(n){n.startsWith("<")&&n.endsWith(">")&&(n=n.substring(1,n.length-1));const r=`cid:${n}`;l.includes(r)&&(l=l.replaceAll(`cid:${n}`,a.downloadUrl),a.display=!1)}}this.srcdoc=l}this.attachments=t.data.attachments.filter(a=>a.display),w.headFile(this.selectedBucket,this.filePath).then(async a=>{a.customMetadata.read==="false"?this.fileHead=await w.updateMetadata(this.selectedBucket,this.filePath,{...a.customMetadata,read:!0}):this.fileHead=a}),setTimeout(()=>{this.contentFinishedLoading()},1e4),this.timeInterval=setInterval(()=>{this.resizeIframe()},400)},markAsUnread:async function(){this.fileHead=await w.updateMetadata(this.selectedBucket,this.filePath,{...this.fileHead.customMetadata,read:!1}),this.q.notify({group:!1,icon:"done",spinner:!1,message:"Email marked as unread!",timeout:2500})},markAsRead:async function(){this.fileHead=await w.updateMetadata(this.selectedBucket,this.filePath,{...this.fileHead.customMetadata,read:!0}),this.q.notify({group:!1,icon:"done",spinner:!1,message:"Email marked as read!",timeout:2500})},downloadAtt:e=>{console.log(e);const t=document.createElement("a");t.download=e.filename,t.href=e.downloadUrl,document.body.appendChild(t),t.click(),document.body.removeChild(t)}},created(){this.fetchEmail()},setup(){return{mainStore:De(),q:Ue()}}}),Ke={key:0},Xe={class:"font-18 q-my-none"},Ye={class:"d-flex row"},Ze={class:"d-flex column"},et={class:"text-muted"},tt={class:"q-ml-auto"},at={class:""},st={class:"overflow-auto d-block email-wrapper"},lt=["srcdoc"],nt=["innerHTML"],ot={class:"row attachments"},it={key:1,class:"text-center q-my-lg"};function rt(e,t,m,l,a,n){return this.file?(u(),p("div",Ke,[s(K,null,{default:o(()=>[s($,{class:"bg-grey-2 text-black",vertical:""},{default:o(()=>[s(Ge,{unelevated:""},{default:o(()=>[s(P,{push:"",icon:"arrow_back",to:{name:"email-folder",params:{bucket:e.$route.params.bucket,folder:e.$route.params.folder}}},{default:o(()=>[s(E,null,{default:o(()=>t[1]||(t[1]=[b("Back")])),_:1})]),_:1},8,["to"]),e.fileHead?(u(),p(X,{key:0},[e.fileHead.customMetadata.read==="true"?(u(),H(P,{key:0,push:"",icon:"mark_email_unread",onClick:e.markAsUnread},{default:o(()=>[s(E,null,{default:o(()=>t[2]||(t[2]=[b("Mark email as unread")])),_:1})]),_:1},8,["onClick"])):(u(),H(P,{key:1,push:"",icon:"mark_email_read",onClick:e.markAsRead},{default:o(()=>[s(E,null,{default:o(()=>t[3]||(t[3]=[b("Mark email as read")])),_:1})]),_:1},8,["onClick"]))],64)):Y("",!0)]),_:1})]),_:1}),s($,{vertical:""},{default:o(()=>[d("h5",Xe,v(e.file.subject),1)]),_:1}),s($,{horizontal:"",class:"q-px-sm"},{default:o(()=>[d("div",Ye,[s(Z,{name:"account_circle",size:"xl",class:"q-mr-sm"}),d("div",Ze,[d("span",null,[b(v(e.file.from.name)+" ",1),d("small",et,"<"+v(e.file.from.address)+">",1)]),d("span",null,"to "+v(e.file.to[0].address),1)])]),d("div",tt,[d("small",at,v(e.file.date)+" ("+v(e.timeSince(new Date(e.file.date)))+")",1)])]),_:1}),s(ee,{vertical:""},{default:o(()=>[d("div",st,[e.srcdoc?(u(),p("iframe",{key:0,frameborder:"0",scrolling:"no",class:"w-100 d-block",onLoad:t[0]||(t[0]=(...r)=>e.contentFinishedLoading&&e.contentFinishedLoading(...r)),ref:"renderWindow",id:"renderWindow",srcdoc:e.srcdoc,sandbox:"allow-popups allow-popups-to-escape-sandbox allow-same-origin",csp:"script-src 'none'"},null,40,lt)):(u(),p("div",{key:1,innerHTML:e.file.text.replaceAll(`
2
2
  `,"<br>")},null,8,nt))])]),_:1}),e.attachments.length>0?(u(),H(ee,{key:0,vertical:""},{default:o(()=>[s(je),t[4]||(t[4]=d("h6",{class:"q-my-md"},"Attachments",-1)),d("div",ot,[(u(!0),p(X,null,Re(e.file.attachments,r=>(u(),p("div",{class:"col-md-4 col-sm-12",key:r.filename},[s(K,null,{default:o(()=>[s($,{class:"q-pa-sm flex",style:{"align-items":"center"}},{default:o(()=>[s(Z,{name:"description",size:"md",color:"blue",class:"q-mr-sm"}),b(" "+v(r.filename)+" ",1),s(P,{color:"white","text-color":"black",icon:"download",class:"q-mr-0 q-ml-auto",onClick:c=>e.downloadAtt(r)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]))),128))])]),_:1})):Y("",!0)]),_:1})])):(u(),p("div",it,[s(Ve,{color:"primary",size:"3em"})]))}var ct=xe(Je,[["render",rt],["__scopeId","data-v-59368c26"]]);export{ct as default};
@@ -1 +1 @@
1
- import{_ as o,c as s,o as r,ac as n,y as t,f as a,E as l}from"./index.ddf53a58.js";const c=s({name:"ErrorNotFound"}),d={class:"fullscreen bg-blue text-white text-center q-pa-md flex flex-center"};function i(p,e,f,u,x,m){return r(),n("div",d,[t("div",null,[e[0]||(e[0]=t("div",{style:{"font-size":"30vh"}}," 404 ",-1)),e[1]||(e[1]=t("div",{class:"text-h2",style:{opacity:".4"}}," Oops. Nothing here... ",-1)),a(l,{class:"q-mt-xl",color:"white","text-color":"blue",unelevated:"",to:"/",label:"Go Home","no-caps":""})])])}var _=o(c,[["render",i]]);export{_ as default};
1
+ import{_ as o,c as s,o as r,ac as n,y as t,f as a,E as l}from"./index.69bcbd86.js";const c=s({name:"ErrorNotFound"}),d={class:"fullscreen bg-blue text-white text-center q-pa-md flex flex-center"};function i(p,e,f,u,x,m){return r(),n("div",d,[t("div",null,[e[0]||(e[0]=t("div",{style:{"font-size":"30vh"}}," 404 ",-1)),e[1]||(e[1]=t("div",{class:"text-h2",style:{opacity:".4"}}," Oops. Nothing here... ",-1)),a(l,{class:"q-mt-xl",color:"white","text-color":"blue",unelevated:"",to:"/",label:"Go Home","no-caps":""})])])}var _=o(c,[["render",i]]);export{_ as default};
@@ -1 +1 @@
1
- import{h,i as w,j as y,k as u,l as r,m,n as k,p as q,q as C,s as S,t as V,_ as x,c as Q,o as p,e as v,w as t,v as B,f as o,x as f,y as g,z as E,A as I,B as _,C as $,D as b,E as A,F as D}from"./index.ddf53a58.js";import{u as P}from"./auth-store.1a4593f8.js";var N=h({name:"QBanner",props:{...w,inlineActions:Boolean,dense:Boolean,rounded:Boolean},setup(e,{slots:a}){const{proxy:{$q:s}}=k(),d=y(e,s),l=u(()=>"q-banner row items-center"+(e.dense===!0?" q-banner--dense":"")+(d.value===!0?" q-banner--dark q-dark":"")+(e.rounded===!0?" rounded-borders":"")),i=u(()=>`q-banner__actions row items-center justify-end col-${e.inlineActions===!0?"auto":"all"}`);return()=>{const n=[r("div",{class:"q-banner__avatar col-auto row items-center self-start"},m(a.avatar)),r("div",{class:"q-banner__content col text-body2"},m(a.default))],c=m(a.action);return c!==void 0&&n.push(r("div",{class:i.value},c)),r("div",{class:l.value+(e.inlineActions===!1&&c!==void 0?" q-banner--top-padding":""),role:"alert"},n)}}}),U=h({name:"QToggle",props:{...q,icon:String,iconColor:String},emits:C,setup(e){function a(s,d){const l=u(()=>(s.value===!0?e.checkedIcon:d.value===!0?e.indeterminateIcon:e.uncheckedIcon)||e.icon),i=u(()=>s.value===!0?e.iconColor:null);return()=>[r("div",{class:"q-toggle__track"}),r("div",{class:"q-toggle__thumb absolute flex flex-center no-wrap"},l.value!==void 0?[r(V,{name:l.value,color:i.value})]:void 0)]}return S("toggle",a)}});const z=P(),j=Q({name:"login-page",components:{},data(){return{loading:!1,showError:"",form:{username:"",password:"",remind:!0}}},methods:{async onSubmit(){this.loading=!0;try{await z.LogIn(this.$router,this.form),this.showError=""}catch(e){throw this.showError=e.message,e}finally{this.loading=!1}}}});function F(e,a,s,d,l,i){return p(),v(B,{class:"flex flex-center"},{default:t(()=>[o(D,{class:"q-pa-md shadow-2",bordered:""},{default:t(()=>[o(f,{class:"text-center"},{default:t(()=>a[3]||(a[3]=[g("div",{class:"text-grey-9 text-h5 text-weight-bold"},"Sign in",-1),g("div",{class:"text-grey-8"},"Enter your email address and password to access admin panel.",-1)])),_:1}),e.showError?(p(),v(f,{key:0},{default:t(()=>[o(N,{"inline-actions":"",class:"text-white bg-red"},{default:t(()=>[E(I(e.showError),1)]),_:1})]),_:1})):_("",!0),o(f,null,{default:t(()=>[o($,{onSubmit:e.onSubmit,class:"q-gutter-sm"},{default:t(()=>[o(b,{filled:"",modelValue:e.form.username,"onUpdate:modelValue":a[0]||(a[0]=n=>e.form.username=n),label:"Username","lazy-rules":"",type:"text"},null,8,["modelValue"]),o(b,{filled:"",modelValue:e.form.password,"onUpdate:modelValue":a[1]||(a[1]=n=>e.form.password=n),label:"Password","lazy-rules":"",type:"password"},null,8,["modelValue"]),o(U,{modelValue:e.form.remind,"onUpdate:modelValue":a[2]||(a[2]=n=>e.form.remind=n),label:"Remember me"},null,8,["modelValue"]),g("div",null,[o(A,{loading:e.loading,label:"Sign in",type:"submit",color:"primary"},null,8,["loading"])])]),_:1},8,["onSubmit"])]),_:1})]),_:1})]),_:1})}var R=x(j,[["render",F]]);export{R as default};
1
+ import{h,i as w,j as y,k as u,l as r,m,n as k,p as q,q as C,s as S,t as V,_ as x,c as Q,o as p,e as v,w as t,v as B,f as o,x as f,y as g,z as E,A as I,B as _,C as $,D as b,E as A,F as D}from"./index.69bcbd86.js";import{u as P}from"./auth-store.f621e290.js";var N=h({name:"QBanner",props:{...w,inlineActions:Boolean,dense:Boolean,rounded:Boolean},setup(e,{slots:a}){const{proxy:{$q:s}}=k(),d=y(e,s),l=u(()=>"q-banner row items-center"+(e.dense===!0?" q-banner--dense":"")+(d.value===!0?" q-banner--dark q-dark":"")+(e.rounded===!0?" rounded-borders":"")),i=u(()=>`q-banner__actions row items-center justify-end col-${e.inlineActions===!0?"auto":"all"}`);return()=>{const n=[r("div",{class:"q-banner__avatar col-auto row items-center self-start"},m(a.avatar)),r("div",{class:"q-banner__content col text-body2"},m(a.default))],c=m(a.action);return c!==void 0&&n.push(r("div",{class:i.value},c)),r("div",{class:l.value+(e.inlineActions===!1&&c!==void 0?" q-banner--top-padding":""),role:"alert"},n)}}}),U=h({name:"QToggle",props:{...q,icon:String,iconColor:String},emits:C,setup(e){function a(s,d){const l=u(()=>(s.value===!0?e.checkedIcon:d.value===!0?e.indeterminateIcon:e.uncheckedIcon)||e.icon),i=u(()=>s.value===!0?e.iconColor:null);return()=>[r("div",{class:"q-toggle__track"}),r("div",{class:"q-toggle__thumb absolute flex flex-center no-wrap"},l.value!==void 0?[r(V,{name:l.value,color:i.value})]:void 0)]}return S("toggle",a)}});const z=P(),j=Q({name:"login-page",components:{},data(){return{loading:!1,showError:"",form:{username:"",password:"",remind:!0}}},methods:{async onSubmit(){this.loading=!0;try{await z.LogIn(this.$router,this.form),this.showError=""}catch(e){throw this.showError=e.message,e}finally{this.loading=!1}}}});function F(e,a,s,d,l,i){return p(),v(B,{class:"flex flex-center"},{default:t(()=>[o(D,{class:"q-pa-md shadow-2",bordered:""},{default:t(()=>[o(f,{class:"text-center"},{default:t(()=>a[3]||(a[3]=[g("div",{class:"text-grey-9 text-h5 text-weight-bold"},"Sign in",-1),g("div",{class:"text-grey-8"},"Enter your email address and password to access admin panel.",-1)])),_:1}),e.showError?(p(),v(f,{key:0},{default:t(()=>[o(N,{"inline-actions":"",class:"text-white bg-red"},{default:t(()=>[E(I(e.showError),1)]),_:1})]),_:1})):_("",!0),o(f,null,{default:t(()=>[o($,{onSubmit:e.onSubmit,class:"q-gutter-sm"},{default:t(()=>[o(b,{filled:"",modelValue:e.form.username,"onUpdate:modelValue":a[0]||(a[0]=n=>e.form.username=n),label:"Username","lazy-rules":"",type:"text"},null,8,["modelValue"]),o(b,{filled:"",modelValue:e.form.password,"onUpdate:modelValue":a[1]||(a[1]=n=>e.form.password=n),label:"Password","lazy-rules":"",type:"password"},null,8,["modelValue"]),o(U,{modelValue:e.form.remind,"onUpdate:modelValue":a[2]||(a[2]=n=>e.form.remind=n),label:"Remember me"},null,8,["modelValue"]),g("div",null,[o(A,{loading:e.loading,label:"Sign in",type:"submit",color:"primary"},null,8,["loading"])])]),_:1},8,["onSubmit"])]),_:1})]),_:1})]),_:1})}var R=x(j,[["render",F]]);export{R as default};
@@ -1 +1 @@
1
- import{d as l,u as i,a as r}from"./index.ddf53a58.js";const a="r2_explorer_session_token",c=l("auth",{state:()=>({}),getters:{isAuthenticated:e=>!!e.user,StateUser:e=>e.user},actions:{async LogIn(e,s){const o=i(),t=btoa(`${s.username}:${s.password}`);r.defaults.headers.common.Authorization=`Basic ${t}`;try{await o.loadServerConfigs(e,this.q)}catch(n){throw console.log(n),delete r.defaults.headers.common.Authorization,new Error("Invalid username or password")}r.defaults.headers.common.Authorization=`Basic ${t}`,s.remind===!0?localStorage.setItem(a,t):sessionStorage.setItem(a,t)},async CheckLoginInStorage(e,s){let o=sessionStorage.getItem(a),t=!1;if(o||(o=localStorage.getItem(a)),!o)return!1;const n=i();return r.defaults.headers.common.Authorization=`Basic ${o}`,t=await n.loadServerConfigs(e,s,!0),t||delete r.defaults.headers.common.Authorization,!1},async LogOut(e){localStorage.removeItem(a),sessionStorage.removeItem(a),await e.replace({name:"login"})}}});export{c as u};
1
+ import{d as l,u as i,a as r}from"./index.69bcbd86.js";const a="r2_explorer_session_token",c=l("auth",{state:()=>({}),getters:{isAuthenticated:e=>!!e.user,StateUser:e=>e.user},actions:{async LogIn(e,s){const o=i(),t=btoa(`${s.username}:${s.password}`);r.defaults.headers.common.Authorization=`Basic ${t}`;try{await o.loadServerConfigs(e,this.q)}catch(n){throw console.log(n),delete r.defaults.headers.common.Authorization,new Error("Invalid username or password")}r.defaults.headers.common.Authorization=`Basic ${t}`,s.remind===!0?localStorage.setItem(a,t):sessionStorage.setItem(a,t)},async CheckLoginInStorage(e,s){let o=sessionStorage.getItem(a),t=!1;if(o||(o=localStorage.getItem(a)),!o)return!1;const n=i();return r.defaults.headers.common.Authorization=`Basic ${o}`,t=await n.loadServerConfigs(e,s,!0),t||delete r.defaults.headers.common.Authorization,!1},async LogOut(e){localStorage.removeItem(a),sessionStorage.removeItem(a),await e.replace({name:"login"})}}});export{c as u};
@@ -1 +1 @@
1
- import{b as e,u as r}from"./index.ddf53a58.js";import{u as s}from"./auth-store.1a4593f8.js";var c=e(async({app:o,router:t,store:a})=>{await s(a).CheckLoginInStorage(t,o.config.globalProperties.$q)===!1&&await r(a).loadServerConfigs(t,o.config.globalProperties.$q,!0)});export{c as default};
1
+ import{b as e,u as r}from"./index.69bcbd86.js";import{u as s}from"./auth-store.f621e290.js";var c=e(async({app:o,router:t,store:a})=>{await s(a).CheckLoginInStorage(t,o.config.globalProperties.$q)===!1&&await r(a).loadServerConfigs(t,o.config.globalProperties.$q,!0)});export{c as default};
@@ -1 +1 @@
1
- import{b as c}from"./index.ddf53a58.js";class n{constructor(){this.__stack={}}on(t,s,i){return(this.__stack[t]||(this.__stack[t]=[])).push({fn:s,ctx:i}),this}once(t,s,i){const o=(...e)=>{this.off(t,o),s.apply(i,e)};return o.__callback=s,this.on(t,o,i)}emit(t){const s=this.__stack[t];if(s!==void 0){const i=[].slice.call(arguments,1);s.forEach(o=>{o.fn.apply(o.ctx,i)})}return this}off(t,s){const i=this.__stack[t];if(i===void 0)return this;if(s===void 0)return delete this.__stack[t],this;const o=i.filter(e=>e.fn!==s&&e.fn.__callback!==s);return o.length!==0?this.__stack[t]=o:delete this.__stack[t],this}}var h=c(({app:r})=>{const t=new n;r.config.globalProperties.$bus=t,r.provide("bus",t)});export{h as default};
1
+ import{b as c}from"./index.69bcbd86.js";class n{constructor(){this.__stack={}}on(t,s,i){return(this.__stack[t]||(this.__stack[t]=[])).push({fn:s,ctx:i}),this}once(t,s,i){const o=(...e)=>{this.off(t,o),s.apply(i,e)};return o.__callback=s,this.on(t,o,i)}emit(t){const s=this.__stack[t];if(s!==void 0){const i=[].slice.call(arguments,1);s.forEach(o=>{o.fn.apply(o.ctx,i)})}return this}off(t,s){const i=this.__stack[t];if(i===void 0)return this;if(s===void 0)return delete this.__stack[t],this;const o=i.filter(e=>e.fn!==s&&e.fn.__callback!==s);return o.length!==0?this.__stack[t]=o:delete this.__stack[t],this}}var h=c(({app:r})=>{const t=new n;r.config.globalProperties.$bus=t,r.provide("bus",t)});export{h as default};