/*! For license information please see 5709-5709.js.LICENSE.txt */ (self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[5709],{83604:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(87537),a=i.n(s),n=i(23645),r=i.n(n)()(a());r.push([t.id,".fade-enter-active[data-v-8e58e0a5],\n.fade-leave-active[data-v-8e58e0a5] {\n transition: opacity .3s ease;\n}\n.fade-enter[data-v-8e58e0a5],\n.fade-leave-to[data-v-8e58e0a5] {\n opacity: 0;\n}\n.linked-icons[data-v-8e58e0a5] {\n display: flex;\n}\n.linked-icons img[data-v-8e58e0a5] {\n padding: 12px;\n height: 44px;\n display: block;\n background-repeat: no-repeat;\n background-position: center;\n opacity: .7;\n}\n.linked-icons img[data-v-8e58e0a5]:hover {\n opacity: 1;\n}\n.popovermenu[data-v-8e58e0a5] {\n display: none;\n}\n.popovermenu.open[data-v-8e58e0a5] {\n display: block;\n}\nli.collection-list-item[data-v-8e58e0a5] {\n flex-wrap: wrap;\n height: auto;\n cursor: pointer;\n margin-bottom: 0 !important;\n}\nli.collection-list-item .collection-avatar[data-v-8e58e0a5] {\n margin-top: 6px;\n}\nli.collection-list-item form[data-v-8e58e0a5],\nli.collection-list-item .collection-item-name[data-v-8e58e0a5] {\n flex-basis: 10%;\n flex-grow: 1;\n display: flex;\n}\nli.collection-list-item .collection-item-name[data-v-8e58e0a5] {\n padding: 12px 9px;\n}\nli.collection-list-item input[data-v-8e58e0a5] {\n margin-top: 4px;\n border-color: var(--color-border-maxcontrast);\n}\nli.collection-list-item input[type=text][data-v-8e58e0a5] {\n flex-grow: 1;\n}\nli.collection-list-item .error[data-v-8e58e0a5],\nli.collection-list-item .resource-list-details[data-v-8e58e0a5] {\n flex-basis: 100%;\n width: 100%;\n}\nli.collection-list-item .resource-list-details li[data-v-8e58e0a5] {\n display: flex;\n margin-left: 44px;\n border-radius: 3px;\n cursor: pointer;\n}\nli.collection-list-item .resource-list-details li[data-v-8e58e0a5]:hover {\n background-color: var(--color-background-dark);\n}\nli.collection-list-item .resource-list-details li a[data-v-8e58e0a5] {\n flex-grow: 1;\n padding: 3px;\n max-width: calc(100% - 30px);\n display: flex;\n}\nli.collection-list-item .resource-list-details span[data-v-8e58e0a5] {\n display: inline-block;\n vertical-align: top;\n margin-right: 10px;\n}\nli.collection-list-item .resource-list-details span.resource-name[data-v-8e58e0a5] {\n text-overflow: ellipsis;\n overflow: hidden;\n position: relative;\n vertical-align: top;\n white-space: nowrap;\n flex-grow: 1;\n padding: 4px;\n}\nli.collection-list-item .resource-list-details img[data-v-8e58e0a5] {\n width: 24px;\n height: 24px;\n}\nli.collection-list-item .resource-list-details .icon-close[data-v-8e58e0a5] {\n opacity: .7;\n}\nli.collection-list-item .resource-list-details .icon-close[data-v-8e58e0a5]:hover,\nli.collection-list-item .resource-list-details .icon-close[data-v-8e58e0a5]:focus {\n opacity: 1;\n}\n.shouldshake[data-v-8e58e0a5] {\n animation: shake-8e58e0a5 .6s 1 linear;\n}\n@keyframes shake-8e58e0a5 {\n 0% {\n transform: translate(15px);\n }\n 20% {\n transform: translate(-15px);\n }\n 40% {\n transform: translate(7px);\n }\n 60% {\n transform: translate(-7px);\n }\n 80% {\n transform: translate(3px);\n }\n to {\n transform: translate(0);\n }\n}\n.collection-list *[data-v-75a4370b] {\n box-sizing: border-box;\n}\n.collection-list > li[data-v-75a4370b] {\n display: flex;\n align-items: start;\n gap: 12px;\n}\n.collection-list > li > .avatar[data-v-75a4370b] {\n margin-top: auto;\n}\n#collection-select-container[data-v-75a4370b] {\n display: flex;\n flex-direction: column;\n}\n.v-select span.avatar[data-v-75a4370b] {\n display: block;\n padding: 16px;\n opacity: .7;\n background-repeat: no-repeat;\n background-position: center;\n}\n.v-select span.avatar[data-v-75a4370b]:hover {\n opacity: 1;\n}\np.hint[data-v-75a4370b] {\n z-index: 1;\n margin-top: -16px;\n padding: 8px;\n color: var(--color-text-maxcontrast);\n line-height: normal;\n}\ndiv.avatar[data-v-75a4370b] {\n width: 32px;\n height: 32px;\n margin: 30px 0 0;\n padding: 8px;\n background-color: var(--color-background-dark);\n}\n.icon-projects[data-v-75a4370b] {\n display: block;\n padding: 8px;\n background-repeat: no-repeat;\n background-position: center;\n}\n.option__wrapper[data-v-75a4370b] {\n display: flex;\n}\n.option__wrapper .avatar[data-v-75a4370b] {\n display: block;\n background-color: var(--color-background-darker) !important;\n}\n.option__wrapper .option__title[data-v-75a4370b] {\n padding: 4px;\n}\n.fade-enter-active[data-v-75a4370b],\n.fade-leave-active[data-v-75a4370b] {\n transition: opacity .5s;\n}\n.fade-enter[data-v-75a4370b],\n.fade-leave-to[data-v-75a4370b] {\n opacity: 0;\n}\n","",{version:3,sources:["webpack://./node_modules/nextcloud-vue-collections/dist/assets/index-Au1Gr_G6.css"],names:[],mappings:"AAAA;;EAEE,4BAA4B;AAC9B;AACA;;EAEE,UAAU;AACZ;AACA;EACE,aAAa;AACf;AACA;EACE,aAAa;EACb,YAAY;EACZ,cAAc;EACd,4BAA4B;EAC5B,2BAA2B;EAC3B,WAAW;AACb;AACA;EACE,UAAU;AACZ;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,eAAe;EACf,YAAY;EACZ,eAAe;EACf,2BAA2B;AAC7B;AACA;EACE,eAAe;AACjB;AACA;;EAEE,eAAe;EACf,YAAY;EACZ,aAAa;AACf;AACA;EACE,iBAAiB;AACnB;AACA;EACE,eAAe;EACf,6CAA6C;AAC/C;AACA;EACE,YAAY;AACd;AACA;;EAEE,gBAAgB;EAChB,WAAW;AACb;AACA;EACE,aAAa;EACb,iBAAiB;EACjB,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,8CAA8C;AAChD;AACA;EACE,YAAY;EACZ,YAAY;EACZ,4BAA4B;EAC5B,aAAa;AACf;AACA;EACE,qBAAqB;EACrB,mBAAmB;EACnB,kBAAkB;AACpB;AACA;EACE,uBAAuB;EACvB,gBAAgB;EAChB,kBAAkB;EAClB,mBAAmB;EACnB,mBAAmB;EACnB,YAAY;EACZ,YAAY;AACd;AACA;EACE,WAAW;EACX,YAAY;AACd;AACA;EACE,WAAW;AACb;AACA;;EAEE,UAAU;AACZ;AACA;EACE,sCAAsC;AACxC;AACA;EACE;IACE,0BAA0B;EAC5B;EACA;IACE,2BAA2B;EAC7B;EACA;IACE,yBAAyB;EAC3B;EACA;IACE,0BAA0B;EAC5B;EACA;IACE,yBAAyB;EAC3B;EACA;IACE,uBAAuB;EACzB;AACF;AACA;EACE,sBAAsB;AACxB;AACA;EACE,aAAa;EACb,kBAAkB;EAClB,SAAS;AACX;AACA;EACE,gBAAgB;AAClB;AACA;EACE,aAAa;EACb,sBAAsB;AACxB;AACA;EACE,cAAc;EACd,aAAa;EACb,WAAW;EACX,4BAA4B;EAC5B,2BAA2B;AAC7B;AACA;EACE,UAAU;AACZ;AACA;EACE,UAAU;EACV,iBAAiB;EACjB,YAAY;EACZ,oCAAoC;EACpC,mBAAmB;AACrB;AACA;EACE,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,YAAY;EACZ,8CAA8C;AAChD;AACA;EACE,cAAc;EACd,YAAY;EACZ,4BAA4B;EAC5B,2BAA2B;AAC7B;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;EACd,2DAA2D;AAC7D;AACA;EACE,YAAY;AACd;AACA;;EAEE,uBAAuB;AACzB;AACA;;EAEE,UAAU;AACZ",sourcesContent:[".fade-enter-active[data-v-8e58e0a5],\n.fade-leave-active[data-v-8e58e0a5] {\n transition: opacity .3s ease;\n}\n.fade-enter[data-v-8e58e0a5],\n.fade-leave-to[data-v-8e58e0a5] {\n opacity: 0;\n}\n.linked-icons[data-v-8e58e0a5] {\n display: flex;\n}\n.linked-icons img[data-v-8e58e0a5] {\n padding: 12px;\n height: 44px;\n display: block;\n background-repeat: no-repeat;\n background-position: center;\n opacity: .7;\n}\n.linked-icons img[data-v-8e58e0a5]:hover {\n opacity: 1;\n}\n.popovermenu[data-v-8e58e0a5] {\n display: none;\n}\n.popovermenu.open[data-v-8e58e0a5] {\n display: block;\n}\nli.collection-list-item[data-v-8e58e0a5] {\n flex-wrap: wrap;\n height: auto;\n cursor: pointer;\n margin-bottom: 0 !important;\n}\nli.collection-list-item .collection-avatar[data-v-8e58e0a5] {\n margin-top: 6px;\n}\nli.collection-list-item form[data-v-8e58e0a5],\nli.collection-list-item .collection-item-name[data-v-8e58e0a5] {\n flex-basis: 10%;\n flex-grow: 1;\n display: flex;\n}\nli.collection-list-item .collection-item-name[data-v-8e58e0a5] {\n padding: 12px 9px;\n}\nli.collection-list-item input[data-v-8e58e0a5] {\n margin-top: 4px;\n border-color: var(--color-border-maxcontrast);\n}\nli.collection-list-item input[type=text][data-v-8e58e0a5] {\n flex-grow: 1;\n}\nli.collection-list-item .error[data-v-8e58e0a5],\nli.collection-list-item .resource-list-details[data-v-8e58e0a5] {\n flex-basis: 100%;\n width: 100%;\n}\nli.collection-list-item .resource-list-details li[data-v-8e58e0a5] {\n display: flex;\n margin-left: 44px;\n border-radius: 3px;\n cursor: pointer;\n}\nli.collection-list-item .resource-list-details li[data-v-8e58e0a5]:hover {\n background-color: var(--color-background-dark);\n}\nli.collection-list-item .resource-list-details li a[data-v-8e58e0a5] {\n flex-grow: 1;\n padding: 3px;\n max-width: calc(100% - 30px);\n display: flex;\n}\nli.collection-list-item .resource-list-details span[data-v-8e58e0a5] {\n display: inline-block;\n vertical-align: top;\n margin-right: 10px;\n}\nli.collection-list-item .resource-list-details span.resource-name[data-v-8e58e0a5] {\n text-overflow: ellipsis;\n overflow: hidden;\n position: relative;\n vertical-align: top;\n white-space: nowrap;\n flex-grow: 1;\n padding: 4px;\n}\nli.collection-list-item .resource-list-details img[data-v-8e58e0a5] {\n width: 24px;\n height: 24px;\n}\nli.collection-list-item .resource-list-details .icon-close[data-v-8e58e0a5] {\n opacity: .7;\n}\nli.collection-list-item .resource-list-details .icon-close[data-v-8e58e0a5]:hover,\nli.collection-list-item .resource-list-details .icon-close[data-v-8e58e0a5]:focus {\n opacity: 1;\n}\n.shouldshake[data-v-8e58e0a5] {\n animation: shake-8e58e0a5 .6s 1 linear;\n}\n@keyframes shake-8e58e0a5 {\n 0% {\n transform: translate(15px);\n }\n 20% {\n transform: translate(-15px);\n }\n 40% {\n transform: translate(7px);\n }\n 60% {\n transform: translate(-7px);\n }\n 80% {\n transform: translate(3px);\n }\n to {\n transform: translate(0);\n }\n}\n.collection-list *[data-v-75a4370b] {\n box-sizing: border-box;\n}\n.collection-list > li[data-v-75a4370b] {\n display: flex;\n align-items: start;\n gap: 12px;\n}\n.collection-list > li > .avatar[data-v-75a4370b] {\n margin-top: auto;\n}\n#collection-select-container[data-v-75a4370b] {\n display: flex;\n flex-direction: column;\n}\n.v-select span.avatar[data-v-75a4370b] {\n display: block;\n padding: 16px;\n opacity: .7;\n background-repeat: no-repeat;\n background-position: center;\n}\n.v-select span.avatar[data-v-75a4370b]:hover {\n opacity: 1;\n}\np.hint[data-v-75a4370b] {\n z-index: 1;\n margin-top: -16px;\n padding: 8px;\n color: var(--color-text-maxcontrast);\n line-height: normal;\n}\ndiv.avatar[data-v-75a4370b] {\n width: 32px;\n height: 32px;\n margin: 30px 0 0;\n padding: 8px;\n background-color: var(--color-background-dark);\n}\n.icon-projects[data-v-75a4370b] {\n display: block;\n padding: 8px;\n background-repeat: no-repeat;\n background-position: center;\n}\n.option__wrapper[data-v-75a4370b] {\n display: flex;\n}\n.option__wrapper .avatar[data-v-75a4370b] {\n display: block;\n background-color: var(--color-background-darker) !important;\n}\n.option__wrapper .option__title[data-v-75a4370b] {\n padding: 4px;\n}\n.fade-enter-active[data-v-75a4370b],\n.fade-leave-active[data-v-75a4370b] {\n transition: opacity .5s;\n}\n.fade-enter[data-v-75a4370b],\n.fade-leave-to[data-v-75a4370b] {\n opacity: 0;\n}\n"],sourceRoot:""}]);const o=r},39432:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(87537),a=i.n(s),n=i(23645),r=i.n(n)()(a());r.push([t.id,".sharing-entry[data-v-25ab69f2]{display:flex;align-items:center;height:44px}.sharing-entry__summary[data-v-25ab69f2]{padding:8px;padding-left:10px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;flex:1 0;min-width:0}.sharing-entry__summary__desc[data-v-25ab69f2]{display:inline-block;padding-bottom:0;line-height:1.2em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sharing-entry__summary__desc p[data-v-25ab69f2],.sharing-entry__summary__desc small[data-v-25ab69f2]{color:var(--color-text-maxcontrast)}.sharing-entry__summary__desc-unique[data-v-25ab69f2]{color:var(--color-text-maxcontrast)}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntry.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,WAAA,CACA,yCACC,WAAA,CACA,iBAAA,CACA,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,sBAAA,CACA,QAAA,CACA,WAAA,CAEA,+CACC,oBAAA,CACA,gBAAA,CACA,iBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CAEA,sGAEC,mCAAA,CAGD,sDACC,mCAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 44px;\n\t&__summary {\n\t\tpadding: 8px;\n\t\tpadding-left: 10px;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\talign-items: flex-start;\n\t\tflex: 1 0;\n\t\tmin-width: 0;\n\n\t\t&__desc {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding-bottom: 0;\n\t\t\tline-height: 1.2em;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\n\t\t\tp,\n\t\t\tsmall {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\n\t\t\t&-unique {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\t\t}\n\t}\n\n}\n"],sourceRoot:""}]);const o=r},35979:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(87537),a=i.n(s),n=i(23645),r=i.n(n)()(a());r.push([t.id,".sharing-entry[data-v-283ca89e]{display:flex;align-items:center;height:44px}.sharing-entry__desc[data-v-283ca89e]{display:flex;flex-direction:column;justify-content:space-between;padding:8px;padding-left:10px;line-height:1.2em}.sharing-entry__desc p[data-v-283ca89e]{color:var(--color-text-maxcontrast)}.sharing-entry__actions[data-v-283ca89e]{margin-left:auto}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryInherited.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,WAAA,CACA,sCACC,YAAA,CACA,qBAAA,CACA,6BAAA,CACA,WAAA,CACA,iBAAA,CACA,iBAAA,CACA,wCACC,mCAAA,CAGF,yCACC,gBAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 44px;\n\t&__desc {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: space-between;\n\t\tpadding: 8px;\n\t\tpadding-left: 10px;\n\t\tline-height: 1.2em;\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\t&__actions {\n\t\tmargin-left: auto;\n\t}\n}\n"],sourceRoot:""}]);const o=r},18094:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(87537),a=i.n(s),n=i(23645),r=i.n(n)()(a());r.push([t.id,".sharing-entry__internal .avatar-external[data-v-69227eb0]{width:32px;height:32px;line-height:32px;font-size:18px;background-color:var(--color-text-maxcontrast);border-radius:50%;flex-shrink:0}.sharing-entry__internal .icon-checkmark-color[data-v-69227eb0]{opacity:1}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryInternal.vue"],names:[],mappings:"AAEC,2DACC,UAAA,CACA,WAAA,CACA,gBAAA,CACA,cAAA,CACA,8CAAA,CACA,iBAAA,CACA,aAAA,CAED,gEACC,SAAA",sourcesContent:["\n.sharing-entry__internal {\n\t.avatar-external {\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tline-height: 32px;\n\t\tfont-size: 18px;\n\t\tbackground-color: var(--color-text-maxcontrast);\n\t\tborder-radius: 50%;\n\t\tflex-shrink: 0;\n\t}\n\t.icon-checkmark-color {\n\t\topacity: 1;\n\t}\n}\n"],sourceRoot:""}]);const o=r},14909:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(87537),a=i.n(s),n=i(23645),r=i.n(n)()(a());r.push([t.id,".sharing-entry[data-v-00b7425e]{display:flex;align-items:center;min-height:44px}.sharing-entry__summary[data-v-00b7425e]{padding:8px;padding-left:10px;display:flex;justify-content:space-between;flex:1 0;min-width:0}.sharing-entry__desc[data-v-00b7425e]{display:flex;flex-direction:column;line-height:1.2em}.sharing-entry__desc p[data-v-00b7425e]{color:var(--color-text-maxcontrast)}.sharing-entry__desc__title[data-v-00b7425e]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.sharing-entry:not(.sharing-entry--share) .sharing-entry__actions .new-share-link[data-v-00b7425e]{border-top:1px solid var(--color-border)}.sharing-entry[data-v-00b7425e] .avatar-link-share{background-color:var(--color-primary-element)}.sharing-entry .sharing-entry__action--public-upload[data-v-00b7425e]{border-bottom:1px solid var(--color-border)}.sharing-entry__loading[data-v-00b7425e]{width:44px;height:44px;margin:0;padding:14px;margin-left:auto}.sharing-entry .action-item~.action-item[data-v-00b7425e],.sharing-entry .action-item~.sharing-entry__loading[data-v-00b7425e]{margin-left:0}.sharing-entry .icon-checkmark-color[data-v-00b7425e]{opacity:1}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryLink.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAEA,yCACC,WAAA,CACA,iBAAA,CACA,YAAA,CACA,6BAAA,CACA,QAAA,CACA,WAAA,CAGD,sCACC,YAAA,CACA,qBAAA,CACA,iBAAA,CAEA,wCACC,mCAAA,CAGD,6CACC,sBAAA,CACA,eAAA,CACA,kBAAA,CASD,mGACC,wCAAA,CAIF,mDACC,6CAAA,CAGD,sEACC,2CAAA,CAGD,yCACC,UAAA,CACA,WAAA,CACA,QAAA,CACA,YAAA,CACA,gBAAA,CAOA,+HAEC,aAAA,CAIF,sDACC,SAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\tmin-height: 44px;\n\n\t&__summary {\n\t\tpadding: 8px;\n\t\tpadding-left: 10px;\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tflex: 1 0;\n\t\tmin-width: 0;\n\t}\n\n\t&__desc {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tline-height: 1.2em;\n\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t&__title {\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t&__copy {\n\n\t}\n\n\t&:not(.sharing-entry--share) &__actions {\n\t\t.new-share-link {\n\t\t\tborder-top: 1px solid var(--color-border);\n\t\t}\n\t}\n\n\t::v-deep .avatar-link-share {\n\t\tbackground-color: var(--color-primary-element);\n\t}\n\n\t.sharing-entry__action--public-upload {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t}\n\n\t&__loading {\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tmargin: 0;\n\t\tpadding: 14px;\n\t\tmargin-left: auto;\n\t}\n\n\t// put menus to the left\n\t// but only the first one\n\t.action-item {\n\n\t\t~.action-item,\n\t\t~.sharing-entry__loading {\n\t\t\tmargin-left: 0;\n\t\t}\n\t}\n\n\t.icon-checkmark-color {\n\t\topacity: 1;\n\t}\n}\n"],sourceRoot:""}]);const o=r},87192:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(87537),a=i.n(s),n=i(23645),r=i.n(n)()(a());r.push([t.id,".share-select[data-v-6e5dd9f1]{display:block}.share-select[data-v-6e5dd9f1] .action-item__menutoggle{color:var(--color-primary-element) !important;font-size:12.5px !important;height:auto !important;min-height:auto !important}.share-select[data-v-6e5dd9f1] .action-item__menutoggle .button-vue__text{font-weight:normal !important}.share-select[data-v-6e5dd9f1] .action-item__menutoggle .button-vue__icon{height:24px !important;min-height:24px !important;width:24px !important;min-width:24px !important}.share-select[data-v-6e5dd9f1] .action-item__menutoggle .button-vue__wrapper{flex-direction:row-reverse !important}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue"],names:[],mappings:"AACA,+BACC,aAAA,CAIA,wDACC,6CAAA,CACA,2BAAA,CACA,sBAAA,CACA,0BAAA,CAEA,0EACC,6BAAA,CAGD,0EACC,sBAAA,CACA,0BAAA,CACA,qBAAA,CACA,yBAAA,CAGD,6EAEC,qCAAA",sourcesContent:["\n.share-select {\n\tdisplay: block;\n\n\t// TODO: NcActions should have a slot for custom trigger button like NcPopover\n\t// Overrider NcActionms button to make it small\n\t:deep(.action-item__menutoggle) {\n\t\tcolor: var(--color-primary-element) !important;\n\t\tfont-size: 12.5px !important;\n\t\theight: auto !important;\n\t\tmin-height: auto !important;\n\n\t\t.button-vue__text {\n\t\t\tfont-weight: normal !important;\n\t\t}\n\n\t\t.button-vue__icon {\n\t\t\theight: 24px !important;\n\t\t\tmin-height: 24px !important;\n\t\t\twidth: 24px !important;\n\t\t\tmin-width: 24px !important;\n\t\t}\n\n\t\t.button-vue__wrapper {\n\t\t\t// Emulate NcButton's alignment=center-reverse\n\t\t\tflex-direction: row-reverse !important;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=r},31277:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(87537),a=i.n(s),n=i(23645),r=i.n(n)()(a());r.push([t.id,".sharing-entry[data-v-1852ea78]{display:flex;align-items:center;min-height:44px}.sharing-entry__desc[data-v-1852ea78]{padding:8px;padding-left:10px;line-height:1.2em;position:relative;flex:1 1;min-width:0}.sharing-entry__desc p[data-v-1852ea78]{color:var(--color-text-maxcontrast)}.sharing-entry__title[data-v-1852ea78]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:inherit}.sharing-entry__actions[data-v-1852ea78]{margin-left:auto !important}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntrySimple.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,eAAA,CACA,sCACC,WAAA,CACA,iBAAA,CACA,iBAAA,CACA,iBAAA,CACA,QAAA,CACA,WAAA,CACA,wCACC,mCAAA,CAGF,uCACC,kBAAA,CACA,sBAAA,CACA,eAAA,CACA,iBAAA,CAED,yCACC,2BAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\tmin-height: 44px;\n\t&__desc {\n\t\tpadding: 8px;\n\t\tpadding-left: 10px;\n\t\tline-height: 1.2em;\n\t\tposition: relative;\n\t\tflex: 1 1;\n\t\tmin-width: 0;\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\t&__title {\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t\tmax-width: inherit;\n\t}\n\t&__actions {\n\t\tmargin-left: auto !important;\n\t}\n}\n"],sourceRoot:""}]);const o=r},56390:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(87537),a=i.n(s),n=i(23645),r=i.n(n)()(a());r.push([t.id,".sharing-search{display:flex;flex-direction:column;margin-bottom:4px}.sharing-search label[for=sharing-search-input]{margin-bottom:2px}.sharing-search__input{width:100%;margin:10px 0}.vs__dropdown-menu span[lookup] .avatardiv{background-image:var(--icon-search-white);background-repeat:no-repeat;background-position:center;background-color:var(--color-text-maxcontrast) !important}.vs__dropdown-menu span[lookup] .avatardiv .avatardiv__initials-wrapper{display:none}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingInput.vue"],names:[],mappings:"AACA,gBACC,YAAA,CACA,qBAAA,CACA,iBAAA,CAEA,gDACC,iBAAA,CAGD,uBACC,UAAA,CACA,aAAA,CAOA,2CACC,yCAAA,CACA,2BAAA,CACA,0BAAA,CACA,yDAAA,CACA,wEACC,YAAA",sourcesContent:['\n.sharing-search {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin-bottom: 4px;\n\n\tlabel[for="sharing-search-input"] {\n\t\tmargin-bottom: 2px;\n\t}\n\n\t&__input {\n\t\twidth: 100%;\n\t\tmargin: 10px 0;\n\t}\n}\n\n.vs__dropdown-menu {\n\t// properly style the lookup entry\n\tspan[lookup] {\n\t\t.avatardiv {\n\t\t\tbackground-image: var(--icon-search-white);\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-position: center;\n\t\t\tbackground-color: var(--color-text-maxcontrast) !important;\n\t\t\t.avatardiv__initials-wrapper {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const o=r},35995:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(87537),a=i.n(s),n=i(23645),r=i.n(n)()(a());r.push([t.id,".sharingTabDetailsView[data-v-23095618]{display:flex;flex-direction:column;width:100%;margin:0 auto;position:relative;height:100%;overflow:hidden}.sharingTabDetailsView__header[data-v-23095618]{display:flex;align-items:center;box-sizing:border-box;margin:.2em}.sharingTabDetailsView__header span[data-v-23095618]{display:flex;align-items:center}.sharingTabDetailsView__header span h1[data-v-23095618]{font-size:15px;padding-left:.3em}.sharingTabDetailsView__wrapper[data-v-23095618]{position:relative;overflow:scroll;flex-shrink:1;padding:4px;padding-right:12px}.sharingTabDetailsView__quick-permissions[data-v-23095618]{display:flex;justify-content:center;width:100%;margin:0 auto;border-radius:0}.sharingTabDetailsView__quick-permissions div[data-v-23095618]{width:100%}.sharingTabDetailsView__quick-permissions div span[data-v-23095618]{width:100%}.sharingTabDetailsView__quick-permissions div span span[data-v-23095618]:nth-child(1){align-items:center;justify-content:center;padding:.1em}.sharingTabDetailsView__quick-permissions div span[data-v-23095618] label span{display:flex;flex-direction:column}.sharingTabDetailsView__quick-permissions div span[data-v-23095618] span.checkbox-content__text.checkbox-radio-switch__text{flex-wrap:wrap}.sharingTabDetailsView__quick-permissions div span[data-v-23095618] span.checkbox-content__text.checkbox-radio-switch__text .subline{display:block;flex-basis:100%}.sharingTabDetailsView__advanced-control[data-v-23095618]{width:100%}.sharingTabDetailsView__advanced-control button[data-v-23095618]{margin-top:.5em}.sharingTabDetailsView__advanced[data-v-23095618]{width:100%;margin-bottom:.5em;text-align:left;padding-left:0}.sharingTabDetailsView__advanced section textarea[data-v-23095618],.sharingTabDetailsView__advanced section div.mx-datepicker[data-v-23095618]{width:100%}.sharingTabDetailsView__advanced section textarea[data-v-23095618]{height:80px;margin:0}.sharingTabDetailsView__advanced section span[data-v-23095618] label{padding-left:0 !important;background-color:initial !important;border:none !important}.sharingTabDetailsView__advanced section section.custom-permissions-group[data-v-23095618]{padding-left:1.5em}.sharingTabDetailsView__delete>button[data-v-23095618]:first-child{color:#df0707}.sharingTabDetailsView__footer[data-v-23095618]{width:100%;display:flex;position:sticky;bottom:0;flex-direction:column;justify-content:space-between;align-items:flex-start;background:linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background))}.sharingTabDetailsView__footer .button-group[data-v-23095618]{display:flex;justify-content:space-between;width:100%;margin-top:16px}.sharingTabDetailsView__footer .button-group button[data-v-23095618]{margin-left:16px}.sharingTabDetailsView__footer .button-group button[data-v-23095618]:first-child{margin-left:0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingDetailsTab.vue"],names:[],mappings:"AACA,wCACC,YAAA,CACA,qBAAA,CACA,UAAA,CACA,aAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CAEA,gDACC,YAAA,CACA,kBAAA,CACA,qBAAA,CACA,WAAA,CAEA,qDACC,YAAA,CACA,kBAAA,CAEA,wDACC,cAAA,CACA,iBAAA,CAMH,iDACC,iBAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,kBAAA,CAGD,2DACC,YAAA,CACA,sBAAA,CACA,UAAA,CACA,aAAA,CACA,eAAA,CAEA,+DACC,UAAA,CAEA,oEACC,UAAA,CAEA,sFACC,kBAAA,CACA,sBAAA,CACA,YAAA,CAKA,+EACC,YAAA,CACA,qBAAA,CAKF,4HACC,cAAA,CAEA,qIACC,aAAA,CACA,eAAA,CAQL,0DACC,UAAA,CAEA,iEACC,eAAA,CAKF,kDACC,UAAA,CACA,kBAAA,CACA,eAAA,CACA,cAAA,CAIC,+IAEC,UAAA,CAGD,mEACC,WAAA,CACA,QAAA,CAaA,qEACC,yBAAA,CACA,mCAAA,CACA,sBAAA,CAIF,2FACC,kBAAA,CAMF,mEACC,aAAA,CAIF,gDACC,UAAA,CACA,YAAA,CACA,eAAA,CACA,QAAA,CACA,qBAAA,CACA,6BAAA,CACA,sBAAA,CACA,2FAAA,CAEA,8DACC,YAAA,CACA,6BAAA,CACA,UAAA,CACA,eAAA,CAEA,qEACC,gBAAA,CAEA,iFACC,aAAA",sourcesContent:["\n.sharingTabDetailsView {\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\tmargin: 0 auto;\n\tposition: relative;\n\theight: 100%;\n\toverflow: hidden;\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tbox-sizing: border-box;\n\t\tmargin: 0.2em;\n\n\t\tspan {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\th1 {\n\t\t\t\tfont-size: 15px;\n\t\t\t\tpadding-left: 0.3em;\n\t\t\t}\n\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tposition: relative;\n\t\toverflow: scroll;\n\t\tflex-shrink: 1;\n\t\tpadding: 4px;\n\t\tpadding-right: 12px;\n\t}\n\n\t&__quick-permissions {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\tmargin: 0 auto;\n\t\tborder-radius: 0;\n\n\t\tdiv {\n\t\t\twidth: 100%;\n\n\t\t\tspan {\n\t\t\t\twidth: 100%;\n\n\t\t\t\tspan:nth-child(1) {\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\tpadding: 0.1em;\n\t\t\t\t}\n\n\t\t\t\t::v-deep label {\n\n\t\t\t\t\tspan {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* Target component based style in NcCheckboxRadioSwitch slot content*/\n\t\t\t\t:deep(span.checkbox-content__text.checkbox-radio-switch__text) {\n\t\t\t\t\tflex-wrap: wrap;\n\n\t\t\t\t\t.subline {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tflex-basis: 100%;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\t&__advanced-control {\n\t\twidth: 100%;\n\n\t\tbutton {\n\t\t\tmargin-top: 0.5em;\n\t\t}\n\n\t}\n\n\t&__advanced {\n\t\twidth: 100%;\n\t\tmargin-bottom: 0.5em;\n\t\ttext-align: left;\n\t\tpadding-left: 0;\n\n\t\tsection {\n\n\t\t\ttextarea,\n\t\t\tdiv.mx-datepicker {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\ttextarea {\n\t\t\t\theight: 80px;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t/*\n The following style is applied out of the component's scope\n to remove padding from the label.checkbox-radio-switch__label,\n which is used to group radio checkbox items. The use of ::v-deep\n ensures that the padding is modified without being affected by\n the component's scoping.\n Without this achieving left alignment for the checkboxes would not\n be possible.\n */\n\t\t\tspan {\n\t\t\t\t::v-deep label {\n\t\t\t\t\tpadding-left: 0 !important;\n\t\t\t\t\tbackground-color: initial !important;\n\t\t\t\t\tborder: none !important;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsection.custom-permissions-group {\n\t\t\t\tpadding-left: 1.5em;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__delete {\n\t\t>button:first-child {\n\t\t\tcolor: rgb(223, 7, 7);\n\t\t}\n\t}\n\n\t&__footer {\n\t\twidth: 100%;\n\t\tdisplay: flex;\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tflex-direction: column;\n\t\tjustify-content: space-between;\n\t\talign-items: flex-start;\n\t\tbackground: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\n\n\t\t.button-group {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: space-between;\n\t\t\twidth: 100%;\n\t\t\tmargin-top: 16px;\n\n\t\t\tbutton {\n\t\t\t\tmargin-left: 16px;\n\n\t\t\t\t&:first-child {\n\t\t\t\t\tmargin-left: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=r},58670:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(87537),a=i.n(s),n=i(23645),r=i.n(n)()(a());r.push([t.id,".sharing-entry__inherited .avatar-shared[data-v-05b67dc8]{width:32px;height:32px;line-height:32px;font-size:18px;background-color:var(--color-text-maxcontrast);border-radius:50%;flex-shrink:0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingInherited.vue"],names:[],mappings:"AAEC,0DACC,UAAA,CACA,WAAA,CACA,gBAAA,CACA,cAAA,CACA,8CAAA,CACA,iBAAA,CACA,aAAA",sourcesContent:["\n.sharing-entry__inherited {\n\t.avatar-shared {\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tline-height: 32px;\n\t\tfont-size: 18px;\n\t\tbackground-color: var(--color-text-maxcontrast);\n\t\tborder-radius: 50%;\n\t\tflex-shrink: 0;\n\t}\n}\n"],sourceRoot:""}]);const o=r},86133:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(87537),a=i.n(s),n=i(23645),r=i.n(n)()(a());r.push([t.id,".emptyContentWithSections[data-v-a65c443a]{margin:1rem auto}.sharingTab[data-v-a65c443a]{position:relative;height:100%}.sharingTab__content[data-v-a65c443a]{padding:0 6px}.sharingTab__additionalContent[data-v-a65c443a]{margin:44px 0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingTab.vue"],names:[],mappings:"AACA,2CACC,gBAAA,CAGD,6BACC,iBAAA,CACA,WAAA,CAEA,sCACC,aAAA,CAGD,gDACC,aAAA",sourcesContent:["\n.emptyContentWithSections {\n\tmargin: 1rem auto;\n}\n\n.sharingTab {\n\tposition: relative;\n\theight: 100%;\n\n\t&__content {\n\t\tpadding: 0 6px;\n\t}\n\n\t&__additionalContent {\n\t\tmargin: 44px 0;\n\t}\n}\n"],sourceRoot:""}]);const o=r},35449:function(t,e,i){!function(t){"use strict";var e,i=function(){try{if(t.URLSearchParams&&"bar"===new t.URLSearchParams("foo=bar").get("foo"))return t.URLSearchParams}catch(t){}return null}(),s=i&&"a=1"===new i({a:1}).toString(),a=i&&"+"===new i("s=%2B").get("s"),n=i&&"size"in i.prototype,r="__URLSearchParams__",o=!i||((e=new i).append("s"," &"),"s=+%26"===e.toString()),l=u.prototype,c=!(!t.Symbol||!t.Symbol.iterator);if(!(i&&s&&a&&o&&n)){l.append=function(t,e){_(this[r],t,e)},l.delete=function(t){delete this[r][t]},l.get=function(t){var e=this[r];return this.has(t)?e[t][0]:null},l.getAll=function(t){var e=this[r];return this.has(t)?e[t].slice(0):[]},l.has=function(t){return v(this[r],t)},l.set=function(t,e){this[r][t]=[""+e]},l.toString=function(){var t,e,i,s,a=this[r],n=[];for(e in a)for(i=A(e),t=0,s=a[e];t{"use strict";s.r(i),s.d(i,{default:()=>di});var a=s(93379),n=s.n(a),r=s(7795),o=s.n(r),l=s(90569),c=s.n(l),h=s(3565),d=s.n(h),p=s(19216),u=s.n(p),A=s(44589),g=s.n(A),f=s(83604),m={};m.styleTagTransform=g(),m.setAttributes=d(),m.insert=c().bind(null,"head"),m.domAPI=o(),m.insertStyleElement=u(),n()(f.Z,m),f.Z&&f.Z.locals&&f.Z.locals;var _=s(18519),C=s(77723);const v=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},E="object"==typeof global&&global&&global.Object===Object&&global;var y="object"==typeof self&&self&&self.Object===Object&&self;const w=E||y||Function("return this")(),S=function(){return w.Date.now()};var b=/\s/;var x=/^\s+/;const k=function(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&b.test(t.charAt(e)););return e}(t)+1).replace(x,""):t},P=w.Symbol;var T=Object.prototype,D=T.hasOwnProperty,R=T.toString,I=P?P.toStringTag:void 0;var N=Object.prototype.toString;var B=P?P.toStringTag:void 0;const L=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":B&&B in Object(t)?function(t){var e=D.call(t,I),i=t[I];try{t[I]=void 0;var s=!0}catch(t){}var a=R.call(t);return s&&(e?t[I]=i:delete t[I]),a}(t):function(t){return N.call(t)}(t)};var O=/^[-+]0x[0-9a-f]+$/i,H=/^0b[01]+$/i,Y=/^0o[0-7]+$/i,U=parseInt;const Z=function(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&"[object Symbol]"==L(t)}(t))return NaN;if(v(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=v(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=k(t);var i=H.test(t);return i||Y.test(t)?U(t.slice(2),i?2:8):O.test(t)?NaN:+t};var M=Math.max,V=Math.min;var $=s(61057),W=s(51915),F=s(20144),q=s(93664),j=s(79753),z=s(25108);const G=new class{constructor(){this.http=q.Z}listCollection(t){return this.http.get((0,j.generateOcsUrl)("collaboration/resources/collections/{collectionId}",{collectionId:t}))}renameCollection(t,e){return this.http.put((0,j.generateOcsUrl)("collaboration/resources/collections/{collectionId}",{collectionId:t}),{collectionName:e}).then((t=>t.data.ocs.data))}getCollectionsByResource(t,e){return this.http.get((0,j.generateOcsUrl)("collaboration/resources/{resourceType}/{resourceId}",{resourceType:t,resourceId:e})).then((t=>t.data.ocs.data))}createCollection(t,e,i){return this.http.post((0,j.generateOcsUrl)("collaboration/resources/{resourceType}/{resourceId}",{resourceType:t,resourceId:e}),{name:i}).then((t=>t.data.ocs.data))}addResource(t,e,i){return i=""+i,this.http.post((0,j.generateOcsUrl)("collaboration/resources/collections/{collectionId}",{collectionId:t}),{resourceType:e,resourceId:i}).then((t=>t.data.ocs.data))}removeResource(t,e,i){return this.http.delete((0,j.generateOcsUrl)("collaboration/resources/collections/{collectionId}",{collectionId:t}),{params:{resourceType:e,resourceId:i}}).then((t=>t.data.ocs.data))}search(t){return this.http.get((0,j.generateOcsUrl)("collaboration/resources/collections/search/{query}",{query:t})).then((t=>t.data.ocs.data))}},K=F.ZP.observable({collections:[]}),Q={addCollections(t){(0,F.t8)(K,"collections",t)},addCollection(t){K.collections.push(t)},removeCollection(t){(0,F.t8)(K,"collections",K.collections.filter((e=>e.id!==t)))},updateCollection(t){const e=K.collections.findIndex((e=>e.id===t.id));-1!==e?(0,F.t8)(K.collections,e,t):K.collections.push(t)}},J={fetchCollectionsByResource:({resourceType:t,resourceId:e})=>G.getCollectionsByResource(t,e).then((t=>(Q.addCollections(t),t))),createCollection:({baseResourceType:t,baseResourceId:e,resourceType:i,resourceId:s,name:a})=>G.createCollection(t,e,a).then((t=>{Q.addCollection(t),J.addResourceToCollection({collectionId:t.id,resourceType:i,resourceId:s})})),renameCollection:({collectionId:t,name:e})=>G.renameCollection(t,e).then((t=>(Q.updateCollection(t),t))),addResourceToCollection:({collectionId:t,resourceType:e,resourceId:i})=>G.addResource(t,e,i).then((t=>(Q.updateCollection(t),t))),removeResource:({collectionId:t,resourceType:e,resourceId:i})=>G.removeResource(t,e,i).then((t=>{t.resources.length>0?Q.updateCollection(t):Q.removeCollection(t)})),search:t=>G.search(t)};function X(t,e,i,s,a,n,r,o){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),s&&(c.functional=!0),n&&(c._scopeId="data-v-"+n),r?(l=function(t){!(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)&&typeof __VUE_SSR_CONTEXT__<"u"&&(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=l):a&&(l=o?function(){a.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var h=c.render;c.render=function(t,e){return l.call(e),h(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}const tt=X({name:"CollectionListItem",components:{NcAvatar:_.Z,NcActions:$.Z,NcActionButton:W.Z},props:{collection:{type:Object,default:null}},data:()=>({detailsOpen:!1,newName:null,error:{}}),computed:{getIcon:()=>t=>[t.iconClass],typeClass:()=>t=>"resource-type-"+t.type,limitedResources:()=>t=>t.resources?t.resources.slice(0,2):[],iconUrl:()=>t=>t.mimetype?OC.MimeType.getIconUrl(t.mimetype):t.iconUrl?t.iconUrl:""},methods:{toggleDetails(){this.detailsOpen=!this.detailsOpen},showDetails(){this.detailsOpen=!0},hideDetails(){this.detailsOpen=!1},removeResource(t,e){J.removeResource({collectionId:t.id,resourceType:e.type,resourceId:e.id})},openRename(){this.newName=this.collection.name},renameCollection(){""!==this.newName?J.renameCollection({collectionId:this.collection.id,name:this.newName}).then((t=>{this.newName=null})).catch((e=>{this.$set(this.error,"rename",t("core","Failed to rename the project")),z.error(e),setTimeout((()=>{(0,F.t8)(this.error,"rename",null)}),3e3)})):this.newName=null}}},(function(){var t=this,e=t._self._c;return e("li",{staticClass:"collection-list-item"},[e("NcAvatar",{staticClass:"collection-avatar",attrs:{"display-name":t.collection.name,"allow-placeholder":""}}),null===t.newName?e("span",{staticClass:"collection-item-name",attrs:{title:""},on:{click:t.showDetails}},[t._v(t._s(t.collection.name))]):e("form",{class:{shouldshake:t.error.rename},on:{submit:function(e){return e.preventDefault(),t.renameCollection.apply(null,arguments)}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.newName,expression:"newName"}],attrs:{type:"text",autocomplete:"off",autocapitalize:"off"},domProps:{value:t.newName},on:{input:function(e){e.target.composing||(t.newName=e.target.value)}}}),e("input",{staticClass:"icon-confirm",attrs:{type:"submit",value:""}})]),t.detailsOpen||null!==t.newName?t._e():e("div",{staticClass:"linked-icons"},t._l(t.limitedResources(t.collection),(function(i){return e("a",{key:i.type+"|"+i.id,class:t.typeClass(i),attrs:{title:i.name,href:i.link}},[e("img",{attrs:{src:t.iconUrl(i)}})])})),0),null===t.newName?e("span",{staticClass:"sharingOptionsGroup"},[e("NcActions",[e("NcActionButton",{attrs:{icon:"icon-info"},on:{click:function(e){return e.preventDefault(),t.toggleDetails.apply(null,arguments)}}},[t._v(" "+t._s(t.detailsOpen?t.t("core","Hide details"):t.t("core","Show details"))+" ")]),e("NcActionButton",{attrs:{icon:"icon-rename"},on:{click:function(e){return e.preventDefault(),t.openRename.apply(null,arguments)}}},[t._v(" "+t._s(t.t("core","Rename project"))+" ")])],1)],1):t._e(),e("transition",{attrs:{name:"fade"}},[t.error.rename?e("div",{staticClass:"error"},[t._v(" "+t._s(t.error.rename)+" ")]):t._e()]),e("transition",{attrs:{name:"fade"}},[t.detailsOpen?e("ul",{staticClass:"resource-list-details"},t._l(t.collection.resources,(function(i){return e("li",{key:i.type+"|"+i.id,class:t.typeClass(i)},[e("a",{attrs:{href:i.link}},[e("img",{attrs:{src:t.iconUrl(i)}}),e("span",{staticClass:"resource-name"},[t._v(t._s(i.name||""))])]),e("span",{staticClass:"icon-close",on:{click:function(e){return t.removeResource(t.collection,i)}}})])})),0):t._e()])],1)}),[],!1,null,"8e58e0a5",null,null).exports,et=function(t,e,i){var s,a,n,r,o,l,c=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function u(e){var i=s,n=a;return s=a=void 0,c=e,r=t.apply(n,i)}function A(t){var i=t-l;return void 0===l||i>=e||i<0||d&&t-c>=n}function g(){var t=S();if(A(t))return f(t);o=setTimeout(g,function(t){var i=e-(t-l);return d?V(i,n-(t-c)):i}(t))}function f(t){return o=void 0,p&&s?u(t):(s=a=void 0,r)}function m(){var t=S(),i=A(t);if(s=arguments,a=this,l=t,i){if(void 0===o)return function(t){return c=t,o=setTimeout(g,e),h?u(t):r}(l);if(d)return clearTimeout(o),o=setTimeout(g,e),u(l)}return void 0===o&&(o=setTimeout(g,e)),r}return e=Z(e)||0,v(i)&&(h=!!i.leading,n=(d="maxWait"in i)?M(Z(i.maxWait)||0,e):n,p="trailing"in i?!!i.trailing:p),m.cancel=function(){void 0!==o&&clearTimeout(o),c=0,s=l=a=o=void 0},m.flush=function(){return void 0===o?r:f(S())},m}((function(t,e){""!==t&&(e(!0),J.search(t).then((t=>{this.searchCollections=t})).catch((t=>{z.error("Failed to search for collections",t)})).finally((()=>{e(!1)})))}),500,{}),it=X({name:"CollectionList",components:{CollectionListItem:tt,NcAvatar:_.Z,NcSelect:C.Z},props:{type:{type:String,default:null},id:{type:String,default:null},name:{type:String,default:""},isActive:{type:Boolean,default:!0}},data:()=>({selectIsOpen:!1,generatingCodes:!1,codes:void 0,value:null,model:{},searchCollections:[],error:null,state:K,isSelectOpen:!1}),computed:{collections(){return this.state.collections.filter((t=>typeof t.resources.find((t=>t&&t.id===""+this.id&&t.type===this.type))<"u"))},placeholder(){return this.isSelectOpen?t("core","Type to search for existing projects"):t("core","Add to a project")},options(){const t=[];window.OCP.Collaboration.getTypes().sort().forEach((e=>{t.push({method:0,type:e,title:window.OCP.Collaboration.getLabel(e),class:window.OCP.Collaboration.getIcon(e),action:()=>window.OCP.Collaboration.trigger(e)})}));for(const e in this.searchCollections)-1===this.collections.findIndex((t=>t.id===this.searchCollections[e].id))&&t.push({method:1,title:this.searchCollections[e].name,collectionId:this.searchCollections[e].id});return t}},watch:{type(){this.isActive&&J.fetchCollectionsByResource({resourceType:this.type,resourceId:this.id})},id(){this.isActive&&J.fetchCollectionsByResource({resourceType:this.type,resourceId:this.id})},isActive(t){t&&J.fetchCollectionsByResource({resourceType:this.type,resourceId:this.id})}},mounted(){J.fetchCollectionsByResource({resourceType:this.type,resourceId:this.id})},methods:{select(e,i){0===e.method&&e.action().then((i=>{J.createCollection({baseResourceType:this.type,baseResourceId:this.id,resourceType:e.type,resourceId:i,name:this.name}).catch((e=>{this.setError(t("core","Failed to create a project"),e)}))})).catch((t=>{z.error("No resource selected",t)})),1===e.method&&J.addResourceToCollection({collectionId:e.collectionId,resourceType:this.type,resourceId:this.id}).catch((e=>{this.setError(t("core","Failed to add the item to the project"),e)}))},search(t,e){et.bind(this)(t,e)},showSelect(){this.selectIsOpen=!0,this.$refs.select.$el.focus()},hideSelect(){this.selectIsOpen=!1},isVueComponent:t=>t._isVue,setError(t,e){z.error(t,e),this.error=t,setTimeout((()=>{this.error=null}),5e3)}}},(function(){var t=this,e=t._self._c;return t.collections&&t.type&&t.id?e("ul",{staticClass:"collection-list",attrs:{id:"collection-list"}},[e("li",{on:{click:t.showSelect}},[t._m(0),e("div",{attrs:{id:"collection-select-container"}},[e("NcSelect",{ref:"select",attrs:{"aria-label-combobox":t.t("core","Add to a project"),options:t.options,placeholder:t.placeholder,label:"title",limit:5},on:{close:function(e){t.isSelectOpen=!1},open:function(e){t.isSelectOpen=!0},"option:selected":t.select,search:t.search},scopedSlots:t._u([{key:"selected-option",fn:function(i){return[e("span",{staticClass:"option__desc"},[e("span",{staticClass:"option__title"},[t._v(t._s(i.title))])])]}},{key:"option",fn:function(i){return[e("span",{staticClass:"option__wrapper"},[i.class?e("span",{staticClass:"avatar",class:i.class}):2!==i.method?e("NcAvatar",{attrs:{"allow-placeholder":"","display-name":i.title}}):t._e(),e("span",{staticClass:"option__title"},[t._v(t._s(i.title))])],1)]}}],null,!1,2397208459),model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},[e("p",{staticClass:"hint"},[t._v(" "+t._s(t.t("core","Connect items to a project to make them easier to find"))+" ")])])],1)]),e("transition",{attrs:{name:"fade"}},[t.error?e("li",{staticClass:"error"},[t._v(" "+t._s(t.error)+" ")]):t._e()]),t._l(t.collections,(function(t){return e("CollectionListItem",{key:t.id,attrs:{collection:t}})}))],2):t._e()}),[function(){var t=this._self._c;return t("div",{staticClass:"avatar"},[t("span",{staticClass:"icon-projects"})])}],!1,null,"75a4370b",null,null).exports;var st=s(43554),at=s(42515);class nt{constructor(){this._capabilities=(0,at.F)()}get defaultPermissions(){return this._capabilities.files_sharing?.default_permissions}get isPublicUploadEnabled(){return this._capabilities.files_sharing?.public.upload}get isShareWithLinkAllowed(){return document.getElementById("allowShareWithLink")&&"yes"===document.getElementById("allowShareWithLink").value}get federatedShareDocLink(){return OC.appConfig.core.federatedCloudShareDoc}get defaultExpirationDate(){return this.isDefaultExpireDateEnabled?new Date((new Date).setDate((new Date).getDate()+this.defaultExpireDate)):null}get defaultInternalExpirationDate(){return this.isDefaultInternalExpireDateEnabled?new Date((new Date).setDate((new Date).getDate()+this.defaultInternalExpireDate)):null}get defaultRemoteExpirationDateString(){return this.isDefaultRemoteExpireDateEnabled?new Date((new Date).setDate((new Date).getDate()+this.defaultRemoteExpireDate)):null}get enforcePasswordForPublicLink(){return!0===OC.appConfig.core.enforcePasswordForPublicLink}get enableLinkPasswordByDefault(){return!0===OC.appConfig.core.enableLinkPasswordByDefault}get isDefaultExpireDateEnforced(){return!0===OC.appConfig.core.defaultExpireDateEnforced}get isDefaultExpireDateEnabled(){return!0===OC.appConfig.core.defaultExpireDateEnabled}get isDefaultInternalExpireDateEnforced(){return!0===OC.appConfig.core.defaultInternalExpireDateEnforced}get isDefaultRemoteExpireDateEnforced(){return!0===OC.appConfig.core.defaultRemoteExpireDateEnforced}get isDefaultInternalExpireDateEnabled(){return!0===OC.appConfig.core.defaultInternalExpireDateEnabled}get isDefaultRemoteExpireDateEnabled(){return!0===OC.appConfig.core.defaultRemoteExpireDateEnabled}get isRemoteShareAllowed(){return!0===OC.appConfig.core.remoteShareAllowed}get isMailShareAllowed(){return void 0!==this._capabilities?.files_sharing?.sharebymail&&!0===this._capabilities?.files_sharing?.public?.enabled}get defaultExpireDate(){return OC.appConfig.core.defaultExpireDate}get defaultInternalExpireDate(){return OC.appConfig.core.defaultInternalExpireDate}get defaultRemoteExpireDate(){return OC.appConfig.core.defaultRemoteExpireDate}get isResharingAllowed(){return!0===OC.appConfig.core.resharingAllowed}get isPasswordForMailSharesRequired(){return void 0!==this._capabilities.files_sharing.sharebymail&&this._capabilities.files_sharing.sharebymail.password.enforced}get shouldAlwaysShowUnique(){return!0===this._capabilities.files_sharing?.sharee?.always_show_unique}get allowGroupSharing(){return!0===OC.appConfig.core.allowGroupSharing}get maxAutocompleteResults(){return parseInt(OC.config["sharing.maxAutocompleteResults"],10)||25}get minSearchStringLength(){return parseInt(OC.config["sharing.minSearchStringLength"],10)||0}get passwordPolicy(){return this._capabilities.password_policy?this._capabilities.password_policy:{}}}var rt=s(41922),ot=s(25108);class lt{constructor(t){if(e=this,s=void 0,(i=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,"string");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(i="_share"))in e?Object.defineProperty(e,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[i]=s,t.ocs&&t.ocs.data&&t.ocs.data[0]&&(t=t.ocs.data[0]),t.hide_download=!!t.hide_download,t.mail_send=!!t.mail_send,t.attributes)try{t.attributes=JSON.parse(t.attributes)}catch(e){ot.warn('Could not parse share attributes returned by server: "'+t.attributes+'"')}var e,i,s;t.attributes=t.attributes??[],this._share=t}get state(){return this._share}get id(){return this._share.id}get type(){return this._share.share_type}get permissions(){return this._share.permissions}get attributes(){return this._share.attributes}set permissions(t){this._share.permissions=t}get owner(){return this._share.uid_owner}get ownerDisplayName(){return this._share.displayname_owner}get shareWith(){return this._share.share_with}get shareWithDisplayName(){return this._share.share_with_displayname||this._share.share_with}get shareWithDisplayNameUnique(){return this._share.share_with_displayname_unique||this._share.share_with}get shareWithLink(){return this._share.share_with_link}get shareWithAvatar(){return this._share.share_with_avatar}get uidFileOwner(){return this._share.uid_file_owner}get displaynameFileOwner(){return this._share.displayname_file_owner||this._share.uid_file_owner}get createdTime(){return this._share.stime}get expireDate(){return this._share.expiration}set expireDate(t){this._share.expiration=t}get token(){return this._share.token}get note(){return this._share.note}set note(t){this._share.note=t}get label(){return this._share.label}set label(t){this._share.label=t}get mailSend(){return!0===this._share.mail_send}get hideDownload(){return!0===this._share.hide_download}set hideDownload(t){this._share.hide_download=!0===t}get password(){return this._share.password}set password(t){this._share.password=t}get passwordExpirationTime(){return this._share.password_expiration_time}set passwordExpirationTime(t){this._share.password_expiration_time=t}get sendPasswordByTalk(){return this._share.send_password_by_talk}set sendPasswordByTalk(t){this._share.send_password_by_talk=t}get path(){return this._share.path}get itemType(){return this._share.item_type}get mimetype(){return this._share.mimetype}get fileSource(){return this._share.file_source}get fileTarget(){return this._share.file_target}get fileParent(){return this._share.file_parent}get hasReadPermission(){return!!(this.permissions&OC.PERMISSION_READ)}get hasCreatePermission(){return!!(this.permissions&OC.PERMISSION_CREATE)}get hasDeletePermission(){return!!(this.permissions&OC.PERMISSION_DELETE)}get hasUpdatePermission(){return!!(this.permissions&OC.PERMISSION_UPDATE)}get hasSharePermission(){return!!(this.permissions&OC.PERMISSION_SHARE)}get hasDownloadPermission(){for(const t in this._share.attributes){const e=this._share.attributes[t];if("permissions"===e.scope&&"download"===e.key)return e.enabled}return!0}set hasDownloadPermission(t){this.setAttribute("permissions","download",!!t)}setAttribute(t,e,i){const s={scope:t,key:e,enabled:i};for(const t in this._share.attributes){const e=this._share.attributes[t];if(e.scope===s.scope&&e.key===s.key)return void this._share.attributes.splice(t,1,s)}this._share.attributes.push(s)}get canEdit(){return!0===this._share.can_edit}get canDelete(){return!0===this._share.can_delete}get viaFileid(){return this._share.via_fileid}get viaPath(){return this._share.via_path}get parent(){return this._share.parent}get storageId(){return this._share.storage_id}get storage(){return this._share.storage}get itemSource(){return this._share.item_source}get status(){return this._share.status}}const ct={data:()=>({SHARE_TYPES:rt.D})};var ht=s(64024);const dt={name:"SharingEntrySimple",components:{NcActions:$.Z},props:{title:{type:String,default:"",required:!0},subtitle:{type:String,default:""},isUnique:{type:Boolean,default:!0},ariaExpanded:{type:Boolean,default:null}},computed:{ariaExpandedValue(){return null===this.ariaExpanded?this.ariaExpanded:this.ariaExpanded?"true":"false"}}};var pt=s(31277),ut={};ut.styleTagTransform=g(),ut.setAttributes=d(),ut.insert=c().bind(null,"head"),ut.domAPI=o(),ut.insertStyleElement=u(),n()(pt.Z,ut),pt.Z&&pt.Z.locals&&pt.Z.locals;var At=s(51900);const gt=(0,At.Z)(dt,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"sharing-entry"},[t._t("avatar"),t._v(" "),e("div",{staticClass:"sharing-entry__desc"},[e("span",{staticClass:"sharing-entry__title"},[t._v(t._s(t.title))]),t._v(" "),t.subtitle?e("p",[t._v("\n\t\t\t"+t._s(t.subtitle)+"\n\t\t")]):t._e()]),t._v(" "),t.$slots.default?e("NcActions",{ref:"actionsComponent",staticClass:"sharing-entry__actions",attrs:{"menu-align":"right","aria-expanded":t.ariaExpandedValue}},[t._t("default")],2):t._e()],2)}),[],!1,null,"1852ea78",null).exports;var ft=s(25108);const mt={name:"SharingEntryInternal",components:{NcActionButton:W.Z,SharingEntrySimple:gt},props:{fileInfo:{type:Object,default:()=>{},required:!0}},data:()=>({copied:!1,copySuccess:!1}),computed:{internalLink(){return window.location.protocol+"//"+window.location.host+(0,j.generateUrl)("/f/")+this.fileInfo.id},copyLinkTooltip(){return this.copied?this.copySuccess?"":t("files_sharing","Cannot copy, please copy the link manually"):t("files_sharing","Copy internal link to clipboard")},internalLinkSubtitle(){return"dir"===this.fileInfo.type?t("files_sharing","Only works for users with access to this folder"):t("files_sharing","Only works for users with access to this file")}},methods:{async copyLink(){try{await navigator.clipboard.writeText(this.internalLink),(0,ht.s$)(t("files_sharing","Link copied")),this.$refs.shareEntrySimple.$refs.actionsComponent.$el.focus(),this.copySuccess=!0,this.copied=!0}catch(t){this.copySuccess=!1,this.copied=!0,ft.error(t)}finally{setTimeout((()=>{this.copySuccess=!1,this.copied=!1}),4e3)}}}};var _t=s(18094),Ct={};Ct.styleTagTransform=g(),Ct.setAttributes=d(),Ct.insert=c().bind(null,"head"),Ct.domAPI=o(),Ct.insertStyleElement=u(),n()(_t.Z,Ct),_t.Z&&_t.Z.locals&&_t.Z.locals;const vt=(0,At.Z)(mt,(function(){var t=this,e=t._self._c;return e("ul",[e("SharingEntrySimple",{ref:"shareEntrySimple",staticClass:"sharing-entry__internal",attrs:{title:t.t("files_sharing","Internal link"),subtitle:t.internalLinkSubtitle},scopedSlots:t._u([{key:"avatar",fn:function(){return[e("div",{staticClass:"avatar-external icon-external-white"})]},proxy:!0}])},[t._v(" "),e("NcActionButton",{attrs:{title:t.copyLinkTooltip,"aria-label":t.copyLinkTooltip,icon:t.copied&&t.copySuccess?"icon-checkmark-color":"icon-clippy"},on:{click:t.copyLink}})],1)],1)}),[],!1,null,"69227eb0",null).exports;var Et=s(77958),yt=s(20296),wt=s.n(yt),St=s(25108);const bt=new nt;async function xt(){if(bt.passwordPolicy.api&&bt.passwordPolicy.api.generate)try{const e=await q.Z.get(bt.passwordPolicy.api.generate);if(e.data.ocs.data.password)return(0,ht.s$)(t("files_sharing","Password created successfully")),e.data.ocs.data.password}catch(e){St.info("Error generating password from password_policy",e),(0,ht.x2)(t("files_sharing","Error generating password from password policy"))}const e=new Uint8Array(10);self.crypto.getRandomValues(e);let i="";for(let t=0;t[],required:!0},linkShares:{type:Array,default:()=>[],required:!0},fileInfo:{type:Object,default:()=>{},required:!0},reshare:{type:lt,default:null},canReshare:{type:Boolean,required:!0}},data:()=>({config:new nt,loading:!1,query:"",recommendations:[],ShareSearch:OCA.Sharing.ShareSearch.state,suggestions:[],value:null}),computed:{externalResults(){return this.ShareSearch.results},inputPlaceholder(){const e=this.config.isRemoteShareAllowed;return this.canReshare?e?t("files_sharing","Name, email, or Federated Cloud ID …"):t("files_sharing","Name or email …"):t("files_sharing","Resharing is not allowed")},isValidQuery(){return this.query&&""!==this.query.trim()&&this.query.length>this.config.minSearchStringLength},options(){return this.isValidQuery?this.suggestions:this.recommendations},noResultText(){return this.loading?t("files_sharing","Searching …"):t("files_sharing","No elements found.")}},mounted(){this.getRecommendations()},methods:{onSelected(t){this.value=null,this.openSharingDetails(t)},async asyncFind(t){this.query=t.trim(),this.isValidQuery&&(this.loading=!0,await this.debounceGetSuggestions(t))},async getSuggestions(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.loading=!0,!0===(0,at.F)().files_sharing.sharee.query_lookup_default&&(i=!0);const s=[this.SHARE_TYPES.SHARE_TYPE_USER,this.SHARE_TYPES.SHARE_TYPE_GROUP,this.SHARE_TYPES.SHARE_TYPE_REMOTE,this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP,this.SHARE_TYPES.SHARE_TYPE_CIRCLE,this.SHARE_TYPES.SHARE_TYPE_ROOM,this.SHARE_TYPES.SHARE_TYPE_GUEST,this.SHARE_TYPES.SHARE_TYPE_DECK,this.SHARE_TYPES.SHARE_TYPE_SCIENCEMESH];!0===(0,at.F)().files_sharing.public.enabled&&s.push(this.SHARE_TYPES.SHARE_TYPE_EMAIL);let a=null;try{a=await q.Z.get((0,j.generateOcsUrl)("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"dir"===this.fileInfo.type?"folder":"file",search:e,lookup:i,perPage:this.config.maxAutocompleteResults,shareType:s}})}catch(t){return void It.error("Error fetching suggestions",t)}const n=a.data.ocs.data,r=a.data.ocs.data.exact;n.exact=[];const o=Object.values(r).reduce(((t,e)=>t.concat(e)),[]),l=Object.values(n).reduce(((t,e)=>t.concat(e)),[]),c=this.filterOutExistingShares(o).map((t=>this.formatForMultiselect(t))).sort(((t,e)=>t.shareType-e.shareType)),h=this.filterOutExistingShares(l).map((t=>this.formatForMultiselect(t))).sort(((t,e)=>t.shareType-e.shareType)),d=[];n.lookupEnabled&&!i&&d.push({id:"global-lookup",isNoUser:!0,displayName:t("files_sharing","Search globally"),lookup:!0});const p=this.externalResults.filter((t=>!t.condition||t.condition(this))),u=c.concat(h).concat(p).concat(d),A=u.reduce(((t,e)=>e.displayName?(t[e.displayName]||(t[e.displayName]=0),t[e.displayName]++,t):t),{});this.suggestions=u.map((t=>A[t.displayName]>1&&!t.desc?{...t,desc:t.shareWithDisplayNameUnique}:t)),this.loading=!1,It.info("suggestions",this.suggestions)},debounceGetSuggestions:wt()((function(){this.getSuggestions(...arguments)}),300),async getRecommendations(){this.loading=!0;let t=null;try{t=await q.Z.get((0,j.generateOcsUrl)("apps/files_sharing/api/v1/sharees_recommended"),{params:{format:"json",itemType:this.fileInfo.type}})}catch(t){return void It.error("Error fetching recommendations",t)}const e=this.externalResults.filter((t=>!t.condition||t.condition(this))),i=Object.values(t.data.ocs.data.exact).reduce(((t,e)=>t.concat(e)),[]);this.recommendations=this.filterOutExistingShares(i).map((t=>this.formatForMultiselect(t))).concat(e),this.loading=!1,It.info("recommendations",this.recommendations)},filterOutExistingShares(t){return t.reduce(((t,e)=>{if("object"!=typeof e)return t;try{if(e.value.shareType===this.SHARE_TYPES.SHARE_TYPE_USER){if(e.value.shareWith===(0,Et.ts)().uid)return t;if(this.reshare&&e.value.shareWith===this.reshare.owner)return t}if(e.value.shareType===this.SHARE_TYPES.SHARE_TYPE_EMAIL){if(-1!==this.linkShares.map((t=>t.shareWith)).indexOf(e.value.shareWith.trim()))return t}else{const i=this.shares.reduce(((t,e)=>(t[e.shareWith]=e.type,t)),{}),s=e.value.shareWith.trim();if(s in i&&i[s]===e.value.shareType)return t}t.push(e)}catch{return t}return t}),[])},shareTypeToIcon(e){switch(e){case this.SHARE_TYPES.SHARE_TYPE_GUEST:return{icon:"icon-user",iconTitle:t("files_sharing","Guest")};case this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP:case this.SHARE_TYPES.SHARE_TYPE_GROUP:return{icon:"icon-group",iconTitle:t("files_sharing","Group")};case this.SHARE_TYPES.SHARE_TYPE_EMAIL:return{icon:"icon-mail",iconTitle:t("files_sharing","Email")};case this.SHARE_TYPES.SHARE_TYPE_CIRCLE:return{icon:"icon-circle",iconTitle:t("files_sharing","Circle")};case this.SHARE_TYPES.SHARE_TYPE_ROOM:return{icon:"icon-room",iconTitle:t("files_sharing","Talk conversation")};case this.SHARE_TYPES.SHARE_TYPE_DECK:return{icon:"icon-deck",iconTitle:t("files_sharing","Deck board")};case this.SHARE_TYPES.SHARE_TYPE_SCIENCEMESH:return{icon:"icon-sciencemesh",iconTitle:t("files_sharing","ScienceMesh")};default:return{}}},formatForMultiselect(e){let i;return i=e.value.shareType===this.SHARE_TYPES.SHARE_TYPE_USER&&this.config.shouldAlwaysShowUnique?e.shareWithDisplayNameUnique??"":e.value.shareType!==this.SHARE_TYPES.SHARE_TYPE_REMOTE&&e.value.shareType!==this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP||!e.value.server?e.value.shareType===this.SHARE_TYPES.SHARE_TYPE_EMAIL?e.value.shareWith:e.shareWithDescription??"":t("files_sharing","on {server}",{server:e.value.server}),{shareWith:e.value.shareWith,shareType:e.value.shareType,user:e.uuid||e.value.shareWith,isNoUser:e.value.shareType!==this.SHARE_TYPES.SHARE_TYPE_USER,displayName:e.name||e.label,subtitle:i,shareWithDisplayNameUnique:e.shareWithDisplayNameUnique||"",...this.shareTypeToIcon(e.value.shareType)}},async addShare(t){if(this.value=null,t.lookup)return await this.getSuggestions(this.query,!0),this.$nextTick((()=>{this.$refs.select.$children[0].open=!0})),!0;if(t.handler){const e=await t.handler(this);return this.$emit("add:share",new lt(e)),!0}this.loading=!0,It.debug("Adding a new share from the input for",t);try{let e=null;this.config.enforcePasswordForPublicLink&&t.shareType===this.SHARE_TYPES.SHARE_TYPE_EMAIL&&(e=await xt());const i=(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),s=await this.createShare({path:i,shareType:t.shareType,shareWith:t.shareWith,password:e,permissions:this.fileInfo.sharePermissions&(0,at.F)().files_sharing.default_permissions,attributes:JSON.stringify(this.fileInfo.shareAttributes)});e?(s.newPassword=e,(await new Promise((t=>{this.$emit("add:share",s,t)}))).open=!0):this.$emit("add:share",s),await this.getRecommendations()}catch(e){this.$nextTick((()=>{this.$refs.select.$children[0].open=!0})),this.query=t.shareWith,It.error("Error while adding new share",e)}finally{this.loading=!1}}}};var Bt=s(56390),Lt={};Lt.styleTagTransform=g(),Lt.setAttributes=d(),Lt.insert=c().bind(null,"head"),Lt.domAPI=o(),Lt.insertStyleElement=u(),n()(Bt.Z,Lt),Bt.Z&&Bt.Z.locals&&Bt.Z.locals;const Ot=(0,At.Z)(Nt,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"sharing-search"},[e("label",{attrs:{for:"sharing-search-input"}},[t._v(t._s(t.t("files_sharing","Search for share recipients")))]),t._v(" "),e("NcSelect",{ref:"select",staticClass:"sharing-search__input",attrs:{"input-id":"sharing-search-input",disabled:!t.canReshare,loading:t.loading,filterable:!1,placeholder:t.inputPlaceholder,"clear-search-on-blur":()=>!1,"user-select":!0,options:t.options},on:{search:t.asyncFind,"option:selected":t.onSelected},scopedSlots:t._u([{key:"no-options",fn:function(e){let{search:i}=e;return[t._v("\n\t\t\t"+t._s(i?t.noResultText:t.t("files_sharing","No recommendations. Start typing."))+"\n\t\t")]}}]),model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)}),[],!1,null,null,null).exports;var Ht=s(65358),Yt=s(79339),Ut=s(32248),Zt=s(59440);const Mt={NONE:0,READ:1,UPDATE:2,CREATE:4,DELETE:8,SHARE:16},Vt={READ_ONLY:Mt.READ,UPLOAD_AND_UPDATE:Mt.READ|Mt.UPDATE|Mt.CREATE|Mt.DELETE,FILE_DROP:Mt.CREATE,ALL:Mt.UPDATE|Mt.CREATE|Mt.READ|Mt.DELETE|Mt.SHARE,ALL_FILE:Mt.UPDATE|Mt.READ|Mt.SHARE};var $t=s(25108);const Wt={mixins:[Dt,ct],props:{fileInfo:{type:Object,default:()=>{},required:!0},share:{type:lt,default:null},isUnique:{type:Boolean,default:!0}},data(){return{config:new nt,errors:{},loading:!1,saving:!1,open:!1,updateQueue:new Zt.Z({concurrency:1}),reactiveState:this.share?.state}},computed:{hasNote:{get(){return""!==this.share.note},set(t){this.share.note=t?null:""}},dateTomorrow:()=>new Date((new Date).setDate((new Date).getDate()+1)),lang(){const t=window.dayNamesShort?window.dayNamesShort:["Sun.","Mon.","Tue.","Wed.","Thu.","Fri.","Sat."],e=window.monthNamesShort?window.monthNamesShort:["Jan.","Feb.","Mar.","Apr.","May.","Jun.","Jul.","Aug.","Sep.","Oct.","Nov.","Dec."];return{formatLocale:{firstDayOfWeek:window.firstDay?window.firstDay:0,monthsShort:e,weekdaysMin:t,weekdaysShort:t},monthFormat:"MMM"}},isFolder(){return"dir"===this.fileInfo.type},isPublicShare(){const t=this.share.shareType??this.share.type;return[this.SHARE_TYPES.SHARE_TYPE_LINK,this.SHARE_TYPES.SHARE_TYPE_EMAIL].includes(t)},isRemoteShare(){return this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP||this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE},isShareOwner(){return this.share&&this.share.owner===(0,Et.ts)().uid},isExpiryDateEnforced(){return this.isPublicShare?this.config.isDefaultExpireDateEnforced:this.isRemoteShare?this.config.isDefaultRemoteExpireDateEnforced:this.config.isDefaultInternalExpireDateEnforced},hasCustomPermissions(){return![Vt.ALL,Vt.READ_ONLY,Vt.FILE_DROP].includes(this.share.permissions)},maxExpirationDateEnforced(){return this.isExpiryDateEnforced?this.isPublicShare?this.config.defaultExpirationDate:this.isRemoteShare?this.config.defaultRemoteExpirationDateString:this.config.defaultInternalExpirationDate:null}},methods:{checkShare:t=>(!t.password||"string"==typeof t.password&&""!==t.password.trim())&&!(t.expirationDate&&!t.expirationDate.isValid()),parseDateString(t){if(t)return new Date(t.match(/([0-9]{4}-[0-9]{2}-[0-9]{2})/i)?.pop())},formatDateToString:t=>new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())).toISOString().split("T")[0],onExpirationChange:wt()((function(t){this.share.expireDate=this.formatDateToString(new Date(t))}),500),onExpirationDisable(){this.share.expireDate=""},onNoteChange(t){this.$set(this.share,"newNote",t.trim())},onNoteSubmit(){this.share.newNote&&(this.share.note=this.share.newNote,this.$delete(this.share,"newNote"),this.queueUpdate("note"))},async onDelete(){try{this.loading=!0,this.open=!1,await this.deleteShare(this.share.id),$t.debug("Share deleted",this.share.id);const e="file"===this.share.itemType?t("files_sharing",'File "{path}" has been unshared',{path:this.share.path}):t("files_sharing",'Folder "{path}" has been unshared',{path:this.share.path});(0,ht.s$)(e),this.$emit("remove:share",this.share)}catch(t){this.open=!0}finally{this.loading=!1}},queueUpdate(){for(var e=arguments.length,i=new Array(e),s=0;s{"object"==typeof this.share[t]?e[t]=JSON.stringify(this.share[t]):e[t]=this.share[t].toString()})),void this.updateQueue.add((async()=>{this.saving=!0,this.errors={};try{const s=await this.updateShare(this.share.id,e);i.indexOf("password")>=0&&(this.$delete(this.share,"newPassword"),this.share.passwordExpirationTime=s.password_expiration_time),this.$delete(this.errors,i[0]),(0,ht.s$)(t("files_sharing","Share {propertyName} saved",{propertyName:i[0]}))}catch({message:e}){e&&""!==e&&(this.onSyncError(i[0],e),(0,ht.x2)(t("files_sharing",e)))}finally{this.saving=!1}}))}$t.debug("Updated local share",this.share)}},onSyncError(t,e){switch(this.open=!0,t){case"password":case"pending":case"expireDate":case"label":case"note":{this.$set(this.errors,t,e);let i=this.$refs[t];if(i){i.$el&&(i=i.$el);const t=i.querySelector(".focusable");t&&t.focus()}break}case"sendPasswordByTalk":this.$set(this.errors,t,e),this.share.sendPasswordByTalk=!this.share.sendPasswordByTalk}},debounceQueueUpdate:wt()((function(t){this.queueUpdate(t)}),500)}},Ft={name:"SharingEntryInherited",components:{NcActionButton:W.Z,NcActionLink:Yt.Z,NcActionText:Ut.Z,NcAvatar:_.Z,SharingEntrySimple:gt},mixins:[Wt],props:{share:{type:lt,required:!0}},computed:{viaFileTargetUrl(){return(0,j.generateUrl)("/f/{fileid}",{fileid:this.share.viaFileid})},viaFolderName(){return(0,Ht.EZ)(this.share.viaPath)}}};var qt=s(35979),jt={};jt.styleTagTransform=g(),jt.setAttributes=d(),jt.insert=c().bind(null,"head"),jt.domAPI=o(),jt.insertStyleElement=u(),n()(qt.Z,jt),qt.Z&&qt.Z.locals&&qt.Z.locals;const zt=(0,At.Z)(Ft,(function(){var t=this,e=t._self._c;return e("SharingEntrySimple",{key:t.share.id,staticClass:"sharing-entry__inherited",attrs:{title:t.share.shareWithDisplayName},scopedSlots:t._u([{key:"avatar",fn:function(){return[e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{user:t.share.shareWith,"display-name":t.share.shareWithDisplayName}})]},proxy:!0}])},[t._v(" "),e("NcActionText",{attrs:{icon:"icon-user"}},[t._v("\n\t\t"+t._s(t.t("files_sharing","Added by {initiator}",{initiator:t.share.ownerDisplayName}))+"\n\t")]),t._v(" "),t.share.viaPath&&t.share.viaFileid?e("NcActionLink",{attrs:{icon:"icon-folder",href:t.viaFileTargetUrl}},[t._v("\n\t\t"+t._s(t.t("files_sharing","Via “{folder}”",{folder:t.viaFolderName}))+"\n\t")]):t._e(),t._v(" "),t.share.canDelete?e("NcActionButton",{attrs:{icon:"icon-close"},on:{click:function(e){return e.preventDefault(),t.onDelete.apply(null,arguments)}}},[t._v("\n\t\t"+t._s(t.t("files_sharing","Unshare"))+"\n\t")]):t._e()],1)}),[],!1,null,"283ca89e",null).exports;var Gt=s(25108);const Kt={name:"SharingInherited",components:{NcActionButton:W.Z,SharingEntryInherited:zt,SharingEntrySimple:gt},props:{fileInfo:{type:Object,default:()=>{},required:!0}},data:()=>({loaded:!1,loading:!1,showInheritedShares:!1,shares:[]}),computed:{showInheritedSharesIcon(){return this.loading?"icon-loading-small":this.showInheritedShares?"icon-triangle-n":"icon-triangle-s"},mainTitle:()=>t("files_sharing","Others with access"),subTitle(){return this.showInheritedShares&&0===this.shares.length?t("files_sharing","No other users with access found"):""},toggleTooltip(){return"dir"===this.fileInfo.type?t("files_sharing","Toggle list of others with access to this directory"):t("files_sharing","Toggle list of others with access to this file")},fullPath(){return`${this.fileInfo.path}/${this.fileInfo.name}`.replace("//","/")}},watch:{fileInfo(){this.resetState()}},methods:{toggleInheritedShares(){this.showInheritedShares=!this.showInheritedShares,this.showInheritedShares?this.fetchInheritedShares():this.resetState()},async fetchInheritedShares(){this.loading=!0;try{const t=(0,j.generateOcsUrl)("apps/files_sharing/api/v1/shares/inherited?format=json&path={path}",{path:this.fullPath}),e=await q.Z.get(t);this.shares=e.data.ocs.data.map((t=>new lt(t))).sort(((t,e)=>e.createdTime-t.createdTime)),Gt.info(this.shares),this.loaded=!0}catch(e){OC.Notification.showTemporary(t("files_sharing","Unable to fetch inherited shares"),{type:"error"})}finally{this.loading=!1}},resetState(){this.loaded=!1,this.loading=!1,this.showInheritedShares=!1,this.shares=[]},removeShare(t){const e=this.shares.findIndex((e=>e===t));this.shares.splice(e,1)}}};var Qt=s(58670),Jt={};Jt.styleTagTransform=g(),Jt.setAttributes=d(),Jt.insert=c().bind(null,"head"),Jt.domAPI=o(),Jt.insertStyleElement=u(),n()(Qt.Z,Jt),Qt.Z&&Qt.Z.locals&&Qt.Z.locals;const Xt=(0,At.Z)(Kt,(function(){var t=this,e=t._self._c;return e("ul",{attrs:{id:"sharing-inherited-shares"}},[e("SharingEntrySimple",{staticClass:"sharing-entry__inherited",attrs:{title:t.mainTitle,subtitle:t.subTitle,"aria-expanded":t.showInheritedShares},scopedSlots:t._u([{key:"avatar",fn:function(){return[e("div",{staticClass:"avatar-shared icon-more-white"})]},proxy:!0}])},[t._v(" "),e("NcActionButton",{attrs:{icon:t.showInheritedSharesIcon,"aria-label":t.toggleTooltip,title:t.toggleTooltip},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.toggleInheritedShares.apply(null,arguments)}}})],1),t._v(" "),t._l(t.shares,(function(i){return e("SharingEntryInherited",{key:i.id,attrs:{"file-info":t.fileInfo,share:i},on:{"remove:share":t.removeShare}})}))],2)}),[],!1,null,"05b67dc8",null).exports;var te=s(21179),ee=s(21084);const ie={name:"TuneIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},se=(0,At.Z)(ie,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon tune-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,ae={name:"TriangleSmallDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ne=(0,At.Z)(ae,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon triangle-small-down-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M8 9H16L12 16"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,re={name:"EyeOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},oe=(0,At.Z)(re,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon eye-outline-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var le=s(77531);const ce={name:"FileUploadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},he=(0,At.Z)(ce,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon file-upload-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13.5,16V19H10.5V16H8L12,12L16,16H13.5M13,9V3.5L18.5,9H13Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,de={name:"SharingEntryQuickShareSelect",components:{DropdownIcon:ne,NcActions:$.Z,NcActionButton:W.Z},mixins:[Wt,Rt,ct],props:{share:{type:Object,required:!0}},emits:["open-sharing-details"],data:()=>({selectedOption:""}),computed:{ariaLabel(){return t("files_sharing",'Quick share options, the current selected is "{selectedOption}"',{selectedOption:this.selectedOption})},canViewText:()=>t("files_sharing","View only"),canEditText:()=>t("files_sharing","Can edit"),fileDropText:()=>t("files_sharing","File drop"),customPermissionsText:()=>t("files_sharing","Custom permissions"),preSelectedOption(){return(this.share.permissions&~Mt.SHARE)===Vt.READ_ONLY?this.canViewText:this.share.permissions===Vt.ALL||this.share.permissions===Vt.ALL_FILE?this.canEditText:(this.share.permissions&~Mt.SHARE)===Vt.FILE_DROP?this.fileDropText:this.customPermissionsText},options(){const t=[{label:this.canViewText,icon:oe},{label:this.canEditText,icon:le.Z}];return this.supportsFileDrop&&t.push({label:this.fileDropText,icon:he}),t.push({label:this.customPermissionsText,icon:se}),t},supportsFileDrop(){if(this.isFolder&&this.config.isPublicUploadEnabled){const t=this.share.type??this.share.shareType;return[this.SHARE_TYPES.SHARE_TYPE_LINK,this.SHARE_TYPES.SHARE_TYPE_EMAIL].includes(t)}return!1},dropDownPermissionValue(){switch(this.selectedOption){case this.canEditText:return this.isFolder?Vt.ALL:Vt.ALL_FILE;case this.fileDropText:return Vt.FILE_DROP;case this.customPermissionsText:return"custom";case this.canViewText:default:return Vt.READ_ONLY}}},created(){this.selectedOption=this.preSelectedOption},methods:{selectOption(t){this.selectedOption=t,t===this.customPermissionsText?this.$emit("open-sharing-details"):(this.share.permissions=this.dropDownPermissionValue,this.queueUpdate("permissions"),this.$refs.quickShareActions.$refs.menuButton.$el.focus())}}},pe=de;var ue=s(87192),Ae={};Ae.styleTagTransform=g(),Ae.setAttributes=d(),Ae.insert=c().bind(null,"head"),Ae.domAPI=o(),Ae.insertStyleElement=u(),n()(ue.Z,Ae),ue.Z&&ue.Z.locals&&ue.Z.locals;const ge=(0,At.Z)(pe,(function(){var t=this,e=t._self._c;return e("NcActions",{ref:"quickShareActions",staticClass:"share-select",attrs:{"menu-name":t.selectedOption,"aria-label":t.ariaLabel,type:"tertiary-no-background","force-name":""},scopedSlots:t._u([{key:"icon",fn:function(){return[e("DropdownIcon",{attrs:{size:15}})]},proxy:!0}])},[t._v(" "),t._l(t.options,(function(i){return e("NcActionButton",{key:i.label,attrs:{type:"radio","model-value":i.label===t.selectedOption,"close-after-click":""},on:{click:function(e){return t.selectOption(i.label)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(i.icon,{tag:"component"})]},proxy:!0}],null,!0)},[t._v("\n\t\t"+t._s(i.label)+"\n\t")])}))],2)}),[],!1,null,"6e5dd9f1",null).exports,fe={name:"ExternalShareAction",props:{id:{type:String,required:!0},action:{type:Object,default:()=>({})},fileInfo:{type:Object,default:()=>{},required:!0},share:{type:lt,default:null}},computed:{data(){return this.action.data(this)}}},me=(0,At.Z)(fe,(function(){var t=this;return(0,t._self._c)(t.data.is,t._g(t._b({tag:"Component"},"Component",t.data,!1),t.action.handlers),[t._v("\n\t"+t._s(t.data.text)+"\n")])}),[],!1,null,null,null).exports;var _e=s(25108);const Ce={name:"SharingEntryLink",components:{ExternalShareAction:me,NcActions:$.Z,NcActionButton:W.Z,NcActionInput:te.Z,NcActionLink:Yt.Z,NcActionText:Ut.Z,NcActionSeparator:ee.Z,NcAvatar:_.Z,Tune:se,SharingEntryQuickShareSelect:ge},mixins:[Wt,Rt],props:{canReshare:{type:Boolean,default:!0},index:{type:Number,default:null}},data:()=>({copySuccess:!0,copied:!1,pending:!1,ExternalLegacyLinkActions:OCA.Sharing.ExternalLinkActions.state,ExternalShareActions:OCA.Sharing.ExternalShareActions.state}),computed:{title(){if(this.share&&this.share.id){if(!this.isShareOwner&&this.share.ownerDisplayName)return this.isEmailShareType?t("files_sharing","{shareWith} by {initiator}",{shareWith:this.share.shareWith,initiator:this.share.ownerDisplayName}):t("files_sharing","Shared via link by {initiator}",{initiator:this.share.ownerDisplayName});if(this.share.label&&""!==this.share.label.trim())return this.isEmailShareType?t("files_sharing","Mail share ({label})",{label:this.share.label.trim()}):t("files_sharing","Share link ({label})",{label:this.share.label.trim()});if(this.isEmailShareType)return this.share.shareWith}return this.index>1?t("files_sharing","Share link ({index})",{index:this.index}):t("files_sharing","Share link")},subtitle(){return this.isEmailShareType&&this.title!==this.share.shareWith?this.share.shareWith:null},isPasswordProtected:{get(){return this.config.enforcePasswordForPublicLink||!!this.share.password},async set(t){F.ZP.set(this.share,"password",t?await xt():""),F.ZP.set(this.share,"newPassword",this.share.password)}},passwordExpirationTime(){if(null===this.share.passwordExpirationTime)return null;const t=moment(this.share.passwordExpirationTime);return!(t.diff(moment())<0)&&t.fromNow()},isTalkEnabled:()=>void 0!==OC.appswebroots.spreed,isPasswordProtectedByTalkAvailable(){return this.isPasswordProtected&&this.isTalkEnabled},isPasswordProtectedByTalk:{get(){return this.share.sendPasswordByTalk},async set(t){this.share.sendPasswordByTalk=t}},isEmailShareType(){return!!this.share&&this.share.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword)},pendingPassword(){return this.config.enableLinkPasswordByDefault&&this.share&&!this.share.id},pendingEnforcedPassword(){return this.config.enforcePasswordForPublicLink&&this.share&&!this.share.id},pendingExpirationDate(){return this.config.isDefaultExpireDateEnforced&&this.share&&!this.share.id},hasUnsavedPassword(){return void 0!==this.share.newPassword},shareLink(){return window.location.protocol+"//"+window.location.host+(0,j.generateUrl)("/s/")+this.share.token},actionsTooltip(){return t("files_sharing",'Actions for "{title}"',{title:this.title})},copyLinkTooltip(){return this.copied?this.copySuccess?"":t("files_sharing","Cannot copy, please copy the link manually"):t("files_sharing",'Copy public link of "{title}" to clipboard',{title:this.title})},externalLegacyLinkActions(){return this.ExternalLegacyLinkActions.actions},externalLinkActions(){return this.ExternalShareActions.actions.filter((t=>t.shareType.includes(rt.D.SHARE_TYPE_LINK)||t.shareType.includes(rt.D.SHARE_TYPE_EMAIL)))},isPasswordPolicyEnabled(){return"object"==typeof this.config.passwordPolicy},canChangeHideDownload(){return this.fileInfo.shareAttributes.some((t=>"download"===t.key&&"permissions"===t.scope&&!1===t.enabled))}},methods:{async onNewLinkShare(){if(this.loading)return;const e={share_type:rt.D.SHARE_TYPE_LINK};if(this.config.isDefaultExpireDateEnforced&&(e.expiration=this.formatDateToString(this.config.defaultExpirationDate)),this.config.enableLinkPasswordByDefault||this.config.enforcePasswordForPublicLink||this.config.isDefaultExpireDateEnforced){if(this.pending=!0,this.share&&!this.share.id){if(this.checkShare(this.share)){try{await this.pushNewLinkShare(this.share,!0)}catch(t){return this.pending=!1,_e.error(t),!1}return!0}return this.open=!0,OC.Notification.showTemporary(t("files_sharing","Error, please enter proper password and/or expiration date")),!1}(this.config.enableLinkPasswordByDefault||this.config.enforcePasswordForPublicLink)&&(e.password=await xt());const i=new lt(e),s=await new Promise((t=>{this.$emit("add:share",i,t)}));this.open=!1,this.pending=!1,s.open=!0}else{const t=new lt(e);await this.pushNewLinkShare(t)}},async pushNewLinkShare(e,i){try{if(this.loading)return!0;this.loading=!0,this.errors={};const s={path:(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),shareType:rt.D.SHARE_TYPE_LINK,password:e.password,expireDate:e.expireDate,attributes:JSON.stringify(this.fileInfo.shareAttributes)};_e.debug("Creating link share with options",s);const a=await this.createShare(s);let n;this.open=!1,_e.debug("Link share created",a),n=i?await new Promise((t=>{this.$emit("update:share",a,t)})):await new Promise((t=>{this.$emit("add:share",a,t)})),this.config.enforcePasswordForPublicLink||n.copyLink(),(0,ht.s$)(t("files_sharing","Link share created"))}catch(e){const i=e?.response?.data?.ocs?.meta?.message;if(!i)return(0,ht.x2)(t("files_sharing","Error while creating the share")),void _e.error(e);throw i.match(/password/i)?this.onSyncError("password",i):i.match(/date/i)?this.onSyncError("expireDate",i):this.onSyncError("pending",i),e}finally{this.loading=!1}},async copyLink(){try{await navigator.clipboard.writeText(this.shareLink),(0,ht.s$)(t("files_sharing","Link copied")),this.$refs.copyButton.$el.focus(),this.copySuccess=!0,this.copied=!0}catch(t){this.copySuccess=!1,this.copied=!0,_e.error(t)}finally{setTimeout((()=>{this.copySuccess=!1,this.copied=!1}),4e3)}},onPasswordChange(t){this.$set(this.share,"newPassword",t)},onPasswordDisable(){this.share.password="",this.$delete(this.share,"newPassword"),this.share.id&&this.queueUpdate("password")},onPasswordSubmit(){this.hasUnsavedPassword&&(this.share.password=this.share.newPassword.trim(),this.queueUpdate("password"))},onPasswordProtectedByTalkChange(){this.hasUnsavedPassword&&(this.share.password=this.share.newPassword.trim()),this.queueUpdate("sendPasswordByTalk","password")},onMenuClose(){this.onPasswordSubmit(),this.onNoteSubmit()},onCancel(){this.$emit("remove:share",this.share)}}},ve=Ce;var Ee=s(14909),ye={};ye.styleTagTransform=g(),ye.setAttributes=d(),ye.insert=c().bind(null,"head"),ye.domAPI=o(),ye.insertStyleElement=u(),n()(Ee.Z,ye),Ee.Z&&Ee.Z.locals&&Ee.Z.locals;const we={name:"SharingLinkList",components:{SharingEntryLink:(0,At.Z)(ve,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"sharing-entry sharing-entry__link",class:{"sharing-entry--share":t.share}},[e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":!0,"icon-class":t.isEmailShareType?"avatar-link-share icon-mail-white":"avatar-link-share icon-public-white"}}),t._v(" "),e("div",{staticClass:"sharing-entry__summary"},[e("div",{staticClass:"sharing-entry__desc"},[e("span",{staticClass:"sharing-entry__title",attrs:{title:t.title}},[t._v("\n\t\t\t\t"+t._s(t.title)+"\n\t\t\t")]),t._v(" "),t.subtitle?e("p",[t._v("\n\t\t\t\t"+t._s(t.subtitle)+"\n\t\t\t")]):t._e(),t._v(" "),t.share&&void 0!==t.share.permissions?e("SharingEntryQuickShareSelect",{attrs:{share:t.share,"file-info":t.fileInfo},on:{"open-sharing-details":function(e){return t.openShareDetailsForCustomSettings(t.share)}}}):t._e()],1),t._v(" "),t.share&&!t.isEmailShareType&&t.share.token?e("NcActions",{ref:"copyButton",staticClass:"sharing-entry__copy"},[e("NcActionButton",{attrs:{title:t.copyLinkTooltip,"aria-label":t.copyLinkTooltip,icon:t.copied&&t.copySuccess?"icon-checkmark-color":"icon-clippy"},on:{click:function(e){return e.preventDefault(),t.copyLink.apply(null,arguments)}}})],1):t._e()],1),t._v(" "),!t.pending&&(t.pendingPassword||t.pendingEnforcedPassword||t.pendingExpirationDate)?e("NcActions",{staticClass:"sharing-entry__actions",attrs:{"aria-label":t.actionsTooltip,"menu-align":"right",open:t.open},on:{"update:open":function(e){t.open=e},close:t.onCancel}},[t.errors.pending?e("NcActionText",{class:{error:t.errors.pending},attrs:{icon:"icon-error"}},[t._v("\n\t\t\t"+t._s(t.errors.pending)+"\n\t\t")]):e("NcActionText",{attrs:{icon:"icon-info"}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Please enter the following required information before creating the share"))+"\n\t\t")]),t._v(" "),t.pendingEnforcedPassword?e("NcActionText",{attrs:{icon:"icon-password"}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Password protection (enforced)"))+"\n\t\t")]):t.pendingPassword?e("NcActionCheckbox",{staticClass:"share-link-password-checkbox",attrs:{checked:t.isPasswordProtected,disabled:t.config.enforcePasswordForPublicLink||t.saving},on:{"update:checked":function(e){t.isPasswordProtected=e},uncheck:t.onPasswordDisable}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Password protection"))+"\n\t\t")]):t._e(),t._v(" "),t.pendingEnforcedPassword||t.share.password?e("NcActionInput",{staticClass:"share-link-password",attrs:{value:t.share.password,disabled:t.saving,required:t.config.enableLinkPasswordByDefault||t.config.enforcePasswordForPublicLink,minlength:t.isPasswordPolicyEnabled&&t.config.passwordPolicy.minLength,icon:"",autocomplete:"new-password"},on:{"update:value":function(e){return t.$set(t.share,"password",e)},submit:t.onNewLinkShare}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Enter a password"))+"\n\t\t")]):t._e(),t._v(" "),t.pendingExpirationDate?e("NcActionText",{attrs:{icon:"icon-calendar-dark"}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Expiration date (enforced)"))+"\n\t\t")]):t._e(),t._v(" "),t.pendingExpirationDate?e("NcActionInput",{staticClass:"share-link-expire-date",attrs:{disabled:t.saving,"is-native-picker":!0,"hide-label":!0,value:new Date(t.share.expireDate),type:"date",min:t.dateTomorrow,max:t.maxExpirationDateEnforced},on:{input:t.onExpirationChange}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Enter a date"))+"\n\t\t")]):t._e(),t._v(" "),e("NcActionButton",{attrs:{icon:"icon-checkmark"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.onNewLinkShare.apply(null,arguments)}}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Create share"))+"\n\t\t")]),t._v(" "),e("NcActionButton",{attrs:{icon:"icon-close"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.onCancel.apply(null,arguments)}}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Cancel"))+"\n\t\t")])],1):t.loading?e("div",{staticClass:"icon-loading-small sharing-entry__loading"}):e("NcActions",{staticClass:"sharing-entry__actions",attrs:{"aria-label":t.actionsTooltip,"menu-align":"right",open:t.open},on:{"update:open":function(e){t.open=e},close:t.onMenuClose}},[t.share?[t.share.canEdit&&t.canReshare?[e("NcActionButton",{attrs:{disabled:t.saving,"close-after-click":!0},on:{click:function(e){return e.preventDefault(),t.openSharingDetails.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Tune")]},proxy:!0}],null,!1,961531849)},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Customize link"))+"\n\t\t\t\t")])]:t._e(),t._v(" "),e("NcActionSeparator"),t._v(" "),t._l(t.externalLinkActions,(function(i){return e("ExternalShareAction",{key:i.id,attrs:{id:i.id,action:i,"file-info":t.fileInfo,share:t.share}})})),t._v(" "),t._l(t.externalLegacyLinkActions,(function(i,s){let{icon:a,url:n,name:r}=i;return e("NcActionLink",{key:s,attrs:{href:n(t.shareLink),icon:a,target:"_blank"}},[t._v("\n\t\t\t\t"+t._s(r)+"\n\t\t\t")])})),t._v(" "),!t.isEmailShareType&&t.canReshare?e("NcActionButton",{staticClass:"new-share-link",attrs:{icon:"icon-add"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.onNewLinkShare.apply(null,arguments)}}},[t._v("\n\t\t\t\t"+t._s(t.t("files_sharing","Add another link"))+"\n\t\t\t")]):t._e(),t._v(" "),t.share.canDelete?e("NcActionButton",{attrs:{icon:"icon-close",disabled:t.saving},on:{click:function(e){return e.preventDefault(),t.onDelete.apply(null,arguments)}}},[t._v("\n\t\t\t\t"+t._s(t.t("files_sharing","Unshare"))+"\n\t\t\t")]):t._e()]:t.canReshare?e("NcActionButton",{staticClass:"new-share-link",attrs:{title:t.t("files_sharing","Create a new share link"),"aria-label":t.t("files_sharing","Create a new share link"),icon:t.loading?"icon-loading-small":"icon-add"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.onNewLinkShare.apply(null,arguments)}}}):t._e()],2)],1)}),[],!1,null,"00b7425e",null).exports},mixins:[ct,Rt],props:{fileInfo:{type:Object,default:()=>{},required:!0},shares:{type:Array,default:()=>[],required:!0},canReshare:{type:Boolean,required:!0}},data:()=>({canLinkShare:(0,at.F)().files_sharing.public.enabled}),computed:{hasLinkShares(){return this.shares.filter((t=>t.type===this.SHARE_TYPES.SHARE_TYPE_LINK)).length>0},hasShares(){return this.shares.length>0}},methods:{addShare(t,e){this.shares.unshift(t),this.awaitForShare(t,e)},awaitForShare(t,e){this.$nextTick((()=>{const i=this.$children.find((e=>e.share===t));i&&e(i)}))},removeShare(t){const e=this.shares.findIndex((e=>e===t));this.shares.splice(e,1)}}},Se=(0,At.Z)(we,(function(){var t=this,e=t._self._c;return t.canLinkShare?e("ul",{staticClass:"sharing-link-list"},[!t.hasLinkShares&&t.canReshare?e("SharingEntryLink",{attrs:{"can-reshare":t.canReshare,"file-info":t.fileInfo},on:{"add:share":t.addShare}}):t._e(),t._v(" "),t.hasShares?t._l(t.shares,(function(i,s){return e("SharingEntryLink",{key:i.id,attrs:{index:t.shares.length>1?s+1:null,"can-reshare":t.canReshare,share:t.shares[s],"file-info":t.fileInfo},on:{"update:share":[function(e){return t.$set(t.shares,s,e)},function(e){return t.awaitForShare(...arguments)}],"add:share":function(e){return t.addShare(...arguments)},"remove:share":t.removeShare,"open-sharing-details":function(e){return t.openSharingDetails(i)}}})})):t._e()],2):t._e()}),[],!1,null,null,null).exports;var be=s(82652);const xe={name:"DotsHorizontalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ke=(0,At.Z)(xe,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon dots-horizontal-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Pe={name:"SharingEntry",components:{NcButton:be.Z,NcAvatar:_.Z,DotsHorizontalIcon:ke,NcSelect:C.Z,SharingEntryQuickShareSelect:ge},mixins:[Wt,Rt],computed:{title(){let e=this.share.shareWithDisplayName;return this.share.type===this.SHARE_TYPES.SHARE_TYPE_GROUP?e+=` (${t("files_sharing","group")})`:this.share.type===this.SHARE_TYPES.SHARE_TYPE_ROOM?e+=` (${t("files_sharing","conversation")})`:this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE?e+=` (${t("files_sharing","remote")})`:this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP?e+=` (${t("files_sharing","remote group")})`:this.share.type===this.SHARE_TYPES.SHARE_TYPE_GUEST&&(e+=` (${t("files_sharing","guest")})`),e},tooltip(){if(this.share.owner!==this.share.uidFileOwner){const e={user:this.share.shareWithDisplayName,owner:this.share.ownerDisplayName};return this.share.type===this.SHARE_TYPES.SHARE_TYPE_GROUP?t("files_sharing","Shared with the group {user} by {owner}",e):this.share.type===this.SHARE_TYPES.SHARE_TYPE_ROOM?t("files_sharing","Shared with the conversation {user} by {owner}",e):t("files_sharing","Shared with {user} by {owner}",e)}return null},hasStatus(){return this.share.type===this.SHARE_TYPES.SHARE_TYPE_USER&&"object"==typeof this.share.status&&!Array.isArray(this.share.status)}},methods:{onMenuClose(){this.onNoteSubmit()}}};var Te=s(39432),De={};De.styleTagTransform=g(),De.setAttributes=d(),De.insert=c().bind(null,"head"),De.domAPI=o(),De.insertStyleElement=u(),n()(Te.Z,De),Te.Z&&Te.Z.locals&&Te.Z.locals;const Re={name:"SharingList",components:{SharingEntry:(0,At.Z)(Pe,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"sharing-entry"},[e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":t.share.type!==t.SHARE_TYPES.SHARE_TYPE_USER,user:t.share.shareWith,"display-name":t.share.shareWithDisplayName,"menu-position":"left",url:t.share.shareWithAvatar}}),t._v(" "),e("div",{staticClass:"sharing-entry__summary"},[e(t.share.shareWithLink?"a":"div",{tag:"component",staticClass:"sharing-entry__summary__desc",attrs:{title:t.tooltip,"aria-label":t.tooltip,href:t.share.shareWithLink}},[e("span",[t._v(t._s(t.title)+"\n\t\t\t\t"),t.isUnique?t._e():e("span",{staticClass:"sharing-entry__summary__desc-unique"},[t._v(" ("+t._s(t.share.shareWithDisplayNameUnique)+")")]),t._v(" "),t.hasStatus&&t.share.status.message?e("small",[t._v("("+t._s(t.share.status.message)+")")]):t._e()])]),t._v(" "),e("SharingEntryQuickShareSelect",{attrs:{share:t.share,"file-info":t.fileInfo},on:{"open-sharing-details":function(e){return t.openShareDetailsForCustomSettings(t.share)}}})],1),t._v(" "),e("NcButton",{staticClass:"sharing-entry__action",attrs:{"aria-label":t.t("files_sharing","Open Sharing Details"),type:"tertiary"},on:{click:function(e){return t.openSharingDetails(t.share)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("DotsHorizontalIcon",{attrs:{size:20}})]},proxy:!0}])})],1)}),[],!1,null,"25ab69f2",null).exports},mixins:[ct,Rt],props:{fileInfo:{type:Object,default:()=>{},required:!0},shares:{type:Array,default:()=>[],required:!0}},computed:{hasShares(){return 0===this.shares.length},isUnique(){return t=>[...this.shares].filter((e=>t.type===this.SHARE_TYPES.SHARE_TYPE_USER&&t.shareWithDisplayName===e.shareWithDisplayName)).length<=1}}},Ie=(0,At.Z)(Re,(function(){var t=this,e=t._self._c;return e("ul",{staticClass:"sharing-sharee-list"},t._l(t.shares,(function(i){return e("SharingEntry",{key:i.id,attrs:{"file-info":t.fileInfo,share:i,"is-unique":t.isUnique(i)},on:{"open-sharing-details":function(e){return t.openSharingDetails(i)}}})})),1)}),[],!1,null,null,null).exports;var Ne=s(31352),Be=s(91847),Le=s(16972),Oe=s(60975),He=s(9359),Ye=s(19759);const Ue={name:"CircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ze=(0,At.Z)(Ue,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon circle-outline-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var Me=s(44893);const Ve={name:"EmailIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},$e=(0,At.Z)(Ve,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon email-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M20,8L12,13L4,8V6L12,11L20,6M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var We=s(90207),Fe=s(60186);const qe={name:"ShareCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},je=(0,At.Z)(qe,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon share-circle-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M14 16V13C10.39 13 7.81 14.43 6 17C6.72 13.33 8.94 9.73 14 9V6L19 11L14 16Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,ze={name:"AccountCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ge=(0,At.Z)(ze,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon account-circle-outline-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7.07,18.28C7.5,17.38 10.12,16.5 12,16.5C13.88,16.5 16.5,17.38 16.93,18.28C15.57,19.36 13.86,20 12,20C10.14,20 8.43,19.36 7.07,18.28M18.36,16.83C16.93,15.09 13.46,14.5 12,14.5C10.54,14.5 7.07,15.09 5.64,16.83C4.62,15.5 4,13.82 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,13.82 19.38,15.5 18.36,16.83M12,6C10.06,6 8.5,7.56 8.5,9.5C8.5,11.44 10.06,13 12,13C13.94,13 15.5,11.44 15.5,9.5C15.5,7.56 13.94,6 12,6M12,11A1.5,1.5 0 0,1 10.5,9.5A1.5,1.5 0 0,1 12,8A1.5,1.5 0 0,1 13.5,9.5A1.5,1.5 0 0,1 12,11Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Ke={name:"EyeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Qe=(0,At.Z)(Ke,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon eye-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var Je=s(20508),Xe=s(63198),ti=s(7290),ei=s(25108);const ii={name:"SharingDetailsTab",components:{NcAvatar:_.Z,NcButton:be.Z,NcInputField:Be.Z,NcPasswordField:Le.Z,NcDateTimePickerNative:Oe.Z,NcCheckboxRadioSwitch:He.Z,NcLoadingIcon:Ye.Z,CloseIcon:Me.Z,CircleIcon:Ze,EditIcon:le.Z,LinkIcon:We.Z,GroupIcon:Fe.Z,ShareIcon:je,UserIcon:Ge,UploadIcon:Je.Z,ViewIcon:Qe,MenuDownIcon:Xe.Z,MenuUpIcon:ti.Z,DotsHorizontalIcon:ke},mixins:[ct,Dt,Wt],props:{shareRequestValue:{type:Object,required:!1},fileInfo:{type:Object,required:!0},share:{type:Object,required:!0}},data:()=>({writeNoteToRecipientIsChecked:!1,sharingPermission:Vt.ALL.toString(),revertSharingPermission:Vt.ALL.toString(),setCustomPermissions:!1,passwordError:!1,advancedSectionAccordionExpanded:!1,bundledPermissions:Vt,isFirstComponentLoad:!0,test:!1,creating:!1}),computed:{title(){let e=t("files_sharing","Share with ");return this.share.type===this.SHARE_TYPES.SHARE_TYPE_USER?e+=this.share.shareWithDisplayName:this.share.type===this.SHARE_TYPES.SHARE_TYPE_LINK?e=t("files_sharing","Share link"):this.share.type===this.SHARE_TYPES.SHARE_TYPE_GROUP?e+=` (${t("files_sharing","group")})`:this.share.type===this.SHARE_TYPES.SHARE_TYPE_ROOM?e+=` (${t("files_sharing","conversation")})`:this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE?e+=` (${t("files_sharing","remote")})`:this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP?e+=` (${t("files_sharing","remote group")})`:this.share.type===this.SHARE_TYPES.SHARE_TYPE_GUEST&&(e+=` (${t("files_sharing","guest")})`),e},canEdit:{get(){return this.share.hasUpdatePermission},set(t){this.updateAtomicPermissions({isEditChecked:t})}},canCreate:{get(){return this.share.hasCreatePermission},set(t){this.updateAtomicPermissions({isCreateChecked:t})}},canDelete:{get(){return this.share.hasDeletePermission},set(t){this.updateAtomicPermissions({isDeleteChecked:t})}},canReshare:{get(){return this.share.hasSharePermission},set(t){this.updateAtomicPermissions({isReshareChecked:t})}},canDownload:{get(){return this.share.hasDownloadPermission},set(t){this.updateAtomicPermissions({isDownloadChecked:t})}},hasRead:{get(){return this.share.hasReadPermission},set(t){this.updateAtomicPermissions({isReadChecked:t})}},hasExpirationDate:{get(){return this.isValidShareAttribute(this.share.expireDate)},set(t){this.share.expireDate=t?this.formatDateToString(this.defaultExpiryDate):""}},isPasswordProtected:{get(){return this.config.enforcePasswordForPublicLink||!!this.share.password},async set(t){t?(this.share.password=await xt(),this.$set(this.share,"newPassword",this.share.password)):(this.share.password="",this.$delete(this.share,"newPassword"))}},isFolder(){return"dir"===this.fileInfo.type},isSetDownloadButtonVisible(){return this.isFolder||["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation"].includes(this.fileInfo.mimetype)},isPasswordEnforced(){return this.isPublicShare&&this.config.enforcePasswordForPublicLink},defaultExpiryDate(){return(this.isGroupShare||this.isUserShare)&&this.config.isDefaultInternalExpireDateEnabled?new Date(this.config.defaultInternalExpirationDate):this.isRemoteShare&&this.config.isDefaultRemoteExpireDateEnabled?new Date(this.config.defaultRemoteExpireDateEnabled):this.isPublicShare&&this.config.isDefaultExpireDateEnabled?new Date(this.config.defaultExpirationDate):new Date((new Date).setDate((new Date).getDate()+1))},isUserShare(){return this.share.type===this.SHARE_TYPES.SHARE_TYPE_USER},isGroupShare(){return this.share.type===this.SHARE_TYPES.SHARE_TYPE_GROUP},isNewShare(){return null===this.share.id||void 0===this.share.id},allowsFileDrop(){return!(!this.isFolder||!this.config.isPublicUploadEnabled||this.share.type!==this.SHARE_TYPES.SHARE_TYPE_LINK&&this.share.type!==this.SHARE_TYPES.SHARE_TYPE_EMAIL)},hasFileDropPermissions(){return this.share.permissions===this.bundledPermissions.FILE_DROP},shareButtonText(){return this.isNewShare?t("files_sharing","Save share"):t("files_sharing","Update share")},canSetEdit(){return this.fileInfo.sharePermissions&OC.PERMISSION_UPDATE||this.canEdit},canSetCreate(){return this.fileInfo.sharePermissions&OC.PERMISSION_CREATE||this.canCreate},canSetDelete(){return this.fileInfo.sharePermissions&OC.PERMISSION_DELETE||this.canDelete},canSetReshare(){return this.fileInfo.sharePermissions&OC.PERMISSION_SHARE||this.canReshare},canSetDownload(){return this.fileInfo.canDownload()||this.canDownload},hasUnsavedPassword(){return void 0!==this.share.newPassword},passwordExpirationTime(){if(!this.isValidShareAttribute(this.share.passwordExpirationTime))return null;const t=moment(this.share.passwordExpirationTime);return!(t.diff(moment())<0)&&t.fromNow()},isTalkEnabled:()=>void 0!==OC.appswebroots.spreed,isPasswordProtectedByTalkAvailable(){return this.isPasswordProtected&&this.isTalkEnabled},isPasswordProtectedByTalk:{get(){return this.share.sendPasswordByTalk},async set(t){this.share.sendPasswordByTalk=t}},isEmailShareType(){return!!this.share&&this.share.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPublicShare||!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword||void 0===OC.appswebroots.spreed)},canChangeHideDownload(){return this.fileInfo.shareAttributes.some((t=>"download"===t.key&&"permissions"===t.scope&&!1===t.enabled))},customPermissionsList(){const t={[Mt.READ]:this.t("files_sharing","Read"),[Mt.CREATE]:this.t("files_sharing","Create"),[Mt.UPDATE]:this.t("files_sharing","Edit"),[Mt.SHARE]:this.t("files_sharing","Share"),[Mt.DELETE]:this.t("files_sharing","Delete")};return[Mt.READ,Mt.CREATE,Mt.UPDATE,Mt.SHARE,Mt.DELETE].filter((t=>{return e=this.share.permissions,i=t,e!==Mt.NONE&&(e&i)===i;var e,i})).map(((e,i)=>0===i?t[e]:t[e].toLocaleLowerCase((0,Ne.G3)()))).join(", ")},advancedControlExpandedValue(){return this.advancedSectionAccordionExpanded?"true":"false"},errorPasswordLabel(){if(this.passwordError)return t("files_sharing","Password field can't be empty")}},watch:{setCustomPermissions(t){this.sharingPermission=t?"custom":this.revertSharingPermission}},beforeMount(){this.initializePermissions(),this.initializeAttributes(),ei.debug("shareSentIn",this.share),ei.debug("config",this.config)},mounted(){this.$refs.quickPermissions?.querySelector("input:checked")?.focus()},methods:{updateAtomicPermissions(){let{isReadChecked:t=this.hasRead,isEditChecked:e=this.canEdit,isCreateChecked:i=this.canCreate,isDeleteChecked:s=this.canDelete,isReshareChecked:a=this.canReshare,isDownloadChecked:n=this.canDownload}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=0|(t?Mt.READ:0)|(i?Mt.CREATE:0)|(s?Mt.DELETE:0)|(e?Mt.UPDATE:0)|(a?Mt.SHARE:0);this.share.permissions=r,this.share.hasDownloadPermission!==n&&this.$set(this.share,"hasDownloadPermission",n)},expandCustomPermissions(){this.advancedSectionAccordionExpanded||(this.advancedSectionAccordionExpanded=!0),this.toggleCustomPermissions()},toggleCustomPermissions(t){const e="custom"===this.sharingPermission;this.revertSharingPermission=e?"custom":t,this.setCustomPermissions=e},async initializeAttributes(){if(this.isNewShare)return this.isPasswordEnforced&&this.isPublicShare&&(this.$set(this.share,"newPassword",await xt()),this.advancedSectionAccordionExpanded=!0),this.isPublicShare&&this.config.isDefaultExpireDateEnabled?this.share.expireDate=this.config.defaultExpirationDate.toDateString():this.isRemoteShare&&this.config.isDefaultRemoteExpireDateEnabled?this.share.expireDate=this.config.defaultRemoteExpirationDateString.toDateString():this.config.isDefaultInternalExpireDateEnabled&&(this.share.expireDate=this.config.defaultInternalExpirationDate.toDateString()),void(this.isValidShareAttribute(this.share.expireDate)&&(this.advancedSectionAccordionExpanded=!0));!this.isValidShareAttribute(this.share.expireDate)&&this.isExpiryDateEnforced&&(this.hasExpirationDate=!0),(this.isValidShareAttribute(this.share.password)||this.isValidShareAttribute(this.share.expireDate)||this.isValidShareAttribute(this.share.label))&&(this.advancedSectionAccordionExpanded=!0)},handleShareType(){this.share.share_type&&(this.share.type=this.share.share_type),"shareType"in this.share&&(this.share.type=this.share.shareType)},handleDefaultPermissions(){if(this.isNewShare){const t=this.config.defaultPermissions;t===Vt.READ_ONLY||t===Vt.ALL?this.sharingPermission=t.toString():(this.sharingPermission="custom",this.share.permissions=t,this.advancedSectionAccordionExpanded=!0,this.setCustomPermissions=!0)}},handleCustomPermissions(){this.isNewShare||!this.hasCustomPermissions&&!this.share.setCustomPermissions?this.sharingPermission=this.share.permissions.toString():(this.sharingPermission="custom",this.advancedSectionAccordionExpanded=!0,this.setCustomPermissions=!0)},initializePermissions(){this.handleShareType(),this.handleDefaultPermissions(),this.handleCustomPermissions()},async saveShare(){const t=["permissions","attributes","note","expireDate"];this.isPublicShare&&t.push("label","password","hideDownload");const e=parseInt(this.sharingPermission);if(this.setCustomPermissions?this.updateAtomicPermissions():this.share.permissions=e,this.isFolder||this.share.permissions!==Vt.ALL||(this.share.permissions=Vt.ALL_FILE),this.writeNoteToRecipientIsChecked||(this.share.note=""),this.isPasswordProtected?this.hasUnsavedPassword&&this.isValidShareAttribute(this.share.newPassword)?(this.share.password=this.share.newPassword,this.$delete(this.share,"newPassword")):this.isPasswordEnforced&&!this.isValidShareAttribute(this.share.password)&&(this.passwordError=!0):this.share.password="",this.hasExpirationDate||(this.share.expireDate=""),this.isNewShare){const t={permissions:this.share.permissions,shareType:this.share.type,shareWith:this.share.shareWith,attributes:this.share.attributes,note:this.share.note,fileInfo:this.fileInfo};this.hasExpirationDate&&(t.expireDate=this.share.expireDate),this.isPasswordProtected&&(t.password=this.share.password),this.creating=!0;const e=await this.addShare(t,this.fileInfo);this.creating=!1,this.share=e,this.$emit("add:share",this.share)}else this.queueUpdate(...t);this.$emit("close-sharing-details")},async addShare(t,e){ei.debug("Adding a new share from the input for",t);try{const i=(e.path+"/"+e.name).replace("//","/");return await this.createShare({path:i,shareType:t.shareType,shareWith:t.shareWith,permissions:t.permissions,attributes:JSON.stringify(e.shareAttributes),...t.note?{note:t.note}:{},...t.password?{password:t.password}:{},...t.expireDate?{expireDate:t.expireDate}:{}})}catch(t){ei.error("Error while adding new share",t)}},async removeShare(){await this.onDelete(),this.$emit("close-sharing-details")},onPasswordChange(t){this.passwordError=!this.isValidShareAttribute(t),this.$set(this.share,"newPassword",t)},onPasswordProtectedByTalkChange(){this.hasUnsavedPassword&&(this.share.password=this.share.newPassword.trim()),this.queueUpdate("sendPasswordByTalk","password")},isValidShareAttribute:t=>![null,void 0].includes(t)&&t.trim().length>0,getShareTypeIcon(t){switch(t){case this.SHARE_TYPES.SHARE_TYPE_LINK:return We.Z;case this.SHARE_TYPES.SHARE_TYPE_GUEST:return Ge;case this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP:case this.SHARE_TYPES.SHARE_TYPE_GROUP:return Fe.Z;case this.SHARE_TYPES.SHARE_TYPE_EMAIL:return $e;case this.SHARE_TYPES.SHARE_TYPE_CIRCLE:return Ze;case this.SHARE_TYPES.SHARE_TYPE_ROOM:case this.SHARE_TYPES.SHARE_TYPE_DECK:case this.SHARE_TYPES.SHARE_TYPE_SCIENCEMESH:return je;default:return null}}}};var si=s(35995),ai={};ai.styleTagTransform=g(),ai.setAttributes=d(),ai.insert=c().bind(null,"head"),ai.domAPI=o(),ai.insertStyleElement=u(),n()(si.Z,ai),si.Z&&si.Z.locals&&si.Z.locals;const ni=(0,At.Z)(ii,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"sharingTabDetailsView"},[e("div",{staticClass:"sharingTabDetailsView__header"},[e("span",[t.isUserShare?e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":t.share.shareType!==t.SHARE_TYPES.SHARE_TYPE_USER,user:t.share.shareWith,"display-name":t.share.shareWithDisplayName,"menu-position":"left",url:t.share.shareWithAvatar}}):t._e(),t._v(" "),e(t.getShareTypeIcon(t.share.type),{tag:"component",attrs:{size:32}})],1),t._v(" "),e("span",[e("h1",[t._v(t._s(t.title))])])]),t._v(" "),e("div",{staticClass:"sharingTabDetailsView__wrapper"},[e("div",{ref:"quickPermissions",staticClass:"sharingTabDetailsView__quick-permissions"},[e("div",[e("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,checked:t.sharingPermission,value:t.bundledPermissions.READ_ONLY.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(e){t.sharingPermission=e},t.toggleCustomPermissions]},scopedSlots:t._u([{key:"icon",fn:function(){return[e("ViewIcon",{attrs:{size:20}})]},proxy:!0}])},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","View only"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,checked:t.sharingPermission,value:t.bundledPermissions.ALL.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(e){t.sharingPermission=e},t.toggleCustomPermissions]},scopedSlots:t._u([{key:"icon",fn:function(){return[e("EditIcon",{attrs:{size:20}})]},proxy:!0}])},[t.allowsFileDrop?[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Allow upload and editing"))+"\n\t\t\t\t\t")]:[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Allow editing"))+"\n\t\t\t\t\t")]],2),t._v(" "),t.allowsFileDrop?e("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,checked:t.sharingPermission,value:t.bundledPermissions.FILE_DROP.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(e){t.sharingPermission=e},t.toggleCustomPermissions]},scopedSlots:t._u([{key:"icon",fn:function(){return[e("UploadIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1083194048)},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","File drop"))+"\n\t\t\t\t\t"),e("small",{staticClass:"subline"},[t._v(t._s(t.t("files_sharing","Upload only")))])]):t._e(),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,checked:t.sharingPermission,value:"custom",name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(e){t.sharingPermission=e},t.expandCustomPermissions]},scopedSlots:t._u([{key:"icon",fn:function(){return[e("DotsHorizontalIcon",{attrs:{size:20}})]},proxy:!0}])},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Custom permissions"))+"\n\t\t\t\t\t"),e("small",{staticClass:"subline"},[t._v(t._s(t.customPermissionsList))])])],1)]),t._v(" "),e("div",{staticClass:"sharingTabDetailsView__advanced-control"},[e("NcButton",{attrs:{id:"advancedSectionAccordionAdvancedControl",type:"tertiary",alignment:"end-reverse","aria-controls":"advancedSectionAccordionAdvanced","aria-expanded":t.advancedControlExpandedValue},on:{click:function(e){t.advancedSectionAccordionExpanded=!t.advancedSectionAccordionExpanded}},scopedSlots:t._u([{key:"icon",fn:function(){return[t.advancedSectionAccordionExpanded?e("MenuUpIcon"):e("MenuDownIcon")]},proxy:!0}])},[t._v("\n\t\t\t\t"+t._s(t.t("files_sharing","Advanced settings"))+"\n\t\t\t\t")])],1),t._v(" "),t.advancedSectionAccordionExpanded?e("div",{staticClass:"sharingTabDetailsView__advanced",attrs:{id:"advancedSectionAccordionAdvanced","aria-labelledby":"advancedSectionAccordionAdvancedControl",role:"region"}},[e("section",[t.isPublicShare?e("NcInputField",{attrs:{value:t.share.label,type:"text",label:t.t("files_sharing","Share label")},on:{"update:value":function(e){return t.$set(t.share,"label",e)}}}):t._e(),t._v(" "),t.isPublicShare?[e("NcCheckboxRadioSwitch",{attrs:{checked:t.isPasswordProtected,disabled:t.isPasswordEnforced},on:{"update:checked":function(e){t.isPasswordProtected=e}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Set password"))+"\n\t\t\t\t\t")]),t._v(" "),t.isPasswordProtected?e("NcPasswordField",{attrs:{value:t.hasUnsavedPassword?t.share.newPassword:"",error:t.passwordError,"helper-text":t.errorPasswordLabel,required:t.isPasswordEnforced,label:t.t("files_sharing","Password")},on:{"update:value":t.onPasswordChange}}):t._e(),t._v(" "),t.isEmailShareType&&t.passwordExpirationTime?e("span",{attrs:{icon:"icon-info"}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Password expires {passwordExpirationTime}",{passwordExpirationTime:t.passwordExpirationTime}))+"\n\t\t\t\t\t")]):t.isEmailShareType&&null!==t.passwordExpirationTime?e("span",{attrs:{icon:"icon-error"}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Password expired"))+"\n\t\t\t\t\t")]):t._e()]:t._e(),t._v(" "),t.canTogglePasswordProtectedByTalkAvailable?e("NcCheckboxRadioSwitch",{attrs:{checked:t.isPasswordProtectedByTalk},on:{"update:checked":[function(e){t.isPasswordProtectedByTalk=e},t.onPasswordProtectedByTalkChange]}},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Video verification"))+"\n\t\t\t\t")]):t._e(),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:t.hasExpirationDate,disabled:t.isExpiryDateEnforced},on:{"update:checked":function(e){t.hasExpirationDate=e}}},[t._v("\n\t\t\t\t\t"+t._s(t.isExpiryDateEnforced?t.t("files_sharing","Expiration date (enforced)"):t.t("files_sharing","Set expiration date"))+"\n\t\t\t\t")]),t._v(" "),t.hasExpirationDate?e("NcDateTimePickerNative",{attrs:{id:"share-date-picker",value:new Date(t.share.expireDate??t.dateTomorrow),min:t.dateTomorrow,max:t.maxExpirationDateEnforced,"hide-label":!0,placeholder:t.t("files_sharing","Expiration date"),type:"date"},on:{input:t.onExpirationChange}}):t._e(),t._v(" "),t.isPublicShare?e("NcCheckboxRadioSwitch",{attrs:{disabled:t.canChangeHideDownload,checked:t.share.hideDownload},on:{"update:checked":[function(e){return t.$set(t.share,"hideDownload",e)},function(e){return t.queueUpdate("hideDownload")}]}},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Hide download"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.isPublicShare?t._e():e("NcCheckboxRadioSwitch",{attrs:{disabled:!t.canSetDownload,checked:t.canDownload},on:{"update:checked":function(e){t.canDownload=e}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Allow download"))+"\n\t\t\t\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:t.writeNoteToRecipientIsChecked},on:{"update:checked":function(e){t.writeNoteToRecipientIsChecked=e}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Note to recipient"))+"\n\t\t\t\t")]),t._v(" "),t.writeNoteToRecipientIsChecked?[e("label",{attrs:{for:"share-note-textarea"}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Enter a note for the share recipient"))+"\n\t\t\t\t\t")]),t._v(" "),e("textarea",{attrs:{id:"share-note-textarea"},domProps:{value:t.share.note},on:{input:function(e){t.share.note=e.target.value}}})]:t._e(),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:t.setCustomPermissions},on:{"update:checked":function(e){t.setCustomPermissions=e}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Custom permissions"))+"\n\t\t\t\t")]),t._v(" "),t.setCustomPermissions?e("section",{staticClass:"custom-permissions-group"},[e("NcCheckboxRadioSwitch",{attrs:{disabled:!t.allowsFileDrop&&t.share.type===t.SHARE_TYPES.SHARE_TYPE_LINK,checked:t.hasRead},on:{"update:checked":function(e){t.hasRead=e}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Read"))+"\n\t\t\t\t\t")]),t._v(" "),t.isFolder?e("NcCheckboxRadioSwitch",{attrs:{disabled:!t.canSetCreate,checked:t.canCreate},on:{"update:checked":function(e){t.canCreate=e}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Create"))+"\n\t\t\t\t\t")]):t._e(),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{disabled:!t.canSetEdit,checked:t.canEdit},on:{"update:checked":function(e){t.canEdit=e}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Edit"))+"\n\t\t\t\t\t")]),t._v(" "),t.config.isResharingAllowed&&t.share.type!==t.SHARE_TYPES.SHARE_TYPE_LINK?e("NcCheckboxRadioSwitch",{attrs:{disabled:!t.canSetReshare,checked:t.canReshare},on:{"update:checked":function(e){t.canReshare=e}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Share"))+"\n\t\t\t\t\t")]):t._e(),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{disabled:!t.canSetDelete,checked:t.canDelete},on:{"update:checked":function(e){t.canDelete=e}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Delete"))+"\n\t\t\t\t\t")])],1):t._e(),t._v(" "),e("div",{staticClass:"sharingTabDetailsView__delete"},[t.isNewShare?t._e():e("NcButton",{attrs:{"aria-label":t.t("files_sharing","Delete share"),disabled:!1,readonly:!1,type:"tertiary"},on:{click:function(e){return e.preventDefault(),t.removeShare.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("CloseIcon",{attrs:{size:16}})]},proxy:!0}],null,!1,2746485232)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Delete share"))+"\n\t\t\t\t\t")])],1)],2)]):t._e()]),t._v(" "),e("div",{staticClass:"sharingTabDetailsView__footer"},[e("div",{staticClass:"button-group"},[e("NcButton",{on:{click:function(e){return t.$emit("close-sharing-details")}}},[t._v("\n\t\t\t\t"+t._s(t.t("files_sharing","Cancel"))+"\n\t\t\t")]),t._v(" "),e("NcButton",{attrs:{type:"primary"},on:{click:t.saveShare},scopedSlots:t._u([t.creating?{key:"icon",fn:function(){return[e("NcLoadingIcon")]},proxy:!0}:null],null,!0)},[t._v("\n\t\t\t\t"+t._s(t.shareButtonText)+"\n\t\t\t\t")])],1)])])}),[],!1,null,"23095618",null).exports;var ri=s(25108);const oi={name:"SharingTab",components:{NcAvatar:_.Z,CollectionList:it,SharingEntryInternal:vt,SharingEntrySimple:gt,SharingInherited:Xt,SharingInput:Ot,SharingLinkList:Se,SharingList:Ie,SharingDetailsTab:ni},mixins:[ct],data:()=>({config:new nt,deleteEvent:null,error:"",expirationInterval:null,loading:!0,fileInfo:null,reshare:null,sharedWithMe:{},shares:[],linkShares:[],sections:OCA.Sharing.ShareTabSections.getSections(),projectsEnabled:(0,st.j)("core","projects_enabled",!1),showSharingDetailsView:!1,shareDetailsData:{},returnFocusElement:null}),computed:{isSharedWithMe(){return Object.keys(this.sharedWithMe).length>0},canReshare(){return!!(this.fileInfo.permissions&OC.PERMISSION_SHARE)||!!(this.reshare&&this.reshare.hasSharePermission&&this.config.isResharingAllowed)}},methods:{async update(t){this.fileInfo=t,this.resetState(),this.getShares()},async getShares(){try{this.loading=!0;const t=(0,j.generateOcsUrl)("apps/files_sharing/api/v1/shares"),e="json",i=(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),s=q.Z.get(t,{params:{format:e,path:i,reshares:!0}}),a=q.Z.get(t,{params:{format:e,path:i,shared_with_me:!0}}),[n,r]=await Promise.all([s,a]);this.loading=!1,this.processSharedWithMe(r),this.processShares(n)}catch(e){e.response.data?.ocs?.meta?.message?this.error=e.response.data.ocs.meta.message:this.error=t("files_sharing","Unable to load the shares list"),this.loading=!1,ri.error("Error loading the shares list",e)}},resetState(){clearInterval(this.expirationInterval),this.loading=!0,this.error="",this.sharedWithMe={},this.shares=[],this.linkShares=[],this.showSharingDetailsView=!1,this.shareDetailsData={}},updateExpirationSubtitle(e){const i=moment(e.expireDate).unix();this.$set(this.sharedWithMe,"subtitle",t("files_sharing","Expires {relativetime}",{relativetime:OC.Util.relativeModifiedDate(1e3*i)})),moment().unix()>i&&(clearInterval(this.expirationInterval),this.$set(this.sharedWithMe,"subtitle",t("files_sharing","this share just expired.")))},processShares(t){let{data:e}=t;if(e.ocs&&e.ocs.data&&e.ocs.data.length>0){const t=e.ocs.data.map((t=>new lt(t))).sort(((t,e)=>e.createdTime-t.createdTime));this.linkShares=t.filter((t=>t.type===this.SHARE_TYPES.SHARE_TYPE_LINK||t.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL)),this.shares=t.filter((t=>t.type!==this.SHARE_TYPES.SHARE_TYPE_LINK&&t.type!==this.SHARE_TYPES.SHARE_TYPE_EMAIL)),ri.debug("Processed",this.linkShares.length,"link share(s)"),ri.debug("Processed",this.shares.length,"share(s)")}},processSharedWithMe(e){let{data:i}=e;if(i.ocs&&i.ocs.data&&i.ocs.data[0]){const e=new lt(i),s=function(e){return e.type===rt.D.SHARE_TYPE_GROUP?t("files_sharing","Shared with you and the group {group} by {owner}",{group:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===rt.D.SHARE_TYPE_CIRCLE?t("files_sharing","Shared with you and {circle} by {owner}",{circle:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===rt.D.SHARE_TYPE_ROOM?e.shareWithDisplayName?t("files_sharing","Shared with you and the conversation {conversation} by {owner}",{conversation:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):t("files_sharing","Shared with you in a conversation by {owner}",{owner:e.ownerDisplayName},void 0,{escape:!1}):t("files_sharing","Shared with you by {owner}",{owner:e.ownerDisplayName},void 0,{escape:!1})}(e),a=e.ownerDisplayName,n=e.owner;this.sharedWithMe={displayName:a,title:s,user:n},this.reshare=e,e.expireDate&&moment(e.expireDate).unix()>moment().unix()&&(this.updateExpirationSubtitle(e),this.expirationInterval=setInterval(this.updateExpirationSubtitle,1e4,e))}else this.fileInfo&&void 0!==this.fileInfo.shareOwnerId&&this.fileInfo.shareOwnerId!==OC.currentUser&&(this.sharedWithMe={displayName:this.fileInfo.shareOwner,title:t("files_sharing","Shared with you by {owner}",{owner:this.fileInfo.shareOwner},void 0,{escape:!1}),user:this.fileInfo.shareOwnerId})},addShare(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};t.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL?this.linkShares.unshift(t):this.shares.unshift(t),this.awaitForShare(t,e)},removeShare(t){const e=t.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL||t.type===this.SHARE_TYPES.SHARE_TYPE_LINK?this.linkShares:this.shares,i=e.findIndex((e=>e.id===t.id));-1!==i&&e.splice(i,1)},awaitForShare(t,e){this.$nextTick((()=>{let i=this.$refs.shareList;t.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL&&(i=this.$refs.linkShareList);const s=i.$children.find((e=>e.share===t));s&&e(s)}))},toggleShareDetailsView(t){if(!this.showSharingDetailsView)if(Array.from(document.activeElement.classList).some((t=>t.startsWith("action-")))){const t=document.activeElement.closest('[role="menu"]')?.id;this.returnFocusElement=document.querySelector(`[aria-controls="${t}"]`)}else this.returnFocusElement=document.activeElement;t&&(this.shareDetailsData=t),this.showSharingDetailsView=!this.showSharingDetailsView,this.showSharingDetailsView||this.$nextTick((()=>{this.returnFocusElement?.focus(),this.returnFocusElement=null}))}}},li=oi;var ci=s(86133),hi={};hi.styleTagTransform=g(),hi.setAttributes=d(),hi.insert=c().bind(null,"head"),hi.domAPI=o(),hi.insertStyleElement=u(),n()(ci.Z,hi),ci.Z&&ci.Z.locals&&ci.Z.locals;const di=(0,At.Z)(li,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"sharingTab",class:{"icon-loading":t.loading}},[t.error?e("div",{staticClass:"emptycontent",class:{emptyContentWithSections:t.sections.length>0}},[e("div",{staticClass:"icon icon-error"}),t._v(" "),e("h2",[t._v(t._s(t.error))])]):t._e(),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.showSharingDetailsView,expression:"!showSharingDetailsView"}],staticClass:"sharingTab__content"},[e("ul",[t.isSharedWithMe?e("SharingEntrySimple",t._b({staticClass:"sharing-entry__reshare",scopedSlots:t._u([{key:"avatar",fn:function(){return[e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{user:t.sharedWithMe.user,"display-name":t.sharedWithMe.displayName}})]},proxy:!0}],null,!1,3197855346)},"SharingEntrySimple",t.sharedWithMe,!1)):t._e()],1),t._v(" "),t.loading?t._e():e("SharingInput",{attrs:{"can-reshare":t.canReshare,"file-info":t.fileInfo,"link-shares":t.linkShares,reshare:t.reshare,shares:t.shares},on:{"open-sharing-details":t.toggleShareDetailsView}}),t._v(" "),t.loading?t._e():e("SharingLinkList",{ref:"linkShareList",attrs:{"can-reshare":t.canReshare,"file-info":t.fileInfo,shares:t.linkShares},on:{"open-sharing-details":t.toggleShareDetailsView}}),t._v(" "),t.loading?t._e():e("SharingList",{ref:"shareList",attrs:{shares:t.shares,"file-info":t.fileInfo},on:{"open-sharing-details":t.toggleShareDetailsView}}),t._v(" "),t.canReshare&&!t.loading?e("SharingInherited",{attrs:{"file-info":t.fileInfo}}):t._e(),t._v(" "),e("SharingEntryInternal",{attrs:{"file-info":t.fileInfo}}),t._v(" "),t.projectsEnabled&&t.fileInfo?e("CollectionList",{attrs:{id:`${t.fileInfo.id}`,type:"file",name:t.fileInfo.name}}):t._e()],1),t._v(" "),t._l(t.sections,(function(i,s){return e("div",{directives:[{name:"show",rawName:"v-show",value:!t.showSharingDetailsView,expression:"!showSharingDetailsView"}],key:s,ref:"section-"+s,refInFor:!0,staticClass:"sharingTab__additionalContent"},[e(i(t.$refs["section-"+s],t.fileInfo),{tag:"component",attrs:{"file-info":t.fileInfo}})],1)})),t._v(" "),t.showSharingDetailsView?e("SharingDetailsTab",{attrs:{"file-info":t.shareDetailsData.fileInfo,share:t.shareDetailsData.share},on:{"close-sharing-details":t.toggleShareDetailsView,"add:share":t.addShare,"remove:share":t.removeShare}}):t._e()],2)}),[],!1,null,"a65c443a",null).exports},81488:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M15.4%2016.6L10.8%2012l4.6-4.6L14%206l-6%206%206%206%201.4-1.4z%27/%3e%3c/svg%3e"},34868:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M18.4%207.4L17%206l-6%206%206%206%201.4-1.4-4.6-4.6%204.6-4.6m-6%200L11%206l-6%206%206%206%201.4-1.4L7.8%2012l4.6-4.6z%27/%3e%3c/svg%3e"},37059:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M5.6%207.4L7%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6m6%200L13%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6z%27/%3e%3c/svg%3e"},75701:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M8.6%2016.6l4.6-4.6-4.6-4.6L10%206l6%206-6%206-1.4-1.4z%27/%3e%3c/svg%3e"}}]); //# sourceMappingURL=5709-5709.js.map?v=e5b699db68a7b343455c