{"version":3,"sources":["webpack:///./src/components/LocalFileList.vue?3c45","webpack:///./src/components/LocalFileList.vue","webpack:///./src/components/LocalFileList.vue?64cc"],"names":["_withScopeId","n","_hoisted_1","key","class","style","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","DRIVE_PAGE_SIZE","__name","__props","action_from","envStore","DEFAULT_DRIVE_FILTER","JSON","stringify","trashed","eq","phase","DEFAULT_WITH_PARAMS","statFileListClick","statFileListShow","stat","BREADCRUMB_ROOT","name","id","showHeader","store","getters","isFullScreen","isSamba","deviceStore","breadcrumbStack","enterDirectory","list","getIconFromFilename","isEnd","isLoading","isLoadingMore","isLoadingNewDir","listInCategory","categoryMap","updateFilter","load","refresh","updateRequestFunction","breadcrumbRoot","filters","pageSize","requestFunction","currentDeviceRef","proxyFetch","responseInterceptor","res","_res$files","files","filter","i","startsWith","_i$params","params","vfs_type","withParams","untilDeviceReady","toast","title","sortedCategory","priority","categories","Array","from","value","keys","sort","a","b","_priority$b","_priority$a","onEnterDirectory","async","nextParentID","_breadcrumbStack$valu","_breadcrumbStack$valu2","at","onBack","length","router","go","shortenName","slice","onFileClick","file","kind","_action_from","dispatch","usage","theme","scene","afterGetFileCallback","_file$params","action","data","type","source","error","onLongPress","console","log","result","options","themeClass","danger","description","_file$params2","_deviceStore$currentD","is_write","deviceFetch","method","_deviceStore$currentD2","_originParams$parent_","query","currentRoute","queryParams","parse","originParams","origin","parent_id","_ctx","_cache","_directive_longpress","_directive_see","isUseIOSHeader","width","height","onClick","size","folder","index","$event","category","get","src","alt","draggable","Date","modified_time","valueOf","__exports__"],"mappings":"kHAAA,W,2QCIA,MAAMA,EAAeC,IAAM,yBAAa,mBAAoBA,EAAIA,IAAK,0BAAeA,G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,CAAC,gCAAoB,IAAKC,EAAa,6BAAiB2F,EAAKnE,MAAO,GAAI,gCAAoB,IAAKvB,EAAa,CAAC,6BAAiB,6BAAiB,IAAI+I,KAAKrD,EAAKsD,eAAeC,UAAY,EAAI,mBAAO,OAAP,CAAkBvD,EAAKsD,eAAiB,IAAM,IAAK,GAAI/I,EAAa,6BAAiB,IAAM,6BAA+B,eAAdyF,EAAKC,KAAwB,mBAAO,OAAP,CAAoBD,EAAK4C,MAAQ,IAAK,QAAS,EAAG3I,IAAe,CAAC,CAACqI,EAAsB,IAAMxB,GAAYd,OACpf,OAAQ,MACV,MAAQ,mBAAOvD,IAAW,mBAAOG,GAGM,gCAAoB,IAAI,GAHX,6BAAiB,yBAAc,gCAAoB,MAAOpC,EAAa,CAAC,6BAAiB,QAAS,yBAAa,mBAAO,QAAe,CAC3LiI,MAAO,KACPC,OAAQ,UACH,CAAC,CAACH,EAAgB,mBAAOvF,OAA0C,4BAAgB,gCAAoB,MAAOvC,EAAaG,EAAa,KAAM,CAAC,CAAC,YAAS,mBAAO8B,IAAsC,IAAxB,mBAAOH,GAAMmD,aAAoB,O,iCCvS5N,MAAM8D,EAA2B,IAAgB,EAAQ,CAAC,CAAC,YAAY,qBAExD","file":"js/chunk-59062319.js","sourcesContent":["/* unplugin-vue-components disabled */export * from \"-!../../../../node_modules/.pnpm/unplugin@1.4.0/node_modules/unplugin/dist/webpack/loaders/transform.js?unpluginName=unplugin-vue-components!../../../../node_modules/.pnpm/mini-css-extract-plugin@0.9.0_webpack@4.46.0/node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/.pnpm/css-loader@3.6.0_webpack@4.46.0/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/.pnpm/vue-loader@16.8.3_@vue+compiler-sfc@3.3.4_vue@3.3.4_webpack@4.46.0/node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/.pnpm/postcss-loader@3.0.0/node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/.pnpm/sass-loader@8.0.2_sass@1.65.1/node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/.pnpm/cache-loader@4.1.0_webpack@4.46.0/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/.pnpm/vue-loader@16.8.3_@vue+compiler-sfc@3.3.4_vue@3.3.4_webpack@4.46.0/node_modules/vue-loader/dist/index.js??ref--1-1!./LocalFileList.vue?vue&type=style&index=0&id=367f08f7&lang=scss&scoped=true\"","import \"core-js/modules/es.array.at.js\";\nimport \"core-js/modules/es.string.at-alternative.js\";\nimport { defineComponent as _defineComponent } from 'vue';\nimport { unref as _unref, createVNode as _createVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createTextVNode as _createTextVNode, vShow as _vShow, withDirectives as _withDirectives, resolveDirective as _resolveDirective, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\";\nconst _withScopeId = n => (_pushScopeId(\"data-v-367f08f7\"), n = n(), _popScopeId(), n);\nconst _hoisted_1 = {\n key: 0,\n class: \"path-path__header page-header\",\n style: {\n \"position\": \"sticky\",\n \"top\": \"0\",\n \"z-index\": \"1\"\n }\n};\nconst _hoisted_2 = {\n key: 1,\n class: \"path-path__paths\"\n};\nconst _hoisted_3 = [\"onClick\"];\nconst _hoisted_4 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"qh-icon-more\"\n}, null, -1));\nconst _hoisted_5 = {\n class: \"path-content hide-scrollbar\"\n};\nconst _hoisted_6 = {\n class: \"loading-more\"\n};\nconst _hoisted_7 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"qh-icon-loading-small\"\n}, null, -1));\nconst _hoisted_8 = [_hoisted_7];\nconst _hoisted_9 = {\n key: 0,\n class: \"category\"\n};\nconst _hoisted_10 = {\n class: \"path-path__paths\"\n};\nconst _hoisted_11 = [\"onClick\"];\nconst _hoisted_12 = {\n class: \"path-item__icon\"\n};\nconst _hoisted_13 = [\"src\"];\nconst _hoisted_14 = {\n class: \"path-item__info\"\n};\nconst _hoisted_15 = {\n class: \"path-item__name\"\n};\nconst _hoisted_16 = {\n class: \"path-item__time\"\n};\nconst _hoisted_17 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", null, null, -1));\nconst _hoisted_18 = {\n key: 0,\n class: \"loading\"\n};\nconst _hoisted_19 = {\n class: \"path-content__empty\"\n};\nconst _hoisted_20 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", {\n class: \"path-content__empty-img\"\n}, null, -1));\nconst _hoisted_21 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/_createElementVNode(\"p\", null, \"空文件夹\", -1));\nconst _hoisted_22 = [_hoisted_20, _hoisted_21];\nimport { computed, ref } from 'vue';\nimport { parseTime, bytesToSize, toast, newToast } from '@remote/utils';\nimport { IconLoading2 } from '@xunlei/thunder-icon-vue';\nimport { onMounted } from 'vue';\nimport router from '@remote/router';\nimport { store } from '@remote/store';\nimport { IconPageLeft } from '@xunlei/thunder-icon-vue';\nimport { useFileList } from '@shared/composable/file';\nimport { useDeviceStore } from '@remote/store/device';\nimport { stat } from '@remote/utils/stat';\nimport qs from 'qs';\nimport { safeJSONParse } from '@shared/utils';\nimport { useSambaStat } from '@shared/composable/samba';\nimport { openPopMenu } from '@remote/utils/dialog';\nimport { isAndroidNative } from '@xunlei/universal-native-api';\nimport { useEnvStore } from '@remote/store/env';\nconst DRIVE_PAGE_SIZE = 20;\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LocalFileList',\n setup(__props) {\n let action_from = '';\n const envStore = useEnvStore();\n const DEFAULT_DRIVE_FILTER = JSON.stringify({\n trashed: {\n eq: false\n },\n phase: {\n eq: 'PHASE_TYPE_COMPLETE'\n }\n });\n let DEFAULT_WITH_PARAMS = ['withCategoryDiskMountPath', 'withCategoryHistoryDownloadPath'];\n const {\n statFileListClick,\n statFileListShow\n } = useSambaStat(stat);\n const BREADCRUMB_ROOT = {\n name: '本地文件',\n id: ''\n };\n const isFullScreen = computed(() => {\n return store.getters.isFullScreen;\n });\n const showHeader = computed(() => {\n return store.getters.showHeader;\n });\n let isSamba = false;\n const deviceStore = useDeviceStore();\n const {\n breadcrumbStack,\n enterDirectory,\n list,\n getIconFromFilename,\n isEnd,\n isLoading,\n isLoadingMore,\n isLoadingNewDir,\n listInCategory,\n categoryMap,\n updateFilter,\n load,\n refresh,\n updateRequestFunction\n } = useFileList({\n breadcrumbRoot: BREADCRUMB_ROOT,\n filters: DEFAULT_DRIVE_FILTER,\n pageSize: DRIVE_PAGE_SIZE,\n requestFunction: deviceStore.currentDeviceRef.proxyFetch,\n responseInterceptor: res => {\n var _res$files;\n return {\n ...res,\n files: ((_res$files = res.files) !== null && _res$files !== void 0 ? _res$files : []).filter(i => !(i.name && i.name.startsWith('@'))) // 过滤掉以@开头的文件,这些文件是群晖系统里的隐藏文件\n .filter(i => {\n var _i$params;\n if (isSamba) {\n return true; // 是samba页面不过滤\n }\n\n return ((_i$params = i.params) === null || _i$params === void 0 ? void 0 : _i$params.vfs_type) !== 'smb'; // 不是samba页面,过滤掉samba\n })\n };\n },\n\n withParams: DEFAULT_WITH_PARAMS,\n untilDeviceReady: deviceStore.untilDeviceReady,\n toast: newToast\n });\n const title = ref('本地文件');\n const sortedCategory = computed(() => {\n const priority = {\n 'DownloadPath': 4,\n 'DriveCachePath': 3,\n 'HistoryDownloadPath': 2,\n 'DiskMountPath': 1\n };\n const categories = Array.from(listInCategory.value.keys()).sort((a, b) => {\n var _priority$b, _priority$a;\n return ((_priority$b = priority[b]) !== null && _priority$b !== void 0 ? _priority$b : 0) - ((_priority$a = priority[a]) !== null && _priority$a !== void 0 ? _priority$a : 0);\n });\n return categories;\n });\n const onEnterDirectory = async (nextParentID, name) => {\n var _breadcrumbStack$valu, _breadcrumbStack$valu2;\n statFileListClick('next');\n await enterDirectory(nextParentID, name);\n title.value = (_breadcrumbStack$valu = (_breadcrumbStack$valu2 = breadcrumbStack.value.at(-1)) === null || _breadcrumbStack$valu2 === void 0 ? void 0 : _breadcrumbStack$valu2.name) !== null && _breadcrumbStack$valu !== void 0 ? _breadcrumbStack$valu : '';\n };\n const onBack = () => {\n if (breadcrumbStack.value.length === 1) {\n statFileListClick('close');\n router.go(-1);\n } else {\n onEnterDirectory(breadcrumbStack.value[breadcrumbStack.value.length - 2].id);\n }\n };\n const shortenName = name => {\n return name.length > 5 ? `${name.slice(0, 5)}...` : name;\n };\n const onFileClick = async file => {\n if (file.kind === 'drive#folder') {\n onEnterDirectory(file.id, file.name);\n } else {\n try {\n var _action_from;\n statFileListClick('transact');\n await store.dispatch('getFileInfo', {\n id: file.id,\n usage: 2,\n theme: 'dark',\n scene: 'nfo',\n action_from: (_action_from = action_from) !== null && _action_from !== void 0 ? _action_from : 'cinema',\n afterGetFileCallback: file => {\n var _file$params;\n stat({\n action: 'local_file_page_video_click',\n data: {\n type: ((_file$params = file.params) === null || _file$params === void 0 ? void 0 : _file$params.source) === 'drive_cache' ? 1 : 0\n }\n });\n }\n });\n } catch (error) {\n toast('播放失败,请稍后重试');\n }\n }\n };\n const onLongPress = async file => {\n if (!file.id) return;\n console.log('===file', file);\n const result = await openPopMenu({\n title: `文件名: ${file.name}`,\n options: ['删除', '取消'],\n themeClass: 'is-dark',\n danger: [0]\n });\n if (result === '删除') {\n const result = await openPopMenu({\n title: '温馨提示',\n description: '将删除设备上的本地文件,确定删除所选文件(夹)?',\n options: ['确认', '取消'],\n themeClass: 'is-dark',\n danger: [0]\n });\n if (result === '确认') {\n var _file$params2, _deviceStore$currentD;\n if (((_file$params2 = file.params) === null || _file$params2 === void 0 ? void 0 : _file$params2.is_write) !== 'true') {\n toast('只读文件,无法删除');\n return;\n }\n await ((_deviceStore$currentD = deviceStore.currentDeviceRef) === null || _deviceStore$currentD === void 0 ? void 0 : _deviceStore$currentD.deviceFetch(`drive/v1/files/${file.id}`, {\n method: 'DELETE'\n }));\n toast('删除成功');\n refresh();\n }\n }\n };\n onMounted(async () => {\n var _deviceStore$currentD2, _originParams$parent_;\n const query = router.currentRoute.value.query;\n const queryParams = qs.parse(query);\n const originParams = safeJSONParse(queryParams.origin);\n if (originParams.parent_id) {\n isSamba = true;\n BREADCRUMB_ROOT.id = originParams.parent_id;\n BREADCRUMB_ROOT.name = originParams.title;\n updateFilter(originParams.filter);\n title.value = originParams.title;\n DEFAULT_WITH_PARAMS = originParams.withParams;\n action_from = originParams.action_from;\n }\n await deviceStore.untilDeviceReady();\n updateRequestFunction((_deviceStore$currentD2 = deviceStore.currentDeviceRef) === null || _deviceStore$currentD2 === void 0 ? void 0 : _deviceStore$currentD2.proxyFetch);\n statFileListShow(isSamba ? 'samba_device' : 'local');\n onEnterDirectory((_originParams$parent_ = originParams.parent_id) !== null && _originParams$parent_ !== void 0 ? _originParams$parent_ : '');\n });\n return (_ctx, _cache) => {\n const _directive_longpress = _resolveDirective(\"longpress\");\n const _directive_see = _resolveDirective(\"see\");\n return _openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"pan-path__wrapper hide-scrollbar is-dark\", {\n 'android-padding': _unref(isAndroidNative),\n 'ios-padding': _unref(envStore).isUseIOSHeader\n }])\n }, [showHeader.value ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [_createVNode(_unref(IconPageLeft), {\n width: \"20\",\n height: \"20\",\n onClick: onBack,\n title: \"返回\"\n }), _createElementVNode(\"h1\", null, _toDisplayString(title.value), 1)])) : _createCommentVNode(\"\", true), _unref(listInCategory).size <= 1 ? (_openBlock(), _createElementBlock(\"p\", _hoisted_2, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(breadcrumbStack), (folder, index) => {\n return _openBlock(), _createElementBlock(\"span\", {\n key: index,\n onClick: $event => onEnterDirectory(folder.id, folder.name)\n }, [index === 0 ? (_openBlock(), _createElementBlock(_Fragment, {\n key: 0\n }, [_createTextVNode(_toDisplayString(shortenName(folder.name)), 1)], 64)) : (_openBlock(), _createElementBlock(_Fragment, {\n key: 1\n }, [_hoisted_4, _createTextVNode(\" \" + _toDisplayString(shortenName(folder.name)), 1)], 64))], 8, _hoisted_3);\n }), 128))])) : _createCommentVNode(\"\", true), _createElementVNode(\"div\", _hoisted_5, [_withDirectives(_createElementVNode(\"p\", _hoisted_6, _hoisted_8, 512), [[_vShow, _unref(list).length < 1 && _unref(isLoading)]]), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(sortedCategory.value, (category, index) => {\n return _openBlock(), _createElementBlock(_Fragment, {\n key: index\n }, [_unref(categoryMap).get(category) ? (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [_createElementVNode(\"p\", _hoisted_10, [_createElementVNode(\"span\", null, _toDisplayString(_unref(categoryMap).get(category)), 1)])])) : _createCommentVNode(\"\", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(listInCategory).get(category), file => {\n return _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"path-item\",\n key: file.id,\n onClick: $event => onFileClick(file)\n }, [_createElementVNode(\"div\", _hoisted_12, [_createElementVNode(\"img\", {\n src: _unref(getIconFromFilename)(file),\n alt: \"\",\n draggable: \"false\"\n }, null, 8, _hoisted_13)]), _createElementVNode(\"div\", _hoisted_14, [_createElementVNode(\"p\", _hoisted_15, _toDisplayString(file.name), 1), _createElementVNode(\"p\", _hoisted_16, [_createTextVNode(_toDisplayString(new Date(file.modified_time).valueOf() > 0 ? _unref(parseTime)(file.modified_time) : '') + \" \", 1), _hoisted_17, _createTextVNode(\" \" + _toDisplayString(file.kind === 'drive#file' ? _unref(bytesToSize)(file.size) : ''), 1)])])], 8, _hoisted_11)), [[_directive_longpress, () => onLongPress(file)]]);\n }), 128))], 64);\n }), 128)), !_unref(isEnd) && !_unref(isLoadingNewDir) ? _withDirectives((_openBlock(), _createElementBlock(\"div\", _hoisted_18, [_createTextVNode(\" 加载中\"), _createVNode(_unref(IconLoading2), {\n width: \"16\",\n height: \"16\"\n })])), [[_directive_see, _unref(load)]]) : _createCommentVNode(\"\", true), _withDirectives(_createElementVNode(\"div\", _hoisted_19, _hoisted_22, 512), [[_vShow, !_unref(isLoading) && _unref(list).length === 0]])])], 2);\n };\n }\n});","/* unplugin-vue-components disabled */import script from \"./LocalFileList.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LocalFileList.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LocalFileList.vue?vue&type=style&index=0&id=367f08f7&lang=scss&scoped=true\"\n\nimport exportComponent from \"/var/static/node_modules/.pnpm/vue-loader@16.8.3_@vue+compiler-sfc@3.3.4_vue@3.3.4_webpack@4.46.0/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-367f08f7\"]])\n\nexport default __exports__"],"sourceRoot":""}