cloudcmd 16.5.0 → 16.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/ChangeLog +14 -0
  2. package/HELP.md +3 -1
  3. package/README.md +1 -1
  4. package/dist/cloudcmd.common.js +1 -1
  5. package/dist/cloudcmd.common.js.map +1 -1
  6. package/dist/cloudcmd.js.map +1 -1
  7. package/dist/modules/cloud.js.map +1 -1
  8. package/dist/modules/command-line.js +1 -1
  9. package/dist/modules/command-line.js.map +1 -1
  10. package/dist/modules/config.js.map +1 -1
  11. package/dist/modules/contact.js.map +1 -1
  12. package/dist/modules/edit-file-vim.js.map +1 -1
  13. package/dist/modules/edit-file.js.map +1 -1
  14. package/dist/modules/edit-names-vim.js.map +1 -1
  15. package/dist/modules/edit-names.js.map +1 -1
  16. package/dist/modules/edit.js.map +1 -1
  17. package/dist/modules/help.js.map +1 -1
  18. package/dist/modules/konsole.js.map +1 -1
  19. package/dist/modules/markdown.js.map +1 -1
  20. package/dist/modules/menu.js.map +1 -1
  21. package/dist/modules/operation.js.map +1 -1
  22. package/dist/modules/polyfill.js.map +1 -1
  23. package/dist/modules/terminal-run.js.map +1 -1
  24. package/dist/modules/terminal.js.map +1 -1
  25. package/dist/modules/upload.js.map +1 -1
  26. package/dist/modules/user-menu.js.map +1 -1
  27. package/dist/modules/view.js.map +1 -1
  28. package/dist/sw.js +1 -1
  29. package/dist-dev/cloudcmd.common.js +28 -28
  30. package/dist-dev/cloudcmd.js +13 -13
  31. package/dist-dev/modules/cloud.js +1 -1
  32. package/dist-dev/modules/command-line.js +1 -1
  33. package/dist-dev/modules/config.js +2 -2
  34. package/dist-dev/modules/contact.js +1 -1
  35. package/dist-dev/modules/edit-file-vim.js +1 -1
  36. package/dist-dev/modules/edit-file.js +1 -1
  37. package/dist-dev/modules/edit-names-vim.js +1 -1
  38. package/dist-dev/modules/edit-names.js +1 -1
  39. package/dist-dev/modules/edit.js +1 -1
  40. package/dist-dev/modules/help.js +1 -1
  41. package/dist-dev/modules/konsole.js +1 -1
  42. package/dist-dev/modules/markdown.js +1 -1
  43. package/dist-dev/modules/menu.js +1 -1
  44. package/dist-dev/modules/operation.js +4 -4
  45. package/dist-dev/modules/polyfill.js +1 -1
  46. package/dist-dev/modules/terminal-run.js +1 -1
  47. package/dist-dev/modules/terminal.js +1 -1
  48. package/dist-dev/modules/upload.js +1 -1
  49. package/dist-dev/modules/user-menu.js +4 -4
  50. package/dist-dev/modules/view.js +2 -2
  51. package/dist-dev/sw.js +1 -1
  52. package/package.json +7 -8
@@ -8,7 +8,7 @@
8
8
  /***/ (function(module, exports, __webpack_require__) {
9
9
 
10
10
  "use strict";
11
- eval("\n/* global CloudCmd */\n\nconst tryToPromiseAll = __webpack_require__(/*! ../../common/try-to-promise-all */ \"./common/try-to-promise-all.js\");\n\nconst Storage = __webpack_require__(/*! ./storage */ \"./client/dom/storage.js\");\n\nconst DOM = __webpack_require__(/*! ./ */ \"./client/dom/index.js\");\n\nmodule.exports = new BufferProto();\n\nfunction BufferProto() {\n const Info = DOM.CurrentInfo;\n const CLASS = 'cut-file';\n const COPY = 'copy';\n const CUT = 'cut';\n const Buffer = {\n cut: callIfEnabled.bind(null, cut),\n copy: callIfEnabled.bind(null, copy),\n clear: callIfEnabled.bind(null, clear),\n paste: callIfEnabled.bind(null, paste)\n };\n\n function showMessage(msg) {\n DOM.Dialog.alert(msg);\n }\n\n function getNames() {\n const files = DOM.getActiveFiles();\n const names = DOM.getFilenames(files);\n return names;\n }\n\n function addCutClass() {\n const files = DOM.getActiveFiles();\n\n for (const element of files) {\n element.classList.add(CLASS);\n }\n }\n\n function rmCutClass() {\n const files = DOM.getByClassAll(CLASS);\n\n for (const element of files) {\n element.classList.remove(CLASS);\n }\n }\n\n function callIfEnabled(callback) {\n const is = CloudCmd.config('buffer');\n if (is) return callback();\n showMessage('Buffer disabled in config!');\n }\n\n async function readBuffer() {\n const [e, cp, ct] = await tryToPromiseAll([Storage.getJson(COPY), Storage.getJson(CUT)]);\n return [e, cp, ct];\n }\n\n async function copy() {\n const names = getNames();\n const from = Info.dirPath;\n await clear();\n if (!names.length) return;\n await Storage.remove(CUT);\n await Storage.setJson(COPY, {\n from,\n names\n });\n }\n\n async function cut() {\n const names = getNames();\n const from = Info.dirPath;\n await clear();\n if (!names.length) return;\n addCutClass();\n await Storage.setJson(CUT, {\n from,\n names\n });\n }\n\n async function clear() {\n await Storage.remove(COPY);\n await Storage.remove(CUT);\n rmCutClass();\n }\n\n async function paste() {\n const [error, cp, ct] = await readBuffer();\n if (error || !cp && !ct) return showMessage(error || 'Buffer is empty!');\n const opStr = cp ? 'copy' : 'move';\n const data = cp || ct;\n const {\n Operation\n } = CloudCmd;\n const msg = 'Path is same!';\n const to = Info.dirPath;\n if (data.from === to) return showMessage(msg);\n Operation.show(opStr, { ...data,\n to\n });\n await clear();\n }\n\n return Buffer;\n}\n\n//# sourceURL=file://cloudcmd/client/dom/buffer.js");
11
+ eval("\n\n/* global CloudCmd */\nconst tryToPromiseAll = __webpack_require__(/*! ../../common/try-to-promise-all */ \"./common/try-to-promise-all.js\");\nconst Storage = __webpack_require__(/*! ./storage */ \"./client/dom/storage.js\");\nconst DOM = __webpack_require__(/*! ./ */ \"./client/dom/index.js\");\nmodule.exports = new BufferProto();\nfunction BufferProto() {\n const Info = DOM.CurrentInfo;\n const CLASS = 'cut-file';\n const COPY = 'copy';\n const CUT = 'cut';\n const Buffer = {\n cut: callIfEnabled.bind(null, cut),\n copy: callIfEnabled.bind(null, copy),\n clear: callIfEnabled.bind(null, clear),\n paste: callIfEnabled.bind(null, paste)\n };\n function showMessage(msg) {\n DOM.Dialog.alert(msg);\n }\n function getNames() {\n const files = DOM.getActiveFiles();\n const names = DOM.getFilenames(files);\n return names;\n }\n function addCutClass() {\n const files = DOM.getActiveFiles();\n for (const element of files) {\n element.classList.add(CLASS);\n }\n }\n function rmCutClass() {\n const files = DOM.getByClassAll(CLASS);\n for (const element of files) {\n element.classList.remove(CLASS);\n }\n }\n function callIfEnabled(callback) {\n const is = CloudCmd.config('buffer');\n if (is) return callback();\n showMessage('Buffer disabled in config!');\n }\n async function readBuffer() {\n const [e, cp, ct] = await tryToPromiseAll([Storage.getJson(COPY), Storage.getJson(CUT)]);\n return [e, cp, ct];\n }\n async function copy() {\n const names = getNames();\n const from = Info.dirPath;\n await clear();\n if (!names.length) return;\n await Storage.remove(CUT);\n await Storage.setJson(COPY, {\n from,\n names\n });\n }\n async function cut() {\n const names = getNames();\n const from = Info.dirPath;\n await clear();\n if (!names.length) return;\n addCutClass();\n await Storage.setJson(CUT, {\n from,\n names\n });\n }\n async function clear() {\n await Storage.remove(COPY);\n await Storage.remove(CUT);\n rmCutClass();\n }\n async function paste() {\n const [error, cp, ct] = await readBuffer();\n if (error || !cp && !ct) return showMessage(error || 'Buffer is empty!');\n const opStr = cp ? 'copy' : 'move';\n const data = cp || ct;\n const {\n Operation\n } = CloudCmd;\n const msg = 'Path is same!';\n const to = Info.dirPath;\n if (data.from === to) return showMessage(msg);\n Operation.show(opStr, {\n ...data,\n to\n });\n await clear();\n }\n return Buffer;\n}\n\n//# sourceURL=file://cloudcmd/client/dom/buffer.js");
12
12
 
13
13
  /***/ }),
14
14
 
@@ -20,7 +20,7 @@ eval("\n/* global CloudCmd */\n\nconst tryToPromiseAll = __webpack_require__(/*!
20
20
  /***/ (function(module, exports, __webpack_require__) {
21
21
 
22
22
  "use strict";
23
- eval("\n/* global DOM */\n\n/* global CloudCmd */\n\nconst {\n atob,\n btoa\n} = __webpack_require__(/*! ../../common/base64 */ \"./common/base64.js\");\n\nconst createElement = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n\nconst {\n encode,\n decode\n} = __webpack_require__(/*! ../../common/entity */ \"./common/entity.js\");\n\nconst {\n getTitle,\n FS\n} = __webpack_require__(/*! ../../common/cloudfunc */ \"./common/cloudfunc.js\");\n\nlet Title;\nconst CURRENT_FILE = 'current-file';\n\nconst encodeNBSP = a => a === null || a === void 0 ? void 0 : a.replace('\\xa0', ' ');\n\nconst decodeNBSP = a => a === null || a === void 0 ? void 0 : a.replace(' ', '\\xa0');\n\nmodule.exports._CURRENT_FILE = CURRENT_FILE;\n/**\n * set name from current (or param) file\n *\n * @param name\n * @param current\n */\n\nmodule.exports.setCurrentName = (name, current) => {\n const Info = DOM.CurrentInfo;\n const {\n link\n } = Info;\n const {\n prefix\n } = CloudCmd;\n const dir = prefix + FS + Info.dirPath;\n const encoded = encode(name);\n link.title = encoded;\n link.href = dir + encoded;\n link.innerHTML = encoded;\n current.setAttribute('data-name', createNameAttribute(name));\n CloudCmd.emit('current-file', current);\n return link;\n};\n/**\n * get name from current (or param) file\n *\n * @param currentFile\n */\n\n\nmodule.exports.getCurrentName = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n if (!current) return '';\n return parseNameAttribute(current.getAttribute('data-name'));\n};\n/**\n * Generate a `data-name` attribute for the given filename\n * @param name The string name to encode\n */\n\n\nconst createNameAttribute = name => {\n const encoded = btoa(encodeURI(name));\n return `js-file-${encoded}`;\n};\n/**\n * Parse a `data-name` attribute string back into the original filename\n * @param attribute The string we wish to decode\n */\n\n\nconst parseNameAttribute = attribute => {\n attribute = attribute.replace('js-file-', '');\n return decodeNBSP(decodeURI(atob(attribute)));\n};\n\nmodule.exports._parseNameAttribute = parseNameAttribute;\n\nconst parseHrefAttribute = (prefix, attribute) => {\n attribute = attribute.replace(RegExp('^' + prefix + FS), '');\n return decode(decodeNBSP(attribute));\n};\n\nmodule.exports._parseHrefAttribute = parseHrefAttribute;\n/**\n * get current direcotory path\n */\n\nmodule.exports.getCurrentDirPath = function () {\n let panel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DOM.getPanel();\n const path = DOM.getByDataName('js-path', panel);\n return path.textContent;\n};\n/**\n * get link from current (or param) file\n *\n * @param currentFile - current file by default\n */\n\n\nmodule.exports.getCurrentPath = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const [element] = DOM.getByTag('a', current);\n const {\n prefix\n } = CloudCmd;\n return parseHrefAttribute(prefix, element.getAttribute('href'));\n};\n/**\n * get current direcotory name\n */\n\n\nmodule.exports.getCurrentDirName = () => {\n const href = DOM.getCurrentDirPath().replace(/\\/$/, '');\n const substr = href.substr(href, href.lastIndexOf('/'));\n const ret = href.replace(substr + '/', '') || '/';\n return ret;\n};\n/**\n * get current direcotory path\n */\n\n\nmodule.exports.getParentDirPath = panel => {\n const path = DOM.getCurrentDirPath(panel);\n const dirName = DOM.getCurrentDirName() + '/';\n const index = path.lastIndexOf(dirName);\n if (path === '/') return path;\n return path.slice(0, index);\n};\n/**\n * get not current direcotory path\n */\n\n\nmodule.exports.getNotCurrentDirPath = () => {\n const panel = DOM.getPanel({\n active: false\n });\n return DOM.getCurrentDirPath(panel);\n};\n/**\n * unified way to get current file\n *\n * @currentFile\n */\n\n\nmodule.exports.getCurrentFile = () => {\n return DOM.getByClass(CURRENT_FILE);\n};\n/**\n * get current file by name\n */\n\n\nmodule.exports.getCurrentByName = function (name) {\n let panel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DOM.CurrentInfo.panel;\n const dataName = 'js-file-' + btoa(encodeURI(encodeNBSP(name)));\n return DOM.getByDataName(dataName, panel);\n};\n/**\n * private function thet unset currentfile\n *\n * @currentFile\n */\n\n\nfunction unsetCurrentFile(currentFile) {\n const is = DOM.isCurrentFile(currentFile);\n if (!is) return;\n currentFile.classList.remove(CURRENT_FILE);\n}\n/**\n * unified way to set current file\n */\n\n\nmodule.exports.setCurrentFile = (currentFile, options) => {\n const o = options;\n const currentFileWas = DOM.getCurrentFile();\n if (!currentFile) return DOM;\n let pathWas = '';\n\n if (currentFileWas) {\n pathWas = DOM.getCurrentDirPath();\n unsetCurrentFile(currentFileWas);\n }\n\n currentFile.classList.add(CURRENT_FILE);\n const path = DOM.getCurrentDirPath();\n const name = CloudCmd.config('name');\n\n if (path !== pathWas) {\n DOM.setTitle(getTitle({\n name,\n path\n }));\n /* history could be present\n * but it should be false\n * to prevent default behavior\n */\n\n if (!o || o.history) {\n const historyPath = path === '/' ? path : FS + path;\n DOM.setHistory(historyPath, null, historyPath);\n }\n }\n /* scrolling to current file */\n\n\n const CENTER = true;\n DOM.scrollIntoViewIfNeeded(currentFile, CENTER);\n CloudCmd.emit('current-file', currentFile);\n CloudCmd.emit('current-path', path);\n CloudCmd.emit('current-name', DOM.getCurrentName(currentFile));\n return DOM;\n};\n\nthis.setCurrentByName = name => {\n const current = DOM.getCurrentByName(name);\n return DOM.setCurrentFile(current);\n};\n/*\n * set current file by position\n *\n * @param layer - element\n * @param - position {x, y}\n */\n\n\nmodule.exports.getCurrentByPosition = _ref => {\n let {\n x,\n y\n } = _ref;\n const element = document.elementFromPoint(x, y);\n\n const getEl = el => {\n const {\n tagName\n } = el;\n const isChild = /A|SPAN|LI/.test(tagName);\n if (!isChild) return null;\n if (tagName === 'A') return el.parentElement.parentElement;\n if (tagName === 'SPAN') return el.parentElement;\n return el;\n };\n\n const el = getEl(element);\n if (el && el.tagName !== 'LI') return null;\n return el;\n};\n/**\n * current file check\n *\n * @param currentFile\n */\n\n\nmodule.exports.isCurrentFile = currentFile => {\n if (!currentFile) return false;\n return DOM.isContainClass(currentFile, CURRENT_FILE);\n};\n/**\n * set title or create title element\n *\n * @param name\n */\n\n\nmodule.exports.setTitle = name => {\n if (!Title) Title = DOM.getByTag('title')[0] || createElement('title', {\n innerHTML: name,\n parent: document.head\n });\n Title.textContent = name;\n return DOM;\n};\n/**\n * check is current file is a directory\n *\n * @param currentFile\n */\n\n\nmodule.exports.isCurrentIsDir = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const path = DOM.getCurrentPath(current);\n const fileType = DOM.getCurrentType(current);\n const isZip = /\\.zip$/.test(path);\n const isDir = /^directory(-link)?/.test(fileType);\n return isDir || isZip;\n};\n\nmodule.exports.getCurrentType = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const el = DOM.getByDataName('js-type', current);\n const type = el.className.split(' ').pop();\n return type;\n};\n\n//# sourceURL=file://cloudcmd/client/dom/current-file.js");
23
+ eval("\n\n/* global DOM */\n/* global CloudCmd */\nconst {\n atob,\n btoa\n} = __webpack_require__(/*! ../../common/base64 */ \"./common/base64.js\");\nconst createElement = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\nconst {\n encode,\n decode\n} = __webpack_require__(/*! ../../common/entity */ \"./common/entity.js\");\nconst {\n getTitle,\n FS\n} = __webpack_require__(/*! ../../common/cloudfunc */ \"./common/cloudfunc.js\");\nlet Title;\nconst CURRENT_FILE = 'current-file';\nconst encodeNBSP = a => a === null || a === void 0 ? void 0 : a.replace('\\xa0', ' ');\nconst decodeNBSP = a => a === null || a === void 0 ? void 0 : a.replace(' ', '\\xa0');\nmodule.exports._CURRENT_FILE = CURRENT_FILE;\n\n/**\n * set name from current (or param) file\n *\n * @param name\n * @param current\n */\nmodule.exports.setCurrentName = (name, current) => {\n const Info = DOM.CurrentInfo;\n const {\n link\n } = Info;\n const {\n prefix\n } = CloudCmd;\n const dir = prefix + FS + Info.dirPath;\n const encoded = encode(name);\n link.title = encoded;\n link.href = dir + encoded;\n link.innerHTML = encoded;\n current.setAttribute('data-name', createNameAttribute(name));\n CloudCmd.emit('current-file', current);\n return link;\n};\n\n/**\n * get name from current (or param) file\n *\n * @param currentFile\n */\nmodule.exports.getCurrentName = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n if (!current) return '';\n return parseNameAttribute(current.getAttribute('data-name'));\n};\n\n/**\n * Generate a `data-name` attribute for the given filename\n * @param name The string name to encode\n */\nconst createNameAttribute = name => {\n const encoded = btoa(encodeURI(name));\n return `js-file-${encoded}`;\n};\n\n/**\n * Parse a `data-name` attribute string back into the original filename\n * @param attribute The string we wish to decode\n */\nconst parseNameAttribute = attribute => {\n attribute = attribute.replace('js-file-', '');\n return decodeNBSP(decodeURI(atob(attribute)));\n};\nmodule.exports._parseNameAttribute = parseNameAttribute;\nconst parseHrefAttribute = (prefix, attribute) => {\n attribute = attribute.replace(RegExp('^' + prefix + FS), '');\n return decode(decodeNBSP(attribute));\n};\nmodule.exports._parseHrefAttribute = parseHrefAttribute;\n\n/**\n * get current direcotory path\n */\nmodule.exports.getCurrentDirPath = function () {\n let panel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DOM.getPanel();\n const path = DOM.getByDataName('js-path', panel);\n return path.textContent;\n};\n\n/**\n * get link from current (or param) file\n *\n * @param currentFile - current file by default\n */\nmodule.exports.getCurrentPath = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const [element] = DOM.getByTag('a', current);\n const {\n prefix\n } = CloudCmd;\n return parseHrefAttribute(prefix, element.getAttribute('href'));\n};\n\n/**\n * get current direcotory name\n */\nmodule.exports.getCurrentDirName = () => {\n const href = DOM.getCurrentDirPath().replace(/\\/$/, '');\n const substr = href.substr(href, href.lastIndexOf('/'));\n const ret = href.replace(substr + '/', '') || '/';\n return ret;\n};\n\n/**\n * get current direcotory path\n */\nmodule.exports.getParentDirPath = panel => {\n const path = DOM.getCurrentDirPath(panel);\n const dirName = DOM.getCurrentDirName() + '/';\n const index = path.lastIndexOf(dirName);\n if (path === '/') return path;\n return path.slice(0, index);\n};\n\n/**\n * get not current direcotory path\n */\nmodule.exports.getNotCurrentDirPath = () => {\n const panel = DOM.getPanel({\n active: false\n });\n return DOM.getCurrentDirPath(panel);\n};\n\n/**\n * unified way to get current file\n *\n * @currentFile\n */\nmodule.exports.getCurrentFile = () => {\n return DOM.getByClass(CURRENT_FILE);\n};\n\n/**\n * get current file by name\n */\n\nmodule.exports.getCurrentByName = function (name) {\n let panel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DOM.CurrentInfo.panel;\n const dataName = 'js-file-' + btoa(encodeURI(encodeNBSP(name)));\n return DOM.getByDataName(dataName, panel);\n};\n\n/**\n * private function thet unset currentfile\n *\n * @currentFile\n */\nfunction unsetCurrentFile(currentFile) {\n const is = DOM.isCurrentFile(currentFile);\n if (!is) return;\n currentFile.classList.remove(CURRENT_FILE);\n}\n\n/**\n * unified way to set current file\n */\nmodule.exports.setCurrentFile = (currentFile, options) => {\n const o = options;\n const currentFileWas = DOM.getCurrentFile();\n if (!currentFile) return DOM;\n let pathWas = '';\n if (currentFileWas) {\n pathWas = DOM.getCurrentDirPath();\n unsetCurrentFile(currentFileWas);\n }\n currentFile.classList.add(CURRENT_FILE);\n const path = DOM.getCurrentDirPath();\n const name = CloudCmd.config('name');\n if (path !== pathWas) {\n DOM.setTitle(getTitle({\n name,\n path\n }));\n\n /* history could be present\n * but it should be false\n * to prevent default behavior\n */\n if (!o || o.history) {\n const historyPath = path === '/' ? path : FS + path;\n DOM.setHistory(historyPath, null, historyPath);\n }\n }\n\n /* scrolling to current file */\n const CENTER = true;\n DOM.scrollIntoViewIfNeeded(currentFile, CENTER);\n CloudCmd.emit('current-file', currentFile);\n CloudCmd.emit('current-path', path);\n CloudCmd.emit('current-name', DOM.getCurrentName(currentFile));\n return DOM;\n};\nthis.setCurrentByName = name => {\n const current = DOM.getCurrentByName(name);\n return DOM.setCurrentFile(current);\n};\n\n/*\n * set current file by position\n *\n * @param layer - element\n * @param - position {x, y}\n */\nmodule.exports.getCurrentByPosition = _ref => {\n let {\n x,\n y\n } = _ref;\n const element = document.elementFromPoint(x, y);\n const getEl = el => {\n const {\n tagName\n } = el;\n const isChild = /A|SPAN|LI/.test(tagName);\n if (!isChild) return null;\n if (tagName === 'A') return el.parentElement.parentElement;\n if (tagName === 'SPAN') return el.parentElement;\n return el;\n };\n const el = getEl(element);\n if (el && el.tagName !== 'LI') return null;\n return el;\n};\n\n/**\n * current file check\n *\n * @param currentFile\n */\nmodule.exports.isCurrentFile = currentFile => {\n if (!currentFile) return false;\n return DOM.isContainClass(currentFile, CURRENT_FILE);\n};\n\n/**\n * set title or create title element\n *\n * @param name\n */\n\nmodule.exports.setTitle = name => {\n if (!Title) Title = DOM.getByTag('title')[0] || createElement('title', {\n innerHTML: name,\n parent: document.head\n });\n Title.textContent = name;\n return DOM;\n};\n\n/**\n * check is current file is a directory\n *\n * @param currentFile\n */\nmodule.exports.isCurrentIsDir = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const path = DOM.getCurrentPath(current);\n const fileType = DOM.getCurrentType(current);\n const isZip = /\\.zip$/.test(path);\n const isDir = /^directory(-link)?/.test(fileType);\n return isDir || isZip;\n};\nmodule.exports.getCurrentType = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const el = DOM.getByDataName('js-type', current);\n const type = el.className.split(' ').pop();\n return type;\n};\n\n//# sourceURL=file://cloudcmd/client/dom/current-file.js");
24
24
 
25
25
  /***/ }),
26
26
 
@@ -32,7 +32,7 @@ eval("\n/* global DOM */\n\n/* global CloudCmd */\n\nconst {\n atob,\n btoa\n}
32
32
  /***/ (function(module, exports, __webpack_require__) {
33
33
 
34
34
  "use strict";
35
- eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n\nconst {\n alert,\n prompt,\n confirm,\n progress\n} = __webpack_require__(/*! smalltalk */ \"./node_modules/smalltalk/lib/smalltalk.js\");\n\nconst title = 'Cloud Commander';\n\nmodule.exports.alert = function () {\n for (var _len = arguments.length, a = new Array(_len), _key = 0; _key < _len; _key++) {\n a[_key] = arguments[_key];\n }\n\n return alert(title, ...a, {\n cancel: false\n });\n};\n\nmodule.exports.prompt = function () {\n for (var _len2 = arguments.length, a = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n a[_key2] = arguments[_key2];\n }\n\n return tryToCatch(prompt, title, ...a);\n};\n\nmodule.exports.confirm = function () {\n for (var _len3 = arguments.length, a = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n a[_key3] = arguments[_key3];\n }\n\n return tryToCatch(confirm, title, ...a);\n};\n\nmodule.exports.progress = function () {\n for (var _len4 = arguments.length, a = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n a[_key4] = arguments[_key4];\n }\n\n return progress(title, ...a);\n};\n\nmodule.exports.alert.noFiles = () => {\n return alert(title, 'No files selected!', {\n cancel: false\n });\n};\n\n//# sourceURL=file://cloudcmd/client/dom/dialog.js");
35
+ eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\nconst {\n alert,\n prompt,\n confirm,\n progress\n} = __webpack_require__(/*! smalltalk */ \"./node_modules/smalltalk/lib/smalltalk.js\");\nconst title = 'Cloud Commander';\nmodule.exports.alert = function () {\n for (var _len = arguments.length, a = new Array(_len), _key = 0; _key < _len; _key++) {\n a[_key] = arguments[_key];\n }\n return alert(title, ...a, {\n cancel: false\n });\n};\nmodule.exports.prompt = function () {\n for (var _len2 = arguments.length, a = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n a[_key2] = arguments[_key2];\n }\n return tryToCatch(prompt, title, ...a);\n};\nmodule.exports.confirm = function () {\n for (var _len3 = arguments.length, a = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n a[_key3] = arguments[_key3];\n }\n return tryToCatch(confirm, title, ...a);\n};\nmodule.exports.progress = function () {\n for (var _len4 = arguments.length, a = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n a[_key4] = arguments[_key4];\n }\n return progress(title, ...a);\n};\nmodule.exports.alert.noFiles = () => {\n return alert(title, 'No files selected!', {\n cancel: false\n });\n};\n\n//# sourceURL=file://cloudcmd/client/dom/dialog.js");
36
36
 
37
37
  /***/ }),
38
38
 
@@ -44,7 +44,7 @@ eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_mo
44
44
  /***/ (function(module, exports, __webpack_require__) {
45
45
 
46
46
  "use strict";
47
- eval("\n/* global CloudCmd */\n\nconst philip = __webpack_require__(/*! philip */ \"./node_modules/philip/legacy/philip.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nconst {\n FS\n} = __webpack_require__(/*! ../../common/cloudfunc */ \"./common/cloudfunc.js\");\n\nconst DOM = __webpack_require__(/*! . */ \"./client/dom/index.js\");\n\nconst Dialog = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\n\nconst {\n getCurrentDirPath: getPathWhenRootEmpty\n} = DOM;\n\nmodule.exports = items => {\n if (items.length) Images.show('top');\n const entries = Array.from(items).map(item => item.webkitGetAsEntry());\n const dirPath = getPathWhenRootEmpty();\n const path = dirPath.replace(/\\/$/, '');\n const progress = Dialog.progress('Uploading...');\n progress.catch(() => {\n Dialog.alert('Upload aborted');\n uploader.abort();\n });\n const uploader = philip(entries, (type, name, data, i, n, callback) => {\n const {\n prefixURL\n } = CloudCmd;\n const full = prefixURL + FS + path + name;\n let upload;\n\n switch (type) {\n case 'file':\n upload = uploadFile(full, data);\n break;\n\n case 'directory':\n upload = uploadDir(full);\n break;\n }\n\n upload.on('end', callback);\n upload.on('progress', count => {\n const current = percent(i, n);\n const next = percent(i + 1, n);\n const max = next - current;\n const value = current + percent(count, 100, max);\n progress.setProgress(value);\n });\n });\n uploader.on('error', error => {\n Dialog.alert(error);\n uploader.abort();\n });\n uploader.on('end', CloudCmd.refresh);\n};\n\nfunction percent(i, n) {\n let per = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\n return Math.round(i * per / n);\n}\n\nfunction uploadFile(url, data) {\n return DOM.load.put(url, data);\n}\n\nfunction uploadDir(url) {\n return DOM.load.put(url + '?dir');\n}\n\n//# sourceURL=file://cloudcmd/client/dom/directory.js");
47
+ eval("\n\n/* global CloudCmd */\nconst philip = __webpack_require__(/*! philip */ \"./node_modules/philip/legacy/philip.js\");\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\nconst {\n FS\n} = __webpack_require__(/*! ../../common/cloudfunc */ \"./common/cloudfunc.js\");\nconst DOM = __webpack_require__(/*! . */ \"./client/dom/index.js\");\nconst Dialog = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\nconst {\n getCurrentDirPath: getPathWhenRootEmpty\n} = DOM;\nmodule.exports = items => {\n if (items.length) Images.show('top');\n const entries = Array.from(items).map(item => item.webkitGetAsEntry());\n const dirPath = getPathWhenRootEmpty();\n const path = dirPath.replace(/\\/$/, '');\n const progress = Dialog.progress('Uploading...');\n progress.catch(() => {\n Dialog.alert('Upload aborted');\n uploader.abort();\n });\n const uploader = philip(entries, (type, name, data, i, n, callback) => {\n const {\n prefixURL\n } = CloudCmd;\n const full = prefixURL + FS + path + name;\n let upload;\n switch (type) {\n case 'file':\n upload = uploadFile(full, data);\n break;\n case 'directory':\n upload = uploadDir(full);\n break;\n }\n upload.on('end', callback);\n upload.on('progress', count => {\n const current = percent(i, n);\n const next = percent(i + 1, n);\n const max = next - current;\n const value = current + percent(count, 100, max);\n progress.setProgress(value);\n });\n });\n uploader.on('error', error => {\n Dialog.alert(error);\n uploader.abort();\n });\n uploader.on('end', CloudCmd.refresh);\n};\nfunction percent(i, n) {\n let per = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\n return Math.round(i * per / n);\n}\nfunction uploadFile(url, data) {\n return DOM.load.put(url, data);\n}\nfunction uploadDir(url) {\n return DOM.load.put(url + '?dir');\n}\n\n//# sourceURL=file://cloudcmd/client/dom/directory.js");
48
48
 
49
49
  /***/ }),
50
50
 
@@ -56,7 +56,7 @@ eval("\n/* global CloudCmd */\n\nconst philip = __webpack_require__(/*! philip *
56
56
  /***/ (function(module, exports, __webpack_require__) {
57
57
 
58
58
  "use strict";
59
- eval("\n\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n\nconst DOM = module.exports;\n/**\n * check class of element\n *\n * @param element\n * @param className\n */\n\nconst isContainClass = (element, className) => {\n if (!element) throw Error('element could not be empty!');\n if (!className) throw Error('className could not be empty!');\n if (Array.isArray(className)) return className.some(currify(isContainClass, element));\n const {\n classList\n } = element;\n return classList.contains(className);\n};\n\nmodule.exports.isContainClass = isContainClass;\n/**\n * Function search element by tag\n * @param tag - className\n * @param element - element\n */\n\nmodule.exports.getByTag = function (tag) {\n let element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n return element.getElementsByTagName(tag);\n};\n/**\n * Function search element by id\n * @param Id - id\n */\n\n\nmodule.exports.getById = function (id) {\n let element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n return element.querySelector('#' + id);\n};\n/**\n * Function search first element by class name\n * @param className - className\n * @param element - element\n */\n\n\nmodule.exports.getByClass = function (className) {\n let element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n return DOM.getByClassAll(className, element)[0];\n};\n\nmodule.exports.getByDataName = function (attribute) {\n let element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n const selector = '[' + 'data-name=\"' + attribute + '\"]';\n return element.querySelector(selector);\n};\n/**\n * Function search element by class name\n * @param pClass - className\n * @param element - element\n */\n\n\nmodule.exports.getByClassAll = (className, element) => {\n return (element || document).getElementsByClassName(className);\n};\n/**\n * add class=hidden to element\n *\n * @param element\n */\n\n\nmodule.exports.hide = element => {\n element.classList.add('hidden');\n return DOM;\n};\n\nmodule.exports.show = element => {\n element.classList.remove('hidden');\n return DOM;\n};\n\n//# sourceURL=file://cloudcmd/client/dom/dom-tree.js");
59
+ eval("\n\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\nconst DOM = module.exports;\n\n/**\n * check class of element\n *\n * @param element\n * @param className\n */\nconst isContainClass = (element, className) => {\n if (!element) throw Error('element could not be empty!');\n if (!className) throw Error('className could not be empty!');\n if (Array.isArray(className)) return className.some(currify(isContainClass, element));\n const {\n classList\n } = element;\n return classList.contains(className);\n};\nmodule.exports.isContainClass = isContainClass;\n\n/**\n * Function search element by tag\n * @param tag - className\n * @param element - element\n */\nmodule.exports.getByTag = function (tag) {\n let element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n return element.getElementsByTagName(tag);\n};\n\n/**\n * Function search element by id\n * @param Id - id\n */\nmodule.exports.getById = function (id) {\n let element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n return element.querySelector('#' + id);\n};\n\n/**\n * Function search first element by class name\n * @param className - className\n * @param element - element\n */\nmodule.exports.getByClass = function (className) {\n let element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n return DOM.getByClassAll(className, element)[0];\n};\nmodule.exports.getByDataName = function (attribute) {\n let element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n const selector = '[' + 'data-name=\"' + attribute + '\"]';\n return element.querySelector(selector);\n};\n\n/**\n * Function search element by class name\n * @param pClass - className\n * @param element - element\n */\nmodule.exports.getByClassAll = (className, element) => {\n return (element || document).getElementsByClassName(className);\n};\n\n/**\n * add class=hidden to element\n *\n * @param element\n */\nmodule.exports.hide = element => {\n element.classList.add('hidden');\n return DOM;\n};\nmodule.exports.show = element => {\n element.classList.remove('hidden');\n return DOM;\n};\n\n//# sourceURL=file://cloudcmd/client/dom/dom-tree.js");
60
60
 
61
61
  /***/ }),
62
62
 
@@ -68,7 +68,7 @@ eval("\n\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/cu
68
68
  /***/ (function(module, exports, __webpack_require__) {
69
69
 
70
70
  "use strict";
71
- eval("\n\nlet list = [];\n\nmodule.exports.add = (el, name, fn) => {\n list.push([el, name, fn]);\n};\n\nmodule.exports.clear = () => {\n list = [];\n};\n\nmodule.exports.get = () => list;\n\n//# sourceURL=file://cloudcmd/client/dom/events/event-store.js");
71
+ eval("\n\nlet list = [];\nmodule.exports.add = (el, name, fn) => {\n list.push([el, name, fn]);\n};\nmodule.exports.clear = () => {\n list = [];\n};\nmodule.exports.get = () => list;\n\n//# sourceURL=file://cloudcmd/client/dom/events/event-store.js");
72
72
 
73
73
  /***/ }),
74
74
 
@@ -80,7 +80,7 @@ eval("\n\nlet list = [];\n\nmodule.exports.add = (el, name, fn) => {\n list.pus
80
80
  /***/ (function(module, exports, __webpack_require__) {
81
81
 
82
82
  "use strict";
83
- eval("\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n\nconst EventStore = __webpack_require__(/*! ./event-store */ \"./client/dom/events/event-store.js\");\n\nmodule.exports = new EventsProto();\n\nfunction EventsProto() {\n const Events = this;\n\n const getEventOptions = eventName => {\n if (eventName !== 'touchstart') return false;\n return {\n passive: true\n };\n };\n\n function parseArgs(eventName, element, listener, callback) {\n let isFunc;\n const args = [eventName, element, listener, callback];\n const EVENT_NAME = 1;\n const ELEMENT = 0;\n const type = itype(eventName);\n\n switch (type) {\n default:\n if (!type.endsWith('element')) throw Error('unknown eventName: ' + type);\n parseArgs(args[EVENT_NAME], args[ELEMENT], listener, callback);\n break;\n\n case 'string':\n isFunc = itype.function(element);\n\n if (isFunc) {\n listener = element;\n element = null;\n }\n\n if (!element) element = window;\n callback(element, [eventName, listener, getEventOptions(eventName)]);\n break;\n\n case 'array':\n for (const name of eventName) {\n parseArgs(name, element, listener, callback);\n }\n\n break;\n\n case 'object':\n for (const name of Object.keys(eventName)) {\n const eventListener = eventName[name];\n parseArgs(name, element, eventListener, callback);\n }\n\n break;\n }\n }\n /**\n * safe add event listener\n *\n * @param type\n * @param element {document by default}\n * @param listener\n */\n\n\n this.add = (type, element, listener) => {\n checkType(type);\n parseArgs(type, element, listener, (element, args) => {\n const [name, fn, options] = args;\n element.addEventListener(name, fn, options);\n EventStore.add(element, name, fn);\n });\n return Events;\n };\n /**\n * safe add event listener\n *\n * @param type\n * @param listener\n * @param element {document by default}\n */\n\n\n this.addOnce = (type, element, listener) => {\n const once = event => {\n Events.remove(type, element, once);\n listener(event);\n };\n\n if (!listener) {\n listener = element;\n element = null;\n }\n\n this.add(type, element, once);\n return Events;\n };\n /**\n * safe remove event listener\n *\n * @param type\n * @param listener\n * @param element {document by default}\n */\n\n\n this.remove = (type, element, listener) => {\n checkType(type);\n parseArgs(type, element, listener, (element, args) => {\n element.removeEventListener(...args);\n });\n return Events;\n };\n /**\n * remove all added event listeners\n *\n * @param listener\n */\n\n\n this.removeAll = () => {\n const events = EventStore.get();\n\n for (const [el, name, fn] of events) el.removeEventListener(name, fn);\n\n EventStore.clear();\n };\n /**\n * safe add event keydown listener\n *\n * @param listener\n */\n\n\n this.addKey = function () {\n const name = 'keydown';\n\n for (var _len = arguments.length, argsArr = new Array(_len), _key = 0; _key < _len; _key++) {\n argsArr[_key] = arguments[_key];\n }\n\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n /**\n * safe remove event click listener\n *\n * @param listener\n */\n\n\n this.rmKey = function () {\n const name = 'keydown';\n\n for (var _len2 = arguments.length, argsArr = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n argsArr[_key2] = arguments[_key2];\n }\n\n const args = [name, ...argsArr];\n return Events.remove(...args);\n };\n /**\n * safe add event click listener\n *\n * @param listener\n */\n\n\n this.addClick = function () {\n const name = 'click';\n\n for (var _len3 = arguments.length, argsArr = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n argsArr[_key3] = arguments[_key3];\n }\n\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n /**\n * safe remove event click listener\n *\n * @param listener\n */\n\n\n this.rmClick = function () {\n const name = 'click';\n\n for (var _len4 = arguments.length, argsArr = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n argsArr[_key4] = arguments[_key4];\n }\n\n const args = [name, ...argsArr];\n return Events.remove(...args);\n };\n\n this.addContextMenu = function () {\n const name = 'contextmenu';\n\n for (var _len5 = arguments.length, argsArr = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n argsArr[_key5] = arguments[_key5];\n }\n\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n /**\n * safe add event click listener\n *\n * @param listener\n */\n\n\n this.addError = function () {\n const name = 'error';\n\n for (var _len6 = arguments.length, argsArr = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n argsArr[_key6] = arguments[_key6];\n }\n\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n /**\n * safe add load click listener\n *\n * @param listener\n */\n\n\n this.addLoad = function () {\n const name = 'load';\n\n for (var _len7 = arguments.length, argsArr = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n argsArr[_key7] = arguments[_key7];\n }\n\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n\n function checkType(type) {\n if (!type) throw Error('type could not be empty!');\n }\n}\n\n//# sourceURL=file://cloudcmd/client/dom/events/index.js");
83
+ eval("\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\nconst EventStore = __webpack_require__(/*! ./event-store */ \"./client/dom/events/event-store.js\");\nmodule.exports = new EventsProto();\nfunction EventsProto() {\n const Events = this;\n const getEventOptions = eventName => {\n if (eventName !== 'touchstart') return false;\n return {\n passive: true\n };\n };\n function parseArgs(eventName, element, listener, callback) {\n let isFunc;\n const args = [eventName, element, listener, callback];\n const EVENT_NAME = 1;\n const ELEMENT = 0;\n const type = itype(eventName);\n switch (type) {\n default:\n if (!type.endsWith('element')) throw Error('unknown eventName: ' + type);\n parseArgs(args[EVENT_NAME], args[ELEMENT], listener, callback);\n break;\n case 'string':\n isFunc = itype.function(element);\n if (isFunc) {\n listener = element;\n element = null;\n }\n if (!element) element = window;\n callback(element, [eventName, listener, getEventOptions(eventName)]);\n break;\n case 'array':\n for (const name of eventName) {\n parseArgs(name, element, listener, callback);\n }\n break;\n case 'object':\n for (const name of Object.keys(eventName)) {\n const eventListener = eventName[name];\n parseArgs(name, element, eventListener, callback);\n }\n break;\n }\n }\n\n /**\n * safe add event listener\n *\n * @param type\n * @param element {document by default}\n * @param listener\n */\n this.add = (type, element, listener) => {\n checkType(type);\n parseArgs(type, element, listener, (element, args) => {\n const [name, fn, options] = args;\n element.addEventListener(name, fn, options);\n EventStore.add(element, name, fn);\n });\n return Events;\n };\n\n /**\n * safe add event listener\n *\n * @param type\n * @param listener\n * @param element {document by default}\n */\n this.addOnce = (type, element, listener) => {\n const once = event => {\n Events.remove(type, element, once);\n listener(event);\n };\n if (!listener) {\n listener = element;\n element = null;\n }\n this.add(type, element, once);\n return Events;\n };\n\n /**\n * safe remove event listener\n *\n * @param type\n * @param listener\n * @param element {document by default}\n */\n this.remove = (type, element, listener) => {\n checkType(type);\n parseArgs(type, element, listener, (element, args) => {\n element.removeEventListener(...args);\n });\n return Events;\n };\n\n /**\n * remove all added event listeners\n *\n * @param listener\n */\n this.removeAll = () => {\n const events = EventStore.get();\n for (const [el, name, fn] of events) el.removeEventListener(name, fn);\n EventStore.clear();\n };\n\n /**\n * safe add event keydown listener\n *\n * @param listener\n */\n this.addKey = function () {\n const name = 'keydown';\n for (var _len = arguments.length, argsArr = new Array(_len), _key = 0; _key < _len; _key++) {\n argsArr[_key] = arguments[_key];\n }\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n\n /**\n * safe remove event click listener\n *\n * @param listener\n */\n this.rmKey = function () {\n const name = 'keydown';\n for (var _len2 = arguments.length, argsArr = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n argsArr[_key2] = arguments[_key2];\n }\n const args = [name, ...argsArr];\n return Events.remove(...args);\n };\n\n /**\n * safe add event click listener\n *\n * @param listener\n */\n this.addClick = function () {\n const name = 'click';\n for (var _len3 = arguments.length, argsArr = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n argsArr[_key3] = arguments[_key3];\n }\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n\n /**\n * safe remove event click listener\n *\n * @param listener\n */\n this.rmClick = function () {\n const name = 'click';\n for (var _len4 = arguments.length, argsArr = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n argsArr[_key4] = arguments[_key4];\n }\n const args = [name, ...argsArr];\n return Events.remove(...args);\n };\n this.addContextMenu = function () {\n const name = 'contextmenu';\n for (var _len5 = arguments.length, argsArr = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n argsArr[_key5] = arguments[_key5];\n }\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n\n /**\n * safe add event click listener\n *\n * @param listener\n */\n this.addError = function () {\n const name = 'error';\n for (var _len6 = arguments.length, argsArr = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n argsArr[_key6] = arguments[_key6];\n }\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n\n /**\n * safe add load click listener\n *\n * @param listener\n */\n this.addLoad = function () {\n const name = 'load';\n for (var _len7 = arguments.length, argsArr = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n argsArr[_key7] = arguments[_key7];\n }\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n function checkType(type) {\n if (!type) throw Error('type could not be empty!');\n }\n}\n\n//# sourceURL=file://cloudcmd/client/dom/events/index.js");
84
84
 
85
85
  /***/ }),
86
86
 
@@ -92,7 +92,7 @@ eval("\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/
92
92
  /***/ (function(module, exports, __webpack_require__) {
93
93
 
94
94
  "use strict";
95
- eval("\n/* global CloudCmd */\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n\nconst {\n promisify\n} = __webpack_require__(/*! es6-promisify */ \"./node_modules/es6-promisify/dist/promisify.mjs\");\n\nconst load = __webpack_require__(/*! ./load */ \"./client/dom/load.js\");\n\nconst RESTful = __webpack_require__(/*! ./rest */ \"./client/dom/rest.js\");\n\nconst Promises = {};\nconst FILES_JSON = 'config|modules';\nconst FILES_HTML = 'file|path|link|pathLink|media';\nconst FILES_HTML_ROOT = 'view/media-tmpl|config-tmpl|upload';\nconst DIR_HTML = '/tmpl/';\nconst DIR_HTML_FS = DIR_HTML + 'fs/';\nconst DIR_JSON = '/json/';\nconst timeout = getTimeoutOnce(2000);\nmodule.exports.get = getFile;\n\nfunction getFile(name) {\n const type = itype(name);\n check(name);\n if (type === 'string') return getModule(name);\n if (type === 'array') return Promise.all(name.map(getFile));\n}\n\nfunction check(name) {\n if (!name) throw Error('name could not be empty!');\n}\n\nfunction getModule(name) {\n const regExpHTML = RegExp(FILES_HTML + '|' + FILES_HTML_ROOT);\n const regExpJSON = RegExp(FILES_JSON);\n const isHTML = regExpHTML.test(name);\n const isJSON = regExpJSON.test(name);\n if (!isHTML && !isJSON) return showError(name);\n if (name === 'config') return getConfig();\n const path = getPath(name, isHTML, isJSON);\n return getSystemFile(path);\n}\n\nfunction getPath(name, isHTML, isJSON) {\n let path;\n const regExp = RegExp(FILES_HTML_ROOT);\n const isRoot = regExp.test(name);\n\n if (isHTML) {\n if (isRoot) path = DIR_HTML + name.replace('-tmpl', '');else path = DIR_HTML_FS + name;\n path += '.hbs';\n } else if (isJSON) {\n path = DIR_JSON + name + '.json';\n }\n\n return path;\n}\n\nfunction showError(name) {\n const str = 'Wrong file name: ' + name;\n const error = Error(str);\n throw error;\n}\n\nconst getSystemFile = promisify((file, callback) => {\n const {\n prefix\n } = CloudCmd;\n if (!Promises[file]) Promises[file] = new Promise((success, error) => {\n const url = prefix + file;\n load.ajax({\n url,\n success,\n error\n });\n });\n Promises[file].then(data => {\n callback(null, data);\n }, error => {\n Promises[file] = null;\n callback(error);\n });\n});\n\nconst getConfig = async () => {\n let is;\n if (!Promises.config) Promises.config = () => {\n is = true;\n return RESTful.Config.read();\n };\n const [, data] = await Promises.config();\n if (data) is = false;\n timeout(() => {\n if (!is) Promises.config = null;\n });\n return data;\n};\n\nfunction getTimeoutOnce(time) {\n let is;\n return callback => {\n if (is) return;\n is = true;\n setTimeout(() => {\n is = false;\n callback();\n }, time);\n };\n}\n\n//# sourceURL=file://cloudcmd/client/dom/files.js");
95
+ eval("\n\n/* global CloudCmd */\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\nconst {\n promisify\n} = __webpack_require__(/*! es6-promisify */ \"./node_modules/es6-promisify/dist/promisify.mjs\");\nconst load = __webpack_require__(/*! ./load */ \"./client/dom/load.js\");\nconst RESTful = __webpack_require__(/*! ./rest */ \"./client/dom/rest.js\");\nconst Promises = {};\nconst FILES_JSON = 'config|modules';\nconst FILES_HTML = 'file|path|link|pathLink|media';\nconst FILES_HTML_ROOT = 'view/media-tmpl|config-tmpl|upload';\nconst DIR_HTML = '/tmpl/';\nconst DIR_HTML_FS = DIR_HTML + 'fs/';\nconst DIR_JSON = '/json/';\nconst timeout = getTimeoutOnce(2000);\nmodule.exports.get = getFile;\nfunction getFile(name) {\n const type = itype(name);\n check(name);\n if (type === 'string') return getModule(name);\n if (type === 'array') return Promise.all(name.map(getFile));\n}\nfunction check(name) {\n if (!name) throw Error('name could not be empty!');\n}\nfunction getModule(name) {\n const regExpHTML = RegExp(FILES_HTML + '|' + FILES_HTML_ROOT);\n const regExpJSON = RegExp(FILES_JSON);\n const isHTML = regExpHTML.test(name);\n const isJSON = regExpJSON.test(name);\n if (!isHTML && !isJSON) return showError(name);\n if (name === 'config') return getConfig();\n const path = getPath(name, isHTML, isJSON);\n return getSystemFile(path);\n}\nfunction getPath(name, isHTML, isJSON) {\n let path;\n const regExp = RegExp(FILES_HTML_ROOT);\n const isRoot = regExp.test(name);\n if (isHTML) {\n if (isRoot) path = DIR_HTML + name.replace('-tmpl', '');else path = DIR_HTML_FS + name;\n path += '.hbs';\n } else if (isJSON) {\n path = DIR_JSON + name + '.json';\n }\n return path;\n}\nfunction showError(name) {\n const str = 'Wrong file name: ' + name;\n const error = Error(str);\n throw error;\n}\nconst getSystemFile = promisify((file, callback) => {\n const {\n prefix\n } = CloudCmd;\n if (!Promises[file]) Promises[file] = new Promise((success, error) => {\n const url = prefix + file;\n load.ajax({\n url,\n success,\n error\n });\n });\n Promises[file].then(data => {\n callback(null, data);\n }, error => {\n Promises[file] = null;\n callback(error);\n });\n});\nconst getConfig = async () => {\n let is;\n if (!Promises.config) Promises.config = () => {\n is = true;\n return RESTful.Config.read();\n };\n const [, data] = await Promises.config();\n if (data) is = false;\n timeout(() => {\n if (!is) Promises.config = null;\n });\n return data;\n};\nfunction getTimeoutOnce(time) {\n let is;\n return callback => {\n if (is) return;\n is = true;\n setTimeout(() => {\n is = false;\n callback();\n }, time);\n };\n}\n\n//# sourceURL=file://cloudcmd/client/dom/files.js");
96
96
 
97
97
  /***/ }),
98
98
 
@@ -104,7 +104,7 @@ eval("\n/* global CloudCmd */\n\nconst itype = __webpack_require__(/*! itype */
104
104
  /***/ (function(module, exports, __webpack_require__) {
105
105
 
106
106
  "use strict";
107
- eval("/* global DOM */\n\n\nconst createElement = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n\nconst Images = module.exports;\nconst LOADING = 'loading';\nconst HIDDEN = 'hidden';\nconst ERROR = 'error';\n\nfunction getLoadingType() {\n return isSVG() ? '-svg' : '-gif';\n}\n\nmodule.exports.get = getElement;\n/**\n * check SVG SMIL animation support\n */\n\nfunction isSVG() {\n const createNS = document.createElementNS;\n const SVG_URL = 'http://www.w3.org/2000/svg';\n if (!createNS) return false;\n const create = createNS.bind(document);\n const svgNode = create(SVG_URL, 'animate');\n const name = svgNode.toString();\n return /SVGAnimate/.test(name);\n}\n\nfunction getElement() {\n return createElement('span', {\n id: 'js-status-image',\n className: 'icon',\n dataName: 'progress',\n notAppend: true\n });\n}\n/* Функция создаёт картинку загрузки */\n\n\nmodule.exports.loading = () => {\n const element = getElement();\n const {\n classList\n } = element;\n const loadingImage = LOADING + getLoadingType();\n classList.add(LOADING, loadingImage);\n classList.remove(ERROR, HIDDEN);\n return element;\n};\n/* Функция создаёт картинку ошибки загрузки */\n\n\nmodule.exports.error = () => {\n const element = getElement();\n const {\n classList\n } = element;\n const loadingImage = LOADING + getLoadingType();\n classList.add(ERROR);\n classList.remove(HIDDEN, LOADING, loadingImage);\n return element;\n};\n\nmodule.exports.show = show;\nmodule.exports.show.load = show;\nmodule.exports.show.error = error;\n/**\n* Function shows loading spinner\n* position = {top: true};\n*/\n\nfunction show(position, panel) {\n const image = Images.loading();\n const parent = image.parentElement;\n const refreshButton = DOM.getRefreshButton(panel);\n let current;\n\n if (position === 'top') {\n current = refreshButton.parentElement;\n } else {\n current = DOM.getCurrentFile();\n if (current) current = DOM.getByDataName('js-name', current);else current = refreshButton.parentElement;\n }\n\n if (!parent || parent && parent !== current) current.appendChild(image);\n DOM.show(image);\n return image;\n}\n\nfunction error(text) {\n const image = Images.error();\n DOM.show(image);\n image.title = text;\n return image;\n}\n/**\n* hide load image\n*/\n\n\nmodule.exports.hide = () => {\n const element = Images.get();\n DOM.hide(element);\n return Images;\n};\n\nmodule.exports.setProgress = (value, title) => {\n const DATA = 'data-progress';\n const element = Images.get();\n if (!element) return Images;\n element.setAttribute(DATA, value + '%');\n if (title) element.title = title;\n return Images;\n};\n\nmodule.exports.clearProgress = () => {\n const DATA = 'data-progress';\n const element = Images.get();\n if (!element) return Images;\n element.setAttribute(DATA, '');\n element.title = '';\n return Images;\n};\n\n//# sourceURL=file://cloudcmd/client/dom/images.js");
107
+ eval("/* global DOM */\n\n\n\nconst createElement = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\nconst Images = module.exports;\nconst LOADING = 'loading';\nconst HIDDEN = 'hidden';\nconst ERROR = 'error';\nfunction getLoadingType() {\n return isSVG() ? '-svg' : '-gif';\n}\nmodule.exports.get = getElement;\n\n/**\n * check SVG SMIL animation support\n */\nfunction isSVG() {\n const createNS = document.createElementNS;\n const SVG_URL = 'http://www.w3.org/2000/svg';\n if (!createNS) return false;\n const create = createNS.bind(document);\n const svgNode = create(SVG_URL, 'animate');\n const name = svgNode.toString();\n return /SVGAnimate/.test(name);\n}\nfunction getElement() {\n return createElement('span', {\n id: 'js-status-image',\n className: 'icon',\n dataName: 'progress',\n notAppend: true\n });\n}\n\n/* Функция создаёт картинку загрузки */\nmodule.exports.loading = () => {\n const element = getElement();\n const {\n classList\n } = element;\n const loadingImage = LOADING + getLoadingType();\n classList.add(LOADING, loadingImage);\n classList.remove(ERROR, HIDDEN);\n return element;\n};\n\n/* Функция создаёт картинку ошибки загрузки */\nmodule.exports.error = () => {\n const element = getElement();\n const {\n classList\n } = element;\n const loadingImage = LOADING + getLoadingType();\n classList.add(ERROR);\n classList.remove(HIDDEN, LOADING, loadingImage);\n return element;\n};\nmodule.exports.show = show;\nmodule.exports.show.load = show;\nmodule.exports.show.error = error;\n\n/**\n* Function shows loading spinner\n* position = {top: true};\n*/\nfunction show(position, panel) {\n const image = Images.loading();\n const parent = image.parentElement;\n const refreshButton = DOM.getRefreshButton(panel);\n let current;\n if (position === 'top') {\n current = refreshButton.parentElement;\n } else {\n current = DOM.getCurrentFile();\n if (current) current = DOM.getByDataName('js-name', current);else current = refreshButton.parentElement;\n }\n if (!parent || parent && parent !== current) current.appendChild(image);\n DOM.show(image);\n return image;\n}\nfunction error(text) {\n const image = Images.error();\n DOM.show(image);\n image.title = text;\n return image;\n}\n\n/**\n* hide load image\n*/\nmodule.exports.hide = () => {\n const element = Images.get();\n DOM.hide(element);\n return Images;\n};\nmodule.exports.setProgress = (value, title) => {\n const DATA = 'data-progress';\n const element = Images.get();\n if (!element) return Images;\n element.setAttribute(DATA, value + '%');\n if (title) element.title = title;\n return Images;\n};\nmodule.exports.clearProgress = () => {\n const DATA = 'data-progress';\n const element = Images.get();\n if (!element) return Images;\n element.setAttribute(DATA, '');\n element.title = '';\n return Images;\n};\n\n//# sourceURL=file://cloudcmd/client/dom/images.js");
108
108
 
109
109
  /***/ }),
110
110
 
@@ -116,7 +116,7 @@ eval("/* global DOM */\n\n\nconst createElement = __webpack_require__(/*! @cloud
116
116
  /***/ (function(module, exports, __webpack_require__) {
117
117
 
118
118
  "use strict";
119
- eval("\n/* global CloudCmd */\n\nconst Util = __webpack_require__(/*! ../../common/util */ \"./common/util.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nconst RESTful = __webpack_require__(/*! ./rest */ \"./client/dom/rest.js\");\n\nconst Storage = __webpack_require__(/*! ./storage */ \"./client/dom/storage.js\");\n\nconst renameCurrent = __webpack_require__(/*! ./operations/rename-current */ \"./client/dom/operations/rename-current.js\");\n\nconst CurrentFile = __webpack_require__(/*! ./current-file */ \"./client/dom/current-file.js\");\n\nconst DOMTree = __webpack_require__(/*! ./dom-tree */ \"./client/dom/dom-tree.js\");\n\nconst Cmd = module.exports;\nconst DOM = { ...DOMTree,\n ...CurrentFile,\n ...Cmd\n};\nconst CurrentInfo = {};\nDOM.Images = Images;\nDOM.load = __webpack_require__(/*! ./load */ \"./client/dom/load.js\");\nDOM.Files = __webpack_require__(/*! ./files */ \"./client/dom/files.js\");\nDOM.RESTful = RESTful;\nDOM.IO = __webpack_require__(/*! ./io */ \"./client/dom/io/index.js\");\nDOM.Storage = Storage;\nDOM.Dialog = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\nDOM.CurrentInfo = CurrentInfo;\nmodule.exports = DOM;\nDOM.uploadDirectory = __webpack_require__(/*! ./directory */ \"./client/dom/directory.js\");\nDOM.Buffer = __webpack_require__(/*! ./buffer */ \"./client/dom/buffer.js\");\nDOM.Events = __webpack_require__(/*! ./events */ \"./client/dom/events/index.js\");\n\nconst loadRemote = __webpack_require__(/*! ./load-remote */ \"./client/dom/load-remote.js\");\n\nconst selectByPattern = __webpack_require__(/*! ./select-by-pattern */ \"./client/dom/select-by-pattern.js\");\n\nconst SELECTED_FILE = 'selected-file';\nconst TabPanel = {\n 'js-left': null,\n 'js-right': null\n};\n\nmodule.exports.loadRemote = (name, options, callback) => {\n loadRemote(name, options, callback);\n return DOM;\n};\n\nmodule.exports.loadSocket = callback => {\n DOM.loadRemote('socket', {\n name: 'io'\n }, callback);\n return DOM;\n};\n/**\n * create new folder\n *\n */\n\n\nmodule.exports.promptNewDir = async function () {\n await promptNew('directory');\n};\n/**\n * create new file\n *\n * @typeName\n * @type\n */\n\n\nmodule.exports.promptNewFile = async () => {\n await promptNew('file');\n};\n\nasync function promptNew(typeName) {\n const {\n Dialog\n } = DOM;\n const dir = DOM.getCurrentDirPath();\n const msg = 'New ' + typeName || false;\n\n const getName = () => {\n const name = DOM.getCurrentName();\n if (name === '..') return '';\n return name;\n };\n\n const name = getName();\n const [cancel, currentName] = await Dialog.prompt(msg, name);\n if (cancel) return;\n const path = `${dir}${currentName}`;\n if (typeName === 'directory') await RESTful.createDirectory(path);else await RESTful.write(path);\n await CloudCmd.refresh({\n currentName\n });\n}\n/**\n * get current direcotory name\n */\n\n\nmodule.exports.getCurrentDirName = () => {\n const href = DOM.getCurrentDirPath().replace(/\\/$/, '');\n const substr = href.substr(href, href.lastIndexOf('/'));\n const ret = href.replace(substr + '/', '') || '/';\n return ret;\n};\n/**\n * get current direcotory path\n */\n\n\nmodule.exports.getParentDirPath = panel => {\n const path = DOM.getCurrentDirPath(panel);\n const dirName = DOM.getCurrentDirName() + '/';\n const index = path.lastIndexOf(dirName);\n if (path !== '/') return path.slice(0, index);\n return path;\n};\n/**\n * get not current direcotory path\n */\n\n\nmodule.exports.getNotCurrentDirPath = () => {\n const panel = DOM.getPanel({\n active: false\n });\n const path = DOM.getCurrentDirPath(panel);\n return path;\n};\n/**\n * unified way to get selected files\n *\n * @currentFile\n */\n\n\nmodule.exports.getSelectedFiles = () => {\n const panel = DOM.getPanel();\n const selected = DOM.getByClassAll(SELECTED_FILE, panel);\n return Array.from(selected);\n};\n/*\n * unselect all files\n */\n\n\nmodule.exports.unselectFiles = files => {\n files = files || DOM.getSelectedFiles();\n Array.from(files).forEach(DOM.toggleSelectedFile);\n};\n/**\n * get all selected files or current when none selected\n *\n * @currentFile\n */\n\n\nmodule.exports.getActiveFiles = () => {\n const current = DOM.getCurrentFile();\n const files = DOM.getSelectedFiles();\n const name = DOM.getCurrentName(current);\n if (!files.length && name !== '..') return [current];\n return files;\n};\n\nmodule.exports.getCurrentDate = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const date = DOM.getByDataName('js-date', current).textContent;\n return date;\n};\n/**\n * get size\n * @currentFile\n */\n\n\nmodule.exports.getCurrentSize = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n /* если это папка - возвращаем слово dir вместо размера*/\n\n const size = DOM.getByDataName('js-size', current).textContent.replace(/^<|>$/g, '');\n return size;\n};\n/**\n * get size\n * @currentFile\n */\n\n\nmodule.exports.loadCurrentSize = async currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const query = '?size';\n const link = DOM.getCurrentPath(current);\n Images.show.load();\n if (name === '..') return;\n const [, size] = await RESTful.read(link + query);\n DOM.setCurrentSize(size, current);\n Images.hide();\n return current;\n};\n/**\n * load hash\n * @callback\n * @currentFile\n */\n\n\nmodule.exports.loadCurrentHash = async currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const query = '?hash';\n const link = DOM.getCurrentPath(current);\n const [, data] = await RESTful.read(link + query);\n return data;\n};\n/**\n * set size\n * @currentFile\n */\n\n\nmodule.exports.setCurrentSize = (size, currentFile) => {\n const current = currentFile || DOM.getCurrentFile();\n const sizeElement = DOM.getByDataName('js-size', current);\n sizeElement.textContent = size;\n};\n/**\n * @currentFile\n */\n\n\nmodule.exports.getCurrentMode = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const mode = DOM.getByDataName('js-mode', current);\n return mode.textContent;\n};\n/**\n * @currentFile\n */\n\n\nmodule.exports.getCurrentOwner = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const owner = DOM.getByDataName('js-owner', current);\n return owner.textContent;\n};\n/**\n * unified way to get current file content\n *\n * @param currentFile\n */\n\n\nmodule.exports.getCurrentData = async currentFile => {\n const {\n Dialog\n } = DOM;\n const Info = DOM.CurrentInfo;\n const current = currentFile || DOM.getCurrentFile();\n const path = DOM.getCurrentPath(current);\n const isDir = DOM.isCurrentIsDir(current);\n\n if (Info.name === '..') {\n Dialog.alert.noFiles();\n return [Error('No Files')];\n }\n\n if (isDir) return await RESTful.read(path);\n const [hashNew, hash] = await DOM.checkStorageHash(path);\n if (!hashNew) return [Error(`Can't get hash of a file`)];\n if (hash === hashNew) return [null, await Storage.get(`${path}-data`)];\n const [e, data] = await RESTful.read(path);\n if (e) return [e, null];\n const ONE_MEGABYTE = 1024 ** 2 * 1024;\n const {\n length\n } = data;\n if (hash && length < ONE_MEGABYTE) await DOM.saveDataToStorage(path, data, hashNew);\n return [null, data];\n};\n/**\n * unified way to get RefreshButton\n */\n\n\nmodule.exports.getRefreshButton = function () {\n let panel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DOM.getPanel();\n return DOM.getByDataName('js-refresh', panel);\n};\n/**\n * select current file\n * @param currentFile\n */\n\n\nmodule.exports.selectFile = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n current.classList.add(SELECTED_FILE);\n return Cmd;\n};\n\nmodule.exports.unselectFile = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n current.classList.remove(SELECTED_FILE);\n return Cmd;\n};\n\nmodule.exports.toggleSelectedFile = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const name = DOM.getCurrentName(current);\n if (name === '..') return Cmd;\n current.classList.toggle(SELECTED_FILE);\n return Cmd;\n};\n\nmodule.exports.toggleAllSelectedFiles = () => {\n DOM.getAllFiles().map(DOM.toggleSelectedFile);\n return Cmd;\n};\n\nmodule.exports.selectAllFiles = () => {\n DOM.getAllFiles().map(DOM.selectFile);\n return Cmd;\n};\n\nmodule.exports.getAllFiles = () => {\n const panel = DOM.getPanel();\n const files = DOM.getFiles(panel);\n const name = DOM.getCurrentName(files[0]);\n\n const from = a => a === '..' ? 1 : 0;\n\n const i = from(name);\n return Array.from(files).slice(i);\n};\n/**\n * open dialog with expand selection\n */\n\n\nmodule.exports.expandSelection = () => {\n const msg = 'expand';\n const {\n files\n } = CurrentInfo;\n selectByPattern(msg, files);\n};\n/**\n * open dialog with shrink selection\n */\n\n\nmodule.exports.shrinkSelection = () => {\n const msg = 'shrink';\n const {\n files\n } = CurrentInfo;\n selectByPattern(msg, files);\n};\n/**\n * setting history wrapper\n */\n\n\nmodule.exports.setHistory = (data, title, url) => {\n const ret = window.history;\n const {\n prefix\n } = CloudCmd;\n url = prefix + url;\n if (ret) history.pushState(data, title, url);\n return ret;\n};\n/**\n * selected file check\n *\n * @param currentFile\n */\n\n\nmodule.exports.isSelected = selected => {\n if (!selected) return false;\n return DOM.isContainClass(selected, SELECTED_FILE);\n};\n/**\n * get link from current (or param) file\n *\n * @param currentFile - current file by default\n */\n\n\nmodule.exports.getCurrentLink = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const link = DOM.getByTag('a', current);\n return link[0];\n};\n\nmodule.exports.getFilenames = files => {\n if (!files) throw Error('AllFiles could not be empty');\n const first = files[0] || DOM.getCurrentFile();\n const name = DOM.getCurrentName(first);\n const allFiles = Array.from(files);\n if (name === '..') allFiles.shift();\n const names = allFiles.map(current => {\n return DOM.getCurrentName(current);\n });\n return names;\n};\n/**\n * check storage hash\n */\n\n\nmodule.exports.checkStorageHash = async name => {\n const nameHash = name + '-hash';\n if (typeof name !== 'string') throw Error('name should be a string!');\n const [loadHash, storeHash] = await Promise.all([DOM.loadCurrentHash(), Storage.get(nameHash)]);\n return [loadHash, storeHash];\n};\n/**\n * save data to storage\n *\n * @param name\n * @param data\n * @param hash\n * @param callback\n */\n\n\nmodule.exports.saveDataToStorage = async (name, data, hash) => {\n const isDir = DOM.isCurrentIsDir();\n if (isDir) return;\n hash = hash || (await DOM.loadCurrentHash());\n const nameHash = name + '-hash';\n const nameData = name + '-data';\n await Storage.set(nameHash, hash);\n await Storage.set(nameData, data);\n return hash;\n};\n\nmodule.exports.getFM = () => DOM.getPanel().parentElement;\n\nmodule.exports.getPanelPosition = panel => {\n panel = panel || DOM.getPanel();\n return panel.dataset.name.replace('js-', '');\n};\n/** function getting panel active, or passive\n * @param options = {active: true}\n */\n\n\nmodule.exports.getPanel = options => {\n let files;\n let panel;\n let isLeft;\n let dataName = 'js-';\n const current = DOM.getCurrentFile();\n\n if (!current) {\n panel = DOM.getByDataName('js-left');\n } else {\n files = current.parentElement;\n panel = files.parentElement;\n isLeft = panel.getAttribute('data-name') === 'js-left';\n }\n /* if {active : false} getting passive panel */\n\n\n if (options && !options.active) {\n dataName += isLeft ? 'right' : 'left';\n panel = DOM.getByDataName(dataName);\n }\n /* if two panels showed\n * then always work with passive\n * panel\n */\n\n\n if (window.innerWidth < CloudCmd.MIN_ONE_PANEL_WIDTH) panel = DOM.getByDataName('js-left');\n if (!panel) throw Error('can not find Active Panel!');\n return panel;\n};\n\nmodule.exports.getFiles = element => {\n const files = DOM.getByDataName('js-files', element);\n return files.children || [];\n};\n/**\n * shows panel right or left (or active)\n */\n\n\nmodule.exports.showPanel = active => {\n const panel = DOM.getPanel({\n active\n });\n if (!panel) return false;\n DOM.show(panel);\n return true;\n};\n/**\n * hides panel right or left (or active)\n */\n\n\nmodule.exports.hidePanel = active => {\n const panel = DOM.getPanel({\n active\n });\n if (!panel) return false;\n return DOM.hide(panel);\n};\n/**\n * remove child of element\n * @param pChild\n * @param element\n */\n\n\nmodule.exports.remove = (child, element) => {\n const parent = element || document.body;\n parent.removeChild(child);\n return DOM;\n};\n/**\n * remove current file from file table\n * @param current\n *\n */\n\n\nmodule.exports.deleteCurrent = current => {\n if (!current) DOM.getCurrentFile();\n const parent = current === null || current === void 0 ? void 0 : current.parentElement;\n const name = DOM.getCurrentName(current);\n\n if (current && name !== '..') {\n const next = current.nextSibling;\n const prev = current.previousSibling;\n DOM.setCurrentFile(next || prev);\n parent.removeChild(current);\n }\n};\n/**\n * remove selected files from file table\n * @Selected\n */\n\n\nmodule.exports.deleteSelected = selected => {\n selected = selected || DOM.getSelectedFiles();\n if (!selected) return;\n selected.map(DOM.deleteCurrent);\n};\n/**\n * rename current file\n *\n * @currentFile\n */\n\n\nmodule.exports.renameCurrent = renameCurrent;\n/**\n * unified way to scrollIntoViewIfNeeded\n * (native suporte by webkit only)\n * @param element\n * @param center - to scroll as small as possible param should be false\n */\n\nmodule.exports.scrollIntoViewIfNeeded = function (element) {\n let center = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!element || !element.scrollIntoViewIfNeeded) return;\n element.scrollIntoViewIfNeeded(center);\n};\n/* scroll on one page */\n\n\nmodule.exports.scrollByPages = (element, pPages) => {\n const ret = (element === null || element === void 0 ? void 0 : element.scrollByPages) && pPages;\n if (ret) element.scrollByPages(pPages);\n return ret;\n};\n\nmodule.exports.changePanel = () => {\n const Info = CurrentInfo;\n let panel = DOM.getPanel();\n CloudCmd.emit('passive-dir', Info.dirPath);\n const panelPassive = DOM.getPanel({\n active: false\n });\n let name = DOM.getCurrentName();\n const filesPassive = DOM.getFiles(panelPassive);\n let dataName = panel.getAttribute('data-name');\n TabPanel[dataName] = name;\n panel = panelPassive;\n dataName = panel.getAttribute('data-name');\n name = TabPanel[dataName];\n let files;\n let current;\n\n if (name) {\n current = DOM.getCurrentByName(name, panel);\n if (current) files = current.parentElement;\n }\n\n if (!files || !files.parentElement) {\n current = DOM.getCurrentByName(name, panel);\n if (!current) [current] = filesPassive;\n }\n\n DOM.setCurrentFile(current, {\n history: true\n });\n CloudCmd.emit('active-dir', Info.dirPath);\n return DOM;\n};\n\nmodule.exports.getPackerExt = type => {\n if (type === 'zip') return '.zip';\n return '.tar.gz';\n};\n\nmodule.exports.goToDirectory = async () => {\n const msg = 'Go to directory:';\n const {\n Dialog\n } = DOM;\n const {\n dirPath\n } = CurrentInfo;\n const [cancel, path = dirPath] = await Dialog.prompt(msg, dirPath);\n if (cancel) return;\n await CloudCmd.loadDir({\n path\n });\n};\n\nmodule.exports.duplicatePanel = async () => {\n const Info = CurrentInfo;\n const {\n isDir\n } = Info;\n const panel = Info.panelPassive;\n const noCurrent = !Info.isOnePanel;\n\n const getPath = isDir => {\n if (isDir) return Info.path;\n return Info.dirPath;\n };\n\n const path = getPath(isDir);\n await CloudCmd.loadDir({\n path,\n panel,\n noCurrent\n });\n};\n\nmodule.exports.swapPanels = async () => {\n const Info = CurrentInfo;\n const {\n panel,\n files,\n element,\n panelPassive\n } = Info;\n const path = DOM.getCurrentDirPath();\n const dirPathPassive = DOM.getNotCurrentDirPath();\n let currentIndex = files.indexOf(element);\n await CloudCmd.loadDir({\n path,\n panel: panelPassive,\n noCurrent: true\n });\n await CloudCmd.loadDir({\n path: dirPathPassive,\n panel\n });\n const length = Info.files.length - 1;\n if (currentIndex > length) currentIndex = length;\n const el = Info.files[currentIndex];\n DOM.setCurrentFile(el);\n};\n\nmodule.exports.CurrentInfo = CurrentInfo;\n\nmodule.exports.updateCurrentInfo = currentFile => {\n const info = DOM.CurrentInfo;\n const current = currentFile || DOM.getCurrentFile();\n const files = current.parentElement;\n const panelPassive = DOM.getPanel({\n active: false\n });\n const filesPassive = DOM.getFiles(panelPassive);\n const name = DOM.getCurrentName(current);\n info.dir = DOM.getCurrentDirName();\n info.dirPath = DOM.getCurrentDirPath();\n info.parentDirPath = DOM.getParentDirPath();\n info.element = current;\n info.ext = Util.getExt(name);\n info.files = Array.from(files.children);\n info.filesPassive = Array.from(filesPassive);\n info.first = files.firstChild;\n info.getData = DOM.getCurrentData;\n info.last = files.lastChild;\n info.link = DOM.getCurrentLink(current);\n info.mode = DOM.getCurrentMode(current);\n info.name = name;\n info.path = DOM.getCurrentPath(current);\n info.panel = files.parentElement || DOM.getPanel();\n info.panelPassive = panelPassive;\n info.size = DOM.getCurrentSize(current);\n info.isDir = DOM.isCurrentIsDir();\n info.isSelected = DOM.isSelected(current);\n info.panelPosition = DOM.getPanel().dataset.name.replace('js-', '');\n info.isOnePanel = info.panel.getAttribute('data-name') === info.panelPassive.getAttribute('data-name');\n};\n\n//# sourceURL=file://cloudcmd/client/dom/index.js");
119
+ eval("\n\n/* global CloudCmd */\nconst Util = __webpack_require__(/*! ../../common/util */ \"./common/util.js\");\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\nconst RESTful = __webpack_require__(/*! ./rest */ \"./client/dom/rest.js\");\nconst Storage = __webpack_require__(/*! ./storage */ \"./client/dom/storage.js\");\nconst renameCurrent = __webpack_require__(/*! ./operations/rename-current */ \"./client/dom/operations/rename-current.js\");\nconst CurrentFile = __webpack_require__(/*! ./current-file */ \"./client/dom/current-file.js\");\nconst DOMTree = __webpack_require__(/*! ./dom-tree */ \"./client/dom/dom-tree.js\");\nconst Cmd = module.exports;\nconst DOM = {\n ...DOMTree,\n ...CurrentFile,\n ...Cmd\n};\nconst CurrentInfo = {};\nDOM.Images = Images;\nDOM.load = __webpack_require__(/*! ./load */ \"./client/dom/load.js\");\nDOM.Files = __webpack_require__(/*! ./files */ \"./client/dom/files.js\");\nDOM.RESTful = RESTful;\nDOM.IO = __webpack_require__(/*! ./io */ \"./client/dom/io/index.js\");\nDOM.Storage = Storage;\nDOM.Dialog = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\nDOM.CurrentInfo = CurrentInfo;\nmodule.exports = DOM;\nDOM.uploadDirectory = __webpack_require__(/*! ./directory */ \"./client/dom/directory.js\");\nDOM.Buffer = __webpack_require__(/*! ./buffer */ \"./client/dom/buffer.js\");\nDOM.Events = __webpack_require__(/*! ./events */ \"./client/dom/events/index.js\");\nconst loadRemote = __webpack_require__(/*! ./load-remote */ \"./client/dom/load-remote.js\");\nconst selectByPattern = __webpack_require__(/*! ./select-by-pattern */ \"./client/dom/select-by-pattern.js\");\nconst SELECTED_FILE = 'selected-file';\nconst TabPanel = {\n 'js-left': null,\n 'js-right': null\n};\nmodule.exports.loadRemote = (name, options, callback) => {\n loadRemote(name, options, callback);\n return DOM;\n};\nmodule.exports.loadSocket = callback => {\n DOM.loadRemote('socket', {\n name: 'io'\n }, callback);\n return DOM;\n};\n\n/**\n * create new folder\n *\n */\nmodule.exports.promptNewDir = async function () {\n await promptNew('directory');\n};\n\n/**\n * create new file\n *\n * @typeName\n * @type\n */\nmodule.exports.promptNewFile = async () => {\n await promptNew('file');\n};\nasync function promptNew(typeName) {\n const {\n Dialog\n } = DOM;\n const dir = DOM.getCurrentDirPath();\n const msg = 'New ' + typeName || false;\n const getName = () => {\n const name = DOM.getCurrentName();\n if (name === '..') return '';\n return name;\n };\n const name = getName();\n const [cancel, currentName] = await Dialog.prompt(msg, name);\n if (cancel) return;\n const path = `${dir}${currentName}`;\n if (typeName === 'directory') await RESTful.createDirectory(path);else await RESTful.write(path);\n await CloudCmd.refresh({\n currentName\n });\n}\n\n/**\n * get current direcotory name\n */\nmodule.exports.getCurrentDirName = () => {\n const href = DOM.getCurrentDirPath().replace(/\\/$/, '');\n const substr = href.substr(href, href.lastIndexOf('/'));\n const ret = href.replace(substr + '/', '') || '/';\n return ret;\n};\n\n/**\n * get current direcotory path\n */\nmodule.exports.getParentDirPath = panel => {\n const path = DOM.getCurrentDirPath(panel);\n const dirName = DOM.getCurrentDirName() + '/';\n const index = path.lastIndexOf(dirName);\n if (path !== '/') return path.slice(0, index);\n return path;\n};\n\n/**\n * get not current direcotory path\n */\nmodule.exports.getNotCurrentDirPath = () => {\n const panel = DOM.getPanel({\n active: false\n });\n const path = DOM.getCurrentDirPath(panel);\n return path;\n};\n\n/**\n * unified way to get selected files\n *\n * @currentFile\n */\nmodule.exports.getSelectedFiles = () => {\n const panel = DOM.getPanel();\n const selected = DOM.getByClassAll(SELECTED_FILE, panel);\n return Array.from(selected);\n};\n\n/*\n * unselect all files\n */\nmodule.exports.unselectFiles = files => {\n files = files || DOM.getSelectedFiles();\n Array.from(files).forEach(DOM.toggleSelectedFile);\n};\n\n/**\n * get all selected files or current when none selected\n *\n * @currentFile\n */\nmodule.exports.getActiveFiles = () => {\n const current = DOM.getCurrentFile();\n const files = DOM.getSelectedFiles();\n const name = DOM.getCurrentName(current);\n if (!files.length && name !== '..') return [current];\n return files;\n};\nmodule.exports.getCurrentDate = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const date = DOM.getByDataName('js-date', current).textContent;\n return date;\n};\n\n/**\n * get size\n * @currentFile\n */\nmodule.exports.getCurrentSize = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n /* если это папка - возвращаем слово dir вместо размера*/\n const size = DOM.getByDataName('js-size', current).textContent.replace(/^<|>$/g, '');\n return size;\n};\n\n/**\n * get size\n * @currentFile\n */\nmodule.exports.loadCurrentSize = async currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const query = '?size';\n const link = DOM.getCurrentPath(current);\n Images.show.load();\n if (name === '..') return;\n const [, size] = await RESTful.read(link + query);\n DOM.setCurrentSize(size, current);\n Images.hide();\n return current;\n};\n\n/**\n * load hash\n * @callback\n * @currentFile\n */\nmodule.exports.loadCurrentHash = async currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const query = '?hash';\n const link = DOM.getCurrentPath(current);\n const [, data] = await RESTful.read(link + query);\n return data;\n};\n\n/**\n * set size\n * @currentFile\n */\nmodule.exports.setCurrentSize = (size, currentFile) => {\n const current = currentFile || DOM.getCurrentFile();\n const sizeElement = DOM.getByDataName('js-size', current);\n sizeElement.textContent = size;\n};\n\n/**\n * @currentFile\n */\nmodule.exports.getCurrentMode = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const mode = DOM.getByDataName('js-mode', current);\n return mode.textContent;\n};\n\n/**\n * @currentFile\n */\nmodule.exports.getCurrentOwner = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const owner = DOM.getByDataName('js-owner', current);\n return owner.textContent;\n};\n\n/**\n * unified way to get current file content\n *\n * @param currentFile\n */\nmodule.exports.getCurrentData = async currentFile => {\n const {\n Dialog\n } = DOM;\n const Info = DOM.CurrentInfo;\n const current = currentFile || DOM.getCurrentFile();\n const path = DOM.getCurrentPath(current);\n const isDir = DOM.isCurrentIsDir(current);\n if (Info.name === '..') {\n Dialog.alert.noFiles();\n return [Error('No Files')];\n }\n if (isDir) return await RESTful.read(path);\n const [hashNew, hash] = await DOM.checkStorageHash(path);\n if (!hashNew) return [Error(`Can't get hash of a file`)];\n if (hash === hashNew) return [null, await Storage.get(`${path}-data`)];\n const [e, data] = await RESTful.read(path);\n if (e) return [e, null];\n const ONE_MEGABYTE = 1024 ** 2 * 1024;\n const {\n length\n } = data;\n if (hash && length < ONE_MEGABYTE) await DOM.saveDataToStorage(path, data, hashNew);\n return [null, data];\n};\n\n/**\n * unified way to get RefreshButton\n */\nmodule.exports.getRefreshButton = function () {\n let panel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DOM.getPanel();\n return DOM.getByDataName('js-refresh', panel);\n};\n\n/**\n * select current file\n * @param currentFile\n */\nmodule.exports.selectFile = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n current.classList.add(SELECTED_FILE);\n return Cmd;\n};\nmodule.exports.unselectFile = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n current.classList.remove(SELECTED_FILE);\n return Cmd;\n};\nmodule.exports.toggleSelectedFile = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const name = DOM.getCurrentName(current);\n if (name === '..') return Cmd;\n current.classList.toggle(SELECTED_FILE);\n return Cmd;\n};\nmodule.exports.toggleAllSelectedFiles = () => {\n DOM.getAllFiles().map(DOM.toggleSelectedFile);\n return Cmd;\n};\nmodule.exports.selectAllFiles = () => {\n DOM.getAllFiles().map(DOM.selectFile);\n return Cmd;\n};\nmodule.exports.getAllFiles = () => {\n const panel = DOM.getPanel();\n const files = DOM.getFiles(panel);\n const name = DOM.getCurrentName(files[0]);\n const from = a => a === '..' ? 1 : 0;\n const i = from(name);\n return Array.from(files).slice(i);\n};\n\n/**\n * open dialog with expand selection\n */\nmodule.exports.expandSelection = () => {\n const msg = 'expand';\n const {\n files\n } = CurrentInfo;\n selectByPattern(msg, files);\n};\n\n/**\n * open dialog with shrink selection\n */\nmodule.exports.shrinkSelection = () => {\n const msg = 'shrink';\n const {\n files\n } = CurrentInfo;\n selectByPattern(msg, files);\n};\n\n/**\n * setting history wrapper\n */\nmodule.exports.setHistory = (data, title, url) => {\n const ret = window.history;\n const {\n prefix\n } = CloudCmd;\n url = prefix + url;\n if (ret) history.pushState(data, title, url);\n return ret;\n};\n\n/**\n * selected file check\n *\n * @param currentFile\n */\nmodule.exports.isSelected = selected => {\n if (!selected) return false;\n return DOM.isContainClass(selected, SELECTED_FILE);\n};\n\n/**\n * get link from current (or param) file\n *\n * @param currentFile - current file by default\n */\nmodule.exports.getCurrentLink = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const link = DOM.getByTag('a', current);\n return link[0];\n};\nmodule.exports.getFilenames = files => {\n if (!files) throw Error('AllFiles could not be empty');\n const first = files[0] || DOM.getCurrentFile();\n const name = DOM.getCurrentName(first);\n const allFiles = Array.from(files);\n if (name === '..') allFiles.shift();\n const names = allFiles.map(current => {\n return DOM.getCurrentName(current);\n });\n return names;\n};\n\n/**\n * check storage hash\n */\nmodule.exports.checkStorageHash = async name => {\n const nameHash = name + '-hash';\n if (typeof name !== 'string') throw Error('name should be a string!');\n const [loadHash, storeHash] = await Promise.all([DOM.loadCurrentHash(), Storage.get(nameHash)]);\n return [loadHash, storeHash];\n};\n\n/**\n * save data to storage\n *\n * @param name\n * @param data\n * @param hash\n * @param callback\n */\nmodule.exports.saveDataToStorage = async (name, data, hash) => {\n const isDir = DOM.isCurrentIsDir();\n if (isDir) return;\n hash = hash || (await DOM.loadCurrentHash());\n const nameHash = name + '-hash';\n const nameData = name + '-data';\n await Storage.set(nameHash, hash);\n await Storage.set(nameData, data);\n return hash;\n};\nmodule.exports.getFM = () => DOM.getPanel().parentElement;\nmodule.exports.getPanelPosition = panel => {\n panel = panel || DOM.getPanel();\n return panel.dataset.name.replace('js-', '');\n};\n\n/** function getting panel active, or passive\n * @param options = {active: true}\n */\nmodule.exports.getPanel = options => {\n let files;\n let panel;\n let isLeft;\n let dataName = 'js-';\n const current = DOM.getCurrentFile();\n if (!current) {\n panel = DOM.getByDataName('js-left');\n } else {\n files = current.parentElement;\n panel = files.parentElement;\n isLeft = panel.getAttribute('data-name') === 'js-left';\n }\n\n /* if {active : false} getting passive panel */\n if (options && !options.active) {\n dataName += isLeft ? 'right' : 'left';\n panel = DOM.getByDataName(dataName);\n }\n\n /* if two panels showed\n * then always work with passive\n * panel\n */\n if (window.innerWidth < CloudCmd.MIN_ONE_PANEL_WIDTH) panel = DOM.getByDataName('js-left');\n if (!panel) throw Error('can not find Active Panel!');\n return panel;\n};\nmodule.exports.getFiles = element => {\n const files = DOM.getByDataName('js-files', element);\n return files.children || [];\n};\n\n/**\n * shows panel right or left (or active)\n */\nmodule.exports.showPanel = active => {\n const panel = DOM.getPanel({\n active\n });\n if (!panel) return false;\n DOM.show(panel);\n return true;\n};\n\n/**\n * hides panel right or left (or active)\n */\nmodule.exports.hidePanel = active => {\n const panel = DOM.getPanel({\n active\n });\n if (!panel) return false;\n return DOM.hide(panel);\n};\n\n/**\n * remove child of element\n * @param pChild\n * @param element\n */\nmodule.exports.remove = (child, element) => {\n const parent = element || document.body;\n parent.removeChild(child);\n return DOM;\n};\n\n/**\n * remove current file from file table\n * @param current\n *\n */\nmodule.exports.deleteCurrent = current => {\n if (!current) DOM.getCurrentFile();\n const parent = current === null || current === void 0 ? void 0 : current.parentElement;\n const name = DOM.getCurrentName(current);\n if (current && name !== '..') {\n const next = current.nextSibling;\n const prev = current.previousSibling;\n DOM.setCurrentFile(next || prev);\n parent.removeChild(current);\n }\n};\n\n/**\n * remove selected files from file table\n * @Selected\n */\nmodule.exports.deleteSelected = selected => {\n selected = selected || DOM.getSelectedFiles();\n if (!selected) return;\n selected.map(DOM.deleteCurrent);\n};\n\n/**\n * rename current file\n *\n * @currentFile\n */\nmodule.exports.renameCurrent = renameCurrent;\n\n/**\n * unified way to scrollIntoViewIfNeeded\n * (native suporte by webkit only)\n * @param element\n * @param center - to scroll as small as possible param should be false\n */\nmodule.exports.scrollIntoViewIfNeeded = function (element) {\n let center = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!element || !element.scrollIntoViewIfNeeded) return;\n element.scrollIntoViewIfNeeded(center);\n};\n\n/* scroll on one page */\nmodule.exports.scrollByPages = (element, pPages) => {\n const ret = (element === null || element === void 0 ? void 0 : element.scrollByPages) && pPages;\n if (ret) element.scrollByPages(pPages);\n return ret;\n};\nmodule.exports.changePanel = () => {\n const Info = CurrentInfo;\n let panel = DOM.getPanel();\n CloudCmd.emit('passive-dir', Info.dirPath);\n const panelPassive = DOM.getPanel({\n active: false\n });\n let name = DOM.getCurrentName();\n const filesPassive = DOM.getFiles(panelPassive);\n let dataName = panel.getAttribute('data-name');\n TabPanel[dataName] = name;\n panel = panelPassive;\n dataName = panel.getAttribute('data-name');\n name = TabPanel[dataName];\n let files;\n let current;\n if (name) {\n current = DOM.getCurrentByName(name, panel);\n if (current) files = current.parentElement;\n }\n if (!files || !files.parentElement) {\n current = DOM.getCurrentByName(name, panel);\n if (!current) [current] = filesPassive;\n }\n DOM.setCurrentFile(current, {\n history: true\n });\n CloudCmd.emit('active-dir', Info.dirPath);\n return DOM;\n};\nmodule.exports.getPackerExt = type => {\n if (type === 'zip') return '.zip';\n return '.tar.gz';\n};\nmodule.exports.goToDirectory = async () => {\n const msg = 'Go to directory:';\n const {\n Dialog\n } = DOM;\n const {\n dirPath\n } = CurrentInfo;\n const [cancel, path = dirPath] = await Dialog.prompt(msg, dirPath);\n if (cancel) return;\n await CloudCmd.loadDir({\n path\n });\n};\nmodule.exports.duplicatePanel = async () => {\n const Info = CurrentInfo;\n const {\n isDir\n } = Info;\n const panel = Info.panelPassive;\n const noCurrent = !Info.isOnePanel;\n const getPath = isDir => {\n if (isDir) return Info.path;\n return Info.dirPath;\n };\n const path = getPath(isDir);\n await CloudCmd.loadDir({\n path,\n panel,\n noCurrent\n });\n};\nmodule.exports.swapPanels = async () => {\n const Info = CurrentInfo;\n const {\n panel,\n files,\n element,\n panelPassive\n } = Info;\n const path = DOM.getCurrentDirPath();\n const dirPathPassive = DOM.getNotCurrentDirPath();\n let currentIndex = files.indexOf(element);\n await CloudCmd.loadDir({\n path,\n panel: panelPassive,\n noCurrent: true\n });\n await CloudCmd.loadDir({\n path: dirPathPassive,\n panel\n });\n const length = Info.files.length - 1;\n if (currentIndex > length) currentIndex = length;\n const el = Info.files[currentIndex];\n DOM.setCurrentFile(el);\n};\nmodule.exports.CurrentInfo = CurrentInfo;\nmodule.exports.updateCurrentInfo = currentFile => {\n const info = DOM.CurrentInfo;\n const current = currentFile || DOM.getCurrentFile();\n const files = current.parentElement;\n const panelPassive = DOM.getPanel({\n active: false\n });\n const filesPassive = DOM.getFiles(panelPassive);\n const name = DOM.getCurrentName(current);\n info.dir = DOM.getCurrentDirName();\n info.dirPath = DOM.getCurrentDirPath();\n info.parentDirPath = DOM.getParentDirPath();\n info.element = current;\n info.ext = Util.getExt(name);\n info.files = Array.from(files.children);\n info.filesPassive = Array.from(filesPassive);\n info.first = files.firstChild;\n info.getData = DOM.getCurrentData;\n info.last = files.lastChild;\n info.link = DOM.getCurrentLink(current);\n info.mode = DOM.getCurrentMode(current);\n info.name = name;\n info.path = DOM.getCurrentPath(current);\n info.panel = files.parentElement || DOM.getPanel();\n info.panelPassive = panelPassive;\n info.size = DOM.getCurrentSize(current);\n info.isDir = DOM.isCurrentIsDir();\n info.isSelected = DOM.isSelected(current);\n info.panelPosition = DOM.getPanel().dataset.name.replace('js-', '');\n info.isOnePanel = info.panel.getAttribute('data-name') === info.panelPassive.getAttribute('data-name');\n};\n\n//# sourceURL=file://cloudcmd/client/dom/index.js");
120
120
 
121
121
  /***/ }),
122
122
 
@@ -128,7 +128,7 @@ eval("\n/* global CloudCmd */\n\nconst Util = __webpack_require__(/*! ../../comm
128
128
  /***/ (function(module, exports, __webpack_require__) {
129
129
 
130
130
  "use strict";
131
- eval("\n\nconst {\n FS\n} = __webpack_require__(/*! ../../../common/cloudfunc */ \"./common/cloudfunc.js\");\n\nconst sendRequest = __webpack_require__(/*! ./send-request */ \"./client/dom/io/send-request.js\");\n\nconst imgPosition = {\n top: true\n};\n\nmodule.exports.delete = async (url, data) => {\n return await sendRequest({\n method: 'DELETE',\n url: FS + url,\n data,\n imgPosition: {\n top: Boolean(data)\n }\n });\n};\n\nmodule.exports.patch = async (url, data) => {\n return await sendRequest({\n method: 'PATCH',\n url: FS + url,\n data,\n imgPosition\n });\n};\n\nmodule.exports.write = async (url, data) => {\n return await sendRequest({\n method: 'PUT',\n url: FS + url,\n data,\n imgPosition\n });\n};\n\nmodule.exports.createDirectory = async url => {\n return await sendRequest({\n method: 'PUT',\n url: `${FS}${url}?dir`,\n imgPosition\n });\n};\n\nmodule.exports.read = async function (url) {\n let dataType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'text';\n const notLog = !url.includes('?');\n return await sendRequest({\n method: 'GET',\n url: FS + url,\n notLog,\n dataType\n });\n};\n\nmodule.exports.copy = async (from, to, names) => {\n return await sendRequest({\n method: 'PUT',\n url: '/copy',\n data: {\n from,\n to,\n names\n },\n imgPosition\n });\n};\n\nmodule.exports.pack = async data => {\n return await sendRequest({\n method: 'PUT',\n url: '/pack',\n data\n });\n};\n\nmodule.exports.extract = async data => {\n return await sendRequest({\n method: 'PUT',\n url: '/extract',\n data\n });\n};\n\nmodule.exports.move = async (from, to, names) => {\n return await sendRequest({\n method: 'PUT',\n url: '/move',\n data: {\n from,\n to,\n names\n },\n imgPosition\n });\n};\n\nmodule.exports.rename = async (from, to) => {\n return await sendRequest({\n method: 'PUT',\n url: '/rename',\n data: {\n from,\n to\n },\n imgPosition\n });\n};\n\nmodule.exports.Config = {\n read: async () => {\n return await sendRequest({\n method: 'GET',\n url: '/config',\n imgPosition,\n notLog: true\n });\n },\n write: async data => {\n return await sendRequest({\n method: 'PATCH',\n url: '/config',\n data,\n imgPosition\n });\n }\n};\nmodule.exports.Markdown = {\n read: async url => {\n return await sendRequest({\n method: 'GET',\n url: '/markdown' + url,\n imgPosition,\n notLog: true\n });\n },\n render: async data => {\n return await sendRequest({\n method: 'PUT',\n url: '/markdown',\n data,\n imgPosition,\n notLog: true\n });\n }\n};\n\n//# sourceURL=file://cloudcmd/client/dom/io/index.js");
131
+ eval("\n\nconst {\n FS\n} = __webpack_require__(/*! ../../../common/cloudfunc */ \"./common/cloudfunc.js\");\nconst sendRequest = __webpack_require__(/*! ./send-request */ \"./client/dom/io/send-request.js\");\nconst imgPosition = {\n top: true\n};\nmodule.exports.delete = async (url, data) => {\n return await sendRequest({\n method: 'DELETE',\n url: FS + url,\n data,\n imgPosition: {\n top: Boolean(data)\n }\n });\n};\nmodule.exports.patch = async (url, data) => {\n return await sendRequest({\n method: 'PATCH',\n url: FS + url,\n data,\n imgPosition\n });\n};\nmodule.exports.write = async (url, data) => {\n return await sendRequest({\n method: 'PUT',\n url: FS + url,\n data,\n imgPosition\n });\n};\nmodule.exports.createDirectory = async url => {\n return await sendRequest({\n method: 'PUT',\n url: `${FS}${url}?dir`,\n imgPosition\n });\n};\nmodule.exports.read = async function (url) {\n let dataType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'text';\n const notLog = !url.includes('?');\n return await sendRequest({\n method: 'GET',\n url: FS + url,\n notLog,\n dataType\n });\n};\nmodule.exports.copy = async (from, to, names) => {\n return await sendRequest({\n method: 'PUT',\n url: '/copy',\n data: {\n from,\n to,\n names\n },\n imgPosition\n });\n};\nmodule.exports.pack = async data => {\n return await sendRequest({\n method: 'PUT',\n url: '/pack',\n data\n });\n};\nmodule.exports.extract = async data => {\n return await sendRequest({\n method: 'PUT',\n url: '/extract',\n data\n });\n};\nmodule.exports.move = async (from, to, names) => {\n return await sendRequest({\n method: 'PUT',\n url: '/move',\n data: {\n from,\n to,\n names\n },\n imgPosition\n });\n};\nmodule.exports.rename = async (from, to) => {\n return await sendRequest({\n method: 'PUT',\n url: '/rename',\n data: {\n from,\n to\n },\n imgPosition\n });\n};\nmodule.exports.Config = {\n read: async () => {\n return await sendRequest({\n method: 'GET',\n url: '/config',\n imgPosition,\n notLog: true\n });\n },\n write: async data => {\n return await sendRequest({\n method: 'PATCH',\n url: '/config',\n data,\n imgPosition\n });\n }\n};\nmodule.exports.Markdown = {\n read: async url => {\n return await sendRequest({\n method: 'GET',\n url: '/markdown' + url,\n imgPosition,\n notLog: true\n });\n },\n render: async data => {\n return await sendRequest({\n method: 'PUT',\n url: '/markdown',\n data,\n imgPosition,\n notLog: true\n });\n }\n};\n\n//# sourceURL=file://cloudcmd/client/dom/io/index.js");
132
132
 
133
133
  /***/ }),
134
134
 
@@ -140,7 +140,7 @@ eval("\n\nconst {\n FS\n} = __webpack_require__(/*! ../../../common/cloudfunc *
140
140
  /***/ (function(module, exports, __webpack_require__) {
141
141
 
142
142
  "use strict";
143
- eval("\n/* global CloudCmd */\n\nconst {\n promisify\n} = __webpack_require__(/*! es6-promisify */ \"./node_modules/es6-promisify/dist/promisify.mjs\");\n\nconst Images = __webpack_require__(/*! ../images */ \"./client/dom/images.js\");\n\nconst load = __webpack_require__(/*! ../load */ \"./client/dom/load.js\");\n\nmodule.exports = promisify((params, callback) => {\n const p = params;\n const {\n prefixURL\n } = CloudCmd;\n p.url = prefixURL + p.url;\n p.url = encodeURI(p.url);\n p.url = replaceHash(p.url);\n load.ajax({\n method: p.method,\n url: p.url,\n data: p.data,\n dataType: p.dataType,\n error: jqXHR => {\n const response = jqXHR.responseText;\n const {\n statusText,\n status\n } = jqXHR;\n const text = status === 404 ? response : statusText;\n callback(Error(text));\n },\n success: data => {\n Images.hide();\n if (!p.notLog) CloudCmd.log(data);\n callback(null, data);\n }\n });\n});\nmodule.exports._replaceHash = replaceHash;\n\nfunction replaceHash(url) {\n /*\n * if we send ajax request -\n * no need in hash so we escape #\n */\n return url.replace(/#/g, '%23');\n}\n\n//# sourceURL=file://cloudcmd/client/dom/io/send-request.js");
143
+ eval("\n\n/* global CloudCmd */\nconst {\n promisify\n} = __webpack_require__(/*! es6-promisify */ \"./node_modules/es6-promisify/dist/promisify.mjs\");\nconst Images = __webpack_require__(/*! ../images */ \"./client/dom/images.js\");\nconst load = __webpack_require__(/*! ../load */ \"./client/dom/load.js\");\nmodule.exports = promisify((params, callback) => {\n const p = params;\n const {\n prefixURL\n } = CloudCmd;\n p.url = prefixURL + p.url;\n p.url = encodeURI(p.url);\n p.url = replaceHash(p.url);\n load.ajax({\n method: p.method,\n url: p.url,\n data: p.data,\n dataType: p.dataType,\n error: jqXHR => {\n const response = jqXHR.responseText;\n const {\n statusText,\n status\n } = jqXHR;\n const text = status === 404 ? response : statusText;\n callback(Error(text));\n },\n success: data => {\n Images.hide();\n if (!p.notLog) CloudCmd.log(data);\n callback(null, data);\n }\n });\n});\nmodule.exports._replaceHash = replaceHash;\nfunction replaceHash(url) {\n /*\n * if we send ajax request -\n * no need in hash so we escape #\n */\n return url.replace(/#/g, '%23');\n}\n\n//# sourceURL=file://cloudcmd/client/dom/io/send-request.js");
144
144
 
145
145
  /***/ }),
146
146
 
@@ -152,7 +152,7 @@ eval("\n/* global CloudCmd */\n\nconst {\n promisify\n} = __webpack_require__(/
152
152
  /***/ (function(module, exports, __webpack_require__) {
153
153
 
154
154
  "use strict";
155
- eval("\n/* global CloudCmd */\n\nconst rendy = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n\nconst load = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n\nconst {\n findObjByNameInArr\n} = __webpack_require__(/*! ../../common/util */ \"./common/util.js\");\n\nconst Files = __webpack_require__(/*! ./files */ \"./client/dom/files.js\");\n\nmodule.exports = function (name, options) {\n let callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : options;\n const {\n prefix,\n config\n } = CloudCmd;\n const o = options;\n if (o.name && window[o.name]) return callback();\n Files.get('modules').then(async modules => {\n const online = config('online') && navigator.onLine;\n const module = findObjByNameInArr(modules.remote, name);\n const isArray = itype.array(module.local);\n const {\n version\n } = module;\n let remoteTmpls;\n let local;\n\n if (isArray) {\n remoteTmpls = module.remote;\n local = module.local;\n } else {\n remoteTmpls = [module.remote];\n local = [module.local];\n }\n\n const localURL = local.map(url => prefix + url);\n const remoteURL = remoteTmpls.map(tmpl => {\n return rendy(tmpl, {\n version\n });\n });\n\n if (online) {\n const [e] = await tryToCatch(load.parallel, remoteURL);\n if (!e) return callback();\n }\n\n const [e] = await tryToCatch(load.parallel, localURL);\n callback(e);\n });\n};\n\n//# sourceURL=file://cloudcmd/client/dom/load-remote.js");
155
+ eval("\n\n/* global CloudCmd */\nconst rendy = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\nconst load = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\nconst {\n findObjByNameInArr\n} = __webpack_require__(/*! ../../common/util */ \"./common/util.js\");\nconst Files = __webpack_require__(/*! ./files */ \"./client/dom/files.js\");\nmodule.exports = function (name, options) {\n let callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : options;\n const {\n prefix,\n config\n } = CloudCmd;\n const o = options;\n if (o.name && window[o.name]) return callback();\n Files.get('modules').then(async modules => {\n const online = config('online') && navigator.onLine;\n const module = findObjByNameInArr(modules.remote, name);\n const isArray = itype.array(module.local);\n const {\n version\n } = module;\n let remoteTmpls;\n let local;\n if (isArray) {\n remoteTmpls = module.remote;\n local = module.local;\n } else {\n remoteTmpls = [module.remote];\n local = [module.local];\n }\n const localURL = local.map(url => prefix + url);\n const remoteURL = remoteTmpls.map(tmpl => {\n return rendy(tmpl, {\n version\n });\n });\n if (online) {\n const [e] = await tryToCatch(load.parallel, remoteURL);\n if (!e) return callback();\n }\n const [e] = await tryToCatch(load.parallel, localURL);\n callback(e);\n });\n};\n\n//# sourceURL=file://cloudcmd/client/dom/load-remote.js");
156
156
 
157
157
  /***/ }),
158
158
 
@@ -164,7 +164,7 @@ eval("\n/* global CloudCmd */\n\nconst rendy = __webpack_require__(/*! rendy */
164
164
  /***/ (function(module, exports, __webpack_require__) {
165
165
 
166
166
  "use strict";
167
- eval("\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n\nconst jonny = __webpack_require__(/*! jonny */ \"./node_modules/jonny/lib/jonny.js\");\n\nconst Emitify = __webpack_require__(/*! emitify */ \"./node_modules/emitify/lib/emitify.js\");\n\nconst exec = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nmodule.exports.getIdBySrc = getIdBySrc;\n/**\n * Function gets id by src\n * @param src\n *\n * Example: http://domain.com/1.js -> 1_js\n */\n\nfunction getIdBySrc(src) {\n const isStr = itype.string(src);\n if (!isStr) return;\n if (src.includes(':')) src += '-join';\n const num = src.lastIndexOf('/') + 1;\n const sub = src.substr(src, num);\n const id = src.replace(sub, '').replace(/\\./g, '-');\n return id;\n}\n/**\n * load file countent via ajax\n *\n * @param params\n */\n\n\nmodule.exports.ajax = params => {\n const p = params;\n const isObject = itype.object(p.data);\n const isArray = itype.array(p.data);\n const isArrayBuf = itype(p.data) === 'arraybuffer';\n const type = p.type || p.method || 'GET';\n const {\n headers = {}\n } = p;\n const xhr = new XMLHttpRequest();\n xhr.open(type, p.url, true);\n\n for (const name of Object.keys(headers)) {\n const value = headers[name];\n xhr.setRequestHeader(name, value);\n }\n\n if (p.responseType) xhr.responseType = p.responseType;\n let data;\n if (!isArrayBuf && isObject || isArray) data = jonny.stringify(p.data);else data = p.data;\n\n xhr.onreadystatechange = event => {\n const xhr = event.target;\n const OK = 200;\n if (xhr.readyState !== xhr.DONE) return;\n Images.clearProgress();\n const TYPE_JSON = 'application/json';\n const type = xhr.getResponseHeader('content-type');\n if (xhr.status !== OK) return exec(p.error, xhr);\n const notText = p.dataType !== 'text';\n const isContain = type.includes(TYPE_JSON);\n let data = xhr.response;\n if (type && isContain && notText) data = jonny.parse(xhr.response) || xhr.response;\n exec(p.success, data, xhr.statusText, xhr);\n };\n\n xhr.send(data);\n};\n\nmodule.exports.put = (url, body) => {\n const emitter = Emitify();\n const xhr = new XMLHttpRequest();\n url = encodeURI(url).replace(/#/g, '%23');\n xhr.open('put', url, true);\n\n xhr.upload.onprogress = event => {\n if (!event.lengthComputable) return;\n const percent = event.loaded / event.total * 100;\n const count = Math.round(percent);\n emitter.emit('progress', count);\n };\n\n xhr.onreadystatechange = () => {\n const over = xhr.readyState === xhr.DONE;\n const OK = 200;\n if (!over) return;\n\n if (xhr.status === OK) {\n emitter.emit('progress', 100);\n return emitter.emit('end');\n }\n\n const error = Error(xhr.responseText);\n emitter.emit('error', error);\n };\n\n xhr.send(body);\n return emitter;\n};\n\n//# sourceURL=file://cloudcmd/client/dom/load.js");
167
+ eval("\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\nconst jonny = __webpack_require__(/*! jonny */ \"./node_modules/jonny/lib/jonny.js\");\nconst Emitify = __webpack_require__(/*! emitify */ \"./node_modules/emitify/lib/emitify.js\");\nconst exec = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\nmodule.exports.getIdBySrc = getIdBySrc;\n\n/**\n * Function gets id by src\n * @param src\n *\n * Example: http://domain.com/1.js -> 1_js\n */\nfunction getIdBySrc(src) {\n const isStr = itype.string(src);\n if (!isStr) return;\n if (src.includes(':')) src += '-join';\n const num = src.lastIndexOf('/') + 1;\n const sub = src.substr(src, num);\n const id = src.replace(sub, '').replace(/\\./g, '-');\n return id;\n}\n\n/**\n * load file countent via ajax\n *\n * @param params\n */\nmodule.exports.ajax = params => {\n const p = params;\n const isObject = itype.object(p.data);\n const isArray = itype.array(p.data);\n const isArrayBuf = itype(p.data) === 'arraybuffer';\n const type = p.type || p.method || 'GET';\n const {\n headers = {}\n } = p;\n const xhr = new XMLHttpRequest();\n xhr.open(type, p.url, true);\n for (const name of Object.keys(headers)) {\n const value = headers[name];\n xhr.setRequestHeader(name, value);\n }\n if (p.responseType) xhr.responseType = p.responseType;\n let data;\n if (!isArrayBuf && isObject || isArray) data = jonny.stringify(p.data);else data = p.data;\n xhr.onreadystatechange = event => {\n const xhr = event.target;\n const OK = 200;\n if (xhr.readyState !== xhr.DONE) return;\n Images.clearProgress();\n const TYPE_JSON = 'application/json';\n const type = xhr.getResponseHeader('content-type');\n if (xhr.status !== OK) return exec(p.error, xhr);\n const notText = p.dataType !== 'text';\n const isContain = type.includes(TYPE_JSON);\n let data = xhr.response;\n if (type && isContain && notText) data = jonny.parse(xhr.response) || xhr.response;\n exec(p.success, data, xhr.statusText, xhr);\n };\n xhr.send(data);\n};\nmodule.exports.put = (url, body) => {\n const emitter = Emitify();\n const xhr = new XMLHttpRequest();\n url = encodeURI(url).replace(/#/g, '%23');\n xhr.open('put', url, true);\n xhr.upload.onprogress = event => {\n if (!event.lengthComputable) return;\n const percent = event.loaded / event.total * 100;\n const count = Math.round(percent);\n emitter.emit('progress', count);\n };\n xhr.onreadystatechange = () => {\n const over = xhr.readyState === xhr.DONE;\n const OK = 200;\n if (!over) return;\n if (xhr.status === OK) {\n emitter.emit('progress', 100);\n return emitter.emit('end');\n }\n const error = Error(xhr.responseText);\n emitter.emit('error', error);\n };\n xhr.send(body);\n return emitter;\n};\n\n//# sourceURL=file://cloudcmd/client/dom/load.js");
168
168
 
169
169
  /***/ }),
170
170
 
@@ -176,7 +176,7 @@ eval("\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/
176
176
  /***/ (function(module, exports, __webpack_require__) {
177
177
 
178
178
  "use strict";
179
- eval("\n/* global CloudCmd */\n\nconst capitalize = __webpack_require__(/*! just-capitalize */ \"./node_modules/just-capitalize/index.js\");\n\nconst Dialog = __webpack_require__(/*! ../dialog */ \"./client/dom/dialog.js\");\n\nconst Storage = __webpack_require__(/*! ../storage */ \"./client/dom/storage.js\");\n\nconst RESTful = __webpack_require__(/*! ../rest */ \"./client/dom/rest.js\");\n\nconst {\n isCurrentFile,\n getCurrentName,\n getCurrentFile,\n getCurrentByName,\n getCurrentType,\n getCurrentDirPath,\n setCurrentName\n} = __webpack_require__(/*! ../current-file */ \"./client/dom/current-file.js\");\n\nmodule.exports = async current => {\n if (!isCurrentFile(current)) current = getCurrentFile();\n const from = getCurrentName(current);\n if (from === '..') return Dialog.alert.noFiles();\n const [cancel, to] = await Dialog.prompt('Rename', from);\n if (cancel) return;\n const nextFile = getCurrentByName(to);\n\n if (nextFile) {\n const type = getCurrentType(nextFile);\n const msg = `${capitalize(type)} \"${to}\" already exists. Proceed?`;\n const [cancel] = await Dialog.confirm(msg);\n if (cancel) return;\n }\n\n if (from === to) return;\n const dirPath = getCurrentDirPath();\n const fromFull = `${dirPath}${from}`;\n const toFull = `${dirPath}${to}`;\n const [e] = await RESTful.rename(fromFull, toFull);\n if (e) return;\n setCurrentName(to, current);\n Storage.remove(dirPath);\n CloudCmd.refresh();\n};\n\n//# sourceURL=file://cloudcmd/client/dom/operations/rename-current.js");
179
+ eval("\n\n/* global CloudCmd */\nconst capitalize = __webpack_require__(/*! just-capitalize */ \"./node_modules/just-capitalize/index.js\");\nconst Dialog = __webpack_require__(/*! ../dialog */ \"./client/dom/dialog.js\");\nconst Storage = __webpack_require__(/*! ../storage */ \"./client/dom/storage.js\");\nconst RESTful = __webpack_require__(/*! ../rest */ \"./client/dom/rest.js\");\nconst {\n isCurrentFile,\n getCurrentName,\n getCurrentFile,\n getCurrentByName,\n getCurrentType,\n getCurrentDirPath,\n setCurrentName\n} = __webpack_require__(/*! ../current-file */ \"./client/dom/current-file.js\");\nmodule.exports = async current => {\n if (!isCurrentFile(current)) current = getCurrentFile();\n const from = getCurrentName(current);\n if (from === '..') return Dialog.alert.noFiles();\n const [cancel, to] = await Dialog.prompt('Rename', from);\n if (cancel) return;\n const nextFile = getCurrentByName(to);\n if (nextFile) {\n const type = getCurrentType(nextFile);\n const msg = `${capitalize(type)} \"${to}\" already exists. Proceed?`;\n const [cancel] = await Dialog.confirm(msg);\n if (cancel) return;\n }\n if (from === to) return;\n const dirPath = getCurrentDirPath();\n const fromFull = `${dirPath}${from}`;\n const toFull = `${dirPath}${to}`;\n const [e] = await RESTful.rename(fromFull, toFull);\n if (e) return;\n setCurrentName(to, current);\n Storage.remove(dirPath);\n CloudCmd.refresh();\n};\n\n//# sourceURL=file://cloudcmd/client/dom/operations/rename-current.js");
180
180
 
181
181
  /***/ }),
182
182
 
@@ -188,7 +188,7 @@ eval("\n/* global CloudCmd */\n\nconst capitalize = __webpack_require__(/*! just
188
188
  /***/ (function(module, exports, __webpack_require__) {
189
189
 
190
190
  "use strict";
191
- eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n\nconst {\n encode\n} = __webpack_require__(/*! ../../common/entity */ \"./common/entity.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nconst IO = __webpack_require__(/*! ./io */ \"./client/dom/io/index.js\");\n\nconst Dialog = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\n\nconst handleError = promise => async function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n const [e, data] = await tryToCatch(promise, ...args);\n if (!e) return [e, data];\n const encoded = encode(e.message);\n Images.show.error(encoded);\n Dialog.alert(encoded);\n return [e, data];\n};\n\nmodule.exports.delete = handleError(IO.delete);\nmodule.exports.patch = handleError(IO.patch);\nmodule.exports.write = handleError(IO.write);\nmodule.exports.createDirectory = handleError(IO.createDirectory);\nmodule.exports.read = handleError(IO.read);\nmodule.exports.copy = handleError(IO.copy);\nmodule.exports.pack = handleError(IO.pack);\nmodule.exports.extract = handleError(IO.extract);\nmodule.exports.move = handleError(IO.move);\nmodule.exports.rename = handleError(IO.rename);\nmodule.exports.Config = {\n read: handleError(IO.Config.read),\n write: handleError(IO.Config.write)\n};\nmodule.exports.Markdown = {\n read: handleError(IO.Markdown.read),\n render: handleError(IO.Markdown.render)\n};\n\n//# sourceURL=file://cloudcmd/client/dom/rest.js");
191
+ eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\nconst {\n encode\n} = __webpack_require__(/*! ../../common/entity */ \"./common/entity.js\");\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\nconst IO = __webpack_require__(/*! ./io */ \"./client/dom/io/index.js\");\nconst Dialog = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\nconst handleError = promise => async function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n const [e, data] = await tryToCatch(promise, ...args);\n if (!e) return [e, data];\n const encoded = encode(e.message);\n Images.show.error(encoded);\n Dialog.alert(encoded);\n return [e, data];\n};\nmodule.exports.delete = handleError(IO.delete);\nmodule.exports.patch = handleError(IO.patch);\nmodule.exports.write = handleError(IO.write);\nmodule.exports.createDirectory = handleError(IO.createDirectory);\nmodule.exports.read = handleError(IO.read);\nmodule.exports.copy = handleError(IO.copy);\nmodule.exports.pack = handleError(IO.pack);\nmodule.exports.extract = handleError(IO.extract);\nmodule.exports.move = handleError(IO.move);\nmodule.exports.rename = handleError(IO.rename);\nmodule.exports.Config = {\n read: handleError(IO.Config.read),\n write: handleError(IO.Config.write)\n};\nmodule.exports.Markdown = {\n read: handleError(IO.Markdown.read),\n render: handleError(IO.Markdown.render)\n};\n\n//# sourceURL=file://cloudcmd/client/dom/rest.js");
192
192
 
193
193
  /***/ }),
194
194
 
@@ -200,7 +200,7 @@ eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_mo
200
200
  /***/ (function(module, exports, __webpack_require__) {
201
201
 
202
202
  "use strict";
203
- eval("\n\nlet SelectType = '*.*';\n\nconst {\n getRegExp\n} = __webpack_require__(/*! ../../common/util */ \"./common/util.js\");\n\nconst {\n alert,\n prompt\n} = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\n\nconst DOM = __webpack_require__(/*! . */ \"./client/dom/index.js\");\n\nmodule.exports = async (msg, files) => {\n if (!files) return;\n const allMsg = `Specify file type for ${msg} selection`;\n /* eslint require-atomic-updates: 0 */\n\n const [cancel, type] = await prompt(allMsg, SelectType);\n if (cancel) return;\n SelectType = type;\n const regExp = getRegExp(type);\n let matches = 0;\n\n for (const current of files) {\n const name = DOM.getCurrentName(current);\n if (name === '..' || !regExp.test(name)) continue;\n ++matches;\n let isSelected = DOM.isSelected(current);\n const shouldSel = msg === 'expand';\n if (shouldSel) isSelected = !isSelected;\n if (isSelected) DOM.toggleSelectedFile(current);\n }\n\n if (!matches) alert('No matches found!');\n};\n\n//# sourceURL=file://cloudcmd/client/dom/select-by-pattern.js");
203
+ eval("\n\nlet SelectType = '*.*';\nconst {\n getRegExp\n} = __webpack_require__(/*! ../../common/util */ \"./common/util.js\");\nconst {\n alert,\n prompt\n} = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\nconst DOM = __webpack_require__(/*! . */ \"./client/dom/index.js\");\nmodule.exports = async (msg, files) => {\n if (!files) return;\n const allMsg = `Specify file type for ${msg} selection`;\n\n /* eslint require-atomic-updates: 0 */\n const [cancel, type] = await prompt(allMsg, SelectType);\n if (cancel) return;\n SelectType = type;\n const regExp = getRegExp(type);\n let matches = 0;\n for (const current of files) {\n const name = DOM.getCurrentName(current);\n if (name === '..' || !regExp.test(name)) continue;\n ++matches;\n let isSelected = DOM.isSelected(current);\n const shouldSel = msg === 'expand';\n if (shouldSel) isSelected = !isSelected;\n if (isSelected) DOM.toggleSelectedFile(current);\n }\n if (!matches) alert('No matches found!');\n};\n\n//# sourceURL=file://cloudcmd/client/dom/select-by-pattern.js");
204
204
 
205
205
  /***/ }),
206
206
 
@@ -212,7 +212,7 @@ eval("\n\nlet SelectType = '*.*';\n\nconst {\n getRegExp\n} = __webpack_require
212
212
  /***/ (function(module, exports, __webpack_require__) {
213
213
 
214
214
  "use strict";
215
- eval("\n\nconst {\n parse,\n stringify\n} = JSON;\n\nmodule.exports.set = async (name, data) => {\n localStorage.setItem(name, data);\n};\n\nmodule.exports.setJson = async (name, data) => {\n localStorage.setItem(name, stringify(data));\n};\n\nmodule.exports.get = async name => {\n return localStorage.getItem(name);\n};\n\nmodule.exports.getJson = async name => {\n const data = localStorage.getItem(name);\n return parse(data);\n};\n\nmodule.exports.clear = () => {\n localStorage.clear();\n};\n\nmodule.exports.remove = item => {\n localStorage.removeItem(item);\n};\n\n//# sourceURL=file://cloudcmd/client/dom/storage.js");
215
+ eval("\n\nconst {\n parse,\n stringify\n} = JSON;\nmodule.exports.set = async (name, data) => {\n localStorage.setItem(name, data);\n};\nmodule.exports.setJson = async (name, data) => {\n localStorage.setItem(name, stringify(data));\n};\nmodule.exports.get = async name => {\n return localStorage.getItem(name);\n};\nmodule.exports.getJson = async name => {\n const data = localStorage.getItem(name);\n return parse(data);\n};\nmodule.exports.clear = () => {\n localStorage.clear();\n};\nmodule.exports.remove = item => {\n localStorage.removeItem(item);\n};\n\n//# sourceURL=file://cloudcmd/client/dom/storage.js");
216
216
 
217
217
  /***/ }),
218
218
 
@@ -224,7 +224,7 @@ eval("\n\nconst {\n parse,\n stringify\n} = JSON;\n\nmodule.exports.set = asyn
224
224
  /***/ (function(module, exports, __webpack_require__) {
225
225
 
226
226
  "use strict";
227
- eval("\n/* global CloudCmd */\n\nconst {\n eachSeries\n} = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\n\nconst wraptile = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n\nconst load = __webpack_require__(/*! ./load */ \"./client/dom/load.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nconst {\n alert\n} = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\n\nconst {\n FS\n} = __webpack_require__(/*! ../../common/cloudfunc */ \"./common/cloudfunc.js\");\n\nconst {\n getCurrentDirPath: getPathWhenRootEmpty\n} = __webpack_require__(/*! . */ \"./client/dom/index.js\");\n\nconst loadFile = wraptile(_loadFile);\nconst onEnd = wraptile(_onEnd);\n\nmodule.exports = (dir, files) => {\n if (!files) {\n files = dir;\n dir = getPathWhenRootEmpty();\n }\n\n const n = files.length;\n if (!n) return;\n const array = Array.from(files);\n const {\n name\n } = files[0];\n eachSeries(array, loadFile(dir, n), onEnd(name));\n};\n\nfunction _onEnd(currentName) {\n CloudCmd.refresh({\n currentName\n });\n}\n\nfunction _loadFile(dir, n, file, callback) {\n let i = 0;\n const {\n name\n } = file;\n const path = dir + name;\n const {\n prefixURL\n } = CloudCmd;\n const api = prefixURL + FS;\n\n const percent = function (i, n) {\n let per = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\n return Math.round(i * per / n);\n };\n\n const step = n => 100 / n;\n\n ++i;\n load.put(api + path, file).on('error', showError).on('end', callback).on('progress', count => {\n const max = step(n);\n const value = (i - 1) * max + percent(count, 100, max);\n Images.show.load('top');\n Images.setProgress(Math.round(value));\n });\n}\n\nfunction showError(_ref) {\n let {\n message\n } = _ref;\n alert(message);\n}\n\n//# sourceURL=file://cloudcmd/client/dom/upload-files.js");
227
+ eval("\n\n/* global CloudCmd */\nconst {\n eachSeries\n} = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\nconst wraptile = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\nconst load = __webpack_require__(/*! ./load */ \"./client/dom/load.js\");\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\nconst {\n alert\n} = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\nconst {\n FS\n} = __webpack_require__(/*! ../../common/cloudfunc */ \"./common/cloudfunc.js\");\nconst {\n getCurrentDirPath: getPathWhenRootEmpty\n} = __webpack_require__(/*! . */ \"./client/dom/index.js\");\nconst loadFile = wraptile(_loadFile);\nconst onEnd = wraptile(_onEnd);\nmodule.exports = (dir, files) => {\n if (!files) {\n files = dir;\n dir = getPathWhenRootEmpty();\n }\n const n = files.length;\n if (!n) return;\n const array = Array.from(files);\n const {\n name\n } = files[0];\n eachSeries(array, loadFile(dir, n), onEnd(name));\n};\nfunction _onEnd(currentName) {\n CloudCmd.refresh({\n currentName\n });\n}\nfunction _loadFile(dir, n, file, callback) {\n let i = 0;\n const {\n name\n } = file;\n const path = dir + name;\n const {\n prefixURL\n } = CloudCmd;\n const api = prefixURL + FS;\n const percent = function (i, n) {\n let per = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\n return Math.round(i * per / n);\n };\n const step = n => 100 / n;\n ++i;\n load.put(api + path, file).on('error', showError).on('end', callback).on('progress', count => {\n const max = step(n);\n const value = (i - 1) * max + percent(count, 100, max);\n Images.show.load('top');\n Images.setProgress(Math.round(value));\n });\n}\nfunction showError(_ref) {\n let {\n message\n } = _ref;\n alert(message);\n}\n\n//# sourceURL=file://cloudcmd/client/dom/upload-files.js");
228
228
 
229
229
  /***/ }),
230
230
 
@@ -236,7 +236,7 @@ eval("\n/* global CloudCmd */\n\nconst {\n eachSeries\n} = __webpack_require__(
236
236
  /***/ (function(module, exports, __webpack_require__) {
237
237
 
238
238
  "use strict";
239
- eval("\n\nmodule.exports = {\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n CAPSLOCK: 20,\n ESC: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n INSERT: 45,\n DELETE: 46,\n ZERO: 48,\n SEMICOLON: 52,\n A: 65,\n C: 67,\n D: 68,\n G: 71,\n J: 74,\n K: 75,\n M: 77,\n O: 79,\n P: 80,\n Q: 81,\n R: 82,\n S: 83,\n T: 84,\n U: 85,\n V: 86,\n X: 88,\n Z: 90,\n INSERT_MAC: 96,\n ASTERISK: 106,\n PLUS: 107,\n MINUS: 109,\n F1: 112,\n F2: 113,\n F3: 114,\n F4: 115,\n F5: 116,\n F6: 117,\n F7: 118,\n F8: 119,\n F9: 120,\n F10: 121,\n COLON: 186,\n EQUAL: 187,\n HYPHEN: 189,\n DOT: 190,\n SLASH: 191,\n TRA: 192,\n\n /* Typewritten Reverse Apostrophe (`) */\n BACKSLASH: 220,\n BRACKET_CLOSE: 221\n};\n\n//# sourceURL=file://cloudcmd/client/key/key.js");
239
+ eval("\n\nmodule.exports = {\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n CAPSLOCK: 20,\n ESC: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n INSERT: 45,\n DELETE: 46,\n ZERO: 48,\n SEMICOLON: 52,\n A: 65,\n C: 67,\n D: 68,\n G: 71,\n J: 74,\n K: 75,\n M: 77,\n O: 79,\n P: 80,\n Q: 81,\n R: 82,\n S: 83,\n T: 84,\n U: 85,\n V: 86,\n X: 88,\n Z: 90,\n INSERT_MAC: 96,\n ASTERISK: 106,\n PLUS: 107,\n MINUS: 109,\n F1: 112,\n F2: 113,\n F3: 114,\n F4: 115,\n F5: 116,\n F6: 117,\n F7: 118,\n F8: 119,\n F9: 120,\n F10: 121,\n COLON: 186,\n EQUAL: 187,\n HYPHEN: 189,\n DOT: 190,\n SLASH: 191,\n TRA: 192,\n /* Typewritten Reverse Apostrophe (`) */\n BACKSLASH: 220,\n BRACKET_CLOSE: 221\n};\n\n//# sourceURL=file://cloudcmd/client/key/key.js");
240
240
 
241
241
  /***/ }),
242
242
 
@@ -248,7 +248,7 @@ eval("\n\nmodule.exports = {\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n CAPSLO
248
248
  /***/ (function(module, exports, __webpack_require__) {
249
249
 
250
250
  "use strict";
251
- eval("/* WEBPACK VAR INJECTION */(function(Buffer) {\n\nmodule.exports.btoa = str => {\n if (typeof btoa === 'function') return btoa(str);\n return Buffer.from(str).toString('base64');\n};\n\nmodule.exports.atob = str => {\n if (typeof atob === 'function') return atob(str);\n return Buffer.from(str, 'base64').toString('binary');\n};\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node_modules/node-libs-browser/node_modules/buffer/index.js */ \"./node_modules/node-libs-browser/node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=file://cloudcmd/common/base64.js");
251
+ eval("/* WEBPACK VAR INJECTION */(function(Buffer) {\n\nmodule.exports.btoa = str => {\n if (typeof btoa === 'function') return btoa(str);\n return Buffer.from(str).toString('base64');\n};\nmodule.exports.atob = str => {\n if (typeof atob === 'function') return atob(str);\n return Buffer.from(str, 'base64').toString('binary');\n};\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node_modules/node-libs-browser/node_modules/buffer/index.js */ \"./node_modules/node-libs-browser/node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=file://cloudcmd/common/base64.js");
252
252
 
253
253
  /***/ }),
254
254
 
@@ -260,7 +260,7 @@ eval("/* WEBPACK VAR INJECTION */(function(Buffer) {\n\nmodule.exports.btoa = st
260
260
  /***/ (function(module, exports, __webpack_require__) {
261
261
 
262
262
  "use strict";
263
- eval("\n\nconst rendy = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\n\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n\nconst store = __webpack_require__(/*! fullstore */ \"./node_modules/fullstore/lib/fullstore.js\");\n\nconst {\n encode\n} = __webpack_require__(/*! ./entity */ \"./common/entity.js\");\n\nconst {\n btoa\n} = __webpack_require__(/*! ./base64 */ \"./common/base64.js\");\n\nconst getHeaderField = currify(_getHeaderField);\n/* КОНСТАНТЫ (общие для клиента и сервера)*/\n\n/* название программы */\n\nconst NAME = 'Cloud Commander';\nconst FS = '/fs';\nconst Path = store();\nPath('/');\nmodule.exports.FS = FS;\nmodule.exports.apiURL = '/api/v1';\nmodule.exports.MAX_FILE_SIZE = 500 * 1024;\nmodule.exports.getHeaderField = getHeaderField;\nmodule.exports.getPathLink = getPathLink;\nmodule.exports.getDotDot = getDotDot;\n\nmodule.exports.formatMsg = (msg, name, status) => {\n status = status || 'ok';\n name = name || '';\n if (name) name = '(\"' + name + '\")';\n return msg + ': ' + status + name;\n};\n/**\n * Функция возвращает заголовок веб страницы\n * @path\n */\n\n\nmodule.exports.getTitle = options => {\n options = options || {};\n const {\n path = Path(),\n name\n } = options;\n const array = [name || NAME, path];\n return array.filter(Boolean).join(' - ');\n};\n/** Функция получает адреса каждого каталога в пути\n * возвращаеться массив каталогов\n * @param url - адрес каталога\n */\n\n\nfunction getPathLink(url, prefix, template) {\n if (!url) throw Error('url could not be empty!');\n if (!template) throw Error('template could not be empty!');\n const names = url.split('/').slice(1, -1);\n const allNames = ['/', ...names];\n const lines = [];\n const n = allNames.length;\n let path = '/';\n\n for (let i = 0; i < n; i++) {\n const name = allNames[i];\n const isLast = i === n - 1;\n if (i) path += name + '/';\n\n if (i && isLast) {\n lines.push(name + '/');\n continue;\n }\n\n const slash = i ? '/' : '';\n lines.push(rendy(template, {\n path,\n name,\n slash,\n prefix\n }));\n }\n\n return lines.join('');\n}\n\nconst getDataName = name => {\n const encoded = btoa(encodeURI(name));\n return `data-name=\"js-file-${encoded}\" `;\n};\n/**\n * Функция строит таблицу файлв из JSON-информации о файлах\n * @param params - информация о файлах\n *\n */\n\n\nmodule.exports.buildFromJSON = params => {\n const {\n prefix,\n template,\n sort = 'name',\n order = 'asc'\n } = params;\n const templateFile = template.file;\n const templateLink = template.link;\n const json = params.data;\n const path = encode(json.path);\n const {\n files\n } = json;\n /*\n * Строим путь каталога в котором мы находимся\n * со всеми подкаталогами\n */\n\n const htmlPath = getPathLink(path, prefix, template.pathLink);\n let fileTable = rendy(template.path, {\n link: prefix + FS + path,\n fullPath: path,\n path: htmlPath\n });\n const owner = 'owner';\n const mode = 'mode';\n const getFieldName = getHeaderField(sort, order);\n const name = getFieldName('name');\n const size = getFieldName('size');\n const date = getFieldName('date');\n const header = rendy(templateFile, {\n tag: 'div',\n attribute: 'data-name=\"js-fm-header\" ',\n className: 'fm-header',\n type: '',\n name,\n size,\n date,\n owner,\n mode\n });\n /* сохраняем путь */\n\n Path(path);\n fileTable += header + '<ul data-name=\"js-files\" class=\"files\">';\n /* Если мы не в корне */\n\n if (path !== '/') {\n const dotDot = getDotDot(path);\n const link = prefix + FS + dotDot;\n const linkResult = rendy(template.link, {\n link,\n title: '..',\n name: '..'\n });\n const dataName = getDataName('..');\n const attribute = 'draggable=\"true\" ' + dataName;\n /* Сохраняем путь к каталогу верхнего уровня*/\n\n fileTable += rendy(template.file, {\n tag: 'li',\n attribute,\n className: '',\n type: 'directory',\n name: linkResult,\n size: '&lt;dir&gt;',\n date: '--.--.----',\n owner: '.',\n mode: '--- --- ---'\n });\n }\n\n fileTable += files.map(updateField).map(file => {\n const name = encode(file.name);\n const link = prefix + FS + path + name;\n const {\n type,\n mode,\n date,\n owner,\n size\n } = file;\n const linkResult = rendy(templateLink, {\n link,\n title: name,\n name,\n attribute: getAttribute(file.type)\n });\n const dataName = getDataName(file.name);\n const attribute = `draggable=\"true\" ${dataName}`;\n return rendy(templateFile, {\n tag: 'li',\n attribute,\n className: '',\n type,\n name: linkResult,\n size,\n date,\n owner,\n mode\n });\n }).join('');\n fileTable += '</ul>';\n return fileTable;\n};\n\nfunction updateField(file) {\n return { ...file,\n date: file.date || '--.--.----',\n owner: file.owner || 'root',\n size: getSize(file)\n };\n}\n\nfunction getAttribute(type) {\n if (type === 'directory') return '';\n return 'target=\"_blank\" ';\n}\n\nmodule.exports._getSize = getSize;\n\nfunction getSize(_ref) {\n let {\n size,\n type\n } = _ref;\n if (type === 'directory') return '&lt;dir&gt;';\n if (/link/.test(type)) return '&lt;link&gt;';\n return size;\n}\n\nfunction _getHeaderField(sort, order, name) {\n const arrow = order === 'asc' ? '↑' : '↓';\n if (sort !== name) return name;\n if (sort === 'name' && order === 'asc') return name;\n return `${name}${arrow}`;\n}\n\nfunction getDotDot(path) {\n // убираем последний слеш и каталог в котором мы сейчас находимся\n const lastSlash = path.substr(path, path.lastIndexOf('/'));\n const dotDot = lastSlash.substr(lastSlash, lastSlash.lastIndexOf('/'));\n if (!dotDot) return '/';\n return dotDot;\n}\n\n//# sourceURL=file://cloudcmd/common/cloudfunc.js");
263
+ eval("\n\nconst rendy = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\nconst store = __webpack_require__(/*! fullstore */ \"./node_modules/fullstore/lib/fullstore.js\");\nconst {\n encode\n} = __webpack_require__(/*! ./entity */ \"./common/entity.js\");\nconst {\n btoa\n} = __webpack_require__(/*! ./base64 */ \"./common/base64.js\");\nconst getHeaderField = currify(_getHeaderField);\n\n/* КОНСТАНТЫ (общие для клиента и сервера)*/\n\n/* название программы */\nconst NAME = 'Cloud Commander';\nconst FS = '/fs';\nconst Path = store();\nPath('/');\nmodule.exports.FS = FS;\nmodule.exports.apiURL = '/api/v1';\nmodule.exports.MAX_FILE_SIZE = 500 * 1024;\nmodule.exports.getHeaderField = getHeaderField;\nmodule.exports.getPathLink = getPathLink;\nmodule.exports.getDotDot = getDotDot;\nmodule.exports.formatMsg = (msg, name, status) => {\n status = status || 'ok';\n name = name || '';\n if (name) name = '(\"' + name + '\")';\n return msg + ': ' + status + name;\n};\n\n/**\n * Функция возвращает заголовок веб страницы\n * @path\n */\nmodule.exports.getTitle = options => {\n options = options || {};\n const {\n path = Path(),\n name\n } = options;\n const array = [name || NAME, path];\n return array.filter(Boolean).join(' - ');\n};\n\n/** Функция получает адреса каждого каталога в пути\n * возвращаеться массив каталогов\n * @param url - адрес каталога\n */\nfunction getPathLink(url, prefix, template) {\n if (!url) throw Error('url could not be empty!');\n if (!template) throw Error('template could not be empty!');\n const names = url.split('/').slice(1, -1);\n const allNames = ['/', ...names];\n const lines = [];\n const n = allNames.length;\n let path = '/';\n for (let i = 0; i < n; i++) {\n const name = allNames[i];\n const isLast = i === n - 1;\n if (i) path += name + '/';\n if (i && isLast) {\n lines.push(name + '/');\n continue;\n }\n const slash = i ? '/' : '';\n lines.push(rendy(template, {\n path,\n name,\n slash,\n prefix\n }));\n }\n return lines.join('');\n}\nconst getDataName = name => {\n const encoded = btoa(encodeURI(name));\n return `data-name=\"js-file-${encoded}\" `;\n};\n\n/**\n * Функция строит таблицу файлв из JSON-информации о файлах\n * @param params - информация о файлах\n *\n */\nmodule.exports.buildFromJSON = params => {\n const {\n prefix,\n template,\n sort = 'name',\n order = 'asc'\n } = params;\n const templateFile = template.file;\n const templateLink = template.link;\n const json = params.data;\n const path = encode(json.path);\n const {\n files\n } = json;\n\n /*\n * Строим путь каталога в котором мы находимся\n * со всеми подкаталогами\n */\n const htmlPath = getPathLink(path, prefix, template.pathLink);\n let fileTable = rendy(template.path, {\n link: prefix + FS + path,\n fullPath: path,\n path: htmlPath\n });\n const owner = 'owner';\n const mode = 'mode';\n const getFieldName = getHeaderField(sort, order);\n const name = getFieldName('name');\n const size = getFieldName('size');\n const date = getFieldName('date');\n const header = rendy(templateFile, {\n tag: 'div',\n attribute: 'data-name=\"js-fm-header\" ',\n className: 'fm-header',\n type: '',\n name,\n size,\n date,\n owner,\n mode\n });\n\n /* сохраняем путь */\n Path(path);\n fileTable += header + '<ul data-name=\"js-files\" class=\"files\">';\n\n /* Если мы не в корне */\n if (path !== '/') {\n const dotDot = getDotDot(path);\n const link = prefix + FS + dotDot;\n const linkResult = rendy(template.link, {\n link,\n title: '..',\n name: '..'\n });\n const dataName = getDataName('..');\n const attribute = 'draggable=\"true\" ' + dataName;\n\n /* Сохраняем путь к каталогу верхнего уровня*/\n fileTable += rendy(template.file, {\n tag: 'li',\n attribute,\n className: '',\n type: 'directory',\n name: linkResult,\n size: '&lt;dir&gt;',\n date: '--.--.----',\n owner: '.',\n mode: '--- --- ---'\n });\n }\n fileTable += files.map(updateField).map(file => {\n const name = encode(file.name);\n const link = prefix + FS + path + name;\n const {\n type,\n mode,\n date,\n owner,\n size\n } = file;\n const linkResult = rendy(templateLink, {\n link,\n title: name,\n name,\n attribute: getAttribute(file.type)\n });\n const dataName = getDataName(file.name);\n const attribute = `draggable=\"true\" ${dataName}`;\n return rendy(templateFile, {\n tag: 'li',\n attribute,\n className: '',\n type,\n name: linkResult,\n size,\n date,\n owner,\n mode\n });\n }).join('');\n fileTable += '</ul>';\n return fileTable;\n};\nfunction updateField(file) {\n return {\n ...file,\n date: file.date || '--.--.----',\n owner: file.owner || 'root',\n size: getSize(file)\n };\n}\nfunction getAttribute(type) {\n if (type === 'directory') return '';\n return 'target=\"_blank\" ';\n}\nmodule.exports._getSize = getSize;\nfunction getSize(_ref) {\n let {\n size,\n type\n } = _ref;\n if (type === 'directory') return '&lt;dir&gt;';\n if (/link/.test(type)) return '&lt;link&gt;';\n return size;\n}\nfunction _getHeaderField(sort, order, name) {\n const arrow = order === 'asc' ? '↑' : '↓';\n if (sort !== name) return name;\n if (sort === 'name' && order === 'asc') return name;\n return `${name}${arrow}`;\n}\nfunction getDotDot(path) {\n // убираем последний слеш и каталог в котором мы сейчас находимся\n const lastSlash = path.substr(path, path.lastIndexOf('/'));\n const dotDot = lastSlash.substr(lastSlash, lastSlash.lastIndexOf('/'));\n if (!dotDot) return '/';\n return dotDot;\n}\n\n//# sourceURL=file://cloudcmd/common/cloudfunc.js");
264
264
 
265
265
  /***/ }),
266
266
 
@@ -272,7 +272,7 @@ eval("\n\nconst rendy = __webpack_require__(/*! rendy */ \"./node_modules/rendy/
272
272
  /***/ (function(module, exports, __webpack_require__) {
273
273
 
274
274
  "use strict";
275
- eval("\n\nconst Entities = {\n // '&nbsp;': ' ',\n '&lt;': '<',\n '&gt;': '>',\n '&quot;': '\"'\n};\nconst keys = Object.keys(Entities);\n\nmodule.exports.encode = str => {\n for (const code of keys) {\n const char = Entities[code];\n const reg = RegExp(char, 'g');\n str = str.replace(reg, code);\n }\n\n return str;\n};\n\nmodule.exports.decode = str => {\n for (const code of keys) {\n const char = Entities[code];\n const reg = RegExp(code, 'g');\n str = str.replace(reg, char);\n }\n\n return str;\n};\n\n//# sourceURL=file://cloudcmd/common/entity.js");
275
+ eval("\n\nconst Entities = {\n // '&nbsp;': ' ',\n '&lt;': '<',\n '&gt;': '>',\n '&quot;': '\"'\n};\nconst keys = Object.keys(Entities);\nmodule.exports.encode = str => {\n for (const code of keys) {\n const char = Entities[code];\n const reg = RegExp(char, 'g');\n str = str.replace(reg, code);\n }\n return str;\n};\nmodule.exports.decode = str => {\n for (const code of keys) {\n const char = Entities[code];\n const reg = RegExp(code, 'g');\n str = str.replace(reg, char);\n }\n return str;\n};\n\n//# sourceURL=file://cloudcmd/common/entity.js");
276
276
 
277
277
  /***/ }),
278
278
 
@@ -284,7 +284,7 @@ eval("\n\nconst Entities = {\n // '&nbsp;': ' ',\n '&lt;': '<',\n '&gt;':
284
284
  /***/ (function(module, exports, __webpack_require__) {
285
285
 
286
286
  "use strict";
287
- eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n\nconst all = Promise.all.bind(Promise);\n\nmodule.exports = async a => {\n const [e, result = []] = await tryToCatch(all, a);\n return [e, ...result];\n};\n\n//# sourceURL=file://cloudcmd/common/try-to-promise-all.js");
287
+ eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\nconst all = Promise.all.bind(Promise);\nmodule.exports = async a => {\n const [e, result = []] = await tryToCatch(all, a);\n return [e, ...result];\n};\n\n//# sourceURL=file://cloudcmd/common/try-to-promise-all.js");
288
288
 
289
289
  /***/ }),
290
290
 
@@ -296,7 +296,7 @@ eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_mo
296
296
  /***/ (function(module, exports, __webpack_require__) {
297
297
 
298
298
  "use strict";
299
- eval("\n\nconst exec = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\n\nmodule.exports.escapeRegExp = str => {\n const isStr = typeof str === 'string';\n if (isStr) str = str.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n return str;\n};\n/**\n * get regexp from wild card\n */\n\n\nmodule.exports.getRegExp = wildcard => {\n const escaped = '^' + wildcard // search from start of line\n .replace(/\\./g, '\\\\.').replace(/\\*/g, '.*').replace('?', '.?') + '$'; // search to end of line\n\n return RegExp(escaped);\n};\n\nmodule.exports.exec = exec;\n/**\n * function gets file extension\n *\n * @param name\n * @return ext\n */\n\nmodule.exports.getExt = name => {\n const isStr = typeof name === 'string';\n if (!isStr) return '';\n const dot = name.lastIndexOf('.');\n if (~dot) return name.substr(dot);\n return '';\n};\n/**\n * find object by name in arrray\n *\n * @param array\n * @param name\n */\n\n\nmodule.exports.findObjByNameInArr = (array, name) => {\n let ret;\n if (!Array.isArray(array)) throw Error('array should be array!');\n if (typeof name !== 'string') throw Error('name should be string!');\n array.some(item => {\n const is = item.name === name;\n const isArray = Array.isArray(item);\n\n if (is) {\n ret = item;\n return is;\n }\n\n if (!isArray) return is;\n return item.some(item => {\n const is = item.name === name;\n if (is) ret = item.data;\n return is;\n });\n });\n return ret;\n};\n/**\n * start timer\n * @param name\n */\n\n\nmodule.exports.time = name => {\n exec.ifExist(console, 'time', [name]);\n};\n/**\n * stop timer\n * @param name\n */\n\n\nmodule.exports.timeEnd = name => {\n exec.ifExist(console, 'timeEnd', [name]);\n};\n\n//# sourceURL=file://cloudcmd/common/util.js");
299
+ eval("\n\nconst exec = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\nmodule.exports.escapeRegExp = str => {\n const isStr = typeof str === 'string';\n if (isStr) str = str.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n return str;\n};\n\n/**\n * get regexp from wild card\n */\nmodule.exports.getRegExp = wildcard => {\n const escaped = '^' + wildcard // search from start of line\n .replace(/\\./g, '\\\\.').replace(/\\*/g, '.*').replace('?', '.?') + '$'; // search to end of line\n\n return RegExp(escaped);\n};\nmodule.exports.exec = exec;\n\n/**\n * function gets file extension\n *\n * @param name\n * @return ext\n */\nmodule.exports.getExt = name => {\n const isStr = typeof name === 'string';\n if (!isStr) return '';\n const dot = name.lastIndexOf('.');\n if (~dot) return name.substr(dot);\n return '';\n};\n\n/**\n * find object by name in arrray\n *\n * @param array\n * @param name\n */\nmodule.exports.findObjByNameInArr = (array, name) => {\n let ret;\n if (!Array.isArray(array)) throw Error('array should be array!');\n if (typeof name !== 'string') throw Error('name should be string!');\n array.some(item => {\n const is = item.name === name;\n const isArray = Array.isArray(item);\n if (is) {\n ret = item;\n return is;\n }\n if (!isArray) return is;\n return item.some(item => {\n const is = item.name === name;\n if (is) ret = item.data;\n return is;\n });\n });\n return ret;\n};\n\n/**\n * start timer\n * @param name\n */\nmodule.exports.time = name => {\n exec.ifExist(console, 'time', [name]);\n};\n\n/**\n * stop timer\n * @param name\n */\nmodule.exports.timeEnd = name => {\n exec.ifExist(console, 'timeEnd', [name]);\n};\n\n//# sourceURL=file://cloudcmd/common/util.js");
300
300
 
301
301
  /***/ }),
302
302
 
@@ -331,7 +331,7 @@ eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nObject.defineProperty(e
331
331
  /***/ (function(module, exports, __webpack_require__) {
332
332
 
333
333
  "use strict";
334
- eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isIdentifierChar = isIdentifierChar;\nexports.isIdentifierName = isIdentifierName;\nexports.isIdentifierStart = isIdentifierStart;\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7ca\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7d9\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0898-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\";\nconst nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\");\nconst nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\");\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\nconst astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];\nconst astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];\n\nfunction isInAstralSet(code, set) {\n let pos = 0x10000;\n\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n\n return false;\n}\n\nfunction isIdentifierStart(code) {\n if (code < 65) return code === 36;\n if (code <= 90) return true;\n if (code < 97) return code === 95;\n if (code <= 122) return true;\n\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));\n }\n\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\nfunction isIdentifierChar(code) {\n if (code < 48) return code === 36;\n if (code < 58) return true;\n if (code < 65) return false;\n if (code <= 90) return true;\n if (code < 97) return code === 95;\n if (code <= 122) return true;\n\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n\n return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);\n}\n\nfunction isIdentifierName(name) {\n let isFirst = true;\n\n for (let i = 0; i < name.length; i++) {\n let cp = name.charCodeAt(i);\n\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n\n if (isFirst) {\n isFirst = false;\n\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n\n return !isFirst;\n}\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/helper-validator-identifier/lib/identifier.js");
334
+ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isIdentifierChar = isIdentifierChar;\nexports.isIdentifierName = isIdentifierName;\nexports.isIdentifierStart = isIdentifierStart;\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7ca\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7d9\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0898-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\";\nconst nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\");\nconst nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\");\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\nconst astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938, 6, 4191];\nconst astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];\n\nfunction isInAstralSet(code, set) {\n let pos = 0x10000;\n\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n\n return false;\n}\n\nfunction isIdentifierStart(code) {\n if (code < 65) return code === 36;\n if (code <= 90) return true;\n if (code < 97) return code === 95;\n if (code <= 122) return true;\n\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));\n }\n\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\nfunction isIdentifierChar(code) {\n if (code < 48) return code === 36;\n if (code < 58) return true;\n if (code < 65) return false;\n if (code <= 90) return true;\n if (code < 97) return code === 95;\n if (code <= 122) return true;\n\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n\n return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);\n}\n\nfunction isIdentifierName(name) {\n let isFirst = true;\n\n for (let i = 0; i < name.length; i++) {\n let cp = name.charCodeAt(i);\n\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n\n if (isFirst) {\n isFirst = false;\n\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n\n return !isFirst;\n}\n\n//# sourceMappingURL=identifier.js.map\n\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/helper-validator-identifier/lib/identifier.js");
335
335
 
336
336
  /***/ }),
337
337
 
@@ -343,7 +343,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n
343
343
  /***/ (function(module, exports, __webpack_require__) {
344
344
 
345
345
  "use strict";
346
- eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"isIdentifierChar\", {\n enumerable: true,\n get: function () {\n return _identifier.isIdentifierChar;\n }\n});\nObject.defineProperty(exports, \"isIdentifierName\", {\n enumerable: true,\n get: function () {\n return _identifier.isIdentifierName;\n }\n});\nObject.defineProperty(exports, \"isIdentifierStart\", {\n enumerable: true,\n get: function () {\n return _identifier.isIdentifierStart;\n }\n});\nObject.defineProperty(exports, \"isKeyword\", {\n enumerable: true,\n get: function () {\n return _keyword.isKeyword;\n }\n});\nObject.defineProperty(exports, \"isReservedWord\", {\n enumerable: true,\n get: function () {\n return _keyword.isReservedWord;\n }\n});\nObject.defineProperty(exports, \"isStrictBindOnlyReservedWord\", {\n enumerable: true,\n get: function () {\n return _keyword.isStrictBindOnlyReservedWord;\n }\n});\nObject.defineProperty(exports, \"isStrictBindReservedWord\", {\n enumerable: true,\n get: function () {\n return _keyword.isStrictBindReservedWord;\n }\n});\nObject.defineProperty(exports, \"isStrictReservedWord\", {\n enumerable: true,\n get: function () {\n return _keyword.isStrictReservedWord;\n }\n});\n\nvar _identifier = __webpack_require__(/*! ./identifier */ \"./node_modules/@babel/helper-validator-identifier/lib/identifier.js\");\n\nvar _keyword = __webpack_require__(/*! ./keyword */ \"./node_modules/@babel/helper-validator-identifier/lib/keyword.js\");\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/helper-validator-identifier/lib/index.js");
346
+ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"isIdentifierChar\", {\n enumerable: true,\n get: function () {\n return _identifier.isIdentifierChar;\n }\n});\nObject.defineProperty(exports, \"isIdentifierName\", {\n enumerable: true,\n get: function () {\n return _identifier.isIdentifierName;\n }\n});\nObject.defineProperty(exports, \"isIdentifierStart\", {\n enumerable: true,\n get: function () {\n return _identifier.isIdentifierStart;\n }\n});\nObject.defineProperty(exports, \"isKeyword\", {\n enumerable: true,\n get: function () {\n return _keyword.isKeyword;\n }\n});\nObject.defineProperty(exports, \"isReservedWord\", {\n enumerable: true,\n get: function () {\n return _keyword.isReservedWord;\n }\n});\nObject.defineProperty(exports, \"isStrictBindOnlyReservedWord\", {\n enumerable: true,\n get: function () {\n return _keyword.isStrictBindOnlyReservedWord;\n }\n});\nObject.defineProperty(exports, \"isStrictBindReservedWord\", {\n enumerable: true,\n get: function () {\n return _keyword.isStrictBindReservedWord;\n }\n});\nObject.defineProperty(exports, \"isStrictReservedWord\", {\n enumerable: true,\n get: function () {\n return _keyword.isStrictReservedWord;\n }\n});\n\nvar _identifier = __webpack_require__(/*! ./identifier */ \"./node_modules/@babel/helper-validator-identifier/lib/identifier.js\");\n\nvar _keyword = __webpack_require__(/*! ./keyword */ \"./node_modules/@babel/helper-validator-identifier/lib/keyword.js\");\n\n//# sourceMappingURL=index.js.map\n\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/helper-validator-identifier/lib/index.js");
347
347
 
348
348
  /***/ }),
349
349
 
@@ -355,7 +355,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n
355
355
  /***/ (function(module, exports, __webpack_require__) {
356
356
 
357
357
  "use strict";
358
- eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isKeyword = isKeyword;\nexports.isReservedWord = isReservedWord;\nexports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;\nexports.isStrictBindReservedWord = isStrictBindReservedWord;\nexports.isStrictReservedWord = isStrictReservedWord;\nconst reservedWords = {\n keyword: [\"break\", \"case\", \"catch\", \"continue\", \"debugger\", \"default\", \"do\", \"else\", \"finally\", \"for\", \"function\", \"if\", \"return\", \"switch\", \"throw\", \"try\", \"var\", \"const\", \"while\", \"with\", \"new\", \"this\", \"super\", \"class\", \"extends\", \"export\", \"import\", \"null\", \"true\", \"false\", \"in\", \"instanceof\", \"typeof\", \"void\", \"delete\"],\n strict: [\"implements\", \"interface\", \"let\", \"package\", \"private\", \"protected\", \"public\", \"static\", \"yield\"],\n strictBind: [\"eval\", \"arguments\"]\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\nfunction isReservedWord(word, inModule) {\n return inModule && word === \"await\" || word === \"enum\";\n}\n\nfunction isStrictReservedWord(word, inModule) {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\nfunction isStrictBindOnlyReservedWord(word) {\n return reservedWordsStrictBindSet.has(word);\n}\n\nfunction isStrictBindReservedWord(word, inModule) {\n return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);\n}\n\nfunction isKeyword(word) {\n return keywords.has(word);\n}\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/helper-validator-identifier/lib/keyword.js");
358
+ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isKeyword = isKeyword;\nexports.isReservedWord = isReservedWord;\nexports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;\nexports.isStrictBindReservedWord = isStrictBindReservedWord;\nexports.isStrictReservedWord = isStrictReservedWord;\nconst reservedWords = {\n keyword: [\"break\", \"case\", \"catch\", \"continue\", \"debugger\", \"default\", \"do\", \"else\", \"finally\", \"for\", \"function\", \"if\", \"return\", \"switch\", \"throw\", \"try\", \"var\", \"const\", \"while\", \"with\", \"new\", \"this\", \"super\", \"class\", \"extends\", \"export\", \"import\", \"null\", \"true\", \"false\", \"in\", \"instanceof\", \"typeof\", \"void\", \"delete\"],\n strict: [\"implements\", \"interface\", \"let\", \"package\", \"private\", \"protected\", \"public\", \"static\", \"yield\"],\n strictBind: [\"eval\", \"arguments\"]\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\nfunction isReservedWord(word, inModule) {\n return inModule && word === \"await\" || word === \"enum\";\n}\n\nfunction isStrictReservedWord(word, inModule) {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\nfunction isStrictBindOnlyReservedWord(word) {\n return reservedWordsStrictBindSet.has(word);\n}\n\nfunction isStrictBindReservedWord(word, inModule) {\n return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);\n}\n\nfunction isKeyword(word) {\n return keywords.has(word);\n}\n\n//# sourceMappingURL=keyword.js.map\n\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/helper-validator-identifier/lib/keyword.js");
359
359
 
360
360
  /***/ }),
361
361