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,EAAIO,GAAG,IAAMP,EAAIQ,GAAGR,EAAIb,aAAaa,EAAI5C,QAAU,IAAM4C,EAAIQ,GAAGR,EAAItC,EAAE,kFAAoF,OAAQsC,EAAI1B,UAAY2B,EAAG,cAAe,CAAEQ,IAAK,YAAaC,YAAa,iCAAkCN,MAAO,CAAE,OAAUJ,EAAIjC,YAAa,cAAeiC,EAAInC,gBAAiB,MAASmC,EAAItC,EAAE,gBAAiB,MAASsC,EAAIpC,SAAWyC,GAAI,CAAE,eAAgB,SAASC,GACleN,EAAIpC,QAAU0C,CAChB,KAASN,EAAIW,MAAO,EACtB,EACIC,EAAuB,GAS3B,MAAMC,GAR8B,IAAAC,GAClChE,EACAiD,EACAa,GACA,EACA,KACA,YAE0CG,O","sources":["webpack:///nextcloud/node_modules/@nextcloud/upload/dist/assets/InvalidFilenameDialog-YDOzIzS6.css","webpack://nextcloud/./node_modules/@nextcloud/upload/dist/assets/InvalidFilenameDialog-YDOzIzS6.css?9d2e","webpack:///nextcloud/node_modules/@nextcloud/upload/dist/chunks/InvalidFilenameDialog-DtcCk3Tc.mjs"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `\n.invalid-filename-dialog__input[data-v-3a479259] {\n\t/* Ensure the helper text can always be shown without jumping */\n\tmin-height: calc(var(--default-clickable-area) + 4 * var(--default-font-size));\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./node_modules/@nextcloud/upload/dist/assets/InvalidFilenameDialog-YDOzIzS6.css\"],\"names\":[],\"mappings\":\";AACA;CACC,+DAA+D;CAC/D,8EAA8E;AAC/E\",\"sourcesContent\":[\"\\n.invalid-filename-dialog__input[data-v-3a479259] {\\n\\t/* Ensure the helper text can always be shown without jumping */\\n\\tmin-height: calc(var(--default-clickable-area) + 4 * var(--default-font-size));\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\n import API from \"!../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../css-loader/dist/cjs.js!./InvalidFilenameDialog-YDOzIzS6.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../css-loader/dist/cjs.js!./InvalidFilenameDialog-YDOzIzS6.css\";\n export default content && content.locals ? content.locals : undefined;\n","import '../assets/InvalidFilenameDialog-YDOzIzS6.css';\nimport { InvalidFilenameError, InvalidFilenameErrorReason } from \"@nextcloud/files\";\nimport { defineComponent } from \"vue\";\nimport { t, n as normalizeComponent } from \"./index-i9myasgp.mjs\";\nimport NcDialog from \"@nextcloud/vue/dist/Components/NcDialog.js\";\nimport NcTextField from \"@nextcloud/vue/dist/Components/NcTextField.js\";\nimport NcNoteCard from \"@nextcloud/vue/dist/Components/NcNoteCard.js\";\nconst _sfc_main = defineComponent({\n components: {\n NcDialog,\n NcNoteCard,\n NcTextField\n },\n props: {\n error: {\n type: InvalidFilenameError,\n required: true\n },\n /**\n * @deprecated just for legacy reasons, replace with function from @nextcloud/files in future\n */\n validateFilename: {\n type: Function,\n required: true\n }\n },\n setup() {\n return {\n t\n };\n },\n data() {\n return {\n newName: \"\",\n validationError: \"\"\n };\n },\n computed: {\n isValidName() {\n return this.validationError === \"\";\n },\n isInvalidFileType() {\n return this.error.reason === InvalidFilenameErrorReason.Extension && this.error.segment.match(/^\\.\\w/) !== null;\n },\n canRename() {\n return !this.isInvalidFileType;\n },\n dialogButtons() {\n const buttons = [\n {\n label: t(\"Cancel\"),\n type: \"error\",\n callback: () => {\n this.$emit(\"close\", { cancel: true });\n }\n },\n {\n label: t(\"Skip\"),\n callback: () => {\n this.$emit(\"close\", { skip: true });\n }\n }\n ];\n if (this.canRename) {\n buttons.push({\n label: t(\"Rename\"),\n type: \"primary\",\n disabled: !this.isValidName,\n callback: () => {\n this.$emit(\"close\", { rename: this.newName.trimEnd() });\n }\n });\n }\n return buttons;\n }\n },\n watch: {\n error: {\n handler() {\n this.validationError = this.getErrorText(this.error);\n this.newName = this.error.filename;\n },\n immediate: true\n },\n newName() {\n try {\n this.validateFilename(this.newName.trimEnd());\n this.validationError = \"\";\n } catch (error) {\n this.validationError = this.getErrorText(error);\n } finally {\n const textfield = this.$refs.textfield?.$el.querySelector(\"input\");\n if (textfield) {\n textfield.setCustomValidity(this.validationError);\n textfield.reportValidity();\n }\n }\n }\n },\n methods: {\n getErrorText(error) {\n switch (error.reason) {\n case InvalidFilenameErrorReason.Character:\n return t('\"{segment}\" is not allowed inside a file or folder name.', { segment: error.segment });\n case InvalidFilenameErrorReason.ReservedName:\n return t('\"{segment}\" is a forbidden file or folder name.', { segment: error.segment });\n case InvalidFilenameErrorReason.Extension:\n return error.segment.match(/\\.\\w/) ? t('\"{segment}\" is a forbidden file type.', { segment: error.segment }) : t('Filenames must not end with \"{segment}\".', { segment: error.segment });\n }\n }\n }\n});\nvar _sfc_render = function render() {\n var _vm = this, _c = _vm._self._c;\n _vm._self._setupProxy;\n return _c(\"NcDialog\", { attrs: { \"buttons\": _vm.dialogButtons, \"name\": _vm.t(\"Invalid filename\") }, on: { \"close\": function($event) {\n return _vm.$emit(\"close\", { cancel: true });\n } } }, [_c(\"NcNoteCard\", { attrs: { \"severity\": \"error\" } }, [_vm._v(\" \" + _vm._s(_vm.getErrorText(_vm.error)) + \" \" + _vm._s(_vm.t(\"You can either rename the file, skip this file or cancel the whole operation.\")) + \" \")]), _vm.canRename ? _c(\"NcTextField\", { ref: \"textfield\", staticClass: \"invalid-filename-dialog__input\", attrs: { \"error\": !_vm.isValidName, \"helper-text\": _vm.validationError, \"label\": _vm.t(\"New filename\"), \"value\": _vm.newName }, on: { \"update:value\": function($event) {\n _vm.newName = $event;\n } } }) : _vm._e()], 1);\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n \"3a479259\"\n);\nconst InvalidFilenameDialog = __component__.exports;\nexport {\n InvalidFilenameDialog as default\n};\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","_sfc_main","components","NcDialog","NcNoteCard","NcTextField","props","error","type","required","validateFilename","Function","setup","t","data","newName","validationError","computed","isValidName","this","isInvalidFileType","reason","Extension","segment","match","canRename","dialogButtons","buttons","label","callback","$emit","cancel","skip","disabled","rename","trimEnd","watch","handler","getErrorText","filename","immediate","textfield","$refs","$el","querySelector","setCustomValidity","reportValidity","methods","Character","ReservedName","_sfc_render","_vm","_c","_self","_setupProxy","attrs","on","$event","_v","_s","ref","staticClass","_e","_sfc_staticRenderFns","InvalidFilenameDialog","n","exports"],"sourceRoot":""}