photos/js/photos-node_modules_vue-mat...

3 lines
26 KiB
JavaScript

/*! For license information please see photos-node_modules_vue-material-design-icons_PackageVariant_vue-node_modules_vue-material-design-ic-4e283b.js.LICENSE.txt */
"use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["node_modules_vue-material-design-icons_PackageVariant_vue-node_modules_vue-material-design-ic-4e283b"],{66951:(t,e,n)=>{n.d(e,{Z:()=>u});var i=n(59537),a=n(94236),o=n(77958),s=n(3301),l=n(81067),r=n(2161),c=n(80351),d=n.n(c);var p=n(32114),h=n(69363),f=n(25108);const u={name:"FetchFilesMixin",mixins:[h.Z],data:()=>({errorFetchingFiles:null,loadingFiles:!1,doneFetchingFiles:!1,semaphore:new p.Z(30),fetchSemaphore:new p.Z(1),semaphoreSymbol:null,fetchedFileIds:[]}),watch:{$route(){this.resetFetchFilesState()}},methods:{async fetchFiles(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.doneFetchingFiles&&!c||this.loadingFiles)return[];const p=await this.semaphore.acquire((()=>0),"fetchFiles"),h=await this.fetchSemaphore.acquire();try{this.errorFetchingFiles=null,this.loadingFiles=!0,this.semaphoreSymbol=p;const c=200,h=await async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e={firstResult:0,nbResults:200,mimesType:s.Oj,onThisDay:!1,onlyFavorites:!1,...e};const n="/files/".concat((0,o.ts)().uid),i=e.mimesType.reduce(((t,e)=>"".concat(t,"\n\t\t<d:eq>\n\t\t\t<d:prop>\n\t\t\t\t<d:getcontenttype/>\n\t\t\t</d:prop>\n\t\t\t<d:literal>").concat(e,"</d:literal>\n\t\t</d:eq>\n\t")),""),c=e.onlyFavorites?"<d:eq>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:favorite/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:literal>1</d:literal>\n\t\t\t</d:eq>":"",p=e.onThisDay?"<d:or>".concat(Array(20).fill(1).map(((t,e)=>{const n=d()(Date.now()).startOf("day").subtract(3,"d").subtract(e+1,"y"),i=d()(Date.now()).endOf("day").add(3,"d").subtract(e+1,"y");return"<d:and>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified />\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>".concat(n.format(d().defaultFormatUtc),"</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t\t<d:lt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified />\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>").concat(i.format(d().defaultFormatUtc),"</d:literal>\n\t\t\t\t</d:lt>\n\t\t\t</d:and>")})).join("\n"),"</d:or>"):"";return e=Object.assign({method:"SEARCH",headers:{"content-Type":"text/xml"},data:'<?xml version="1.0" encoding="UTF-8"?>\n\t\t\t<d:searchrequest xmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t\t<d:basicsearch>\n\t\t\t\t\t<d:select>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t'.concat(r.N,"\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t</d:select>\n\t\t\t\t\t<d:from>\n\t\t\t\t\t\t<d:scope>\n\t\t\t\t\t\t\t<d:href>").concat(n,"/").concat(t,"</d:href>\n\t\t\t\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t\t\t\t</d:scope>\n\t\t\t\t\t</d:from>\n\t\t\t\t\t<d:where>\n\t\t\t\t\t\t<d:and>\n\t\t\t\t\t\t\t<d:or>\n\t\t\t\t\t\t\t\t").concat(i,"\n\t\t\t\t\t\t\t</d:or>\n\t\t\t\t\t\t\t").concat(c,"\n\t\t\t\t\t\t\t").concat(p,"\n\t\t\t\t\t\t</d:and>\n\t\t\t\t\t</d:where>\n\t\t\t\t\t<d:orderby>\n\t\t\t\t\t\t<d:order>\n\t\t\t\t\t\t\t<d:prop><d:getlastmodified/></d:prop>\n\t\t\t\t\t\t\t<d:descending/>\n\t\t\t\t\t\t</d:order>\n\t\t\t\t\t</d:orderby>\n\t\t\t\t\t<d:limit>\n\t\t\t\t\t\t<d:nresults>").concat(e.nbResults,"</d:nresults>\n\t\t\t\t\t\t<ns:firstresult>").concat(e.firstResult,"</ns:firstresult>\n\t\t\t\t\t</d:limit>\n\t\t\t\t</d:basicsearch>\n\t\t\t</d:searchrequest>"),deep:!0,details:!0},e),(await l.ZP.getDirectoryContents("",e)).data.map((t=>(0,a.AX)(t)))}(t,{firstResult:this.fetchedFileIds.length,nbResults:c,...e,signal:this.abortController.signal});h.length!==c&&(this.doneFetchingFiles=!0);const f=h.map((t=>t.fileid)).filter((t=>!this.fetchedFileIds.includes(t)));return this.fetchedFileIds.push(...f.map((t=>t.toString())).filter((t=>!n.includes(t)))),this.$store.dispatch("appendFiles",h),i.Z.debug("[FetchFilesMixin] Fetched ".concat(f.length," new files: "),f),f}catch(t){var u;if(404===(null===(u=t.response)||void 0===u?void 0:u.status))this.errorFetchingFiles=404;else{if("ERR_CANCELED"===t.code)return[];this.errorFetchingFiles=t}i.Z.error("Error fetching files",{error:t}),f.error(t)}finally{this.loadingFiles=!1,this.semaphore.release(p),this.fetchSemaphore.release(h)}return[]},resetFetchFilesState(){this.doneFetchingFiles=!1,this.errorFetchingFiles=null,this.loadingFiles=!1,this.fetchedFileIds=[]}}}},96899:(t,e,n)=>{n.d(e,{Z:()=>l});var i=n(87537),a=n.n(i),o=n(23645),s=n.n(o)()(a());s.push([t.id,".face-list[data-v-d74aaf20]{display:flex;flex-direction:row;height:350px;flex-wrap:wrap;padding:12px}.loader[data-v-d74aaf20]{margin:25% auto}","",{version:3,sources:["webpack://./src/components/FaceMergeForm.vue"],names:[],mappings:"AAEA,4BACC,YAAA,CACA,kBAAA,CACA,YAAA,CACA,cAAA,CACA,YAAA,CAGD,yBACC,eAAA",sourcesContent:['$sizes: ("400": ("count": 3, "marginTop": 66, "marginW": 8), "700": ("count": 4, "marginTop": 66, "marginW": 8), "1024": ("count": 5, "marginTop": 66, "marginW": 44), "1280": ("count": 4, "marginTop": 66, "marginW": 44), "1440": ("count": 5, "marginTop": 88, "marginW": 66), "1600": ("count": 6, "marginTop": 88, "marginW": 66), "2048": ("count": 7, "marginTop": 88, "marginW": 66), "2560": ("count": 8, "marginTop": 88, "marginW": 88), "3440": ("count": 9, "marginTop": 88, "marginW": 88), "max": ("count": 10, "marginTop": 88, "marginW": 88));\n\n.face-list {\n\tdisplay: flex;\n\tflex-direction: row;\n\theight: 350px;\n\tflex-wrap: wrap;\n\tpadding: 12px;\n}\n\n.loader {\n\tmargin: 25% auto;\n}\n'],sourceRoot:""}]);const l=s},92382:(t,e,n)=>{n.d(e,{Z:()=>l});var i=n(87537),a=n.n(i),o=n(23645),s=n.n(o)()(a());s.push([t.id,".face[data-v-29c0437d]{display:flex;flex-direction:column}.face__empty[data-v-29c0437d]{display:flex;flex-direction:column;align-items:center}.face__empty__button[data-v-29c0437d]{margin-top:32px}.face__header[data-v-29c0437d]{display:flex;min-height:60px;align-items:center;justify-content:space-between;position:-webkit-sticky;position:sticky;z-index:3;background:var(--color-main-background);padding:0 64px}@media only screen and (max-width: 1020px){.face__header[data-v-29c0437d]{padding:0;padding-left:64px}}.face__header__left[data-v-29c0437d]{height:100%;display:flex;align-items:center}.face__header__title[data-v-29c0437d]{margin-left:10px}.face__header__title h2[data-v-29c0437d]{margin-bottom:0}.face__header__loader[data-v-29c0437d]{margin-left:32px}.face__header__actions[data-v-29c0437d]{display:flex;align-items:center}.face__header__actions button[data-v-29c0437d]{margin-left:16px}.face__photos[data-v-29c0437d]{margin-top:16px;height:100%;min-height:0;padding:0 64px}@media only screen and (max-width: 1020px){.face__photos[data-v-29c0437d]{padding:0}}.empty-content-with-illustration[data-v-29c0437d] .empty-content__icon{width:200px;height:200px}.empty-content-with-illustration[data-v-29c0437d] .empty-content__icon svg{width:200px;height:200px}.rename-form[data-v-29c0437d]{display:flex;flex-direction:row;align-items:center;height:70px;padding:16px}.rename-form input[data-v-29c0437d]{width:80%}","",{version:3,sources:["webpack://./src/views/FaceContent.vue"],names:[],mappings:"AAEA,uBACC,YAAA,CACA,qBAAA,CAEA,8BACC,YAAA,CACA,qBAAA,CACA,kBAAA,CAEA,sCACC,eAAA,CAKF,+BACC,YAAA,CACA,eAAA,CACA,kBAAA,CACA,6BAAA,CACA,uBAAA,CAAA,eAAA,CACA,SAAA,CACA,uCAAA,CACA,cAAA,CAEA,2CAVD,+BAWE,SAAA,CACA,iBAAA,CAAA,CAGD,qCACC,WAAA,CACA,YAAA,CACA,kBAAA,CAGD,sCACC,gBAAA,CACA,yCACC,eAAA,CAIF,uCACC,gBAAA,CAGD,wCACC,YAAA,CACA,kBAAA,CAEA,+CACC,gBAAA,CAKH,+BACC,eAAA,CACA,WAAA,CACA,YAAA,CACA,cAAA,CAEA,2CAND,+BAOE,SAAA,CAAA,CAKH,uEACC,WAAA,CACA,YAAA,CAEA,2EACC,WAAA,CACA,YAAA,CAIF,8BACC,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,WAAA,CACA,YAAA,CAEA,oCACC,SAAA",sourcesContent:['$sizes: ("400": ("count": 3, "marginTop": 66, "marginW": 8), "700": ("count": 4, "marginTop": 66, "marginW": 8), "1024": ("count": 5, "marginTop": 66, "marginW": 44), "1280": ("count": 4, "marginTop": 66, "marginW": 44), "1440": ("count": 5, "marginTop": 88, "marginW": 66), "1600": ("count": 6, "marginTop": 88, "marginW": 66), "2048": ("count": 7, "marginTop": 88, "marginW": 66), "2560": ("count": 8, "marginTop": 88, "marginW": 88), "3440": ("count": 9, "marginTop": 88, "marginW": 88), "max": ("count": 10, "marginTop": 88, "marginW": 88));\n\n.face {\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t&__empty {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\n\t\t&__button {\n\t\t\tmargin-top: 32px;\n\t\t}\n\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\tmin-height: 60px;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tposition: sticky;\n\t\tz-index: 3;\n\t\tbackground: var(--color-main-background);\n\t\tpadding: 0 64px;\n\n\t\t@media only screen and (max-width: 1020px) {\n\t\t\tpadding: 0;\n\t\t\tpadding-left: 64px;\n\t\t}\n\n\t\t&__left {\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t&__title {\n\t\t\tmargin-left: 10px;\n\t\t\th2 {\n\t\t\t\tmargin-bottom: 0;\n\t\t\t}\n\t\t}\n\n\t\t&__loader {\n\t\t\tmargin-left: 32px;\n\t\t}\n\n\t\t&__actions {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\tbutton {\n\t\t\t\tmargin-left: 16px;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__photos {\n\t\tmargin-top: 16px;\n\t\theight: 100%;\n\t\tmin-height: 0; // Prevent it from overflowing in a flex context.\n\t\tpadding: 0 64px;\n\n\t\t@media only screen and (max-width: 1020px) {\n\t\t\tpadding: 0;\n\t\t}\n\t}\n}\n\n.empty-content-with-illustration :deep .empty-content__icon {\n\twidth: 200px;\n\theight: 200px;\n\n\tsvg {\n\t\twidth: 200px;\n\t\theight: 200px;\n\t}\n}\n\n.rename-form {\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\theight: 70px;\n\tpadding: 16px;\n\n\tinput {\n\t\twidth: 80%;\n\t}\n}\n'],sourceRoot:""}]);const l=s},46187:(t,e,n)=>{n.d(e,{Z:()=>a});const i={name:"AlertCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon alert-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:"M13,13H11V7H13M13,17H11V15H13M12,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},90150:(t,e,n)=>{n.d(e,{Z:()=>a});const i={name:"DownloadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon download-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:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},70931:(t,e,n)=>{n.d(e,{Z:()=>a});const i={name:"PackageVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon package-variant-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:"M2,10.96C1.5,10.68 1.35,10.07 1.63,9.59L3.13,7C3.24,6.8 3.41,6.66 3.6,6.58L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.66,6.72 20.82,6.88 20.91,7.08L22.36,9.6C22.64,10.08 22.47,10.69 22,10.96L21,11.54V16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V10.96C2.7,11.13 2.32,11.14 2,10.96M12,4.15V4.15L12,10.85V10.85L17.96,7.5L12,4.15M5,15.91L11,19.29V12.58L5,9.21V15.91M19,15.91V12.69L14,15.59C13.67,15.77 13.3,15.76 13,15.6V19.29L19,15.91M13.85,13.36L20.13,9.73L19.55,8.72L13.27,12.35L13.85,13.36Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},84955:(t,e,n)=>{n.d(e,{Z:()=>a});const i={name:"SendIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon send-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:"M2,21L23,12L2,3V10L17,12L2,14V21Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},8896:(t,e,n)=>{n.d(e,{Z:()=>a});const i={name:"VideoIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon video-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:"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},90486:(t,e,n)=>{n.r(e),n.d(e,{default:()=>O});var i=n(20629),a=n(64550),o=n(71546),s=n(46187),l=n(33870),r=n(90150),c=n(84955);const d={name:"MergeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var p=n(51900);const h=(0,p.Z)(d,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon merge-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 17L12 13H15.2C15.6 14.2 16.7 15 18 15C19.7 15 21 13.7 21 12S19.7 9 18 9C16.7 9 15.6 9.8 15.2 11H12L8 7V3H3V8H6L10.2 12L6 16H3V21H8V17Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var f=n(59937);const u={name:"AccountSwitchIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const m=(0,p.Z)(u,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon account-switch-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 9C22 9 22 13 22 13V15H16V13C16 13 16 11.31 14.85 9.8C14.68 9.57 14.47 9.35 14.25 9.14C14.77 9.06 15.34 9 16 9M2 13C2 13 2 9 8 9S14 13 14 13V15H2V13M9 17V19H15V17L18 20L15 23V21H9V23L6 20L9 17M8 1C6.34 1 5 2.34 5 4S6.34 7 8 7 11 5.66 11 4 9.66 1 8 1M16 1C14.34 1 13 2.34 13 4S14.34 7 16 7 19 5.66 19 4 17.66 1 16 1Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var A=n(35936),g=n(15961),C=n(66951),_=n(98171),v=n(8399),F=n(70187),y=n(59537),x=n(99751),w=n(20144),b=n(46116);const k={name:"FaceMergeForm",components:{FaceCover:n(89289).Z},mixins:[b.Z,x.Z],props:{firstFace:{type:String,required:!0}},data:()=>({loading:!1}),computed:{...(0,i.Se)(["files","faces","facesFiles"]),filteredFaces(){return Object.values(this.faces).filter((t=>t.basename!==this.firstFace)).sort(((t,e)=>t.props.nbItems&&e.props.nbItems?e.props.nbItems-t.props.nbItems:this.facesFiles[e.basename]&&this.facesFiles[t.basename]?this.facesFiles[e.basename].length-this.facesFiles[t.basename].length:0))}},methods:{handleSelect(t){this.$emit("select",t),this.loading=!0}}};var M=n(93379),S=n.n(M),N=n(7795),Z=n.n(N),B=n(90569),I=n.n(B),L=n(3565),V=n.n(L),T=n(19216),R=n.n(T),$=n(44589),W=n.n($),z=n(96899),E={};E.styleTagTransform=W(),E.setAttributes=V(),E.insert=I().bind(null,"head"),E.domAPI=Z(),E.insertStyleElement=R();S()(z.Z,E);z.Z&&z.Z.locals&&z.Z.locals;const H=(0,p.Z)(k,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"merge-form face-list"},t._l(t.filteredFaces,(function(n){return e("FaceCover",{key:n.basename,attrs:{"base-name":n.basename,small:""},on:{click:function(e){return t.handleSelect(n.basename)}}})})),1)}),[],!1,null,"d74aaf20",null).exports,D={name:"FaceContent",components:{Pencil:a.default,Star:l.default,Download:r.Z,Close:o.default,AlertCircle:s.Z,Send:c.Z,Merge:h,ArrowLeft:f.default,AccountBoxMultipleOutline:A.Z,FaceMergeForm:H,FilesListViewer:v.Z,File:F.Z,NcLoadingIcon:g.lb,NcEmptyContent:g.SL,NcActions:g.O3,NcActionButton:g.Js,NcModal:g.Jc,NcButton:g.P2,AccountSwitch:m},directives:{focus(t){w.ZP.nextTick((()=>t.focus()))}},mixins:[x.Z,C.Z,_.Z],props:{faceName:{type:String,default:"/"}},data:()=>({showMoveModal:!1,showMergeModal:!1,showRenameModal:!1,loadingCount:0,appContent:document.getElementById("app-content-vue")}),computed:{...(0,i.Se)(["files","facesFiles"]),face(){return this.faces[this.faceName]},faceFileIds(){return this.facesFiles[this.faceName]||[]},shouldFavoriteSelection(){return this.selectedFileIds.some((t=>0===this.$store.state.files.files[t].favorite))}},watch:{face(){this.face&&this.fetchFaceContent(this.faceName)}},methods:{...(0,i.nv)(["appendFiles","deleteFace","renameFace","downloadFiles","toggleFavoriteForFiles","removeFilesFromFace","moveFilesToFace"]),openViewer(t){const e=this.files[t];OCA.Viewer.open({path:"/"+e.filename.split("/").slice(3).join("/"),list:this.faceFileIds.map((t=>({...this.files[t],basename:this.files[t].basename.split("-").slice(1).join("-")}))).filter((t=>!t.sectionHeader)),loadMore:e.loadMore?async()=>await e.loadMore(!0):()=>[],canLoop:e.canLoop})},async handleRemoveFilesFromFace(t){try{this.loadingCount++,await this.removeFilesFromFace({faceName:this.faceName,fileIdsToRemove:t}),this.resetSelection()}catch(t){y.Z.error(t)}finally{this.loadingCount--}},async handleDeleteFace(){try{this.loadingCount++,await this.deleteFace({faceName:this.faceName}),this.$router.push("/faces")}catch(t){y.Z.error(t)}finally{this.loadingCount--}},async handleRenameFace(t){try{this.loadingCount++,this.showRenameModal=!1;const e=this.faceName;await this.renameFace({oldName:e,faceName:t}),this.$router.push({name:"facecontent",params:{faceName:t}})}catch(t){y.Z.error(t)}finally{this.loadingCount--}},async handleMerge(t){try{this.loadingCount++,await this.moveFilesToFace({oldFace:this.faceName,faceName:t,fileIdsToMove:this.facesFiles[this.faceName]}),await this.deleteFace({faceName:this.faceName}),this.showMergeModal=!1,this.$router.push({name:"facecontent",params:{faceName:t}})}catch(t){y.Z.error(t)}finally{this.loadingCount--}},async handleMove(t,e){try{this.loadingCount++,await this.moveFilesToFace({oldFace:this.faceName,faceName:t,fileIdsToMove:e}),this.showMoveModal=!1}catch(t){y.Z.error(t)}finally{this.loadingCount--}},async favoriteSelection(){try{this.loadingCount++,await this.toggleFavoriteForFiles({fileIds:this.selectedFileIds,favoriteState:!0})}catch(t){y.Z.error(t)}finally{this.loadingCount--}},async unFavoriteSelection(){try{this.loadingCount++,await this.toggleFavoriteForFiles({fileIds:this.selectedFileIds,favoriteState:!1})}catch(t){y.Z.error(t)}finally{this.loadingCount--}},async downloadSelection(){try{this.loadingCount++,await this.downloadFiles(this.selectedFileIds)}catch(t){y.Z.error(t)}finally{this.loadingCount--}}}};var q=n(92382),Y={};Y.styleTagTransform=W(),Y.setAttributes=V(),Y.insert=I().bind(null,"head"),Y.domAPI=Z(),Y.insertStyleElement=R();S()(q.Z,Y);q.Z&&q.Z.locals&&q.Z.locals;const O=(0,p.Z)(D,(function(){var t=this,e=t._self._c;return void 0!==t.face||t.loadingFiles||t.loadingFaces?t.errorFetchingFiles||t.errorFetchingFaces?e("NcEmptyContent",{scopedSlots:t._u([{key:"icon",fn:function(){return[e("AlertCircle")]},proxy:!0}])},[t._v("\n\t"+t._s(t.t("photos","An error occurred"))+"\n")]):e("div",{staticClass:"face"},[e("div",{staticClass:"face__header"},[e("div",{staticClass:"face__header__left"},[e("NcActions",[e("NcActionButton",{on:{click:function(e){return t.$router.push("/faces/")}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("ArrowLeft")]},proxy:!0}])},[t._v(t._s(t.t("photos","Back"))+"\n\t\t\t\t")])],1),t._v(" "),e("div",{staticClass:"face__header__title"},[void 0!==t.face?e("h2",{class:{"face-name":!0,"hidden-visually":t.face.basename.match(/^[0-9]+$/)}},[t._v("\n\t\t\t\t\t"+t._s(t.face.basename)+"\n\t\t\t\t")]):t._e()]),t._v(" "),t.loadingCount>0||t.loadingFaces?e("NcLoadingIcon"):t._e()],1),t._v(" "),void 0!==t.face?e("div",{staticClass:"face__header__actions"},[e("NcActions",[e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Rename person")},on:{click:function(e){t.showRenameModal=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Pencil")]},proxy:!0}],null,!1,514409694)},[t._v("\n\t\t\t\t\t"+t._s(t.t("photos","Rename person"))+"\n\t\t\t\t")])],1),t._v(" "),e("NcActions",{attrs:{"force-menu":!0}},[Object.keys(t.faces).length>1?e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Merge with different person")},on:{click:function(e){t.showMergeModal=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Merge")]},proxy:!0}],null,!1,3117189691)},[t._v("\n\t\t\t\t\t"+t._s(t.t("photos","Merge with different person"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.selectedFileIds.length?[e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Download selected files")},on:{click:t.downloadSelection}},[e("Download",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t\t\t\t\t\t"+t._s(t.t("photos","Download selected photos"))+"\n\t\t\t\t\t")],1),t._v(" "),t.shouldFavoriteSelection?e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Mark selection as favorite")},on:{click:t.favoriteSelection}},[e("Star",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t\t\t\t\t\t"+t._s(t.t("photos","Favorite"))+"\n\t\t\t\t\t")],1):e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Remove selection from favorites")},on:{click:t.unFavoriteSelection}},[e("Star",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t\t\t\t\t\t"+t._s(t.t("photos","Remove from favorites"))+"\n\t\t\t\t\t")],1),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(e){t.showMoveModal=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("AccountSwitch")]},proxy:!0}],null,!1,2937983280)},[t._v("\n\t\t\t\t\t\t"+t._s(t.n("photos","Move photo to a different person","Move photos to a different person",t.selectedFileIds.length))+"\n\t\t\t\t\t")]),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(e){return t.handleRemoveFilesFromFace(t.selectedFileIds)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Close")]},proxy:!0}],null,!1,1051939733)},[t._v("\n\t\t\t\t\t\t"+t._s(t.n("photos","Remove photo from person","Remove photos from person",t.selectedFileIds.length))+"\n\t\t\t\t\t")])]:t._e(),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:t.handleDeleteFace},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Close")]},proxy:!0}],null,!1,1051939733)},[t._v("\n\t\t\t\t\t"+t._s(t.t("photos","Remove person"))+"\n\t\t\t\t")])],2)],1):t._e()]),t._v(" "),void 0!==t.face?e("FilesListViewer",{staticClass:"face__photos",attrs:{"container-element":t.appContent,"file-ids":t.faceFileIds,loading:t.loadingFiles||t.loadingFaces},scopedSlots:t._u([{key:"default",fn:function(n){let{file:i,visibility:a}=n;return e("File",{attrs:{file:t.files[i.id],"allow-selection":!0,selected:!0===t.selection[i.id],visibility:a,semaphore:t.semaphore},on:{click:t.openViewer,"select-toggled":t.onFileSelectToggle}})}}],null,!1,3592900521)}):t._e(),t._v(" "),t.showRenameModal?e("NcModal",{attrs:{title:t.t("photos","Rename person")},on:{close:function(e){t.showRenameModal=!1}}},[e("div",{staticClass:"rename-form"},[e("input",{directives:[{name:"focus",rawName:"v-focus"}],ref:"nameInput",attrs:{type:"text",name:"name",required:"",placeholder:t.t("photos","Name of this person")},domProps:{value:t.faceName},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleRenameFace(t.$refs.nameInput.value)}}}),t._v(" "),e("NcButton",{attrs:{"aria-label":t.t("photos","Save."),type:"primary",disabled:t.$refs.nameInput&&""===t.$refs.nameInput.value.trim()},on:{click:function(e){return t.handleRenameFace(t.$refs.nameInput.value)}},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loadingCount?e("NcLoadingIcon"):e("Send")]},proxy:!0}],null,!1,564208483)},[t._v("\n\t\t\t\t"+t._s(t.t("photos","Save"))+"\n\t\t\t")])],1)]):t._e(),t._v(" "),t.showMergeModal?e("NcModal",{attrs:{title:t.t("photos","Merge person")},on:{close:function(e){t.showMergeModal=!1}}},[e("FaceMergeForm",{attrs:{"first-face":t.faceName},on:{select:function(e){return t.handleMerge(e)}}})],1):t._e(),t._v(" "),t.showMoveModal?e("NcModal",{attrs:{title:t.t("photos","Merge person")},on:{close:function(e){t.showMoveModal=!1}}},[e("FaceMergeForm",{attrs:{"first-face":t.faceName},on:{select:function(e){return t.handleMove(e,t.selectedFileIds)}}})],1):t._e()],1):e("NcEmptyContent",{staticClass:"empty-content-with-illustration",scopedSlots:t._u([{key:"icon",fn:function(){return[e("AccountBoxMultipleOutline")]},proxy:!0}],null,!1,2861705255)},[t._v("\n\t"+t._s(t.t("photos","This person could not be found"))+"\n")])}),[],!1,null,"29c0437d",null).exports}}]);
//# sourceMappingURL=photos-node_modules_vue-material-design-icons_PackageVariant_vue-node_modules_vue-material-design-ic-4e283b.js.map?v=4b48ee3610032f0fca05