>>=y,p-=y),p<15&&(d+=z[n++]<>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<>>=y,p-=y,(y=s-a)>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=\"\",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(n),t.distcode=t.distdyn=new I.Buf32(i),t.sane=1,t.back=-1,N):U}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):U}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=s.wsize?(I.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),I.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(I.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg=\"incorrect header check\",r.mode=30;break}if(8!=(15&u)){e.msg=\"unknown compression method\",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg=\"invalid window size\",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>>8&255,r.check=B(r.check,E,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(d=r.length)&&(d=o),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,s,d,k)),512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break e;o--,u+=n[s++]<>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg=\"invalid block type\",r.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[s++]<>>16^65535)){e.msg=\"invalid stored block lengths\",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(o>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286>>=3,l-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg=\"invalid code lengths set\",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=_,l-=_,r.lens[r.have++]=b;else{if(16===b){for(z=_+2;l>>=_,l-=_,0===r.have){e.msg=\"invalid bit length repeat\",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2}else if(17===b){for(z=_+3;l>>=_)),u>>>=3,l-=3}else{for(z=_+7;l>>=_)),u>>>=7,l-=7}if(r.have+d>r.nlen+r.ndist){e.msg=\"invalid bit length repeat\",r.mode=30;break}for(;d--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){e.msg=\"invalid code -- missing end-of-block\",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg=\"invalid literal/lengths set\",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){e.msg=\"invalid distances set\",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=o&&258<=h){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,R(e,c),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){e.msg=\"invalid literal/length code\",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg=\"invalid distance code\",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg=\"invalid distance too far back\",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(d=c-h,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg=\"invalid distance too far back\",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,p=a-r.offset,d=r.length;for(hd?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=t[r+a[v]]}if(k>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function P(e,t,r){e.bi_valid>d-r?(e.bi_buf|=t<>d-e.bi_valid,e.bi_valid+=r-d):(e.bi_buf|=t<>>=1,r<<=1,0<--t;);return r>>>1}function Z(e,t,r){var n,i,s=new Array(g+1),a=0;for(n=1;n<=g;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=j(s[o]++,o))}}function W(e){var t;for(t=0;t>1;1<=r;r--)G(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,G(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=g;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(s=h[2*h[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),h[2*n+1]=s,u>=7;n>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?J(e,t,r,n):4===e.strategy||s===i?(P(e,2+(n?1:0),3),K(e,z,C)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+u+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){P(e,2,3),L(e,m,z),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{\"../utils/common\":41}],53:[function(e,t,r){\"use strict\";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(r,n){\"use strict\";if(!r.setImmediate){var i,s,t,a,o=1,h={},u=!1,l=r.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(r);e=e&&e.setTimeout?e:r,i=\"[object process]\"==={}.toString.call(r.process)?function(e){process.nextTick(function(){c(e)})}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1},r.postMessage(\"\",\"*\"),r.onmessage=t,e}}()?(a=\"setImmediate$\"+Math.random()+\"$\",r.addEventListener?r.addEventListener(\"message\",d,!1):r.attachEvent(\"onmessage\",d),function(e){r.postMessage(a+e,\"*\")}):r.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data)},function(e){t.port2.postMessage(e)}):l&&\"onreadystatechange\"in l.createElement(\"script\")?(s=l.documentElement,function(e){var t=l.createElement(\"script\");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,s.removeChild(t),t=null},s.appendChild(t)}):function(e){setTimeout(c,0,e)},e.setImmediate=function(e){\"function\"!=typeof e&&(e=new Function(\"\"+e));for(var t=new Array(arguments.length-1),r=0;r $options.dialogVisible = $event),\n title: $props.isBatchMove ? _ctx.$t('moveFile.batchTitle') : _ctx.$t('moveFile.title'),\n width: \"500px\",\n \"show-close\": true,\n class: \"move-dialog\",\n onClose: $options.handleClose\n }, {\n footer: _withCtx(() => [_createElementVNode(\"span\", _hoisted_5, [_createVNode(_component_el_button, {\n onClick: $options.handleClose\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('moveFile.cancel')), 1)]),\n _: 1\n }, 8, [\"onClick\"]), _createVNode(_component_el_button, {\n type: \"primary\",\n loading: $data.loading,\n onClick: $options.handleConfirm\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('moveFile.confirm')), 1)]),\n _: 1\n }, 8, [\"loading\", \"onClick\"])])]),\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_2, [_createElementVNode(\"div\", _hoisted_3, [_createVNode(_component_el_input, {\n modelValue: $data.targetPath,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $data.targetPath = $event),\n placeholder: _ctx.$t('moveFile.targetPlaceholder'),\n class: \"move-path-input\"\n }, {\n prepend: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('moveFile.targetDirectory')), 1)]),\n _: 1\n }, 8, [\"modelValue\", \"placeholder\"]), _createVNode(_component_DirectoryTreePicker, {\n \"current-directory\": $props.currentDirectory,\n source: \"admin\",\n onSelect: $options.handleDirectorySelect\n }, {\n trigger: _withCtx(() => [_createVNode(_component_el_button, {\n class: \"directory-picker-trigger\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"folder-tree\"\n })]),\n _: 1\n })]),\n _: 1\n }, 8, [\"current-directory\", \"onSelect\"])]), _createElementVNode(\"p\", _hoisted_4, _toDisplayString(_ctx.$t('moveFile.hint')), 1)])]),\n _: 1\n }, 8, [\"modelValue\", \"title\", \"onClose\"])) : (_openBlock(), _createBlock(_component_el_drawer, {\n key: 1,\n modelValue: $options.dialogVisible,\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = $event => $options.dialogVisible = $event),\n title: $props.isBatchMove ? _ctx.$t('moveFile.batchTitle') : _ctx.$t('moveFile.title'),\n direction: \"btt\",\n size: \"auto\",\n \"show-close\": true,\n class: \"move-drawer\",\n onClose: $options.handleClose\n }, {\n footer: _withCtx(() => [_createElementVNode(\"div\", _hoisted_18, [_createVNode(_component_el_button, {\n onClick: $options.handleClose,\n class: \"footer-btn\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('moveFile.cancel')), 1)]),\n _: 1\n }, 8, [\"onClick\"]), _createVNode(_component_el_button, {\n type: \"primary\",\n loading: $data.loading,\n onClick: $options.handleConfirm,\n class: \"footer-btn\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('moveFile.confirm')), 1)]),\n _: 1\n }, 8, [\"loading\", \"onClick\"])])]),\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_6, [_createElementVNode(\"div\", _hoisted_7, [_createElementVNode(\"div\", _hoisted_8, _toDisplayString(_ctx.$t('moveFile.targetDirectory')), 1), _createElementVNode(\"div\", _hoisted_9, [_createVNode(_component_el_input, {\n modelValue: $data.targetPath,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => $data.targetPath = $event),\n placeholder: _ctx.$t('moveFile.targetPlaceholder'),\n class: \"move-path-input\"\n }, null, 8, [\"modelValue\", \"placeholder\"]), _createVNode(_component_el_button, {\n class: \"directory-picker-trigger\",\n onClick: _cache[3] || (_cache[3] = $event => $data.showTreePicker = true)\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"folder-tree\"\n })]),\n _: 1\n })]), _createElementVNode(\"p\", _hoisted_10, _toDisplayString(_ctx.$t('moveFile.hintMobile')), 1)]), $data.showTreePicker ? (_openBlock(), _createElementBlock(\"div\", _hoisted_11, [_createElementVNode(\"div\", _hoisted_12, [_createElementVNode(\"span\", _hoisted_13, _toDisplayString(_ctx.$t('moveFile.selectDirectory')), 1), _createVNode(_component_el_button, {\n text: \"\",\n onClick: _cache[4] || (_cache[4] = $event => $data.showTreePicker = false)\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"times\"\n })]),\n _: 1\n })]), _withDirectives((_openBlock(), _createElementBlock(\"div\", _hoisted_14, [$data.treeError ? (_openBlock(), _createElementBlock(\"div\", _hoisted_15, [_createVNode(_component_font_awesome_icon, {\n icon: \"exclamation-circle\",\n class: \"error-icon\"\n }), _createElementVNode(\"span\", _hoisted_16, _toDisplayString($data.treeError), 1), _createVNode(_component_el_button, {\n type: \"primary\",\n size: \"small\",\n onClick: $options.fetchDirectoryTree\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('moveFile.retry')), 1)]),\n _: 1\n }, 8, [\"onClick\"])])) : (_openBlock(), _createBlock(_component_el_tree, {\n key: 1,\n ref: \"treeRef\",\n data: $data.treeData,\n props: $data.treeProps,\n \"node-key\": \"path\",\n \"default-expand-all\": false,\n \"expand-on-click-node\": false,\n \"highlight-current\": true,\n \"current-node-key\": $props.currentDirectory,\n class: \"directory-tree\",\n onNodeClick: $options.handleTreeNodeClick\n }, {\n default: _withCtx(({\n node,\n data\n }) => [_createElementVNode(\"span\", {\n class: _normalizeClass([\"tree-node\", {\n 'is-current': data.path === $props.currentDirectory\n }])\n }, [_createVNode(_component_font_awesome_icon, {\n icon: node.expanded ? 'folder-open' : 'folder',\n class: \"folder-icon\"\n }, null, 8, [\"icon\"]), _createElementVNode(\"span\", _hoisted_17, _toDisplayString(data.name), 1)], 2)]),\n _: 1\n }, 8, [\"data\", \"props\", \"current-node-key\", \"onNodeClick\"]))])), [[_directive_loading, $data.treeLoading]])])) : _createCommentVNode(\"\", true)])]),\n _: 1\n }, 8, [\"modelValue\", \"title\", \"onClose\"]))]);\n}","import DirectoryTreePicker from '@/components/DirectoryTreePicker.vue';\nimport fetchWithAuth from '@/utils/fetchWithAuth';\nexport default {\n name: 'MoveFileDialog',\n components: {\n DirectoryTreePicker\n },\n props: {\n modelValue: {\n type: Boolean,\n default: false\n },\n currentDirectory: {\n type: String,\n default: ''\n },\n isBatchMove: {\n type: Boolean,\n default: false\n },\n initialPath: {\n type: String,\n default: '/'\n }\n },\n emits: ['update:modelValue', 'confirm', 'close'],\n data() {\n return {\n targetPath: '/',\n loading: false,\n windowWidth: window.innerWidth,\n // 移动端内嵌树相关\n showTreePicker: false,\n treeData: [],\n treeLoading: false,\n treeError: '',\n treeProps: {\n children: 'children',\n label: 'name'\n }\n };\n },\n computed: {\n dialogVisible: {\n get() {\n return this.modelValue;\n },\n set(val) {\n this.$emit('update:modelValue', val);\n }\n },\n isDesktop() {\n return this.windowWidth > 768;\n }\n },\n watch: {\n modelValue(newVal) {\n if (newVal) {\n this.targetPath = this.initialPath || '/';\n this.showTreePicker = false;\n }\n },\n showTreePicker(newVal) {\n if (newVal && !this.isDesktop) {\n this.fetchDirectoryTree();\n }\n }\n },\n mounted() {\n window.addEventListener('resize', this.handleResize);\n },\n beforeUnmount() {\n window.removeEventListener('resize', this.handleResize);\n },\n methods: {\n handleResize() {\n this.windowWidth = window.innerWidth;\n },\n handleDirectorySelect(path) {\n this.targetPath = path;\n },\n handleConfirm() {\n this.$emit('confirm', this.targetPath);\n },\n handleClose() {\n this.$emit('update:modelValue', false);\n this.$emit('close');\n },\n // 移动端内嵌树相关方法\n async fetchDirectoryTree() {\n this.treeLoading = true;\n this.treeError = '';\n try {\n const response = await fetchWithAuth('/api/directoryTree', {\n method: 'GET'\n });\n if (!response.ok) {\n if (response.status === 401) {\n this.treeError = this.$t('moveFile.authFailed');\n } else {\n this.treeError = this.$t('moveFile.serverError');\n }\n return;\n }\n const data = await response.json();\n if (data.tree) {\n this.treeData = [data.tree];\n } else {\n this.treeData = [];\n }\n } catch (err) {\n console.error('Failed to fetch directory tree:', err);\n this.treeError = this.$t('moveFile.loadTreeFailed');\n } finally {\n this.treeLoading = false;\n }\n },\n handleTreeNodeClick(data) {\n let path = data.path;\n if (path && !path.startsWith('/')) {\n path = '/' + path;\n } else if (!path) {\n path = '/';\n }\n this.targetPath = path;\n this.showTreePicker = false;\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./MoveFileDialog.vue?vue&type=template&id=7aaa437c&scoped=true\"\nimport script from \"./MoveFileDialog.vue?vue&type=script&lang=js\"\nexport * from \"./MoveFileDialog.vue?vue&type=script&lang=js\"\n\nimport \"./MoveFileDialog.vue?vue&type=style&index=0&id=7aaa437c&scoped=true&lang=css\"\nimport \"./MoveFileDialog.vue?vue&type=style&index=1&id=7aaa437c&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-7aaa437c\"]])\n\nexport default __exports__","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, withModifiers as _withModifiers, Transition as _Transition, withCtx as _withCtx, Teleport as _Teleport, createBlock as _createBlock } from \"vue\";\nconst _hoisted_1 = {\n class: \"mobile-drawer-header\"\n};\nconst _hoisted_2 = {\n class: \"mobile-drawer-title\"\n};\nconst _hoisted_3 = {\n class: \"mobile-drawer-content\"\n};\nconst _hoisted_4 = [\"onClick\"];\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n return _openBlock(), _createBlock(_Teleport, {\n to: \"body\"\n }, [_createVNode(_Transition, {\n name: \"drawer-slide\"\n }, {\n default: _withCtx(() => [$props.modelValue ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"mobile-drawer-overlay\",\n onClick: _cache[3] || (_cache[3] = (...args) => $options.close && $options.close(...args))\n }, [_createElementVNode(\"div\", {\n class: \"mobile-drawer\",\n onClick: _cache[2] || (_cache[2] = _withModifiers(() => {}, [\"stop\"]))\n }, [_createElementVNode(\"div\", _hoisted_1, [_createElementVNode(\"span\", _hoisted_2, _toDisplayString(_ctx.$t('mobileDirectory.title')), 1), _createVNode(_component_font_awesome_icon, {\n icon: \"times\",\n class: \"mobile-drawer-close\",\n onClick: $options.close\n }, null, 8, [\"onClick\"])]), _createElementVNode(\"div\", _hoisted_3, [_createElementVNode(\"div\", {\n class: _normalizeClass([\"mobile-drawer-item\", {\n active: !$props.currentPath\n }]),\n onClick: _cache[0] || (_cache[0] = $event => $options.navigate(''))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"home\",\n class: \"mobile-drawer-item-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('mobileDirectory.rootDirectory')), 1)], 2), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($options.pathParts, (folder, index) => {\n return _openBlock(), _createElementBlock(\"div\", {\n key: index,\n class: _normalizeClass([\"mobile-drawer-item\", {\n active: index === $options.pathParts.length - 1\n }]),\n style: _normalizeStyle({\n paddingLeft: (index + 1) * 16 + 16 + 'px'\n }),\n onClick: $event => $options.navigate($options.pathParts.slice(0, index + 1).join('/'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"folder\",\n class: \"mobile-drawer-item-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString(folder), 1)], 14, _hoisted_4);\n }), 128)), $props.currentPath ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"mobile-drawer-back\",\n onClick: _cache[1] || (_cache[1] = (...args) => $options.goBack && $options.goBack(...args))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"arrow-left\",\n class: \"mobile-drawer-item-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('mobileDirectory.goBack')), 1)])) : _createCommentVNode(\"\", true)])])])) : _createCommentVNode(\"\", true)]),\n _: 1\n })]);\n}","import \"core-js/modules/es.iterator.constructor.js\";\nimport \"core-js/modules/es.iterator.filter.js\";\nexport default {\n name: 'MobileDirectoryDrawer',\n props: {\n modelValue: {\n type: Boolean,\n default: false\n },\n currentPath: {\n type: String,\n default: ''\n }\n },\n emits: ['update:modelValue', 'navigate', 'goBack'],\n computed: {\n pathParts() {\n return this.currentPath.split('/').filter(Boolean);\n }\n },\n methods: {\n close() {\n this.$emit('update:modelValue', false);\n },\n navigate(path) {\n this.$emit('navigate', path);\n this.close();\n },\n goBack() {\n this.$emit('goBack');\n this.close();\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./MobileDirectoryDrawer.vue?vue&type=template&id=feeadb1c&scoped=true\"\nimport script from \"./MobileDirectoryDrawer.vue?vue&type=script&lang=js\"\nexport * from \"./MobileDirectoryDrawer.vue?vue&type=script&lang=js\"\n\nimport \"./MobileDirectoryDrawer.vue?vue&type=style&index=0&id=feeadb1c&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-feeadb1c\"]])\n\nexport default __exports__","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, resolveComponent as _resolveComponent, createVNode as _createVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, withModifiers as _withModifiers, Transition as _Transition, withCtx as _withCtx, Teleport as _Teleport, createBlock as _createBlock } from \"vue\";\nconst _hoisted_1 = {\n class: \"bottom-sheet-header\"\n};\nconst _hoisted_2 = {\n class: \"bottom-sheet-title\"\n};\nconst _hoisted_3 = {\n class: \"bottom-sheet-content\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n return _openBlock(), _createBlock(_Teleport, {\n to: \"body\"\n }, [_createVNode(_Transition, {\n name: \"bottom-sheet\"\n }, {\n default: _withCtx(() => [$props.modelValue ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"bottom-sheet-overlay\",\n onClick: _cache[9] || (_cache[9] = (...args) => $options.close && $options.close(...args))\n }, [_createElementVNode(\"div\", {\n class: \"bottom-sheet\",\n onClick: _cache[8] || (_cache[8] = _withModifiers(() => {}, [\"stop\"]))\n }, [_createElementVNode(\"div\", _hoisted_1, [_cache[10] || (_cache[10] = _createElementVNode(\"div\", {\n class: \"bottom-sheet-handle\"\n }, null, -1)), _createElementVNode(\"span\", _hoisted_2, _toDisplayString($props.title), 1)]), _createElementVNode(\"div\", _hoisted_3, [!$props.isFolder ? (_openBlock(), _createElementBlock(_Fragment, {\n key: 0\n }, [_createElementVNode(\"div\", {\n class: \"bottom-sheet-item\",\n onClick: _cache[0] || (_cache[0] = $event => $options.handleAction('detail'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"info-circle\",\n class: \"bottom-sheet-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('mobileAction.viewDetail')), 1)]), _createElementVNode(\"div\", {\n class: \"bottom-sheet-item\",\n onClick: _cache[1] || (_cache[1] = $event => $options.handleAction('copy'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"copy\",\n class: \"bottom-sheet-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('mobileAction.copyLink')), 1)]), _createElementVNode(\"div\", {\n class: \"bottom-sheet-item\",\n onClick: _cache[2] || (_cache[2] = $event => $options.handleAction('download'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"download\",\n class: \"bottom-sheet-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('mobileAction.downloadFile')), 1)]), _createElementVNode(\"div\", {\n class: \"bottom-sheet-item\",\n onClick: _cache[3] || (_cache[3] = $event => $options.handleAction('move'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"file-export\",\n class: \"bottom-sheet-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('mobileAction.moveFile')), 1)]), _createElementVNode(\"div\", {\n class: \"bottom-sheet-item\",\n onClick: _cache[4] || (_cache[4] = $event => $options.handleAction('tag'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"tags\",\n class: \"bottom-sheet-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('mobileAction.tagManagement')), 1)])], 64)) : (_openBlock(), _createElementBlock(_Fragment, {\n key: 1\n }, [_createElementVNode(\"div\", {\n class: \"bottom-sheet-item\",\n onClick: _cache[5] || (_cache[5] = $event => $options.handleAction('folderCopy'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"copy\",\n class: \"bottom-sheet-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('mobileAction.copyLink')), 1)]), _createElementVNode(\"div\", {\n class: \"bottom-sheet-item\",\n onClick: _cache[6] || (_cache[6] = $event => $options.handleAction('move'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"file-export\",\n class: \"bottom-sheet-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('mobileAction.moveFolder')), 1)])], 64)), _createElementVNode(\"div\", {\n class: \"bottom-sheet-item bottom-sheet-danger\",\n onClick: _cache[7] || (_cache[7] = $event => $options.handleAction('delete'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"trash-alt\",\n class: \"bottom-sheet-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString($props.isFolder ? _ctx.$t('mobileAction.deleteFolder') : _ctx.$t('mobileAction.deleteFile')), 1)])])])])) : _createCommentVNode(\"\", true)]),\n _: 1\n })]);\n}","export default {\n name: 'MobileActionSheet',\n props: {\n modelValue: {\n type: Boolean,\n default: false\n },\n title: {\n type: String,\n default: ''\n },\n isFolder: {\n type: Boolean,\n default: false\n }\n },\n emits: ['update:modelValue', 'action'],\n methods: {\n close() {\n this.$emit('update:modelValue', false);\n },\n handleAction(action) {\n this.$emit('action', action);\n this.close();\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./MobileActionSheet.vue?vue&type=template&id=f5c66568&scoped=true\"\nimport script from \"./MobileActionSheet.vue?vue&type=script&lang=js\"\nexport * from \"./MobileActionSheet.vue?vue&type=script&lang=js\"\n\nimport \"./MobileActionSheet.vue?vue&type=style&index=0&id=f5c66568&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-f5c66568\"]])\n\nexport default __exports__","import \"core-js/modules/es.array.push.js\";\nimport { resolveComponent as _resolveComponent, createVNode as _createVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, resolveDirective as _resolveDirective, withDirectives as _withDirectives } from \"vue\";\nconst _hoisted_1 = {\n class: \"ai-tags\"\n};\nconst _hoisted_2 = {\n class: \"ai-toolbar\"\n};\nconst _hoisted_3 = {\n class: \"ai-heading\"\n};\nconst _hoisted_4 = {\n class: \"ai-heading-icon\"\n};\nconst _hoisted_5 = {\n key: 0,\n class: \"ai-empty\"\n};\nconst _hoisted_6 = {\n class: \"ai-empty-icon\"\n};\nconst _hoisted_7 = {\n class: \"ai-empty-title\"\n};\nconst _hoisted_8 = {\n key: 1,\n class: \"ai-empty ai-ready\"\n};\nconst _hoisted_9 = {\n class: \"ai-empty-icon\"\n};\nconst _hoisted_10 = {\n class: \"ai-empty-title\"\n};\nconst _hoisted_11 = {\n key: 2,\n class: \"ai-progress\"\n};\nconst _hoisted_12 = {\n class: \"ai-progress-label\"\n};\nconst _hoisted_13 = {\n key: 3,\n class: \"ai-results\"\n};\nconst _hoisted_14 = {\n class: \"ai-result-heading\"\n};\nconst _hoisted_15 = {\n class: \"ai-file\"\n};\nconst _hoisted_16 = {\n key: 1,\n class: \"ai-tag-list\"\n};\nconst _hoisted_17 = {\n key: 0,\n class: \"ai-empty-title\"\n};\nconst _hoisted_18 = {\n key: 4,\n class: \"ai-footer\"\n};\nconst _hoisted_19 = {\n class: \"ai-selection\"\n};\nconst _hoisted_20 = {\n class: \"ai-footer-actions\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n const _component_el_tooltip = _resolveComponent(\"el-tooltip\");\n const _component_el_button = _resolveComponent(\"el-button\");\n const _component_el_progress = _resolveComponent(\"el-progress\");\n const _component_el_tag = _resolveComponent(\"el-tag\");\n const _component_el_alert = _resolveComponent(\"el-alert\");\n const _component_el_check_tag = _resolveComponent(\"el-check-tag\");\n const _directive_loading = _resolveDirective(\"loading\");\n return _withDirectives((_openBlock(), _createElementBlock(\"section\", _hoisted_1, [_createElementVNode(\"div\", _hoisted_2, [_createElementVNode(\"div\", _hoisted_3, [_createElementVNode(\"span\", _hoisted_4, [_createVNode(_component_font_awesome_icon, {\n icon: \"robot\"\n })]), _createElementVNode(\"h4\", null, _toDisplayString(_ctx.$t('aiTags.tab')), 1), _createVNode(_component_el_tooltip, {\n content: _ctx.$t('aiTags.hint'),\n placement: \"top\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"question-circle\",\n class: \"help-icon\"\n })]),\n _: 1\n }, 8, [\"content\"])]), $data.available ? (_openBlock(), _createBlock(_component_el_button, {\n key: 0,\n type: \"primary\",\n loading: $data.generating,\n disabled: $props.disabled || $data.saving || !$props.files.length,\n onClick: _cache[0] || (_cache[0] = $event => $options.generate(false))\n }, {\n default: _withCtx(() => [!$data.generating ? (_openBlock(), _createBlock(_component_font_awesome_icon, {\n key: 0,\n icon: \"tags\"\n })) : _createCommentVNode(\"\", true), _createTextVNode(_toDisplayString(_ctx.$t('aiTags.generate')), 1)]),\n _: 1\n }, 8, [\"loading\", \"disabled\"])) : _createCommentVNode(\"\", true)]), !$data.loadingConfig && !$data.available ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [_createElementVNode(\"span\", _hoisted_6, [_createVNode(_component_font_awesome_icon, {\n icon: \"cog\"\n })]), _createElementVNode(\"span\", _hoisted_7, _toDisplayString($data.configError || _ctx.$t('aiTags.disabled')), 1), _createVNode(_component_el_button, {\n type: \"primary\",\n plain: \"\",\n onClick: _cache[1] || (_cache[1] = $event => _ctx.$router.push('/systemConfig#ai'))\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"cog\"\n }), _createTextVNode(_toDisplayString(_ctx.$t('aiTags.settings')), 1)]),\n _: 1\n })])) : $data.available && !$data.rows.length && !$data.generating ? (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [_createElementVNode(\"span\", _hoisted_9, [_createVNode(_component_font_awesome_icon, {\n icon: \"tags\"\n })]), _createElementVNode(\"span\", _hoisted_10, _toDisplayString(_ctx.$t('aiTags.ready')), 1)])) : _createCommentVNode(\"\", true), $data.generating ? (_openBlock(), _createElementBlock(\"div\", _hoisted_11, [_createElementVNode(\"div\", _hoisted_12, [_createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('aiTags.progress', {\n done: $data.completed,\n total: $data.workTotal\n })), 1), _createVNode(_component_el_button, {\n size: \"small\",\n onClick: $options.cancel\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('aiTags.cancel')), 1)]),\n _: 1\n }, 8, [\"onClick\"])]), _createVNode(_component_el_progress, {\n percentage: $data.workTotal ? Math.round($data.completed / $data.workTotal * 100) : 0,\n \"show-text\": false,\n \"stroke-width\": 6\n }, null, 8, [\"percentage\"])])) : _createCommentVNode(\"\", true), $data.rows.length ? (_openBlock(), _createElementBlock(\"div\", _hoisted_13, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.rows, row => {\n return _openBlock(), _createElementBlock(\"div\", {\n key: row.fileId,\n class: \"ai-result\"\n }, [_createElementVNode(\"div\", _hoisted_14, [_createVNode(_component_font_awesome_icon, {\n icon: \"image\",\n class: \"ai-file-icon\"\n }), _createElementVNode(\"span\", _hoisted_15, _toDisplayString($options.fileName(row.fileId)), 1), row.applied ? (_openBlock(), _createBlock(_component_el_tag, {\n key: 0,\n size: \"small\",\n type: \"success\",\n effect: \"light\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"check\"\n }), _createTextVNode(\" \" + _toDisplayString(_ctx.$t('aiTags.saved')), 1)]),\n _: 1\n })) : _createCommentVNode(\"\", true)]), row.error ? (_openBlock(), _createBlock(_component_el_alert, {\n key: 0,\n title: $options.errorText(row.error),\n type: \"error\",\n \"show-icon\": \"\",\n closable: false\n }, null, 8, [\"title\"])) : (_openBlock(), _createElementBlock(\"div\", _hoisted_16, [row.applied ? (_openBlock(true), _createElementBlock(_Fragment, {\n key: 0\n }, _renderList(row.selected, tag => {\n return _openBlock(), _createBlock(_component_el_tag, {\n key: tag,\n type: \"success\",\n effect: \"light\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(tag), 1)]),\n _: 2\n }, 1024);\n }), 128)) : (_openBlock(), _createElementBlock(_Fragment, {\n key: 1\n }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(row.tags, tag => {\n return _openBlock(), _createBlock(_component_el_check_tag, {\n key: tag,\n checked: row.selected.includes(tag),\n \"aria-disabled\": $props.disabled || $data.saving || $data.generating,\n onChange: $event => $options.toggleTag(row, tag)\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(tag), 1)]),\n _: 2\n }, 1032, [\"checked\", \"aria-disabled\", \"onChange\"]);\n }), 128)), !row.tags.length ? (_openBlock(), _createElementBlock(\"span\", _hoisted_17, _toDisplayString(_ctx.$t('aiTags.noTags')), 1)) : _createCommentVNode(\"\", true)], 64))])), row.saveError ? (_openBlock(), _createBlock(_component_el_alert, {\n key: 2,\n title: row.saveError,\n type: \"warning\",\n \"show-icon\": \"\",\n closable: false,\n class: \"ai-save-error\"\n }, null, 8, [\"title\"])) : _createCommentVNode(\"\", true)]);\n }), 128))])) : _createCommentVNode(\"\", true), $data.rows.length && !$data.generating ? (_openBlock(), _createElementBlock(\"div\", _hoisted_18, [_createElementVNode(\"span\", _hoisted_19, _toDisplayString(_ctx.$t('aiTags.selection', {\n count: $options.selectedCount\n })), 1), _createElementVNode(\"div\", _hoisted_20, [$options.retryFiles.length ? (_openBlock(), _createBlock(_component_el_button, {\n key: 0,\n disabled: $props.disabled || $data.saving,\n onClick: _cache[2] || (_cache[2] = $event => $options.generate(true))\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"redo\"\n }), _createTextVNode(_toDisplayString(_ctx.$t('aiTags.retry')), 1)]),\n _: 1\n }, 8, [\"disabled\"])) : _createCommentVNode(\"\", true), _createVNode(_component_el_button, {\n type: \"primary\",\n loading: $data.saving,\n disabled: $props.disabled || !$options.pending.length,\n onClick: $options.apply\n }, {\n default: _withCtx(() => [!$data.saving ? (_openBlock(), _createBlock(_component_font_awesome_icon, {\n key: 0,\n icon: \"save\"\n })) : _createCommentVNode(\"\", true), _createTextVNode(_toDisplayString(_ctx.$t('aiTags.apply')), 1)]),\n _: 1\n }, 8, [\"loading\", \"disabled\", \"onClick\"])])])) : _createCommentVNode(\"\", true)])), [[_directive_loading, $data.loadingConfig]]);\n}","import \"core-js/modules/es.array.push.js\";\nimport \"core-js/modules/es.iterator.constructor.js\";\nimport \"core-js/modules/es.iterator.filter.js\";\nimport \"core-js/modules/es.iterator.find.js\";\nimport \"core-js/modules/es.iterator.map.js\";\nimport \"core-js/modules/es.iterator.reduce.js\";\nimport \"core-js/modules/es.iterator.some.js\";\nimport { apiJSON, aiErrorText, generateTagSuggestions, applyTagSuggestions } from '@/utils/aiTags';\nexport default {\n name: 'AITagPanel',\n props: {\n files: {\n type: Array,\n required: true\n },\n disabled: {\n type: Boolean,\n default: false\n }\n },\n emits: ['applied', 'busy'],\n data() {\n return {\n available: false,\n configError: '',\n loadingConfig: true,\n batchSize: 3,\n generating: false,\n saving: false,\n rows: [],\n completed: 0,\n workTotal: 0\n };\n },\n computed: {\n fileSignature() {\n return JSON.stringify(this.files.map(file => file.name));\n },\n selectedCount() {\n return this.pending.reduce((count, row) => count + row.selected.length, 0);\n },\n retryFiles() {\n return this.files.filter(file => this.rows.some(row => row.fileId === file.name && row.error));\n },\n pending() {\n return this.rows.filter(row => !row.error && !row.applied && row.selected.length);\n }\n },\n watch: {\n fileSignature() {\n this.cancel();\n this.rows = [];\n }\n },\n async mounted() {\n try {\n const config = await apiJSON('/api/manage/ai/tags');\n this.available = config.enabled;\n this.batchSize = config.maxBatchSize;\n } catch (error) {\n this.configError = this.errorText(error);\n } finally {\n this.loadingConfig = false;\n }\n },\n beforeUnmount() {\n this.cancel();\n },\n methods: {\n fileName(id) {\n return this.files.find(file => file.name === id)?.metadata?.FileName || id;\n },\n errorText(error) {\n return aiErrorText(error, this.$t, this.$te);\n },\n toggleTag(row, tag) {\n if (this.disabled || this.saving || this.generating) return;\n row.selected = row.selected.includes(tag) ? row.selected.filter(item => item !== tag) : [...row.selected, tag];\n },\n cancel() {\n this.controller?.abort();\n },\n async generate(retry) {\n if (this.disabled || this.generating || this.saving) return;\n const files = retry ? this.retryFiles : [...this.files];\n const signature = this.fileSignature;\n if (!retry) this.rows = [];\n const controller = new AbortController();\n this.controller = controller;\n this.generating = true;\n this.completed = 0;\n this.workTotal = files.length;\n this.$emit('busy', true);\n try {\n await generateTagSuggestions(files, {\n signal: controller.signal,\n batchSize: this.batchSize,\n onResult: result => {\n if (controller.signal.aborted || signature !== this.fileSignature) return;\n const row = {\n ...result,\n selected: [...(result.tags || [])],\n applied: false,\n saveError: ''\n };\n const index = this.rows.findIndex(item => item.fileId === result.fileId);\n if (index === -1) this.rows.push(row);else this.rows.splice(index, 1, row);\n this.completed++;\n }\n });\n } catch (error) {\n if (signature !== this.fileSignature) return;\n if (error.name === 'AbortError') {\n for (const file of files) {\n if (!this.rows.some(row => row.fileId === file.name && !row.error)) {\n const index = this.rows.findIndex(row => row.fileId === file.name);\n const row = {\n fileId: file.name,\n error: {\n message: 'CANCELLED'\n },\n selected: [],\n applied: false\n };\n if (index === -1) this.rows.push(row);else if (this.rows[index].error?.message === 'CANCELLED') this.rows.splice(index, 1, row);\n }\n }\n }\n if (error.name !== 'AbortError') this.$message.error(this.errorText(error));\n } finally {\n this.generating = false;\n this.$emit('busy', false);\n }\n },\n async apply() {\n if (this.disabled || this.saving || this.generating) return;\n this.saving = true;\n this.$emit('busy', true);\n try {\n await applyTagSuggestions(this.pending.map(row => ({\n fileId: row.fileId,\n tags: row.selected,\n sourceIdentity: row.sourceIdentity,\n repairIndex: !!row.indexPending\n })), result => {\n const row = this.rows.find(item => item.fileId === result.fileId);\n if (!row) return;\n row.indexPending = !!result.indexPending;\n row.applied = result.saved && !result.indexPending;\n row.saveError = result.indexPending ? this.$t('aiTags.indexPending') : result.error ? this.errorText(result.error) : '';\n if (result.saved) this.$emit('applied', [result]);\n });\n } catch (error) {\n this.$message.error(this.errorText(error));\n } finally {\n this.saving = false;\n this.$emit('busy', false);\n }\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./AITagPanel.vue?vue&type=template&id=954f5f34&scoped=true\"\nimport script from \"./AITagPanel.vue?vue&type=script&lang=js\"\nexport * from \"./AITagPanel.vue?vue&type=script&lang=js\"\n\nimport \"./AITagPanel.vue?vue&type=style&index=0&id=954f5f34&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-954f5f34\"]])\n\nexport default __exports__","import { resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, withKeys as _withKeys, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\";\nconst _hoisted_1 = {\n class: \"batch-tag-container\"\n};\nconst _hoisted_2 = {\n class: \"tab-content\"\n};\nconst _hoisted_3 = {\n class: \"tab-description\"\n};\nconst _hoisted_4 = {\n class: \"input-section\"\n};\nconst _hoisted_5 = {\n key: 0,\n class: \"suggestions-panel\"\n};\nconst _hoisted_6 = [\"onClick\"];\nconst _hoisted_7 = {\n class: \"tags-to-add-section\"\n};\nconst _hoisted_8 = {\n key: 0,\n class: \"tags-container\"\n};\nconst _hoisted_9 = {\n key: 1,\n class: \"empty-message\"\n};\nconst _hoisted_10 = {\n class: \"action-buttons\"\n};\nconst _hoisted_11 = {\n class: \"tab-content\"\n};\nconst _hoisted_12 = {\n class: \"tab-description\"\n};\nconst _hoisted_13 = {\n key: 0,\n class: \"common-tags-section\"\n};\nconst _hoisted_14 = {\n class: \"tags-container\"\n};\nconst _hoisted_15 = {\n key: 1,\n class: \"empty-message\"\n};\nconst _hoisted_16 = {\n class: \"tab-content\"\n};\nconst _hoisted_17 = {\n class: \"tab-description\"\n};\nconst _hoisted_18 = {\n class: \"action-buttons\"\n};\nconst _hoisted_19 = {\n class: \"tab-content ai-tab-content\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n const _component_el_button = _resolveComponent(\"el-button\");\n const _component_el_alert = _resolveComponent(\"el-alert\");\n const _component_el_input = _resolveComponent(\"el-input\");\n const _component_el_tag = _resolveComponent(\"el-tag\");\n const _component_el_tab_pane = _resolveComponent(\"el-tab-pane\");\n const _component_AITagPanel = _resolveComponent(\"AITagPanel\");\n const _component_el_tabs = _resolveComponent(\"el-tabs\");\n const _component_el_dialog = _resolveComponent(\"el-dialog\");\n return _openBlock(), _createBlock(_component_el_dialog, {\n title: _ctx.$t('batchTag.title'),\n modelValue: $options.visible,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => $options.visible = $event),\n width: $options.dialogWidth,\n \"before-close\": $options.beforeClose,\n onClose: $options.handleClose\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_1, [$data.pendingIndexIds.length ? (_openBlock(), _createBlock(_component_el_alert, {\n key: 0,\n title: _ctx.$t('tagManagement.indexPending'),\n type: \"warning\",\n \"show-icon\": \"\",\n closable: false\n }, {\n default: _withCtx(() => [_createVNode(_component_el_button, {\n size: \"small\",\n loading: $data.loading,\n disabled: $data.aiBusy,\n onClick: $options.repairIndex\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"redo\"\n }), _createTextVNode(\" \" + _toDisplayString(_ctx.$t('aiTags.retry')), 1)]),\n _: 1\n }, 8, [\"loading\", \"disabled\", \"onClick\"])]),\n _: 1\n }, 8, [\"title\"])) : _createCommentVNode(\"\", true), _createVNode(_component_el_tabs, {\n modelValue: $data.activeTab,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => $data.activeTab = $event),\n type: \"border-card\",\n \"before-leave\": $options.beforeTabChange\n }, {\n default: _withCtx(() => [_createVNode(_component_el_tab_pane, {\n label: _ctx.$t('batchTag.addTab'),\n name: \"add\"\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_2, [_createElementVNode(\"p\", _hoisted_3, _toDisplayString(_ctx.$t('batchTag.addDescription', {\n count: $options.fileCount\n })), 1), _createElementVNode(\"div\", _hoisted_4, [_createVNode(_component_el_input, {\n modelValue: $data.inputTag,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $data.inputTag = $event),\n disabled: $data.loading || $data.aiBusy,\n placeholder: _ctx.$t('batchTag.inputPlaceholder'),\n onKeyup: _withKeys($options.handleAddInputTag, [\"enter\"]),\n onInput: $options.handleInputChange,\n clearable: \"\"\n }, {\n append: _withCtx(() => [_createVNode(_component_el_button, {\n onClick: $options.handleAddInputTag,\n type: \"primary\",\n disabled: $data.loading || $data.aiBusy\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"plus\"\n })]),\n _: 1\n }, 8, [\"onClick\", \"disabled\"])]),\n _: 1\n }, 8, [\"modelValue\", \"disabled\", \"placeholder\", \"onKeyup\", \"onInput\"]), $data.showSuggestions && $data.suggestions.length > 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.suggestions, tag => {\n return _openBlock(), _createElementBlock(\"div\", {\n key: tag,\n class: \"suggestion-item\",\n onClick: $event => $options.selectSuggestion(tag)\n }, _toDisplayString(tag), 9, _hoisted_6);\n }), 128))])) : _createCommentVNode(\"\", true)]), _createElementVNode(\"div\", _hoisted_7, [_createElementVNode(\"h4\", null, _toDisplayString(_ctx.$t('batchTag.pendingTags')), 1), $data.tagsToAdd.length > 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.tagsToAdd, tag => {\n return _openBlock(), _createBlock(_component_el_tag, {\n key: tag,\n closable: !$data.loading && !$data.aiBusy,\n onClose: $event => $options.removeFromToAdd(tag),\n class: \"tag-item\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(tag), 1)]),\n _: 2\n }, 1032, [\"closable\", \"onClose\"]);\n }), 128))])) : (_openBlock(), _createElementBlock(\"div\", _hoisted_9, _toDisplayString(_ctx.$t('batchTag.noPendingTags')), 1))]), _createElementVNode(\"div\", _hoisted_10, [_createVNode(_component_el_button, {\n type: \"primary\",\n onClick: $options.executeAddTags,\n loading: $data.loading,\n disabled: $data.tagsToAdd.length === 0\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('batchTag.addToAllFiles')), 1)]),\n _: 1\n }, 8, [\"onClick\", \"loading\", \"disabled\"])])])]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_tab_pane, {\n label: _ctx.$t('batchTag.removeTab'),\n name: \"remove\"\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_11, [_createElementVNode(\"p\", _hoisted_12, _toDisplayString(_ctx.$t('batchTag.removeDescription')), 1), $data.commonTags.length > 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_13, [_createElementVNode(\"h4\", null, _toDisplayString(_ctx.$t('batchTag.commonTags')), 1), _createElementVNode(\"div\", _hoisted_14, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.commonTags, tag => {\n return _openBlock(), _createBlock(_component_el_tag, {\n key: tag,\n closable: !$data.loading && !$data.aiBusy,\n onClose: $event => $options.handleRemoveCommonTag(tag),\n class: \"tag-item\",\n type: \"warning\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(tag), 1)]),\n _: 2\n }, 1032, [\"closable\", \"onClose\"]);\n }), 128))])])) : (_openBlock(), _createElementBlock(\"div\", _hoisted_15, _toDisplayString(_ctx.$t('batchTag.noCommonTags')), 1))])]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_tab_pane, {\n label: _ctx.$t('batchTag.clearTab'),\n name: \"clear\"\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_16, [_createElementVNode(\"p\", _hoisted_17, _toDisplayString(_ctx.$t('batchTag.clearDescription', {\n count: $options.fileCount\n })), 1), _createVNode(_component_el_alert, {\n title: _ctx.$t('batchTag.clearWarningTitle'),\n type: \"warning\",\n description: _ctx.$t('batchTag.clearWarningDesc'),\n closable: false,\n style: {\n \"margin-bottom\": \"20px\"\n },\n center: \"\"\n }, null, 8, [\"title\", \"description\"]), _createElementVNode(\"div\", _hoisted_18, [_createVNode(_component_el_button, {\n type: \"danger\",\n onClick: $options.handleClearAllTags,\n loading: $data.loading\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('batchTag.confirmClearAll')), 1)]),\n _: 1\n }, 8, [\"onClick\", \"loading\"])])])]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_tab_pane, {\n label: _ctx.$t('aiTags.tab'),\n name: \"ai\",\n lazy: \"\"\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_19, [$options.visible ? (_openBlock(), _createBlock(_component_AITagPanel, {\n key: 0,\n files: $options.selectedFilesOnly,\n disabled: $data.loading,\n onBusy: _cache[1] || (_cache[1] = $event => $data.aiBusy = $event),\n onApplied: $options.handleAIResults\n }, null, 8, [\"files\", \"disabled\", \"onApplied\"])) : _createCommentVNode(\"\", true)])]),\n _: 1\n }, 8, [\"label\"])]),\n _: 1\n }, 8, [\"modelValue\", \"before-leave\"])])]),\n _: 1\n }, 8, [\"title\", \"modelValue\", \"width\", \"before-close\", \"onClose\"]);\n}","import \"core-js/modules/es.array.push.js\";\nimport \"core-js/modules/es.iterator.constructor.js\";\nimport \"core-js/modules/es.iterator.every.js\";\nimport \"core-js/modules/es.iterator.filter.js\";\nimport \"core-js/modules/es.iterator.map.js\";\nimport \"core-js/modules/es.set.difference.v2.js\";\nimport \"core-js/modules/es.set.intersection.v2.js\";\nimport \"core-js/modules/es.set.is-disjoint-from.v2.js\";\nimport \"core-js/modules/es.set.is-subset-of.v2.js\";\nimport \"core-js/modules/es.set.is-superset-of.v2.js\";\nimport \"core-js/modules/es.set.symmetric-difference.v2.js\";\nimport \"core-js/modules/es.set.union.v2.js\";\nimport { ElMessage, ElMessageBox } from 'element-plus';\nimport fetchWithAuth from '@/utils/fetchWithAuth';\nimport AITagPanel from './AITagPanel.vue';\nexport default {\n name: 'BatchTagDialog',\n components: {\n AITagPanel\n },\n props: {\n modelValue: {\n type: Boolean,\n default: false\n },\n selectedFiles: {\n type: Array,\n required: true,\n default: () => []\n }\n },\n emits: ['update:modelValue', 'tagsUpdated'],\n data() {\n return {\n activeTab: 'add',\n inputTag: '',\n tagsToAdd: [],\n commonTags: [],\n suggestions: [],\n showSuggestions: false,\n loading: false,\n pendingIndexIds: [],\n aiBusy: false,\n debounceTimer: null\n };\n },\n computed: {\n visible: {\n get() {\n return this.modelValue;\n },\n set(val) {\n this.$emit('update:modelValue', val);\n }\n },\n dialogWidth() {\n return 'min(600px, 90vw)';\n },\n selectedFilesOnly() {\n // 排除文件夹,只保留文件\n return this.selectedFiles.filter(file => !file.isFolder);\n },\n fileCount() {\n return this.selectedFilesOnly.length;\n },\n fileIds() {\n return this.selectedFilesOnly.map(file => file.name);\n }\n },\n watch: {\n visible(newVal) {\n if (newVal) {\n this.loadCommonTags();\n } else {\n this.resetData();\n }\n },\n activeTab(newTab) {\n if (newTab === 'remove') {\n this.loadCommonTags();\n }\n }\n },\n beforeUnmount() {\n clearTimeout(this.debounceTimer);\n },\n methods: {\n beforeClose(done) {\n if (!this.aiBusy && !this.loading) done();\n },\n beforeTabChange() {\n return !this.aiBusy && !this.loading;\n },\n handleAIResults(results) {\n this.updateSavedTags(results);\n },\n updateSavedTags(results) {\n const pending = new Set(this.pendingIndexIds);\n for (const result of results) {\n if (result.saved) {\n if (result.indexPending) pending.add(result.fileId);else pending.delete(result.fileId);\n }\n }\n this.pendingIndexIds = [...pending];\n this.$emit('tagsUpdated', results);\n this.loadCommonTags(results);\n },\n finishTagOperation(data, successKey) {\n this.updateSavedTags(data.results);\n if (data.success) ElMessage.success(this.$t(successKey, {\n count: data.updated\n }));else ElMessage.warning(this.$t('batchTag.partialSave', {\n saved: data.results.filter(result => result.saved && !result.indexPending).length,\n total: data.results.length\n }));\n return data.success;\n },\n async repairIndex() {\n if (this.loading || this.aiBusy) return;\n this.loading = true;\n try {\n const response = await fetchWithAuth('/api/manage/tags/batch', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n fileIds: this.pendingIndexIds,\n tags: [],\n action: 'add',\n repairIndexIds: this.pendingIndexIds\n })\n });\n if (!response.ok) throw new Error();\n this.finishTagOperation(await response.json(), 'batchTag.addSuccess');\n } catch {\n ElMessage.error(this.$t('batchTag.addFailed'));\n } finally {\n this.loading = false;\n }\n },\n resetData() {\n this.tagsToAdd = [];\n this.inputTag = '';\n this.showSuggestions = false;\n this.activeTab = 'add';\n this.pendingIndexIds = [];\n },\n loadCommonTags(results = []) {\n const updates = new Map(results.filter(result => result.saved).map(result => [result.fileId, result.tags]));\n const allTags = this.selectedFilesOnly.map(file => updates.get(file.name) || file.metadata?.Tags || []);\n this.commonTags = allTags.length ? allTags[0].filter(tag => allTags.every(tags => tags.includes(tag))) : [];\n },\n handleInputChange() {\n clearTimeout(this.debounceTimer);\n if (!this.inputTag || this.inputTag.trim().length === 0) {\n this.showSuggestions = false;\n return;\n }\n this.debounceTimer = setTimeout(() => {\n this.fetchSuggestions();\n }, 300);\n },\n async fetchSuggestions() {\n try {\n const prefix = this.inputTag.trim().toLowerCase();\n const response = await fetchWithAuth(`/api/manage/tags/autocomplete?prefix=${encodeURIComponent(prefix)}&limit=10`, {\n method: 'GET'\n });\n if (response.ok) {\n const data = await response.json();\n this.suggestions = (data.tags || []).filter(tag => !this.tagsToAdd.includes(tag));\n this.showSuggestions = this.suggestions.length > 0;\n }\n } catch (error) {\n console.error('Error fetching suggestions:', error);\n }\n },\n selectSuggestion(tag) {\n this.inputTag = tag;\n this.showSuggestions = false;\n this.handleAddInputTag();\n },\n handleAddInputTag() {\n if (this.loading || this.aiBusy) return;\n const tag = this.inputTag.trim();\n if (!tag) {\n return;\n }\n if (this.tagsToAdd.includes(tag)) {\n ElMessage.warning(this.$t('batchTag.tagAlreadyInList'));\n this.inputTag = '';\n this.showSuggestions = false;\n return;\n }\n this.tagsToAdd.push(tag);\n this.inputTag = '';\n this.showSuggestions = false;\n },\n removeFromToAdd(tag) {\n if (this.loading || this.aiBusy) return;\n const index = this.tagsToAdd.indexOf(tag);\n if (index > -1) {\n this.tagsToAdd.splice(index, 1);\n }\n },\n async executeAddTags() {\n if (this.loading || this.aiBusy) return;\n if (this.tagsToAdd.length === 0) {\n ElMessage.warning(this.$t('batchTag.pleaseAddTags'));\n return;\n }\n this.loading = true;\n try {\n const response = await fetchWithAuth('/api/manage/tags/batch', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n fileIds: this.fileIds,\n repairIndexIds: this.pendingIndexIds,\n action: 'add',\n tags: this.tagsToAdd\n })\n });\n if (response.ok) {\n const data = await response.json();\n if (this.finishTagOperation(data, 'batchTag.addSuccess')) this.tagsToAdd = [];\n } else {\n throw new Error(this.$t('batchTag.addFailed'));\n }\n } catch (error) {\n console.error('Error adding tags:', error);\n ElMessage.error(this.$t('batchTag.addFailed'));\n } finally {\n this.loading = false;\n }\n },\n async handleRemoveCommonTag(tag) {\n if (this.loading || this.aiBusy) return;\n this.loading = true;\n try {\n const response = await fetchWithAuth('/api/manage/tags/batch', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n fileIds: this.fileIds,\n repairIndexIds: this.pendingIndexIds,\n action: 'remove',\n tags: [tag]\n })\n });\n if (response.ok) {\n const data = await response.json();\n this.finishTagOperation(data, 'batchTag.removeSuccess');\n } else {\n throw new Error(this.$t('batchTag.removeFailed'));\n }\n } catch (error) {\n console.error('Error removing tag:', error);\n ElMessage.error(this.$t('batchTag.removeFailed'));\n } finally {\n this.loading = false;\n }\n },\n handleClearAllTags() {\n if (this.loading || this.aiBusy) return;\n ElMessageBox.confirm(this.$t('batchTag.clearConfirmMessage', {\n count: this.fileCount\n }), this.$t('batchTag.clearConfirmTitle'), {\n confirmButtonText: this.$t('batchTag.clearConfirmOk'),\n cancelButtonText: this.$t('batchTag.clearConfirmCancel'),\n type: 'warning'\n }).then(() => {\n this.executeClearTags();\n }).catch(() => {\n ElMessage.info(this.$t('batchTag.clearCancelled'));\n });\n },\n async executeClearTags() {\n if (this.loading || this.aiBusy) return;\n this.loading = true;\n try {\n const response = await fetchWithAuth('/api/manage/tags/batch', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n fileIds: this.fileIds,\n repairIndexIds: this.pendingIndexIds,\n action: 'set',\n tags: []\n })\n });\n if (response.ok) {\n const data = await response.json();\n this.finishTagOperation(data, 'batchTag.clearSuccess');\n } else {\n throw new Error(this.$t('batchTag.clearFailed'));\n }\n } catch (error) {\n console.error('Error clearing tags:', error);\n ElMessage.error(this.$t('batchTag.clearFailed'));\n } finally {\n this.loading = false;\n }\n },\n handleClose() {\n if (this.aiBusy || this.loading) return;\n this.visible = false;\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./BatchTagDialog.vue?vue&type=template&id=2bcde7ae&scoped=true\"\nimport script from \"./BatchTagDialog.vue?vue&type=script&lang=js\"\nexport * from \"./BatchTagDialog.vue?vue&type=script&lang=js\"\n\nimport \"./BatchTagDialog.vue?vue&type=style&index=0&id=2bcde7ae&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-2bcde7ae\"]])\n\nexport default __exports__","import { resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, withKeys as _withKeys, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, createBlock as _createBlock } from \"vue\";\nconst _hoisted_1 = {\n class: \"tag-management-container\"\n};\nconst _hoisted_2 = {\n class: \"input-section\"\n};\nconst _hoisted_3 = {\n key: 0,\n class: \"suggestions-panel\"\n};\nconst _hoisted_4 = [\"onClick\"];\nconst _hoisted_5 = {\n class: \"current-tags-section\"\n};\nconst _hoisted_6 = {\n key: 0,\n class: \"tags-container\"\n};\nconst _hoisted_7 = {\n key: 1,\n class: \"empty-message\"\n};\nconst _hoisted_8 = {\n class: \"popular-tags-section\"\n};\nconst _hoisted_9 = {\n key: 0,\n class: \"tags-container\"\n};\nconst _hoisted_10 = {\n key: 1,\n class: \"empty-message\"\n};\nconst _hoisted_11 = {\n key: 2,\n class: \"empty-message\"\n};\nconst _hoisted_12 = {\n class: \"dialog-footer\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n const _component_el_button = _resolveComponent(\"el-button\");\n const _component_el_input = _resolveComponent(\"el-input\");\n const _component_el_tag = _resolveComponent(\"el-tag\");\n const _component_Loading = _resolveComponent(\"Loading\");\n const _component_el_icon = _resolveComponent(\"el-icon\");\n const _component_el_alert = _resolveComponent(\"el-alert\");\n const _component_AITagPanel = _resolveComponent(\"AITagPanel\");\n const _component_el_dialog = _resolveComponent(\"el-dialog\");\n return _openBlock(), _createBlock(_component_el_dialog, {\n title: _ctx.$t('tagManagement.title'),\n modelValue: $options.visible,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => $options.visible = $event),\n width: $options.dialogWidth,\n \"before-close\": $options.beforeClose,\n onClose: $options.handleClose\n }, {\n footer: _withCtx(() => [_createElementVNode(\"span\", _hoisted_12, [_createVNode(_component_el_button, {\n disabled: $data.aiBusy || $data.loading,\n onClick: $options.handleClose\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('tagManagement.close')), 1)]),\n _: 1\n }, 8, [\"disabled\", \"onClick\"])])]),\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_1, [_createElementVNode(\"div\", _hoisted_2, [_createVNode(_component_el_input, {\n modelValue: $data.inputTag,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $data.inputTag = $event),\n disabled: $data.aiBusy || $data.loading,\n placeholder: _ctx.$t('tagManagement.inputPlaceholder'),\n onKeyup: _withKeys($options.handleAddTag, [\"enter\"]),\n onInput: $options.handleInputChange,\n clearable: \"\"\n }, {\n append: _withCtx(() => [_createVNode(_component_el_button, {\n onClick: $options.handleAddTag,\n type: \"primary\",\n disabled: $data.aiBusy || $data.loading\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"plus\"\n })]),\n _: 1\n }, 8, [\"onClick\", \"disabled\"])]),\n _: 1\n }, 8, [\"modelValue\", \"disabled\", \"placeholder\", \"onKeyup\", \"onInput\"]), $data.showSuggestions && $data.suggestions.length > 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.suggestions, tag => {\n return _openBlock(), _createElementBlock(\"div\", {\n key: tag,\n class: \"suggestion-item\",\n onClick: $event => $options.selectSuggestion(tag)\n }, _toDisplayString(tag), 9, _hoisted_4);\n }), 128))])) : _createCommentVNode(\"\", true)]), _createElementVNode(\"div\", _hoisted_5, [_createElementVNode(\"h4\", null, _toDisplayString(_ctx.$t('tagManagement.currentTags')), 1), $data.currentTags.length > 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.currentTags, tag => {\n return _openBlock(), _createBlock(_component_el_tag, {\n key: tag,\n closable: !$data.aiBusy && !$data.loading,\n onClose: $event => $options.handleRemoveTag(tag),\n class: \"tag-item\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(tag), 1)]),\n _: 2\n }, 1032, [\"closable\", \"onClose\"]);\n }), 128))])) : (_openBlock(), _createElementBlock(\"div\", _hoisted_7, _toDisplayString(_ctx.$t('tagManagement.noTags')), 1))]), _createElementVNode(\"div\", _hoisted_8, [_createElementVNode(\"h4\", null, _toDisplayString(_ctx.$t('tagManagement.popularTags')), 1), $data.popularTags.length > 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.popularTags, tag => {\n return _openBlock(), _createBlock(_component_el_tag, {\n key: tag,\n onClick: $event => $options.handleAddPopularTag(tag),\n class: \"tag-item clickable\",\n type: \"info\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(tag), 1)]),\n _: 2\n }, 1032, [\"onClick\"]);\n }), 128))])) : $data.loadingPopularTags ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [_createVNode(_component_el_icon, {\n class: \"is-loading\"\n }, {\n default: _withCtx(() => [_createVNode(_component_Loading)]),\n _: 1\n }), _createTextVNode(\" \" + _toDisplayString(_ctx.$t('tagManagement.loading')), 1)])) : (_openBlock(), _createElementBlock(\"div\", _hoisted_11, _toDisplayString(_ctx.$t('tagManagement.noPopularTags')), 1))]), $data.indexPending ? (_openBlock(), _createBlock(_component_el_alert, {\n key: 0,\n title: _ctx.$t('tagManagement.indexPending'),\n type: \"warning\",\n \"show-icon\": \"\",\n closable: false\n }, {\n default: _withCtx(() => [_createVNode(_component_el_button, {\n size: \"small\",\n loading: $data.loading,\n disabled: $data.aiBusy,\n onClick: $options.repairIndex\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"redo\"\n }), _createTextVNode(\" \" + _toDisplayString(_ctx.$t('aiTags.retry')), 1)]),\n _: 1\n }, 8, [\"loading\", \"disabled\", \"onClick\"])]),\n _: 1\n }, 8, [\"title\"])) : _createCommentVNode(\"\", true), $options.visible ? (_openBlock(), _createBlock(_component_AITagPanel, {\n key: 1,\n class: \"single-ai-panel\",\n files: $options.aiFiles,\n disabled: $data.loading,\n onBusy: _cache[1] || (_cache[1] = $event => $data.aiBusy = $event),\n onApplied: $options.handleAIResults\n }, null, 8, [\"files\", \"disabled\", \"onApplied\"])) : _createCommentVNode(\"\", true)])]),\n _: 1\n }, 8, [\"title\", \"modelValue\", \"width\", \"before-close\", \"onClose\"]);\n}","import \"core-js/modules/es.iterator.constructor.js\";\nimport \"core-js/modules/es.iterator.filter.js\";\nimport \"core-js/modules/es.iterator.find.js\";\nimport { ElMessage } from 'element-plus';\nimport { Loading } from '@element-plus/icons-vue';\nimport fetchWithAuth from '@/utils/fetchWithAuth';\nimport AITagPanel from './AITagPanel.vue';\nimport { apiJSON, aiErrorText } from '@/utils/aiTags';\nexport default {\n name: 'TagManagementDialog',\n components: {\n Loading,\n AITagPanel\n },\n props: {\n modelValue: {\n type: Boolean,\n default: false\n },\n fileId: {\n type: String,\n required: true\n },\n fileMetadata: {\n type: Object,\n default: () => ({})\n }\n },\n emits: ['update:modelValue', 'tagsUpdated'],\n data() {\n return {\n currentTags: [],\n inputTag: '',\n suggestions: [],\n popularTags: [],\n showSuggestions: false,\n loading: false,\n indexPending: false,\n aiBusy: false,\n loadingPopularTags: false,\n debounceTimer: null\n };\n },\n computed: {\n aiFiles() {\n return this.fileId ? [{\n name: this.fileId,\n metadata: this.fileMetadata\n }] : [];\n },\n visible: {\n get() {\n return this.modelValue;\n },\n set(val) {\n this.$emit('update:modelValue', val);\n }\n },\n dialogWidth() {\n return 'min(500px, 90vw)';\n }\n },\n watch: {\n visible(newVal) {\n if (newVal) {\n this.loadFileTags();\n this.loadPopularTags();\n }\n }\n },\n beforeUnmount() {\n clearTimeout(this.debounceTimer);\n },\n methods: {\n beforeClose(done) {\n if (!this.aiBusy && !this.loading) done();\n },\n handleAIResults(results) {\n const result = results.find(item => item.fileId === this.fileId);\n if (result) {\n this.currentTags = result.tags;\n this.$emit('tagsUpdated', result.tags);\n }\n },\n async repairIndex() {\n if (this.aiBusy || this.loading) return;\n this.loading = true;\n try {\n const data = await apiJSON(`/api/manage/tags/${encodeURIComponent(this.fileId)}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n action: 'add',\n tags: [],\n repairIndex: true\n })\n });\n this.currentTags = data.tags;\n this.indexPending = !!data.indexPending;\n this.$emit('tagsUpdated', this.currentTags);\n } catch (error) {\n ElMessage.error(aiErrorText(error, this.$t, this.$te));\n } finally {\n this.loading = false;\n }\n },\n async loadFileTags() {\n this.loading = true;\n try {\n const response = await fetchWithAuth(`/api/manage/tags/${encodeURIComponent(this.fileId)}`, {\n method: 'GET'\n });\n if (response.ok) {\n const data = await response.json();\n this.currentTags = data.tags || [];\n } else {\n throw new Error('Failed to load tags');\n }\n } catch (error) {\n console.error('Error loading file tags:', error);\n ElMessage.error(this.$t('tagManagement.loadFailed'));\n } finally {\n this.loading = false;\n }\n },\n async loadPopularTags() {\n this.loadingPopularTags = true;\n try {\n const response = await fetchWithAuth('/api/manage/tags/autocomplete?limit=20', {\n method: 'GET'\n });\n if (response.ok) {\n const data = await response.json();\n this.popularTags = (data.tags || []).filter(tag => !this.currentTags.includes(tag));\n }\n } catch (error) {\n console.error('Error loading popular tags:', error);\n } finally {\n this.loadingPopularTags = false;\n }\n },\n handleInputChange() {\n clearTimeout(this.debounceTimer);\n if (!this.inputTag || this.inputTag.trim().length === 0) {\n this.showSuggestions = false;\n return;\n }\n this.debounceTimer = setTimeout(() => {\n this.fetchSuggestions();\n }, 300);\n },\n async fetchSuggestions() {\n try {\n const prefix = this.inputTag.trim().toLowerCase();\n const response = await fetchWithAuth(`/api/manage/tags/autocomplete?prefix=${encodeURIComponent(prefix)}&limit=10`, {\n method: 'GET'\n });\n if (response.ok) {\n const data = await response.json();\n this.suggestions = (data.tags || []).filter(tag => !this.currentTags.includes(tag));\n this.showSuggestions = this.suggestions.length > 0;\n }\n } catch (error) {\n console.error('Error fetching suggestions:', error);\n }\n },\n selectSuggestion(tag) {\n this.inputTag = tag;\n this.showSuggestions = false;\n this.handleAddTag();\n },\n async handleAddTag() {\n if (this.aiBusy || this.loading) return;\n const tag = this.inputTag.trim();\n if (!tag) {\n return;\n }\n if (this.currentTags.includes(tag)) {\n ElMessage.warning(this.$t('tagManagement.tagExists'));\n this.inputTag = '';\n this.showSuggestions = false;\n return;\n }\n this.loading = true;\n try {\n const response = await fetchWithAuth(`/api/manage/tags/${encodeURIComponent(this.fileId)}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n action: 'add',\n repairIndex: this.indexPending,\n tags: [tag]\n })\n });\n if (response.ok) {\n const data = await response.json();\n this.currentTags = data.tags || [];\n this.indexPending = !!data.indexPending;\n this.inputTag = '';\n this.showSuggestions = false;\n if (!data.indexPending) ElMessage.success(this.$t('tagManagement.addSuccess'));\n this.$emit('tagsUpdated', this.currentTags);\n\n // 重新加载常用标签\n this.loadPopularTags();\n } else {\n const error = await response.json();\n ElMessage.error(aiErrorText(error.error || {\n code: 'INTERNAL_ERROR'\n }, this.$t, this.$te));\n }\n } catch (error) {\n console.error('Error adding tag:', error);\n ElMessage.error(this.$t('tagManagement.addFailed'));\n } finally {\n this.loading = false;\n }\n },\n async handleRemoveTag(tag) {\n if (this.aiBusy || this.loading) return;\n this.loading = true;\n try {\n const response = await fetchWithAuth(`/api/manage/tags/${encodeURIComponent(this.fileId)}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n action: 'remove',\n repairIndex: this.indexPending,\n tags: [tag]\n })\n });\n if (response.ok) {\n const data = await response.json();\n this.currentTags = data.tags || [];\n this.indexPending = !!data.indexPending;\n if (!data.indexPending) ElMessage.success(this.$t('tagManagement.removeSuccess'));\n this.$emit('tagsUpdated', this.currentTags);\n\n // 重新加载常用标签\n this.loadPopularTags();\n } else {\n throw new Error(this.$t('tagManagement.removeFailed'));\n }\n } catch (error) {\n console.error('Error removing tag:', error);\n ElMessage.error(this.$t('tagManagement.removeFailed'));\n } finally {\n this.loading = false;\n }\n },\n handleAddPopularTag(tag) {\n if (this.aiBusy || this.loading) return;\n this.inputTag = tag;\n this.handleAddTag();\n },\n handleClose() {\n if (this.aiBusy || this.loading) return;\n this.visible = false;\n this.inputTag = '';\n this.showSuggestions = false;\n this.currentTags = [];\n this.indexPending = false;\n this.popularTags = [];\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./TagManagementDialog.vue?vue&type=template&id=8ac449fe&scoped=true\"\nimport script from \"./TagManagementDialog.vue?vue&type=script&lang=js\"\nexport * from \"./TagManagementDialog.vue?vue&type=script&lang=js\"\n\nimport \"./TagManagementDialog.vue?vue&type=style&index=0&id=8ac449fe&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-8ac449fe\"]])\n\nexport default __exports__","import { resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, withModifiers as _withModifiers } from \"vue\";\nconst _hoisted_1 = {\n class: \"detail-actions\"\n};\nconst _hoisted_2 = {\n class: \"preview-section\"\n};\nconst _hoisted_3 = {\n class: \"preview-content\"\n};\nconst _hoisted_4 = [\"src\"];\nconst _hoisted_5 = [\"src\"];\nconst _hoisted_6 = {\n key: 1\n};\nconst _hoisted_7 = {\n key: 1\n};\nconst _hoisted_8 = {\n key: 0,\n style: {\n \"display\": \"flex\",\n \"align-items\": \"center\",\n \"gap\": \"6px\"\n }\n};\nconst _hoisted_9 = {\n key: 1,\n style: {\n \"color\": \"var(--el-text-color-secondary)\"\n }\n};\nconst _hoisted_10 = {\n key: 0,\n style: {\n \"display\": \"flex\",\n \"flex-wrap\": \"wrap\",\n \"gap\": \"5px\"\n }\n};\nconst _hoisted_11 = {\n key: 1,\n style: {\n \"color\": \"var(--el-text-color-secondary)\"\n }\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n const _component_el_button = _resolveComponent(\"el-button\");\n const _component_el_input = _resolveComponent(\"el-input\");\n const _component_el_tab_pane = _resolveComponent(\"el-tab-pane\");\n const _component_el_tabs = _resolveComponent(\"el-tabs\");\n const _component_el_image = _resolveComponent(\"el-image\");\n const _component_el_descriptions_item = _resolveComponent(\"el-descriptions-item\");\n const _component_el_tag = _resolveComponent(\"el-tag\");\n const _component_el_descriptions = _resolveComponent(\"el-descriptions\");\n const _component_el_form_item = _resolveComponent(\"el-form-item\");\n const _component_el_form = _resolveComponent(\"el-form\");\n const _component_el_dialog = _resolveComponent(\"el-dialog\");\n return _openBlock(), _createBlock(_component_el_dialog, {\n title: _ctx.$t('fileDetail.title'),\n modelValue: $options.visible,\n \"onUpdate:modelValue\": _cache[24] || (_cache[24] = $event => $options.visible = $event),\n width: $options.dialogWidth\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_1, [!$data.isEditing ? (_openBlock(), _createBlock(_component_el_button, {\n key: 0,\n type: \"primary\",\n onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit('download')),\n round: \"\",\n size: \"small\",\n class: \"detail-action\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"download\",\n style: {\n \"margin-right\": \"3px\"\n }\n }), _createTextVNode(\" \" + _toDisplayString(_ctx.$t('fileDetail.download')), 1)]),\n _: 1\n })) : _createCommentVNode(\"\", true), !$data.isEditing ? (_openBlock(), _createBlock(_component_el_button, {\n key: 1,\n type: \"primary\",\n onClick: _cache[1] || (_cache[1] = $event => _ctx.$emit('tagManagement')),\n round: \"\",\n size: \"small\",\n class: \"detail-action\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"tags\",\n style: {\n \"margin-right\": \"3px\"\n }\n }), _createTextVNode(\" \" + _toDisplayString(_ctx.$t('fileDetail.tags')), 1)]),\n _: 1\n })) : _createCommentVNode(\"\", true), !$data.isEditing ? (_openBlock(), _createBlock(_component_el_button, {\n key: 2,\n type: \"primary\",\n onClick: _cache[2] || (_cache[2] = $event => _ctx.$emit('block')),\n round: \"\",\n size: \"small\",\n class: \"detail-action\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"ban\",\n style: {\n \"margin-right\": \"3px\"\n }\n }), _createTextVNode(\" \" + _toDisplayString(_ctx.$t('fileDetail.blacklist')), 1)]),\n _: 1\n })) : _createCommentVNode(\"\", true), !$data.isEditing ? (_openBlock(), _createBlock(_component_el_button, {\n key: 3,\n type: \"primary\",\n onClick: _cache[3] || (_cache[3] = $event => _ctx.$emit('white')),\n round: \"\",\n size: \"small\",\n class: \"detail-action\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"shield-alt\",\n style: {\n \"margin-right\": \"3px\"\n }\n }), _createTextVNode(\" \" + _toDisplayString(_ctx.$t('fileDetail.whitelist')), 1)]),\n _: 1\n })) : _createCommentVNode(\"\", true), !$data.isEditing ? (_openBlock(), _createBlock(_component_el_button, {\n key: 4,\n type: \"danger\",\n onClick: _cache[4] || (_cache[4] = $event => _ctx.$emit('delete')),\n round: \"\",\n size: \"small\",\n class: \"detail-action\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"trash-alt\",\n style: {\n \"margin-right\": \"3px\"\n }\n }), _createTextVNode(\" \" + _toDisplayString(_ctx.$t('fileDetail.deleteBtn')), 1)]),\n _: 1\n })) : _createCommentVNode(\"\", true), !$data.isEditing ? (_openBlock(), _createBlock(_component_el_button, {\n key: 5,\n type: \"warning\",\n onClick: _cache[5] || (_cache[5] = $event => $options.startEdit()),\n round: \"\",\n size: \"small\",\n class: \"detail-action\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"edit\",\n style: {\n \"margin-right\": \"3px\"\n }\n }), _createTextVNode(\" \" + _toDisplayString(_ctx.$t('fileDetail.edit')), 1)]),\n _: 1\n })) : _createCommentVNode(\"\", true), !$data.isEditing ? (_openBlock(), _createBlock(_component_el_button, {\n key: 6,\n type: \"info\",\n onClick: _cache[6] || (_cache[6] = $event => $options.openRenameDialog()),\n round: \"\",\n size: \"small\",\n class: \"detail-action\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"i-cursor\",\n style: {\n \"margin-right\": \"3px\"\n }\n }), _createTextVNode(\" \" + _toDisplayString(_ctx.$t('fileDetail.rename')), 1)]),\n _: 1\n })) : _createCommentVNode(\"\", true), $data.isEditing ? (_openBlock(), _createBlock(_component_el_button, {\n key: 7,\n type: \"success\",\n onClick: _cache[7] || (_cache[7] = $event => $options.saveMetadata()),\n round: \"\",\n size: \"small\",\n class: \"detail-action\",\n loading: $data.editSaving\n }, {\n default: _withCtx(() => [!$data.editSaving ? (_openBlock(), _createBlock(_component_font_awesome_icon, {\n key: 0,\n icon: \"save\",\n style: {\n \"margin-right\": \"3px\"\n }\n })) : _createCommentVNode(\"\", true), _createTextVNode(\" \" + _toDisplayString(_ctx.$t('fileDetail.save')), 1)]),\n _: 1\n }, 8, [\"loading\"])) : _createCommentVNode(\"\", true), $data.isEditing ? (_openBlock(), _createBlock(_component_el_button, {\n key: 8,\n onClick: _cache[8] || (_cache[8] = $event => $options.cancelEdit()),\n round: \"\",\n size: \"small\",\n class: \"detail-action\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('fileDetail.cancel')), 1)]),\n _: 1\n })) : _createCommentVNode(\"\", true)]), _createVNode(_component_el_tabs, {\n modelValue: $data.activeTab,\n \"onUpdate:modelValue\": _cache[16] || (_cache[16] = $event => $data.activeTab = $event),\n onTabClick: $options.handleTabClick,\n style: {\n \"margin-bottom\": \"10px\"\n }\n }, {\n default: _withCtx(() => [_createVNode(_component_el_tab_pane, {\n label: _ctx.$t('fileDetail.originUrl'),\n name: \"originUrl\"\n }, {\n default: _withCtx(() => [_createVNode(_component_el_input, {\n modelValue: $props.urls.originUrl,\n \"onUpdate:modelValue\": _cache[9] || (_cache[9] = $event => $props.urls.originUrl = $event),\n readonly: \"\",\n onClick: $options.handleUrlClick\n }, null, 8, [\"modelValue\", \"onClick\"])]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_tab_pane, {\n label: \"Markdown\",\n name: \"mdUrl\"\n }, {\n default: _withCtx(() => [_createVNode(_component_el_input, {\n modelValue: $props.urls.mdUrl,\n \"onUpdate:modelValue\": _cache[10] || (_cache[10] = $event => $props.urls.mdUrl = $event),\n readonly: \"\",\n onClick: $options.handleUrlClick\n }, null, 8, [\"modelValue\", \"onClick\"])]),\n _: 1\n }), _createVNode(_component_el_tab_pane, {\n label: \"HTML\",\n name: \"htmlUrl\"\n }, {\n default: _withCtx(() => [_createVNode(_component_el_input, {\n modelValue: $props.urls.htmlUrl,\n \"onUpdate:modelValue\": _cache[11] || (_cache[11] = $event => $props.urls.htmlUrl = $event),\n readonly: \"\",\n onClick: $options.handleUrlClick\n }, null, 8, [\"modelValue\", \"onClick\"])]),\n _: 1\n }), _createVNode(_component_el_tab_pane, {\n label: \"BBCode\",\n name: \"bbUrl\"\n }, {\n default: _withCtx(() => [_createVNode(_component_el_input, {\n modelValue: $props.urls.bbUrl,\n \"onUpdate:modelValue\": _cache[12] || (_cache[12] = $event => $props.urls.bbUrl = $event),\n readonly: \"\",\n onClick: $options.handleUrlClick\n }, null, 8, [\"modelValue\", \"onClick\"])]),\n _: 1\n }), $props.file?.metadata?.TgFileId ? (_openBlock(), _createBlock(_component_el_tab_pane, {\n key: 0,\n label: \"TG File ID\",\n name: \"tgId\"\n }, {\n default: _withCtx(() => [_createVNode(_component_el_input, {\n modelValue: $props.urls.tgId,\n \"onUpdate:modelValue\": _cache[13] || (_cache[13] = $event => $props.urls.tgId = $event),\n readonly: \"\",\n onClick: $options.handleUrlClick\n }, null, 8, [\"modelValue\", \"onClick\"])]),\n _: 1\n })) : _createCommentVNode(\"\", true), $props.file?.metadata?.S3Location ? (_openBlock(), _createBlock(_component_el_tab_pane, {\n key: 1,\n label: \"S3 Location\",\n name: \"s3Location\"\n }, {\n default: _withCtx(() => [_createVNode(_component_el_input, {\n modelValue: $props.urls.S3Location,\n \"onUpdate:modelValue\": _cache[14] || (_cache[14] = $event => $props.urls.S3Location = $event),\n readonly: \"\",\n onClick: $options.handleUrlClick\n }, null, 8, [\"modelValue\", \"onClick\"])]),\n _: 1\n })) : _createCommentVNode(\"\", true), $props.file?.metadata?.S3CdnFileUrl ? (_openBlock(), _createBlock(_component_el_tab_pane, {\n key: 2,\n label: \"S3 CDN URL\",\n name: \"s3CdnFileUrl\"\n }, {\n default: _withCtx(() => [_createVNode(_component_el_input, {\n modelValue: $props.urls.S3CdnFileUrl,\n \"onUpdate:modelValue\": _cache[15] || (_cache[15] = $event => $props.urls.S3CdnFileUrl = $event),\n readonly: \"\",\n onClick: $options.handleUrlClick\n }, null, 8, [\"modelValue\", \"onClick\"])]),\n _: 1\n })) : _createCommentVNode(\"\", true)]),\n _: 1\n }, 8, [\"modelValue\", \"onTabClick\"]), _createElementVNode(\"div\", _hoisted_2, [_createElementVNode(\"div\", _hoisted_3, [$options.isVideo ? (_openBlock(), _createElementBlock(\"video\", {\n key: 0,\n src: $props.fileLink,\n autoplay: \"\",\n muted: \"\",\n loop: \"\",\n class: \"video-preview\",\n onClick: _cache[17] || (_cache[17] = (...args) => $options.openImageLink && $options.openImageLink(...args))\n }, null, 8, _hoisted_4)) : $options.isAudio ? (_openBlock(), _createElementBlock(\"audio\", {\n key: 1,\n src: $props.fileLink,\n controls: \"\",\n autoplay: \"\",\n class: \"audio-preview\"\n }, null, 8, _hoisted_5)) : $options.isImage ? (_openBlock(), _createBlock(_component_el_image, {\n key: 2,\n src: $props.fileLink,\n \"preview-src-list\": [$props.fileLink],\n \"preview-teleported\": true,\n fit: \"contain\",\n lazy: \"\",\n class: \"image-preview\"\n }, null, 8, [\"src\", \"preview-src-list\"])) : (_openBlock(), _createBlock(_component_font_awesome_icon, {\n key: 3,\n icon: \"file\",\n class: \"file-icon-detail\"\n }))])]), _createVNode(_component_el_descriptions, {\n border: \"\",\n column: $options.descColumn\n }, {\n default: _withCtx(() => [_createVNode(_component_el_descriptions_item, {\n label: _ctx.$t('fileDetail.fileNameLabel')\n }, {\n default: _withCtx(() => [$data.isEditing ? (_openBlock(), _createBlock(_component_el_input, {\n key: 0,\n modelValue: $data.editForm.FileName,\n \"onUpdate:modelValue\": _cache[18] || (_cache[18] = $event => $data.editForm.FileName = $event),\n size: \"small\",\n placeholder: _ctx.$t('fileDetail.fileNamePlaceholder')\n }, null, 8, [\"modelValue\", \"placeholder\"])) : (_openBlock(), _createElementBlock(\"span\", _hoisted_6, _toDisplayString($props.file?.metadata?.FileName || $props.file?.name), 1))]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_descriptions_item, {\n label: _ctx.$t('fileDetail.fileType')\n }, {\n default: _withCtx(() => [$data.isEditing ? (_openBlock(), _createBlock(_component_el_input, {\n key: 0,\n modelValue: $data.editForm.FileType,\n \"onUpdate:modelValue\": _cache[19] || (_cache[19] = $event => $data.editForm.FileType = $event),\n size: \"small\",\n placeholder: _ctx.$t('fileDetail.fileTypePlaceholder')\n }, null, 8, [\"modelValue\", \"placeholder\"])) : (_openBlock(), _createElementBlock(\"span\", _hoisted_7, _toDisplayString($props.file?.metadata?.FileType || _ctx.$t('fileDetail.unknown')), 1))]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_descriptions_item, {\n label: _ctx.$t('fileDetail.fileSizeLabel')\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString($options.fileSizeDisplay), 1)]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_descriptions_item, {\n label: _ctx.$t('fileDetail.imageDimensions')\n }, {\n default: _withCtx(() => [$options.imageDimensions ? (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [_createElementVNode(\"span\", null, _toDisplayString($props.file?.metadata?.Width) + \" × \" + _toDisplayString($props.file?.metadata?.Height), 1), _createVNode(_component_el_tag, {\n size: \"small\",\n type: \"info\",\n style: {\n \"display\": \"inline-flex\",\n \"align-items\": \"center\",\n \"justify-content\": \"center\"\n }\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString($options.orientationIcon), 1)]),\n _: 1\n })])) : (_openBlock(), _createElementBlock(\"span\", _hoisted_9, _toDisplayString(_ctx.$t('fileDetail.noDimensions')), 1))]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_descriptions_item, {\n label: _ctx.$t('fileDetail.uploadTimeLabel')\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString($options.uploadTime), 1)]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_descriptions_item, {\n label: _ctx.$t('fileDetail.channelTypeAndName')\n }, {\n default: _withCtx(() => [_createVNode(_component_el_tag, {\n size: \"small\",\n type: \"info\",\n style: {\n \"margin-right\": \"6px\"\n }\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString($props.file?.metadata?.Channel || _ctx.$t('fileDetail.unknown')), 1)]),\n _: 1\n }), _createElementVNode(\"span\", null, _toDisplayString($props.file?.metadata?.ChannelName || '-'), 1)]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_descriptions_item, {\n label: _ctx.$t('fileDetail.accessStatusAndReview')\n }, {\n default: _withCtx(() => [_createVNode(_component_el_tag, {\n size: \"small\",\n type: $options.accessTagType,\n style: {\n \"margin-right\": \"6px\"\n }\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString($options.accessType), 1)]),\n _: 1\n }, 8, [\"type\"]), _createElementVNode(\"span\", null, _toDisplayString($props.file?.metadata?.Label || _ctx.$t('fileDetail.noTags')), 1)]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_descriptions_item, {\n label: _ctx.$t('fileDetail.uploadIP')\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString($props.file?.metadata?.UploadIP || _ctx.$t('fileDetail.unknown')), 1)]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_descriptions_item, {\n label: _ctx.$t('fileDetail.uploadAddressLabel')\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString($props.file?.metadata?.UploadAddress || _ctx.$t('fileDetail.unknown')), 1)]),\n _: 1\n }, 8, [\"label\"]), _createVNode(_component_el_descriptions_item, {\n label: _ctx.$t('fileDetail.fileTags')\n }, {\n default: _withCtx(() => [$props.file?.metadata?.Tags && $props.file?.metadata?.Tags.length > 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.file?.metadata?.Tags, tag => {\n return _openBlock(), _createBlock(_component_el_tag, {\n key: tag,\n size: \"small\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(tag), 1)]),\n _: 2\n }, 1024);\n }), 128))])) : (_openBlock(), _createElementBlock(\"span\", _hoisted_11, _toDisplayString(_ctx.$t('fileDetail.noTags')), 1))]),\n _: 1\n }, 8, [\"label\"])]),\n _: 1\n }, 8, [\"column\"]), _createVNode(_component_el_dialog, {\n modelValue: $data.showRenameDialog,\n \"onUpdate:modelValue\": _cache[23] || (_cache[23] = $event => $data.showRenameDialog = $event),\n title: _ctx.$t('fileDetail.renameTitle'),\n width: $options.dialogWidth,\n \"append-to-body\": \"\"\n }, {\n footer: _withCtx(() => [_createVNode(_component_el_button, {\n onClick: _cache[21] || (_cache[21] = $event => $options.closeRenameDialog())\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('fileDetail.renameCancel')), 1)]),\n _: 1\n }), _createVNode(_component_el_button, {\n type: \"primary\",\n onClick: _cache[22] || (_cache[22] = $event => $options.submitRename()),\n loading: $data.renameSaving,\n disabled: !$data.renameValidation.valid\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('fileDetail.renameConfirm')), 1)]),\n _: 1\n }, 8, [\"loading\", \"disabled\"])]),\n default: _withCtx(() => [_createVNode(_component_el_form, {\n onSubmit: _withModifiers($options.submitRename, [\"prevent\"])\n }, {\n default: _withCtx(() => [_createVNode(_component_el_form_item, {\n label: _ctx.$t('fileDetail.renameLabel'),\n error: $data.renameValidation.error\n }, {\n default: _withCtx(() => [_createVNode(_component_el_input, {\n modelValue: $data.renameForm.newFileId,\n \"onUpdate:modelValue\": _cache[20] || (_cache[20] = $event => $data.renameForm.newFileId = $event),\n placeholder: _ctx.$t('fileDetail.renamePlaceholder'),\n onInput: $options.validateRenameInput,\n clearable: \"\"\n }, null, 8, [\"modelValue\", \"placeholder\", \"onInput\"])]),\n _: 1\n }, 8, [\"label\", \"error\"])]),\n _: 1\n }, 8, [\"onSubmit\"])]),\n _: 1\n }, 8, [\"modelValue\", \"title\", \"width\"])]),\n _: 1\n }, 8, [\"title\", \"modelValue\", \"width\"]);\n}","/**\r\n * File_ID 验证器模块\r\n * 提供 File_ID 格式验证功能,用于重命名操作的前端校验\r\n * 非法字符规则复用 pathValidator 的字符集\r\n */\r\n\r\n/**\r\n * 非法字符正则表达式\r\n * 非法字符包括: \\ : * ? \" ' < > | 空格 ( ) [ ] { } # % ^ ` ~ ; @ & = + $ ,\r\n * 与 pathValidator.js 保持一致\r\n */\r\nconst INVALID_CHARS = /[\\\\:\\*\\?\"'<>\\| \\(\\)\\[\\]\\{\\}#%\\^`~;@&=\\+\\$,]/;\r\n\r\n/**\r\n * 验证 File_ID 格式\r\n * @param {string} newFileId - 新的 File_ID\r\n * @param {string} currentFileId - 当前 File_ID\r\n * @returns {{ valid: boolean, error?: string }}\r\n */\r\nexport function validateFileId(newFileId, currentFileId) {\r\n // 1. 空值/纯空白检测\r\n if (!newFileId || newFileId.trim() === '') {\r\n return {\r\n valid: false,\r\n error: '文件名不能为空'\r\n };\r\n }\r\n\r\n // 2. 与当前 File_ID 相同检测\r\n if (newFileId === currentFileId) {\r\n return {\r\n valid: false,\r\n error: '文件名未发生变化'\r\n };\r\n }\r\n\r\n // 3. 路径穿越检测\r\n if (newFileId.includes('..')) {\r\n return {\r\n valid: false,\r\n error: '文件名不能包含路径穿越字符 \"..\"'\r\n };\r\n }\r\n\r\n // 3.5 单独的 . 路径段检测(仅检查 /./ 或开头 ./,不检查末尾以允许继续输入如 .123)\r\n if (/\\/\\.\\//.test(newFileId) || /^\\.\\//.test(newFileId)) {\r\n return {\r\n valid: false,\r\n error: '文件名不能包含单独的 \".\" 路径段'\r\n };\r\n }\r\n\r\n // 4. 非法字符检测(复用 pathValidator 的字符规则)\r\n if (INVALID_CHARS.test(newFileId)) {\r\n return {\r\n valid: false,\r\n error: '文件名包含非法字符,请使用合法的文件名格式'\r\n };\r\n }\r\n\r\n // 5. 连续斜杠检测\r\n if (newFileId.includes('//')) {\r\n return {\r\n valid: false,\r\n error: '文件名不能包含连续的斜杠'\r\n };\r\n }\r\n\r\n return { valid: true };\r\n}\r\n","import { ElMessage } from 'element-plus';\nimport fetchWithAuth from '@/utils/fetchWithAuth';\nimport { validateFileId } from '@/utils/fileIdValidator';\nexport default {\n name: 'FileDetailDialog',\n props: {\n modelValue: {\n type: Boolean,\n default: false\n },\n file: {\n type: Object,\n default: null\n },\n fileLink: {\n type: String,\n default: ''\n },\n urls: {\n type: Object,\n default: () => ({\n originUrl: '',\n mdUrl: '',\n htmlUrl: '',\n bbUrl: '',\n tgId: '',\n S3Location: '',\n S3CdnFileUrl: ''\n })\n }\n },\n emits: ['update:modelValue', 'download', 'tagManagement', 'block', 'white', 'delete', 'metadataUpdated', 'fileRenamed'],\n watch: {\n visible(val) {\n if (!val) {\n // 关闭弹窗时退出编辑状态\n this.isEditing = false;\n this.editSaving = false;\n }\n }\n },\n data() {\n return {\n activeTab: 'originUrl',\n isEditing: false,\n editForm: {\n FileName: '',\n FileType: ''\n },\n editSaving: false,\n showRenameDialog: false,\n renameForm: {\n newFileId: ''\n },\n renameValidation: {\n valid: true,\n error: ''\n },\n renameSaving: false\n };\n },\n computed: {\n visible: {\n get() {\n return this.modelValue;\n },\n set(val) {\n this.$emit('update:modelValue', val);\n }\n },\n dialogWidth() {\n return window.innerWidth < 768 ? '95%' : '900px';\n },\n descColumn() {\n return window.innerWidth < 768 ? 1 : 2;\n },\n isVideo() {\n // 先通过 content-type 判断\n const fileType = this.file?.metadata?.FileType?.toLowerCase() || '';\n if (fileType.includes('video')) return true;\n // 再通过文件后缀判断\n const name = this.file?.name?.toLowerCase() || '';\n return name.endsWith('.mp4') || name.endsWith('.webm') || name.endsWith('.mov') || name.endsWith('.avi');\n },\n isAudio() {\n // 先通过 content-type 判断\n const fileType = this.file?.metadata?.FileType?.toLowerCase() || '';\n if (fileType.includes('audio')) return true;\n // 再通过文件后缀判断\n const name = this.file?.name?.toLowerCase() || '';\n return name.endsWith('.mp3') || name.endsWith('.wav') || name.endsWith('.ogg') || name.endsWith('.flac');\n },\n isImage() {\n // 先通过 content-type 判断\n const fileType = this.file?.metadata?.FileType?.toLowerCase() || '';\n if (fileType.includes('image')) return true;\n // 再通过文件后缀判断\n const name = this.file?.name?.toLowerCase() || '';\n return name.endsWith('.jpg') || name.endsWith('.jpeg') || name.endsWith('.png') || name.endsWith('.gif') || name.endsWith('.webp') || name.endsWith('.svg') || name.endsWith('.bmp') || name.endsWith('.avif') || name.endsWith('.heic') || name.endsWith('.heif');\n },\n uploadTime() {\n if (this.file?.metadata?.TimeStamp) {\n return new Date(this.file.metadata.TimeStamp).toLocaleString();\n }\n return this.$t('fileDetail.unknown');\n },\n accessType() {\n const listType = this.file?.metadata?.ListType;\n const label = this.file?.metadata?.Label;\n if (listType === 'White') return this.$t('fileDetail.accessNormalWhitelist');\n if (listType === 'Block') return this.$t('fileDetail.accessBlockedBlacklist');\n if (label === 'adult') return this.$t('fileDetail.accessBlockedReview');\n return this.$t('fileDetail.accessNormal');\n },\n accessTagType() {\n const listType = this.file?.metadata?.ListType;\n const label = this.file?.metadata?.Label;\n if (listType === 'White') return 'success';\n if (listType === 'Block') return 'danger';\n if (label === 'adult') return 'danger';\n return 'success';\n },\n imageDimensions() {\n const width = this.file?.metadata?.Width;\n const height = this.file?.metadata?.Height;\n if (width && height) return true;\n return null;\n },\n orientationIcon() {\n const width = this.file?.metadata?.Width;\n const height = this.file?.metadata?.Height;\n if (!width || !height) return '';\n const ratio = width / height;\n if (ratio > 1.1) return this.$t('fileDetail.orientationLandscape');\n if (ratio < 0.9) return this.$t('fileDetail.orientationPortrait');\n return this.$t('fileDetail.orientationSquare');\n },\n fileSizeDisplay() {\n const sizeBytes = this.file?.metadata?.FileSizeBytes;\n const sizeMB = this.file?.metadata?.FileSize;\n if (sizeBytes) {\n // 根据大小选择合适的单位\n if (sizeBytes < 1024) {\n return `${sizeBytes} B`;\n } else if (sizeBytes < 1024 * 1024) {\n return `${(sizeBytes / 1024).toFixed(2)} KB`;\n } else {\n return `${(sizeBytes / 1024 / 1024).toFixed(2)} MB`;\n }\n } else if (sizeMB) {\n return `${sizeMB} MB`;\n }\n return this.$t('fileDetail.unknown');\n }\n },\n methods: {\n handleVideoClick(e) {\n const video = e.target;\n if (video.paused) video.play();else video.pause();\n },\n handleTabClick() {},\n handleUrlClick(e) {\n const input = e.target;\n input.select();\n navigator.clipboard.writeText(input.value).then(() => {\n ElMessage.success(this.$t('fileDetail.linkCopied'));\n });\n },\n openImageLink() {\n if (this.fileLink) {\n window.open(this.fileLink, '_blank');\n }\n },\n startEdit() {\n this.editForm.FileName = this.file?.metadata?.FileName || '';\n this.editForm.FileType = this.file?.metadata?.FileType || '';\n this.isEditing = true;\n },\n cancelEdit() {\n this.isEditing = false;\n this.editForm.FileName = this.file?.metadata?.FileName || '';\n this.editForm.FileType = this.file?.metadata?.FileType || '';\n this.editSaving = false;\n },\n async saveMetadata() {\n this.editSaving = true;\n try {\n const fileId = this.file.name;\n const response = await fetchWithAuth(`/api/manage/metadata/${fileId}`, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n FileName: this.editForm.FileName,\n FileType: this.editForm.FileType\n })\n });\n if (response.ok) {\n const data = await response.json();\n ElMessage.success(this.$t('fileDetail.metadataSaved'));\n this.isEditing = false;\n this.$emit('metadataUpdated', fileId, data.metadata);\n } else {\n const error = await response.json().catch(() => ({}));\n throw new Error(error.message || this.$t('fileDetail.metadataSaveFailed'));\n }\n } catch (error) {\n console.error('Error saving metadata:', error);\n ElMessage.error(error.message || this.$t('fileDetail.metadataSaveFailed'));\n } finally {\n this.editSaving = false;\n }\n },\n openRenameDialog() {\n this.renameForm.newFileId = this.file?.name || '';\n this.renameValidation = {\n valid: true,\n error: ''\n };\n this.showRenameDialog = true;\n },\n closeRenameDialog() {\n this.showRenameDialog = false;\n this.renameForm.newFileId = '';\n this.renameValidation = {\n valid: true,\n error: ''\n };\n },\n validateRenameInput() {\n const result = validateFileId(this.renameForm.newFileId, this.file?.name || '');\n this.renameValidation = {\n valid: result.valid,\n error: result.error || ''\n };\n },\n async submitRename() {\n if (this.renameSaving) return;\n\n // Validate input first\n this.validateRenameInput();\n if (!this.renameValidation.valid) {\n return;\n }\n this.renameSaving = true;\n try {\n const oldFileId = this.file.name;\n const response = await fetchWithAuth(`/api/manage/rename/${oldFileId}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n newFileId: this.renameForm.newFileId\n })\n });\n if (response.ok) {\n const data = await response.json();\n ElMessage.success(this.$t('fileDetail.renameSuccess'));\n this.showRenameDialog = false;\n this.$emit('fileRenamed', oldFileId, this.renameForm.newFileId, data.metadata);\n } else if (response.status === 409) {\n // Conflict — target File_ID already exists\n this.renameValidation = {\n valid: false,\n error: this.$t('fileDetail.renameConflict')\n };\n } else {\n const error = await response.json().catch(() => ({}));\n throw new Error(error.message || this.$t('fileDetail.renameFailed'));\n }\n } catch (error) {\n console.error('Error renaming file:', error);\n ElMessage.error(error.message || this.$t('fileDetail.renameFailed'));\n } finally {\n this.renameSaving = false;\n }\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./FileDetailDialog.vue?vue&type=template&id=550287cc&scoped=true\"\nimport script from \"./FileDetailDialog.vue?vue&type=script&lang=js\"\nexport * from \"./FileDetailDialog.vue?vue&type=script&lang=js\"\n\nimport \"./FileDetailDialog.vue?vue&type=style&index=0&id=550287cc&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-550287cc\"]])\n\nexport default __exports__","import { resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createBlock as _createBlock, createCommentVNode as _createCommentVNode, Transition as _Transition } from \"vue\";\nconst _hoisted_1 = {\n key: 0,\n class: \"batch-floating-bar\"\n};\nconst _hoisted_2 = {\n class: \"batch-selection-summary\"\n};\nconst _hoisted_3 = {\n class: \"batch-selection-count\"\n};\nconst _hoisted_4 = {\n class: \"batch-floating-actions\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n const _component_el_button = _resolveComponent(\"el-button\");\n const _component_el_tooltip = _resolveComponent(\"el-tooltip\");\n return _openBlock(), _createBlock(_Transition, {\n name: \"batch-toolbar\"\n }, {\n default: _withCtx(() => [$props.selectedCount > 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [_createVNode(_component_el_tooltip, {\n disabled: $options.disableTooltip,\n content: _ctx.$t('dashboard.clearSelection'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createVNode(_component_el_button, {\n class: \"batch-floating-btn ghost\",\n \"aria-label\": _ctx.$t('dashboard.clearSelection'),\n onClick: $options.handleClear\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"times\",\n class: \"batch-floating-icon\"\n })]),\n _: 1\n }, 8, [\"aria-label\", \"onClick\"])]),\n _: 1\n }, 8, [\"disabled\", \"content\"]), _createVNode(_component_el_tooltip, {\n disabled: $options.disableTooltip,\n content: `${$props.selectedCount} ${_ctx.$t('dashboard.selectedItems')}`,\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_2, [_createElementVNode(\"span\", _hoisted_3, _toDisplayString($props.selectedCount), 1)])]),\n _: 1\n }, 8, [\"disabled\", \"content\"]), _cache[0] || (_cache[0] = _createElementVNode(\"span\", {\n class: \"batch-toolbar-divider\"\n }, null, -1)), _createElementVNode(\"div\", _hoisted_4, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.actions, action => {\n return _openBlock(), _createBlock(_component_el_tooltip, {\n key: action.command,\n disabled: $options.disableTooltip,\n content: _ctx.$t(action.label),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createVNode(_component_el_button, {\n class: _normalizeClass([\"batch-floating-btn\", action.className]),\n \"aria-label\": _ctx.$t(action.label),\n onClick: $event => $options.handleAction(action.command)\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: action.icon,\n class: \"batch-floating-icon\"\n }, null, 8, [\"icon\"])]),\n _: 2\n }, 1032, [\"class\", \"aria-label\", \"onClick\"])]),\n _: 2\n }, 1032, [\"disabled\", \"content\"]);\n }), 128))])])) : _createCommentVNode(\"\", true)]),\n _: 1\n });\n}","export default {\n name: 'BatchActionBar',\n props: {\n selectedCount: {\n type: Number,\n required: true\n }\n },\n emits: ['action', 'clear'],\n data() {\n return {\n actions: [{\n command: 'copy',\n label: 'dashboard.copy',\n icon: 'copy',\n className: 'copy'\n }, {\n command: 'download',\n label: 'dashboard.download',\n icon: 'download',\n className: 'download'\n }, {\n command: 'move',\n label: 'dashboard.move',\n icon: 'file-export',\n className: 'move'\n }, {\n command: 'tagManagement',\n label: 'dashboard.tagManagement',\n icon: 'tags',\n className: 'tag'\n }, {\n command: 'ban',\n label: 'dashboard.addToBlacklist',\n icon: 'ban',\n className: 'ban'\n }, {\n command: 'white',\n label: 'dashboard.addToWhitelist',\n icon: 'shield-alt',\n className: 'white'\n }, {\n command: 'delete',\n label: 'dashboard.delete',\n icon: 'trash-alt',\n className: 'danger'\n }]\n };\n },\n computed: {\n disableTooltip() {\n return window.innerWidth < 768;\n }\n },\n methods: {\n handleAction(command) {\n this.$emit('action', command);\n },\n handleClear() {\n this.$emit('clear');\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./BatchActionBar.vue?vue&type=template&id=49301bcc&scoped=true\"\nimport script from \"./BatchActionBar.vue?vue&type=script&lang=js\"\nexport * from \"./BatchActionBar.vue?vue&type=script&lang=js\"\n\nimport \"./BatchActionBar.vue?vue&type=style&index=0&id=49301bcc&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-49301bcc\"]])\n\nexport default __exports__","import { resolveComponent as _resolveComponent, withModifiers as _withModifiers, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, renderList as _renderList, Fragment as _Fragment, normalizeStyle as _normalizeStyle, withCtx as _withCtx } from \"vue\";\nconst _hoisted_1 = {\n class: \"list-col list-col-checkbox\"\n};\nconst _hoisted_2 = [\"src\"];\nconst _hoisted_3 = [\"src\"];\nconst _hoisted_4 = [\"title\"];\nconst _hoisted_5 = {\n class: \"filename-start\"\n};\nconst _hoisted_6 = {\n class: \"filename-end\"\n};\nconst _hoisted_7 = {\n class: \"list-col list-col-tags\"\n};\nconst _hoisted_8 = {\n key: 1,\n class: \"list-empty\"\n};\nconst _hoisted_9 = {\n class: \"list-col list-col-channel\"\n};\nconst _hoisted_10 = {\n class: \"list-col list-col-channel-name\"\n};\nconst _hoisted_11 = {\n key: 0,\n class: \"channel-name-box\"\n};\nconst _hoisted_12 = {\n key: 1,\n class: \"list-empty\"\n};\nconst _hoisted_13 = {\n class: \"list-col list-col-address\"\n};\nconst _hoisted_14 = {\n key: 0,\n class: \"address-box\"\n};\nconst _hoisted_15 = {\n key: 1,\n class: \"list-empty\"\n};\nconst _hoisted_16 = {\n class: \"list-col list-col-size\"\n};\nconst _hoisted_17 = {\n class: \"list-col list-col-date\"\n};\nconst _hoisted_18 = {\n class: \"list-col list-col-actions\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_checkbox = _resolveComponent(\"el-checkbox\");\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n const _component_el_tooltip = _resolveComponent(\"el-tooltip\");\n return _openBlock(), _createElementBlock(\"div\", {\n class: \"list-item\",\n onTouchstart: _cache[10] || (_cache[10] = $event => _ctx.$emit('touchstart', $event)),\n onTouchend: _cache[11] || (_cache[11] = $event => _ctx.$emit('touchend', $event)),\n onTouchmove: _cache[12] || (_cache[12] = $event => _ctx.$emit('touchmove', $event))\n }, [_createElementVNode(\"div\", _hoisted_1, [_createVNode(_component_el_checkbox, {\n modelValue: $data.localSelected,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $data.localSelected = $event),\n onClick: _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"stop\"])),\n onChange: $options.handleSelectChange\n }, null, 8, [\"modelValue\", \"onChange\"])]), _createElementVNode(\"div\", {\n class: \"list-col list-col-preview\",\n onClick: _cache[2] || (_cache[2] = (...args) => $options.handlePreviewClick && $options.handlePreviewClick(...args))\n }, [$options.isFolder ? (_openBlock(), _createBlock(_component_font_awesome_icon, {\n key: 0,\n icon: \"folder-open\",\n class: \"list-folder-icon\"\n })) : $options.isVideo ? (_openBlock(), _createElementBlock(\"video\", {\n key: 1,\n src: $props.fileLink,\n class: \"list-preview-img\",\n muted: \"\",\n preload: \"metadata\"\n }, null, 8, _hoisted_2)) : $options.isImage ? (_openBlock(), _createElementBlock(\"img\", {\n key: 2,\n src: $props.fileLink,\n class: \"list-preview-img\",\n loading: \"lazy\",\n decoding: \"async\"\n }, null, 8, _hoisted_3)) : (_openBlock(), _createBlock(_component_font_awesome_icon, {\n key: 3,\n icon: \"file\",\n class: \"list-file-icon\"\n }))]), _createElementVNode(\"div\", {\n class: \"list-col list-col-name\",\n onClick: _cache[3] || (_cache[3] = (...args) => $options.handlePreviewClick && $options.handlePreviewClick(...args))\n }, [_createElementVNode(\"span\", {\n class: \"filename-ellipsis\",\n title: $options.displayName\n }, [_createElementVNode(\"span\", _hoisted_5, _toDisplayString($options.fileNameStart), 1), _createElementVNode(\"span\", _hoisted_6, _toDisplayString($options.fileNameEnd), 1)], 8, _hoisted_4)]), _createElementVNode(\"div\", _hoisted_7, [!$options.isFolder && $props.item.metadata?.Tags && $props.item.metadata.Tags.length > 0 ? (_openBlock(), _createElementBlock(_Fragment, {\n key: 0\n }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.item.metadata.Tags.slice(0, 3), (tag, tagIndex) => {\n return _openBlock(), _createElementBlock(\"span\", {\n key: tagIndex,\n class: \"color-tag\",\n style: _normalizeStyle({\n background: $options.getTagColor(tagIndex)\n })\n }, _toDisplayString(tag), 5);\n }), 128)), $props.item.metadata.Tags.length > 3 ? (_openBlock(), _createElementBlock(\"span\", {\n key: 0,\n class: \"color-tag color-tag-more\",\n style: _normalizeStyle({\n background: $options.getTagColor(3)\n })\n }, \"+\" + _toDisplayString($props.item.metadata.Tags.length - 3), 5)) : _createCommentVNode(\"\", true)], 64)) : (_openBlock(), _createElementBlock(\"span\", _hoisted_8, \"-\"))]), _createElementVNode(\"div\", _hoisted_9, _toDisplayString($options.isFolder ? '-' : $props.item.metadata?.Channel || $props.item.channelTag || '-'), 1), _createElementVNode(\"div\", _hoisted_10, [!$options.isFolder && $props.item.metadata?.ChannelName ? (_openBlock(), _createElementBlock(\"div\", _hoisted_11, _toDisplayString($props.item.metadata.ChannelName), 1)) : (_openBlock(), _createElementBlock(\"span\", _hoisted_12, \"-\"))]), _createElementVNode(\"div\", _hoisted_13, [!$options.isFolder && $props.item.metadata?.UploadIP ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, _toDisplayString($props.item.metadata.UploadIP), 1)) : (_openBlock(), _createElementBlock(\"span\", _hoisted_15, \"-\"))]), _createElementVNode(\"div\", _hoisted_16, _toDisplayString($options.isFolder ? '-' : $options.fileSizeDisplay), 1), _createElementVNode(\"div\", _hoisted_17, _toDisplayString($options.uploadDate), 1), _createElementVNode(\"div\", _hoisted_18, [!$options.isFolder ? (_openBlock(), _createElementBlock(_Fragment, {\n key: 0\n }, [_createVNode(_component_el_tooltip, {\n content: _ctx.$t('dashboard.copyLink'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"list-action-btn\",\n onClick: _cache[4] || (_cache[4] = _withModifiers($event => _ctx.$emit('copy'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"copy\"\n })])]),\n _: 1\n }, 8, [\"content\"]), _createVNode(_component_el_tooltip, {\n content: _ctx.$t('dashboard.downloadFile'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"list-action-btn\",\n onClick: _cache[5] || (_cache[5] = _withModifiers($event => _ctx.$emit('download'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"download\"\n })])]),\n _: 1\n }, 8, [\"content\"]), _createVNode(_component_el_tooltip, {\n content: _ctx.$t('dashboard.moveFile'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"list-action-btn\",\n onClick: _cache[6] || (_cache[6] = _withModifiers($event => _ctx.$emit('move'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"file-export\"\n })])]),\n _: 1\n }, 8, [\"content\"])], 64)) : (_openBlock(), _createElementBlock(_Fragment, {\n key: 1\n }, [_createVNode(_component_el_tooltip, {\n content: _ctx.$t('dashboard.copyLink'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"list-action-btn\",\n onClick: _cache[7] || (_cache[7] = _withModifiers($event => _ctx.$emit('folderCopy'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"copy\"\n })])]),\n _: 1\n }, 8, [\"content\"]), _createVNode(_component_el_tooltip, {\n content: _ctx.$t('dashboard.moveFile'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"list-action-btn\",\n onClick: _cache[8] || (_cache[8] = _withModifiers($event => _ctx.$emit('move'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"file-export\"\n })])]),\n _: 1\n }, 8, [\"content\"])], 64)), _createVNode(_component_el_tooltip, {\n content: _ctx.$t('dashboard.delete'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"list-action-btn list-action-danger\",\n onClick: _cache[9] || (_cache[9] = _withModifiers($event => _ctx.$emit('delete'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"trash-alt\"\n })])]),\n _: 1\n }, 8, [\"content\"])])], 32);\n}","import \"core-js/modules/es.iterator.constructor.js\";\nimport \"core-js/modules/es.iterator.filter.js\";\nexport default {\n name: 'FileListItem',\n props: {\n item: {\n type: Object,\n required: true\n },\n selected: {\n type: Boolean,\n default: false\n },\n fileLink: {\n type: String,\n default: ''\n }\n },\n emits: ['update:selected', 'enter', 'detail', 'copy', 'folderCopy', 'move', 'delete', 'download', 'touchstart', 'touchend', 'touchmove'],\n data() {\n return {\n localSelected: this.selected,\n tagColors: ['#f472b6', '#a78bfa', '#60a5fa', '#34d399']\n };\n },\n computed: {\n isFolder() {\n // 检查 isFolder 属性或名称以 / 结尾\n return this.item.isFolder || this.item.name?.endsWith('/');\n },\n isVideo() {\n const name = this.item.name?.toLowerCase() || '';\n return name.endsWith('.mp4') || name.endsWith('.webm') || name.endsWith('.mov') || name.endsWith('.avi');\n },\n isImage() {\n const name = this.item.name?.toLowerCase() || '';\n return name.endsWith('.jpg') || name.endsWith('.jpeg') || name.endsWith('.png') || name.endsWith('.gif') || name.endsWith('.webp') || name.endsWith('.svg') || name.endsWith('.bmp');\n },\n displayName() {\n if (this.isFolder) {\n const parts = this.item.name.split('/').filter(Boolean);\n return parts[parts.length - 1] || this.item.name;\n }\n return this.item.metadata?.FileName || this.getFileName(this.item.name);\n },\n fileNameStart() {\n const name = this.displayName;\n if (name.length <= 20) return name;\n return name.slice(0, -8);\n },\n fileNameEnd() {\n const name = this.displayName;\n if (name.length <= 20) return '';\n return name.slice(-8);\n },\n uploadDate() {\n if (this.item.uploaded) {\n return new Date(this.item.uploaded).toLocaleDateString();\n }\n if (this.item.metadata?.TimeStamp) {\n return new Date(this.item.metadata.TimeStamp).toLocaleDateString();\n }\n return '-';\n },\n fileSizeDisplay() {\n const sizeBytes = this.item.metadata?.FileSizeBytes;\n const sizeMB = this.item.metadata?.FileSize;\n if (sizeBytes) {\n if (sizeBytes < 1024) {\n return `${sizeBytes} B`;\n } else if (sizeBytes < 1024 * 1024) {\n return `${(sizeBytes / 1024).toFixed(1)} KB`;\n } else {\n return `${(sizeBytes / 1024 / 1024).toFixed(2)} MB`;\n }\n } else if (sizeMB) {\n return `${sizeMB} MB`;\n }\n return '-';\n }\n },\n watch: {\n selected(val) {\n this.localSelected = val;\n }\n },\n methods: {\n handleSelectChange(value) {\n this.localSelected = value;\n this.$emit('update:selected', value);\n },\n handlePreviewClick() {\n if (this.isFolder) {\n this.$emit('enter');\n } else {\n this.$emit('detail');\n }\n },\n getFileName(name) {\n const parts = (name || '').split('/');\n return parts[parts.length - 1];\n },\n getTagColor(index) {\n return this.tagColors[index % this.tagColors.length];\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./FileListItem.vue?vue&type=template&id=25a3242c&scoped=true\"\nimport script from \"./FileListItem.vue?vue&type=script&lang=js\"\nexport * from \"./FileListItem.vue?vue&type=script&lang=js\"\n\nimport \"./FileListItem.vue?vue&type=style&index=0&id=25a3242c&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-25a3242c\"]])\n\nexport default __exports__","import { resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, vShow as _vShow, withDirectives as _withDirectives, Fragment as _Fragment, withModifiers as _withModifiers, withCtx as _withCtx, createBlock as _createBlock } from \"vue\";\nconst _hoisted_1 = {\n class: \"file-short-info\"\n};\nconst _hoisted_2 = {\n key: 0,\n class: \"success-tag\"\n};\nconst _hoisted_3 = {\n key: 1,\n class: \"fail-tag\"\n};\nconst _hoisted_4 = {\n key: 2,\n class: \"success-tag\"\n};\nconst _hoisted_5 = {\n key: 3,\n class: \"primary-tag\"\n};\nconst _hoisted_6 = {\n key: 0,\n style: {\n \"margin-left\": \"2px\"\n }\n};\nconst _hoisted_7 = {\n key: 0,\n class: \"skeleton-wrapper\"\n};\nconst _hoisted_8 = {\n class: \"error-text\"\n};\nconst _hoisted_9 = [\"src\"];\nconst _hoisted_10 = {\n class: \"error-text\"\n};\nconst _hoisted_11 = {\n key: 3,\n class: \"file-preview\"\n};\nconst _hoisted_12 = {\n class: \"card-bottom-overlay\"\n};\nconst _hoisted_13 = {\n class: \"file-name-row\"\n};\nconst _hoisted_14 = {\n class: \"file-name\"\n};\nconst _hoisted_15 = {\n class: \"action-bar\"\n};\nconst _hoisted_16 = {\n class: \"action-bar-left\"\n};\nconst _hoisted_17 = {\n class: \"action-bar-right\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_checkbox = _resolveComponent(\"el-checkbox\");\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n const _component_el_image = _resolveComponent(\"el-image\");\n const _component_el_tooltip = _resolveComponent(\"el-tooltip\");\n const _component_el_card = _resolveComponent(\"el-card\");\n return _openBlock(), _createBlock(_component_el_card, {\n class: \"img-card\",\n onTouchstart: _cache[17] || (_cache[17] = $event => _ctx.$emit('touchstart', $event)),\n onTouchend: _cache[18] || (_cache[18] = $event => _ctx.$emit('touchend', $event)),\n onTouchmove: _cache[19] || (_cache[19] = $event => _ctx.$emit('touchmove', $event))\n }, {\n default: _withCtx(() => [_createVNode(_component_el_checkbox, {\n modelValue: $data.localSelected,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $data.localSelected = $event),\n onChange: _cache[1] || (_cache[1] = $event => _ctx.$emit('update:selected', $data.localSelected))\n }, null, 8, [\"modelValue\"]), _createElementVNode(\"div\", _hoisted_1, [$props.item.metadata?.ListType === 'White' ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, _toDisplayString($options.channelTag), 1)) : $props.item.metadata?.ListType === 'Block' || $props.item.metadata?.Label === 'adult' ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, _toDisplayString($options.channelTag), 1)) : (_openBlock(), _createElementBlock(\"div\", _hoisted_4, _toDisplayString($options.channelTag), 1)), $props.item.metadata?.Tags && $props.item.metadata?.Tags.length > 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [_createVNode(_component_font_awesome_icon, {\n icon: \"tag\",\n style: {\n \"margin-right\": \"3px\",\n \"font-size\": \"12px\"\n }\n }), _createTextVNode(\" \" + _toDisplayString($props.item.metadata.Tags[0]) + \" \", 1), $props.item.metadata.Tags.length > 1 ? (_openBlock(), _createElementBlock(\"span\", _hoisted_6, \" (+\" + _toDisplayString($props.item.metadata.Tags.length - 1) + \") \", 1)) : _createCommentVNode(\"\", true)])) : _createCommentVNode(\"\", true)]), $options.isVideo ? (_openBlock(), _createElementBlock(_Fragment, {\n key: 0\n }, [$data.videoLoading ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7)) : $data.videoError ? (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"error-wrapper\",\n onClick: _cache[2] || (_cache[2] = $event => _ctx.$emit('detail'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"exclamation-triangle\",\n class: \"error-icon\"\n }), _createElementVNode(\"span\", _hoisted_8, _toDisplayString(_ctx.$t('dashboard.loadFailed')), 1)])) : _createCommentVNode(\"\", true), _withDirectives(_createElementVNode(\"video\", {\n src: $props.fileLink,\n muted: \"\",\n loop: \"\",\n preload: \"metadata\",\n class: \"video-preview\",\n onClick: _cache[3] || (_cache[3] = (...args) => $options.handleVideoClick && $options.handleVideoClick(...args)),\n onMouseenter: _cache[4] || (_cache[4] = $event => $options.handleVideoHover($event, true)),\n onMouseleave: _cache[5] || (_cache[5] = $event => $options.handleVideoHover($event, false)),\n onFullscreenchange: _cache[6] || (_cache[6] = (...args) => $options.handleFullscreenChange && $options.handleFullscreenChange(...args)),\n onWebkitfullscreenchange: _cache[7] || (_cache[7] = (...args) => $options.handleFullscreenChange && $options.handleFullscreenChange(...args)),\n onLoadeddata: _cache[8] || (_cache[8] = $event => $data.videoLoading = false),\n onError: _cache[9] || (_cache[9] = (...args) => $options.handleVideoError && $options.handleVideoError(...args))\n }, null, 40, _hoisted_9), [[_vShow, !$data.videoLoading && !$data.videoError]])], 64)) : $options.isAudio ? (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"file-preview audio-card-preview\",\n onClick: _cache[10] || (_cache[10] = $event => _ctx.$emit('detail'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"music\",\n class: \"file-icon audio-icon\"\n })])) : $options.isImage ? (_openBlock(), _createBlock(_component_el_image, {\n key: 2,\n \"preview-teleported\": true,\n src: $props.fileLink,\n \"preview-src-list\": $props.previewSrcList,\n fit: \"cover\",\n lazy: \"\",\n decoding: \"async\",\n class: \"image-preview\"\n }, {\n placeholder: _withCtx(() => [...(_cache[20] || (_cache[20] = [_createElementVNode(\"div\", {\n class: \"skeleton-wrapper\"\n }, null, -1)]))]),\n error: _withCtx(() => [_createElementVNode(\"div\", {\n class: \"error-wrapper\",\n onClick: _cache[11] || (_cache[11] = _withModifiers($event => _ctx.$emit('detail'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"image\",\n class: \"error-icon\"\n }), _createElementVNode(\"span\", _hoisted_10, _toDisplayString(_ctx.$t('dashboard.loadFailed')), 1)])]),\n _: 1\n }, 8, [\"src\", \"preview-src-list\"])) : (_openBlock(), _createElementBlock(\"div\", _hoisted_11, [_createVNode(_component_font_awesome_icon, {\n icon: \"file\",\n class: \"file-icon\"\n })])), _createElementVNode(\"div\", _hoisted_12, [_createElementVNode(\"div\", _hoisted_13, [_createElementVNode(\"span\", _hoisted_14, _toDisplayString($options.displayName), 1)]), _createElementVNode(\"div\", _hoisted_15, [_createElementVNode(\"div\", _hoisted_16, [_createVNode(_component_el_tooltip, {\n disabled: $props.disableTooltip,\n content: _ctx.$t('dashboard.detail'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"action-btn\",\n onClick: _cache[12] || (_cache[12] = _withModifiers($event => _ctx.$emit('detail'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"info-circle\"\n })])]),\n _: 1\n }, 8, [\"disabled\", \"content\"])]), _createElementVNode(\"div\", _hoisted_17, [_createVNode(_component_el_tooltip, {\n disabled: $props.disableTooltip,\n content: _ctx.$t('dashboard.moveFile'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"action-btn\",\n onClick: _cache[13] || (_cache[13] = _withModifiers($event => _ctx.$emit('move'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"file-export\"\n })])]),\n _: 1\n }, 8, [\"disabled\", \"content\"]), _createVNode(_component_el_tooltip, {\n disabled: $props.disableTooltip,\n content: _ctx.$t('dashboard.delete'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"action-btn action-btn-danger\",\n onClick: _cache[14] || (_cache[14] = _withModifiers($event => _ctx.$emit('delete'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"trash-alt\"\n })])]),\n _: 1\n }, 8, [\"disabled\", \"content\"]), _createVNode(_component_el_tooltip, {\n disabled: $props.disableTooltip,\n content: _ctx.$t('dashboard.downloadFile'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"action-btn\",\n onClick: _cache[15] || (_cache[15] = _withModifiers($event => _ctx.$emit('download'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"download\"\n })])]),\n _: 1\n }, 8, [\"disabled\", \"content\"]), _createVNode(_component_el_tooltip, {\n disabled: $props.disableTooltip,\n content: _ctx.$t('dashboard.copyLink'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"action-btn\",\n onClick: _cache[16] || (_cache[16] = _withModifiers($event => _ctx.$emit('copy'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"copy\"\n })])]),\n _: 1\n }, 8, [\"disabled\", \"content\"])])])])]),\n _: 1\n });\n}","export default {\n name: 'FileCard',\n props: {\n item: {\n type: Object,\n required: true\n },\n selected: {\n type: Boolean,\n default: false\n },\n fileLink: {\n type: String,\n required: true\n },\n previewSrcList: {\n type: Array,\n default: () => []\n },\n disableTooltip: {\n type: Boolean,\n default: false\n }\n },\n emits: ['update:selected', 'detail', 'copy', 'move', 'delete', 'download', 'touchstart', 'touchend', 'touchmove'],\n data() {\n return {\n localSelected: this.selected,\n videoLoading: true,\n videoError: false\n };\n },\n computed: {\n channelTag() {\n return this.item.channelTag || '';\n },\n isVideo() {\n // 先通过 content-type 判断\n const fileType = this.item.metadata?.FileType?.toLowerCase() || '';\n if (fileType.includes('video')) return true;\n // 再通过文件后缀判断\n const name = this.item.name?.toLowerCase() || '';\n return name.endsWith('.mp4') || name.endsWith('.webm') || name.endsWith('.mov') || name.endsWith('.avi');\n },\n isAudio() {\n // 先通过 content-type 判断\n const fileType = this.item.metadata?.FileType?.toLowerCase() || '';\n if (fileType.includes('audio')) return true;\n // 再通过文件后缀判断\n const name = this.item.name?.toLowerCase() || '';\n return name.endsWith('.mp3') || name.endsWith('.wav') || name.endsWith('.ogg') || name.endsWith('.flac');\n },\n isImage() {\n // 先通过 content-type 判断\n const fileType = this.item.metadata?.FileType?.toLowerCase() || '';\n if (fileType.includes('image')) return true;\n // 再通过文件后缀判断\n const name = this.item.name?.toLowerCase() || '';\n return name.endsWith('.jpg') || name.endsWith('.jpeg') || name.endsWith('.png') || name.endsWith('.gif') || name.endsWith('.webp') || name.endsWith('.svg') || name.endsWith('.bmp') || name.endsWith('.avif') || name.endsWith('.heic') || name.endsWith('.heif');\n },\n displayName() {\n const fileName = this.item.metadata?.FileName || this.item.name || '';\n const parts = fileName.split('/');\n return parts[parts.length - 1];\n }\n },\n watch: {\n selected(val) {\n this.localSelected = val;\n },\n fileLink() {\n // 链接变化时重置加载状态\n this.videoLoading = true;\n this.videoError = false;\n }\n },\n methods: {\n handleVideoError() {\n this.videoLoading = false;\n this.videoError = true;\n },\n handleVideoClick(e) {\n const video = e.target;\n if (video.requestFullscreen) {\n video.requestFullscreen();\n } else if (video.webkitRequestFullscreen) {\n video.webkitRequestFullscreen();\n } else if (video.mozRequestFullScreen) {\n video.mozRequestFullScreen();\n } else if (video.msRequestFullscreen) {\n video.msRequestFullscreen();\n }\n },\n handleFullscreenChange(e) {\n const video = e.target;\n const isFullscreen = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;\n if (isFullscreen) {\n // 进入全屏:取消静音和循环\n video.muted = false;\n video.loop = false;\n } else {\n // 退出全屏:恢复静音和循环,暂停并重置\n video.muted = true;\n video.loop = true;\n video.pause();\n video.currentTime = 0;\n }\n },\n handleVideoHover(e, isEnter) {\n const video = e.target;\n if (isEnter) {\n video.play().catch(() => {});\n } else {\n video.pause();\n video.currentTime = 0;\n }\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./FileCard.vue?vue&type=template&id=956fb02e&scoped=true\"\nimport script from \"./FileCard.vue?vue&type=script&lang=js\"\nexport * from \"./FileCard.vue?vue&type=script&lang=js\"\n\nimport \"./FileCard.vue?vue&type=style&index=0&id=956fb02e&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-956fb02e\"]])\n\nexport default __exports__","import { resolveComponent as _resolveComponent, createVNode as _createVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, withModifiers as _withModifiers, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock } from \"vue\";\nconst _hoisted_1 = {\n class: \"card-bottom-overlay\"\n};\nconst _hoisted_2 = {\n class: \"file-name-row\"\n};\nconst _hoisted_3 = {\n class: \"file-name\"\n};\nconst _hoisted_4 = {\n key: 0,\n class: \"action-bar\"\n};\nconst _hoisted_5 = {\n class: \"action-bar-right\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_checkbox = _resolveComponent(\"el-checkbox\");\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n const _component_el_tooltip = _resolveComponent(\"el-tooltip\");\n const _component_el_card = _resolveComponent(\"el-card\");\n return _openBlock(), _createBlock(_component_el_card, {\n class: \"img-card folder-card\",\n onTouchstart: _cache[6] || (_cache[6] = $event => _ctx.$emit('touchstart', $event)),\n onTouchend: _cache[7] || (_cache[7] = $event => _ctx.$emit('touchend', $event)),\n onTouchmove: _cache[8] || (_cache[8] = $event => _ctx.$emit('touchmove', $event))\n }, {\n default: _withCtx(() => [_createVNode(_component_el_checkbox, {\n modelValue: $data.localSelected,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $data.localSelected = $event),\n onChange: _cache[1] || (_cache[1] = $event => _ctx.$emit('update:selected', $data.localSelected))\n }, null, 8, [\"modelValue\"]), _createElementVNode(\"div\", {\n class: \"folder-icon\",\n onClick: _cache[2] || (_cache[2] = $event => _ctx.$emit('enter'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"folder-open\",\n class: \"folder-icon-svg\"\n })]), _createElementVNode(\"div\", _hoisted_1, [_createElementVNode(\"div\", _hoisted_2, [_createElementVNode(\"span\", _hoisted_3, _toDisplayString($options.folderName), 1)]), $props.showActions ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [_cache[9] || (_cache[9] = _createElementVNode(\"div\", {\n class: \"action-bar-left\"\n }, null, -1)), _createElementVNode(\"div\", _hoisted_5, [_createVNode(_component_el_tooltip, {\n disabled: $props.disableTooltip,\n content: _ctx.$t('dashboard.copyLink'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"action-btn\",\n onClick: _cache[3] || (_cache[3] = _withModifiers($event => _ctx.$emit('copy'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"copy\"\n })])]),\n _: 1\n }, 8, [\"disabled\", \"content\"]), _createVNode(_component_el_tooltip, {\n disabled: $props.disableTooltip,\n content: _ctx.$t('dashboard.moveFile'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"action-btn\",\n onClick: _cache[4] || (_cache[4] = _withModifiers($event => _ctx.$emit('move'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"file-export\"\n })])]),\n _: 1\n }, 8, [\"disabled\", \"content\"]), _createVNode(_component_el_tooltip, {\n disabled: $props.disableTooltip,\n content: _ctx.$t('dashboard.delete'),\n placement: \"top\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"action-btn action-btn-danger\",\n onClick: _cache[5] || (_cache[5] = _withModifiers($event => _ctx.$emit('delete'), [\"stop\"]))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"trash-alt\"\n })])]),\n _: 1\n }, 8, [\"disabled\", \"content\"])])])) : _createCommentVNode(\"\", true)])]),\n _: 1\n });\n}","import \"core-js/modules/es.iterator.constructor.js\";\nimport \"core-js/modules/es.iterator.filter.js\";\nexport default {\n name: 'FolderCard',\n props: {\n name: {\n type: String,\n required: true\n },\n selected: {\n type: Boolean,\n default: false\n },\n showActions: {\n type: Boolean,\n default: true\n },\n disableTooltip: {\n type: Boolean,\n default: false\n }\n },\n emits: ['update:selected', 'enter', 'copy', 'move', 'delete', 'touchstart', 'touchend', 'touchmove'],\n data() {\n return {\n localSelected: this.selected\n };\n },\n computed: {\n folderName() {\n const parts = this.name.split('/').filter(Boolean);\n return parts[parts.length - 1] || this.name;\n }\n },\n watch: {\n selected(val) {\n this.localSelected = val;\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./FolderCard.vue?vue&type=template&id=534cf01b&scoped=true\"\nimport script from \"./FolderCard.vue?vue&type=script&lang=js\"\nexport * from \"./FolderCard.vue?vue&type=script&lang=js\"\n\nimport \"./FolderCard.vue?vue&type=style&index=0&id=534cf01b&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-534cf01b\"]])\n\nexport default __exports__","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, createStaticVNode as _createStaticVNode } from \"vue\";\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n return $props.type === 'card' ? (_openBlock(true), _createElementBlock(_Fragment, {\n key: 0\n }, _renderList($props.count, i => {\n return _openBlock(), _createElementBlock(\"div\", {\n key: 'skeleton-' + i,\n class: \"skeleton-card\"\n }, [...(_cache[0] || (_cache[0] = [_createElementVNode(\"div\", {\n class: \"skeleton-image\"\n }, null, -1), _createElementVNode(\"div\", {\n class: \"skeleton-info\"\n }, [_createElementVNode(\"div\", {\n class: \"skeleton-text\"\n })], -1)]))]);\n }), 128)) : $props.type === 'list' ? (_openBlock(true), _createElementBlock(_Fragment, {\n key: 1\n }, _renderList($props.count, i => {\n return _openBlock(), _createElementBlock(\"div\", {\n key: 'list-skeleton-' + i,\n class: \"list-item skeleton-list-item\"\n }, [...(_cache[1] || (_cache[1] = [_createStaticVNode(\"\", 10)]))]);\n }), 128)) : _createCommentVNode(\"\", true);\n}","export default {\n name: 'SkeletonLoader',\n props: {\n type: {\n type: String,\n default: 'card',\n validator: value => ['card', 'list'].includes(value)\n },\n count: {\n type: Number,\n default: 15\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./SkeletonLoader.vue?vue&type=template&id=070880ec&scoped=true\"\nimport script from \"./SkeletonLoader.vue?vue&type=script&lang=js\"\nexport * from \"./SkeletonLoader.vue?vue&type=script&lang=js\"\n\nimport \"./SkeletonLoader.vue?vue&type=style&index=0&id=070880ec&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-070880ec\"]])\n\nexport default __exports__","import { resolveComponent as _resolveComponent, createVNode as _createVNode, withModifiers as _withModifiers, withKeys as _withKeys, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\";\nconst _hoisted_1 = [\"aria-checked\"];\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n return _openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([\"dashboard-checkbox\", [`dashboard-checkbox--${$props.variant}`, {\n 'checked': $props.checked,\n 'indeterminate': $props.indeterminate && !$props.checked\n }]]),\n role: \"checkbox\",\n \"aria-checked\": $options.ariaChecked,\n tabindex: \"0\",\n onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClick && $options.handleClick(...args)),\n onKeydown: [_cache[1] || (_cache[1] = _withKeys(_withModifiers((...args) => $options.handleClick && $options.handleClick(...args), [\"prevent\"]), [\"enter\"])), _cache[2] || (_cache[2] = _withKeys(_withModifiers((...args) => $options.handleClick && $options.handleClick(...args), [\"prevent\"]), [\"space\"]))]\n }, [_createVNode(_component_font_awesome_icon, {\n icon: $options.markIcon,\n class: \"dashboard-checkbox-mark\"\n }, null, 8, [\"icon\"])], 42, _hoisted_1);\n}","export default {\n name: 'DashboardCheckbox',\n props: {\n checked: {\n type: Boolean,\n default: false\n },\n indeterminate: {\n type: Boolean,\n default: false\n },\n variant: {\n type: String,\n default: 'breadcrumb',\n validator: value => ['breadcrumb'].includes(value)\n }\n },\n emits: ['click'],\n computed: {\n ariaChecked() {\n if (this.checked) return 'true';\n if (this.indeterminate) return 'mixed';\n return 'false';\n },\n markIcon() {\n return this.indeterminate && !this.checked ? 'minus' : 'check';\n }\n },\n methods: {\n handleClick(event) {\n this.$emit('click', event);\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./DashboardCheckbox.vue?vue&type=template&id=3757bfa7&scoped=true\"\nimport script from \"./DashboardCheckbox.vue?vue&type=script&lang=js\"\nexport * from \"./DashboardCheckbox.vue?vue&type=script&lang=js\"\n\nimport \"./DashboardCheckbox.vue?vue&type=style&index=0&id=3757bfa7&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-3757bfa7\"]])\n\nexport default __exports__","import { resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createTextVNode as _createTextVNode, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\";\nconst _hoisted_1 = {\n class: \"el-dropdown-link filter-trigger\"\n};\nconst _hoisted_2 = {\n class: \"filter-section\"\n};\nconst _hoisted_3 = {\n class: \"filter-title\"\n};\nconst _hoisted_4 = {\n class: \"filter-options\"\n};\nconst _hoisted_5 = {\n class: \"filter-section\"\n};\nconst _hoisted_6 = {\n class: \"filter-title\"\n};\nconst _hoisted_7 = {\n class: \"filter-options\"\n};\nconst _hoisted_8 = {\n class: \"filter-section\"\n};\nconst _hoisted_9 = {\n class: \"filter-title\"\n};\nconst _hoisted_10 = {\n class: \"filter-options\"\n};\nconst _hoisted_11 = {\n class: \"filter-section\"\n};\nconst _hoisted_12 = {\n class: \"filter-title\"\n};\nconst _hoisted_13 = {\n class: \"filter-options\"\n};\nconst _hoisted_14 = {\n class: \"filter-section\"\n};\nconst _hoisted_15 = {\n class: \"filter-title\"\n};\nconst _hoisted_16 = {\n class: \"filter-options\"\n};\nconst _hoisted_17 = {\n key: 0,\n class: \"filter-section\"\n};\nconst _hoisted_18 = {\n class: \"filter-title\"\n};\nconst _hoisted_19 = {\n class: \"filter-options\"\n};\nconst _hoisted_20 = {\n key: 0,\n class: \"channel-divider\"\n};\nconst _hoisted_21 = {\n class: \"channel-group-title\"\n};\nconst _hoisted_22 = {\n class: \"filter-actions\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n const _component_el_badge = _resolveComponent(\"el-badge\");\n const _component_el_checkbox = _resolveComponent(\"el-checkbox\");\n const _component_el_checkbox_group = _resolveComponent(\"el-checkbox-group\");\n const _component_el_button = _resolveComponent(\"el-button\");\n const _component_el_dropdown_menu = _resolveComponent(\"el-dropdown-menu\");\n const _component_el_dropdown = _resolveComponent(\"el-dropdown\");\n return _openBlock(), _createBlock(_component_el_dropdown, {\n \"hide-on-click\": false,\n trigger: \"click\",\n class: \"filter-dropdown\",\n ref: \"dropdownRef\"\n }, {\n dropdown: _withCtx(() => [_createVNode(_component_el_dropdown_menu, {\n class: \"filter-dropdown-menu\"\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_2, [_createElementVNode(\"div\", _hoisted_3, _toDisplayString(_ctx.$t('filter.accessStatus')), 1), _createElementVNode(\"div\", _hoisted_4, [_createVNode(_component_el_checkbox_group, {\n modelValue: $data.localFilters.accessStatus,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $data.localFilters.accessStatus = $event),\n onChange: _cache[1] || (_cache[1] = $event => $options.handleFilterChange('accessStatus'))\n }, {\n default: _withCtx(() => [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($options.accessStatusOptions, option => {\n return _openBlock(), _createBlock(_component_el_checkbox, {\n key: 'accessStatus-' + option.value,\n label: option.value\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(option.label), 1)]),\n _: 2\n }, 1032, [\"label\"]);\n }), 128))]),\n _: 1\n }, 8, [\"modelValue\"])])]), _createElementVNode(\"div\", _hoisted_5, [_createElementVNode(\"div\", _hoisted_6, _toDisplayString(_ctx.$t('filter.blackWhiteList')), 1), _createElementVNode(\"div\", _hoisted_7, [_createVNode(_component_el_checkbox_group, {\n modelValue: $data.localFilters.listType,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => $data.localFilters.listType = $event),\n onChange: _cache[3] || (_cache[3] = $event => $options.handleFilterChange('listType'))\n }, {\n default: _withCtx(() => [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($options.listTypeOptions, option => {\n return _openBlock(), _createBlock(_component_el_checkbox, {\n key: 'listType-' + option.value,\n label: option.value\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(option.label), 1)]),\n _: 2\n }, 1032, [\"label\"]);\n }), 128))]),\n _: 1\n }, 8, [\"modelValue\"])])]), _createElementVNode(\"div\", _hoisted_8, [_createElementVNode(\"div\", _hoisted_9, _toDisplayString(_ctx.$t('filter.reviewResult')), 1), _createElementVNode(\"div\", _hoisted_10, [_createVNode(_component_el_checkbox_group, {\n modelValue: $data.localFilters.label,\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = $event => $data.localFilters.label = $event),\n onChange: _cache[5] || (_cache[5] = $event => $options.handleFilterChange('label'))\n }, {\n default: _withCtx(() => [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($options.labelOptions, option => {\n return _openBlock(), _createBlock(_component_el_checkbox, {\n key: 'label-' + option.value,\n label: option.value\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(option.label), 1)]),\n _: 2\n }, 1032, [\"label\"]);\n }), 128))]),\n _: 1\n }, 8, [\"modelValue\"])])]), _createElementVNode(\"div\", _hoisted_11, [_createElementVNode(\"div\", _hoisted_12, _toDisplayString(_ctx.$t('filter.fileType')), 1), _createElementVNode(\"div\", _hoisted_13, [_createVNode(_component_el_checkbox_group, {\n modelValue: $data.localFilters.fileType,\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = $event => $data.localFilters.fileType = $event),\n onChange: _cache[7] || (_cache[7] = $event => $options.handleFilterChange('fileType'))\n }, {\n default: _withCtx(() => [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($options.fileTypeOptions, option => {\n return _openBlock(), _createBlock(_component_el_checkbox, {\n key: 'fileType-' + option.value,\n label: option.value\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(option.label), 1)]),\n _: 2\n }, 1032, [\"label\"]);\n }), 128))]),\n _: 1\n }, 8, [\"modelValue\"])])]), _createElementVNode(\"div\", _hoisted_14, [_createElementVNode(\"div\", _hoisted_15, _toDisplayString(_ctx.$t('filter.channelType')), 1), _createElementVNode(\"div\", _hoisted_16, [_createVNode(_component_el_checkbox_group, {\n modelValue: $data.localFilters.channel,\n \"onUpdate:modelValue\": _cache[8] || (_cache[8] = $event => $data.localFilters.channel = $event),\n onChange: _cache[9] || (_cache[9] = $event => $options.handleFilterChange('channel'))\n }, {\n default: _withCtx(() => [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($options.channelOptions, option => {\n return _openBlock(), _createBlock(_component_el_checkbox, {\n key: 'channel-' + option.value,\n label: option.value\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(option.label), 1)]),\n _: 2\n }, 1032, [\"label\"]);\n }), 128))]),\n _: 1\n }, 8, [\"modelValue\"])])]), $props.channelNameOptions.length > 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, [_createElementVNode(\"div\", _hoisted_18, _toDisplayString(_ctx.$t('filter.channelName')), 1), _createElementVNode(\"div\", _hoisted_19, [_createVNode(_component_el_checkbox_group, {\n modelValue: $data.localFilters.channelName,\n \"onUpdate:modelValue\": _cache[10] || (_cache[10] = $event => $data.localFilters.channelName = $event),\n onChange: _cache[11] || (_cache[11] = $event => $options.handleFilterChange('channelName'))\n }, {\n default: _withCtx(() => [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($options.groupedChannelNames, (group, index) => {\n return _openBlock(), _createElementBlock(_Fragment, {\n key: 'group-' + group.type\n }, [index > 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_20)) : _createCommentVNode(\"\", true), _createElementVNode(\"div\", _hoisted_21, _toDisplayString(group.typeLabel), 1), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(group.channels, option => {\n return _openBlock(), _createBlock(_component_el_checkbox, {\n key: 'channelName-' + option.type + '-' + option.name,\n label: option.type + ':' + option.name\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(option.name), 1)]),\n _: 2\n }, 1032, [\"label\"]);\n }), 128))], 64);\n }), 128))]),\n _: 1\n }, 8, [\"modelValue\"])])])) : _createCommentVNode(\"\", true), _createElementVNode(\"div\", _hoisted_22, [_createVNode(_component_el_button, {\n size: \"small\",\n onClick: $options.clearFilters,\n disabled: $options.activeFilterCount === 0\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('filter.clearFilters')), 1)]),\n _: 1\n }, 8, [\"onClick\", \"disabled\"])])]),\n _: 1\n })]),\n default: _withCtx(() => [_createElementVNode(\"span\", _hoisted_1, [_createVNode(_component_el_badge, {\n value: $options.activeFilterCount,\n hidden: $options.activeFilterCount === 0,\n class: \"filter-badge\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"filter\",\n class: \"header-icon\"\n })]),\n _: 1\n }, 8, [\"value\", \"hidden\"])])]),\n _: 1\n }, 512);\n}","import \"core-js/modules/es.array.push.js\";\nimport \"core-js/modules/es.iterator.constructor.js\";\nimport \"core-js/modules/es.iterator.for-each.js\";\nimport \"core-js/modules/es.iterator.reduce.js\";\nexport default {\n name: 'FilterDropdown',\n props: {\n filters: {\n type: Object,\n default: () => ({\n accessStatus: [],\n // 访问状态: 'normal'(正常), 'blocked'(已屏蔽)\n listType: [],\n // 黑白名单: 'White', 'Block', 'none'\n label: [],\n fileType: [],\n channel: [],\n channelName: []\n })\n },\n channelNameOptions: {\n type: Array,\n default: () => []\n }\n },\n emits: ['update:filters', 'change'],\n data() {\n return {\n localFilters: {\n accessStatus: [],\n listType: [],\n label: [],\n fileType: [],\n channel: [],\n channelName: []\n }\n };\n },\n computed: {\n // 访问状态选项(综合判断 ListType 和 Label)\n // 正常: ListType !== 'Block' && Label !== 'adult'\n // 已屏蔽: ListType === 'Block' || Label === 'adult'\n accessStatusOptions() {\n return [{\n label: this.$t('filter.normal'),\n value: 'normal'\n }, {\n label: this.$t('filter.blocked'),\n value: 'blocked'\n }];\n },\n // 黑白名单选项(直接使用 ListType 字段值)\n listTypeOptions() {\n return [{\n label: this.$t('filter.whiteList'),\n value: 'White'\n }, {\n label: this.$t('filter.blackList'),\n value: 'Block'\n }, {\n label: this.$t('filter.notSet'),\n value: 'None'\n }];\n },\n // 审查结果选项\n labelOptions() {\n return [{\n label: this.$t('filter.normal'),\n value: 'normal'\n }, {\n label: this.$t('filter.teenContent'),\n value: 'teen'\n }, {\n label: this.$t('filter.adultContent'),\n value: 'adult'\n }];\n },\n fileTypeOptions() {\n return [{\n label: this.$t('filter.image'),\n value: 'image'\n }, {\n label: this.$t('filter.video'),\n value: 'video'\n }, {\n label: this.$t('filter.audio'),\n value: 'audio'\n }, {\n label: this.$t('filter.other'),\n value: 'other'\n }];\n },\n channelOptions() {\n return [{\n label: 'Telegram',\n value: 'TelegramNew'\n }, {\n label: 'Cloudflare R2',\n value: 'CloudflareR2'\n }, {\n label: 'S3',\n value: 'S3'\n }, {\n label: 'Discord',\n value: 'Discord'\n }, {\n label: 'HuggingFace',\n value: 'HuggingFace'\n }, {\n label: 'WebDAV',\n value: 'WebDAV'\n }, {\n label: this.$t('filter.externalLink'),\n value: 'External'\n }];\n },\n activeFilterCount() {\n return Object.values(this.localFilters).reduce((count, arr) => count + arr.length, 0);\n },\n // 按类型分组渠道名称\n groupedChannelNames() {\n const groups = {};\n this.channelNameOptions.forEach(option => {\n if (!groups[option.type]) {\n groups[option.type] = {\n type: option.type,\n typeLabel: option.typeLabel,\n channels: []\n };\n }\n groups[option.type].channels.push(option);\n });\n return Object.values(groups);\n }\n },\n watch: {\n filters: {\n handler(newFilters) {\n this.localFilters = {\n accessStatus: Array.isArray(newFilters.accessStatus) ? [...newFilters.accessStatus] : [],\n listType: Array.isArray(newFilters.listType) ? [...newFilters.listType] : [],\n label: Array.isArray(newFilters.label) ? [...newFilters.label] : [],\n fileType: Array.isArray(newFilters.fileType) ? [...newFilters.fileType] : [],\n channel: Array.isArray(newFilters.channel) ? [...newFilters.channel] : [],\n channelName: Array.isArray(newFilters.channelName) ? [...newFilters.channelName] : []\n };\n },\n immediate: true,\n deep: true\n }\n },\n methods: {\n handleFilterChange(type) {\n this.$emit('update:filters', {\n ...this.localFilters\n });\n this.$emit('change', {\n type,\n filters: {\n ...this.localFilters\n }\n });\n },\n clearFilters() {\n this.localFilters = {\n accessStatus: [],\n listType: [],\n label: [],\n fileType: [],\n channel: [],\n channelName: []\n };\n this.$emit('update:filters', {\n ...this.localFilters\n });\n this.$emit('change', {\n type: 'clear',\n filters: {\n ...this.localFilters\n }\n });\n }\n }\n};","/* unplugin-vue-components disabled */import { render } from \"./FilterDropdown.vue?vue&type=template&id=42919522&scoped=true\"\nimport script from \"./FilterDropdown.vue?vue&type=script&lang=js\"\nexport * from \"./FilterDropdown.vue?vue&type=script&lang=js\"\n\nimport \"./FilterDropdown.vue?vue&type=style&index=0&id=42919522&scoped=true&lang=css\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-42919522\"]])\n\nexport default __exports__","import \"core-js/modules/es.iterator.constructor.js\";\nimport \"core-js/modules/es.iterator.filter.js\";\nimport { resolveComponent as _resolveComponent, createVNode as _createVNode, withKeys as _withKeys, withCtx as _withCtx, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, withModifiers as _withModifiers, normalizeStyle as _normalizeStyle } from \"vue\";\nconst _hoisted_1 = {\n class: \"container\"\n};\nconst _hoisted_2 = {\n class: \"header-content admin-header-content\"\n};\nconst _hoisted_3 = {\n class: \"search-area\"\n};\nconst _hoisted_4 = {\n class: \"search-card\"\n};\nconst _hoisted_5 = {\n class: \"actions\"\n};\nconst _hoisted_6 = {\n class: \"el-dropdown-link\"\n};\nconst _hoisted_7 = {\n class: \"breadcrumb-container\"\n};\nconst _hoisted_8 = [\"title\", \"aria-pressed\"];\nconst _hoisted_9 = [\"title\", \"aria-pressed\"];\nconst _hoisted_10 = [\"title\"];\nconst _hoisted_11 = {\n class: \"breadcrumb-sort-icon\",\n viewBox: \"0 0 30 18\",\n \"aria-hidden\": \"true\"\n};\nconst _hoisted_12 = {\n key: 0,\n class: \"sort-field-glyph\"\n};\nconst _hoisted_13 = {\n key: 1,\n class: \"sort-field-glyph\"\n};\nconst _hoisted_14 = {\n key: 2,\n class: \"sort-field-glyph\"\n};\nconst _hoisted_15 = {\n key: 3,\n class: \"sort-field-glyph\"\n};\nconst _hoisted_16 = {\n key: 4,\n class: \"sort-order-glyph\",\n d: \"M23 13.5V4.5M19 8.5L23 4.5L27 8.5\"\n};\nconst _hoisted_17 = {\n key: 5,\n class: \"sort-order-glyph\",\n d: \"M23 4.5V13.5M19 9.5L23 13.5L27 9.5\"\n};\nconst _hoisted_18 = {\n class: \"sort-order-wrapper\"\n};\nconst _hoisted_19 = {\n class: \"mobile-directory-path\"\n};\nconst _hoisted_20 = {\n class: \"breadcrumb desktop-only\"\n};\nconst _hoisted_21 = [\"title\"];\nconst _hoisted_22 = {\n key: 1,\n class: \"empty-state\"\n};\nconst _hoisted_23 = {\n class: \"empty-text\"\n};\nconst _hoisted_24 = {\n class: \"empty-hint\"\n};\nconst _hoisted_25 = {\n class: \"list-header\"\n};\nconst _hoisted_26 = {\n class: \"list-col list-col-checkbox\"\n};\nconst _hoisted_27 = {\n class: \"list-col list-col-preview\"\n};\nconst _hoisted_28 = {\n class: \"list-col list-col-name\"\n};\nconst _hoisted_29 = {\n class: \"list-col list-col-tags\"\n};\nconst _hoisted_30 = {\n class: \"list-col list-col-channel\"\n};\nconst _hoisted_31 = {\n class: \"list-col list-col-channel-name\"\n};\nconst _hoisted_32 = {\n class: \"list-col list-col-address\"\n};\nconst _hoisted_33 = {\n class: \"list-col list-col-size\"\n};\nconst _hoisted_34 = {\n class: \"list-col list-col-date\"\n};\nconst _hoisted_35 = {\n class: \"list-col list-col-actions\"\n};\nconst _hoisted_36 = {\n key: 1,\n class: \"empty-state list-empty\"\n};\nconst _hoisted_37 = {\n class: \"empty-text\"\n};\nconst _hoisted_38 = {\n class: \"empty-hint\"\n};\nconst _hoisted_39 = {\n class: \"pagination-container\"\n};\nconst _hoisted_40 = {\n class: \"pagination-center\"\n};\nconst _hoisted_41 = {\n class: \"pagination-right\"\n};\nconst _hoisted_42 = {\n class: \"page-total\"\n};\nconst _hoisted_43 = {\n class: \"page-jump\"\n};\nconst _hoisted_44 = {\n class: \"dialog-section\"\n};\nconst _hoisted_45 = {\n class: \"section-header\"\n};\nconst _hoisted_46 = {\n class: \"section-title\"\n};\nconst _hoisted_47 = {\n class: \"section-content\"\n};\nconst _hoisted_48 = {\n class: \"dialog-section\"\n};\nconst _hoisted_49 = {\n class: \"section-header\"\n};\nconst _hoisted_50 = {\n class: \"section-title\"\n};\nconst _hoisted_51 = {\n class: \"section-content\"\n};\nconst _hoisted_52 = {\n class: \"setting-item\"\n};\nconst _hoisted_53 = {\n class: \"setting-label\"\n};\nconst _hoisted_54 = {\n key: 0,\n class: \"setting-item\"\n};\nconst _hoisted_55 = {\n class: \"setting-label\"\n};\nconst _hoisted_56 = {\n class: \"dialog-action\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_DashboardTabs = _resolveComponent(\"DashboardTabs\");\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\");\n const _component_el_input = _resolveComponent(\"el-input\");\n const _component_FilterDropdown = _resolveComponent(\"FilterDropdown\");\n const _component_el_tooltip = _resolveComponent(\"el-tooltip\");\n const _component_el_header = _resolveComponent(\"el-header\");\n const _component_DashboardCheckbox = _resolveComponent(\"DashboardCheckbox\");\n const _component_el_radio_button = _resolveComponent(\"el-radio-button\");\n const _component_el_radio_group = _resolveComponent(\"el-radio-group\");\n const _component_el_divider = _resolveComponent(\"el-divider\");\n const _component_el_dropdown_item = _resolveComponent(\"el-dropdown-item\");\n const _component_el_dropdown_menu = _resolveComponent(\"el-dropdown-menu\");\n const _component_el_dropdown = _resolveComponent(\"el-dropdown\");\n const _component_el_breadcrumb_item = _resolveComponent(\"el-breadcrumb-item\");\n const _component_el_breadcrumb = _resolveComponent(\"el-breadcrumb\");\n const _component_SkeletonLoader = _resolveComponent(\"SkeletonLoader\");\n const _component_FolderCard = _resolveComponent(\"FolderCard\");\n const _component_FileCard = _resolveComponent(\"FileCard\");\n const _component_el_checkbox = _resolveComponent(\"el-checkbox\");\n const _component_FileListItem = _resolveComponent(\"FileListItem\");\n const _component_el_pagination = _resolveComponent(\"el-pagination\");\n const _component_el_button = _resolveComponent(\"el-button\");\n const _component_el_main = _resolveComponent(\"el-main\");\n const _component_el_container = _resolveComponent(\"el-container\");\n const _component_BatchActionBar = _resolveComponent(\"BatchActionBar\");\n const _component_FileDetailDialog = _resolveComponent(\"FileDetailDialog\");\n const _component_el_radio = _resolveComponent(\"el-radio\");\n const _component_el_switch = _resolveComponent(\"el-switch\");\n const _component_el_dialog = _resolveComponent(\"el-dialog\");\n const _component_TagManagementDialog = _resolveComponent(\"TagManagementDialog\");\n const _component_BatchTagDialog = _resolveComponent(\"BatchTagDialog\");\n const _component_MobileActionSheet = _resolveComponent(\"MobileActionSheet\");\n const _component_MobileDirectoryDrawer = _resolveComponent(\"MobileDirectoryDrawer\");\n const _component_MoveFileDialog = _resolveComponent(\"MoveFileDialog\");\n return _openBlock(), _createElementBlock(\"div\", _hoisted_1, [_createVNode(_component_el_container, null, {\n default: _withCtx(() => [_createVNode(_component_el_header, null, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_2, [_createVNode(_component_DashboardTabs, {\n activeTab: \"dashboard\"\n }), _createElementVNode(\"div\", _hoisted_3, [_createElementVNode(\"div\", _hoisted_4, [_createVNode(_component_el_input, {\n modelValue: $data.tempSearch,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $data.tempSearch = $event),\n size: \"small\",\n placeholder: _ctx.$t('dashboard.searchPlaceholder'),\n onKeyup: _withKeys($options.handleSearch, [\"enter\"])\n }, {\n suffix: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"search\",\n class: \"search-icon\",\n onClick: $options.handleSearch\n }, null, 8, [\"onClick\"])]),\n _: 1\n }, 8, [\"modelValue\", \"placeholder\", \"onKeyup\"])]), _createVNode(_component_FilterDropdown, {\n filters: $data.filters,\n \"onUpdate:filters\": _cache[1] || (_cache[1] = $event => $data.filters = $event),\n channelNameOptions: $data.channelNameOptions,\n onChange: $options.handleFilterChange\n }, null, 8, [\"filters\", \"channelNameOptions\", \"onChange\"])]), _createElementVNode(\"div\", _hoisted_5, [_createVNode(_component_el_tooltip, {\n disabled: $options.disableTooltip,\n content: _ctx.$t('dashboard.linkFormat'),\n placement: \"bottom\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createElementVNode(\"span\", _hoisted_6, [_createVNode(_component_font_awesome_icon, {\n icon: \"link\",\n class: \"header-icon\",\n onClick: _cache[2] || (_cache[2] = $event => $data.showUrlDialog = true)\n })])]),\n _: 1\n }, 8, [\"disabled\", \"content\"]), _createVNode(_component_el_tooltip, {\n disabled: $options.disableTooltip,\n content: _ctx.$t('dashboard.logout'),\n placement: \"bottom\",\n \"show-after\": 1000\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"sign-out-alt\",\n class: \"header-icon\",\n onClick: $options.handleLogout\n }, null, 8, [\"onClick\"])]),\n _: 1\n }, 8, [\"disabled\", \"content\"])])])]),\n _: 1\n }), _createVNode(_component_el_main, {\n class: _normalizeClass([\"main-container\", {\n 'has-batch-toolbar': $data.selectedFiles.length > 0\n }])\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_7, [_createVNode(_component_DashboardCheckbox, {\n checked: $options.selectPage,\n indeterminate: $options.selectedPageFiles && !$options.selectPage,\n variant: \"breadcrumb\",\n onClick: $options.handleSelectPage\n }, null, 8, [\"checked\", \"indeterminate\", \"onClick\"]), _createElementVNode(\"div\", {\n class: _normalizeClass([\"breadcrumb-view-toggle\", {\n 'is-list': $data.viewMode === 'list'\n }]),\n role: \"group\"\n }, [_createElementVNode(\"button\", {\n class: _normalizeClass([\"breadcrumb-view-button\", {\n 'is-active': $data.viewMode === 'card'\n }]),\n type: \"button\",\n title: _ctx.$t('dashboard.cardView'),\n \"aria-pressed\": $data.viewMode === 'card',\n onClick: _cache[3] || (_cache[3] = $event => $options.setViewMode('card'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"th-large\",\n class: \"breadcrumb-view-icon\"\n })], 10, _hoisted_8), _createElementVNode(\"button\", {\n class: _normalizeClass([\"breadcrumb-view-button\", {\n 'is-active': $data.viewMode === 'list'\n }]),\n type: \"button\",\n title: _ctx.$t('dashboard.listView'),\n \"aria-pressed\": $data.viewMode === 'list',\n onClick: _cache[4] || (_cache[4] = $event => $options.setViewMode('list'))\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"list\",\n class: \"breadcrumb-view-icon\"\n })], 10, _hoisted_9)], 2), _createVNode(_component_el_dropdown, {\n trigger: \"click\",\n class: \"breadcrumb-sort-dropdown\",\n onCommand: $options.setSortField\n }, {\n dropdown: _withCtx(() => [_createVNode(_component_el_dropdown_menu, {\n class: \"sort-dropdown-menu\"\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_18, [_createVNode(_component_el_radio_group, {\n modelValue: $data.sortOrder,\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = $event => $data.sortOrder = $event),\n size: \"small\",\n onChange: $options.setSortOrder\n }, {\n default: _withCtx(() => [_createVNode(_component_el_radio_button, {\n label: \"asc\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('dashboard.sortAsc')), 1)]),\n _: 1\n }), _createVNode(_component_el_radio_button, {\n label: \"desc\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('dashboard.sortDesc')), 1)]),\n _: 1\n })]),\n _: 1\n }, 8, [\"modelValue\", \"onChange\"])]), _createVNode(_component_el_divider, {\n class: \"sort-divider\"\n }), _createVNode(_component_el_dropdown_item, {\n command: \"time\",\n class: _normalizeClass({\n 'is-selected': $data.sortField === 'time'\n })\n }, {\n default: _withCtx(() => [_createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('dashboard.sortByTime')), 1), $data.sortField === 'time' ? (_openBlock(), _createBlock(_component_font_awesome_icon, {\n key: 0,\n icon: \"check\",\n class: \"sort-field-check\"\n })) : _createCommentVNode(\"\", true)]),\n _: 1\n }, 8, [\"class\"]), _createVNode(_component_el_dropdown_item, {\n command: \"size\",\n class: _normalizeClass({\n 'is-selected': $data.sortField === 'size'\n })\n }, {\n default: _withCtx(() => [_createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('dashboard.sortBySize')), 1), $data.sortField === 'size' ? (_openBlock(), _createBlock(_component_font_awesome_icon, {\n key: 0,\n icon: \"check\",\n class: \"sort-field-check\"\n })) : _createCommentVNode(\"\", true)]),\n _: 1\n }, 8, [\"class\"]), _createVNode(_component_el_dropdown_item, {\n command: \"rawName\",\n class: _normalizeClass({\n 'is-selected': $data.sortField === 'rawName'\n })\n }, {\n default: _withCtx(() => [_createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('dashboard.sortByRawName')), 1), $data.sortField === 'rawName' ? (_openBlock(), _createBlock(_component_font_awesome_icon, {\n key: 0,\n icon: \"check\",\n class: \"sort-field-check\"\n })) : _createCommentVNode(\"\", true)]),\n _: 1\n }, 8, [\"class\"]), _createVNode(_component_el_dropdown_item, {\n command: \"fileName\",\n class: _normalizeClass({\n 'is-selected': $data.sortField === 'fileName'\n })\n }, {\n default: _withCtx(() => [_createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('dashboard.sortByFileName')), 1), $data.sortField === 'fileName' ? (_openBlock(), _createBlock(_component_font_awesome_icon, {\n key: 0,\n icon: \"check\",\n class: \"sort-field-check\"\n })) : _createCommentVNode(\"\", true)]),\n _: 1\n }, 8, [\"class\"])]),\n _: 1\n })]),\n default: _withCtx(() => [_createElementVNode(\"button\", {\n class: \"breadcrumb-sort-button\",\n type: \"button\",\n title: $options.sortLabel\n }, [(_openBlock(), _createElementBlock(\"svg\", _hoisted_11, [$data.sortField === 'time' ? (_openBlock(), _createElementBlock(\"g\", _hoisted_12, [...(_cache[32] || (_cache[32] = [_createElementVNode(\"circle\", {\n cx: \"7.5\",\n cy: \"9\",\n r: \"5.5\"\n }, null, -1), _createElementVNode(\"path\", {\n d: \"M7.5 5.5V9L10 10.5\"\n }, null, -1)]))])) : $data.sortField === 'size' ? (_openBlock(), _createElementBlock(\"g\", _hoisted_13, [...(_cache[33] || (_cache[33] = [_createElementVNode(\"path\", {\n d: \"M2 4H13M2 9H10M2 14H7\"\n }, null, -1)]))])) : $data.sortField === 'rawName' ? (_openBlock(), _createElementBlock(\"g\", _hoisted_14, [...(_cache[34] || (_cache[34] = [_createElementVNode(\"path\", {\n d: \"M5.5 3L4 15M11 3L9.5 15M2.5 7H13M2 11H12.5\"\n }, null, -1)]))])) : (_openBlock(), _createElementBlock(\"g\", _hoisted_15, [...(_cache[35] || (_cache[35] = [_createElementVNode(\"path\", {\n d: \"M2.5 14L7.5 3L12.5 14M4.3 10H10.7\"\n }, null, -1)]))])), $data.sortOrder === 'asc' ? (_openBlock(), _createElementBlock(\"path\", _hoisted_16)) : (_openBlock(), _createElementBlock(\"path\", _hoisted_17))]))], 8, _hoisted_10)]),\n _: 1\n }, 8, [\"onCommand\"]), _createElementVNode(\"div\", {\n class: \"mobile-directory-trigger\",\n onClick: _cache[6] || (_cache[6] = $event => $data.showMobileDirectoryDrawer = true)\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"folder-open\",\n class: \"mobile-directory-icon\"\n }), _createElementVNode(\"span\", _hoisted_19, _toDisplayString($data.currentPath && $data.currentPath.split('/').filter(Boolean).length > 0 ? $data.currentPath.split('/').filter(Boolean).pop() : _ctx.$t('dashboard.rootDirectory')), 1), _createVNode(_component_font_awesome_icon, {\n icon: \"chevron-down\",\n class: \"mobile-directory-arrow\"\n })]), _createElementVNode(\"div\", _hoisted_20, [_createVNode(_component_el_breadcrumb, {\n separator: \"/\"\n }, {\n default: _withCtx(() => [_createVNode(_component_el_breadcrumb_item, {\n onClick: _cache[7] || (_cache[7] = $event => $options.navigateToFolder(''))\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"home\",\n class: \"breadcrumb-home-icon\"\n })]),\n _: 1\n }), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.currentPath.split('/').filter(Boolean), (folder, index) => {\n return _openBlock(), _createBlock(_component_el_breadcrumb_item, {\n key: index,\n onClick: $event => $options.navigateToFolder($data.currentPath.split('/').filter(Boolean).slice(0, index + 1).join('/'))\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(folder), 1)]),\n _: 2\n }, 1032, [\"onClick\"]);\n }), 128))]),\n _: 1\n })]), _createElementVNode(\"span\", {\n class: \"stats-badge\",\n title: _ctx.$t('dashboard.totalFiles', {\n count: _ctx.$data.Number\n })\n }, [_createVNode(_component_font_awesome_icon, {\n icon: \"database\",\n class: \"stats-badge-icon\"\n }), _createTextVNode(\" \" + _toDisplayString($data.Number), 1)], 8, _hoisted_21)]), $data.viewMode === 'card' ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"content\", {\n 'is-drag-selecting': $setup.isDragging\n }]),\n ref: \"cardContainerRef\",\n onTouchstartPassive: _cache[8] || (_cache[8] = (...args) => $options.handlePageSwipeStart && $options.handlePageSwipeStart(...args)),\n onTouchendPassive: _cache[9] || (_cache[9] = (...args) => $options.handlePageSwipeEnd && $options.handlePageSwipeEnd(...args)),\n onTouchcancelPassive: _cache[10] || (_cache[10] = (...args) => $options.resetPageSwipe && $options.resetPageSwipe(...args))\n }, [$data.loading ? (_openBlock(), _createBlock(_component_SkeletonLoader, {\n key: 0,\n type: \"card\",\n count: $data.pageSize\n }, null, 8, [\"count\"])) : $options.paginatedTableData.length === 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_22, [_createVNode(_component_font_awesome_icon, {\n icon: \"folder-open\",\n class: \"empty-icon\"\n }), _createElementVNode(\"p\", _hoisted_23, _toDisplayString($options.hasSearchOrFilter ? _ctx.$t('dashboard.noMatchingFiles') : _ctx.$t('dashboard.currentDirEmpty')), 1), _createElementVNode(\"p\", _hoisted_24, _toDisplayString($options.hasSearchOrFilter ? _ctx.$t('dashboard.adjustSearchHint') : _ctx.$t('dashboard.uploadHint')), 1)])) : (_openBlock(true), _createElementBlock(_Fragment, {\n key: 2\n }, _renderList($options.paginatedTableData, (item, index) => {\n return _openBlock(), _createElementBlock(_Fragment, {\n key: index\n }, [$options.isFolder(item) ? (_openBlock(), _createBlock(_component_FolderCard, {\n key: 0,\n name: item.name,\n selected: item.selected,\n \"onUpdate:selected\": $event => item.selected = $event,\n showActions: !$data.isSearchMode,\n disableTooltip: $options.disableTooltip,\n onEnter: $event => $options.enterFolder(item.name),\n onCopy: $event => $options.handleFolderCopy(item.name),\n onMove: $event => $options.handleMove(index, item.name),\n onDelete: $event => $options.handleDelete(index, item.name),\n onTouchstart: $event => $options.handleFolderTouchStart(item, index),\n onTouchend: $options.handleTouchEnd,\n onTouchmove: $options.handleTouchEnd\n }, null, 8, [\"name\", \"selected\", \"onUpdate:selected\", \"showActions\", \"disableTooltip\", \"onEnter\", \"onCopy\", \"onMove\", \"onDelete\", \"onTouchstart\", \"onTouchend\", \"onTouchmove\"])) : (_openBlock(), _createBlock(_component_FileCard, {\n key: 1,\n item: item,\n selected: item.selected,\n \"onUpdate:selected\": $event => item.selected = $event,\n fileLink: $options.getFileLink(item.name),\n previewSrcList: item.previewSrcList,\n disableTooltip: $options.disableTooltip,\n onDetail: $event => $options.openDetailDialog(index, item.name),\n onCopy: $event => $options.handleCopy(index, item.name),\n onMove: $event => $options.handleMove(index, item.name),\n onDelete: $event => $options.handleDelete(index, item.name),\n onDownload: $event => $options.handleDownload(item.name),\n onTouchstart: $event => $options.handleTouchStart(item, index),\n onTouchend: $options.handleTouchEnd,\n onTouchmove: $options.handleTouchEnd\n }, null, 8, [\"item\", \"selected\", \"onUpdate:selected\", \"fileLink\", \"previewSrcList\", \"disableTooltip\", \"onDetail\", \"onCopy\", \"onMove\", \"onDelete\", \"onDownload\", \"onTouchstart\", \"onTouchend\", \"onTouchmove\"]))], 64);\n }), 128))], 34)) : (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: _normalizeClass([\"list-view\", {\n 'is-drag-selecting': $setup.isDragging\n }]),\n ref: \"listContainerRef\",\n onTouchstartPassive: _cache[12] || (_cache[12] = (...args) => $options.handlePageSwipeStart && $options.handlePageSwipeStart(...args)),\n onTouchendPassive: _cache[13] || (_cache[13] = (...args) => $options.handlePageSwipeEnd && $options.handlePageSwipeEnd(...args)),\n onTouchcancelPassive: _cache[14] || (_cache[14] = (...args) => $options.resetPageSwipe && $options.resetPageSwipe(...args))\n }, [_createElementVNode(\"div\", _hoisted_25, [_createElementVNode(\"div\", _hoisted_26, [_createVNode(_component_el_checkbox, {\n \"model-value\": $options.isSelectAll,\n indeterminate: $options.isIndeterminate,\n onClick: _cache[11] || (_cache[11] = _withModifiers(() => {}, [\"stop\"])),\n onChange: $options.handleSelectAllPage\n }, null, 8, [\"model-value\", \"indeterminate\", \"onChange\"])]), _createElementVNode(\"div\", _hoisted_27, _toDisplayString(_ctx.$t('dashboard.preview')), 1), _createElementVNode(\"div\", _hoisted_28, _toDisplayString(_ctx.$t('dashboard.fileName')), 1), _createElementVNode(\"div\", _hoisted_29, _toDisplayString(_ctx.$t('dashboard.tags')), 1), _createElementVNode(\"div\", _hoisted_30, _toDisplayString(_ctx.$t('dashboard.channelType')), 1), _createElementVNode(\"div\", _hoisted_31, _toDisplayString(_ctx.$t('dashboard.channelNameCol')), 1), _createElementVNode(\"div\", _hoisted_32, _toDisplayString(_ctx.$t('dashboard.uploadAddress')), 1), _createElementVNode(\"div\", _hoisted_33, _toDisplayString(_ctx.$t('dashboard.fileSize')), 1), _createElementVNode(\"div\", _hoisted_34, _toDisplayString(_ctx.$t('dashboard.uploadTime')), 1), _createElementVNode(\"div\", _hoisted_35, _toDisplayString(_ctx.$t('dashboard.actions')), 1)]), $data.loading ? (_openBlock(), _createBlock(_component_SkeletonLoader, {\n key: 0,\n type: \"list\",\n count: $data.pageSize\n }, null, 8, [\"count\"])) : $options.paginatedTableData.length === 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_36, [_createVNode(_component_font_awesome_icon, {\n icon: \"folder-open\",\n class: \"empty-icon\"\n }), _createElementVNode(\"p\", _hoisted_37, _toDisplayString($options.hasSearchOrFilter ? _ctx.$t('dashboard.noMatchingFiles') : _ctx.$t('dashboard.currentDirEmpty')), 1), _createElementVNode(\"p\", _hoisted_38, _toDisplayString($options.hasSearchOrFilter ? _ctx.$t('dashboard.adjustSearchHint') : _ctx.$t('dashboard.uploadHint')), 1)])) : (_openBlock(true), _createElementBlock(_Fragment, {\n key: 2\n }, _renderList($options.paginatedTableData, (item, index) => {\n return _openBlock(), _createBlock(_component_FileListItem, {\n key: index,\n item: item,\n selected: item.selected,\n \"onUpdate:selected\": $event => item.selected = $event,\n fileLink: $options.getFileLink(item.name),\n onEnter: $event => $options.enterFolder(item.name),\n onDetail: $event => $options.openDetailDialog(index, item.name),\n onCopy: $event => $options.handleCopy(index, item.name),\n onFolderCopy: $event => $options.handleFolderCopy(item.name),\n onMove: $event => $options.handleMove(index, item.name),\n onDelete: $event => $options.handleDelete(index, item.name),\n onDownload: $event => $options.handleDownload(item.name),\n onTouchstart: $event => $options.isFolder(item) ? $options.handleFolderTouchStart(item, index) : $options.handleTouchStart(item, index),\n onTouchend: $options.handleTouchEnd,\n onTouchmove: $options.handleTouchEnd\n }, null, 8, [\"item\", \"selected\", \"onUpdate:selected\", \"fileLink\", \"onEnter\", \"onDetail\", \"onCopy\", \"onFolderCopy\", \"onMove\", \"onDelete\", \"onDownload\", \"onTouchstart\", \"onTouchend\", \"onTouchmove\"]);\n }), 128))], 34)), $setup.isDragging ? (_openBlock(), _createElementBlock(\"div\", {\n key: 2,\n class: \"drag-select-overlay\",\n style: _normalizeStyle({\n position: 'fixed',\n left: $setup.selectionRect.left + 'px',\n top: $setup.selectionRect.top + 'px',\n width: $setup.selectionRect.width + 'px',\n height: $setup.selectionRect.height + 'px'\n })\n }, null, 4)) : _createCommentVNode(\"\", true), _createElementVNode(\"div\", _hoisted_39, [_createElementVNode(\"div\", _hoisted_40, [_createVNode(_component_el_pagination, {\n background: \"\",\n layout: \"prev, pager, next\",\n total: $options.filteredTableData.length,\n \"page-size\": $data.pageSize,\n \"current-page\": $data.currentPage,\n \"pager-count\": $options.pagerCount,\n onCurrentChange: $options.handlePageChange\n }, null, 8, [\"total\", \"page-size\", \"current-page\", \"pager-count\", \"onCurrentChange\"]), _createVNode(_component_el_button, {\n type: \"primary\",\n onClick: $options.refreshFileList,\n class: \"refresh-btn\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"sync\",\n class: _normalizeClass({\n 'fa-spin': $data.refreshLoading\n })\n }, null, 8, [\"class\"])]),\n _: 1\n }, 8, [\"onClick\"]), $data.currentPage === Math.ceil($options.filteredTableData.length / $data.pageSize) ? (_openBlock(), _createBlock(_component_el_button, {\n key: 0,\n type: \"primary\",\n onClick: $options.loadMoreData,\n loading: $data.loading,\n class: \"load-more\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('dashboard.loadMore')), 1)]),\n _: 1\n }, 8, [\"onClick\", \"loading\"])) : _createCommentVNode(\"\", true)]), _createElementVNode(\"div\", _hoisted_41, [_createElementVNode(\"span\", _hoisted_42, _toDisplayString(_ctx.$t('dashboard.totalPages', {\n count: $options.realTotalPages\n })), 1), _createElementVNode(\"div\", _hoisted_43, [_createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('dashboard.jumpTo')), 1), _createVNode(_component_el_input, {\n modelValue: $data.jumpPage,\n \"onUpdate:modelValue\": _cache[15] || (_cache[15] = $event => $data.jumpPage = $event),\n size: \"small\",\n class: \"jump-input\",\n onKeyup: _withKeys($options.handleJumpPage, [\"enter\"])\n }, null, 8, [\"modelValue\", \"onKeyup\"]), _createVNode(_component_el_button, {\n size: \"small\",\n type: \"primary\",\n onClick: $options.handleJumpPage,\n class: \"jump-btn\"\n }, {\n default: _withCtx(() => [...(_cache[36] || (_cache[36] = [_createTextVNode(\"GO\", -1)]))]),\n _: 1\n }, 8, [\"onClick\"])])])])]),\n _: 1\n }, 8, [\"class\"])]),\n _: 1\n }), _createVNode(_component_BatchActionBar, {\n \"selected-count\": $data.selectedFiles.length,\n onAction: $options.handleBatchAction,\n onClear: $options.clearSelection\n }, null, 8, [\"selected-count\", \"onAction\", \"onClear\"]), _createVNode(_component_FileDetailDialog, {\n modelValue: $data.showdetailDialog,\n \"onUpdate:modelValue\": _cache[16] || (_cache[16] = $event => $data.showdetailDialog = $event),\n file: $data.detailFile,\n fileLink: $options.getFileLink($data.detailFile?.name),\n urls: $options.allUrl,\n onDownload: _cache[17] || (_cache[17] = $event => $options.handleDownload($data.detailFile?.name)),\n onTagManagement: _cache[18] || (_cache[18] = $event => $options.handleTagManagement($data.detailFile?.name)),\n onBlock: _cache[19] || (_cache[19] = $event => $options.handleBlock($data.detailFile?.name)),\n onWhite: _cache[20] || (_cache[20] = $event => $options.handleWhite($data.detailFile?.name)),\n onDelete: _cache[21] || (_cache[21] = $event => $options.handleDetailDelete($data.detailFile?.name)),\n onMetadataUpdated: $options.handleMetadataUpdated,\n onFileRenamed: $options.handleFileRenamed\n }, null, 8, [\"modelValue\", \"file\", \"fileLink\", \"urls\", \"onMetadataUpdated\", \"onFileRenamed\"]), _createVNode(_component_el_dialog, {\n title: _ctx.$t('dashboard.linkFormat'),\n modelValue: $data.showUrlDialog,\n \"onUpdate:modelValue\": _cache[26] || (_cache[26] = $event => $data.showUrlDialog = $event),\n width: $options.dialogWidth,\n \"show-close\": false,\n class: \"settings-dialog settings-dialog-scope\"\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_44, [_createElementVNode(\"div\", _hoisted_45, [_createElementVNode(\"span\", _hoisted_46, _toDisplayString(_ctx.$t('settings.defaultCopyLink')), 1)]), _createElementVNode(\"div\", _hoisted_47, [_createVNode(_component_el_radio_group, {\n modelValue: $data.defaultUrlFormat,\n \"onUpdate:modelValue\": _cache[22] || (_cache[22] = $event => $data.defaultUrlFormat = $event),\n class: \"radio-card-group grid-2x2\"\n }, {\n default: _withCtx(() => [_createVNode(_component_el_radio, {\n label: \"originUrl\",\n class: \"radio-card\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"link\",\n class: \"radio-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('settings.rawLink')), 1)]),\n _: 1\n }), _createVNode(_component_el_radio, {\n label: \"mdUrl\",\n class: \"radio-card\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"code\",\n class: \"radio-icon\"\n }), _cache[37] || (_cache[37] = _createElementVNode(\"span\", null, \"Markdown\", -1))]),\n _: 1\n }), _createVNode(_component_el_radio, {\n label: \"htmlUrl\",\n class: \"radio-card\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"code-branch\",\n class: \"radio-icon\"\n }), _cache[38] || (_cache[38] = _createElementVNode(\"span\", null, \"HTML\", -1))]),\n _: 1\n }), _createVNode(_component_el_radio, {\n label: \"bbUrl\",\n class: \"radio-card\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"quote-right\",\n class: \"radio-icon\"\n }), _cache[39] || (_cache[39] = _createElementVNode(\"span\", null, \"BBCode\", -1))]),\n _: 1\n }), _createVNode(_component_el_radio, {\n label: \"tgId\",\n class: \"radio-card\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"paper-plane\",\n class: \"radio-icon\"\n }), _cache[40] || (_cache[40] = _createElementVNode(\"span\", null, \"TG File ID\", -1))]),\n _: 1\n }), _createVNode(_component_el_radio, {\n label: \"s3Location\",\n class: \"radio-card\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"cloud\",\n class: \"radio-icon\"\n }), _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('settings.s3Link')), 1)]),\n _: 1\n })]),\n _: 1\n }, 8, [\"modelValue\"])])]), _createElementVNode(\"div\", _hoisted_48, [_createElementVNode(\"div\", _hoisted_49, [_createElementVNode(\"span\", _hoisted_50, _toDisplayString(_ctx.$t('settings.customLink')), 1), _createVNode(_component_el_tooltip, {\n content: _ctx.$t('settings.customLinkTooltip'),\n placement: \"top\",\n \"raw-content\": \"\"\n }, {\n default: _withCtx(() => [_createVNode(_component_font_awesome_icon, {\n icon: \"question-circle\",\n class: \"section-help-icon\"\n })]),\n _: 1\n }, 8, [\"content\"])]), _createElementVNode(\"div\", _hoisted_51, [_createElementVNode(\"div\", _hoisted_52, [_createElementVNode(\"span\", _hoisted_53, _toDisplayString(_ctx.$t('settings.enableCustom')), 1), _createVNode(_component_el_switch, {\n modelValue: $data.useCustomUrl,\n \"onUpdate:modelValue\": _cache[23] || (_cache[23] = $event => $data.useCustomUrl = $event),\n \"active-value\": \"true\",\n \"inactive-value\": \"false\"\n }, null, 8, [\"modelValue\"])]), $data.useCustomUrl === 'true' ? (_openBlock(), _createElementBlock(\"div\", _hoisted_54, [_createElementVNode(\"span\", _hoisted_55, _toDisplayString(_ctx.$t('settings.customPrefix')), 1), _createVNode(_component_el_input, {\n modelValue: $data.customUrlPrefix,\n \"onUpdate:modelValue\": _cache[24] || (_cache[24] = $event => $data.customUrlPrefix = $event),\n placeholder: _ctx.$t('settings.customPrefixPlaceholder'),\n class: \"setting-input\"\n }, null, 8, [\"modelValue\", \"placeholder\"])])) : _createCommentVNode(\"\", true)])]), _createElementVNode(\"div\", _hoisted_56, [_createVNode(_component_el_button, {\n type: \"primary\",\n onClick: _cache[25] || (_cache[25] = $event => $data.showUrlDialog = false),\n class: \"confirm-btn\"\n }, {\n default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.$t('settings.confirm')), 1)]),\n _: 1\n })])]),\n _: 1\n }, 8, [\"title\", \"modelValue\", \"width\"]), _createVNode(_component_TagManagementDialog, {\n modelValue: $data.showTagDialog,\n \"onUpdate:modelValue\": _cache[27] || (_cache[27] = $event => $data.showTagDialog = $event),\n fileId: $data.currentTagFile,\n fileMetadata: $options.tagFileMetadata,\n onTagsUpdated: $options.handleTagsUpdated\n }, null, 8, [\"modelValue\", \"fileId\", \"fileMetadata\", \"onTagsUpdated\"]), _createVNode(_component_BatchTagDialog, {\n modelValue: $data.showBatchTagDialog,\n \"onUpdate:modelValue\": _cache[28] || (_cache[28] = $event => $data.showBatchTagDialog = $event),\n selectedFiles: $data.selectedFiles,\n onTagsUpdated: $options.handleBatchTagsUpdated\n }, null, 8, [\"modelValue\", \"selectedFiles\", \"onTagsUpdated\"]), _createVNode(_component_MobileActionSheet, {\n modelValue: $data.showMobileActionModal,\n \"onUpdate:modelValue\": _cache[29] || (_cache[29] = $event => $data.showMobileActionModal = $event),\n title: $data.mobileActionIsFolder ? $options.getFolderName($data.mobileActionFile?.name || '') : $data.mobileActionFile?.metadata?.FileName || $options.getFileName($data.mobileActionFile?.name || ''),\n isFolder: $data.mobileActionIsFolder,\n onAction: $options.handleMobileAction\n }, null, 8, [\"modelValue\", \"title\", \"isFolder\", \"onAction\"]), _createVNode(_component_MobileDirectoryDrawer, {\n modelValue: $data.showMobileDirectoryDrawer,\n \"onUpdate:modelValue\": _cache[30] || (_cache[30] = $event => $data.showMobileDirectoryDrawer = $event),\n currentPath: $data.currentPath,\n onNavigate: $options.navigateToFolder,\n onGoBack: $options.handleGoBack\n }, null, 8, [\"modelValue\", \"currentPath\", \"onNavigate\", \"onGoBack\"]), _createVNode(_component_MoveFileDialog, {\n modelValue: $data.showMoveDialog,\n \"onUpdate:modelValue\": _cache[31] || (_cache[31] = $event => $data.showMoveDialog = $event),\n \"current-directory\": $data.currentPath,\n \"is-batch-move\": $data.isBatchMove,\n \"initial-path\": $data.moveTargetPath,\n onConfirm: $options.confirmMove\n }, null, 8, [\"modelValue\", \"current-directory\", \"is-batch-move\", \"initial-path\", \"onConfirm\"])]);\n}","// 文件管理器工具类\r\nimport fetchWithAuth from '@/utils/fetchWithAuth';\r\nimport { ElMessage } from 'element-plus';\r\nimport i18n from '@/locales';\r\n\r\nclass FileManager {\r\n constructor() {\r\n this.FILE_LIST_PATH = 'data/fileList.json';\r\n this.fileListCache = null;\r\n this.storageWarningShown = false;\r\n }\r\n\r\n // 从本地存储读取文件列表\r\n getLocalFileList() {\r\n const fileList = this.getMutableFileList();\r\n return {\r\n ...fileList,\r\n files: [...(fileList.files || [])],\r\n directories: [...(fileList.directories || [])],\r\n };\r\n }\r\n\r\n getMutableFileList() {\r\n if (this.fileListCache) {\r\n return this.fileListCache;\r\n }\r\n\r\n try {\r\n const fileList = localStorage.getItem(this.FILE_LIST_PATH);\r\n this.fileListCache = fileList ? JSON.parse(fileList) : this.createEmptyFileList();\r\n return this.fileListCache;\r\n } catch (error) {\r\n console.error('Error reading local file list:', error);\r\n this.fileListCache = this.createEmptyFileList();\r\n return this.fileListCache;\r\n }\r\n }\r\n\r\n // 更新内存缓存,并尽量持久化到 localStorage\r\n updateFileListCache(fileList) {\r\n this.fileListCache = fileList || this.createEmptyFileList();\r\n const persisted = this.persistFileListCache();\r\n\r\n return {\r\n cacheUpdated: true,\r\n persisted,\r\n };\r\n }\r\n\r\n persistFileListCache() {\r\n try {\r\n localStorage.setItem(this.FILE_LIST_PATH, JSON.stringify(this.fileListCache));\r\n return true;\r\n } catch (error) {\r\n this.handleStoragePersistError(error);\r\n return false;\r\n }\r\n }\r\n\r\n createEmptyFileList() {\r\n return { files: [], directories: [] };\r\n }\r\n\r\n handleStoragePersistError(error) {\r\n console.warn('File list is kept in memory because localStorage persistence failed:', error);\r\n\r\n try {\r\n localStorage.removeItem(this.FILE_LIST_PATH);\r\n } catch (removeError) {\r\n console.warn('Failed to remove stale file list cache:', removeError);\r\n }\r\n\r\n if (!this.storageWarningShown) {\r\n this.storageWarningShown = true;\r\n ElMessage.warning(i18n.global.t('dashboard.fileListMemoryCacheWarning'));\r\n }\r\n }\r\n\r\n // 添加新文件到列表\r\n addFile(newFile) {\r\n try {\r\n const fileList = this.getMutableFileList();\r\n fileList.files.push(newFile);\r\n return this.updateFileListCache(fileList).cacheUpdated;\r\n } catch (error) {\r\n console.error('Error adding file:', error);\r\n return false;\r\n }\r\n }\r\n\r\n // 添加新文件夹\r\n addFolder(folderName) {\r\n try {\r\n const fileList = this.getMutableFileList();\r\n if (!fileList.directories.includes(folderName)) {\r\n fileList.directories.push(folderName);\r\n return this.updateFileListCache(fileList).cacheUpdated;\r\n }\r\n return false; // 文件夹已存在\r\n } catch (error) {\r\n console.error('Error adding folder:', error);\r\n return false;\r\n }\r\n }\r\n\r\n // 移动文件或文件夹\r\n moveFile(oldPath, newPath, isFolder = false, currentPath = '') {\r\n try {\r\n let fileList = this.getMutableFileList();\r\n \r\n if (isFolder) {\r\n // 更新目录列表\r\n const oldFolderIndex = fileList.directories.indexOf(oldPath);\r\n if (oldFolderIndex !== -1) {\r\n fileList.directories.splice(oldFolderIndex, 1);\r\n }\r\n\r\n } else {\r\n // 移动单个文件\r\n const fileIndex = fileList.files.findIndex(file => file.name === oldPath);\r\n if (fileIndex !== -1) {\r\n // 从旧位置移除\r\n fileList.files.splice(fileIndex, 1);\r\n }\r\n\r\n }\r\n\r\n // 如果新路径包含当前目录的直接子目录,则添加直接子目录\r\n if (newPath.startsWith(currentPath)) {\r\n const pathArray = newPath.substring(currentPath.length).split('/');\r\n if (pathArray.length > 1) {\r\n const newFolder = currentPath + pathArray[0];\r\n if (!fileList.directories.includes(newFolder)) {\r\n fileList.directories.push(newFolder);\r\n }\r\n }\r\n }\r\n\r\n return this.updateFileListCache(fileList).cacheUpdated;\r\n } catch (error) {\r\n console.error('Error moving file:', error);\r\n return false;\r\n }\r\n }\r\n\r\n // 从列表中删除文件\r\n removeFile(fileName) {\r\n try {\r\n let fileList = this.getMutableFileList();\r\n fileList.files = fileList.files.filter(file => file.name !== fileName);\r\n return this.updateFileListCache(fileList).cacheUpdated;\r\n } catch (error) {\r\n console.error('Error removing file:', error);\r\n return false;\r\n }\r\n }\r\n\r\n // 从列表中删除文件夹(同时删除该文件夹下的所有文件)\r\n removeFolder(folderName) {\r\n try {\r\n let fileList = this.getMutableFileList();\r\n fileList.files = fileList.files.filter(file => !file.name.startsWith(folderName + '/'));\r\n fileList.directories = fileList.directories.filter(dir => dir !== folderName);\r\n return this.updateFileListCache(fileList).cacheUpdated;\r\n } catch (error) {\r\n console.error('Error removing folder:', error);\r\n return false;\r\n }\r\n }\r\n\r\n // 获取指定目录下的文件和子目录\r\n getFilesInFolder(folderName) {\r\n try {\r\n const fileList = this.getMutableFileList();\r\n const files = fileList.files.filter(file => file.name.startsWith(folderName + '/'));\r\n const subdirectories = fileList.directories.filter(dir => dir.startsWith(folderName + '/'));\r\n return { files, directories: subdirectories };\r\n } catch (error) {\r\n console.error('Error getting files in folder:', error);\r\n return { files: [], directories: [] };\r\n }\r\n }\r\n\r\n // 构建筛选参数URL\r\n buildFilterParams(filters) {\r\n let params = '';\r\n // 访问状态筛选(综合判断)\r\n if (filters.accessStatus && filters.accessStatus.length > 0) {\r\n params += `&accessStatus=${encodeURIComponent(filters.accessStatus.join(','))}`;\r\n }\r\n // 黑白名单筛选(直接使用 ListType 字段)\r\n if (filters.listType && filters.listType.length > 0) {\r\n params += `&listType=${encodeURIComponent(filters.listType.join(','))}`;\r\n }\r\n if (filters.label && filters.label.length > 0) {\r\n params += `&label=${encodeURIComponent(filters.label.join(','))}`;\r\n }\r\n if (filters.fileType && filters.fileType.length > 0) {\r\n params += `&fileType=${encodeURIComponent(filters.fileType.join(','))}`;\r\n }\r\n if (filters.channel && filters.channel.length > 0) {\r\n params += `&channel=${encodeURIComponent(filters.channel.join(','))}`;\r\n }\r\n if (filters.channelName && filters.channelName.length > 0) {\r\n params += `&channelName=${encodeURIComponent(filters.channelName.join(','))}`;\r\n }\r\n return params;\r\n }\r\n\r\n // 更新文件列表\r\n async refreshFileList(dir, search = '', includeTags = '', excludeTags = '', filters = {}) {\r\n search = search.trim();\r\n try {\r\n let url = `/api/manage/list?count=60&dir=${dir}&search=${encodeURIComponent(search)}`;\r\n if (includeTags) {\r\n url += `&includeTags=${encodeURIComponent(includeTags)}`;\r\n }\r\n if (excludeTags) {\r\n url += `&excludeTags=${encodeURIComponent(excludeTags)}`;\r\n }\r\n // 添加筛选参数(支持多选)\r\n url += this.buildFilterParams(filters);\r\n \r\n const response = await fetchWithAuth(url, {\r\n method: 'GET',\r\n });\r\n const newFileList = await response.json();\r\n if (!newFileList.isIndexedResponse) {\r\n ElMessage.warning(i18n.global.t('dashboard.indexingWarning'));\r\n }\r\n // 保存包含新字段的完整数据\r\n return this.updateFileListCache(newFileList).cacheUpdated;\r\n } catch (error) {\r\n console.error('Error refreshing file list:', error);\r\n return false;\r\n }\r\n }\r\n\r\n // 读取更多数据\r\n async loadMoreFiles(dir, search = '', includeTags = '', excludeTags = '', count = 60, filters = {}) {\r\n search = search.trim();\r\n try {\r\n const fileList = this.getMutableFileList();\r\n const start = fileList.files.length;\r\n\r\n let url = `/api/manage/list?dir=${dir}&start=${start}&count=${count}&search=${encodeURIComponent(search)}`;\r\n if (includeTags) {\r\n url += `&includeTags=${encodeURIComponent(includeTags)}`;\r\n }\r\n if (excludeTags) {\r\n url += `&excludeTags=${encodeURIComponent(excludeTags)}`;\r\n }\r\n // 添加筛选参数(支持多选)\r\n url += this.buildFilterParams(filters);\r\n\r\n const response = await fetchWithAuth(url, {\r\n method: 'GET',\r\n });\r\n \r\n const moreFiles = await response.json();\r\n fileList.files.push(...moreFiles.files);\r\n return this.updateFileListCache(fileList).cacheUpdated;\r\n } catch (error) {\r\n console.error('Error loading more files:', error);\r\n return { files: [], directories: [] };\r\n }\r\n }\r\n}\r\n\r\nexport const fileManager = new FileManager();\r\n","/**\r\n * 矩形工具函数\r\n * 用于框选(rubber-band selection)功能中的矩形计算和相交检测\r\n */\r\n\r\n/**\r\n * 判断两个矩形是否相交\r\n * @param {Object} rectA - { left, top, right, bottom }\r\n * @param {Object} rectB - { left, top, right, bottom }\r\n * @returns {boolean} 是否存在重叠区域\r\n */\r\nexport function rectIntersects(rectA, rectB) {\r\n return !(\r\n rectA.right <= rectB.left ||\r\n rectA.left >= rectB.right ||\r\n rectA.bottom <= rectB.top ||\r\n rectA.top >= rectB.bottom\r\n );\r\n}\r\n\r\n/**\r\n * 根据起始点和当前点计算选区矩形\r\n * @param {Object} start - { x, y } 起始鼠标坐标\r\n * @param {Object} current - { x, y } 当前鼠标坐标\r\n * @returns {Object} { left, top, width, height, right, bottom }\r\n */\r\nexport function calcSelectionRect(start, current) {\r\n const left = Math.min(start.x, current.x);\r\n const top = Math.min(start.y, current.y);\r\n const width = Math.abs(current.x - start.x);\r\n const height = Math.abs(current.y - start.y);\r\n return { left, top, width, height, right: left + width, bottom: top + height };\r\n}\r\n","import { ref, watch, onMounted, onBeforeUnmount, toValue } from 'vue';\r\nimport { rectIntersects, calcSelectionRect } from './rectIntersects.js';\r\n\r\n/**\r\n * Vue 3 Composable:框选(rubber-band selection)核心逻辑,支持多视图模式\r\n *\r\n * @param {Object} options\r\n * @param {Object} options.modes - Per-view-mode configuration\r\n * @param {Object} options.modes.card - Card view config\r\n * @param {import('vue').Ref} options.modes.card.containerRef\r\n * @param {string} options.modes.card.itemSelector - e.g. '.img-card'\r\n * @param {Object} options.modes.list - List view config\r\n * @param {import('vue').Ref} options.modes.list.containerRef\r\n * @param {string} options.modes.list.itemSelector - e.g. '.list-item'\r\n * @param {string} [options.mainSelector='.main-container'] - 主内容区域的 CSS 选择器,框选只能从该区域内开始\r\n * @param {import('vue').Ref} options.viewMode - 当前视图模式\r\n * @param {import('vue').Ref} options.items - 当前页的数据项(paginatedTableData)\r\n * @returns {{ isDragging: import('vue').Ref, selectionRect: import('vue').Ref