"use strict";(()=>{(self.webpackChunktalk=self.webpackChunktalk||[]).push([["defaultVendors-node_modules_nextcloud_upload_dist_chunks_ConflictPicker-B5Kju9IA_mjs"],{25805:(x,p,n)=>{n.d(p,{A:()=>y});var l=n(71354),C=n.n(l),u=n(76314),k=n.n(u),b=k()(C());b.push([x.id,`.node-picker__wrapper[data-v-17fb035b]:not(:last-of-type) {
  border-bottom: 1px solid var(--color-border);
}
.node-picker[data-v-17fb035b] {
  display: flex;
  align-items: center;
  height: 64px;
}
.node-picker__icon[data-v-17fb035b], .node-picker__preview[data-v-17fb035b] {
  height: 64px;
  width: 64px;
  margin: 0 var(--secondary-margin);
  display: block;
  flex: 0 0 64px;
}
.node-picker__icon[data-v-17fb035b] {
  color: var(--color-text-maxcontrast);
}
.node-picker__icon.folder-icon[data-v-17fb035b] {
  color: var(--color-primary-element);
}
.node-picker__preview[data-v-17fb035b] {
  overflow: hidden;
  border-radius: calc(var(--border-radius) * 2);
  background-position: center;
  background-size: cover;
}
.node-picker__desc[data-v-17fb035b] {
  display: flex;
  flex-direction: column;
}
.node-picker__desc span[data-v-17fb035b] {
  white-space: nowrap;
}[data-v-f0c1b8b3] .modal-container__content {
  display: flex;
  overflow: visible;
  flex-direction: column;
}
.conflict-picker[data-v-f0c1b8b3] {
  --margin: 36px;
  --secondary-margin: 18px;
}
.conflict-picker__header[data-v-f0c1b8b3] {
  position: sticky;
  z-index: 10;
  top: 0;
  padding: 0 var(--margin);
  padding-bottom: var(--secondary-margin);
}
.conflict-picker__form[data-v-f0c1b8b3] {
  position: relative;
  overflow: auto;
  padding: 0 var(--margin);
  margin-top: calc(-1 * var(--secondary-margin));
}
.conflict-picker fieldset[data-v-f0c1b8b3] {
  display: grid;
  width: 100%;
  margin-top: calc(var(--secondary-margin) * 1.5);
  padding-bottom: var(--secondary-margin);
  grid-template-columns: 1fr 1fr;
}
.conflict-picker fieldset[data-v-f0c1b8b3] legend {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: calc(var(--secondary-margin) / 2);
}
.conflict-picker fieldset.conflict-picker__all[data-v-f0c1b8b3] {
  position: sticky;
  top: 0;
  margin: 0;
  padding: var(--secondary-margin) 0;
  background-image: linear-gradient(to top, transparent, var(--color-main-background-blur) 10%, var(--color-main-background) 15%);
}
.conflict-picker fieldset.conflict-picker__all + fieldset[data-v-f0c1b8b3] {
  margin-top: 0;
}
.conflict-picker fieldset.conflict-picker__all[data-v-f0c1b8b3] label {
  font-weight: bold;
}
.conflict-picker .button-vue--disabled[data-v-f0c1b8b3] {
  cursor: default;
  opacity: 0.5;
  filter: saturate(0.7);
}
.conflict-picker[data-v-f0c1b8b3] .dialog__actions {
  width: auto;
  margin-inline: 12px;
}
.conflict-picker[data-v-f0c1b8b3] .dialog__actions span.dialog__actions-separator {
  margin-left: auto;
}
@media screen and (max-width: 768px) {
.conflict-picker[data-v-f0c1b8b3] {
    --margin: var(--secondary-margin) !important;
}
.conflict-picker__description[data-v-f0c1b8b3] {
    display: none !important;
}
.conflict-picker fieldset[data-v-f0c1b8b3] {
    grid-template-columns: 1fr !important;
}
.conflict-picker fieldset.conflict-picker__all[data-v-f0c1b8b3] {
    position: static;
}
}
@media screen and (max-width: 512px) {
.conflict-picker[data-v-f0c1b8b3] .dialog__actions {
    flex-wrap: wrap;
}
.conflict-picker[data-v-f0c1b8b3] .dialog__actions span.dialog__actions-separator {
    width: 100%;
}
}`,"",{version:3,sources:["webpack://./node_modules/@nextcloud/upload/dist/assets/ConflictPicker-CZh-zPMD.css"],names:[],mappings:"AAAA;EACE,4CAA4C;AAC9C;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,YAAY;AACd;AACA;EACE,YAAY;EACZ,WAAW;EACX,iCAAiC;EACjC,cAAc;EACd,cAAc;AAChB;AACA;EACE,oCAAoC;AACtC;AACA;EACE,mCAAmC;AACrC;AACA;EACE,gBAAgB;EAChB,6CAA6C;EAC7C,2BAA2B;EAC3B,sBAAsB;AACxB;AACA;EACE,aAAa;EACb,sBAAsB;AACxB;AACA;EACE,mBAAmB;AACrB,CAAC;EACC,aAAa;EACb,iBAAiB;EACjB,sBAAsB;AACxB;AACA;EACE,cAAc;EACd,wBAAwB;AAC1B;AACA;EACE,gBAAgB;EAChB,WAAW;EACX,MAAM;EACN,wBAAwB;EACxB,uCAAuC;AACzC;AACA;EACE,kBAAkB;EAClB,cAAc;EACd,wBAAwB;EACxB,8CAA8C;AAChD;AACA;EACE,aAAa;EACb,WAAW;EACX,+CAA+C;EAC/C,uCAAuC;EACvC,8BAA8B;AAChC;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,WAAW;EACX,gDAAgD;AAClD;AACA;EACE,gBAAgB;EAChB,MAAM;EACN,SAAS;EACT,kCAAkC;EAClC,+HAA+H;AACjI;AACA;EACE,aAAa;AACf;AACA;EACE,iBAAiB;AACnB;AACA;EACE,eAAe;EACf,YAAY;EACZ,qBAAqB;AACvB;AACA;EACE,WAAW;EACX,mBAAmB;AACrB;AACA;EACE,iBAAiB;AACnB;AACA;AACA;IACI,4CAA4C;AAChD;AACA;IACI,wBAAwB;AAC5B;AACA;IACI,qCAAqC;AACzC;AACA;IACI,gBAAgB;AACpB;AACA;AACA;AACA;IACI,eAAe;AACnB;AACA;IACI,WAAW;AACf;AACA",sourcesContent:[`.node-picker__wrapper[data-v-17fb035b]:not(:last-of-type) {
  border-bottom: 1px solid var(--color-border);
}
.node-picker[data-v-17fb035b] {
  display: flex;
  align-items: center;
  height: 64px;
}
.node-picker__icon[data-v-17fb035b], .node-picker__preview[data-v-17fb035b] {
  height: 64px;
  width: 64px;
  margin: 0 var(--secondary-margin);
  display: block;
  flex: 0 0 64px;
}
.node-picker__icon[data-v-17fb035b] {
  color: var(--color-text-maxcontrast);
}
.node-picker__icon.folder-icon[data-v-17fb035b] {
  color: var(--color-primary-element);
}
.node-picker__preview[data-v-17fb035b] {
  overflow: hidden;
  border-radius: calc(var(--border-radius) * 2);
  background-position: center;
  background-size: cover;
}
.node-picker__desc[data-v-17fb035b] {
  display: flex;
  flex-direction: column;
}
.node-picker__desc span[data-v-17fb035b] {
  white-space: nowrap;
}[data-v-f0c1b8b3] .modal-container__content {
  display: flex;
  overflow: visible;
  flex-direction: column;
}
.conflict-picker[data-v-f0c1b8b3] {
  --margin: 36px;
  --secondary-margin: 18px;
}
.conflict-picker__header[data-v-f0c1b8b3] {
  position: sticky;
  z-index: 10;
  top: 0;
  padding: 0 var(--margin);
  padding-bottom: var(--secondary-margin);
}
.conflict-picker__form[data-v-f0c1b8b3] {
  position: relative;
  overflow: auto;
  padding: 0 var(--margin);
  margin-top: calc(-1 * var(--secondary-margin));
}
.conflict-picker fieldset[data-v-f0c1b8b3] {
  display: grid;
  width: 100%;
  margin-top: calc(var(--secondary-margin) * 1.5);
  padding-bottom: var(--secondary-margin);
  grid-template-columns: 1fr 1fr;
}
.conflict-picker fieldset[data-v-f0c1b8b3] legend {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: calc(var(--secondary-margin) / 2);
}
.conflict-picker fieldset.conflict-picker__all[data-v-f0c1b8b3] {
  position: sticky;
  top: 0;
  margin: 0;
  padding: var(--secondary-margin) 0;
  background-image: linear-gradient(to top, transparent, var(--color-main-background-blur) 10%, var(--color-main-background) 15%);
}
.conflict-picker fieldset.conflict-picker__all + fieldset[data-v-f0c1b8b3] {
  margin-top: 0;
}
.conflict-picker fieldset.conflict-picker__all[data-v-f0c1b8b3] label {
  font-weight: bold;
}
.conflict-picker .button-vue--disabled[data-v-f0c1b8b3] {
  cursor: default;
  opacity: 0.5;
  filter: saturate(0.7);
}
.conflict-picker[data-v-f0c1b8b3] .dialog__actions {
  width: auto;
  margin-inline: 12px;
}
.conflict-picker[data-v-f0c1b8b3] .dialog__actions span.dialog__actions-separator {
  margin-left: auto;
}
@media screen and (max-width: 768px) {
.conflict-picker[data-v-f0c1b8b3] {
    --margin: var(--secondary-margin) !important;
}
.conflict-picker__description[data-v-f0c1b8b3] {
    display: none !important;
}
.conflict-picker fieldset[data-v-f0c1b8b3] {
    grid-template-columns: 1fr !important;
}
.conflict-picker fieldset.conflict-picker__all[data-v-f0c1b8b3] {
    position: static;
}
}
@media screen and (max-width: 512px) {
.conflict-picker[data-v-f0c1b8b3] .dialog__actions {
    flex-wrap: wrap;
}
.conflict-picker[data-v-f0c1b8b3] .dialog__actions span.dialog__actions-separator {
    width: 100%;
}
}`],sourceRoot:""}]);const y=b},75301:(x,p,n)=>{n.r(p),n.d(p,{default:()=>me});var l=n(85072),C=n.n(l),u=n(97825),k=n.n(u),b=n(77659),y=n.n(b),M=n(55056),N=n.n(M),I=n(10540),D=n.n(I),F=n(41113),m=n.n(F),r=n(25805),o={};o.styleTagTransform=m(),o.setAttributes=N(),o.insert=y().bind(null,"head"),o.domAPI=k(),o.insertStyleElement=D();var A=C()(r.A,o);const T=r.A&&r.A.locals?r.A.locals:void 0;var d=n(85471),B=n(95674),g=n(21379),s=n(65945),f=n(32073),R=n(94219),w=n(70995),S=n(63814),E=n(58009);const h={name:"ArrowRightIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var P=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon arrow-right-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(c){return e.$emit("click",c)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},L=[],W=(0,s.n)(h,P,L,!1,null,null);const $=W.exports,U={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var j=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon close-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(c){return e.$emit("click",c)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},V=[],K=(0,s.n)(U,j,V,!1,null,null);const Z=K.exports,H={name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var X=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon file-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(c){return e.$emit("click",c)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Y=[],J=(0,s.n)(H,X,Y,!1,null,null);const Q=J.exports,G={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var q=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon folder-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(c){return e.$emit("click",c)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},ee=[],te=(0,s.n)(G,q,ee,!1,null,null);const ie=te.exports,O=64,ne=(0,d.pM)({name:"NodesPicker",components:{FileSvg:Q,FolderSvg:ie,NcCheckboxRadioSwitch:f.A,NcDateTime:E.N},props:{incoming:{type:[File,Object],required:!0},existing:{type:Object,required:!0},newSelected:{type:Array,required:!0},oldSelected:{type:Array,required:!0}},data(){return{asyncPreview:null,incomingFile:null}},computed:{isEnoughSelected(){return this.isChecked(this.incoming,this.newSelected)||this.isChecked(this.existing,this.oldSelected)},incomingPreview(){return this.incomingFile?this.previewUrl(this.incomingFile)??this.asyncPreview:null},incomingLastModified(){return this.incomingFile?this.lastModified(this.incomingFile):null},incomingSize(){return this.incomingFile?this.size(this.incomingFile):(0,s.t)("Unknown size")},existingPreview(){return this.previewUrl(this.existing)},existingLastModified(){return this.lastModified(this.existing)}},watch:{incoming:{immediate:!0,async handler(){this.incoming instanceof File?this.incomingFile=this.incoming:(0,s.i)(this.incoming)?this.incomingFile=await new Promise((i,e)=>this.incoming.file(i,e)):this.incomingFile=null}}},methods:{lastModified(i){return(i instanceof File?new Date(i.lastModified):i.mtime)??null},size(i){return i.size?(0,g.v7)(i.size,!0):(0,s.t)("Unknown size")},previewUrl(i){if(i instanceof File)return this.previewImage(i).then(e=>{this.asyncPreview=e}),null;if(i.type===g.pt.Folder)return null;try{const e=i.attributes.previewUrl||(0,S.Jv)("/core/preview?fileId={fileid}",{fileid:i.fileid}),t=new URL(window.location.origin+e);t.searchParams.set("x",O.toString()),t.searchParams.set("y",O.toString()),t.searchParams.set("mimeFallback","true");const c=i.attributes?.etag||"";return t.searchParams.set("v",c.slice(0,6)),t.href}catch{return null}},isFolder(i){return(0,s.a)(i)?i.isDirectory:(i=i,i.type===g.pt.Folder||i.type==="httpd/unix-directory")},isChecked(i,e){return e.includes(i)},onUpdateIncomingChecked(i){i?this.$emit("update:newSelected",[this.incoming,...this.newSelected]):this.$emit("update:newSelected",this.newSelected.filter(e=>e!==this.incoming))},onUpdateExistingChecked(i){i?this.$emit("update:oldSelected",[this.existing,...this.oldSelected]):this.$emit("update:oldSelected",this.oldSelected.filter(e=>e!==this.existing))},async previewImage(i){return new Promise(e=>{if(i instanceof File&&i.type.startsWith("image/")){const t=new FileReader;t.onload=async c=>{const _=c?.target?.result;if(_ instanceof ArrayBuffer){const a=new Blob([_],{type:i.type}),v=URL.createObjectURL(a);e(v);return}e(null)},t.readAsArrayBuffer(i)}else e(null)})},t:s.t}});var ae=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("fieldset",{staticClass:"node-picker__wrapper",attrs:{"data-cy-conflict-picker-fieldset":e.existing.basename}},[t("legend",[e._v(e._s(e.existing.basename))]),t("NcCheckboxRadioSwitch",{attrs:{checked:e.isChecked(e.incoming,e.newSelected),required:!e.isEnoughSelected,"data-cy-conflict-picker-input-incoming":e.existing.basename},on:{"update:checked":e.onUpdateIncomingChecked}},[t("span",{staticClass:"node-picker node-picker--incoming"},[e.incomingPreview?t("img",{staticClass:"node-picker__preview",attrs:{src:e.incomingPreview,alt:e.t("Preview image"),loading:"lazy"}}):[e.isFolder(e.incoming)?t("FolderSvg",{staticClass:"node-picker__icon",attrs:{size:48}}):t("FileSvg",{staticClass:"node-picker__icon",attrs:{size:48}})],t("span",{staticClass:"node-picker__desc"},[t("span",{staticClass:"node-picker__name"},[e._v(e._s(e.t("New version")))]),e.incomingLastModified?t("NcDateTime",{staticClass:"node-picker__mtime",attrs:{timestamp:e.incomingLastModified,"relative-time":!1,format:{timeStyle:"short",dateStyle:"medium"}}}):t("span",{staticClass:"node-picker__mtime"},[e._v(" "+e._s(e.t("Last modified date unknown"))+" ")]),t("span",{staticClass:"node-picker__size"},[e._v(e._s(e.incomingSize))])],1)],2)]),t("NcCheckboxRadioSwitch",{attrs:{checked:e.isChecked(e.existing,e.oldSelected),required:!e.isEnoughSelected,"data-cy-conflict-picker-input-existing":e.existing.basename},on:{"update:checked":e.onUpdateExistingChecked}},[t("span",{staticClass:"node-picker node-picker--existing"},[e.existingPreview?t("img",{staticClass:"node-picker__preview",attrs:{src:e.existingPreview,alt:e.t("Preview image"),loading:"lazy"}}):[e.isFolder(e.existing)?t("FolderSvg",{staticClass:"node-picker__icon",attrs:{size:48}}):t("FileSvg",{staticClass:"node-picker__icon",attrs:{size:48}})],t("span",{staticClass:"node-picker__desc"},[t("span",{staticClass:"node-picker__name"},[e._v(e._s(e.t("Existing version")))]),e.existingLastModified?t("NcDateTime",{staticClass:"node-picker__mtime",attrs:{timestamp:e.existingLastModified,"relative-time":!1,format:{timeStyle:"short",dateStyle:"medium"}}}):t("span",{staticClass:"node-picker__mtime"},[e._v(" "+e._s(e.t("Last modified date unknown"))+" ")]),t("span",{staticClass:"node-picker__size"},[e._v(e._s(e.size(e.existing)))])],1)],2)])],1)},se=[],ce=(0,s.n)(ne,ae,se,!1,null,"17fb035b");const le=ce.exports,re=(0,d.pM)({name:"ConflictPicker",components:{ArrowRight:$,Close:Z,NcButton:w.A,NcCheckboxRadioSwitch:f.A,NcDialog:R.A,NodesPicker:le},props:{dirname:{type:String,default:""},content:{type:Array,required:!0},conflicts:{type:Array,required:!0},recursiveUpload:{type:Boolean,default:!1}},emits:["cancel","submit"],setup(){return{blockedTitle:(0,s.t)("You need to select at least one version of each file to continue.")}},data(){return{files:[],opened:!0,newSelected:[],oldSelected:[]}},computed:{name(){return this?.dirname?.trim?.()!==""?(0,s.b)("{count} file conflict in {dirname}","{count} file conflicts in {dirname}",this.conflicts.length,{count:this.conflicts.length,dirname:this.dirname}):(0,s.b)("{count} file conflict","{count} files conflict",this.conflicts.length,{count:this.conflicts.length})},skipButtonLabel(){return(0,s.b)("Skip this file","Skip {count} files",this.conflicts.length,{count:this.conflicts.length})},selectAllNewBind(){const i=this.isNoneNewSelected||this.isSomeNewSelected?this.t("Select all"):this.t("Unselect all");return{"aria-label":i,checked:this.isAllNewSelected,indeterminate:this.isSomeNewSelected,title:i}},isAllNewSelected(){return this.newSelected.length===this.conflicts.length},isNoneNewSelected(){return this.newSelected.length===0},isSomeNewSelected(){return!this.isAllNewSelected&&!this.isNoneNewSelected},selectAllOldBind(){const i=this.isNoneOldSelected||this.isSomeOldSelected?this.t("Select all"):this.t("Unselect all");return{"aria-label":i,checked:this.isAllOldSelected,indeterminate:this.isSomeOldSelected,title:i}},isAllOldSelected(){return this.oldSelected.length===this.files.length},isNoneOldSelected(){return this.oldSelected.length===0},isSomeOldSelected(){return!this.isAllOldSelected&&!this.isNoneOldSelected},isEnoughSelected(){return this.isAllOldSelected||this.isAllNewSelected?!0:this.$refs?.nodesPicker?.every?.(i=>i.isEnoughSelected)}},mounted(){if(this.files=this.conflicts.map(i=>{const e=i instanceof File||(0,s.a)(i)?i.name:i.basename;return this.content.find(t=>t.basename===e)}).filter(Boolean),this.conflicts.length===0||this.files.length===0){const i=new Error("ConflictPicker: files and conflicts must not be empty");throw this.onCancel(i),i}if(this.conflicts.length!==this.files.length){const i=new Error("ConflictPicker: files and conflicts must have the same length. Make sure you filter out non conflicting files from the conflicts array.");throw this.onCancel(i),i}s.l.debug("ConflictPicker initialised",{files:this.files,conflicts:this.conflicts,content:this.content})},methods:{onCancel(i){this.opened=!1,this.$emit("cancel",i)},onSkip(){s.l.debug("Conflict skipped. Ignoring all conflicting files"),this.opened=!1,this.$emit("submit",{selected:[],renamed:[]})},onSubmit(){if(!this.isEnoughSelected){this.scrollValidityInputIntoView(),this.$refs.form.reportValidity(),(0,B.Qg)(this.blockedTitle);return}const i=this.oldSelected.map(a=>a.basename),e=this.content.map(a=>a.basename),t=[],c=this.newSelected.filter(a=>{const v=a instanceof File||(0,s.a)(a)?a.name:a.basename;return i.includes(v)});c.length>0&&c.forEach(a=>{const v=a instanceof File||(0,s.a)(a)?a.name:a.basename,z=(0,g.E6)(v,e);if(a instanceof File||(0,s.a)(a)){Object.defineProperty(a,"name",{value:z}),t.push(a);return}a.rename(z),t.push(a)});const _=this.newSelected.filter(a=>{const v=a instanceof File||(0,s.a)(a)?a.name:a.basename;return!i.includes(v)&&!c.includes(a)});s.l.debug("Conflict resolved",{selected:_,renamed:t}),this.opened=!1,this.$emit("submit",{selected:_,renamed:t})},scrollValidityInputIntoView(){const i='.checkbox-radio-switch input[type="checkbox"]';Array.from(this.$el.querySelectorAll(i)).forEach(c=>c?.setCustomValidity?.(""));const t=this.$el.querySelector(i+":invalid");t&&(t.setCustomValidity(this.blockedTitle),t.scrollIntoView({behavior:"instant",block:"center"}))},onSelectAllNew(i){i?(s.l.debug("Selected all new files"),this.newSelected=this.conflicts):(s.l.debug("Cleared new selection"),this.newSelected=[])},onSelectAllOld(i){i?(s.l.debug("Selected all existing files"),this.oldSelected=this.files):(s.l.debug("Cleared old selection"),this.oldSelected=[])},t:s.t}});var oe=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("NcDialog",{staticClass:"conflict-picker",attrs:{"can-close":"","data-cy-conflict-picker":"","close-on-click-outside":!1,show:e.opened,name:e.name,size:"large"},on:{closing:e.onCancel},scopedSlots:e._u([{key:"actions",fn:function(){return[t("NcButton",{attrs:{"aria-label":e.t("Cancel"),title:e.t("Cancel the entire operation"),"data-cy-conflict-picker-cancel":"",type:"tertiary"},on:{click:e.onCancel},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Close",{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(e.t("Cancel"))+" ")]),t("span",{staticClass:"dialog__actions-separator"}),t("NcButton",{attrs:{"aria-label":e.skipButtonLabel,"data-cy-conflict-picker-skip":""},on:{click:e.onSkip},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Close",{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(e.skipButtonLabel)+" ")]),t("NcButton",{class:{"button-vue--disabled":!e.isEnoughSelected},attrs:{"aria-label":e.t("Continue"),title:e.isEnoughSelected?"":e.blockedTitle,"data-cy-conflict-picker-submit":"","native-type":"submit",type:"primary"},on:{click:function(c){return c.stopPropagation(),c.preventDefault(),e.onSubmit.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("ArrowRight",{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(e.t("Continue"))+" ")])]},proxy:!0}])},[t("div",{staticClass:"conflict-picker__header"},[t("p",{staticClass:"conflict-picker__description",attrs:{id:"conflict-picker-description"}},[e._v(" "+e._s(e.t("Which files do you want to keep?"))),t("br"),e._v(" "+e._s(e.t("If you select both versions, the incoming file will have a number added to its name."))),t("br"),e.recursiveUpload?[e._v(" "+e._s(e.t("When an incoming folder is selected, the content is written into the existing folder and a recursive conflict resolution is performed."))+" ")]:[e._v(" "+e._s(e.t("When an incoming folder is selected, any conflicting files within it will also be overwritten."))+" ")]],2)]),t("form",{ref:"form",staticClass:"conflict-picker__form",attrs:{"aria-labelledby":"conflict-picker-description","data-cy-conflict-picker-form":""},on:{submit:function(c){return c.preventDefault(),c.stopPropagation(),e.onSubmit.apply(null,arguments)}}},[t("fieldset",{staticClass:"conflict-picker__all",attrs:{"data-cy-conflict-picker-fieldset":"all"}},[t("legend",{staticClass:"hidden-visually"},[e._v(" "+e._s(e.t("Select all checkboxes"))+" ")]),t("NcCheckboxRadioSwitch",e._b({attrs:{"data-cy-conflict-picker-input-incoming":"all"},on:{"update:checked":e.onSelectAllNew}},"NcCheckboxRadioSwitch",e.selectAllNewBind,!1),[e._v(" "+e._s(e.t("Select all new files"))+" ")]),t("NcCheckboxRadioSwitch",e._b({attrs:{"data-cy-conflict-picker-input-existing":"all"},on:{"update:checked":e.onSelectAllOld}},"NcCheckboxRadioSwitch",e.selectAllOldBind,!1),[e._v(" "+e._s(e.t("Select all existing files"))+" ")])],1),e._l(e.files,function(c,_){return t("NodesPicker",{key:c.fileid,ref:"nodesPicker",refInFor:!0,attrs:{incoming:e.conflicts[_],existing:e.files[_],"new-selected":e.newSelected,"old-selected":e.oldSelected},on:{"update:newSelected":function(a){e.newSelected=a},"update:new-selected":function(a){e.newSelected=a},"update:oldSelected":function(a){e.oldSelected=a},"update:old-selected":function(a){e.oldSelected=a}}})})],2)])},de=[],fe=(0,s.n)(re,oe,de,!1,null,"f0c1b8b3");const me=fe.exports},32073:(x,p,n)=>{n.d(p,{A:()=>l.N});var l=n(32263)},58009:(x,p,n)=>{n.d(p,{N:()=>F});var l=n(85471),C=n(53334),u=n(97382),k=n(51431);(0,u.r)(u.k);const b={long:(0,u.a)("a few seconds ago"),short:(0,u.a)("seconds ago"),narrow:(0,u.a)("sec. ago")};function y(m=Date.now(),r={}){const o=(0,l.KR)(Date.now());let A;const T=(0,l.KR)({format:{timeStyle:"medium",dateStyle:"short"},relativeTime:"long",ignoreSeconds:!1,...(0,l.R1)(r)}),d=(0,l.EW)(()=>({...(0,l.R1)(r),...T.value})),B=(0,l.EW)(()=>new Date((0,l.R1)(m))),g=(0,l.EW)(()=>new Intl.DateTimeFormat((0,C.lO)(),d.value.format).format(B.value)),s=(0,l.EW)(()=>{if(d.value.relativeTime!==!1){const f=new Intl.RelativeTimeFormat((0,C.Z0)(),{numeric:"auto",style:d.value.relativeTime}),w=(B.value.getTime()-o.value)/1e3;if(Math.abs(w)<59.5)return d.value.ignoreSeconds?b[d.value.relativeTime]:f.format(Math.round(w),"second");const S=w/60;if(Math.abs(S)<=59)return f.format(Math.round(S),"minute");const E=S/60;if(Math.abs(E)<23.5)return f.format(Math.round(E),"hour");const h=E/24;if(Math.abs(h)<6.5)return f.format(Math.round(h),"day");if(Math.abs(h)<27.5){const L=h/7;return f.format(Math.round(L),"week")}const P=h/30;return Math.abs(P)<11.5?f.format(Math.round(P),"month"):f.format(Math.round(h/365),"year")}return g.value});return(0,l.wB)([d],()=>{window.clearInterval(A),A=void 0,d.value.relativeTime&&(A=window.setInterval(()=>{o.value=Date.now()},1e3))}),(0,l.sV)(()=>{d.value.relativeTime!==!1&&(A=window.setInterval(()=>{o.value=Date.now()},1e3))}),(0,l.hi)(()=>{window.clearInterval(A)}),{formattedTime:s,formattedFullTime:g,options:T}}const M={name:"NcDateTime",props:{timestamp:{type:[Date,Number],required:!0},format:{type:Object,default:()=>({timeStyle:"medium",dateStyle:"short"})},relativeTime:{type:[Boolean,String],default:"long",validator:m=>m===!1||["long","short","narrow"].includes(m)},ignoreSeconds:{type:Boolean,default:!1}},setup(m){const r=(0,l.EW)(()=>m.timestamp),{formattedTime:o,formattedFullTime:A}=y(r,m);return{formattedTime:o,formattedFullTime:A}}};var N=function(){var r=this,o=r._self._c;return o("span",{staticClass:"nc-datetime",attrs:{"data-timestamp":r.timestamp,title:r.formattedFullTime},domProps:{textContent:r._s(r.formattedTime)}})},I=[],D=(0,k.n)(M,N,I,!1,null,null);const F=D.exports}}]);})();

//# sourceMappingURL=talk-defaultVendors-node_modules_nextcloud_upload_dist_chunks_ConflictPicker-B5Kju9IA_mjs.js.map?v=79af5d3963a528356033