From 79d026f5a45e3a77f3032a3d0cc902481acce9df Mon Sep 17 00:00:00 2001
From: Jose Manuel Serrano Amaut <a20122128@pucp.pe>
Date: Fri, 24 Mar 2023 17:23:06 -0500
Subject: [PATCH] [REF]: Update copnfiguration for tests

---
 package-lock.json                             | 313 +++++++++-
 package.json                                  |   7 +-
 src/core/color/colors.d.ts                    |  65 +++
 src/core/color/index.d.ts                     |   2 +
 src/core/color/namedColors.d.ts               |   6 +
 src/core/download/downloadFile.d.ts           |   4 +
 src/core/file-manager/index.d.ts              |   1 +
 src/core/file-manager/reconcilation.d.ts      |   2 +
 src/core/index.d.ts                           |  12 +
 src/core/index.es.js                          |   2 +
 src/core/index.es.js.map                      |   1 +
 src/core/index.js                             |   2 +
 src/core/index.js.map                         |   1 +
 .../localization.simplifiedChinese.d.ts       |  13 +
 .../localization.traditionalChinese.d.ts      |  13 +
 .../English/localization.english.d.ts         |  13 +
 .../localization/FileItem.localization.d.ts   |   8 +
 .../French/localization.french.d.ts           |  13 +
 .../Italian/localization.italian.d.ts         |  13 +
 .../Portuguese/localization.portuguese.d.ts   |  13 +
 .../Russian/localization.russian.d.ts         |  14 +
 .../Spanish/localization.spanish.d.ts         |  13 +
 .../localization/avatar.localization.d.ts     |  11 +
 .../localization/dropzone.localization.d.ts   |   8 +
 src/core/localization/index.d.ts              |  14 +
 .../validationError.localization.d.ts         |   8 +
 src/core/mime/icons.d.ts                      |  89 +++
 src/core/mime/index.d.ts                      |   3 +
 src/core/mime/mime.d.ts                       |  56 ++
 src/core/mocks/extFileMock.d.ts               |   2 +
 src/core/mocks/index.d.ts                     |   1 +
 src/core/reader/imageOrientation.d.ts         |  10 +
 src/core/reader/index.d.ts                    |   3 +
 src/core/reader/readers.d.ts                  |  31 +
 src/core/reader/resizeImage.d.ts              |  10 +
 src/core/synthetic-file/SyntheticFile.d.ts    | 551 ++++++++++++++++++
 src/core/synthetic-file/index.d.ts            |   2 +
 .../syntheticfileGenerator.d.ts               |  13 +
 src/core/types/ExtFile.d.ts                   | 172 ++++++
 src/core/types/ExtFileManager.d.ts            |  61 ++
 src/core/types/FileListMap.d.ts               |   4 +
 src/core/types/IconsMap.d.ts                  |  77 +++
 src/core/types/NamedColor.d.ts                |   6 +
 src/core/types/UploadConfig.d.ts              |  58 ++
 src/core/types/UploadStatus.d.ts              |   1 +
 src/core/types/behaviur.d.ts                  |   4 +
 src/core/types/index.d.ts                     |  14 +
 src/core/types/localization.d.ts              |   8 +
 src/core/types/method.d.ts                    |  10 +
 src/core/types/uploadTypes.d.ts               |  28 +
 src/core/types/validation.d.ts                |  20 +
 src/core/upload/addExtraData.upload.d.ts      |   1 +
 src/core/upload/addheaders.upload.d.ts        |   1 +
 src/core/upload/errors.upload.d.ts            |  22 +
 src/core/upload/index.d.ts                    |   6 +
 src/core/upload/response.upload.d.ts          |   5 +
 src/core/upload/upload.d.ts                   |  33 ++
 src/core/upload/utils.upload.d.ts             |  42 ++
 src/core/utils/IdGenerator.d.ts               |  11 +
 src/core/utils/addClassName.d.ts              |   7 +
 src/core/utils/dropzone.utils.d.ts            |   1 +
 src/core/utils/fakeupload.utils.d.ts          |  45 ++
 src/core/utils/fileListParser.d.ts            |  13 +
 src/core/utils/fileSizeFormatter.d.ts         |   5 +
 src/core/utils/getExt.d.ts                    |   6 +
 src/core/utils/getLocalFileItemData.d.ts      |   9 +
 src/core/utils/index.d.ts                     |  13 +
 src/core/utils/input.utils.d.ts               |   5 +
 src/core/utils/isUploadAbleExtFile.d.ts       |   2 +
 src/core/utils/randomInt.d.ts                 |   7 +
 src/core/utils/shrinkWord.d.ts                |  10 +
 src/core/validation/fakeerros.d.ts            |   4 +
 src/core/validation/fileValidator.d.ts        |  43 ++
 src/core/validation/index.d.ts                |   5 +
 src/core/validation/randomStatus.d.ts         |  11 +
 src/core/validation/separateAccept.d.ts       |   6 +
 src/core/validation/validateAccept.d.ts       |   8 +
 tests/Dropone.test.tsx                        |  10 +
 tests/FileItem.test.tsx                       |  14 +
 tsconfig.json                                 |   5 +-
 80 files changed, 2151 insertions(+), 5 deletions(-)
 create mode 100644 src/core/color/colors.d.ts
 create mode 100644 src/core/color/index.d.ts
 create mode 100644 src/core/color/namedColors.d.ts
 create mode 100644 src/core/download/downloadFile.d.ts
 create mode 100644 src/core/file-manager/index.d.ts
 create mode 100644 src/core/file-manager/reconcilation.d.ts
 create mode 100644 src/core/index.d.ts
 create mode 100644 src/core/index.es.js
 create mode 100644 src/core/index.es.js.map
 create mode 100644 src/core/index.js
 create mode 100644 src/core/index.js.map
 create mode 100644 src/core/localization/Chinese-simplified/localization.simplifiedChinese.d.ts
 create mode 100644 src/core/localization/Chinese-traditional/localization.traditionalChinese.d.ts
 create mode 100644 src/core/localization/English/localization.english.d.ts
 create mode 100644 src/core/localization/FileItem.localization.d.ts
 create mode 100644 src/core/localization/French/localization.french.d.ts
 create mode 100644 src/core/localization/Italian/localization.italian.d.ts
 create mode 100644 src/core/localization/Portuguese/localization.portuguese.d.ts
 create mode 100644 src/core/localization/Russian/localization.russian.d.ts
 create mode 100644 src/core/localization/Spanish/localization.spanish.d.ts
 create mode 100644 src/core/localization/avatar.localization.d.ts
 create mode 100644 src/core/localization/dropzone.localization.d.ts
 create mode 100644 src/core/localization/index.d.ts
 create mode 100644 src/core/localization/validationError.localization.d.ts
 create mode 100644 src/core/mime/icons.d.ts
 create mode 100644 src/core/mime/index.d.ts
 create mode 100644 src/core/mime/mime.d.ts
 create mode 100644 src/core/mocks/extFileMock.d.ts
 create mode 100644 src/core/mocks/index.d.ts
 create mode 100644 src/core/reader/imageOrientation.d.ts
 create mode 100644 src/core/reader/index.d.ts
 create mode 100644 src/core/reader/readers.d.ts
 create mode 100644 src/core/reader/resizeImage.d.ts
 create mode 100644 src/core/synthetic-file/SyntheticFile.d.ts
 create mode 100644 src/core/synthetic-file/index.d.ts
 create mode 100644 src/core/synthetic-file/syntheticfileGenerator.d.ts
 create mode 100644 src/core/types/ExtFile.d.ts
 create mode 100644 src/core/types/ExtFileManager.d.ts
 create mode 100644 src/core/types/FileListMap.d.ts
 create mode 100644 src/core/types/IconsMap.d.ts
 create mode 100644 src/core/types/NamedColor.d.ts
 create mode 100644 src/core/types/UploadConfig.d.ts
 create mode 100644 src/core/types/UploadStatus.d.ts
 create mode 100644 src/core/types/behaviur.d.ts
 create mode 100644 src/core/types/index.d.ts
 create mode 100644 src/core/types/localization.d.ts
 create mode 100644 src/core/types/method.d.ts
 create mode 100644 src/core/types/uploadTypes.d.ts
 create mode 100644 src/core/types/validation.d.ts
 create mode 100644 src/core/upload/addExtraData.upload.d.ts
 create mode 100644 src/core/upload/addheaders.upload.d.ts
 create mode 100644 src/core/upload/errors.upload.d.ts
 create mode 100644 src/core/upload/index.d.ts
 create mode 100644 src/core/upload/response.upload.d.ts
 create mode 100644 src/core/upload/upload.d.ts
 create mode 100644 src/core/upload/utils.upload.d.ts
 create mode 100644 src/core/utils/IdGenerator.d.ts
 create mode 100644 src/core/utils/addClassName.d.ts
 create mode 100644 src/core/utils/dropzone.utils.d.ts
 create mode 100644 src/core/utils/fakeupload.utils.d.ts
 create mode 100644 src/core/utils/fileListParser.d.ts
 create mode 100644 src/core/utils/fileSizeFormatter.d.ts
 create mode 100644 src/core/utils/getExt.d.ts
 create mode 100644 src/core/utils/getLocalFileItemData.d.ts
 create mode 100644 src/core/utils/index.d.ts
 create mode 100644 src/core/utils/input.utils.d.ts
 create mode 100644 src/core/utils/isUploadAbleExtFile.d.ts
 create mode 100644 src/core/utils/randomInt.d.ts
 create mode 100644 src/core/utils/shrinkWord.d.ts
 create mode 100644 src/core/validation/fakeerros.d.ts
 create mode 100644 src/core/validation/fileValidator.d.ts
 create mode 100644 src/core/validation/index.d.ts
 create mode 100644 src/core/validation/randomStatus.d.ts
 create mode 100644 src/core/validation/separateAccept.d.ts
 create mode 100644 src/core/validation/validateAccept.d.ts
 create mode 100644 tests/Dropone.test.tsx
 create mode 100644 tests/FileItem.test.tsx

diff --git a/package-lock.json b/package-lock.json
index 27c5869..3ba5dec 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,13 +9,14 @@
       "version": "1.0.0",
       "license": "MIT",
       "dependencies": {
-        "react": "^18.2.0",
-        "react-dom": "^18.2.0"
+        "@dynamicss/dynamicss": "^2.2.8"
       },
       "devDependencies": {
         "@rollup/plugin-commonjs": "^24.0.1",
         "@rollup/plugin-node-resolve": "^15.0.1",
         "@testing-library/jest-dom": "^5.16.5",
+        "@testing-library/react": "^14.0.0",
+        "identity-obj-proxy": "^3.0.0",
         "jest": "^29.5.0",
         "jest-environment-jsdom": "^29.5.0",
         "rollup-plugin-peer-deps-external": "^2.2.4",
@@ -24,6 +25,10 @@
         "rollup-plugin-typescript2": "^0.34.1",
         "ts-jest": "^29.0.5",
         "typescript": "^5.0.2"
+      },
+      "peerDependencies": {
+        "react": "^18.2.0",
+        "react-dom": "^18.2.0"
       }
     },
     "node_modules/@adobe/css-tools": {
@@ -630,6 +635,12 @@
       "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
       "dev": true
     },
+    "node_modules/@dynamicss/dynamicss": {
+      "version": "2.2.8",
+      "resolved": "https://registry.npmjs.org/@dynamicss/dynamicss/-/dynamicss-2.2.8.tgz",
+      "integrity": "sha512-e6hrGUydr8f+c9E/9fHFSG5LoSLdq/MdZXXfbzEDWIVuzKF2hcdxZE7nHNqUNF2htw1mZ17Pyoshu3A6kFEeFA==",
+      "hasInstallScript": true
+    },
     "node_modules/@istanbuljs/load-nyc-config": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
@@ -1222,6 +1233,73 @@
         "@sinonjs/commons": "^2.0.0"
       }
     },
+    "node_modules/@testing-library/dom": {
+      "version": "9.2.0",
+      "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.2.0.tgz",
+      "integrity": "sha512-xTEnpUKiV/bMyEsE5bT4oYA0x0Z/colMtxzUY8bKyPXBNLn/e0V4ZjBZkEhms0xE4pv9QsPfSRu9AWS4y5wGvA==",
+      "dev": true,
+      "dependencies": {
+        "@babel/code-frame": "^7.10.4",
+        "@babel/runtime": "^7.12.5",
+        "@types/aria-query": "^5.0.1",
+        "aria-query": "^5.0.0",
+        "chalk": "^4.1.0",
+        "dom-accessibility-api": "^0.5.9",
+        "lz-string": "^1.5.0",
+        "pretty-format": "^27.0.2"
+      },
+      "engines": {
+        "node": ">=14"
+      }
+    },
+    "node_modules/@testing-library/dom/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+      "dev": true,
+      "dependencies": {
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
+      },
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
+      }
+    },
+    "node_modules/@testing-library/dom/node_modules/pretty-format": {
+      "version": "27.5.1",
+      "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
+      "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
+      "dev": true,
+      "dependencies": {
+        "ansi-regex": "^5.0.1",
+        "ansi-styles": "^5.0.0",
+        "react-is": "^17.0.1"
+      },
+      "engines": {
+        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+      }
+    },
+    "node_modules/@testing-library/dom/node_modules/pretty-format/node_modules/ansi-styles": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+      "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+      "dev": true,
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+      }
+    },
+    "node_modules/@testing-library/dom/node_modules/react-is": {
+      "version": "17.0.2",
+      "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+      "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+      "dev": true
+    },
     "node_modules/@testing-library/jest-dom": {
       "version": "5.16.5",
       "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.5.tgz",
@@ -1244,6 +1322,24 @@
         "yarn": ">=1"
       }
     },
+    "node_modules/@testing-library/react": {
+      "version": "14.0.0",
+      "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.0.0.tgz",
+      "integrity": "sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg==",
+      "dev": true,
+      "dependencies": {
+        "@babel/runtime": "^7.12.5",
+        "@testing-library/dom": "^9.0.0",
+        "@types/react-dom": "^18.0.0"
+      },
+      "engines": {
+        "node": ">=14"
+      },
+      "peerDependencies": {
+        "react": "^18.0.0",
+        "react-dom": "^18.0.0"
+      }
+    },
     "node_modules/@tootallnate/once": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
@@ -1253,6 +1349,12 @@
         "node": ">= 10"
       }
     },
+    "node_modules/@types/aria-query": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz",
+      "integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==",
+      "dev": true
+    },
     "node_modules/@types/babel__core": {
       "version": "7.20.0",
       "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.0.tgz",
@@ -1366,12 +1468,44 @@
       "integrity": "sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==",
       "dev": true
     },
+    "node_modules/@types/prop-types": {
+      "version": "15.7.5",
+      "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",
+      "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==",
+      "dev": true
+    },
+    "node_modules/@types/react": {
+      "version": "18.0.29",
+      "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.29.tgz",
+      "integrity": "sha512-wXHktgUABxplw1+UnljseDq4+uztQyp2tlWZRIxHlpchsCFqiYkvaDS8JR7eKOQm8wziTH/el5qL7D6gYNkYcw==",
+      "dev": true,
+      "dependencies": {
+        "@types/prop-types": "*",
+        "@types/scheduler": "*",
+        "csstype": "^3.0.2"
+      }
+    },
+    "node_modules/@types/react-dom": {
+      "version": "18.0.11",
+      "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.11.tgz",
+      "integrity": "sha512-O38bPbI2CWtgw/OoQoY+BRelw7uysmXbWvw3nLWO21H1HSh+GOlqPuXshJfjmpNlKiiSDG9cc1JZAaMmVdcTlw==",
+      "dev": true,
+      "dependencies": {
+        "@types/react": "*"
+      }
+    },
     "node_modules/@types/resolve": {
       "version": "1.20.2",
       "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
       "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==",
       "dev": true
     },
+    "node_modules/@types/scheduler": {
+      "version": "0.16.3",
+      "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz",
+      "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==",
+      "dev": true
+    },
     "node_modules/@types/stack-utils": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",
@@ -2000,6 +2134,12 @@
       "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==",
       "dev": true
     },
+    "node_modules/csstype": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
+      "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==",
+      "dev": true
+    },
     "node_modules/data-urls": {
       "version": "3.0.2",
       "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz",
@@ -2583,6 +2723,12 @@
       "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
       "dev": true
     },
+    "node_modules/harmony-reflect": {
+      "version": "1.6.2",
+      "resolved": "https://registry.npmjs.org/harmony-reflect/-/harmony-reflect-1.6.2.tgz",
+      "integrity": "sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==",
+      "dev": true
+    },
     "node_modules/has": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
@@ -2718,6 +2864,18 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/identity-obj-proxy": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz",
+      "integrity": "sha512-00n6YnVHKrinT9t0d9+5yZC6UBNJANpYEQvL2LlX6Ab9lnmxzIRcEmTPuyGScvl1+jKuCICX1Z0Ab1pPKKdikA==",
+      "dev": true,
+      "dependencies": {
+        "harmony-reflect": "^1.4.6"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
     "node_modules/immutable": {
       "version": "4.3.0",
       "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz",
@@ -4308,6 +4466,7 @@
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
       "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+      "peer": true,
       "dependencies": {
         "js-tokens": "^3.0.0 || ^4.0.0"
       },
@@ -4324,6 +4483,15 @@
         "yallist": "^3.0.2"
       }
     },
+    "node_modules/lz-string": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz",
+      "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
+      "dev": true,
+      "bin": {
+        "lz-string": "bin/bin.js"
+      }
+    },
     "node_modules/magic-string": {
       "version": "0.27.0",
       "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz",
@@ -4831,6 +4999,7 @@
       "version": "18.2.0",
       "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
       "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
+      "peer": true,
       "dependencies": {
         "loose-envify": "^1.1.0"
       },
@@ -4842,6 +5011,7 @@
       "version": "18.2.0",
       "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
       "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
+      "peer": true,
       "dependencies": {
         "loose-envify": "^1.1.0",
         "scheduler": "^0.23.0"
@@ -5157,6 +5327,7 @@
       "version": "0.23.0",
       "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
       "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
+      "peer": true,
       "dependencies": {
         "loose-envify": "^1.1.0"
       }
@@ -6470,6 +6641,11 @@
       "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
       "dev": true
     },
+    "@dynamicss/dynamicss": {
+      "version": "2.2.8",
+      "resolved": "https://registry.npmjs.org/@dynamicss/dynamicss/-/dynamicss-2.2.8.tgz",
+      "integrity": "sha512-e6hrGUydr8f+c9E/9fHFSG5LoSLdq/MdZXXfbzEDWIVuzKF2hcdxZE7nHNqUNF2htw1mZ17Pyoshu3A6kFEeFA=="
+    },
     "@istanbuljs/load-nyc-config": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
@@ -6926,6 +7102,59 @@
         "@sinonjs/commons": "^2.0.0"
       }
     },
+    "@testing-library/dom": {
+      "version": "9.2.0",
+      "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.2.0.tgz",
+      "integrity": "sha512-xTEnpUKiV/bMyEsE5bT4oYA0x0Z/colMtxzUY8bKyPXBNLn/e0V4ZjBZkEhms0xE4pv9QsPfSRu9AWS4y5wGvA==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.10.4",
+        "@babel/runtime": "^7.12.5",
+        "@types/aria-query": "^5.0.1",
+        "aria-query": "^5.0.0",
+        "chalk": "^4.1.0",
+        "dom-accessibility-api": "^0.5.9",
+        "lz-string": "^1.5.0",
+        "pretty-format": "^27.0.2"
+      },
+      "dependencies": {
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "pretty-format": {
+          "version": "27.5.1",
+          "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
+          "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^5.0.1",
+            "ansi-styles": "^5.0.0",
+            "react-is": "^17.0.1"
+          },
+          "dependencies": {
+            "ansi-styles": {
+              "version": "5.2.0",
+              "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+              "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+              "dev": true
+            }
+          }
+        },
+        "react-is": {
+          "version": "17.0.2",
+          "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+          "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+          "dev": true
+        }
+      }
+    },
     "@testing-library/jest-dom": {
       "version": "5.16.5",
       "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.5.tgz",
@@ -6943,12 +7172,29 @@
         "redent": "^3.0.0"
       }
     },
+    "@testing-library/react": {
+      "version": "14.0.0",
+      "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.0.0.tgz",
+      "integrity": "sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg==",
+      "dev": true,
+      "requires": {
+        "@babel/runtime": "^7.12.5",
+        "@testing-library/dom": "^9.0.0",
+        "@types/react-dom": "^18.0.0"
+      }
+    },
     "@tootallnate/once": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
       "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",
       "dev": true
     },
+    "@types/aria-query": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz",
+      "integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==",
+      "dev": true
+    },
     "@types/babel__core": {
       "version": "7.20.0",
       "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.0.tgz",
@@ -7062,12 +7308,44 @@
       "integrity": "sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==",
       "dev": true
     },
+    "@types/prop-types": {
+      "version": "15.7.5",
+      "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",
+      "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==",
+      "dev": true
+    },
+    "@types/react": {
+      "version": "18.0.29",
+      "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.29.tgz",
+      "integrity": "sha512-wXHktgUABxplw1+UnljseDq4+uztQyp2tlWZRIxHlpchsCFqiYkvaDS8JR7eKOQm8wziTH/el5qL7D6gYNkYcw==",
+      "dev": true,
+      "requires": {
+        "@types/prop-types": "*",
+        "@types/scheduler": "*",
+        "csstype": "^3.0.2"
+      }
+    },
+    "@types/react-dom": {
+      "version": "18.0.11",
+      "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.11.tgz",
+      "integrity": "sha512-O38bPbI2CWtgw/OoQoY+BRelw7uysmXbWvw3nLWO21H1HSh+GOlqPuXshJfjmpNlKiiSDG9cc1JZAaMmVdcTlw==",
+      "dev": true,
+      "requires": {
+        "@types/react": "*"
+      }
+    },
     "@types/resolve": {
       "version": "1.20.2",
       "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
       "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==",
       "dev": true
     },
+    "@types/scheduler": {
+      "version": "0.16.3",
+      "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz",
+      "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==",
+      "dev": true
+    },
     "@types/stack-utils": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",
@@ -7542,6 +7820,12 @@
         }
       }
     },
+    "csstype": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
+      "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==",
+      "dev": true
+    },
     "data-urls": {
       "version": "3.0.2",
       "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz",
@@ -7974,6 +8258,12 @@
       "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
       "dev": true
     },
+    "harmony-reflect": {
+      "version": "1.6.2",
+      "resolved": "https://registry.npmjs.org/harmony-reflect/-/harmony-reflect-1.6.2.tgz",
+      "integrity": "sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==",
+      "dev": true
+    },
     "has": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
@@ -8070,6 +8360,15 @@
         "safer-buffer": ">= 2.1.2 < 3.0.0"
       }
     },
+    "identity-obj-proxy": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz",
+      "integrity": "sha512-00n6YnVHKrinT9t0d9+5yZC6UBNJANpYEQvL2LlX6Ab9lnmxzIRcEmTPuyGScvl1+jKuCICX1Z0Ab1pPKKdikA==",
+      "dev": true,
+      "requires": {
+        "harmony-reflect": "^1.4.6"
+      }
+    },
     "immutable": {
       "version": "4.3.0",
       "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz",
@@ -9254,6 +9553,7 @@
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
       "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+      "peer": true,
       "requires": {
         "js-tokens": "^3.0.0 || ^4.0.0"
       }
@@ -9267,6 +9567,12 @@
         "yallist": "^3.0.2"
       }
     },
+    "lz-string": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz",
+      "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
+      "dev": true
+    },
     "magic-string": {
       "version": "0.27.0",
       "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz",
@@ -9642,6 +9948,7 @@
       "version": "18.2.0",
       "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
       "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
+      "peer": true,
       "requires": {
         "loose-envify": "^1.1.0"
       }
@@ -9650,6 +9957,7 @@
       "version": "18.2.0",
       "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
       "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
+      "peer": true,
       "requires": {
         "loose-envify": "^1.1.0",
         "scheduler": "^0.23.0"
@@ -9879,6 +10187,7 @@
       "version": "0.23.0",
       "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
       "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
+      "peer": true,
       "requires": {
         "loose-envify": "^1.1.0"
       }
diff --git a/package.json b/package.json
index c82c4a3..e966f52 100644
--- a/package.json
+++ b/package.json
@@ -48,6 +48,8 @@
     "@rollup/plugin-commonjs": "^24.0.1",
     "@rollup/plugin-node-resolve": "^15.0.1",
     "@testing-library/jest-dom": "^5.16.5",
+    "@testing-library/react": "^14.0.0",
+    "identity-obj-proxy": "^3.0.0",
     "jest": "^29.5.0",
     "jest-environment-jsdom": "^29.5.0",
     "rollup-plugin-peer-deps-external": "^2.2.4",
@@ -57,8 +59,11 @@
     "ts-jest": "^29.0.5",
     "typescript": "^5.0.2"
   },
-  "dependencies": {
+  "peerDependencies": {
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
+  },
+  "dependencies": {
+    "@dynamicss/dynamicss": "^2.2.8"
   }
 }
diff --git a/src/core/color/colors.d.ts b/src/core/color/colors.d.ts
new file mode 100644
index 0000000..471c412
--- /dev/null
+++ b/src/core/color/colors.d.ts
@@ -0,0 +1,65 @@
+/**
+ * Make the color into a darker color
+ * @param colorInput
+ * @returns the darked color in
+ */
+export declare const darkerColor: (colorInput: string, percentage?: number) => string;
+/**
+ * Make the color into a brighted color
+ * @param colorInput
+ * @returns the brighted color
+ */
+export declare const brighterColor: (colorInput: string, percentage?: number) => string;
+/**
+ * In order to managae rgba() we convert hex colors into rgba()
+ * If the given color is already a rgb() color, it can add the percentage to convert it into rgba()
+ *
+ *
+ * @param colorInput color in hex or in rgb
+ * @param perc percentage for RGBA() color
+ * @returns the rgba representation of a hex color
+ */
+export declare const hexColorToRGB: (colorInput: string | undefined, perc?: number, defaultColor?: string) => string;
+/**
+ * Validates wheteher the color is hexadecimal css color
+ * Example:  #FF56AC
+ *
+ *
+ * @param colorInput the color inpt to test
+ * @returns true if the inputColor is a hexadecimal css color
+ */
+export declare const isHexColor: (colorInput: string) => boolean;
+/**
+ * Converts a named color into hexadecimal color
+ * from a list of well known namd colors if found.
+ * When not given returns a ""
+ * When not found in the list, returns the same value given
+ * @param colour the named color
+ * @returns The hex representation of the color or "" or the same color
+ */
+export declare function colourNameToHex(colour: string | undefined): string;
+/**
+ * Converts hex number in string representation to decimal number
+ *
+ *
+ * @param letter the string hex number
+ * @returns a decimal number
+ */
+export declare const hexTodec: (letter: string) => number;
+/**
+ * Asure a base color. When not given or when given an incorrect color format
+ * default color is this kind of grey #5d6475
+ *
+ * @param color param color given by user
+ * @returns returns the same color
+ */
+export declare const asureColor: (color?: string) => string;
+/**
+ * Asure a base color. When not given or when given an incorrect color format
+ * default color is this kind of grey #5d6475
+ *
+ * @param color param color given by user
+ * @returns returns the same color
+ */
+export declare const completeAsureColor: (color?: string, perc?: number) => string;
+export declare const DEFAULT_FONT_COLOR = "#646c7f";
diff --git a/src/core/color/index.d.ts b/src/core/color/index.d.ts
new file mode 100644
index 0000000..2b51c13
--- /dev/null
+++ b/src/core/color/index.d.ts
@@ -0,0 +1,2 @@
+export { NAMED_COLORS } from "./namedColors";
+export { asureColor, brighterColor, colourNameToHex, darkerColor, hexColorToRGB, hexTodec, isHexColor, completeAsureColor } from "./colors";
diff --git a/src/core/color/namedColors.d.ts b/src/core/color/namedColors.d.ts
new file mode 100644
index 0000000..661cdc3
--- /dev/null
+++ b/src/core/color/namedColors.d.ts
@@ -0,0 +1,6 @@
+import { NamedColor } from "../types/NamedColor";
+/**
+ * The full list of named Colors provided by
+ * https://htmlcolorcodes.com/es/nombres-de-los-colores/
+ */
+export declare const NAMED_COLORS: NamedColor;
diff --git a/src/core/download/downloadFile.d.ts b/src/core/download/downloadFile.d.ts
new file mode 100644
index 0000000..5bd48e9
--- /dev/null
+++ b/src/core/download/downloadFile.d.ts
@@ -0,0 +1,4 @@
+export declare const downloadFileAnchor: (fileName?: string, downloadUrl?: string) => Promise<void>;
+export declare const downloadFileXHR: (fileName?: string, downloadUrl?: string) => Promise<void>;
+export declare const downloadFileFetch: (fileName?: string, downloadUrl?: string) => Promise<void>;
+export declare const downloadAnchor: (fileName?: string, downloadUrl?: string) => Promise<void>;
diff --git a/src/core/file-manager/index.d.ts b/src/core/file-manager/index.d.ts
new file mode 100644
index 0000000..2ef646c
--- /dev/null
+++ b/src/core/file-manager/index.d.ts
@@ -0,0 +1 @@
+export { extFileReconcilation } from "./reconcilation";
diff --git a/src/core/file-manager/reconcilation.d.ts b/src/core/file-manager/reconcilation.d.ts
new file mode 100644
index 0000000..198c59f
--- /dev/null
+++ b/src/core/file-manager/reconcilation.d.ts
@@ -0,0 +1,2 @@
+import { ExtFile } from "../types";
+export declare const extFileReconcilation: (dropzoneId: number | string | undefined, extFileIncomming: ExtFile[]) => ExtFile[] | undefined;
diff --git a/src/core/index.d.ts b/src/core/index.d.ts
new file mode 100644
index 0000000..899e993
--- /dev/null
+++ b/src/core/index.d.ts
@@ -0,0 +1,12 @@
+export { DropzoneEnglish, DropzoneFrench, DropzoneItalian, DropzoneLocalizer, DropzoneLocalizerSelector, DropzonePortuguese, DropzoneRussian, DropzoneSimplifiedChinese, DropzoneSpanish, DropzoneTraditionalChinese, FileItemEnglish, FileItemFrench, FileItemItalian, FileItemLocalizer, FileItemLocalizerSelector, FileItemPortuguese, FileItemRussian, FileItemSimplifiedChinese, FileItemSpanish, FileItemTraditionalChinese, ValidateErrorEnglish, ValidateErrorFrench, ValidateErrorItalian, ValidateErrorLocalizer, ValidateErrorLocalizerSelector, ValidateErrorPortuguese, ValidateErrorRussian, ValidateErrorSimplifiedChinese, ValidateErrorSpanish, ValidateErrorTraditionalChinese } from "./localization";
+export { readAsArrayBuffer, readAsBinaryString, readAsDataURL, readAsText, resizeImage, getImageOrientation } from "./reader";
+export { aac, abw, accdb, avi, azw, bmp, bz, bz2, cda, csh, css, csv, docx, drawio, eot, epub, freearc, gif, gzip, html, icalendar, jar, java, javascript, jpeg, json, jsonld, midi, mp3, mp4, mpeg, mpkg, octet, odp, ods, odt, oga, ogv, ogx, opus, otf, pdf, php, png, pptx, psd, python, rar, react, rtf, sass, sevenzip, sh, swf, tar, text, tiff, ttf, typescript, vsd, vue, wav, weba, webm, webp, wma, wmv, woff, xlsx, xml, xul, zip, applicationSelector, audioSelector, checkIsCode, extensionSelector, fontSelector, getURLFileIco, imageSelector, mimeSelector, textSelector, videoSelector, getURLFileIcoFromNameAndType, } from "./mime";
+export type { ExtFile, Behaviour, ValidateFileResponse, ComponentLocalizer, ExtFileListMap, FileValidatorProps, FunctionLabel, LocalLabels, Localization, Method, NamedColor, ServerResponse, UploadPromiseResponse, UploadResponse, UploadConfig, UPLOADSTATUS, IconsMap } from "./types";
+export { ExtFileInstance, ExtFileManager, createUploadConfig } from "./types";
+export { extFileMock } from "./mocks";
+export { uploadExtFile, FuiUpload, completeUploadResult, instantPreparingToUploadOne, preparingToUploadOne, sleepTransition, toUploadableExtFileList, unableToUploadResult, makeServerResponse, uploadFile, uploadFormData, ABORTED_ERROR_RESPONSE, JSON_PARSE_ERROR_RESPONSE, JsonParseResponse, NO_XHR_PROVIDED_ERROR, TIMEOUT_ERROR_RESPONSE, UNEXPECTED_ERROR_RESPONSE, makeErrorUploadResponse, makeSuccessUploadResponse, addExtraData, addHeaders, sanitizeArrExtFile, unexpectedErrorUploadResult, setNextUploadStatus } from "./upload";
+export { FileIdGenerator, fileListToExtFileArray, fileListToExtFileInstanceArray, fileSizeFormater, getExt, isValidateActive, shrinkWord, fakeFuiUpload, prepToUploadOne, setPrepToUploading, sleepPreparing, uploadOne, uploadOneExtFile, cleanInput, addClassName, getRandomInt, isUploadAbleExtFile, getLocalFileItemData } from "./utils";
+export { fileListvalidator, separateAccept, validateAccept, validateExtFile, validateExtFileList, validateFile } from "./validation";
+export { asureColor, brighterColor, colourNameToHex, darkerColor, hexColorToRGB, hexTodec, isHexColor, NAMED_COLORS, completeAsureColor } from "./color";
+export { SyntheticFile, createListOfMultiTypeFile, createSyntheticFile, makeSyntheticExtFile } from "./synthetic-file";
+export { extFileReconcilation } from "./file-manager";
diff --git a/src/core/index.es.js b/src/core/index.es.js
new file mode 100644
index 0000000..68eb296
--- /dev/null
+++ b/src/core/index.es.js
@@ -0,0 +1,2 @@
+var e=function(e){if(e)return e<1024?e+" Bytes":e<1048576?(e/1024).toFixed(2)+" KB":e<1073741824?(e/1024/1024).toFixed(2)+" MB":e<1099511627776?(e/1024/1024/1024).toFixed(2)+" GB":(e/1024/1024/1024/1024).toFixed(2)+" TB"},t={defaultLabel:"Trascina qui i tuoi file",uploadingMessage:function(e){return"Caricamento di ".concat(e," file")},uploadFinished:function(e,t){return"File caricati: ".concat(e,", File rifiutati: ").concat(t)},noFilesMessage:"Nessun file valido in attesa di essere caricato",footer:{acceptAll:"Tutti i tipi di file sono accettati",acceptCustom:function(e){return"Tipi di file consentiti: ".concat(e)}},header:{uploadFilesMessage:"Caricamento",maxSizeMessage:function(e){return"Dimensione massima ".concat(e)},validFilesMessage:function(e,t){return"File  ".concat(e,"/").concat(t)}},fakeuploadsuccess:"Il file è stato caricato con successo ",fakeUploadError:"Errore di caricamento del file"},r={fullInfoLayer:{name:"Nome: ",size:"Dimensione: ",type:"Tipo: "},status:{preparing:"preparazione",uploading:"In corso",success:"Successo",valid:"Valido",denied:"Non válido",error:"Errore",aborted:"Interrotto"}},a={maxSizeError:function(t){return"Il file è molto grande. Il tam. il massimo è ".concat(e(t))},acceptError:"Tipo di file illegale",maxFileCount:function(e){return"Numero massimo di file (".concat(e,") raggiunto")}},n={defaultLabel:"Déposez vos fichiers ici",uploadingMessage:function(e){return"Envoi de ".concat(e," fichiers")},uploadFinished:function(e,t){return"Fichiers téléchargés : ".concat(e,", Fichiers rejetés: ").concat(t)},noFilesMessage:"Aucun fichier valide ne manque",footer:{acceptAll:"Tous types de fichiers acceptés ",acceptCustom:function(e){return"Types de fichier: ".concat(e)}},header:{uploadFilesMessage:"Envoyer",maxSizeMessage:function(e){return"Taille maximale ".concat(e)},validFilesMessage:function(e,t){return"Fichiers  ".concat(e,"/").concat(t)}},fakeuploadsuccess:"Le fichier a été téléchargé avec succès",fakeUploadError:"Erreur lors du téléchargement "},i={fullInfoLayer:{name:"Le nom: ",size:"Le taille: ",type:"Le type: "},status:{preparing:"préparer",uploading:"En cours",success:"Succès",valid:"Valide",denied:"Refusé",error:"Erreur",aborted:"Interrompu"}},c={maxSizeError:function(t){return"Le fichier est très volumineux. Le tam. le maximum est de ".concat(e(t))},acceptError:"Type de fichier illégal ",maxFileCount:function(e){return"Limite de fichiers atteinte (".concat(e,")")}},o={defaultLabel:"Drop your files here",uploadingMessage:function(e){return"Uploading ".concat(e," files")},uploadFinished:function(e,t){return"Uploaded files: ".concat(e,", Rejected files: ").concat(t)},noFilesMessage:"There is no missing valid file to upload",footer:{acceptAll:"All file types accepted",acceptCustom:function(e){return"Allowed types: ".concat(e)}},header:{uploadFilesMessage:"Upload files",maxSizeMessage:function(e){return"Max file size: ".concat(e)},validFilesMessage:function(e,t){return"Files ".concat(e,"/").concat(t)}},fakeuploadsuccess:"File was successfuly uploaded",fakeUploadError:"Error on uploading. Please try again later."},s={fullInfoLayer:{name:"Name: ",size:"Size: ",type:"Type: "},status:{preparing:"Preparing",uploading:"Uploading",success:"Success",valid:"Valid",denied:"Not valid",error:"Error",aborted:"Aborted"}},u={maxSizeError:function(t){return"File is too big. Max file size allowed is ".concat(e(t))},acceptError:"File type is not allowed",maxFileCount:function(e){return"Max amount of files (".concat(e,") has been reached")}},l={defaultLabel:"Suelta tus archivos aquí",uploadingMessage:function(e){return"Subiendo ".concat(e," archivos")},uploadFinished:function(e,t){return"Archivos subidos: ".concat(e,", Archivos rechazados: ").concat(t)},noFilesMessage:"No hay archivos válidos pendientes por subir",footer:{acceptAll:"Todos los tipos de archivo aceptados",acceptCustom:function(e){return"Tipo(s) de archivo permitidos: ".concat(e)}},header:{uploadFilesMessage:"Subir",maxSizeMessage:function(e){return"Tam. máximo ".concat(e)},validFilesMessage:function(e,t){return"Archivos ".concat(e,"/").concat(t)}},fakeuploadsuccess:"El archivo se subió correctamente",fakeUploadError:"Error al subir el archivo"},p={fullInfoLayer:{name:"Nombre: ",size:"Tamaño: ",type:"Tipo: "},status:{preparing:"Preparando",uploading:"Subiendo",success:"Éxito",valid:"Válido",denied:"No válido",error:"Error",aborted:"Anulado"}},d={maxSizeError:function(t){return"El archivo es muy grande. El tam. máximo es ".concat(e(t))},acceptError:"Tipo de archivo no permitido",maxFileCount:function(e){return"Cantidad máxima de archivos (".concat(e,") alcanzada")}},f={defaultLabel:"Перетащите сюда свои файлы.",uploadingMessage:function(e){return"Выгрузка ".concat(e," файлов")},uploadFinished:function(e,t){return"Загружено файлов: ".concat(e,", отклоненных файлов: ").concat(t)},noFilesMessage:"Действительный файл не отсутствует для загрузки",footer:{acceptAll:"Принимаются все типы файлов ",acceptCustom:function(e){return"Допустимые типы: ".concat(e)}},header:{uploadFilesMessage:"Отправить",maxSizeMessage:function(e){return"макс размер: ".concat(e)},validFilesMessage:function(e,t){return"Файлы ".concat(e,"/").concat(t)}},fakeuploadsuccess:"Файл был успешно загружен",fakeUploadError:"Ошибка при загрузке"},g={fullInfoLayer:{name:"Имя: ",size:"Размер: ",type:"Tип: "},status:{preparing:"подготовка",uploading:"Загрузка",success:"успех",valid:"годный",denied:"выкинутый",error:"ошибка",aborted:"прерванный"}},m={maxSizeError:function(t){return"Файл слишком большой. Максимально допустимый размер файла - ".concat(e(t))},acceptError:"Тип файла не разрешен",maxFileCount:function(e){return"Достигнуто максимальное количество файлов (".concat(e,")")}},h={defaultLabel:"Solte seus arquivos aqui ",uploadingMessage:function(e){return"Enviando ".concat(e," arquivos")},uploadFinished:function(e,t){return"Arquivos enviados: ".concat(e,", Arquivos rejeitados: ").concat(t)},noFilesMessage:"Nenhum arquivo válido está faltando para enviar",footer:{acceptAll:"Todos os tipos de arquivo são aceitos",acceptCustom:function(e){return"Tipos permitidos: ".concat(e)}},header:{uploadFilesMessage:"Enviar",maxSizeMessage:function(e){return"Tamanho máximo: ".concat(e)},validFilesMessage:function(e,t){return"Arquivos ".concat(e,"/").concat(t)}},fakeuploadsuccess:"O arquivo foi enviado com sucesso",fakeUploadError:"Erro ao enviar"},b={fullInfoLayer:{name:"Nome: ",size:"Tamanho: ",type:"Tipo: "},status:{preparing:"Preparando",uploading:"Enviando",success:"Êxito",valid:"válido",denied:"Negado",error:"Erro",aborted:"Abortado"}},v={maxSizeError:function(t){return"O arquivo é muito grande. O tamanho máximo de arquivo permitido é ".concat(e(t))},acceptError:"O tipo de arquivo não é permitido ",maxFileCount:function(e){return"Quantidade máxima de arquivos (".concat(e,") alcançada")}},F={defaultLabel:"将您的文件放在这里",uploadingMessage:function(e){return"上传 ".concat(e," 个文件")},uploadFinished:function(e,t){return"上传文件:".concat(e,",拒绝文件:").concat(t)},noFilesMessage:"没有缺少要加载的有效文件",footer:{acceptAll:"接受所有文件类型",acceptCustom:function(e){return"允许的类型: ".concat(e)}},header:{uploadFilesMessage:"上传文件",maxSizeMessage:function(e){return"最大文件大小:".concat(e)},validFilesMessage:function(e,t){return"文档 ".concat(e,"/").concat(t)}},fakeuploadsuccess:"文件已成功上传",fakeUploadError:"上传时出错"},w={fullInfoLayer:{name:"文档名称: ",size:"尺寸: ",type:"文件类型: "},status:{preparing:"预加载",uploading:"上传",success:"成功",valid:"接受的文件",denied:"被拒绝的文件",error:"错误",aborted:"中止"}},x={maxSizeError:function(t){return"文件太大。 允许的最大文件大小为 ".concat(e(t))},acceptError:"文件类型不允许",maxFileCount:function(e){return"已达到最大文件数 (".concat(e,")")}},_={defaultLabel:"把你的文件放在這裡 ",uploadingMessage:function(e){return"上傳".concat(e,"個文件")},uploadFinished:function(e,t){return"上傳文件: ".concat(e,", 拒絕的文件:").concat(t)},noFilesMessage:"沒有缺少要上傳的有效文件",footer:{acceptAll:"接受所有文件類型",acceptCustom:function(e){return"允許的類型:".concat(e)}},header:{uploadFilesMessage:"上傳文件",maxSizeMessage:function(e){return"最大文件大小:".concat(e)},validFilesMessage:function(e,t){return" 文件 ".concat(e,"/").concat(t)}},fakeuploadsuccess:"文件已成功上傳",fakeUploadError:"上傳時出錯"},y={fullInfoLayer:{name:"文檔名稱: ",size:"文件大小: ",type:"文件類型: "},status:{preparing:"預加載",uploading:"上傳",success:"成功",valid:"有效文件",denied:"無效文件",error:"錯誤",aborted:"中止"}},E={maxSizeError:function(t){return"文件太大。 允許的最大文件大小為 ".concat(e(t))},acceptError:"文件類型不允許",maxFileCount:function(e){return"已達到最大文件數 (".concat(e,")")}},A={"ES-es":p,"EN-en":s,"FR-fr":i,"IT-it":r,"PT-pt":b,"RU-ru":g,"ZH-cn":w,"ZH-hk":y},z=function(e){switch(e){case"ES-es":return A["ES-es"];case"EN-en":default:return A["EN-en"];case"FR-fr":return A["FR-fr"];case"IT-it":return A["IT-it"];case"PT-pt":return A["PT-pt"];case"RU-ru":return A["RU-ru"];case"ZH-cn":return A["ZH-cn"];case"ZH-hk":return A["ZH-hk"]}},k={"ES-es":l,"EN-en":o,"FR-fr":n,"IT-it":t,"PT-pt":h,"RU-ru":f,"ZH-cn":F,"ZH-hk":_},S=function(e){switch(e){case"ES-es":return k["ES-es"];case"EN-en":default:return k["EN-en"];case"FR-fr":return k["FR-fr"];case"IT-it":return k["IT-it"];case"PT-pt":return k["PT-pt"];case"RU-ru":return k["RU-ru"];case"ZH-cn":return k["ZH-cn"];case"ZH-hk":return k["ZH-hk"]}},M={"ES-es":d,"EN-en":u,"FR-fr":c,"IT-it":a,"PT-pt":v,"RU-ru":m,"ZH-cn":x,"ZH-hk":E},D=function(e){return e&&["ES-es","EN-en","FR-fr","IT-it","PT-pt","RU-ru","ZH-cn","ZH-hk"].includes(e)?M[e]:M["EN-en"]},j=function(e,t,r){return new Promise((function(a,n){try{var i=new FileReader;i.onprogress=function(){null==t||t()},i.onerror=function(){null==r||r()},i.onload=function(){a(i.result)},i.readAsDataURL(e)}catch(e){n(void 0)}}))},C=function(e,t,r,a){return new Promise((function(n,i){try{var c=new FileReader;c.onload=function(){n(c.result)},c.onprogress=function(){null==r||r()},c.onerror=function(){null==a||a()},c.readAsText(e,t||"base64")}catch(e){i(void 0)}}))},B=function(e,t,r){return new Promise((function(a,n){try{var i=new FileReader;i.onload=function(){a(i.result)},i.onprogress=function(){null==t||t()},i.onerror=function(){null==r||r()},i.readAsBinaryString(e)}catch(e){n(void 0)}}))},T=function(e,t,r){return new Promise((function(a,n){try{var i=new FileReader;i.onload=function(){a(i.result)},i.onprogress=function(){null==t||t()},i.onerror=function(){null==r||r()},i.readAsArrayBuffer(e)}catch(e){n(void 0)}}))};function I(e,t,r){return void 0===t&&(t=135),void 0===r&&(r=120),new Promise((function(a,n){try{var i=new Image;i.src=e,i.onload=function(){var c=document.createElement("canvas"),o=t,s=r,u=i.width,l=i.height;t>u&&r>l?a(e):u>l?u>o&&(l*=o/u,u=o):l>s&&(u*=s/l,l=s),c.width=u,c.height=l;var p=c.getContext("2d");p?(p.drawImage(i,0,0,u,l),a(c.toDataURL())):("development"===process.env.NODE_ENV&&console.error("An error ocurred when trying to make a thumnail"),n(void 0))}}catch(e){"development"===process.env.NODE_ENV&&console.error("An error ocurred when trying to make a thumnail"),n(void 0)}}))}function L(e){return new Promise((function(t,r){if(e&&0!==e.length)try{var a=new Image;a.src=e,a.onerror=function(e){r("landscape")},a.onload=function(){var e=a.width,r=a.height;t(e>r?"landscape":"portrait")}}catch(e){"development"===process.env.NODE_ENV&&console.error("An error ocurred when trying to get the image orientation"),r("landscape")}else r("landscape")}))}var R="https://user-images.githubusercontent.com/43678736/132086517-72a51a12-e403-4675-bfd7-22c23affa730.png",U="https://user-images.githubusercontent.com/43678736/132086518-7026d4f1-ea16-4ed0-89fd-37c1aa8ac3ed.png",N="https://user-images.githubusercontent.com/43678736/132086519-863c63b4-917e-4471-94ff-7e15651cc14b.png",P="https://user-images.githubusercontent.com/43678736/132086520-9bc6aa3b-51c9-4da2-9ef7-349162b86d0b.png",q="https://user-images.githubusercontent.com/43678736/132086521-dbd6cf0d-d4d7-4b92-bb26-17e8a51a9383.png",O="https://user-images.githubusercontent.com/43678736/132086522-070f48e8-78a8-4294-8dbb-aab81525e164.png",H="https://user-images.githubusercontent.com/43678736/132086595-90ab7f90-f87e-4900-94d9-d0b26745df48.png",Z="https://user-images.githubusercontent.com/43678736/132086597-e285ad5c-613a-4679-a270-493e5be4ffd9.png",V="https://user-images.githubusercontent.com/43678736/132086598-623c410a-084a-4395-a448-211b2ff61cfe.png",G="https://user-images.githubusercontent.com/43678736/132086600-8b70a007-512d-4252-9c66-eabd3ddd6573.png",X="https://user-images.githubusercontent.com/43678736/132086601-e62e5d1a-d8a2-4475-a14f-85922cec9272.png",K="https://user-images.githubusercontent.com/43678736/132086602-4c772934-f608-4f01-8459-c4622cee8ad5.png",J="https://user-images.githubusercontent.com/43678736/132086604-b5b019fe-572e-477e-92c2-3769a48a1304.png",Q="https://user-images.githubusercontent.com/43678736/132086606-715ccb66-4702-4f7d-9b09-ac93ba17b643.png",$="https://user-images.githubusercontent.com/43678736/132086608-bcae9d57-8e54-488c-90c4-4952ae530b5e.png",W="https://user-images.githubusercontent.com/43678736/132086618-397d6bd2-9fda-43ed-a135-cb40388c35af.png",Y="https://user-images.githubusercontent.com/43678736/132086620-2586ba40-c583-4589-b1a4-8bb5b258b44d.png",ee="https://user-images.githubusercontent.com/43678736/132086621-3b95fb64-2533-4ccc-abcd-bd2beba572e9.png",te="https://user-images.githubusercontent.com/43678736/132086622-af705a0c-2b25-4ba7-8ab6-bd69ec97f7e2.png",re="https://user-images.githubusercontent.com/43678736/132086624-89141a46-64e4-4fa0-bf69-54a0eb4d48c9.png",ae="https://user-images.githubusercontent.com/43678736/132086625-1b8f2652-1de0-4475-8c12-7da4a9973ffb.png",ne="https://user-images.githubusercontent.com/43678736/132086626-38699705-1e6f-4bca-984b-03167b236faa.png",ie="https://user-images.githubusercontent.com/43678736/132086650-f1166246-b361-4c30-a04e-9781c555d14a.png",ce="https://user-images.githubusercontent.com/43678736/132086650-f1166246-b361-4c30-a04e-9781c555d14a.png",oe="https://user-images.githubusercontent.com/43678736/132086652-4562942e-aaea-466c-968f-380fffabf3f9.png",se="https://user-images.githubusercontent.com/43678736/132086653-0487e7e2-1ee3-49e2-8cfe-3e20f1f7490a.png",ue="https://user-images.githubusercontent.com/43678736/132086656-6e96c815-e4e2-4ffd-9d71-57e9cc2450bc.png",le="https://user-images.githubusercontent.com/43678736/132086658-5d27d3c2-394f-43fb-b512-9b414a257875.png",pe="https://user-images.githubusercontent.com/43678736/132086659-98f3ef6e-b9f3-4b6d-b18f-469b5334ba27.png",de="https://user-images.githubusercontent.com/43678736/132086661-a5484553-06c7-4ffa-a8f9-96b57b1b0344.png",fe="https://user-images.githubusercontent.com/43678736/132086662-05ad1597-d5e5-4efa-833e-2876e966a745.png",ge="https://user-images.githubusercontent.com/43678736/132086663-90c58955-f7fb-4bdb-ac53-92667d16d4a3.png",me="https://user-images.githubusercontent.com/43678736/132086664-9a7530e7-6d78-4ef3-a176-20cf7f57b555.png",he="https://user-images.githubusercontent.com/43678736/132086666-ab3c505d-b2c0-4177-9a06-aed5d9c39ee4.png",be="https://user-images.githubusercontent.com/43678736/132086667-6c7dcbcc-8d83-41a2-8e0a-85b09e2791ae.png",ve="https://user-images.githubusercontent.com/43678736/132086668-9f246e91-cf2e-49cf-9617-e1fbb71abbbb.png",Fe="https://user-images.githubusercontent.com/43678736/132086669-46113762-84d1-4b32-9441-b0138ce17a5d.png",we="https://user-images.githubusercontent.com/43678736/145835364-2054509d-3448-4d34-921f-73dd6e297fc7.png",xe="https://user-images.githubusercontent.com/43678736/145835367-19172bf8-cd5a-4cbe-b512-d0de1d91f269.png",_e="https://user-images.githubusercontent.com/43678736/145835373-a57ef0f5-3968-483b-9f55-6d67e7f1dcea.png",ye="https://user-images.githubusercontent.com/43678736/132086670-0f96e770-cedc-4635-a5f9-cf97894c1d7a.png",Ee="https://user-images.githubusercontent.com/43678736/132086671-02ad35ef-ec3a-4a65-abd5-5bf794dfcf7b.png",Ae="https://user-images.githubusercontent.com/43678736/132086672-3a856fda-823d-4997-b802-c7c640e6ef44.png",ze="https://user-images.githubusercontent.com/43678736/132086673-0c4409ab-754e-4619-8cfa-179d0ccf1bd9.png",ke="https://user-images.githubusercontent.com/43678736/132086674-fdb56d02-5845-49b7-8462-6357bc963464.png",Se="https://user-images.githubusercontent.com/43678736/132086675-c879645d-acb4-41a6-ab3c-4e6c2048badb.png",Me="https://user-images.githubusercontent.com/43678736/132086685-4e327c4c-a409-4b83-b36a-8d88936b314b.png",De="https://user-images.githubusercontent.com/43678736/132086688-8e82fae4-3a9b-49c0-bf99-77189525514c.png",je="https://user-images.githubusercontent.com/43678736/132086689-fe1fef9f-d2db-455b-8f4b-09acd095f571.png",Ce="https://user-images.githubusercontent.com/43678736/132086689-fe1fef9f-d2db-455b-8f4b-09acd095f571.png",Be="https://user-images.githubusercontent.com/43678736/132086691-d472576b-ec6a-4332-acd2-dd6a00b72952.png",Te="https://user-images.githubusercontent.com/43678736/132086693-9d43571e-0c86-438f-b247-e2cb42e19e06.png",Ie="https://user-images.githubusercontent.com/43678736/132086694-4e661d6a-1118-441e-8bc3-c52fcb2133b6.png",Le="https://user-images.githubusercontent.com/43678736/132086697-1d82d724-35b6-4f06-847a-3c59a5deda6e.png",Re="https://user-images.githubusercontent.com/43678736/132086698-19384230-dbd7-4e05-bc69-ef4537b6aae3.png",Ue="https://user-images.githubusercontent.com/43678736/132086699-5993a482-04f4-4915-b105-9037f527cf61.png",Ne="https://user-images.githubusercontent.com/43678736/132086700-c23461c8-6819-46e1-aecd-0a1f8d3507bb.png",Pe="https://user-images.githubusercontent.com/43678736/132086701-c8044c09-8d95-4af1-9410-66761001d7da.png",qe="https://user-images.githubusercontent.com/43678736/132086702-59294337-ed99-4302-badd-316b2c1ff62f.png",Oe="https://user-images.githubusercontent.com/43678736/132086704-8fd51e7c-afa2-47a3-ab2f-d0bcd0ecae9f.png",He="https://user-images.githubusercontent.com/43678736/132086705-33294da1-5c0f-49f7-b890-e4857cec0a6d.png",Ze="https://user-images.githubusercontent.com/43678736/132086706-22f805d0-39d4-494b-824e-47dc75d05eb7.png",Ve="https://user-images.githubusercontent.com/43678736/132086707-e61a84de-d396-4dbf-8d1b-1d6ee19e1ac8.png",Ge="https://user-images.githubusercontent.com/43678736/132086707-e61a84de-d396-4dbf-8d1b-1d6ee19e1ac8.png",Xe="https://user-images.githubusercontent.com/43678736/132086708-21d096dd-7148-40aa-97f1-cbb099339740.png",Ke="https://user-images.githubusercontent.com/43678736/132086709-811d4e90-3cfa-4044-a956-aeda9c67fc92.png",Je="https://user-images.githubusercontent.com/43678736/132086710-c5479c6c-0249-4542-adad-48b0ef40b775.png",Qe="https://user-images.githubusercontent.com/43678736/132086711-1524a3e7-3e33-4822-a34f-ff3235404045.png",$e="https://user-images.githubusercontent.com/43678736/132086712-17e2c491-f6e4-4586-aef6-06bcc5f4b0e5.png",We="https://user-images.githubusercontent.com/43678736/132086715-204b5a8b-9c5a-4bac-8294-9237ebc16089.png",Ye="https://user-images.githubusercontent.com/43678736/132086716-64511d20-58cb-45a8-85df-f4d9408b469d.png",et="https://user-images.githubusercontent.com/43678736/132086718-a8499333-6282-4820-aa1f-4d133eb54648.png",tt=function(e){var t=/(?:\.([^.]+))?$/.exec(e);return t?t[1]:""},rt="octet",at=function(e){switch(e){case"aac":return"aac";case"midi":case"x-midi":return"midi";case"mpeg":return"mpeg";case"ogg":return"oga";case"opus":return"opus";case"wav":return"wav";case"webm":return"webm";case"wma":return"wma";default:return rt}},nt=function(e){switch(e){case"css":return"css";case"csv":return"csv";case"html":return"html";case"calendar":return"icalendar";case"javascript":case"x-javascript":return"javascript";case"plain":return"text";case"xml":return"xml";default:return rt}},it=function(e){switch(e){case"bmp":return"bmp";case"gif":return"gif";case"jpg":case"jpeg":return"jpeg";case"png":return"png";case"tiff":return"tiff";case"webp":return"webp";default:return rt}},ct=function(e){switch(e){case"otf":return"otf";case"ttf":return"ttf";case"woff":case"woff2":return"woff";default:return rt}},ot=function(e){switch(e){case"x-msvideo":case"msvideo":case"avi":return"avi";case"mp4":return"mp4";case"mpeg":return"mpeg";case"ogg":return"ogv";case"mp2t":return"mp2t";case"wmv":return"wmv";case"webm":return"webm";default:return rt}},st=function(e){switch(e){case"x-abiword":case"abiword":return"abw";case"x-freearc":case"freearc":return"arc";case"vnd.amazon.ebook":return"azw";case"octet-stream":return"octet";case"x-bzip":case"bzip":return"bz";case"x-bzip2":case"bzip2":return"bz2";case"x-cdf":return"cda";case"msaccess":return"accdb";case"csh":case"x-csh":return"csh";case"vnd.ms-fontobject":return"eot";case"epub+zip":return"epub";case"gzip":return"gzip";case"java-archive":return"jar";case"x-javascript":return"javascript";case"json":return"json";case"ld+json":return"jsonld";case"vnd.apple.installer+xml":return"mpkg";case"ogg":return"ogx";case"vnd.rar":return"rar";case"rtf":return"rtf";case"x-sh":case"sh":return"sh";case"x-shockwave-flash":return"swf";case"x-tar":return"tar";case"x-httpd-php":return"php";case"vnd.visio":return"vsd";case"xhtml+xml":return"xhtml";case"xml":return"xml";case"vnd.mozilla.xul+xml":return"xul";case"vnd.openxmlformats-officedocument.wordprocessingml.document":case"msword":return"docx";case"vnd.openxmlformats-officedocument.spreadsheetml.sheet":return"xlsx";case"vnd.openxmlformats-officedocument.presentationml.presentation":case"vnd.ms-powerpoint":return"pptx";case"vnd.oasis.opendocument.presentation":return"odp";case"vnd.oasis.opendocument.text":return"odt";case"vnd.oasis.opendocument.spreadsheet":return"ods";case"zip":case"x-zip-compressed":return"zip";case"pdf":return"pdf";default:return rt}},ut=function(e){if(!e||!e.includes("/"))return rt;var t=e.split("/")[0],r=e.split("/")[1];switch(t){case"application":return st(r);case"audio":return at(r);case"video":return ot(r);case"text":return nt(r);case"image":return it(r);case"font":return ct(r);default:return rt}},lt=function(e){var t="octet";return e&&""!==e&&(e.includes("zip")||e.includes("rar")?t="zip":e.includes("doc")?t="docx":e.includes("xls")?t="xlsx":e.includes("drawio")?t="drawio":e.includes("psd")?t="psd":e.includes("csv")?t="csv":"jsx"===e?t="react":"py"===e?t="python":"vue"===e?t="vue":"java"===e?t="java":"ts"===e?t="typescript":"sass"!==e&&"scss"!==e||(t="sass")),t},pt=function(e){var t="text";return e&&""!==e&&("jsx"===e?t="react":"py"===e?t="python":"vue"===e?t="vue":"java"===e?t="java":"ts"===e||"tsx"===e?t="typescript":"js"===e?t="javascript":"xml"===e?t="xml":"php"===e&&(t="php")),t},dt=function(e,t){var r="fallBack";if(!e)return r=rt,(null==t?void 0:t.fallBack)?{url:null==t?void 0:t.fallBack,mimeResume:r}:{url:gt[r],mimeResume:r};r=ut(e.type);var a=tt(e.name);"text"===r&&(r=pt(a)),r===rt&&(r=lt(a));var n=null==t?void 0:t[r];return void 0!==n?{url:n,mimeResume:r}:{url:gt[r],mimeResume:r}},ft=function(e,t,r){var a="octet";if(!e)return a=rt,(null==r?void 0:r.fallBack)?{url:null==r?void 0:r.fallBack,mimeResume:a}:{url:gt[a],mimeResume:a};a=ut(t);var n=tt(e);"text"===a&&(a=pt(n)),a===rt&&(a=lt(n));var i=null==r?void 0:r[a];return void 0!==i?{url:i,mimeResume:a}:{url:gt[a],mimeResume:a}},gt={aac:U,accdb:P,abw:N,arc:ee,avi:q,azw:O,octet:he,bmp:H,bz:Z,bz2:V,cda:G,csh:X,css:K,csv:J,docx:Q,drawio:$,eot:W,epub:Y,gzip:re,gif:te,html:ae,icalendar:ne,jar:ce,jpeg:se,javascript:oe,json:ue,jsonld:le,midi:pe,mp3:de,mp4:fe,mpeg:ge,mpkg:me,mp2t:he,odp:be,ods:ve,odt:Fe,oga:we,ogv:xe,ogx:_e,opus:ye,otf:Ee,png:ke,pdf:Ae,php:ze,pptx:Se,psd:Me,rar:Ce,rtf:Te,sass:Ie,sh:Le,swf:Re,tar:je,tiff:Ne,ttf:Pe,typescript:qe,text:Ue,vsd:Oe,wav:Ze,weba:Ge,webm:Ve,webp:Xe,woff:Qe,wma:Ke,wmv:Je,xhtml:ae,xlsx:$e,xml:We,xul:Ye,zip:et,sevenzip:R,python:De,java:ie,react:Be,vue:He,fallBack:he},mt=function(){function e(e){var t=e.id,r=e.file,a=e.name,n=e.size,i=e.type,c=e.imageUrl,o=e.valid,s=e.errors,u=e.uploadMessage,l=e.uploadStatus,p=e.progress,d=e.xhr,f=e.extraData,g=e.extraUploadData,m=e.serverResponse,h=e.downloadUrl,b=e.videoUrl;this.id=t,this.file=r,this.name=a,this.size=n,this.type=i,this.imageUrl=c,this.valid=o,this.errors=s,this.uploadStatus=l,this.uploadMessage=u,this.progress=p,this.xhr=d,this.extraData=f,this.extraUploadData=g,this.serverResponse=m,this.downloadUrl=h,this.videoUrl=b}return e.toExtFile=function(e){for(var t={},r=Object.keys(e),a=Object.values(e),n=0;n<a.length;n++){var i=a[n],c=r[n];void 0!==i&&(t[c]=i)}return t},e.prototype.toExtFile=function(){return e.toExtFile(this)},e}(),ht=function(){return ht=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},ht.apply(this,arguments)};function bt(e,t,r,a){return new(r||(r=Promise))((function(n,i){function c(e){try{s(a.next(e))}catch(e){i(e)}}function o(e){try{s(a.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(c,o)}s((a=a.apply(e,t||[])).next())}))}function vt(e,t){var r,a,n,i,c={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,o[0]&&(c=0)),c;)try{if(r=1,a&&(n=2&o[0]?a.return:o[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,o[1])).done)return n;switch(a=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return c.label++,{value:o[1],done:!1};case 5:c.label++,a=o[1],o=[0];continue;case 7:o=c.ops.pop(),c.trys.pop();continue;default:if(!(n=c.trys,(n=n.length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){c=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){c.label=o[1];break}if(6===o[0]&&c.label<n[1]){c.label=n[1],n=o;break}if(n&&c.label<n[2]){c.label=n[2],c.ops.push(o);break}n[2]&&c.ops.pop(),c.trys.pop();continue}o=t.call(e,c)}catch(e){o=[6,e],a=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function Ft(e,t,r){if(r||2===arguments.length)for(var a,n=0,i=t.length;n<i;n++)!a&&n in t||(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var wt=function(){function e(){}return e.getNextId=function(){return e.nextId++,e.nextId},e.setFileList=function(t,r){return t?(e.fileLists[t]=Ft([],r,!0),t):0},e.createFileListMap=function(){var t=e.getNextId();return e.fileLists[t]=[],t},e.removeFileListMap=function(t){if(!t)return 0;try{return e.fileLists[t]=void 0,t}catch(e){return"development"===process.env.NODE_ENV&&console.error("Error on remove",e),0}},e.getExtFileInstanceList=function(t){try{if(!t)return;return e.fileLists[t]}catch(e){return void("development"===process.env.NODE_ENV&&console.error("Error on getExtFileInstanceList",e))}},e.setFileListMapPreparing=function(t,r,a,n){if("number"==typeof t||"string"==typeof t)try{var i,c=Ft([],r,!0);n&&a&&(c=c.filter((function(e){return e.valid}))),i=(c=a?c.map((function(e){return"success"!==e.uploadStatus&&e.valid?ht(ht({},e),{uploadStatus:"preparing"}):ht({},e)})):c.map((function(e){return"success"!==e.uploadStatus?ht(ht({},e),{uploadStatus:"preparing"}):ht({},e)}))).map((function(e){return new mt(e)}));e.setFileList(t,i);return i}catch(e){return void("development"===process.env.NODE_ENV&&console.error("setFileListMapPreparing Error on get List",e))}},e.setFileListMapPreparing2=function(t,r,a,n){return e.setFileList(t,r.map((function(e){return new mt(ht(ht({},e),{uploadStatus:"preparing"}))}))),e.getExtFileInstanceList(t)},e.nextId=0,e.fileLists={},e}(),xt=function(e,t,r,a,n){return{url:e,method:t,headers:r,uploadLabel:a,cleanonUpload:n}},_t=function(){function e(){}return e.createFile=function(e,t,r){var a=new File([],e,{type:r});return Object.defineProperty(a,"size",{get:function(){return t}}),a},e.create_aac=function(t){return e.createFile("acc_audio-file-with-large-name.aac",t||3516516,"audio/aac")},e.create_abw=function(t){return e.createFile("abiword-file-with-large-name.abw",t||3516516,"application/x-abiword")},e.create_freearc=function(t){return e.createFile("freearc-file-with-large-name.arc",t||3516516,"application/x-freearc")},e.create_avi=function(t){return e.createFile("avi-file-with-large-name.avi",t||3516516,"video/x-msvideo")},e.create_azw=function(t){return e.createFile("amazon_kindle_ebook-file-with-large-name.azw",t||3516516,"application/vnd.amazon.ebook")},e.create_octet=function(t){return e.createFile("binary_octet_stream-file-with-large-name.bin",t||3516516,"application/octet-stream")},e.create_bmp=function(t){return e.createFile("bit_map-file-with-large-name.bmp",t||3516516,"image/bmp")},e.create_bz=function(t){return e.createFile("x_bzip-file-with-large-name.bz",t||3516516,"application/x-bzip")},e.create_bz2=function(t){return e.createFile("x_bzip_2-file-with-large-name.bz2",t||3516516,"application/x-bzip2")},e.create_cda=function(t){return e.createFile("cd_audio-file-with-large-name.cda",t||3516516,"application/x-cdf")},e.create_csh=function(t){return e.createFile("test-file-with-large-name.csh",t||3516516,"application/x-csh")},e.create_css=function(t){return e.createFile("test-file-with-large-name.css",t||3516516,"text/css")},e.create_csv=function(t){return e.createFile("test-file-with-large-name.csv",t||3516516,"text/csv")},e.create_doc=function(t){return e.createFile("test-file-with-large-name.doc",t||3516516,"application/msword")},e.create_docx=function(t){return e.createFile("test-file-with-large-name.docx",t||3516516,"application/vnd.openxmlformats-officedocument.wordprocessingml.document")},e.create_eot=function(t){return e.createFile("test-file-with-large-name.eot",t||3516516,"application/vnd.ms-fontobject")},e.create_epub=function(t){return e.createFile("test-file-with-large-name.epub",t||3516516,"application/epub+zip")},e.create_gzip=function(t){return e.createFile("test-file-with-large-name.gz",t||3516516,"application/gzip")},e.create_gif=function(t){return e.createFile("test-file-with-large-name.gif",t||3516516,"image/gif")},e.create_htm=function(t){return e.createFile("test-file-with-large-name.htm",t||3516516,"text/html")},e.create_html=function(t){return e.createFile("test-file-with-large-name.html",t||3516516,"text/html")},e.create_ico=function(t){return e.createFile("test-file-with-large-name.ico",t||3516516,"image/vnd.microsoft.icon")},e.create_icalendar=function(t){return e.createFile("test-file-with-large-name.ics",t||3516516,"text/calendar")},e.create_jar=function(t){return e.createFile("test-file-with-large-name.jar",t||3516516,"application/java-archive")},e.create_jpeg=function(t){return e.createFile("test-file-with-large-name.jpeg",t||3516516,"image/jpeg")},e.create_jpg=function(t){return e.createFile("test-file-with-large-name.jpg",t||3516516,"image/jpeg")},e.create_js=function(t){return e.createFile("test-file-with-large-name.js",t||3516516,"text/javascript")},e.create_json=function(t){return e.createFile("test-file-with-large-name.json",t||3516516,"application/json")},e.create_jsonld=function(t){return e.createFile("test-file-with-large-name.jsonld",t||3516516,"application/ld+json")},e.create_mid=function(t){return e.createFile("test-file-with-large-name.mid",t||3516516,"audio/midi")},e.create_x_mid=function(t){return e.createFile("test-file-with-large-name.mid",t||3516516,"audio/x-midi")},e.create_midi=function(t){return e.createFile("test-file-with-large-name.midi",t||3516516,"audio/x-midi")},e.create_x_midi=function(t){return e.createFile("test-file-with-large-name.midi",t||3516516,"audio/x-midi")},e.create_mjs=function(t){return e.createFile("test-file-with-large-name.mjs",t||3516516,"text/javascript")},e.create_mp3=function(t){return e.createFile("test-file-with-large-name.mp3",t||3516516,"audio/mpeg")},e.create_mp4=function(t){return e.createFile("test-file-with-large-name.mp4",t||3516516,"video/mp4")},e.create_mpeg=function(t){return e.createFile("test-file-with-large-name.mpeg",t||3516516,"video/mpeg")},e.create_mpkg=function(t){return e.createFile("test-file-with-large-name.mpkg",t||3516516,"application/vnd.apple.installer+xml")},e.create_odp=function(t){return e.createFile("test-file-with-large-name.odp",t||3516516,"application/vnd.oasis.opendocument.presentation")},e.create_ods=function(t){return e.createFile("test-file-with-large-name.ods",t||3516516,"application/vnd.oasis.opendocument.spreadsheet")},e.create_odt=function(t){return e.createFile("test-file-with-large-name.odt",t||3516516,"application/vnd.oasis.opendocument.text")},e.create_oga=function(t){return e.createFile("test-file-with-large-name.oga",t||3516516,"audio/ogg")},e.create_ogv=function(t){return e.createFile("test-file-with-large-name.ogv",t||3516516,"video/ogg")},e.create_ogx=function(t){return e.createFile("test-file-with-large-name.ogx",t||3516516,"application/ogg")},e.create_opus=function(t){return e.createFile("test-file-with-large-name.opus",t||3516516,"audio/opus")},e.create_otf=function(t){return e.createFile("test-file-with-large-name.otf",t||3516516,"font/otf")},e.create_png=function(t){return e.createFile("test-file-with-large-name.png",t||3516516,"image/png")},e.create_pdf=function(t){return e.createFile("test-file-with-large-name.pdf",t||3516516,"application/pdf")},e.create_php=function(t){return e.createFile("test-file-with-large-name.php",t||3516516,"application/x-httpd-php")},e.create_ppt=function(t){return e.createFile("test-file-with-large-name.ppt",t||3516516,"application/vnd.ms-powerpoint")},e.create_pptx=function(t){return e.createFile("test-file-with-large-name.pptx",t||3516516,"application/vnd.openxmlformats-officedocument.presentationml.presentation")},e.create_rar=function(t){return e.createFile("test-file-with-large-name.rar",t||3516516,"application/vnd.rar")},e.create_rtf=function(t){return e.createFile("test-file-with-large-name.rtf",t||3516516,"application/rtf")},e.create_sh=function(t){return e.createFile("test-file-with-large-name.sh",t||3516516,"application/x-sh")},e.create_svg=function(t){return e.createFile("test-file-with-large-name.svg",t||3516516,"image/svg+xml")},e.create_swf=function(t){return e.createFile("test-file-with-large-name.swf",t||3516516,"application/x-shockwave-flash")},e.create_tar=function(t){return e.createFile("test-file-with-large-name.tar",t||3516516,"application/x-tar")},e.create_tif=function(t){return e.createFile("test-file-with-large-name.tif",t||3516516,"image/tiff")},e.create_tiff=function(t){return e.createFile("test-file-with-large-name.tiff",t||3516516,"image/tiff")},e.create_ts=function(t){return e.createFile("mp2t_video-file-with-large-name.ts",t||3516516,"video/mp2t")},e.create_ttf=function(t){return e.createFile("test-file-with-large-name.ttf",t||3516516,"font/ttf")},e.create_text=function(t){return e.createFile("test-file-with-large-name.txt",t||3516516,"text/plain")},e.create_typescript=function(t){return e.createFile("typescript-file-with-large-name.ts",t||3516516,"text/plain")},e.create_vsd=function(t){return e.createFile("ms_visio-file-with-large-name.vsd",t||3516516,"application/vnd.visio")},e.create_wav=function(t){return e.createFile("wav_audio-file-with-large-name.wav",t||3516516,"audio/wav")},e.create_weba=function(t){return e.createFile("web_audio-file-with-large-name.weba",t||3516516,"audio/webm")},e.create_webm=function(t){return e.createFile("web_video-file-with-large-name.webm",t||3516516,"video/webm")},e.create_webp=function(t){return e.createFile("web_image-file-with-large-name.webp",t||3516516,"image/webp")},e.create_woff=function(t){return e.createFile("test-file-with-large-name.woff",t||3516516,"font/woff")},e.create_woff2=function(t){return e.createFile("test-file-with-large-name.woff2",t||3516516,"font/woff2")},e.create_xhtml=function(t){return e.createFile("test-file-with-large-name.xhtml",t||3516516,"application/xhtml+xml")},e.create_xlsx=function(t){return e.createFile("test-file-with-large-name.xls",t||3516516,"application/vnd.ms-excel")},e.create_xls=function(t){return e.createFile("test-file-with-large-name.xlsx",t||3516516,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")},e.create_xml=function(t){return e.createFile("xml-file-with-large-name.xml",t||3516516,"application/xml")},e.create_xml_txt=function(t){return e.createFile("xml_plain_text-file-with-large-name.xml",t||3516516,"application/xml")},e.create_xul=function(t){return e.createFile("test-file-with-large-name.xul",t||3516516,"application/vnd.mozilla.xul+xml")},e.create_zip=function(t){return e.createFile("zip-file-with-large-name.zip",t||3516516,"application/zip")},e.create_3gp=function(t){return e.createFile("3gp_video-file-with-large-name.3gp",t||3516516,"video/3gpp")},e.create_3gp2=function(t){return e.createFile("3gp2_video-file-with-large-name.3g2",t||3516516,"video/3gpp2")},e.create_3gp_a=function(t){return e.createFile("3gp_audio-file-with-large-name.3gp",t||3516516,"audio/3gpp")},e.create_3gp_v=function(t){return e.createFile("3gp_audio-file-with-large-name.3gp2",t||3516516,"audio/3gpp2")},e.create_7z=function(t){return e.createFile("seven_zip-file-with-large-name.7z",t||3516516,"application/x-7z-compressed")},e.create_python=function(t){return e.createFile("python-file-with-large-name.py",t||3516516,"text/plain")},e.create_java=function(t){return e.createFile("java-file-with-large-name.java",t||3516516,"text/plain")},e.create_react=function(t){return e.createFile("react_jsx-file-with-large-name.jsx",t||3516516,"text/plain")},e.create_vue=function(t){return e.createFile("vue-file-with-large-name.vue",t||3516516,"text/plain")},e.createFileListMiscelanious=function(t){var r=[];return r.push(e.create_aac(t)),r.push(e.create_abw(t)),r.push(e.create_freearc(t)),r.push(e.create_avi(t)),r.push(e.create_azw(t)),r.push(e.create_octet(t)),r.push(e.create_bmp(t)),r.push(e.create_bz(t)),r.push(e.create_bz2(t)),r.push(e.create_cda(t)),r.push(e.create_csh(t)),r.push(e.create_css(t)),r.push(e.create_csv(t)),r.push(e.create_doc(t)),r.push(e.create_docx(t)),r.push(e.create_eot(t)),r.push(e.create_epub(t)),r.push(e.create_gzip(t)),r.push(e.create_gif(t)),r.push(e.create_htm(t)),r.push(e.create_html(t)),r.push(e.create_ico(t)),r.push(e.create_icalendar(t)),r.push(e.create_jar(t)),r.push(e.create_jpeg(t)),r.push(e.create_jpg(t)),r.push(e.create_js(t)),r.push(e.create_json(t)),r.push(e.create_jsonld(t)),r.push(e.create_mid(t)),r.push(e.create_midi(t)),r.push(e.create_x_mid(t)),r.push(e.create_x_midi(t)),r.push(e.create_mjs(t)),r.push(e.create_mp3(t)),r.push(e.create_mp4(t)),r.push(e.create_mpeg(t)),r.push(e.create_mpkg(t)),r.push(e.create_odp(t)),r.push(e.create_ods(t)),r.push(e.create_odt(t)),r.push(e.create_oga(t)),r.push(e.create_ogv(t)),r.push(e.create_ogx(t)),r.push(e.create_opus(t)),r.push(e.create_otf(t)),r.push(e.create_png(t)),r.push(e.create_pdf(t)),r.push(e.create_php(t)),r.push(e.create_ppt(t)),r.push(e.create_pptx(t)),r.push(e.create_rar(t)),r.push(e.create_rtf(t)),r.push(e.create_sh(t)),r.push(e.create_svg(t)),r.push(e.create_swf(t)),r.push(e.create_tar(t)),r.push(e.create_tif(t)),r.push(e.create_tiff(t)),r.push(e.create_ts(t)),r.push(e.create_ttf(t)),r.push(e.create_text(t)),r.push(e.create_typescript(t)),r.push(e.create_vsd(t)),r.push(e.create_wav(t)),r.push(e.create_weba(t)),r.push(e.create_webm(t)),r.push(e.create_webp(t)),r.push(e.create_woff(t)),r.push(e.create_woff2(t)),r.push(e.create_xhtml(t)),r.push(e.create_xlsx(t)),r.push(e.create_xls(t)),r.push(e.create_xml(t)),r.push(e.create_xml_txt(t)),r.push(e.create_xul(t)),r.push(e.create_zip(t)),r.push(e.create_python(t)),r.push(e.create_java(t)),r.push(e.create_react(t)),r.push(e.create_vue(t)),r},e}(),yt=function(e){return _t.createFileListMiscelanious(e)},Et=function(e,t,r){return void 0===e&&(e="png-image-file-with-large-name.png"),void 0===t&&(t=455555),void 0===r&&(r="image/png"),_t.createFile(e,t,r)},At=function(){function e(){}return e.getNextId=function(){return e.nextId++,e.nextId},e.nextId=0,e}(),zt=function(e){for(var t=[],r=0,a=void 0;a=e[r];r++)t.push({id:At.getNextId(),file:a,name:a.name,size:a.size,type:a.type});return t},kt=function(e){for(var t=[],r=0,a=void 0;a=e[r];r++)t.push(new mt({id:At.getNextId(),file:a,name:a.name,size:a.size,type:a.type}));return t},St=function(e,t,r,a){return null!=e||null!=t||null!=r||null!=a},Mt=function(e,t){void 0===e&&(e=""),void 0===t&&(t=!1);var r=e;return t?e.length>=20&&(r=e.slice(0,10)+"..."+e.slice(-7)):e.length>=30&&(r=e.slice(0,13)+"..."+e.slice(-8)),r},Dt=function(e){return new Promise((function(t,r){setTimeout((function(){t(ht(ht({},e),{uploadStatus:"uploading"}))}),1500)}))},jt=function(e){return new Promise((function(t,r){setTimeout((function(){t(ht(ht({},e),{uploadStatus:"success"}))}),2e3)}))},Ct=function(e){return void 0===e&&(e=5e3),new Promise((function(t,r){setTimeout((function(){t()}),e)}))},Bt=function(e){return new Promise((function(t,r){setTimeout((function(){e.uploadStatus="uploading",t(ht(ht({},e),{uploadStatus:"uploading"}))}),1500)}))},Tt=function(e){return new Promise((function(t,r){setTimeout((function(){e.uploadStatus="success",t(ht(ht({},e),{uploadStatus:"success"}))}),2e3)}))},It=function(e,t){void 0===t&&(t=S("EN-en"));var r=e.toExtFile();return new Promise((function(e,a){setTimeout((function(){if(Math.floor(10*Math.random())%2==0){var a=!0,n=t.fakeuploadsuccess,i={url:""};e(ht(ht({},r),{serverResponse:{success:a,message:n,payload:i},uploadStatus:"success",uploadMessage:n}))}else{a=!1,n=t.fakeUploadError,i={};e(ht(ht({},r),{serverResponse:{success:a,message:n,payload:i},uploadStatus:"error",uploadMessage:n}))}}),1700)}))};function Lt(e,t){return void 0===e&&(e=0),void 0===t&&(t=0),Math.floor(Math.random()*(t-e))+e}var Rt=function(e){e&&(e.value="")},Ut=function(e,t){return t?"".concat(e," ").concat(t):e},Nt=function(e,t){return(!t||t&&e.valid)&&"success"!==e.uploadStatus},Pt=function(e,t,r,a){var n="",i=void 0,c=void 0;return e&&"string"==typeof e.name?(n=e.name,i=e.type,c=e.size):t&&"string"==typeof t&&(n=t,i=r,c=a),[n,i,c]},qt=function(e){return e&&0!==e.length?e.split(",").map((function(e){return e.trim()})):[]},Ot=function(e,t){for(var r=t.name,a=t.type,n=0;n<e.length;n++){var i=e[n];if(0!==i.length){if("."===i.charAt(0)&&i.includes(tt(r)))return!0;if(a&&a.length>0&&i.includes("/")&&a.includes("/")){var c=i.split("/")[0],o=i.split("/")[1],s=a.split("/")[0],u=a.split("/")[1];if(c===s){if("*"===o)return!0;if(o===u)return!0}}}}return!1},Ht=function(e,t,r,a,n,i){for(var c=[],o=t,s=D(i),u=0,l=void 0;l=e[u];u++){var p=Gt(l,a,r,s);if(p.valid){var d=o>0;if(p.valid=d,!d){var f=s.maxFileCount;p.errors=p.errors?Ft(Ft([],p.errors,!0),[f(n||1/0)],!1):[f(n||1/0)]}o--}c.push(p)}return c},Zt=function(e,t,r,a,n,i){var c=[];if(!t)return c;for(var o=t,s=D(i),u=s.maxFileCount,l=0;l<e.length;l++){var p=e[l];if((p=Vt(p,a,r,s)).valid){var d=o>0;p.valid=d,d||(p.errors=p.errors?Ft(Ft([],p.errors,!0),[u(n||1/0)],!1):[u(n||1/0)]),o--}c.push(p)}return c},Vt=function(e,t,r,a){var n=ht({},e),i=[];if(!e.file)return ht({},n);if(t){var c=t(n.file).errors;c&&i.push.apply(i,c)}var o=r.maxFileSize,s=r.accept,u=e.file;if(o&&u.size>o){var l=a.maxSizeError;i.push(l(o))}s&&!Ot(qt(s),u)&&i.push(a.acceptError);var p=0===i.length;return n=ht(ht({},n),{valid:p,errors:p?void 0:i})},Gt=function(e,t,r,a){var n=At.getNextId(),i=[];if(t)return ht({id:n,file:e},t(e));var c=r.maxFileSize,o=r.accept;if(c&&e.size>c){var s=a.maxSizeError;i.push(s(c))}return o&&!Ot(qt(o),e)&&i.push(a.acceptError),{id:n,file:e,valid:0===i.length,errors:i}},Xt=["File is too big. Max file size allowed is 80mb.","File's type is not allowed.","Max amount of files (28) has been reached."],Kt=function(e,t,r,a){void 0===t&&(t=Math.ceil(28*Math.random())%2==0);var n=[],i=r||function(){switch(Lt(0,4)){case 0:return"error";case 1:return"uploading";case 2:return"success";default:return}}(),c=a||"";if(t){if(!a)switch(i){case"error":c="Upload failed. There was an error";break;case"success":c="File was successfully upload";break;default:a=void 0}n=void 0}else{var o=Lt(0,3);n.push(Xt[o]),i=void 0,c=void 0}return{id:At.getNextId(),valid:t,file:e,uploadStatus:i,uploadMessage:c,errors:n}},Jt=function(e){return{id:e||At.getNextId(),name:"fileName.ext",size:29360128,type:"files-ui/mock",file:Et("fileName.ext",29360128,"files-ui/mock"),errors:Xt,uploadMessage:"uploaded",uploadStatus:"preparing",valid:!1,progress:28,xhr:new XMLHttpRequest,extraData:{extraData1:"files-ui is the best",extraData2:{id:1,name:"files-ui.mock"},deleted:!0},downloadUrl:"https://www.files-ui.com/mock/file-download"}};function Qt(e,t){for(var r=Object.keys(t||{}),a=0;a<r.length&&t;a++)e.append(r[a],t[r[a]]);e.append("otherValue","HAAAAAAAAAAAAAAa")}function $t(e,t){for(var r=Object.keys(t||{}),a=0;a<r.length&&t;a++)e.setRequestHeader(r[a],t[r[a]])}var Wt={success:!1,message:"Timeout error",payload:{}},Yt={success:!1,message:"Upload aborted",payload:{}},er={success:!1,message:"Error when parsing JSON response",payload:{}},tr={success:!1,message:"Unexpected error",payload:{}},rr=function(e){return ht(ht({},e),{uploadMessage:"Unable to upload. xhr object was not provided",uploadStatus:"error",serverResponse:{success:!1}})},ar=function(e,t,r){return{success:e,message:t,payload:r}},nr=function(e){try{var t=JSON.parse(e.response),r=t.success,a=t.message;return{success:"boolean"==typeof r&&r,message:"string"==typeof a?a:"Error on message response",payload:t.payload||{}}}catch(e){return er}},ir=function(e,t){return ht(ht({},e),{serverResponse:t,uploadMessage:t.message,uploadStatus:"success"})},cr=function(e,t){return ht(ht({},e),{uploadMessage:t.message,uploadStatus:"error",serverResponse:t})},or=function(e,t,r,a,n){return void 0===t&&(t="POST"),new Promise((function(i,c){var o=["POST","PUT","PATCH"].includes(t.toUpperCase())?t:"POST";e.upload.onload=function(){},e.upload.ontimeout=function(){return i(Wt)},e.upload.onabort=function(){i(Yt)},e.onloadend=function(e){return bt(void 0,void 0,void 0,(function(){return vt(this,(function(e){return[2]}))}))},e.onreadystatechange=function(t){return bt(void 0,void 0,void 0,(function(){return vt(this,(function(t){return e.readyState,4===e.readyState&&(""!==e.response?i(nr(e)):i(Yt)),[2]}))}))},e.open(o,r,!0),$t(e,n),e.send(a)}))},sr=function(e,t,r,a,n){return bt(void 0,void 0,void 0,(function(){return vt(this,(function(i){return[2,new Promise((function(i,c){return bt(void 0,void 0,void 0,(function(){var c,o,s,u,l,p;return vt(this,(function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),(c=e.xhr)?(o=r||"POST",s=e.file,(u=new FormData).append(n||"file",s),l=ht({otherValue:"other valueee haaaa",param2:{tecnica:"KIKOHUUUU",friend:"Chaos",age:25}},e.extraUploadData),Qt(u,l),p=void 0,[4,or(c,o,t,u,a||{})]):(i(rr(e)),[2]);case 1:return(p=d.sent()).success?i(ir(e,p)):i(cr(e,p)),[3,3];case 2:return d.sent(),i(cr(e,tr)),[3,3];case 3:return[2]}}))}))}))]}))}))};function ur(e,t,r,a,n){var i=this;return new Promise((function(c,o){return bt(i,void 0,void 0,(function(){var i,o;return vt(this,(function(s){switch(s.label){case 0:(i=new FormData).append(a||"file",e),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,or(new XMLHttpRequest,r,t,i,n)];case 2:return o=s.sent(),c(o),[3,4];case 3:return s.sent(),c(tr),[3,4];case 4:return[2]}}))}))}))}var lr=function(e,t,r,a,n){return new Promise((function(i,c){e.upload.onload=function(){},e.upload.ontimeout=function(){return i(Wt)},e.upload.onabort=function(){return i(Yt)},e.onreadystatechange=function(t){return bt(void 0,void 0,void 0,(function(){return vt(this,(function(t){return 4===e.readyState&&(""!==e.response?i(nr(e)):i(tr)),[2]}))}))},e.open(t,r,!0);for(var o=Object.keys(n),s=0;s<o.length;s++)e.setRequestHeader(o[s],n[o[s]]);e.send(a)}))},pr=function(e){return ht(ht({},e),{uploadMessage:"Unexpected error",uploadStatus:"error",serverResponse:{success:!1,message:"Error on upload: unexpected error ",payload:{}}})},dr=function(e){return{id:e.id,uploadedFile:ht(ht({},e),{uploadMessage:"Unable to upload. XHR was not provided",uploadStatus:"error"}),serverResponse:{success:!1,message:"Error on upload: Unable to upload. XHR was not provided ",payload:{}}}},fr=function(e,t,r){return{id:e.id,uploadedFile:ht(ht({},e),{uploadMessage:t.message,uploadStatus:r}),serverResponse:t}},gr=function(e){return e?e.map((function(e){return ht(ht({},e),{xhr:new XMLHttpRequest})})):[]},mr=function(e){return"preparing"===e.uploadStatus?(e.uploadStatus="uploading",ht(ht({},e),{uploadStatus:"uploading"})):e},hr=function(e){return new Promise((function(t,r){setTimeout((function(){"preparing"===e.uploadStatus?(e.uploadStatus="uploading",t(ht(ht({},e),{uploadStatus:"uploading"}))):t(e)}),1500)}))},br=function(e){return void 0===e&&(e=1500),new Promise((function(t,r){setTimeout((function(){t(!0)}),e)}))},vr=function(e){return e.filter((function(e){var t;return!(null===(t=e.extraData)||void 0===t?void 0:t.deleted)})).map((function(e){return"aborted"!==e.uploadStatus||e.uploadMessage||(e.uploadMessage="Upload aborted by user"),mt.toExtFile(e)}))},Fr=function(e,t){var r=e.uploadStatus,a=t.uploadStatus;"preparing"===r&&["aborted",void 0].includes(a)?(e.uploadStatus=void 0,e.uploadMessage=t.uploadMessage):"uploading"===r&&["aborted",void 0].includes(a)&&(e.uploadStatus="aborted",e.uploadMessage=t.uploadMessage)},wr={indianred:"#CD5C5C",lightcoral:"#F08080",salmon:"#FA8072",darksalmon:"#E9967A",lightsalmon:"#FFA07A",crimson:"#DC143C",red:"#FF0000",firebrick:"#B22222",darkred:"#8B0000",pink:"#FFC0CB",lightpink:"#FFB6C1",hotpink:"#FF69B4",deeppink:"#FF1493",mediumvioletred:"#C71585",palevioletred:"#DB7093",coral:"#FF7F50",tomato:"#FF6347",orangered:"#FF4500",darkorange:"#FF8C00",orange:"#FFA500",gold:"#FFD700",yellow:"#FFFF00",lightyellow:"#FFFFE0",lemonchiffon:"#FFFACD",lightgoldenrodyellow:"#FAFAD2",papayawhip:"#FFEFD5",moccasin:"#FFE4B5",peachpuff:"#FFDAB9",palegoldenrod:"#EEE8AA",khaki:"#F0E68C",darkkhaki:"#BDB76B",lavender:"#E6E6FA",thistle:"#D8BFD8",plum:"#DDA0DD",violet:"#EE82EE",orchid:"#DA70D6",fuchsia:"#FF00FF",magenta:"#FF00FF",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",rebeccapurple:"#663399",blueviolet:"#8A2BE2",darkviolet:"#9400D3",darkorchid:"#9932CC",darkmagenta:"#8B008B",purple:"#800080",indigo:"#4B0082",slateblue:"#6A5ACD",darkslateblue:"#483D8B",mediumslateblue:"#7B68EE",greenyellow:"#ADFF2F",chartreuse:"#7FFF00",lawngreen:"#7CFC00",lime:"#00FF00",limegreen:"#32CD32",palegreen:"#98FB98",lightgreen:"#90EE90",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",mediumseagreen:"#3CB371",seagreen:"#2E8B57",forestgreen:"#228B22",green:"#008000",darkgreen:"#006400",yellowgreen:"#9ACD32",olivedrab:"#6B8E23",olive:"#808000",darkolivegreen:"#556B2F",mediumaquamarine:"#66CDAA",darkseagreen:"#8FBC8B",lightseagreen:"#20B2AA",darkcyan:"#008B8B",teal:"#008080",aqua:"#00FFFF",cyan:"#00FFFF",lightcyan:"#E0FFFF",paleturquoise:"#AFEEEE",aquamarine:"#7FFFD4",turquoise:"#40E0D0",mediumturquoise:"#48D1CC",darkturquoise:"#00CED1",cadetblue:"#5F9EA0",steelblue:"#4682B4",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",lightblue:"#ADD8E6",skyblue:"#87CEEB",lightskyblue:"#87CEFA",deepskyblue:"#00BFFF",dodgerblue:"#1E90FF",cornflowerblue:"#6495ED",royalblue:"#4169E1",blue:"#0000FF",mediumblue:"#0000CD",darkblue:"#00008B",navy:"#000080",midnightblue:"#191970",cornsilk:"#FFF8DC",blanchedalmond:"#FFEBCD",bisque:"#FFE4C4",navajowhite:"#FFDEAD",wheat:"#F5DEB3",burlywood:"#DEB887",tan:"#D2B48C",rosybrown:"#BC8F8F",sandybrown:"#F4A460",goldenrod:"#DAA520",darkgoldenrod:"#B8860B",peru:"#CD853F",chocolate:"#D2691E",saddlebrown:"#8B4513",sienna:"#A0522D",brown:"#A52A2A",maroon:"#800000",white:"#FFFFFF",snow:"#FFFAFA",honeydew:"#F0FFF0",mintcream:"#F5FFFA",azure:"#F0FFFF",aliceblue:"#F0F8FF",ghostwhite:"#F8F8FF",whitesmoke:"#F5F5F5",seashell:"#FFF5EE",beige:"#F5F5DC",oldlace:"#FDF5E6",floralwhite:"#FFFAF0",ivory:"#FFFFF0",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lavenderblush:"#FFF0F5",mistyrose:"#FFE4E1",gainsboro:"#DCDCDC",lightgray:"#D3D3D3",silver:"#C0C0C0",darkgray:"#A9A9A9",gray:"#808080",dimgray:"#696969",lightslategray:"#778899",slategray:"#708090",darkslategray:"#2F4F4F",black:"#000000"},xr=function(e,t){void 0===t&&(t=25);var r="",a=(100-t)/100,n=0,i=0,c=0;if(Er(Ar(e)))n=16*Sr(e.charAt(1))+Sr(e.charAt(2)),i=16*Sr(e.charAt(3))+Sr(e.charAt(4)),c=16*Sr(e.charAt(5))+Sr(e.charAt(6)),r="rgb(".concat(n*a,", ").concat(i*a,",").concat(c*a,")");else if(e.includes("rgba")){var o=e.replace("rgba(","").split(",");r="rgb(".concat(parseInt(o[0],10)*a,", ").concat(parseInt(o[1],10)*a,",").concat(parseInt(o[2],10)*a,")")}else if(e.includes("rgb")){o=e.replace("rgb(","").split(",");r="rgb(".concat(parseInt(o[0],10)*a,", ").concat(parseInt(o[1],10)*a,",").concat(parseInt(o[2],10)*a,")")}return r},_r=function(e,t){void 0===t&&(t=25);var r="",a=(100+t)/100,n=0,i=0,c=0;if(Er(Ar(e)))n=16*Sr(e.charAt(1))+Sr(e.charAt(2)),i=16*Sr(e.charAt(3))+Sr(e.charAt(4)),c=16*Sr(e.charAt(5))+Sr(e.charAt(6)),r="rgb(".concat(n*a,", ").concat(i*a,",").concat(c*a,")");else if(e.includes("rgba")){var o=e.replace("rgba(","").split(",");r="rgb(".concat(parseInt(o[0],10)*a,", ").concat(parseInt(o[1],10)*a,",").concat(parseInt(o[2],10)*a,")")}else if(e.includes("rgb")){o=e.replace("rgb(","").split(",");r="rgb(".concat(parseInt(o[0],10)*a,", ").concat(parseInt(o[1],10)*a,",").concat(parseInt(o[2],10)*a,")")}return r},yr=function(e,t,r){void 0===t&&(t=0);var a=r||"rgba(255, 255, 255, 0.6)";if(!e)return a;var n=e.toUpperCase();if(n.includes("RGBA"))return n;if(n.includes("RGB"))return n.replace("RGB","rgba").replace(")",", ".concat(t,")"));if(!Er(Ar(n)))return a;var i,c,o;return i=16*Sr(n.charAt(1))+Sr(n.charAt(2)),c=16*Sr(n.charAt(3))+Sr(n.charAt(4)),o=16*Sr(n.charAt(5))+Sr(n.charAt(6)),"rgba(".concat(i,", ").concat(c,",").concat(o," , ").concat(t,")")},Er=function(e){if("#"!==e.charAt(0))return!1;if(7!==e.length)return!1;for(var t=1;t<e.length;t++)if(!zr.includes(e.charAt(t)))return!1;return!0};function Ar(e){return e?void 0!==wr[e.toLocaleLowerCase()]?wr[e.toLocaleLowerCase()]:e:""}var zr=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"],kr=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],Sr=function(e){return zr.includes(e)?kr[zr.indexOf(e)]:0},Mr=function(e){return void 0!==e&&""!==e?e:jr},Dr=function(e,t){return void 0===t&&(t=1),yr(Mr(Ar(e)),t)},jr="#646c7f",Cr=function(e,t){var r=wt.getExtFileInstanceList(e);if(r){var a=Ft([],t,!0);if(a=a.filter((function(e){return-1===(null==r?void 0:r.findIndex((function(t){return t.id===e.id})))})),r.length!==t.length||0===t.length)return;for(var n=0;n<r.length;n++)void 0===t[n].uploadStatus&&"preparing"===r[n].uploadStatus&&(r[n].uploadStatus=void 0)}return[]};export{Yt as ABORTED_ERROR_RESPONSE,o as DropzoneEnglish,n as DropzoneFrench,t as DropzoneItalian,k as DropzoneLocalizer,S as DropzoneLocalizerSelector,h as DropzonePortuguese,f as DropzoneRussian,F as DropzoneSimplifiedChinese,l as DropzoneSpanish,_ as DropzoneTraditionalChinese,mt as ExtFileInstance,wt as ExtFileManager,At as FileIdGenerator,s as FileItemEnglish,i as FileItemFrench,r as FileItemItalian,A as FileItemLocalizer,z as FileItemLocalizerSelector,b as FileItemPortuguese,g as FileItemRussian,w as FileItemSimplifiedChinese,p as FileItemSpanish,y as FileItemTraditionalChinese,lr as FuiUpload,er as JSON_PARSE_ERROR_RESPONSE,nr as JsonParseResponse,wr as NAMED_COLORS,rr as NO_XHR_PROVIDED_ERROR,_t as SyntheticFile,Wt as TIMEOUT_ERROR_RESPONSE,tr as UNEXPECTED_ERROR_RESPONSE,u as ValidateErrorEnglish,c as ValidateErrorFrench,a as ValidateErrorItalian,M as ValidateErrorLocalizer,D as ValidateErrorLocalizerSelector,v as ValidateErrorPortuguese,m as ValidateErrorRussian,x as ValidateErrorSimplifiedChinese,d as ValidateErrorSpanish,E as ValidateErrorTraditionalChinese,U as aac,N as abw,P as accdb,Ut as addClassName,Qt as addExtraData,$t as addHeaders,st as applicationSelector,Mr as asureColor,at as audioSelector,q as avi,O as azw,H as bmp,_r as brighterColor,Z as bz,V as bz2,G as cda,pt as checkIsCode,Rt as cleanInput,Ar as colourNameToHex,Dr as completeAsureColor,fr as completeUploadResult,yt as createListOfMultiTypeFile,Et as createSyntheticFile,xt as createUploadConfig,X as csh,K as css,J as csv,xr as darkerColor,Q as docx,$ as drawio,W as eot,Y as epub,Jt as extFileMock,Cr as extFileReconcilation,lt as extensionSelector,It as fakeFuiUpload,zt as fileListToExtFileArray,kt as fileListToExtFileInstanceArray,Ht as fileListvalidator,e as fileSizeFormater,ct as fontSelector,ee as freearc,tt as getExt,L as getImageOrientation,Pt as getLocalFileItemData,Lt as getRandomInt,dt as getURLFileIco,ft as getURLFileIcoFromNameAndType,te as gif,re as gzip,yr as hexColorToRGB,Sr as hexTodec,ae as html,ne as icalendar,it as imageSelector,mr as instantPreparingToUploadOne,Er as isHexColor,Nt as isUploadAbleExtFile,St as isValidateActive,ce as jar,ie as java,oe as javascript,se as jpeg,ue as json,le as jsonld,cr as makeErrorUploadResponse,ar as makeServerResponse,ir as makeSuccessUploadResponse,Kt as makeSyntheticExtFile,pe as midi,ut as mimeSelector,de as mp3,fe as mp4,ge as mpeg,me as mpkg,he as octet,be as odp,ve as ods,Fe as odt,we as oga,xe as ogv,_e as ogx,ye as opus,Ee as otf,Ae as pdf,ze as php,ke as png,Se as pptx,Bt as prepToUploadOne,hr as preparingToUploadOne,Me as psd,De as python,Ce as rar,Be as react,T as readAsArrayBuffer,B as readAsBinaryString,j as readAsDataURL,C as readAsText,I as resizeImage,Te as rtf,vr as sanitizeArrExtFile,Ie as sass,qt as separateAccept,Fr as setNextUploadStatus,Dt as setPrepToUploading,R as sevenzip,Le as sh,Mt as shrinkWord,Ct as sleepPreparing,br as sleepTransition,Re as swf,je as tar,Ue as text,nt as textSelector,Ne as tiff,gr as toUploadableExtFileList,Pe as ttf,qe as typescript,dr as unableToUploadResult,pr as unexpectedErrorUploadResult,sr as uploadExtFile,ur as uploadFile,or as uploadFormData,jt as uploadOne,Tt as uploadOneExtFile,Ot as validateAccept,Vt as validateExtFile,Zt as validateExtFileList,Gt as validateFile,ot as videoSelector,Oe as vsd,He as vue,Ze as wav,Ge as weba,Ve as webm,Xe as webp,Ke as wma,Je as wmv,Qe as woff,$e as xlsx,We as xml,Ye as xul,et as zip};
+//# sourceMappingURL=index.es.js.map
diff --git a/src/core/index.es.js.map b/src/core/index.es.js.map
new file mode 100644
index 0000000..c4a8edb
--- /dev/null
+++ b/src/core/index.es.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.es.js","sources":["../src/utils/fileSizeFormatter.ts","../src/localization/Italian/localization.italian.ts","../src/localization/French/localization.french.ts","../src/localization/English/localization.english.ts","../src/localization/Spanish/localization.spanish.ts","../src/localization/Russian/localization.russian.ts","../src/localization/Portuguese/localization.portuguese.ts","../src/localization/Chinese-simplified/localization.simplifiedChinese.ts","../src/localization/Chinese-traditional/localization.traditionalChinese.ts","../src/localization/FileItem.localization.ts","../src/localization/dropzone.localization.ts","../src/localization/validationError.localization.ts","../src/reader/readers.ts","../src/reader/resizeImage.ts","../src/reader/imageOrientation.ts","../src/mime/icons.ts","../src/utils/getExt.ts","../src/mime/mime.ts","../src/types/ExtFile.ts","../src/types/ExtFileManager.ts","../src/types/UploadConfig.ts","../src/synthetic-file/SyntheticFile.ts","../src/utils/IdGenerator.ts","../src/utils/fileListParser.ts","../src/utils/dropzone.utils.ts","../src/utils/shrinkWord.ts","../src/utils/fakeupload.utils.ts","../src/utils/randomInt.ts","../src/utils/input.utils.ts","../src/utils/addClassName.ts","../src/utils/isUploadAbleExtFile.ts","../src/utils/getLocalFileItemData.ts","../src/validation/separateAccept.ts","../src/validation/validateAccept.ts","../src/validation/fileValidator.ts","../src/validation/fakeerros.ts","../src/synthetic-file/syntheticfileGenerator.ts","../src/validation/randomStatus.ts","../src/mocks/extFileMock.ts","../src/upload/addExtraData.upload.ts","../src/upload/addheaders.upload.ts","../src/upload/errors.upload.ts","../src/upload/response.upload.ts","../src/upload/upload.ts","../src/upload/utils.upload.ts","../src/color/namedColors.ts","../src/color/colors.ts","../src/file-manager/reconcilation.ts"],"sourcesContent":["/**\r\n * Gives a XX.XX format in Bytes KB, MB, GB or TB\r\n * @param fileSize file size to give format in Bytes\r\n */\r\n export const fileSizeFormater = (fileSize?: number | false): string| undefined => {\r\n    let result = \"\";\r\n    if (!fileSize) {\r\n        return undefined;\r\n    }\r\n    if (fileSize < 1024) {\r\n        result = fileSize + \" Bytes\"\r\n    } else {\r\n        //KB\r\n        if (fileSize < 1024 * 1024) {\r\n            result = (fileSize / 1024).toFixed(2) + \" KB\";\r\n        } else if (fileSize < 1024 * 1024 * 1024) {\r\n            result = ((fileSize / 1024) / 1024).toFixed(2) + \" MB\";\r\n        } else if (fileSize < 1024 * 1024 * 1024 * 1024) {\r\n            result = (((fileSize / 1024) / 1024) / 1024).toFixed(2) + \" GB\";\r\n        } else {\r\n            result = ((((fileSize / 1024) / 1024) / 1024) / 1024).toFixed(2) + \" TB\";\r\n        }\r\n    }\r\n    return result;\r\n}","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n/**\r\n * Italian translation for Dropzone component\r\n */\r\nexport const DropzoneItalian: LocalLabels = {\r\n    defaultLabel: \"Trascina qui i tuoi file\",\r\n\r\n    uploadingMessage: (amountOfFiles) => { return `Caricamento di ${amountOfFiles} file`; },\r\n    uploadFinished: (uploaded, rejected) => `File caricati: ${uploaded}, File rifiutati: ${rejected}`,\r\n    noFilesMessage: `Nessun file valido in attesa di essere caricato`,\r\n    footer: {\r\n        acceptAll: `Tutti i tipi di file sono accettati`,\r\n        acceptCustom: (accept) => `Tipi di file consentiti: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"Caricamento\",\r\n        maxSizeMessage: (maxFileSize) => `Dimensione massima ${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `File  ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"Il file è stato caricato con successo \",\r\n    fakeUploadError: \"Errore di caricamento del file\",\r\n}\r\n\r\n/**\r\n * Italian translation for FileItem component\r\n */\r\nexport const FileItemItalian: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `Nome: `,\r\n        size: \"Dimensione: \",\r\n        type: \"Tipo: \"\r\n    },\r\n    status: {\r\n        preparing:\"preparazione\",\r\n        uploading: \"In corso\",\r\n        success: \"Successo\",\r\n        valid: \"Valido\",\r\n        denied: \"Non válido\",\r\n        error: \"Errore\",\r\n        aborted:\"Interrotto\"\r\n    },\r\n}\r\n/**\r\n * Italian translation for Validation Errors\r\n */\r\n export const ValidateErrorItalian: LocalLabels = {\r\n    maxSizeError: (maxSize) => `Il file è molto grande. Il tam. il massimo è ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `Tipo di file illegale`,\r\n    maxFileCount: (maxFiles) => `Numero massimo di file (${maxFiles}) raggiunto`\r\n}","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n/**\r\n * French translation for Dropzone component\r\n */\r\nexport const DropzoneFrench: LocalLabels = {\r\n    defaultLabel: \"Déposez vos fichiers ici\",\r\n\r\n    uploadingMessage: (amountOfFiles) => { return `Envoi de ${amountOfFiles} fichiers`; },\r\n    uploadFinished: (uploaded, rejected) => `Fichiers téléchargés : ${uploaded}, Fichiers rejetés: ${rejected}`,\r\n    noFilesMessage: `Aucun fichier valide ne manque`,\r\n    footer: {\r\n        acceptAll: `Tous types de fichiers acceptés `,\r\n        acceptCustom: (accept) => `Types de fichier: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"Envoyer\",\r\n        maxSizeMessage: (maxFileSize) => `Taille maximale ${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `Fichiers  ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"Le fichier a été téléchargé avec succès\",\r\n    fakeUploadError: \"Erreur lors du téléchargement \",\r\n}\r\n\r\n/**\r\n * French translation for FileItem component\r\n */\r\nexport const FileItemFrench: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `Le nom: `,\r\n        size: \"Le taille: \",\r\n        type: \"Le type: \"\r\n    },\r\n    status: {\r\n        preparing:\"préparer\",\r\n        uploading: \"En cours\",\r\n        success: \"Succès\",\r\n        valid: \"Valide\",\r\n        denied: \"Refusé\",\r\n        error: \"Erreur\",\r\n        aborted:\"Interrompu\"\r\n    },\r\n}\r\n/**\r\n * French translation for Validation Errors\r\n */\r\n export const ValidateErrorFrench: LocalLabels = {\r\n    maxSizeError: (maxSize) => `Le fichier est très volumineux. Le tam. le maximum est de ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `Type de fichier illégal `,\r\n    maxFileCount: (maxFiles) => `Limite de fichiers atteinte (${maxFiles})`\r\n}","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n/**\r\n * English translation for Dropzone component\r\n */\r\nexport const DropzoneEnglish: LocalLabels = {\r\n    defaultLabel: \"Drop your files here\",\r\n    uploadingMessage: (amountOfFiles) => { return `Uploading ${amountOfFiles} files`; },\r\n    uploadFinished: (uploaded, rejected) => `Uploaded files: ${uploaded}, Rejected files: ${rejected}`,\r\n    noFilesMessage: `There is no missing valid file to upload`,\r\n    footer: {\r\n        acceptAll: `All file types accepted`,\r\n        acceptCustom: (accept) => `Allowed types: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"Upload files\",\r\n        maxSizeMessage: (maxFileSize) => `Max file size: ${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `Files ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"File was successfuly uploaded\",\r\n    fakeUploadError: \"Error on uploading. Please try again later.\",\r\n}\r\n\r\n/**\r\n * English translation for FileItem component\r\n */\r\nexport const FileItemEnglish: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `Name: `,\r\n        size: \"Size: \",\r\n        type: \"Type: \"\r\n    },\r\n    status: {\r\n        preparing:\"Preparing\",\r\n        uploading: \"Uploading\",\r\n        success: \"Success\",\r\n        valid: \"Valid\",\r\n        denied: \"Not valid\",\r\n        error: \"Error\",\r\n        aborted:\"Aborted\"\r\n    },\r\n}\r\n\r\n/**\r\n * English translation for Validation Errors\r\n */\r\nexport const ValidateErrorEnglish: LocalLabels = {\r\n    maxSizeError: (maxSize) =>\r\n        `File is too big. Max file size allowed is ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `File type is not allowed`,\r\n    maxFileCount: (maxFiles) =>\r\n        `Max amount of files (${maxFiles}) has been reached`\r\n}","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n/**\r\n * Spanish translation for Dropzone component\r\n */\r\nexport const DropzoneSpanish: LocalLabels = {\r\n    defaultLabel: \"Suelta tus archivos aquí\",\r\n\r\n    uploadingMessage: (amountOfFiles) => { return `Subiendo ${amountOfFiles} archivos`; },\r\n    uploadFinished: (uploaded, rejected) => `Archivos subidos: ${uploaded}, Archivos rechazados: ${rejected}`,\r\n    noFilesMessage: `No hay archivos válidos pendientes por subir`,\r\n    footer: {\r\n        acceptAll: `Todos los tipos de archivo aceptados`,\r\n        acceptCustom: (accept) => `Tipo(s) de archivo permitidos: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"Subir\",\r\n        maxSizeMessage: (maxFileSize) => `Tam. máximo ${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `Archivos ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"El archivo se subió correctamente\",\r\n    fakeUploadError: \"Error al subir el archivo\",\r\n}\r\n\r\n/**\r\n * Spanish translation for FileItem component\r\n */\r\nexport const FileItemSpanish: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `Nombre: `,\r\n        size: \"Tamaño: \",\r\n        type: \"Tipo: \"\r\n    },\r\n    status: {\r\n        preparing:\"Preparando\",\r\n        uploading: \"Subiendo\",\r\n        success: \"Éxito\",\r\n        valid: \"Válido\",\r\n        denied: \"No válido\",\r\n        error: \"Error\",\r\n        aborted: \"Anulado\"\r\n    },\r\n}\r\n/**\r\n * Spanish translation for Validation Errors\r\n */\r\nexport const ValidateErrorSpanish: LocalLabels = {\r\n    maxSizeError: (maxSize) => `El archivo es muy grande. El tam. máximo es ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `Tipo de archivo no permitido`,\r\n    maxFileCount: (maxFiles) => `Cantidad máxima de archivos (${maxFiles}) alcanzada`\r\n}\r\n","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n/**\r\n * Russian translation for Dropzone component\r\n */\r\nexport const DropzoneRussian: LocalLabels = {\r\n    defaultLabel: \"Перетащите сюда свои файлы.\",\r\n    uploadingMessage: (amountOfFiles) => { return `Выгрузка ${amountOfFiles} файлов`; },\r\n    uploadFinished: (uploaded, rejected) => `Загружено файлов: ${uploaded}, отклоненных файлов: ${rejected}`,\r\n    noFilesMessage: `Действительный файл не отсутствует для загрузки`,\r\n    footer: {\r\n        acceptAll: `Принимаются все типы файлов `,\r\n        acceptCustom: (accept) => `Допустимые типы: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"Отправить\",\r\n        maxSizeMessage: (maxFileSize) => `макс размер: ${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `Файлы ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"Файл был успешно загружен\",\r\n    fakeUploadError: \"Ошибка при загрузке\",\r\n}\r\n\r\n/**\r\n * Russian translation for FileItem component\r\n *\r\n */\r\nexport const FileItemRussian: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `Имя: `,\r\n        size: \"Размер: \",\r\n        type: \"Tип: \"\r\n    },\r\n    status: {\r\n        preparing:\"подготовка\",\r\n        uploading: \"Загрузка\",\r\n        success: \"успех\",\r\n        valid: \"годный\",\r\n        denied: \"выкинутый\",\r\n        error: \"ошибка\",\r\n        aborted:\"прерванный\"\r\n    },\r\n}\r\n\r\n/**\r\n * Russian translation for Validation Errors\r\n */\r\nexport const ValidateErrorRussian: LocalLabels = {\r\n    maxSizeError: (maxSize) =>\r\n        `Файл слишком большой. Максимально допустимый размер файла - ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `Тип файла не разрешен`,\r\n    maxFileCount: (maxFiles) =>\r\n        `Достигнуто максимальное количество файлов (${maxFiles})`\r\n}","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n/**\r\n * Portuguese translation for Dropzone\r\n */\r\nexport const DropzonePortuguese: LocalLabels = {\r\n    defaultLabel: \"Solte seus arquivos aqui \",\r\n\r\n    uploadingMessage: (amountOfFiles) => { return `Enviando ${amountOfFiles} arquivos`; },\r\n    uploadFinished: (uploaded, rejected) => `Arquivos enviados: ${uploaded}, Arquivos rejeitados: ${rejected}`,\r\n    noFilesMessage: `Nenhum arquivo válido está faltando para enviar`,\r\n    footer: {\r\n        acceptAll: `Todos os tipos de arquivo são aceitos`,\r\n        acceptCustom: (accept) => `Tipos permitidos: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"Enviar\",\r\n        maxSizeMessage: (maxFileSize) => `Tamanho máximo: ${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `Arquivos ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"O arquivo foi enviado com sucesso\",\r\n    fakeUploadError: \"Erro ao enviar\",\r\n}\r\n\r\n\r\n/**\r\n * Portuguese translation for FileItem component\r\n */\r\nexport const FileItemPortuguese: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `Nome: `,\r\n        size: \"Tamanho: \",\r\n        type: \"Tipo: \"\r\n    },\r\n    status: {\r\n        preparing:\"Preparando\",\r\n        uploading: \"Enviando\",\r\n        success: \"Êxito\",\r\n        valid: \"válido\",\r\n        denied: \"Negado\",\r\n        error: \"Erro\",\r\n        aborted:\"Abortado\"\r\n    },\r\n}\r\n/**\r\n * Portuguese translation for Validation Errors\r\n */\r\n export const ValidateErrorPortuguese: LocalLabels = {\r\n    maxSizeError: (maxSize) => `O arquivo é muito grande. O tamanho máximo de arquivo permitido é ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `O tipo de arquivo não é permitido `,\r\n    maxFileCount: (maxFiles) => `Quantidade máxima de arquivos (${maxFiles}) alcançada`\r\n}","import { LocalLabels } from \"../../types\";\r\nimport { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\n\r\n/**\r\n * English translation for Dropzone component\r\n */\r\nexport const DropzoneSimplifiedChinese: LocalLabels = {\r\n    defaultLabel: \"将您的文件放在这里\",\r\n    uploadingMessage: (amountOfFiles) => { return `上传 ${amountOfFiles} 个文件`; },\r\n    uploadFinished: (uploaded, rejected) => `上传文件:${uploaded},拒绝文件:${rejected}`,\r\n    noFilesMessage: `没有缺少要加载的有效文件`,\r\n    footer: {\r\n        acceptAll: `接受所有文件类型`,\r\n        acceptCustom: (accept) => `允许的类型: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"上传文件\",\r\n        maxSizeMessage: (maxFileSize) => `最大文件大小:${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `文档 ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"文件已成功上传\",\r\n    fakeUploadError: \"上传时出错\",\r\n}\r\n\r\n/**\r\n * Chinnese translation for FileItem component\r\n */\r\nexport const FileItemSimplifiedChinese: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `文档名称: `,\r\n        size: \"尺寸: \",\r\n        type: \"文件类型: \"\r\n    },\r\n    status: {\r\n        preparing:\"预加载\",\r\n        uploading: \"上传\",\r\n        success: \"成功\",\r\n        valid: \"接受的文件\",\r\n        denied: \"被拒绝的文件\",\r\n        error: \"错误\",\r\n        aborted:\"中止\"\r\n    },\r\n}\r\n\r\n/**\r\n * English translation for Validation Errors\r\n */\r\nexport const ValidateErrorSimplifiedChinese: LocalLabels = {\r\n    maxSizeError: (maxSize) =>\r\n        `文件太大。 允许的最大文件大小为 ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `文件类型不允许`,\r\n    maxFileCount: (maxFiles) =>\r\n        `已达到最大文件数 (${maxFiles})`\r\n}","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n\r\n/**\r\n * English translation for Dropzone component\r\n */\r\nexport const DropzoneTraditionalChinese: LocalLabels = {\r\n    defaultLabel: \"把你的文件放在這裡 \",\r\n    uploadingMessage: (amountOfFiles) => { return `上傳${amountOfFiles}個文件`; },\r\n    uploadFinished: (uploaded, rejected) => `上傳文件: ${uploaded}, 拒絕的文件:${rejected}`,\r\n    noFilesMessage: `沒有缺少要上傳的有效文件`,\r\n    footer: {\r\n        acceptAll: `接受所有文件類型`,\r\n        acceptCustom: (accept) => `允許的類型:${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"上傳文件\",\r\n        maxSizeMessage: (maxFileSize) => `最大文件大小:${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => ` 文件 ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"文件已成功上傳\",\r\n    fakeUploadError: \"上傳時出錯\",\r\n}\r\n\r\n/**\r\n * Chinese translation for FileItem component\r\n */\r\nexport const FileItemTraditionalChinese: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `文檔名稱: `,\r\n        size: \"文件大小: \",\r\n        type: \"文件類型: \"\r\n    },\r\n    status: {\r\n        preparing: \"預加載\",\r\n        uploading: \"上傳\",\r\n        success: \"成功\",\r\n        valid: \"有效文件\",\r\n        denied: \"無效文件\",\r\n        error: \"錯誤\",\r\n        aborted: \"中止\"\r\n    },\r\n}\r\n\r\n/**\r\n * English translation for Validation Errors\r\n */\r\nexport const ValidateErrorTraditionalChinese: LocalLabels = {\r\n    maxSizeError: (maxSize) =>\r\n        `文件太大。 允許的最大文件大小為 ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `文件類型不允許`,\r\n    maxFileCount: (maxFiles) =>\r\n        `已達到最大文件數 (${maxFiles})`\r\n}","import { FileItemRussian } from \"./Russian/localization.russian\";\r\nimport { ComponentLocalizer, LocalLabels, Localization } from \"../types\";\r\nimport { FileItemEnglish } from \"./English/localization.english\";\r\nimport { FileItemFrench } from \"./French/localization.french\";\r\nimport { FileItemPortuguese } from \"./Portuguese/localization.portuguese\";\r\nimport { FileItemSpanish } from \"./Spanish/localization.spanish\";\r\nimport { FileItemSimplifiedChinese } from \"./Chinese-simplified/localization.simplifiedChinese\";\r\nimport { FileItemTraditionalChinese } from \"./Chinese-traditional/localization.traditionalChinese\";\r\nimport { FileItemItalian } from \"./Italian/localization.italian\";\r\n\r\nexport const FileItemLocalizer: ComponentLocalizer = {\r\n    \"ES-es\": FileItemSpanish,\r\n    \"EN-en\": FileItemEnglish,\r\n    \"FR-fr\": FileItemFrench,\r\n    \"IT-it\": FileItemItalian,\r\n    \"PT-pt\": FileItemPortuguese,\r\n    \"RU-ru\": FileItemRussian,\r\n    \"ZH-cn\": FileItemSimplifiedChinese,\r\n    \"ZH-hk\": FileItemTraditionalChinese\r\n}\r\n\r\n/**\r\n * Secure translation through a selector\r\n * @param local the Localization\r\n * @returns a ComponentLocalizer object that contains the translation\r\n */\r\nexport const FileItemLocalizerSelector = (local?: Localization): LocalLabels => {\r\n    switch (local) {\r\n        case \"ES-es\": return FileItemLocalizer[\"ES-es\"];\r\n        case \"EN-en\": return FileItemLocalizer[\"EN-en\"];\r\n        case \"FR-fr\": return FileItemLocalizer[\"FR-fr\"];\r\n        case \"IT-it\": return FileItemLocalizer[\"IT-it\"];\r\n        case \"PT-pt\": return FileItemLocalizer[\"PT-pt\"];\r\n        case \"RU-ru\": return FileItemLocalizer[\"RU-ru\"];\r\n        case \"ZH-cn\": return FileItemLocalizer[\"ZH-cn\"];\r\n        case \"ZH-hk\": return FileItemLocalizer[\"ZH-hk\"];\r\n        default: return FileItemLocalizer[\"EN-en\"];\r\n    }\r\n}","import { DropzoneRussian } from \"./Russian/localization.russian\";\r\nimport { DropzoneEnglish } from \"./English/localization.english\";\r\nimport { DropzoneFrench } from \"./French/localization.french\";\r\nimport { DropzonePortuguese } from \"./Portuguese/localization.portuguese\";\r\nimport { DropzoneSpanish } from \"./Spanish/localization.spanish\";\r\nimport { DropzoneSimplifiedChinese } from \"./Chinese-simplified/localization.simplifiedChinese\";\r\nimport { DropzoneTraditionalChinese } from \"./Chinese-traditional/localization.traditionalChinese\";\r\nimport { DropzoneItalian } from \"./Italian/localization.italian\";\r\nimport { ComponentLocalizer, Localization, LocalLabels } from \"../types\";\r\n\r\nexport const DropzoneLocalizer: ComponentLocalizer = {\r\n    \"ES-es\": DropzoneSpanish,\r\n    \"EN-en\": DropzoneEnglish,\r\n    \"FR-fr\": DropzoneFrench,\r\n    \"IT-it\": DropzoneItalian,\r\n    \"PT-pt\": DropzonePortuguese,\r\n    \"RU-ru\": DropzoneRussian,\r\n    \"ZH-cn\": DropzoneSimplifiedChinese,\r\n    \"ZH-hk\": DropzoneTraditionalChinese\r\n\r\n}\r\n/**\r\n * Secure translation through a selector\r\n * @param local the Localization\r\n * @returns a ComponentLocalizer object that contains the translation\r\n */\r\nexport const DropzoneLocalizerSelector = (local: Localization | undefined): LocalLabels => {\r\n    switch (local) {\r\n        case \"ES-es\": return DropzoneLocalizer[\"ES-es\"];\r\n        case \"EN-en\": return DropzoneLocalizer[\"EN-en\"];\r\n        case \"FR-fr\": return DropzoneLocalizer[\"FR-fr\"];\r\n        case \"IT-it\": return DropzoneLocalizer[\"IT-it\"];\r\n        case \"PT-pt\": return DropzoneLocalizer[\"PT-pt\"];\r\n        case \"RU-ru\": return DropzoneLocalizer[\"RU-ru\"];\r\n        case \"ZH-cn\": return DropzoneLocalizer[\"ZH-cn\"];\r\n        case \"ZH-hk\": return DropzoneLocalizer[\"ZH-hk\"];\r\n        default: return DropzoneLocalizer[\"EN-en\"];\r\n    }\r\n}","import { ValidateErrorRussian } from \"./Russian/localization.russian\";\r\nimport { ComponentLocalizer, LocalLabels, Localization } from \"./../types\";\r\nimport { ValidateErrorEnglish } from \"./English/localization.english\";\r\nimport { ValidateErrorFrench } from \"./French/localization.french\";\r\nimport { ValidateErrorPortuguese } from \"./Portuguese/localization.portuguese\";\r\nimport { ValidateErrorSpanish } from \"./Spanish/localization.spanish\";\r\nimport { ValidateErrorSimplifiedChinese } from \"./Chinese-simplified/localization.simplifiedChinese\";\r\nimport { ValidateErrorTraditionalChinese } from \"./Chinese-traditional/localization.traditionalChinese\";\r\nimport { ValidateErrorItalian } from \"./Italian/localization.italian\";\r\n\r\nexport const ValidateErrorLocalizer: ComponentLocalizer = {\r\n    \"ES-es\": ValidateErrorSpanish,\r\n    \"EN-en\": ValidateErrorEnglish,\r\n    \"FR-fr\": ValidateErrorFrench,\r\n    \"IT-it\": ValidateErrorItalian,\r\n    \"PT-pt\": ValidateErrorPortuguese,\r\n    \"RU-ru\": ValidateErrorRussian,\r\n    \"ZH-cn\": ValidateErrorSimplifiedChinese,\r\n    \"ZH-hk\": ValidateErrorTraditionalChinese,\r\n}\r\n/**\r\n * Secure translation through a selector\r\n * @param local the Localization\r\n * @returns a ComponentLocalizer object that contains the translation\r\n */\r\nexport const ValidateErrorLocalizerSelector = (local: Localization | undefined): LocalLabels => {\r\n    if (!local || ![\"ES-es\", \"EN-en\", \"FR-fr\", \"IT-it\", \"PT-pt\", \"RU-ru\", \"ZH-cn\", \"ZH-hk\"].includes(local)) {\r\n        return ValidateErrorLocalizer[\"EN-en\"];\r\n    }\r\n    return ValidateErrorLocalizer[local];\r\n}","/**\r\n * Reads an image (or other type) file as data URL in a promise way, \r\n * so you can use await.\r\n * It will return a string that contains the URL representation\r\n * @param file File or Blob object\r\n * @returns data URL of the file\r\n */\r\nexport const readAsDataURL = (file: File | Blob, onProgress?: Function, onError?: Function): Promise<string | undefined> => {\r\n    return new Promise<string | undefined>((resolve, reject) => {\r\n        try {\r\n            const reader = new FileReader();\r\n            reader.onprogress = () => {\r\n                onProgress?.();\r\n            }\r\n            reader.onerror = function () {\r\n                onError?.();\r\n            }\r\n            reader.onload = function () {\r\n                resolve(reader.result as string);\r\n            }\r\n            reader.readAsDataURL(file);\r\n        } catch (error) {\r\n            reject(undefined);\r\n        }\r\n    });\r\n}\r\n\r\n\r\n\r\n/**\r\n * Reads a file as Text in a promise way, so you can use await.\r\n * If other kind of file is sent, this function will read it anyway\r\n * and will return a string that contains the URL representation\r\n * @param file File or Blob object\r\n * @param encoding The type of encoding such as \"base64\"\r\n * @returns data text of the file\r\n */\r\nexport const readAsText = (file: File | Blob, encoding?: string, onProgress?: Function, onError?: Function): Promise<string | undefined> => {\r\n    return new Promise<string | undefined>((resolve, reject) => {\r\n        try {\r\n            const reader = new FileReader();\r\n            reader.onload = function () {\r\n                resolve(reader.result as string);\r\n            }\r\n            reader.onprogress = () => {\r\n                onProgress?.();\r\n            }\r\n            reader.onerror = function () {\r\n                onError?.();\r\n            }\r\n            reader.readAsText(file, encoding ? encoding : \"base64\");\r\n        } catch (error) {\r\n            reject(undefined);\r\n        }\r\n    });\r\n}\r\n\r\n\r\n\r\n/**\r\n * Reads a file and return the raw binary data from the file. \r\n * @param file File or Blob object\r\n * @param encoding The type of encoding such as \"base64\"\r\n * @returns raw binary data of the file\r\n */\r\nexport const readAsBinaryString = (file: File | Blob, onProgress?: Function, onError?: Function): Promise<string | undefined> => {\r\n    return new Promise<string | undefined>((resolve, reject) => {\r\n        try {\r\n            const reader = new FileReader();\r\n            reader.onload = function () {\r\n                resolve(reader.result as string);\r\n            }\r\n            reader.onprogress = () => {\r\n                onProgress?.();\r\n            }\r\n            reader.onerror = function () {\r\n                onError?.();\r\n            }\r\n            reader.readAsBinaryString(file);\r\n        } catch (error) {\r\n            reject(undefined);\r\n        }\r\n    });\r\n}\r\n\r\n/**\r\n * Reads a file and returns an ArrayBuffer representing the file's data \r\n * @param file File or blob object\r\n * @param encoding The type of encoding such as \"base64\"\r\n * @returns ArrayBuffer representation of the file\r\n */\r\nexport const readAsArrayBuffer = (file: File | Blob, onProgress?: Function, onError?: Function): Promise<string | undefined> => {\r\n    return new Promise<string | undefined>((resolve, reject) => {\r\n        try {\r\n            const reader = new FileReader();\r\n            reader.onload = function () {\r\n                resolve(reader.result as string);\r\n            }\r\n            reader.onprogress = () => {\r\n                onProgress?.();\r\n            }\r\n            reader.onerror = function () {\r\n                onError?.();\r\n            }\r\n            reader.readAsArrayBuffer(file);\r\n        } catch (error) {\r\n            reject(undefined);\r\n        }\r\n    });\r\n}","/**\r\n * Resize an image resolution given maxWidth and maxHeight\r\n * \r\n * Should be called with await\r\n * @param base64Str a string representation of an imae file\r\n * @param maxWidth the max width of he image\r\n * @param maxHeight the max height of he image\r\n * @returns the resized image\r\n */\r\nexport function resizeImage(\r\n    base64Str: string,\r\n    maxWidth = 135,\r\n    maxHeight = 120\r\n): Promise<string | undefined> {\r\n    return new Promise((resolve, reject) => {\r\n        try {\r\n            let img: HTMLImageElement = new Image();\r\n            img.src = base64Str;\r\n            img.onload = () => {\r\n                let canvas: HTMLCanvasElement = document.createElement('canvas');\r\n                const MAX_WIDTH: number = maxWidth;\r\n                const MAX_HEIGHT: number = maxHeight;\r\n                let width: number = img.width;\r\n                let height: number = img.height;\r\n\r\n                if (maxWidth > width && maxHeight > height) {\r\n                    resolve(base64Str);\r\n                } else\r\n                    if (width > height) {\r\n                        if (width > MAX_WIDTH) {\r\n                            height *= MAX_WIDTH / width;\r\n                            width = MAX_WIDTH;\r\n                        }\r\n                    } else {\r\n                        if (height > MAX_HEIGHT) {\r\n                            width *= MAX_HEIGHT / height;\r\n                            height = MAX_HEIGHT;\r\n                        }\r\n                    }\r\n                canvas.width = width\r\n                canvas.height = height\r\n                let ctx: CanvasRenderingContext2D | null = canvas.getContext('2d')\r\n                if (ctx) {\r\n                    ctx.drawImage(img, 0, 0, width, height);\r\n                    resolve(canvas.toDataURL());\r\n\r\n                } else {\r\n                    if (process.env.NODE_ENV === \"development\") {\r\n                        console.error(\"An error ocurred when trying to make a thumnail\");\r\n                    }\r\n                    reject(undefined);\r\n                }\r\n            }\r\n        } catch (error) {\r\n            if (process.env.NODE_ENV === \"development\") {\r\n                console.error(\"An error ocurred when trying to make a thumnail\");\r\n            }\r\n            reject(undefined);\r\n        }\r\n    });\r\n}\r\n\r\n","/**\r\n * Resize an image resolution given maxWidth and maxHeight\r\n * \r\n * Should be called with await\r\n * @param base64Str a string representation of an imae file\r\n * @param maxWidth the max width of he image\r\n * @param maxHeight the max height of he image\r\n * @returns the resized image\r\n */\r\nexport function getImageOrientation(\r\n    imageSource: string | undefined,\r\n): Promise<\"landscape\" | \"portrait\"> {\r\n    return new Promise((resolve, reject) => {\r\n        //console.log(\"getImageOrientation imageSource\", imageSource);\r\n        if (!imageSource || imageSource.length === 0) {\r\n           // console.log(\"getImageOrientation rejected\", imageSource);\r\n\r\n            reject(\"landscape\");\r\n            return;\r\n        }\r\n        try {\r\n            //console.log(\"getImageOrientation try ini\", imageSource);\r\n\r\n            let img: HTMLImageElement = new Image();\r\n            img.src = imageSource;\r\n            img.onerror = (ev: string | Event) => {\r\n                //console.log(\"getImageOrientation There was a ne error reading\", ev);\r\n                reject(\"landscape\");\r\n            }\r\n            img.onload = () => {\r\n                let width: number = img.width;\r\n                let height: number = img.height;\r\n                if (width > height) {\r\n                    resolve(\"landscape\");\r\n                } else {\r\n                    resolve(\"portrait\");\r\n                }\r\n            }\r\n        } catch (error) {\r\n            //console.error(\"An error ocurred when trying to get the image orientation\");\r\n\r\n            if (process.env.NODE_ENV === \"development\") {\r\n                console.error(\"An error ocurred when trying to get the image orientation\");\r\n            }\r\n            reject(\"landscape\");\r\n        }\r\n    });\r\n}\r\n\r\n","export const sevenzip = \"https://user-images.githubusercontent.com/43678736/132086517-72a51a12-e403-4675-bfd7-22c23affa730.png\";\r\nexport const aac = \"https://user-images.githubusercontent.com/43678736/132086518-7026d4f1-ea16-4ed0-89fd-37c1aa8ac3ed.png\";\r\nexport const abw = \"https://user-images.githubusercontent.com/43678736/132086519-863c63b4-917e-4471-94ff-7e15651cc14b.png\";\r\nexport const accdb = \"https://user-images.githubusercontent.com/43678736/132086520-9bc6aa3b-51c9-4da2-9ef7-349162b86d0b.png\";\r\nexport const avi = \"https://user-images.githubusercontent.com/43678736/132086521-dbd6cf0d-d4d7-4b92-bb26-17e8a51a9383.png\";\r\nexport const azw = \"https://user-images.githubusercontent.com/43678736/132086522-070f48e8-78a8-4294-8dbb-aab81525e164.png\";\r\nexport const bmp = \"https://user-images.githubusercontent.com/43678736/132086595-90ab7f90-f87e-4900-94d9-d0b26745df48.png\";\r\nexport const bz = \"https://user-images.githubusercontent.com/43678736/132086597-e285ad5c-613a-4679-a270-493e5be4ffd9.png\";\r\nexport const bz2 = \"https://user-images.githubusercontent.com/43678736/132086598-623c410a-084a-4395-a448-211b2ff61cfe.png\";\r\nexport const c = \"https://user-images.githubusercontent.com/43678736/132086599-7a5cd692-b4df-45f5-80d9-384cb3e0c314.png\";\r\nexport const cda = \"https://user-images.githubusercontent.com/43678736/132086600-8b70a007-512d-4252-9c66-eabd3ddd6573.png\";\r\nexport const csh = \"https://user-images.githubusercontent.com/43678736/132086601-e62e5d1a-d8a2-4475-a14f-85922cec9272.png\";\r\nexport const css = \"https://user-images.githubusercontent.com/43678736/132086602-4c772934-f608-4f01-8459-c4622cee8ad5.png\";\r\nexport const csv = \"https://user-images.githubusercontent.com/43678736/132086604-b5b019fe-572e-477e-92c2-3769a48a1304.png\";\r\nexport const docx = \"https://user-images.githubusercontent.com/43678736/132086606-715ccb66-4702-4f7d-9b09-ac93ba17b643.png\";\r\nexport const docx2 = \"https://user-images.githubusercontent.com/43678736/132086607-a246b386-52c9-4fe1-a7e4-204894e6722d.png\";\r\nexport const drawio = \"https://user-images.githubusercontent.com/43678736/132086608-bcae9d57-8e54-488c-90c4-4952ae530b5e.png\";\r\nexport const dw = \"https://user-images.githubusercontent.com/43678736/132086616-0c7842d6-d20e-4ede-988b-3dd063a4de8d.png\";\r\nexport const eml = \"https://user-images.githubusercontent.com/43678736/132086617-1e351075-ffaf-4b81-a1fe-0b7b338772a2.png\";\r\nexport const eot = \"https://user-images.githubusercontent.com/43678736/132086618-397d6bd2-9fda-43ed-a135-cb40388c35af.png\";\r\nexport const eps = \"https://user-images.githubusercontent.com/43678736/132086619-9daf0b61-dbb0-4d47-8a12-9fba13b88856.png\";\r\nexport const epub = \"https://user-images.githubusercontent.com/43678736/132086620-2586ba40-c583-4589-b1a4-8bb5b258b44d.png\";\r\nexport const freearc = \"https://user-images.githubusercontent.com/43678736/132086621-3b95fb64-2533-4ccc-abcd-bd2beba572e9.png\";\r\nexport const gif = \"https://user-images.githubusercontent.com/43678736/132086622-af705a0c-2b25-4ba7-8ab6-bd69ec97f7e2.png\";\r\nexport const gzip = \"https://user-images.githubusercontent.com/43678736/132086624-89141a46-64e4-4fa0-bf69-54a0eb4d48c9.png\";\r\nexport const html = \"https://user-images.githubusercontent.com/43678736/132086625-1b8f2652-1de0-4475-8c12-7da4a9973ffb.png\";\r\nexport const icalendar = \"https://user-images.githubusercontent.com/43678736/132086626-38699705-1e6f-4bca-984b-03167b236faa.png\";\r\nexport const ind = \"https://user-images.githubusercontent.com/43678736/132086627-2f24067a-00bc-424a-af36-349a9ba14b6c.png\";\r\nexport const ini = \"https://user-images.githubusercontent.com/43678736/132086649-20c9c9e6-8e63-4d87-9b8e-8fe8eba12ada.png\";\r\nexport const java = \"https://user-images.githubusercontent.com/43678736/132086650-f1166246-b361-4c30-a04e-9781c555d14a.png\";\r\nexport const jar = \"https://user-images.githubusercontent.com/43678736/132086650-f1166246-b361-4c30-a04e-9781c555d14a.png\";\r\nexport const javascript = \"https://user-images.githubusercontent.com/43678736/132086652-4562942e-aaea-466c-968f-380fffabf3f9.png\";\r\nexport const jpeg = \"https://user-images.githubusercontent.com/43678736/132086653-0487e7e2-1ee3-49e2-8cfe-3e20f1f7490a.png\";\r\nexport const jsf = \"https://user-images.githubusercontent.com/43678736/132086654-c510bd8f-8de7-4afe-8c20-cc810b004b07.png\";\r\nexport const json = \"https://user-images.githubusercontent.com/43678736/132086656-6e96c815-e4e2-4ffd-9d71-57e9cc2450bc.png\";\r\nexport const jsonld = \"https://user-images.githubusercontent.com/43678736/132086658-5d27d3c2-394f-43fb-b512-9b414a257875.png\";\r\nexport const midi = \"https://user-images.githubusercontent.com/43678736/132086659-98f3ef6e-b9f3-4b6d-b18f-469b5334ba27.png\";\r\nexport const mov = \"https://user-images.githubusercontent.com/43678736/132086660-adcecedd-56b4-4286-8b0f-69417f77e961.png\";\r\nexport const mp3 = \"https://user-images.githubusercontent.com/43678736/132086661-a5484553-06c7-4ffa-a8f9-96b57b1b0344.png\";\r\nexport const mp4 = \"https://user-images.githubusercontent.com/43678736/132086662-05ad1597-d5e5-4efa-833e-2876e966a745.png\";\r\nexport const mpeg = \"https://user-images.githubusercontent.com/43678736/132086663-90c58955-f7fb-4bdb-ac53-92667d16d4a3.png\";\r\nexport const mpkg = \"https://user-images.githubusercontent.com/43678736/132086664-9a7530e7-6d78-4ef3-a176-20cf7f57b555.png\";\r\nexport const octet = \"https://user-images.githubusercontent.com/43678736/132086666-ab3c505d-b2c0-4177-9a06-aed5d9c39ee4.png\";\r\nexport const odp = \"https://user-images.githubusercontent.com/43678736/132086667-6c7dcbcc-8d83-41a2-8e0a-85b09e2791ae.png\";\r\nexport const ods = \"https://user-images.githubusercontent.com/43678736/132086668-9f246e91-cf2e-49cf-9617-e1fbb71abbbb.png\";\r\nexport const odt = \"https://user-images.githubusercontent.com/43678736/132086669-46113762-84d1-4b32-9441-b0138ce17a5d.png\";\r\nexport const oga = \"https://user-images.githubusercontent.com/43678736/145835364-2054509d-3448-4d34-921f-73dd6e297fc7.png\";\r\nexport const ogv = \"https://user-images.githubusercontent.com/43678736/145835367-19172bf8-cd5a-4cbe-b512-d0de1d91f269.png\";\r\nexport const ogx = \"https://user-images.githubusercontent.com/43678736/145835373-a57ef0f5-3968-483b-9f55-6d67e7f1dcea.png\";\r\nexport const opus = \"https://user-images.githubusercontent.com/43678736/132086670-0f96e770-cedc-4635-a5f9-cf97894c1d7a.png\";\r\nexport const otf = \"https://user-images.githubusercontent.com/43678736/132086671-02ad35ef-ec3a-4a65-abd5-5bf794dfcf7b.png\";\r\nexport const pdf = \"https://user-images.githubusercontent.com/43678736/132086672-3a856fda-823d-4997-b802-c7c640e6ef44.png\";\r\nexport const php = \"https://user-images.githubusercontent.com/43678736/132086673-0c4409ab-754e-4619-8cfa-179d0ccf1bd9.png\";\r\nexport const png = \"https://user-images.githubusercontent.com/43678736/132086674-fdb56d02-5845-49b7-8462-6357bc963464.png\";\r\nexport const pptx = \"https://user-images.githubusercontent.com/43678736/132086675-c879645d-acb4-41a6-ab3c-4e6c2048badb.png\";\r\nexport const pptx2 = \"https://user-images.githubusercontent.com/43678736/132086676-6de1bbd7-764f-4197-9aa4-405a60ce6734.png\";\r\nexport const proj = \"https://user-images.githubusercontent.com/43678736/132086683-3dc0a8b8-72f8-4fa1-a08a-fcfd75b465e1.png\";\r\nexport const psd = \"https://user-images.githubusercontent.com/43678736/132086685-4e327c4c-a409-4b83-b36a-8d88936b314b.png\";\r\nexport const pst = \"https://user-images.githubusercontent.com/43678736/132086686-3888e43a-5abf-41f7-9940-4b86e436521f.png\";\r\nexport const publisher = \"https://user-images.githubusercontent.com/43678736/132086687-d92b56ff-f7f7-4be7-bbf4-47b8a33f4c6f.png\";\r\nexport const python = \"https://user-images.githubusercontent.com/43678736/132086688-8e82fae4-3a9b-49c0-bf99-77189525514c.png\";\r\nexport const tar = \"https://user-images.githubusercontent.com/43678736/132086689-fe1fef9f-d2db-455b-8f4b-09acd095f571.png\";\r\nexport const rar = \"https://user-images.githubusercontent.com/43678736/132086689-fe1fef9f-d2db-455b-8f4b-09acd095f571.png\";\r\nexport const react = \"https://user-images.githubusercontent.com/43678736/132086691-d472576b-ec6a-4332-acd2-dd6a00b72952.png\";\r\nexport const richtextformat = \"https://user-images.githubusercontent.com/43678736/132086692-df6e3518-2e6a-4553-883d-e21694980449.png\";\r\nexport const rtf = \"https://user-images.githubusercontent.com/43678736/132086693-9d43571e-0c86-438f-b247-e2cb42e19e06.png\";\r\nexport const sass = \"https://user-images.githubusercontent.com/43678736/132086694-4e661d6a-1118-441e-8bc3-c52fcb2133b6.png\";\r\nexport const settings = \"https://user-images.githubusercontent.com/43678736/132086696-0dd21f83-b9fc-490c-9ed5-bd88151dc9bb.png\";\r\nexport const sh = \"https://user-images.githubusercontent.com/43678736/132086697-1d82d724-35b6-4f06-847a-3c59a5deda6e.png\";\r\nexport const swf = \"https://user-images.githubusercontent.com/43678736/132086698-19384230-dbd7-4e05-bc69-ef4537b6aae3.png\";\r\nexport const text = \"https://user-images.githubusercontent.com/43678736/132086699-5993a482-04f4-4915-b105-9037f527cf61.png\";\r\nexport const tiff = \"https://user-images.githubusercontent.com/43678736/132086700-c23461c8-6819-46e1-aecd-0a1f8d3507bb.png\";\r\nexport const ttf = \"https://user-images.githubusercontent.com/43678736/132086701-c8044c09-8d95-4af1-9410-66761001d7da.png\";\r\nexport const typescript = \"https://user-images.githubusercontent.com/43678736/132086702-59294337-ed99-4302-badd-316b2c1ff62f.png\";\r\nexport const url = \"https://user-images.githubusercontent.com/43678736/132086703-86d97476-b76e-4949-b89a-31ecb03f3b6e.png\";\r\nexport const vsd = \"https://user-images.githubusercontent.com/43678736/132086704-8fd51e7c-afa2-47a3-ab2f-d0bcd0ecae9f.png\";\r\nexport const vue = \"https://user-images.githubusercontent.com/43678736/132086705-33294da1-5c0f-49f7-b890-e4857cec0a6d.png\";\r\nexport const wav = \"https://user-images.githubusercontent.com/43678736/132086706-22f805d0-39d4-494b-824e-47dc75d05eb7.png\";\r\nexport const webm = \"https://user-images.githubusercontent.com/43678736/132086707-e61a84de-d396-4dbf-8d1b-1d6ee19e1ac8.png\";\r\nexport const weba = \"https://user-images.githubusercontent.com/43678736/132086707-e61a84de-d396-4dbf-8d1b-1d6ee19e1ac8.png\";\r\nexport const webp = \"https://user-images.githubusercontent.com/43678736/132086708-21d096dd-7148-40aa-97f1-cbb099339740.png\";\r\nexport const wma = \"https://user-images.githubusercontent.com/43678736/132086709-811d4e90-3cfa-4044-a956-aeda9c67fc92.png\";\r\nexport const wmv = \"https://user-images.githubusercontent.com/43678736/132086710-c5479c6c-0249-4542-adad-48b0ef40b775.png\";\r\nexport const woff = \"https://user-images.githubusercontent.com/43678736/132086711-1524a3e7-3e33-4822-a34f-ff3235404045.png\";\r\nexport const xlsx = \"https://user-images.githubusercontent.com/43678736/132086712-17e2c491-f6e4-4586-aef6-06bcc5f4b0e5.png\";\r\nexport const xlsx2 = \"https://user-images.githubusercontent.com/43678736/132086714-7ddf285d-2b83-4115-80a5-f02f510300a1.png\";\r\nexport const xml = \"https://user-images.githubusercontent.com/43678736/132086715-204b5a8b-9c5a-4bac-8294-9237ebc16089.png\";\r\nexport const xul = \"https://user-images.githubusercontent.com/43678736/132086716-64511d20-58cb-45a8-85df-f4d9408b469d.png\";\r\nexport const zip = \"https://user-images.githubusercontent.com/43678736/132086718-a8499333-6282-4820-aa1f-4d133eb54648.png\";\r\n","/**\r\n * Looks for the first file extension\r\n * @param fileName file name\r\n * @returns the file name extension\r\n */\r\n export const getExt = (fileName: string): string => {\r\n    const re = /(?:\\.([^.]+))?$/;\r\n    const result = re.exec(fileName);\r\n    if (result) {\r\n        return result[1];\r\n    } else {\r\n        return \"\";\r\n    }\r\n\r\n};","import {\r\n    aac, abw, accdb, avi, azw,\r\n    bmp, bz, bz2, cda,\r\n    csh, css, csv,\r\n    docx, drawio,\r\n    eot, epub,\r\n    freearc, gif, gzip,\r\n    html, icalendar,\r\n    jar, java, javascript, jpeg, json, jsonld,\r\n    midi, mp3, mp4, mpeg, mpkg,\r\n    octet, odp, ods, odt, oga, ogv, ogx, opus, otf,\r\n    pdf, php, png, pptx, psd, python,\r\n    rar, react, rtf,\r\n    sass, sevenzip, sh, swf,\r\n    tar, text, tiff, ttf, typescript,\r\n    vsd, vue,\r\n    wav, weba, webm, webp, wma, wmv, woff,\r\n    xlsx, xml, xul,\r\n    zip\r\n} from \"./icons\";\r\nimport { getExt } from \"../utils/getExt\";\r\nimport { IconsMap } from \"../types\";\r\n\r\nconst DEF_GEN_MIME: keyof IconsMap = \"octet\";\r\n/**\r\n * \r\n * @param tailMime \r\n * @returns \r\n */\r\nexport const audioSelector = (tailMime: string): keyof IconsMap => {\r\n    switch (tailMime) {\r\n        case \"aac\": return \"aac\";\r\n        case \"midi\": return \"midi\";\r\n        case \"x-midi\": return \"midi\";\r\n        case \"mpeg\": return \"mpeg\";//mp3\r\n        case \"ogg\": return \"oga\";\r\n        case \"opus\": return \"opus\";\r\n        case \"wav\": return \"wav\";\r\n        case \"webm\": return \"webm\";\r\n        //case \"3gpp\": return \"threegp\";\r\n        //case \"3gpp2\": return \"threegp\";\r\n        //case \"mp3\": return \"mp3\";\r\n        case \"wma\": return \"wma\";\r\n        default: return DEF_GEN_MIME;\r\n    }\r\n}\r\nexport const textSelector = (tailMime: string): keyof IconsMap => {\r\n    switch (tailMime) {\r\n        case \"css\": return \"css\";\r\n        case \"csv\": return \"csv\";\r\n        case \"html\": return \"html\";\r\n        case \"calendar\": return \"icalendar\";\r\n        case \"javascript\": return \"javascript\";\r\n        case \"x-javascript\": return \"javascript\";\r\n        case \"plain\": return \"text\";\r\n        case \"xml\": return \"xml\";\r\n        default: return DEF_GEN_MIME;\r\n\r\n    }\r\n}\r\nexport const imageSelector = (tailMime: string): keyof IconsMap => {\r\n    switch (tailMime) {\r\n        case \"bmp\": return \"bmp\";\r\n        case \"gif\": return \"gif\";\r\n        // case \"vnd.microsoft.icon\": return \"ico\";\r\n        //case \"ico\": return \"ico\";\r\n        case \"jpg\": return \"jpeg\";\r\n        case \"jpeg\": return \"jpeg\";\r\n        case \"png\": return \"png\";\r\n        //case \"svg+xml\": return \"svg\";\r\n        //case \"svg\": return \"svg\";\r\n        case \"tiff\": return \"tiff\";\r\n        case \"webp\": return \"webp\";\r\n        default: return DEF_GEN_MIME;\r\n\r\n    }\r\n}\r\nexport const fontSelector = (tailMime: string): keyof IconsMap => {\r\n    switch (tailMime) {\r\n        case \"otf\": return \"otf\";\r\n        case \"ttf\": return \"ttf\";\r\n        case \"woff\": return \"woff\";\r\n        case \"woff2\": return \"woff\";\r\n        default: return DEF_GEN_MIME;\r\n\r\n    }\r\n}\r\n\r\nexport const videoSelector = (tailMime: string): keyof IconsMap => {\r\n    switch (tailMime) {\r\n        case \"x-msvideo\": return \"avi\";\r\n        case \"msvideo\": return \"avi\";\r\n        case \"avi\": return \"avi\";\r\n        case \"mp4\": return \"mp4\";\r\n        case \"mpeg\": return \"mpeg\";\r\n        case \"ogg\": return \"ogv\";\r\n        case \"mp2t\": return \"mp2t\";\r\n        case \"wmv\": return \"wmv\";\r\n\r\n        case \"webm\": return \"webm\";\r\n        // case \"3gpp\": return \"threegp\";\r\n        // case \"3gpp2\": return \"threegp2\";\r\n\r\n        default: return DEF_GEN_MIME;\r\n    }\r\n}\r\n/**\r\n * \r\n * @param tailMime \r\n * @returns \r\n */\r\nexport const applicationSelector = (tailMime: string): keyof IconsMap => {\r\n    switch (tailMime) {\r\n        case \"x-abiword\": return \"abw\";\r\n        case \"abiword\": return \"abw\";\r\n        case \"x-freearc\": return \"arc\";\r\n        case \"freearc\": return \"arc\";\r\n        case \"vnd.amazon.ebook\": return \"azw\";\r\n        case \"octet-stream\": return \"octet\";\r\n        case \"x-bzip\": return \"bz\";\r\n        case \"x-bzip2\": return \"bz2\";\r\n        case \"bzip\": return \"bz\";\r\n        case \"bzip2\": return \"bz2\";\r\n        case \"x-cdf\": return \"cda\";\r\n        case \"msaccess\": return \"accdb\";\r\n        case \"csh\": return \"csh\";\r\n        case \"x-csh\": return \"csh\";\r\n        case \"vnd.ms-fontobject\": return \"eot\";\r\n        case \"epub+zip\": return \"epub\";\r\n        case \"gzip\": return \"gzip\";\r\n        case \"java-archive\": return \"jar\";\r\n        case \"x-javascript\": return \"javascript\";\r\n        case \"json\": return \"json\";\r\n        case \"ld+json\": return \"jsonld\";\r\n        case \"vnd.apple.installer+xml\": return \"mpkg\";\r\n        case \"ogg\": return \"ogx\";\r\n        case \"vnd.rar\": return \"rar\";\r\n        case \"rtf\": return \"rtf\";\r\n        case \"x-sh\": return \"sh\";\r\n        case \"sh\": return \"sh\";\r\n        case \"x-shockwave-flash\": return \"swf\";\r\n        case \"x-tar\": return \"tar\";\r\n        case \"x-httpd-php\": return \"php\";\r\n        case \"vnd.visio\": return \"vsd\";\r\n        case \"xhtml+xml\": return \"xhtml\";\r\n        case \"xml\": return \"xml\";\r\n        case \"vnd.mozilla.xul+xml\": return \"xul\";\r\n        case \"vnd.openxmlformats-officedocument.wordprocessingml.document\": return \"docx\";\r\n        case \"msword\": return \"docx\";\r\n        case \"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": return \"xlsx\";\r\n        case \"vnd.openxmlformats-officedocument.presentationml.presentation\": return \"pptx\";\r\n        case \"vnd.ms-powerpoint\": return \"pptx\";\r\n        case \"vnd.oasis.opendocument.presentation\": return \"odp\";\r\n        case \"vnd.oasis.opendocument.text\": return \"odt\";\r\n        case \"vnd.oasis.opendocument.spreadsheet\": return \"ods\";\r\n        case \"zip\": return \"zip\";\r\n        case \"x-zip-compressed\": return \"zip\";\r\n        case \"pdf\": return \"pdf\";\r\n        default: return DEF_GEN_MIME;\r\n    }\r\n}\r\n/**\r\n * Selects to wich mime type the mime type given belongs to\r\n * @param mimeType mime type to be searched \r\n * @returns the generic type, \r\nif not found it return \"octet\" that means generic binary file\r\n */\r\nexport const mimeSelector = (mimeType?: string): keyof IconsMap => {\r\n    // let genericMime: string | undefined = undefined;\r\n    if (!mimeType || !mimeType.includes(\"/\")) {\r\n        return DEF_GEN_MIME;\r\n    }\r\n    let headerMime = mimeType.split(\"/\")[0];\r\n    let tailMime = mimeType.split(\"/\")[1];\r\n    /**\r\n     * Every mimetype that \r\n     * starts with: \"application/....\"\r\n     */\r\n\r\n    switch (headerMime) {\r\n        case \"application\": return applicationSelector(tailMime);\r\n        case \"audio\": return audioSelector(tailMime);\r\n        case \"video\": return videoSelector(tailMime);\r\n        case \"text\": return textSelector(tailMime);\r\n        case \"image\": return imageSelector(tailMime);\r\n        case \"font\": return fontSelector(tailMime);\r\n\r\n        default: return DEF_GEN_MIME;\r\n    }\r\n}\r\n/**\r\n * Selects to wich mapped extension\r\n * the given exension belongs to\r\n * \r\n * @param extension \r\n * @returns \r\n */\r\nexport const extensionSelector = (extension?: string): keyof IconsMap => {\r\n    let genericMime: keyof IconsMap = \"octet\";\r\n\r\n    if (extension && extension !== \"\") {\r\n        if (extension.includes(\"zip\") || extension.includes(\"rar\")) {\r\n            genericMime = \"zip\";\r\n        } else if (extension.includes(\"doc\")) {\r\n            genericMime = \"docx\";\r\n        } else if (extension.includes(\"xls\")) {\r\n            genericMime = \"xlsx\";\r\n        } else if (extension.includes(\"drawio\")) {\r\n            genericMime = \"drawio\";\r\n        } else if (extension.includes(\"psd\")) {\r\n            genericMime = \"psd\";\r\n        } else if (extension.includes(\"csv\")) {\r\n            genericMime = \"csv\";\r\n        } else if (extension === \"jsx\") {\r\n            genericMime = \"react\";\r\n        } else if (extension === \"py\") {\r\n            genericMime = \"python\";\r\n        } else if (extension === \"vue\") {\r\n            genericMime = \"vue\";\r\n        } else if (extension === \"java\") {\r\n            genericMime = \"java\";\r\n        } else if (extension === \"ts\") {\r\n            genericMime = \"typescript\";\r\n        } else if (extension === \"sass\" || extension === \"scss\") {\r\n            genericMime = \"sass\";\r\n        }\r\n    }\r\n    return genericMime;\r\n\r\n}\r\n/**\r\n * Chack for extention whether the file is code os not\r\n * @param extension \r\n * @returns \r\n */\r\nexport const checkIsCode = (extension?: string): keyof IconsMap => {\r\n    let genericMime: keyof IconsMap = \"text\";\r\n    if (extension && extension !== \"\") {\r\n        if (extension === \"jsx\") {\r\n            genericMime = \"react\";\r\n        } else if (extension === \"py\") {\r\n            genericMime = \"python\";\r\n        } else if (extension === \"vue\") {\r\n            genericMime = \"vue\";\r\n        } else if (extension === \"java\") {\r\n            genericMime = \"java\";\r\n        } else if (extension === \"ts\" || extension === \"tsx\") {\r\n            genericMime = \"typescript\";\r\n        } else if (extension === \"js\") {\r\n            genericMime = \"javascript\";\r\n        } else if (extension === \"xml\") {\r\n            genericMime = \"xml\";\r\n        } else if (extension === \"php\") {\r\n            genericMime = \"php\";\r\n        }\r\n    }\r\n    return genericMime;\r\n}\r\n\r\n/**\r\n * Looks for a suitable file icon\r\n * If not found, returns octet-stream url\r\n * @param props mime and extension from file to search\r\n * @returns the result file ico\r\n */\r\nexport const getURLFileIco = (\r\n    file: File | undefined,\r\n    customIcons: IconsMap | undefined\r\n): ResultFileIco => {\r\n\r\n    let result: keyof IconsMap = \"fallBack\";\r\n    //if not file, return octet\r\n    if (!file) {\r\n        result = DEF_GEN_MIME;\r\n        if (customIcons?.fallBack)\r\n            return { url: customIcons?.fallBack, mimeResume: result };\r\n\r\n        return { url: mimeUrlList[result], mimeResume: result };\r\n    } else {\r\n        result = mimeSelector(file.type);\r\n    }\r\n    //If plain text\r\n    const extention: string = getExt(file.name);\r\n\r\n    if (result === \"text\") {\r\n        result = checkIsCode(extention);\r\n\r\n    }\r\n    //If octet stream result, second chance: file extention\r\n    if (result === DEF_GEN_MIME) {\r\n        result = extensionSelector(extention);\r\n    }\r\n\r\n    const customUrl = customIcons?.[result];\r\n    if (customUrl !== undefined)\r\n        return { url: customUrl, mimeResume: result };\r\n\r\n\r\n    return { url: mimeUrlList[result], mimeResume: result };\r\n}\r\n/**\r\n * Looks for a suitable file icon\r\n * @param props mime and extension from file to search\r\n * @returns the result file ico, if not found, turns octet-stream url\r\n */\r\nexport const getURLFileIcoFromNameAndType = (\r\n    name: string | undefined,\r\n    type: string | undefined,\r\n    customIcons: IconsMap | undefined\r\n): ResultFileIco => {\r\n\r\n    let result: keyof IconsMap = \"octet\";\r\n    //if not nam and type, return octet\r\n    if (!name) {\r\n        result = DEF_GEN_MIME;\r\n        if (customIcons?.fallBack)\r\n            return { url: customIcons?.fallBack, mimeResume: result };\r\n        return { url: mimeUrlList[result], mimeResume: result };\r\n    } else {\r\n        result = mimeSelector(type);\r\n    }\r\n    //If plain text\r\n    const extention: string = getExt(name);\r\n\r\n    if (result === \"text\") {\r\n        result = checkIsCode(extention);\r\n\r\n    }\r\n    //If octet stream result, second chance: file extention\r\n    if (result === DEF_GEN_MIME) {\r\n        result = extensionSelector(extention);\r\n    }\r\n    const customUrl = customIcons?.[result];\r\n    if (customUrl !== undefined)\r\n        return { url: customUrl, mimeResume: result };\r\n\r\n    return { url: mimeUrlList[result], mimeResume: result };\r\n}\r\ninterface ResultFileIco {\r\n    url: string;\r\n    mimeResume: keyof IconsMap;\r\n}\r\n/**\r\n * set of registered mimes on MDN\r\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types\r\n * \r\n */\r\ninterface MimeSelector {\r\n    [mime: string]: string;\r\n}\r\n\r\nconst mimeUrlList: MimeSelector = {\r\n    aac: aac,\r\n    accdb: accdb,\r\n    abw: abw,\r\n    arc: freearc,\r\n    avi: avi,\r\n    azw: azw,\r\n    octet: octet,\r\n    bmp: bmp,\r\n    bz: bz,\r\n    bz2: bz2,\r\n    cda: cda,\r\n    csh: csh,\r\n    css: css,\r\n    csv: csv,\r\n    docx: docx,\r\n    drawio: drawio,\r\n    eot: eot,\r\n    epub: epub,\r\n    gzip: gzip,\r\n    gif: gif,\r\n    html: html,\r\n    //ico: ico,\r\n    icalendar: icalendar,\r\n    jar: jar,\r\n    jpeg: jpeg,\r\n    javascript: javascript,\r\n    json: json,\r\n    jsonld: jsonld,\r\n    midi: midi,\r\n    //  js: js,\r\n    mp3: mp3,\r\n    mp4: mp4,\r\n    mpeg: mpeg,\r\n    mpkg: mpkg,\r\n    mp2t: octet,\r\n    odp: odp,\r\n    ods: ods,\r\n    odt: odt,\r\n    oga: oga,\r\n    ogv: ogv,\r\n    ogx: ogx,\r\n    opus: opus,\r\n    otf: otf,\r\n    png: png,\r\n    pdf: pdf,\r\n    php: php,\r\n    pptx: pptx,\r\n    psd: psd,\r\n    rar: rar,\r\n    rtf: rtf,\r\n    sass: sass,\r\n    sh: sh,\r\n    //svg: svg,\r\n    swf: swf,\r\n    tar: tar,\r\n    tiff: tiff,\r\n    ttf: ttf,\r\n    //ts: ts,\r\n    typescript: typescript,\r\n    text: text,\r\n    vsd: vsd,\r\n    wav: wav,\r\n    weba: weba,\r\n    webm: webm,\r\n    webp: webp,\r\n    woff: woff,\r\n    wma: wma,\r\n    wmv: wmv,\r\n    xhtml: html,\r\n    xlsx: xlsx,\r\n    xml: xml,\r\n    xul: xul,\r\n    zip: zip,\r\n    // threegp: threegp,\r\n    sevenzip: sevenzip,\r\n    python: python,\r\n    java: java,\r\n    react: react,\r\n    vue: vue,\r\n\r\n\r\n    fallBack: octet,\r\n};","\r\nimport { UPLOADSTATUS, ServerResponse } from \"../types\";\r\n\r\n/**\r\n * ExtFile === \"Extended File\".\r\n * This object \"extends\" the File Object\r\n */\r\nexport declare type ExtFile = {\r\n    /** \r\n     * An identifier for the extFile\r\n     */\r\n    id?: number | string | undefined;\r\n    /**\r\n     * The file object. Used mostly when user selects or drops files in the client sid.\r\n     */\r\n    file?: File;\r\n    /**\r\n     * The name of the file. Used mostly for displaying file data from server.\r\n     */\r\n    name?: string;\r\n    /**\r\n     * The type of the file. Used mostly for displaying file data from server.\r\n     */\r\n    type?: string;\r\n    /**\r\n     * The size of the file. Used mostly for displaying file data from server.\r\n     */\r\n    size?: number;\r\n    /**\r\n     * a flag that determines whether the file is valid, not valid or it is not validated.\r\n     */\r\n    valid?: boolean;\r\n    /**\r\n     * The list of errors when the file was validated\r\n     */\r\n    errors?: string[];\r\n    /**\r\n     * The current upload status. (e.g. \"uploading\")\r\n     */\r\n    uploadStatus?: UPLOADSTATUS | undefined;\r\n    /**\r\n     * A message that shows the result of the upload process\r\n     */\r\n    uploadMessage?: string;\r\n    /**\r\n     * Link, URI or string representation of an image\r\n     */\r\n    imageUrl?: string;\r\n    /**\r\n     * The XMLHttpRequest object for performing uploads to a server\r\n     */\r\n    xhr?: XMLHttpRequest;\r\n    /**\r\n     * The current percentage of upload progress.\r\n     * This value will have a higher priority over the upload progress value calculated inside the component.\r\n     * @default undefined\r\n     */\r\n    progress?: number;\r\n    /**\r\n     * The additional data that will be sent to the server\r\n     * when files are uploaded individually\r\n     */\r\n    extraUploadData?: Record<string, any>;\r\n    /**\r\n     * Any kind of extra data that could be needed.\r\n     */\r\n    extraData?: Object;\r\n    /**\r\n     * The upload response from server\r\n     */\r\n    serverResponse?: ServerResponse;\r\n    /**\r\n     * The url to be used to perform a GET request in order to download the\r\n        file. If defined, the download icon will be shown.\r\n     */\r\n    downloadUrl?: string;\r\n    /**\r\n     * Link, URI, FIle object or string representation of a video\r\n     */\r\n    videoUrl?: string;\r\n}\r\n\r\n/**\r\n * A class definition for ExtFile.\r\n * This class has the purpose to allow the creation of instances\r\n * of an ExtFile for performing complex operations that cannot be\r\n * accomplished just by using the ExtFile type.\r\n * For instance, it can help in changing the value of some attributes\r\n * across different scopes thanks to memory reference.\r\n */\r\nexport class ExtFileInstance {\r\n    /**\r\n     * An identifier for the extFile\r\n     */\r\n    public id?: number | string;\r\n    /**\r\n     * The file object. Used mostly when user selects or drops files in the client sid.\r\n     */\r\n    public file?: File;\r\n    /**\r\n     * The name of the file. Used mostly for displaying file data from server.\r\n     */\r\n    public name?: string;\r\n    /**\r\n     * The type of the file. Used mostly for displaying file data from server.\r\n     */\r\n    public type?: string;\r\n    /**\r\n     * The size of the file. Used mostly for displaying file data from server.\r\n     */\r\n    public size?: number;\r\n\r\n    public imageUrl?: string;\r\n    /**\r\n     * A flag that determines whether the file is valid, not valid or it is not validated.\r\n     */\r\n    public valid?: boolean;\r\n    /**\r\n     * The list of errors when the file was validated\r\n     */\r\n    public errors?: string[];\r\n    /**\r\n     * A message that shows the result of the upload process\r\n     */\r\n    public uploadMessage?: string;\r\n    /**\r\n     * The current upload status. (e.g. \"uploading\")\r\n     */\r\n    public uploadStatus?: UPLOADSTATUS | undefined;\r\n    /**\r\n     * The current upload progress\r\n     */\r\n    public progress?: number;\r\n    /**\r\n     * The XMLHttpRequest object for performing uploads to a server\r\n     */\r\n    public xhr?: XMLHttpRequest;\r\n    /**\r\n     * The additional data that will be sent to the server\r\n     */\r\n    public extraData?: Record<string, any>;\r\n    /**\r\n     * The additional data that will be sent to the server\r\n     * when filesare uploaded individually\r\n     */\r\n    public extraUploadData?: Record<string, any>;\r\n    /**\r\n     * The upload response from server\r\n     */\r\n    public serverResponse?: ServerResponse;\r\n    /**\r\n     * Url to perform a GET request in order to download the file.\r\n     * This  action is triggered when download button is clicked or pressed.\r\n     * In case onDownload prop is given\r\n     */\r\n    public downloadUrl?: string;\r\n    /**\r\n     * Link, URI, FIle object or string representation of a video\r\n     */\r\n    public videoUrl?: string;\r\n\r\n    constructor(extFile: ExtFile) {\r\n        const {\r\n            id,\r\n            file,\r\n            name,\r\n            size,\r\n            type,\r\n            imageUrl,\r\n            valid,\r\n            errors,\r\n            uploadMessage,\r\n            uploadStatus,\r\n            progress,\r\n            xhr,\r\n            extraData,\r\n            extraUploadData,\r\n            serverResponse,\r\n            downloadUrl, videoUrl\r\n        } = extFile;\r\n\r\n        this.id = id;\r\n        this.file = file;\r\n        this.name = name;\r\n        this.size = size;\r\n        this.type = type;\r\n        this.imageUrl = imageUrl;\r\n\r\n        this.valid = valid;\r\n        this.errors = errors;\r\n        this.uploadStatus = uploadStatus;\r\n        this.uploadMessage = uploadMessage;\r\n        this.progress = progress;\r\n        this.xhr = xhr;\r\n\r\n        this.extraData = extraData;\r\n        this.extraUploadData = extraUploadData;\r\n        this.serverResponse = serverResponse;\r\n\r\n        this.downloadUrl = downloadUrl;\r\n        this.videoUrl = videoUrl;\r\n    }\r\n    /**\r\n     * method under construction\r\n     */\r\n    /*  private static kamuiFile() {\r\n \r\n     }\r\n  */\r\n    /**\r\n     * Copies all non undefined attributes from ExtFileInstance to a new ExtFile object\r\n     * @param extFileInstance the instance of ExtFile\r\n     * @returns an ExtFile object\r\n     */\r\n    static toExtFile(extFileInstance: ExtFileInstance): ExtFile {\r\n        //console.log(\"before toExtFile()\", extFileInstance);\r\n\r\n        let extFileClone: ExtFile = {}; // the new empty object\r\n        const extFileInstanceKeys = Object.keys(extFileInstance) as [keyof ExtFile];\r\n        const extFileInstanceValues = Object.values(extFileInstance) as Array<ExtFile[keyof ExtFile]>;\r\n        // let's copy all user properties into it\r\n        for (let i = 0; i < extFileInstanceValues.length; i++) {\r\n            const currentValue: ExtFile[keyof ExtFile] = extFileInstanceValues[i];\r\n\r\n\r\n            const currKey = extFileInstanceKeys[i];\r\n            if (currentValue !== undefined) {\r\n\r\n                extFileClone[currKey] = currentValue as ExtFile[keyof ExtFile] as never;\r\n            }\r\n        }\r\n        //console.log(\"after toExtFile()\", extFileClone);\r\n        //console.log(\"current extFileClone keys\",Object.keys( extFileClone).length);\r\n        return extFileClone;\r\n    }\r\n    /**\r\n     * Copies all non undefined attributes from ExtFileInstance to a new ExtFile object.\r\n     * @returns an ExtFile object\r\n     */\r\n    toExtFile(): ExtFile {\r\n        return ExtFileInstance.toExtFile(this);\r\n    }\r\n\r\n  /*   static mock = (id?: number): ExtFileInstance => {\r\n        return new ExtFileInstance(\r\n            extFileMock(id)\r\n        );\r\n    } */\r\n}\r\n\r\n\r\n","import { ExtFileInstance, ExtFile } from \"./ExtFile\";\r\n\r\nexport class ExtFileManager {\r\n    private static nextId: number = 0;\r\n    static fileLists: Record<number | string, ExtFileInstance[] | undefined> = {};\r\n    /**\r\n     * Increases the id counter and returns the next id available.\r\n     * @returns the next integer id available\r\n     */\r\n    public static getNextId(): number {\r\n        ExtFileManager.nextId++;\r\n        return ExtFileManager.nextId;\r\n    }\r\n    /**\r\n     * Updates a dui file list given an id\r\n     * @param id id of the fileList\r\n     * @param extFiles list of DuiFiles forinitializing the array\r\n     * @returns the id of the fileList\r\n     */\r\n    public static setFileList(\r\n        id: number | string | undefined,\r\n        extFilesInstances: ExtFileInstance[]\r\n    ): number | string {\r\n        if (!id) {\r\n            return 0;\r\n        } else {\r\n            ExtFileManager.fileLists[id] = [...extFilesInstances];\r\n\r\n            return id;\r\n        }\r\n\r\n    }\r\n    /**\r\n     * Generates a new ID\r\n     * @returns the next Id asociated with a DuiFIle list\r\n     */\r\n    public static createFileListMap(): number {\r\n        const nextId: number = ExtFileManager.getNextId();\r\n        ExtFileManager.fileLists[nextId] = [];\r\n\r\n        return nextId;\r\n    }\r\n\r\n    /**\r\n     * Deletes a list map\r\n     * @returns the next Id asociated with a DuiFIle list\r\n     */\r\n    public static removeFileListMap(id?: number | string): number | string {\r\n        if (!id) {\r\n            return 0;\r\n        } else {\r\n            try {\r\n                ExtFileManager.fileLists[id] = undefined;\r\n                return id;\r\n            } catch (error) {\r\n                if (process.env.NODE_ENV === \"development\")\r\n                    console.error(\"Error on remove\", error);\r\n                return 0;\r\n            }\r\n        }\r\n    }\r\n    /**\r\n     * \r\n     * @param id the id of the dropzone\r\n     * @returns \r\n     */\r\n    public static getExtFileInstanceList(\r\n        id?: number | string\r\n    ): ExtFileInstance[] | undefined {\r\n        try {\r\n            if (!id) {\r\n                return undefined;\r\n            }\r\n            return ExtFileManager.fileLists[id];\r\n        } catch (error) {\r\n            if (process.env.NODE_ENV === \"development\")\r\n                console.error(\"Error on getExtFileInstanceList\", error);\r\n            return undefined;\r\n        }\r\n    }\r\n    /**\r\n     * Updates(replaces) the extFile list on preparing stage and returns the new array.\r\n     * Removes the non valid files if cleanOnUpload is true and validateFiles is also true\r\n     * Then sets on preparing stage all files according to the following creiteria:\r\n     * If theuploadStatus is diferent than \"sucess\" AND\r\n     * then, update the files on preparing stage. Otherwise keep the extFile props.\r\n     * Finally, updates the ExtFileInstance list on ExtFileManager.\r\n     * @param dropzoneId the id to access the right list\r\n     * @param localFiles the list of extFiles\r\n     * @param validateFiles flag that indicates that validation is active or o¿not\r\n     * @param cleanOnUpload flag to determine whther to clena the list oof non valid files or not\r\n     * @returns a list of ExtFileInstance\r\n     */\r\n    public static setFileListMapPreparing(\r\n        dropzoneId: number | string,\r\n        localFiles: ExtFile[],\r\n        validateFiles: boolean,\r\n        cleanOnUpload: boolean\r\n    ): ExtFileInstance[] | undefined {\r\n        //console.log(\"setFileListMapPreparing before if\", dropzoneId, localFiles, cleanOnUpload);\r\n\r\n        if (!(typeof dropzoneId === \"number\" || typeof dropzoneId === \"string\")) return undefined;\r\n\r\n        //console.log(\"setFileListMapPreparing before try\", localFiles, cleanOnUpload);\r\n        try {\r\n\r\n            let resultExtList: ExtFileInstance[] = [];\r\n\r\n            //initializes the extFileLInstance list\r\n            let temLocalFiles: ExtFile[] = [...localFiles];\r\n\r\n            //remove non valids if cleanOnUpload is true and validateFiles is also true\r\n            if (cleanOnUpload && validateFiles) {\r\n                // clean on Upload is true, so non valid files must be removed\r\n                temLocalFiles = temLocalFiles.filter(extFile => extFile.valid)\r\n                //console.log(\"temLocalFiles filter\", temLocalFiles);\r\n            }\r\n\r\n            //console.log(\"setFileListMapPreparing after remove non valids\", temLocalFiles);\r\n\r\n            if (validateFiles) {\r\n                // validation flag was set to true, so only valid=true files will be set to \"preparing\"\r\n\r\n                //so, only valid files was kept in the temLocalfiles array\r\n                //now set the preparing state only for files with uploadStatus !== \"success\"\r\n                temLocalFiles =\r\n                    temLocalFiles\r\n                        .map(extFile => {\r\n                            if (extFile.uploadStatus !== \"success\" && extFile.valid) {\r\n                                return { ...extFile, uploadStatus: \"preparing\" }\r\n                            } else {\r\n                                return { ...extFile }\r\n                            }\r\n                        });\r\n            } else {\r\n                // all files will be set to \"preparing\" whether the valid value\r\n                // except those files with uploadStatus ===\"success\"\r\n                temLocalFiles =\r\n                    temLocalFiles\r\n                        .map(extFile => {\r\n                            if (extFile.uploadStatus !== \"success\") {\r\n                                return { ...extFile, uploadStatus: \"preparing\" }\r\n                            } else {\r\n                                return { ...extFile }\r\n                            }\r\n                        });\r\n            }\r\n\r\n            //console.log(\"setFileListMapPreparing result\", temLocalFiles);\r\n\r\n            //converto to Object instances\r\n            resultExtList = temLocalFiles.map(F => new ExtFileInstance(F));\r\n            //console.log(\"setFileListMapPreparing RESULT resultExtList\", resultExtList);\r\n\r\n            const resultSet = ExtFileManager.setFileList(dropzoneId, resultExtList);\r\n            //console.log(\"setFileListMapPreparing RESULT resultSet\", resultSet);\r\n\r\n            return resultExtList;\r\n            // return ExtFileManager.fileLists[dropzoneId];\r\n        } catch (error) {\r\n            if (process.env.NODE_ENV === \"development\")\r\n                console.error(\"setFileListMapPreparing Error on get List\", error);\r\n            return undefined;\r\n        }\r\n\r\n    }\r\n\r\n\r\n\r\n    /**\r\n * Updates(replaces) the extFile list on preparing stage and returns the new array.\r\n * Removes the non valid files if cleanOnUpload is true and validateFiles is also true\r\n * Then sets on preparing stage all files according to the following creiteria:\r\n * If theuploadStatus is diferent than \"sucess\" AND\r\n * then, update the files on preparing stage. Otherwise keep the extFile props.\r\n * Finally, updates the ExtFileInstance list on ExtFileManager.\r\n * @param dropzoneId the id to access the right list\r\n * @param localFiles the list of extFiles\r\n * @param validateFiles flag that indicates that validation is active or o¿not\r\n * @param cleanOnUpload flag to determine whther to clena the list oof non valid files or not\r\n * @returns a list of ExtFileInstance\r\n */\r\n    public static setFileListMapPreparing2(\r\n        dropzoneId: number | string,\r\n        localFiles: ExtFile[],\r\n        validateFiles: boolean,\r\n        cleanOnUpload: boolean\r\n    ): ExtFileInstance[] | undefined {\r\n\r\n        ExtFileManager.setFileList(dropzoneId, localFiles.map(F => new ExtFileInstance({ ...F, uploadStatus: \"preparing\" })));\r\n\r\n        return ExtFileManager.getExtFileInstanceList(dropzoneId);\r\n    }\r\n\r\n\r\n\r\n    /**\r\n     * \r\n     * @param dropzoneId \r\n     * @param index \r\n     * @param incommingDuiFile \r\n     * @returns \r\n     */\r\n    /* public static updateFileListMapPreparingById(\r\n        dropzoneId: number,\r\n        index: number,\r\n        incommingDuiFile: ExtFileInstance\r\n    ): ExtFileInstance[] | undefined {\r\n        if (!(typeof dropzoneId === \"number\") || !(typeof index === \"number\") || index > 0) return undefined;\r\n        const extFileList: ExtFileInstance[] | undefined = ExtFileManager.fileLists[dropzoneId];\r\n\r\n        if (!(extFileList && extFileList.length > 0)) return undefined;\r\n        extFileList[index]=\r\n        try {\r\n            ExtFileManager.setFileList(dropzoneId, [\r\n                ...localFiles.map(\r\n                    (x) =>\r\n                        new ExtFileInstance({ ...x, uploadStatus: \"preparing\" })\r\n                ),\r\n            ]);\r\n            return ExtFileManager.fileLists[dropzoneId];\r\n        } catch (error) {\r\n            if (process.env.NODE_ENV === \"development\")\r\n            console.error(\"Error on get List\", error);\r\n            return undefined;\r\n        }\r\n\r\n    } */\r\n}","import { Method } from \"./method\"\r\n\r\nexport type UploadConfig = {\r\n    /**\r\n     * The url endpoint to upload the file.\r\n     * e.g. https://www.myasomwbackend/uploads/file\r\n     */\r\n    url?: string;\r\n    /**\r\n     * upload method, can be POST | PUT | PATCH\r\n     * @default \"POST\"\r\n     */\r\n    method?: Method;\r\n    /**\r\n     * Request headers for http request.\r\n     * e.g.\r\n     * ```jsx\r\n     * headers = { \r\n     *    \"content-type\": \"multipart/form-data\",\r\n     *    Authorization: \"Bearer YOUR_BEARER_TOKEN_GOES_HERE\",\r\n     * } \r\n     * ```\r\n     */\r\n    headers?: Record<string, string>;\r\n    /**\r\n     * the label to use in request\r\n     * On server this must be the label to get the file.\r\n     * @default \"file\"\r\n     */\r\n    uploadLabel?: string;\r\n    /**\r\n     * Flag for indicating whther to remove the non-valid files\r\n     * before starting the upload process.\r\n     * This flag is valid only if validation is enable\r\n     */\r\n    cleanOnUpload?: boolean;\r\n    /**\r\n     * If true, onDrop event or file selection not only will make Dropzone to return the list of files, but also\r\n     * it will start the upload stage for the files if at least url was set\r\n     * By default is false\r\n     */\r\n    autoUpload?: boolean;\r\n    /**\r\n     * The time that will last the \"preparing\" stage\r\n     * By default is 1500 miliseconds = 1.5 seconds\r\n     */\r\n    preparingTime?: number;\r\n    /**\r\n     * A message to show in the footer when the uploading process takes place.\r\n     */\r\n    uploadingMessage?: string;\r\n}\r\n\r\nexport const createUploadConfig = (\r\n    url?: string,\r\n    method?: Method,\r\n    headers?: Record<string, string>,\r\n    uploadLabel?: string,\r\n    cleanonUpload?: boolean\r\n) => {\r\n    return {\r\n        url,\r\n        method,\r\n        headers,\r\n        uploadLabel,\r\n        cleanonUpload\r\n    }\r\n}","\r\n/**\r\n * A syntetic file creator.\r\n * Very useful for tests\r\n */\r\nexport abstract class SyntheticFile {\r\n    /**\r\n * \r\n * @param name the file name\r\n * @param size the file size\r\n * @param type the file type\r\n * @returns \r\n */\r\n    static createFile = (name: string, size: number, type: string) => {\r\n        const file = new File([], name, { type });\r\n        Object.defineProperty(file, \"size\", {\r\n            get() {\r\n                return size;\r\n            },\r\n        });\r\n        return file;\r\n    };\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_aac = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"acc_audio-file-with-large-name.aac\", size ? size : 3516516, \"audio/aac\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_abw = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"abiword-file-with-large-name.abw\", size ? size : 3516516, \"application/x-abiword\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_freearc = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"freearc-file-with-large-name.arc\", size ? size : 3516516, \"application/x-freearc\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_avi = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"avi-file-with-large-name.avi\", size ? size : 3516516, \"video/x-msvideo\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_azw = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"amazon_kindle_ebook-file-with-large-name.azw\", size ? size : 3516516, \"application/vnd.amazon.ebook\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_octet = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"binary_octet_stream-file-with-large-name.bin\", size ? size : 3516516, \"application/octet-stream\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_bmp = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"bit_map-file-with-large-name.bmp\", size ? size : 3516516, \"image/bmp\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_bz = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"x_bzip-file-with-large-name.bz\", size ? size : 3516516, \"application/x-bzip\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_bz2 = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"x_bzip_2-file-with-large-name.bz2\", size ? size : 3516516, \"application/x-bzip2\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_cda = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"cd_audio-file-with-large-name.cda\", size ? size : 3516516, \"application/x-cdf\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_csh = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.csh\", size ? size : 3516516, \"application/x-csh\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_css = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.css\", size ? size : 3516516, \"text/css\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_csv = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.csv\", size ? size : 3516516, \"text/csv\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_doc = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.doc\", size ? size : 3516516, \"application/msword\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_docx = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.docx\", size ? size : 3516516, \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_eot = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.eot\", size ? size : 3516516, \"application/vnd.ms-fontobject\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_epub = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.epub\", size ? size : 3516516, \"application/epub+zip\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_gzip = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.gz\", size ? size : 3516516, \"application/gzip\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_gif = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.gif\", size ? size : 3516516, \"image/gif\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_htm = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.htm\", size ? size : 3516516, \"text/html\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_html = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.html\", size ? size : 3516516, \"text/html\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ico = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ico\", size ? size : 3516516, \"image/vnd.microsoft.icon\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_icalendar = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ics\", size ? size : 3516516, \"text/calendar\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_jar = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.jar\", size ? size : 3516516, \"application/java-archive\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_jpeg = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.jpeg\", size ? size : 3516516, \"image/jpeg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_jpg = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.jpg\", size ? size : 3516516, \"image/jpeg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_js = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.js\", size ? size : 3516516, \"text/javascript\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_json = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.json\", size ? size : 3516516, \"application/json\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_jsonld = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.jsonld\", size ? size : 3516516, \"application/ld+json\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_mid = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mid\", size ? size : 3516516, \"audio/midi\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_x_mid = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mid\", size ? size : 3516516, \"audio/x-midi\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_midi = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.midi\", size ? size : 3516516, \"audio/x-midi\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_x_midi = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.midi\", size ? size : 3516516, \"audio/x-midi\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_mjs = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mjs\", size ? size : 3516516, \"text/javascript\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_mp3 = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mp3\", size ? size : 3516516, \"audio/mpeg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_mp4 = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mp4\", size ? size : 3516516, \"video/mp4\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_mpeg = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mpeg\", size ? size : 3516516, \"video/mpeg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_mpkg = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mpkg\", size ? size : 3516516, \"application/vnd.apple.installer+xml\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_odp = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.odp\", size ? size : 3516516, \"application/vnd.oasis.opendocument.presentation\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ods = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ods\", size ? size : 3516516, \"application/vnd.oasis.opendocument.spreadsheet\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_odt = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.odt\", size ? size : 3516516, \"application/vnd.oasis.opendocument.text\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_oga = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.oga\", size ? size : 3516516, \"audio/ogg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ogv = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ogv\", size ? size : 3516516, \"video/ogg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ogx = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ogx\", size ? size : 3516516, \"application/ogg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_opus = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.opus\", size ? size : 3516516, \"audio/opus\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_otf = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.otf\", size ? size : 3516516, \"font/otf\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_png = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.png\", size ? size : 3516516, \"image/png\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_pdf = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.pdf\", size ? size : 3516516, \"application/pdf\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_php = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.php\", size ? size : 3516516, \"application/x-httpd-php\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ppt = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ppt\", size ? size : 3516516, \"application/vnd.ms-powerpoint\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_pptx = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.pptx\", size ? size : 3516516, \"application/vnd.openxmlformats-officedocument.presentationml.presentation\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_rar = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.rar\", size ? size : 3516516, \"application/vnd.rar\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_rtf = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.rtf\", size ? size : 3516516, \"application/rtf\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_sh = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.sh\", size ? size : 3516516, \"application/x-sh\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_svg = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.svg\", size ? size : 3516516, \"image/svg+xml\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_swf = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.swf\", size ? size : 3516516, \"application/x-shockwave-flash\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_tar = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.tar\", size ? size : 3516516, \"application/x-tar\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_tif = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.tif\", size ? size : 3516516, \"image/tiff\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_tiff = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.tiff\", size ? size : 3516516, \"image/tiff\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ts = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"mp2t_video-file-with-large-name.ts\", size ? size : 3516516, \"video/mp2t\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ttf = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ttf\", size ? size : 3516516, \"font/ttf\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_text = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.txt\", size ? size : 3516516, \"text/plain\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_typescript = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"typescript-file-with-large-name.ts\", size ? size : 3516516, \"text/plain\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_vsd = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"ms_visio-file-with-large-name.vsd\", size ? size : 3516516, \"application/vnd.visio\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_wav = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"wav_audio-file-with-large-name.wav\", size ? size : 3516516, \"audio/wav\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_weba = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"web_audio-file-with-large-name.weba\", size ? size : 3516516, \"audio/webm\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_webm = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"web_video-file-with-large-name.webm\", size ? size : 3516516, \"video/webm\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_webp = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"web_image-file-with-large-name.webp\", size ? size : 3516516, \"image/webp\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_woff = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.woff\", size ? size : 3516516, \"font/woff\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_woff2 = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.woff2\", size ? size : 3516516, \"font/woff2\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_xhtml = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.xhtml\", size ? size : 3516516, \"application/xhtml+xml\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_xlsx = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.xls\", size ? size : 3516516, \"application/vnd.ms-excel\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_xls = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.xlsx\", size ? size : 3516516, \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_xml = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"xml-file-with-large-name.xml\", size ? size : 3516516, \"application/xml\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_xml_txt = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"xml_plain_text-file-with-large-name.xml\", size ? size : 3516516, \"application/xml\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_xul = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.xul\", size ? size : 3516516, \"application/vnd.mozilla.xul+xml\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_zip = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"zip-file-with-large-name.zip\", size ? size : 3516516, \"application/zip\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_3gp = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"3gp_video-file-with-large-name.3gp\", size ? size : 3516516, \"video/3gpp\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_3gp2 = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"3gp2_video-file-with-large-name.3g2\", size ? size : 3516516, \"video/3gpp2\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_3gp_a = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"3gp_audio-file-with-large-name.3gp\", size ? size : 3516516, \"audio/3gpp\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_3gp_v = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"3gp_audio-file-with-large-name.3gp2\", size ? size : 3516516, \"audio/3gpp2\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_7z = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"seven_zip-file-with-large-name.7z\", size ? size : 3516516, \"application/x-7z-compressed\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_python = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"python-file-with-large-name.py\", size ? size : 3516516, \"text/plain\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_java = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"java-file-with-large-name.java\", size ? size : 3516516, \"text/plain\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_react = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"react_jsx-file-with-large-name.jsx\", size ? size : 3516516, \"text/plain\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_vue = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"vue-file-with-large-name.vue\", size ? size : 3516516, \"text/plain\");\r\n    }\r\n    /**\r\n     * Creates an array of fake (synthetic) files\r\n     * @param size the file size for all synthetic files\r\n     * @returns an array of all file icon preview supported files\r\n     */\r\n    static createFileListMiscelanious = (size?: number): File[] => {\r\n\r\n        let listFile: File[] = [];\r\n\r\n        listFile.push(SyntheticFile.create_aac(size));\r\n        listFile.push(SyntheticFile.create_abw(size));\r\n        listFile.push(SyntheticFile.create_freearc(size));\r\n        listFile.push(SyntheticFile.create_avi(size));\r\n        listFile.push(SyntheticFile.create_azw(size));\r\n        listFile.push(SyntheticFile.create_octet(size));\r\n        listFile.push(SyntheticFile.create_bmp(size));\r\n        listFile.push(SyntheticFile.create_bz(size));\r\n        listFile.push(SyntheticFile.create_bz2(size));\r\n        listFile.push(SyntheticFile.create_cda(size));\r\n        listFile.push(SyntheticFile.create_csh(size));\r\n        listFile.push(SyntheticFile.create_css(size));\r\n        listFile.push(SyntheticFile.create_csv(size));\r\n        listFile.push(SyntheticFile.create_doc(size));\r\n        listFile.push(SyntheticFile.create_docx(size));\r\n        listFile.push(SyntheticFile.create_eot(size));\r\n        listFile.push(SyntheticFile.create_epub(size));\r\n        listFile.push(SyntheticFile.create_gzip(size));\r\n        listFile.push(SyntheticFile.create_gif(size));\r\n        listFile.push(SyntheticFile.create_htm(size));\r\n        listFile.push(SyntheticFile.create_html(size));\r\n        listFile.push(SyntheticFile.create_ico(size));\r\n        listFile.push(SyntheticFile.create_icalendar(size));\r\n        listFile.push(SyntheticFile.create_jar(size));\r\n        listFile.push(SyntheticFile.create_jpeg(size));\r\n        listFile.push(SyntheticFile.create_jpg(size));\r\n        listFile.push(SyntheticFile.create_js(size));\r\n        listFile.push(SyntheticFile.create_json(size));\r\n        listFile.push(SyntheticFile.create_jsonld(size));\r\n        listFile.push(SyntheticFile.create_mid(size));\r\n        listFile.push(SyntheticFile.create_midi(size));\r\n        listFile.push(SyntheticFile.create_x_mid(size));\r\n        listFile.push(SyntheticFile.create_x_midi(size));\r\n        listFile.push(SyntheticFile.create_mjs(size));\r\n        listFile.push(SyntheticFile.create_mp3(size));\r\n        listFile.push(SyntheticFile.create_mp4(size));\r\n        listFile.push(SyntheticFile.create_mpeg(size));\r\n        listFile.push(SyntheticFile.create_mpkg(size));\r\n        listFile.push(SyntheticFile.create_odp(size));\r\n        listFile.push(SyntheticFile.create_ods(size));\r\n        listFile.push(SyntheticFile.create_odt(size));\r\n        listFile.push(SyntheticFile.create_oga(size));\r\n        listFile.push(SyntheticFile.create_ogv(size));\r\n        listFile.push(SyntheticFile.create_ogx(size));\r\n        listFile.push(SyntheticFile.create_opus(size));\r\n        listFile.push(SyntheticFile.create_otf(size));\r\n        listFile.push(SyntheticFile.create_png(size));\r\n        listFile.push(SyntheticFile.create_pdf(size));\r\n        listFile.push(SyntheticFile.create_php(size));\r\n        listFile.push(SyntheticFile.create_ppt(size));\r\n        listFile.push(SyntheticFile.create_pptx(size));\r\n        listFile.push(SyntheticFile.create_rar(size));\r\n        listFile.push(SyntheticFile.create_rtf(size));\r\n        listFile.push(SyntheticFile.create_sh(size));\r\n        listFile.push(SyntheticFile.create_svg(size));\r\n        listFile.push(SyntheticFile.create_swf(size));\r\n        listFile.push(SyntheticFile.create_tar(size));\r\n        listFile.push(SyntheticFile.create_tif(size));\r\n        listFile.push(SyntheticFile.create_tiff(size));\r\n        listFile.push(SyntheticFile.create_ts(size));\r\n        listFile.push(SyntheticFile.create_ttf(size));\r\n        listFile.push(SyntheticFile.create_text(size));\r\n        listFile.push(SyntheticFile.create_typescript(size));\r\n        listFile.push(SyntheticFile.create_vsd(size));\r\n        listFile.push(SyntheticFile.create_wav(size));\r\n        listFile.push(SyntheticFile.create_weba(size));\r\n        listFile.push(SyntheticFile.create_webm(size));\r\n        listFile.push(SyntheticFile.create_webp(size));\r\n        listFile.push(SyntheticFile.create_woff(size));\r\n        listFile.push(SyntheticFile.create_woff2(size));\r\n        listFile.push(SyntheticFile.create_xhtml(size));\r\n        listFile.push(SyntheticFile.create_xlsx(size));\r\n        listFile.push(SyntheticFile.create_xls(size));\r\n        listFile.push(SyntheticFile.create_xml(size));\r\n        listFile.push(SyntheticFile.create_xml_txt(size));\r\n        listFile.push(SyntheticFile.create_xul(size));\r\n        listFile.push(SyntheticFile.create_zip(size));\r\n        //listFile.push(SyntheticFile.create_3gp(size));\r\n        //listFile.push(SyntheticFile.create_3gp2(size));\r\n        //listFile.push(SyntheticFile.create_3gp_a(size));\r\n        //listFile.push(SyntheticFile.create_3gp_v(size));\r\n        //listFile.push(SyntheticFile.create_7z(size));\r\n        listFile.push(SyntheticFile.create_python(size));\r\n        listFile.push(SyntheticFile.create_java(size));\r\n        listFile.push(SyntheticFile.create_react(size));\r\n        listFile.push(SyntheticFile.create_vue(size));\r\n\r\n        return listFile;\r\n    }\r\n}\r\n///////////////////// SHORTCUTS\r\n/**\r\n * Create a list of synthetic files with different mime types\r\n * @param size the file size for each synthetic file\r\n * @returns a list of synthetic file\r\n */\r\nexport const createListOfMultiTypeFile = (size?: number): File[] => {\r\n    return SyntheticFile.createFileListMiscelanious(size);\r\n}\r\n\r\n/**\r\n * Creates a synthetic file.\r\n * By default, creates a png image file\r\n * @param name the file name to show. By default is set to \"png-image-file-with-large-name.png\"\r\n * @param size the size in bytes of the file. By default this value is set to 455555\r\n * @param type the mime type of the file. By default is set to \"image/png\"\r\n * @returns \r\n */\r\nexport const createSyntheticFile = (\r\n    name = \"png-image-file-with-large-name.png\",\r\n    size = 455555,\r\n    type = \"image/png\",\r\n): File => {\r\n    return SyntheticFile.createFile(name, size, type);\r\n}","/**\r\n * An id generator for FileItems\r\n */\r\n export abstract class FileIdGenerator {\r\n    static nextId = 0;\r\n    /**\r\n     * Increases the id counter and returns the next id available.\r\n     * @returns the next integer id available\r\n     */\r\n    static getNextId(): number {\r\n        FileIdGenerator.nextId++;\r\n        return FileIdGenerator.nextId;\r\n    }\r\n}","import { ExtFile, ExtFileInstance } from \"../types\";\r\nimport { FileIdGenerator } from \"./IdGenerator\";\r\n\r\n\r\n/**\r\n * Converts the fileList into an array of separated ExtFile objects\r\n * @param fileList the FileList object given by input(event.target.files) or drop operation (event.dataTransfer)\r\n * @returns an array of ExtFile objects\r\n */\r\nexport const fileListToExtFileArray = (fileList: FileList): ExtFile[] => {\r\n    let extFileArray: ExtFile[] = [];\r\n    for (let i = 0, f: File; (f = fileList[i]); i++) {\r\n        extFileArray.push({ id: FileIdGenerator.getNextId(), file: f, name: f.name, size: f.size, type: f.type });\r\n    }\r\n    return extFileArray;\r\n};\r\n\r\n/**\r\n * Converts the fileList into an array of separated ExtFile instances\r\n * @param fileList the FileList object given by input (event.target.files) or drop operation (event.dataTransfer)\r\n * @returns an array of ExtFile instances\r\n */\r\nexport const fileListToExtFileInstanceArray = (fileList: FileList): ExtFileInstance[] => {\r\n    let extFileArray: ExtFileInstance[] = [];\r\n    for (let i = 0, f: File; (f = fileList[i]); i++) {\r\n        extFileArray.push(new ExtFileInstance({ id: FileIdGenerator.getNextId(), file: f, name: f.name, size: f.size, type: f.type  }));\r\n    }\r\n    return extFileArray;\r\n};","export const isValidateActive = (\r\n    accept: string | undefined,\r\n    maxFileSize: number | undefined,\r\n    maxFiles: number | undefined,\r\n    validator: Function | undefined\r\n  ): boolean => {\r\n    return (\r\n      (accept !== undefined && accept !== null) ||\r\n      (maxFileSize !== undefined && maxFileSize !== null) ||\r\n      (maxFiles !== undefined && maxFiles !== null) ||\r\n      (validator !== undefined && validator !== null)\r\n    );\r\n  };\r\n  ","/**\r\n * The max size of the word in characters\r\n */\r\nexport const DEFAULT_MAX_SIZE_WORD = 30;\r\n/**\r\n * \r\n * @param word the word to be shrinked\r\n * @returns the shrinked word\r\n */\r\nexport const shrinkWord = (word = \"\", card = false): string => {\r\n    let newWord = word;\r\n    if (card) {\r\n        if (word.length >= 20) {\r\n            newWord = word.slice(0, 10) + \"...\" + word.slice(-7);\r\n        }\r\n    } else if (word.length >= DEFAULT_MAX_SIZE_WORD) {\r\n        newWord = word.slice(0, 13) + \"...\" + word.slice(-8);\r\n    }\r\n    return newWord;\r\n};","\r\nimport { DropzoneLocalizerSelector } from \"../localization\";\r\nimport { ExtFile, ExtFileInstance, UploadResponse } from \"../types\";\r\n\r\n/**\r\n * Updates a extFile and sets its uploadStatus to \"uploading\"\r\n * @param extFile the extended file object\r\n * @returns the extended file with the uploadStatus attribute modified\r\n */\r\nexport const setPrepToUploading = (\r\n    extFile: ExtFile\r\n): Promise<ExtFile> => {\r\n    //console.log(\"prepToUpload One\", extFile);\r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            resolve({\r\n                ...extFile,\r\n                uploadStatus: \"uploading\",\r\n            });\r\n        }, 1500);\r\n\r\n    });\r\n};\r\n/**\r\n * Updates a extFile and sets its uploadStatus to \"success\"\r\n * @param extFile the extended file object\r\n * @returns the extended file with the uploadStatus attribute modified\r\n */\r\nexport const uploadOne = (\r\n    extFile: ExtFile\r\n): Promise<ExtFile> => {\r\n    //console.log(\"upload One\", extFile);\r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            resolve({\r\n                ...extFile,\r\n                uploadStatus: \"success\",\r\n            });\r\n        }, 2000);\r\n    });\r\n};\r\n/**\r\n * Awaits the given time before start uploading\r\n * @param preparingTime the time in miliseconds, by default it will wait 1.5 secs\r\n * @returns an empty object\r\n */\r\nexport const sleepPreparing = (\r\n    preparingTime: number = 5000\r\n): Promise<void> => {\r\n    //console.log(\"uploadfiles preparingTime One\", preparingTime);\r\n    return new Promise((resolve, reject) => {\r\n\r\n        setTimeout(() => {\r\n            resolve();\r\n        }, preparingTime);\r\n\r\n    });\r\n}\r\n\r\n/**\r\n * \r\n * @param extFileInstance \r\n * @returns \r\n */\r\nexport const prepToUploadOne = (\r\n    extFileInstance: ExtFileInstance | ExtFile\r\n): Promise<ExtFileInstance | ExtFile> => {\r\n    //console.log(\"prepToUpload One\", extFileInstance);\r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            extFileInstance.uploadStatus = \"uploading\";\r\n            resolve({\r\n                ...extFileInstance,\r\n                uploadStatus: \"uploading\",\r\n            });\r\n        }, 1500);\r\n\r\n    });\r\n};\r\n\r\n/**\r\n * \r\n * @param extFileInstance \r\n * @returns \r\n */\r\nexport const uploadOneExtFile = (\r\n    extFileInstance: ExtFileInstance\r\n): Promise<Object> => {\r\n    //console.log(\"upload One\", extFileInstance);\r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            extFileInstance.uploadStatus = \"success\";\r\n            resolve({\r\n                ...extFileInstance,\r\n                uploadStatus: \"success\",\r\n            });\r\n        }, 2000);\r\n    });\r\n};\r\n\r\n\r\n/**\r\n * \r\n * @param extFile the extFile to upload \r\n * @param DropzoneLocalizer the localization\r\n * @returns a duiUploadResponse object that describes the result\r\n */\r\nexport const fakeFuiUpload = (\r\n    extFileInstance: ExtFileInstance,\r\n    DropzoneLocalizer = DropzoneLocalizerSelector(\"EN-en\")\r\n): Promise<ExtFile> => {\r\n    \r\n    const extFile:ExtFile = extFileInstance.toExtFile();\r\n    \r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            const randomNumber: number = Math.floor(Math.random() * 10);\r\n            if (randomNumber % 2 === 0) {\r\n                const success = true;\r\n                const message = DropzoneLocalizer.fakeuploadsuccess as string;\r\n                const payload = { url: \"\" };\r\n                resolve({\r\n                    ...extFile,\r\n                    serverResponse: { success, message, payload },\r\n                    uploadStatus: \"success\",\r\n                    uploadMessage: message,\r\n\r\n                });\r\n            } else {\r\n                const success = false;\r\n                const message = DropzoneLocalizer.fakeUploadError as string;\r\n                const payload = {};\r\n                resolve({\r\n                    ...extFile,\r\n                    serverResponse: { success, message, payload },\r\n                    uploadStatus: \"error\",\r\n                    uploadMessage: message,\r\n                });\r\n            }\r\n        }, 1700);\r\n    });\r\n};\r\n\r\n\r\n/**\r\n * \r\n * @param extFile the extFile to upload \r\n * @param DropzoneLocalizer the localization\r\n * @returns a duiUploadResponse object that describes the result\r\n */\r\nexport const fakeFuiUploadExtFile = (\r\n    extFileInstance: ExtFileInstance,\r\n    DropzoneLocalizer = DropzoneLocalizerSelector(\"EN-en\")\r\n): Promise<UploadResponse> => {\r\n    \r\n    const extFile:ExtFile = extFileInstance.toExtFile();\r\n    \r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            const randomNumber: number = Math.floor(Math.random() * 10);\r\n            if (randomNumber % 2 === 0) {\r\n                const status = true;\r\n                const message = DropzoneLocalizer.fakeuploadsuccess as string;\r\n                const payload = { url: \"\" };\r\n\r\n                resolve({\r\n                    id: extFile.id,\r\n                    serverResponse: { status, message, payload },\r\n                    uploadedFile: {\r\n                        ...extFile,\r\n                        uploadStatus: \"success\",\r\n                        uploadMessage: message,\r\n                        progress: 100\r\n                    }\r\n\r\n                });\r\n            } else {\r\n                const status = false;\r\n                const message = DropzoneLocalizer.fakeUploadError as string;\r\n                const payload = {};\r\n                resolve({\r\n                    id: extFile.id,\r\n                    serverResponse: { status, message, payload },\r\n                    uploadedFile: {\r\n                        ...extFile,\r\n                        uploadStatus: \"error\",\r\n                        uploadMessage: message,\r\n                        progress: 60\r\n                    },\r\n                });\r\n            }\r\n        }, 1700);\r\n    });\r\n};\r\n","/**\r\n * Random integer between min (included) and max (excluded)\r\n * @param min the min number\r\n * @param max the max number\r\n * @returns a random number between min (included) and max (excluded)\r\n */\r\nexport function getRandomInt(min: number = 0, max: number = 0): number {\r\n    return Math.floor(Math.random() * (max - min)) + min;\r\n}\r\n","/**\r\n * Cleans the input.value attribute\r\n * @param inputElement \r\n */\r\nexport const cleanInput = (inputElement?: HTMLInputElement | null) => {\r\n    if (!inputElement) return;\r\n    inputElement.value = \"\";\r\n}","/**\r\n * If className is given, adds class name in string format to a base class name\r\n * @param baseClassName the base class name\r\n * @param className the class name to be added\r\n * @returns a new class name obtained by adding the second paramater\r\n */\r\nexport const addClassName = (\r\n    baseClassName: string,\r\n    className: string | undefined\r\n): string => {\r\n    if (className)\r\n        return `${baseClassName} ${className}`;\r\n    return baseClassName;\r\n}","import { ExtFile } from \"../types\";\r\n\r\nexport const isUploadAbleExtFile = (extFile: ExtFile, validateFilesFlag: boolean) => {\r\n    return (!validateFilesFlag || (validateFilesFlag && extFile.valid)) && extFile.uploadStatus !== \"success\";\r\n}","/**\r\n * \r\n * @param file \r\n * @param name \r\n * @param type \r\n * @param size \r\n * @returns the file name, type and size\r\n */\r\nexport const getLocalFileItemData = (\r\n    file: File | undefined,\r\n    name: string | undefined,\r\n    type: string | undefined,\r\n    size: number | undefined\r\n): [string, string | undefined, number | undefined] => {\r\n\r\n    let localFileName: string = \"\";\r\n    let localFileType: string | undefined = undefined;\r\n    let localFileSize: number | undefined = undefined;\r\n\r\n    // if file object is valid, obtain metadata from it\r\n    // otherwise try to get file data from individual props in string format\r\n    if (file && typeof file.name === \"string\") {\r\n        localFileName = file.name;\r\n        localFileType = file.type;\r\n        localFileSize = file.size;\r\n    } else if (name && typeof name === \"string\") {\r\n        localFileName = name;\r\n        localFileType = type;\r\n        localFileSize = size;\r\n    }\r\n    return [localFileName, localFileType, localFileSize]\r\n}","/**\r\n * Separate the accept string array into an array of strings separated by commas\r\n * @param accept the string accept array\r\n * @returns an array of strings in wich every item\r\n */\r\nexport const separateAccept = (accept: string | undefined): string[] => {\r\n    if (!accept || accept.length === 0) {\r\n        return [];\r\n    }\r\n    const commaSeparatedAccpet: string[] = accept.split(\",\").map((acceptItem) => acceptItem.trim());\r\n    return commaSeparatedAccpet;\r\n}","import { getExt } from \"../utils/getExt\";\r\n\r\n/**\r\n * Checks whether a file is valid or not given an array of file extentions and mime types\r\n * e.g. accept =  [\".doc\", \".docx\", \".xml\", \"application/msword\", \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"]\r\n * @param accept the array of strings accept items\r\n * @param file a File object to be evaluated\r\n * @returns true if the mime type file is included in the accept param\r\n */\r\n export const validateAccept = (accept: string[], file: File): boolean => {\r\n    let valid: boolean = false;\r\n    const { name, type } = file;\r\n    //Array(5) [ \".doc\", \".docx\", \".xml\", \"application/msword\", \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" ]\r\n    for (let i = 0; i < accept.length; i++) {\r\n        const acceptItem: string = accept[i];\r\n        //check is not empty\r\n        if (acceptItem.length !== 0) {\r\n            //check extention\r\n            if (acceptItem.charAt(0) === \".\") {\r\n                if (acceptItem.includes(getExt(name))) {\r\n                    return true;\r\n                }\r\n            }\r\n            //check mime\r\n            // header/tail  => image/png  ;  image/* ; audio\r\n            if (type && type.length > 0 && acceptItem.includes(\"/\") && type.includes(\"/\")) {\r\n                let headerMime = acceptItem.split(\"/\")[0];\r\n                let tailMime = acceptItem.split(\"/\")[1];\r\n\r\n                let headerMimeFile = type.split(\"/\")[0];\r\n                let tailMimeFile = type.split(\"/\")[1];\r\n\r\n                if (headerMime === headerMimeFile) {\r\n                    //    image/*\r\n                    if (tailMime === \"*\") {\r\n                        return true;\r\n                    } else if (tailMime === tailMimeFile) {\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n    return valid;\r\n}","import { ValidateErrorLocalizerSelector } from \"../localization\";\r\nimport { ExtFile, FunctionLabel, Localization, LocalLabels } from \"../types\";\r\nimport { ValidateFileResponse, FileValidatorProps } from \"../types/validation\";\r\nimport { FileIdGenerator } from \"../utils/IdGenerator\";\r\nimport { separateAccept } from \"./separateAccept\";\r\nimport { validateAccept } from \"./validateAccept\";\r\n\r\n/**\r\n * \r\n * @param preValidatedFiles FileList \r\n * @param remainingValids The number of remaining valid files\r\n * @param localValidator \r\n * @param validator \r\n * @param maxFiles \r\n * @param localization \r\n * @returns \r\n */\r\nexport const fileListvalidator = (\r\n    preValidatedFiles: FileList,\r\n    remainingValids: number,\r\n    localValidator: FileValidatorProps,\r\n    validator?: ((f: File) => ValidateFileResponse) ,\r\n    maxFiles?: number,\r\n    localization?: Localization\r\n): ExtFile[] => {\r\n    const output: ExtFile[] = [];\r\n    //set a countdown when there is a limit on files\r\n    let countdown: number = remainingValids;\r\n    // get localized labels\r\n    const ValidationErrorLocalizer: LocalLabels =\r\n        ValidateErrorLocalizerSelector(localization);\r\n    //Iterate the File list\r\n    for (let i = 0, f: File; (f = preValidatedFiles[i]); i++) {\r\n        // Validate the file list with\r\n        let validatedFile: ExtFile = validateFile(f, validator, localValidator, ValidationErrorLocalizer);\r\n        if (validatedFile.valid) {\r\n            //not valid due to file count limit\r\n            const valid = countdown > 0;\r\n            validatedFile.valid = valid;\r\n            //add error about amount\r\n            if (!valid) {\r\n                const maxFileErrorMessenger: FunctionLabel = ValidationErrorLocalizer.maxFileCount as FunctionLabel;\r\n                validatedFile.errors = validatedFile.errors\r\n                    ? [...validatedFile.errors, maxFileErrorMessenger(maxFiles || Infinity)]\r\n                    : [maxFileErrorMessenger(maxFiles || Infinity)];\r\n            }\r\n            countdown--;\r\n        }\r\n        output.push(validatedFile);\r\n    }\r\n    return output;\r\n};\r\n\r\n\r\n/**\r\n * For each ExtFile sets the valid prop of ExtFile to \"true\" or \"false\"\r\n * depending on the result of the individual validation. \r\n * It also add the list of errors.\r\n * @param extFileList \r\n * @param remainingValids \r\n * @param localValidatorProps \r\n * @param validator \r\n * @param maxFiles \r\n * @param localization \r\n * @returns a new ExtFile list with each item validated\r\n */\r\nexport const validateExtFileList = (\r\n    extFileList: ExtFile[],\r\n    remainingValids: number,\r\n    localValidatorProps: FileValidatorProps,\r\n    validator?: ((f: File) => ValidateFileResponse) ,\r\n    maxFiles?: number,\r\n    localization?: Localization\r\n): ExtFile[] => {\r\n    //console.log(\"remaning valids\", remainingValids);\r\n    let fileListResult: ExtFile[] = [];\r\n    if (!remainingValids) return fileListResult;\r\n    let remaining: number = remainingValids;\r\n    const ValidationErrorLocalizer: LocalLabels =\r\n        ValidateErrorLocalizerSelector(localization);\r\n    const maxFileErrorMessenger: FunctionLabel = ValidationErrorLocalizer.maxFileCount as FunctionLabel;\r\n    for (let i = 0; i < extFileList.length; i++) {\r\n        let currentExtFile: ExtFile = extFileList[i];\r\n\r\n        currentExtFile = validateExtFile(currentExtFile, validator, localValidatorProps, ValidationErrorLocalizer);\r\n        //console.log(\"validateExtFileList after validation\", currentExtFile);\r\n\r\n        if (currentExtFile.valid) {\r\n            //not valid due to file count limit\r\n            const valid = remaining > 0;\r\n            currentExtFile.valid = valid;\r\n            //add error about amount\r\n            if (!valid) {\r\n                currentExtFile.errors = currentExtFile.errors\r\n                    ? [...currentExtFile.errors, maxFileErrorMessenger(maxFiles || Infinity)]\r\n                    : [maxFileErrorMessenger(maxFiles || Infinity)];\r\n            }\r\n            remaining--;\r\n        }\r\n        fileListResult.push(currentExtFile);\r\n\r\n    }\r\n    return fileListResult;\r\n}\r\n\r\n/**\r\n * \r\n * @param extFile \r\n * @param validator \r\n * @param validatorProps \r\n * @param localErrors \r\n * @returns \r\n */\r\nexport const validateExtFile = (\r\n    extFile: ExtFile,\r\n    validator: ((f: File) => ValidateFileResponse) | undefined,\r\n    validatorProps: FileValidatorProps,\r\n    localErrors: LocalLabels\r\n): ExtFile => {\r\n    let extFileResult: ExtFile = { ...extFile };\r\n    let errors: string[] = [];\r\n    //TO-DO: Add extra validation for individual props even if FIle object was not given\r\n    if (!extFile.file) {\r\n        return { ...extFileResult }\r\n    }\r\n\r\n    //TO-DO: add \"overrideValidation\" prop to ignore the rest of validators like accept and maxFileSize\r\n    if (validator) {\r\n        const resultCustomValidation: ValidateFileResponse = validator(extFileResult.file as File);\r\n        const { errors: errorsResult } = resultCustomValidation;\r\n        if (errorsResult)\r\n            errors.push(...errorsResult)\r\n        //return { ...extFileResult, ...validator(extFileResult.file as File) };\r\n    }\r\n\r\n    const { maxFileSize, accept } = validatorProps;\r\n    //console.log(\"Validation\", maxFileSize, accept);\r\n    //check file size\r\n    const file: File = extFile.file;\r\n\r\n\r\n    if (maxFileSize && file.size > maxFileSize) {\r\n        const maxFileSizeErrorMessenger: FunctionLabel = localErrors.maxSizeError as FunctionLabel;\r\n\r\n        //console.log(\"Size error\", maxFileSizeErrorMessenger(maxFileSize));\r\n\r\n        errors.push(maxFileSizeErrorMessenger(maxFileSize));\r\n    }\r\n    //check file type\r\n    if (accept && !validateAccept(separateAccept(accept), file)) {\r\n        errors.push(localErrors.acceptError as string);\r\n    }\r\n    const isValid: boolean = errors.length === 0;\r\n    extFileResult = { ...extFileResult, valid: isValid, errors: !isValid ? errors : undefined };\r\n    //console.log(\"validation extFileResult\", extFileResult);\r\n    return extFileResult;\r\n\r\n}\r\n\r\n\r\n\r\n/**\r\n * Function that validate whether a file is valid, or not\r\n * according to the Filevalidator properties\r\n * @param file a File object to be evaluated\r\n * @param validatorProps the validator object \r\n * @returns a FileValidated object\r\n */\r\nexport const validateFile = (\r\n    file: File,\r\n    validator: undefined | ((f: File) => ValidateFileResponse),\r\n    validatorProps: FileValidatorProps,\r\n    localErrors: LocalLabels\r\n): ExtFile => {\r\n\r\n    const idGenerated = FileIdGenerator.getNextId();\r\n    let errors: string[] = [];\r\n    if (validator) {\r\n        return { id: idGenerated, file, ...validator(file) };\r\n    }\r\n\r\n    const { maxFileSize, accept } = validatorProps;\r\n\r\n    //check file size\r\n    if (maxFileSize && file.size > maxFileSize) {\r\n        const maxFileSizeErrorMessenger: FunctionLabel = localErrors.maxSizeError as FunctionLabel;\r\n        errors.push(maxFileSizeErrorMessenger(maxFileSize));\r\n    }\r\n\r\n    //check file type\r\n    // const allowedTypes = accept.filter((type) => (file.type === type))\r\n    if (accept && !validateAccept(separateAccept(accept), file)) {\r\n        errors.push(localErrors.acceptError as string);\r\n    }\r\n\r\n\r\n    const fileResult: ExtFile = {\r\n        id: idGenerated,\r\n        file: file,\r\n        valid: errors.length === 0,\r\n        errors: errors\r\n    };\r\n    // logic here\r\n    return fileResult;\r\n};","/**\r\n * list of dumy errors in english\r\n */\r\nexport const listOfErrors: string[] =\r\n    [\r\n        \"File is too big. Max file size allowed is 80mb.\",\r\n        \"File's type is not allowed.\",\r\n        \"Max amount of files (28) has been reached.\"\r\n    ];","import { ExtFile, UPLOADSTATUS } from \"../types\";\r\nimport { FileIdGenerator, getRandomInt } from \"../utils\";\r\nimport { getRandomUploadStatus, listOfErrors } from \"../validation\";\r\n\r\n\r\n/**\r\n * Make a validated file that is ready to be used on FileItem component,\r\n * if valid is not set, a random operation will decide whether the file is valid or not\r\n * If valid is false, then the natural order is not to be uploadable and wont have upload message nor upload status\r\n * If valid is true, then file can be uploaded and can have upload message if the status is succes or error\r\n * @param file The file\r\n * @param valid true if it is a valid file, otherwise is false\r\n * @param uploadStatus the current upload status. If not given a random upload status will be set\r\n * @param uploadMessage the upload message after uploading\r\n * @returns a Vaidated File object\r\n */\r\n export const makeSyntheticExtFile = (\r\n    file?: File ,\r\n    valid = (Math.ceil(Math.random() * 28) % 2 === 0),\r\n    uploadStatus?: UPLOADSTATUS,\r\n    uploadMessage?: string\r\n): ExtFile => {\r\n    //if valid, naturally, can be uploaded\r\n    let errors: string[] | undefined = [];\r\n    let newUpoadStatus = uploadStatus || getRandomUploadStatus();\r\n\r\n    let customUploadMessage: string | undefined = uploadMessage || \"\";\r\n    if (valid) {\r\n        //we can decide according to upload status \r\n        if (!uploadMessage) {\r\n            switch (newUpoadStatus) {\r\n                case \"error\": customUploadMessage = \"Upload failed. There was an error\"; break;\r\n                case \"success\": customUploadMessage = \"File was successfully upload\"; break;\r\n                default: uploadMessage = undefined;\r\n            }\r\n        }\r\n        errors = undefined;\r\n    } else {\r\n        //if not valid, just show error messages\r\n        const randInt: number = getRandomInt(0, 3);\r\n        errors.push(listOfErrors[randInt]);\r\n        newUpoadStatus = undefined;\r\n        customUploadMessage = undefined;\r\n    }\r\n    //now make a File Validated instance \r\n    const newFileValidated: ExtFile = {\r\n        id: FileIdGenerator.getNextId(),\r\n        valid: valid,\r\n        file: file,\r\n        uploadStatus: newUpoadStatus,\r\n        uploadMessage: customUploadMessage,\r\n        errors: errors\r\n    };\r\n    return newFileValidated;\r\n}\r\n","import { UPLOADSTATUS } from \"../types\";\r\nimport { getRandomInt } from \"../utils/randomInt\";\r\n\r\n/**\r\n * Generates a random number betwen 0 and 3\r\n * where\r\n * 0 => error\r\n * 1 => uploading\r\n * 2 => success\r\n * 3 => undefined\r\n * @returns a random upload status or undefined\r\n */\r\n export const getRandomUploadStatus = (): UPLOADSTATUS | undefined => {\r\n    const result: number = getRandomInt(0, 4);\r\n    switch (result) {\r\n        case 0: return \"error\";\r\n        case 1: return \"uploading\";\r\n        case 2: return \"success\";\r\n        default:\r\n            return undefined;\r\n    }\r\n}","import { createSyntheticFile } from \"../synthetic-file\"\r\nimport { ExtFile } from \"../types\"\r\nimport { FileIdGenerator } from \"../utils\"\r\nimport { listOfErrors } from \"../validation\"\r\n\r\nexport const extFileMock = (id?: number): ExtFile => {\r\n    return {\r\n        id: id || FileIdGenerator.getNextId(),\r\n        name: \"fileName.ext\",\r\n        size: 28 * 1024 * 1024,\r\n        type: \"files-ui/mock\",\r\n        file: createSyntheticFile(\"fileName.ext\", 28 * 1024 * 1024, \"files-ui/mock\"),\r\n        errors: listOfErrors,\r\n        uploadMessage: \"uploaded\",\r\n        uploadStatus: \"preparing\",\r\n        valid: false,\r\n        progress: 28,\r\n        xhr: new XMLHttpRequest(),\r\n        extraData: {\r\n            extraData1: \"files-ui is the best\",\r\n            extraData2: {\r\n                id: 1,\r\n                name: \"files-ui.mock\"\r\n            },\r\n            deleted: true\r\n        },\r\n        downloadUrl: \"https://www.files-ui.com/mock/file-download\"\r\n    }\r\n}","export default function addExtraData(\r\n    formData: FormData,\r\n    extraData: Record<string, string> | undefined\r\n) {\r\n    //headers\r\n    const extraDataKeys: string[] = Object.keys(extraData || {});\r\n    //const headerValues: string[] = Object.values(headers);\r\n    for (let i = 0; i < extraDataKeys.length && extraData; i++) {\r\n        //console.log(\"uploadFile extraData\", extraDataKeys[i], extraData[extraDataKeys[i]]);\r\n        formData.append(extraDataKeys[i], extraData[extraDataKeys[i]]);\r\n    }\r\n\r\n    formData.append(\"otherValue\", \"HAAAAAAAAAAAAAAa\");\r\n\r\n}","export default function addHeaders(\r\n    xhr: XMLHttpRequest,\r\n    headers: Record<string, string> | undefined\r\n) {\r\n    //headers\r\n    const headerKeys: string[] = Object.keys(headers || {});\r\n    //const headerValues: string[] = Object.values(headers);\r\n    for (let i = 0; i < headerKeys.length && headers; i++) {\r\n        //console.log(\"uploadFile headers\", headerKeys[i], headers[headerKeys[i]]);\r\n        xhr.setRequestHeader(\r\n            headerKeys[i],\r\n            headers[headerKeys[i]]\r\n        );\r\n    }\r\n\r\n\r\n}","import { ExtFile, UploadResponse } from \"../types\";\r\n\r\nexport const TIMEOUT_ERROR_RESPONSE = {\r\n    success: false,\r\n    message: \"Timeout error\",\r\n    payload: {}\r\n};\r\nexport const ABORTED_ERROR_RESPONSE = {\r\n    success: false,\r\n    message: \"Upload aborted\",\r\n    payload: {}\r\n}\r\nexport const JSON_PARSE_ERROR_RESPONSE = {\r\n    success: false,\r\n    message: \"Error when parsing JSON response\",\r\n    payload: {}\r\n}\r\n\r\nexport const UNEXPECTED_ERROR_RESPONSE = {\r\n    success: false,\r\n    message: \"Unexpected error\",\r\n    payload: {}\r\n}\r\n\r\nexport const NO_XHR_PROVIDED_ERROR = (extFile: ExtFile): ExtFile => {\r\n    return {\r\n\r\n        ...extFile,\r\n        uploadMessage: \"Unable to upload. xhr object was not provided\",\r\n        uploadStatus: \"error\",\r\n\r\n        serverResponse: { success: false, }\r\n    }\r\n}","import { ExtFile, ServerResponse, UploadResponse } from \"../types\";\r\nimport { JSON_PARSE_ERROR_RESPONSE } from \"./errors.upload\";\r\n\r\nexport const makeServerResponse = (success: any, message: string, payload: any): ServerResponse => {\r\n    const result: ServerResponse = { success: success, message: message, payload: payload } as ServerResponse;\r\n    return result;\r\n}\r\nexport const JsonParseResponse = (xhr: XMLHttpRequest): ServerResponse => {\r\n    try {\r\n        const jsonResponse = JSON.parse(xhr.response);\r\n        const success: any = jsonResponse.success;\r\n        const message: string = jsonResponse.message;\r\n        const payload: any = jsonResponse.payload;\r\n\r\n        const fuiResponse: ServerResponse = {\r\n            success: typeof success === \"boolean\" ? success : false,\r\n            message: typeof message === \"string\" ? message : \"Error on message response\",\r\n            payload: payload || {}\r\n        }\r\n        return fuiResponse\r\n    } catch (error) {\r\n        //console.log(\"FuiUpload ERROR\", error);\r\n        return JSON_PARSE_ERROR_RESPONSE;\r\n    }\r\n}\r\n\r\n\r\n\r\nexport const makeSuccessUploadResponse = (\r\n    extFile: ExtFile,\r\n    responseFui: ServerResponse\r\n): ExtFile => {\r\n    return {\r\n        ...extFile,\r\n        serverResponse: responseFui,\r\n        uploadMessage: responseFui.message,\r\n        uploadStatus: \"success\"\r\n\r\n    }\r\n}\r\n\r\n\r\nexport const makeErrorUploadResponse = (\r\n    extFile: ExtFile,\r\n    responseFui: ServerResponse\r\n): ExtFile => {\r\n    //console.log(\"makeErrorUploadResponse\", extFile, responseFui);\r\n    return {\r\n        ...extFile,\r\n        uploadMessage: responseFui.message,\r\n        uploadStatus: \"error\", \r\n        serverResponse: responseFui,\r\n    }\r\n}\r\n\r\n","import { ExtFile, Method, UPLOADSTATUS } from \"../types\";\r\nimport { ServerResponse, UploadResponse } from \"../types/uploadTypes\";\r\nimport addExtraDataUpload from \"./addExtraData.upload\";\r\nimport addHeaders from \"./addheaders.upload\";\r\nimport { ABORTED_ERROR_RESPONSE, NO_XHR_PROVIDED_ERROR, TIMEOUT_ERROR_RESPONSE, UNEXPECTED_ERROR_RESPONSE } from \"./errors.upload\";\r\nimport { JsonParseResponse, makeErrorUploadResponse, makeSuccessUploadResponse } from \"./response.upload\";\r\nimport { completeUploadResult, unableToUploadResult } from \"./utils.upload\";\r\n\r\n\r\n/**\r\n * Uploads one formData object to a given endpoint in a promisified way\r\n * @param xhr XMLHTTPrequest object\r\n * @param method method for uploading\r\n * @param endpoint endpoint to upload the file\r\n * @param data FromData object to perform multipart form data upload\r\n * @param headers the set of headers\r\n * @returns a server response that consists on {status, payload, message}\r\n */\r\nexport const uploadFormData = (\r\n    xhr: XMLHttpRequest,\r\n    method: Method | undefined = \"POST\",\r\n    endpoint: string,\r\n    data: FormData,\r\n    headers: Record<string, string> | undefined\r\n) => {\r\n    return new Promise<ServerResponse>((resolve, reject) => {\r\n        //console.log(\"Fui_uploadFormData uploadFile\", xhr, method, endpoint, data, headers);\r\n\r\n        const finalMethod: Method = [\"POST\", \"PUT\", \"PATCH\"].includes(method.toUpperCase()) ? method : \"POST\";\r\n\r\n        let lastLastState: number = -1;\r\n        let lastState: number = 0;\r\n        let jumped: boolean = false;\r\n\r\n        xhr.upload.onload = () => {\r\n            //console.log(\"Fui_uploadFormData uploadFile onLoad\", xhr.readyState, xhr.response);\r\n        };\r\n        xhr.upload.ontimeout = () => resolve(TIMEOUT_ERROR_RESPONSE);\r\n        xhr.upload.onabort = () => {\r\n            //console.log(\"Fui_uploadFormData ABORTEEEEDDDD\");\r\n            resolve(ABORTED_ERROR_RESPONSE);\r\n        };\r\n        xhr.onloadend = async (e) => {\r\n            //console.log(\"onloadend loaded\", e.loaded);\r\n            //console.log(\"onloadend total\", e.total);\r\n            //console.log(\"onloadend lengthComputable\", e.lengthComputable);\r\n\r\n        }\r\n        // listen for `progress` event\r\n        //currently listening on FileItem component hook\r\n        xhr.onreadystatechange = async (e) => {\r\n            //console.log(\"Finished\", xhr);\r\n\r\n            //console.log(\"Fui_uploadFormData uploadFile onreadystatechange e.type\", e.type);\r\n            //console.log(\"Fui_uploadFormData uploadFile onreadystatechange\", xhr.readyState, xhr.response);\r\n\r\n            lastLastState = lastState;\r\n            lastState = xhr.readyState;\r\n\r\n            if (xhr.readyState === 4) {\r\n                if (xhr.response !== \"\") {\r\n                    //there is th answer\r\n                    resolve(JsonParseResponse(xhr));\r\n                } else {\r\n                    //error unexpected\r\n                    // console.log(\"Fui_uploadFormData EMPTY status\", xhr.status);\r\n                    // console.log(\"Fui_uploadFormData EMPTY readyState\", xhr.readyState);\r\n                    // console.log(\"Fui_uploadFormData EMPTY upload\", xhr.upload);\r\n                    //console.log(\"Fui_uploadFormData EMPTY abort\", xhr.abort);\r\n                    //const jumped = lastLastState - lastLastState !== 1;\r\n                    resolve(ABORTED_ERROR_RESPONSE);\r\n\r\n                }\r\n            } else {\r\n                //console.log(\"Fui_uploadFormData FuiUpload NOT YET\" + xhr.readyState);\r\n            }\r\n        };\r\n        // open request\r\n        xhr.open(finalMethod, endpoint, true);\r\n\r\n        //add header to request\r\n        addHeaders(xhr, headers);\r\n        //start uploading\r\n        xhr.send(data);\r\n    });\r\n\r\n};\r\n\r\n/**\r\n * \r\n * @param file the extended file to be uploaded\r\n * @param url the endpoint\r\n * @param method the method for uploading\r\n * @param headers headers for request\r\n * @returns \r\n */\r\nexport const uploadExtFile = async (\r\n    extFile: ExtFile,\r\n    url: string,\r\n    method?: Method,\r\n    headers?: Record<string, string>,\r\n    uploadLabel?: string,\r\n): Promise<ExtFile> => {\r\n    return new Promise(async (resolve, reject) => {\r\n        try {\r\n            const uploader: XMLHttpRequest | undefined = extFile.xhr;\r\n\r\n            if (!uploader) {\r\n                resolve(NO_XHR_PROVIDED_ERROR(extFile));\r\n                return;\r\n            }\r\n\r\n            const localMethod: Method = method || \"POST\";\r\n            const fileToUpload: File = extFile.file as File;\r\n\r\n            const formData = new FormData();\r\n\r\n            formData.append(uploadLabel || \"file\", fileToUpload);\r\n\r\n            // add extra data to upload\r\n            const finalExtraData: Record<string, any> =\r\n                { otherValue: \"other valueee haaaa\", param2: { tecnica: \"KIKOHUUUU\", friend: \"Chaos\", age: 25 }, ...extFile.extraUploadData };\r\n\r\n            addExtraDataUpload(formData, finalExtraData);\r\n            //console.log(\"FORMDATA\", formData);\r\n\r\n            let responseFui: ServerResponse;\r\n            responseFui = await uploadFormData(\r\n                uploader,\r\n                localMethod,\r\n                url,\r\n                formData,\r\n                headers || {});\r\n\r\n            if (responseFui.success) {\r\n                // status is true\r\n                resolve(makeSuccessUploadResponse(extFile, responseFui));\r\n            } else {\r\n                // status is false\r\n                resolve(makeErrorUploadResponse(extFile, responseFui));\r\n            }\r\n        } catch (error) {\r\n            // on error\r\n            //console.log(\"uploadPromiseXHR uploadPromiseXHR ERROR\", error);\r\n            resolve(\r\n                makeErrorUploadResponse(extFile, UNEXPECTED_ERROR_RESPONSE)\r\n            );\r\n        }\r\n    });\r\n};\r\n\r\n\r\n\r\n\r\nexport function uploadFile(\r\n    file: File,\r\n    url: string,\r\n    method?: Method,\r\n    label?: string,\r\n    headers?: Record<string, string>\r\n): Promise<ServerResponse> {\r\n    return new Promise(async (resolve, reject) => {\r\n\r\n\r\n        //start uploading\r\n        const formData = new FormData();\r\n\r\n        formData.append(label || \"file\", file);\r\n\r\n        try {\r\n            const serverResponse: ServerResponse = await uploadFormData(new XMLHttpRequest(), method, url, formData, headers);\r\n            resolve(serverResponse);\r\n        } catch (error) {\r\n            // on error\r\n            //console.log(\"uploadPromiseXHR uploadPromiseXHR ERROR\", error);\r\n            resolve(UNEXPECTED_ERROR_RESPONSE);\r\n        }\r\n    });\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * @deprecated\r\n * Uploads one formData object to a given endpoint in a promisified way\r\n * @param xhr XMLHTTPrequest object\r\n * @param method method for uploading\r\n * @param endpoint endpoint to upload the file\r\n * @param data FromData object to perform multipart form data\r\n * @param headers the set of headers\r\n * @returns a dui server response that consists on {success, payload, message}\r\n */\r\nexport const FuiUpload = (\r\n    xhr: XMLHttpRequest,\r\n    method: Method,\r\n    endpoint: string,\r\n    data: FormData,\r\n    headers: Record<string, string>\r\n) => {\r\n    return new Promise<ServerResponse>((resolve, reject) => {\r\n        //console.log(\"FuiUpload params\", xhr, method, endpoint, data, headers);\r\n\r\n        xhr.upload.onload = () => {\r\n            //console.log(\"FuiUpload onLoad\", xhr.readyState, xhr.response);\r\n        };\r\n\r\n        xhr.upload.ontimeout = () => resolve(TIMEOUT_ERROR_RESPONSE);\r\n        xhr.upload.onabort = () => resolve(ABORTED_ERROR_RESPONSE);\r\n\r\n        // listen for `progress` event\r\n        //currently listening on FileMosaic component hook\r\n\r\n        xhr.onreadystatechange = async (e) => {\r\n            //console.log(\"Finished\", xhr);\r\n            //console.log(\"FuiUpload onreadystatechange\", xhr.readyState, xhr.response, xhr);\r\n\r\n            if (xhr.readyState === 4) {\r\n                if (xhr.response !== \"\") {\r\n                    //there is th answer\r\n                    resolve(JsonParseResponse(xhr));\r\n                } else {\r\n                    //error unexpected\r\n                    resolve(UNEXPECTED_ERROR_RESPONSE);\r\n                }\r\n            } else {\r\n                //console.log(\"FuiUpload NOT YET\" + xhr.readyState);\r\n            }\r\n        };\r\n        // open request\r\n        xhr.open(method, endpoint, true);\r\n        const headerKeys: string[] = Object.keys(headers);\r\n        //const headerValues: string[] = Object.values(headers);\r\n        for (let i = 0; i < headerKeys.length; i++) {\r\n            //console.log(\"FuiUpload  headers\", headerKeys[i], headers[headerKeys[i]]);\r\n            xhr.setRequestHeader(\r\n                headerKeys[i],\r\n                headers[headerKeys[i]]\r\n            );\r\n        }\r\n        //start uploading\r\n        xhr.send(data);\r\n    });\r\n\r\n};\r\n\r\n\r\n","\r\nimport { ExtFile, ExtFileInstance, ServerResponse, UploadResponse, UPLOADSTATUS } from \"../types\"\r\n\r\nexport const unexpectedErrorUploadResult = (extFile: ExtFile): ExtFile => {\r\n    return {\r\n        ...extFile,\r\n        uploadMessage: \"Unexpected error\",\r\n        uploadStatus: \"error\",\r\n        serverResponse: {\r\n            success: false,\r\n            message: \"Error on upload: unexpected error \",\r\n            payload: {},\r\n        }\r\n    }\r\n}\r\nexport const unableToUploadResult = (\r\n    extFile: ExtFile\r\n): UploadResponse => {\r\n    return {\r\n        id: extFile.id,\r\n        uploadedFile: {\r\n            ...extFile,\r\n            uploadMessage: \"Unable to upload. XHR was not provided\",\r\n            uploadStatus: \"error\"\r\n        },\r\n        serverResponse: {\r\n            success: false,\r\n            message: \"Error on upload: Unable to upload. XHR was not provided \",\r\n            payload: {},\r\n        }\r\n    }\r\n}\r\nexport const completeUploadResult = (\r\n    extFile: ExtFile,\r\n    serverResponse: ServerResponse,\r\n    uploadStatusresult: UPLOADSTATUS\r\n): UploadResponse => {\r\n    return {\r\n        id: extFile.id,\r\n        uploadedFile: {\r\n            ...extFile,\r\n            uploadMessage: serverResponse.message,\r\n            uploadStatus: uploadStatusresult\r\n        },\r\n        serverResponse: serverResponse\r\n    }\r\n}\r\n\r\n/**\r\n * Initializes the xhr attribute for performing uploads\r\n * @param extFileList the list of extended files\r\n * @returns the array of extFiles with the xhr attribute initialized\r\n */\r\nexport const toUploadableExtFileList = (\r\n    extFileList: ExtFile[] | ExtFileInstance[]\r\n): ExtFile[] => {\r\n    if (!extFileList) return [];\r\n    return extFileList.map(extFile => {\r\n        return { ...extFile, xhr: new XMLHttpRequest() }\r\n    });\r\n}\r\n\r\n/**\r\n * Updates the uploadStatus of the given extFile \r\n * from \"preparing\" to \"uploading\"\r\n * @param extFile the extended file\r\n * @returns the extended file with uploadStatus updated to \"uploading\"\r\n */\r\nexport const instantPreparingToUploadOne = (\r\n    extFile: ExtFileInstance | ExtFile\r\n): ExtFileInstance | ExtFile => {\r\n    if (extFile.uploadStatus === \"preparing\") {\r\n        //for ExtFile instance\r\n        extFile.uploadStatus = \"uploading\";\r\n        //for ExtFile type\r\n        return {\r\n            ...extFile,\r\n            uploadStatus: \"uploading\",\r\n        };\r\n    }\r\n    return extFile;\r\n};\r\n\r\n/**\r\n * \r\n * @param extFile the extended file\r\n * @returns \r\n */\r\nexport const preparingToUploadOne = (\r\n    extFile: ExtFileInstance | ExtFile\r\n): Promise<ExtFileInstance | ExtFile> => {\r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            if (extFile.uploadStatus === \"preparing\") {\r\n                //for ExtFile instance\r\n                extFile.uploadStatus = \"uploading\";\r\n                //for ExtFile type\r\n                resolve({\r\n                    ...extFile,\r\n                    uploadStatus: \"uploading\",\r\n                });\r\n            } else\r\n                resolve(extFile);\r\n        }, 1500);\r\n    });\r\n};\r\n/**\r\n * Sleeps for 1200 miliseconds for showing a better transition\r\n * on uploading\r\n * @param time the time to sleep in miliseconds\r\n * @returns true is everything is ok\r\n */\r\nexport const sleepTransition = (time = 1500\r\n): Promise<boolean> => {\r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            resolve(true);\r\n        }, time);\r\n    });\r\n}\r\n/**\r\n * Removes the deleted files and updates the aborted ones with a message\r\n * @param arrExtFile incomming arr of extFle instances\r\n * @returns an array of ExtFle objects\r\n */\r\nexport const sanitizeArrExtFile = (arrExtFile: ExtFileInstance[]): ExtFile[] => {\r\n  \r\n    return arrExtFile.filter((extFileInstance: ExtFileInstance) =>\r\n        !extFileInstance.extraData?.deleted)\r\n\r\n        .map((extFileInstance: ExtFileInstance) => {\r\n            if (extFileInstance.uploadStatus === \"aborted\"\r\n                && !extFileInstance.uploadMessage) {\r\n                    // TO-DO: ad localization for this message\r\n                extFileInstance.uploadMessage = \"Upload aborted by user\";\r\n                //extFileInstance.uploadStatus = \"error\";\r\n            }\r\n            return ExtFileInstance.toExtFile(extFileInstance) as ExtFile\r\n        });\r\n}\r\n/**\r\n * \r\n * @param extFileInstance \r\n * @param extFileobj \r\n */\r\nexport const setNextUploadStatus = (\r\n    extFileInstance: ExtFileInstance,\r\n    extFileobj: ExtFile) => {\r\n\r\n    const prevStatus: UPLOADSTATUS | undefined = extFileInstance.uploadStatus;\r\n    const nextStstaus: UPLOADSTATUS | undefined = extFileobj.uploadStatus;\r\n\r\n    //console.log(\"setNextUploadStatus\", prevStatus, nextStstaus);\r\n    //console.log(\"setNextUploadStatus\", extFileInstance.uploadMessage, extFileobj.uploadMessage);\r\n    if (\r\n        prevStatus === \"preparing\" &&\r\n        [\"aborted\", undefined].includes(nextStstaus)\r\n    ) {\r\n        extFileInstance.uploadStatus = undefined;\r\n        extFileInstance.uploadMessage = extFileobj.uploadMessage;\r\n\r\n    } else if (\r\n        prevStatus === \"uploading\" &&\r\n        [\"aborted\", undefined].includes(nextStstaus)\r\n    ) {\r\n        extFileInstance.uploadStatus = \"aborted\";\r\n        extFileInstance.uploadMessage = extFileobj.uploadMessage;\r\n\r\n    }\r\n\r\n}\r\n\r\n","import { NamedColor } from \"../types/NamedColor\";\r\n\r\n/**\r\n * The full list of named Colors provided by\r\n * https://htmlcolorcodes.com/es/nombres-de-los-colores/\r\n */\r\nexport const NAMED_COLORS: NamedColor =\r\n{\r\n    //RED\r\n    indianred: \"#CD5C5C\",\r\n    lightcoral: \"#F08080\",\r\n    salmon: \"#FA8072\",\r\n    darksalmon: \"#E9967A\",\r\n    lightsalmon: \"#FFA07A\",\r\n    crimson: \"#DC143C\",\r\n    red: \"#FF0000\",\r\n    firebrick: \"#B22222\",\r\n    darkred: \"#8B0000\",\r\n    //PINK\r\n    pink: \"#FFC0CB\",\r\n    lightpink: \"#FFB6C1\",\r\n    hotpink: \"#FF69B4\",\r\n    deeppink: \"#FF1493\",\r\n    mediumvioletred: \"#C71585\",\r\n    palevioletred: \"#DB7093\",\r\n    //ORANGE\r\n    //\"lightsalmon: \"#FFA07A\",\r\n    coral: \"#FF7F50\",\r\n    tomato: \"#FF6347\",\r\n    orangered: \"#FF4500\",\r\n    darkorange: \"#FF8C00\",\r\n    orange: \"#FFA500\",\r\n    //YELLOW\r\n    gold: \"#FFD700\",\r\n    yellow: \"#FFFF00\",\r\n    lightyellow: \"#FFFFE0\",\r\n    lemonchiffon: \"#FFFACD\",\r\n    lightgoldenrodyellow: \"#FAFAD2\",\r\n    papayawhip: \"#FFEFD5\",\r\n    moccasin: \"#FFE4B5\",\r\n    peachpuff: \"#FFDAB9\",\r\n    palegoldenrod: \"#EEE8AA\",\r\n    khaki: \"#F0E68C\",\r\n    darkkhaki: \"#BDB76B\",\r\n    //PURPLE\r\n    lavender: \"#E6E6FA\",\r\n    thistle: \"#D8BFD8\",\r\n    plum: \"#DDA0DD\",\r\n    violet: \"#EE82EE\",\r\n    orchid: \"#DA70D6\",\r\n    fuchsia: \"#FF00FF\",\r\n    magenta: \"#FF00FF\",\r\n    mediumorchid: \"#BA55D3\",\r\n    mediumpurple: \"#9370DB\",\r\n    rebeccapurple: \"#663399\",\r\n    blueviolet: \"#8A2BE2\",\r\n    darkviolet: \"#9400D3\",\r\n    darkorchid: \"#9932CC\",\r\n    darkmagenta: \"#8B008B\",\r\n    purple: \"#800080\",\r\n    indigo: \"#4B0082\",\r\n    slateblue: \"#6A5ACD\",\r\n    darkslateblue: \"#483D8B\",\r\n    mediumslateblue: \"#7B68EE\",\r\n    //GREEN\r\n    greenyellow: \"#ADFF2F\",\r\n    chartreuse: \"#7FFF00\",\r\n    lawngreen: \"#7CFC00\",\r\n    lime: \"#00FF00\",\r\n    limegreen: \"#32CD32\",\r\n    palegreen: \"#98FB98\",\r\n    lightgreen: \"#90EE90\",\r\n    mediumspringgreen: \"#00FA9A\",\r\n    springgreen: \"#00FF7F\",\r\n    mediumseagreen: \"#3CB371\",\r\n    seagreen: \"#2E8B57\",\r\n    forestgreen: \"#228B22\",\r\n    green: \"#008000\",\r\n    darkgreen: \"#006400\",\r\n    yellowgreen: \"#9ACD32\",\r\n    olivedrab: \"#6B8E23\",\r\n    olive: \"#808000\",\r\n    darkolivegreen: \"#556B2F\",\r\n    mediumaquamarine: \"#66CDAA\",\r\n    darkseagreen: \"#8FBC8B\",\r\n    lightseagreen: \"#20B2AA\",\r\n    darkcyan: \"#008B8B\",\r\n    teal: \"#008080\",\r\n    //BLUE\r\n    aqua: \"#00FFFF\",\r\n    cyan: \"#00FFFF\",\r\n    lightcyan: \"#E0FFFF\",\r\n    paleturquoise: \"#AFEEEE\",\r\n    aquamarine: \"#7FFFD4\",\r\n    turquoise: \"#40E0D0\",\r\n    mediumturquoise: \"#48D1CC\",\r\n    darkturquoise: \"#00CED1\",\r\n    cadetblue: \"#5F9EA0\",\r\n    steelblue: \"#4682B4\",\r\n    lightsteelblue: \"#B0C4DE\",\r\n    powderblue: \"#B0E0E6\",\r\n    lightblue: \"#ADD8E6\",\r\n    skyblue: \"#87CEEB\",\r\n    lightskyblue: \"#87CEFA\",\r\n    deepskyblue: \"#00BFFF\",\r\n    dodgerblue: \"#1E90FF\",\r\n    cornflowerblue: \"#6495ED\",\r\n    //\"mediumslateblue: \"#7B68EE\",\r\n    royalblue: \"#4169E1\",\r\n    blue: \"#0000FF\",\r\n    mediumblue: \"#0000CD\",\r\n    darkblue: \"#00008B\",\r\n    navy: \"#000080\",\r\n    midnightblue: \"#191970\",\r\n    //BROWN\r\n    cornsilk: \"#FFF8DC\",\r\n    blanchedalmond: \"#FFEBCD\",\r\n    bisque: \"#FFE4C4\",\r\n    navajowhite: \"#FFDEAD\",\r\n    wheat: \"#F5DEB3\",\r\n    burlywood: \"#DEB887\",\r\n    tan: \"#D2B48C\",\r\n    rosybrown: \"#BC8F8F\",\r\n    sandybrown: \"#F4A460\",\r\n    goldenrod: \"#DAA520\",\r\n    darkgoldenrod: \"#B8860B\",\r\n    peru: \"#CD853F\",\r\n    chocolate: \"#D2691E\",\r\n    saddlebrown: \"#8B4513\",\r\n    sienna: \"#A0522D\",\r\n    brown: \"#A52A2A\",\r\n    maroon: \"#800000\",\r\n    //WHITE\r\n    white: \"#FFFFFF\",\r\n    snow: \"#FFFAFA\",\r\n    honeydew: \"#F0FFF0\",\r\n    mintcream: \"#F5FFFA\",\r\n    azure: \"#F0FFFF\",\r\n    aliceblue: \"#F0F8FF\",\r\n    ghostwhite: \"#F8F8FF\",\r\n    whitesmoke: \"#F5F5F5\",\r\n    seashell: \"#FFF5EE\",\r\n    beige: \"#F5F5DC\",\r\n    oldlace: \"#FDF5E6\",\r\n    floralwhite: \"#FFFAF0\",\r\n    ivory: \"#FFFFF0\",\r\n    antiquewhite: \"#FAEBD7\",\r\n    linen: \"#FAF0E6\",\r\n    lavenderblush: \"#FFF0F5\",\r\n    mistyrose: \"#FFE4E1\",\r\n    //GREY\r\n    gainsboro: \"#DCDCDC\",\r\n    lightgray: \"#D3D3D3\",\r\n    silver: \"#C0C0C0\",\r\n    darkgray: \"#A9A9A9\",\r\n    gray: \"#808080\",\r\n    dimgray: \"#696969\",\r\n    lightslategray: \"#778899\",\r\n    slategray: \"#708090\",\r\n    darkslategray: \"#2F4F4F\",\r\n    black: \"#000000\"\r\n}","import { NAMED_COLORS } from \"./namedColors\";\r\n\r\n/**\r\n * Make the color into a darker color\r\n * @param colorInput \r\n * @returns the darked color in\r\n */\r\nexport const darkerColor = (colorInput: string, percentage = 25): string => {\r\n    let darkedColor = \"\";\r\n    const reduce = (100 - percentage) / 100;\r\n    let component1: number = 0;\r\n    let component2: number = 0;\r\n    let component3: number = 0;\r\n    if (isHexColor(colourNameToHex(colorInput))) {\r\n\r\n        component1 = hexTodec(colorInput.charAt(1)) * 16 + hexTodec(colorInput.charAt(2));\r\n        component2 = hexTodec(colorInput.charAt(3)) * 16 + hexTodec(colorInput.charAt(4));\r\n        component3 = hexTodec(colorInput.charAt(5)) * 16 + hexTodec(colorInput.charAt(6));\r\n\r\n        darkedColor = `rgb(${component1 * reduce}, ${component2 * reduce},${component3 * reduce})`;\r\n    } else {\r\n        if (colorInput.includes(\"rgba\")) {\r\n            let slicer = colorInput.replace(\"rgba(\", \"\");\r\n            let components: string[] = slicer.split(\",\");\r\n            darkedColor = `rgb(${parseInt(components[0], 10) * reduce}, ${parseInt(components[1], 10) * reduce},${parseInt(components[2], 10) * reduce})`;\r\n            //return darkedColor;\r\n        } else if (colorInput.includes(\"rgb\")) {\r\n\r\n            let slicer = colorInput.replace(\"rgb(\", \"\");\r\n            let components: string[] = slicer.split(\",\");\r\n            darkedColor = `rgb(${parseInt(components[0], 10) * reduce}, ${parseInt(components[1], 10) * reduce},${parseInt(components[2], 10) * reduce})`;\r\n            // return darkedColor;\r\n        }\r\n    }\r\n\r\n    return darkedColor;\r\n}\r\n/**\r\n * Make the color into a brighted color\r\n * @param colorInput \r\n * @returns the brighted color \r\n */\r\nexport const brighterColor = (colorInput: string, percentage = 25): string => {\r\n    let brightedColor = \"\";\r\n    const increase = (100 + percentage) / 100;\r\n    let component1: number = 0;\r\n    let component2: number = 0;\r\n    let component3: number = 0;\r\n    if (isHexColor(colourNameToHex(colorInput))) {\r\n\r\n        component1 = hexTodec(colorInput.charAt(1)) * 16 + hexTodec(colorInput.charAt(2));\r\n        component2 = hexTodec(colorInput.charAt(3)) * 16 + hexTodec(colorInput.charAt(4));\r\n        component3 = hexTodec(colorInput.charAt(5)) * 16 + hexTodec(colorInput.charAt(6));\r\n\r\n        brightedColor = `rgb(${component1 * increase}, ${component2 * increase},${component3 * increase})`;\r\n    } else {\r\n        if (colorInput.includes(\"rgba\")) {\r\n            let slicer = colorInput.replace(\"rgba(\", \"\");\r\n            let components: string[] = slicer.split(\",\");\r\n            brightedColor = `rgb(${parseInt(components[0], 10) * increase}, ${parseInt(components[1], 10) * increase},${parseInt(components[2], 10) * increase})`;\r\n            //return darkedColor;\r\n        } else if (colorInput.includes(\"rgb\")) {\r\n\r\n            let slicer = colorInput.replace(\"rgb(\", \"\");\r\n            let components: string[] = slicer.split(\",\");\r\n            brightedColor = `rgb(${parseInt(components[0], 10) * increase}, ${parseInt(components[1], 10) * increase},${parseInt(components[2], 10) * increase})`;\r\n            // return darkedColor;\r\n        }\r\n    }\r\n\r\n    return brightedColor;\r\n}\r\n\r\n/**\r\n * In order to managae rgba() we convert hex colors into rgba()\r\n * If the given color is already a rgb() color, it can add the percentage to convert it into rgba()\r\n * \r\n * \r\n * @param colorInput color in hex or in rgb\r\n * @param perc percentage for RGBA() color \r\n * @returns the rgba representation of a hex color\r\n */\r\nexport const hexColorToRGB = (colorInput: string | undefined, perc = 0, defaultColor?: string): string => {\r\n    let resultDefault: string = defaultColor ? defaultColor : \"rgba(255, 255, 255, 0.6)\";\r\n    if (!colorInput) {\r\n        return resultDefault;\r\n    }\r\n    //work only in uppercase\r\n    const color: string = colorInput.toUpperCase();\r\n    // is already a rgba color\r\n    if (color.includes(\"RGBA\")) {\r\n        return color;\r\n    }\r\n\r\n    //return rbg => rgba\r\n    if (color.includes(\"RGB\")) {\r\n        return color.replace('RGB', `rgba`).replace(')', `, ${perc})`);\r\n    }\r\n\r\n    // if is a hex color or named color\r\n    if (!isHexColor(colourNameToHex(color))) {\r\n        return resultDefault;\r\n    }\r\n    let resultOk: string = \"\";\r\n    //let strVar: string = \"\";\r\n    let component1: number = 0;\r\n    let component2: number = 0;\r\n    let component3: number = 0;\r\n    //If passed all validations, proceed to transform\r\n    component1 = hexTodec(color.charAt(1)) * 16 + hexTodec(color.charAt(2));\r\n    component2 = hexTodec(color.charAt(3)) * 16 + hexTodec(color.charAt(4));\r\n    component3 = hexTodec(color.charAt(5)) * 16 + hexTodec(color.charAt(6));\r\n    resultOk = `rgba(${component1}, ${component2},${component3} , ${perc})`;\r\n    return resultOk;\r\n}\r\n\r\n/**\r\n * Validates wheteher the color is hexadecimal css color\r\n * Example:  #FF56AC\r\n * \r\n * \r\n * @param colorInput the color inpt to test \r\n * @returns true if the inputColor is a hexadecimal css color\r\n */\r\nexport const isHexColor = (colorInput: string): boolean => {\r\n\r\n    // if first element is no '#' return default background color\r\n    if (colorInput.charAt(0) !== '#') {\r\n\r\n        return false;\r\n    }\r\n    // if color lenght is not exactly 7 return default\r\n    if (colorInput.length !== 7) {\r\n\r\n\r\n        return false;\r\n    }\r\n    // if one of the letters is not included in hex array return  default\r\n    for (let i = 1; i < colorInput.length; i++) {\r\n        if (!hexArray.includes(colorInput.charAt(i))) {\r\n\r\n\r\n            return false;\r\n        }\r\n    }\r\n\r\n    return true;\r\n}\r\n\r\n/**\r\n * Converts a named color into hexadecimal color\r\n * from a list of well known namd colors if found.\r\n * When not given returns a \"\"\r\n * When not found in the list, returns the same value given\r\n * @param colour the named color\r\n * @returns The hex representation of the color or \"\" or the same color\r\n */\r\nexport function colourNameToHex(colour: string | undefined): string {\r\n    /**\r\n     * When not given\r\n     */\r\n    if (!colour) {\r\n        return \"\";\r\n    }\r\n    /**\r\n     * when named color is found\r\n     */\r\n    if (NAMED_COLORS[colour.toLocaleLowerCase()] !== undefined) {\r\n        return NAMED_COLORS[colour.toLocaleLowerCase()];\r\n    }\r\n    /**\r\n     * When the named color was not found\r\n     */\r\n\r\n    return colour;\r\n}\r\n\r\n/**\r\n * hexArray & decArray\r\n * \r\n * arrays of numbers used to convert hexadecimal numbers into decimal and viceversa\r\n */\r\nconst hexArray = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'];\r\nconst decArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];\r\n\r\n/**\r\n * Converts hex number in string representation to decimal number\r\n * \r\n * \r\n * @param letter the string hex number\r\n * @returns a decimal number\r\n */\r\nexport const hexTodec = (letter: string): number => {\r\n    if (hexArray.includes(letter)) {\r\n        return decArray[hexArray.indexOf(letter)];\r\n    } else {\r\n        return 0;\r\n    }\r\n}\r\n\r\n\r\n/** \r\n * Asure a base color. When not given or when given an incorrect color format\r\n * default color is this kind of grey #5d6475\r\n * \r\n * @param color param color given by user\r\n * @returns returns the same color \r\n */\r\nexport const asureColor = (color?: string): string => {\r\n    if (color !== undefined && color !== \"\") {\r\n        return color;\r\n    } else {\r\n        return DEFAULT_FONT_COLOR;\r\n    }\r\n}\r\n/** \r\n * Asure a base color. When not given or when given an incorrect color format\r\n * default color is this kind of grey #5d6475\r\n * \r\n * @param color param color given by user\r\n * @returns returns the same color \r\n */\r\nexport const completeAsureColor = (color?: string, perc = 1): string => {\r\n\r\n    return hexColorToRGB(asureColor(colourNameToHex(color)), perc);\r\n\r\n}\r\n\r\n\r\n\r\nexport const DEFAULT_FONT_COLOR = \"#646c7f\";","import { ExtFile, ExtFileInstance, ExtFileManager } from \"../types\";\r\n\r\nexport const extFileReconcilation = (\r\n    dropzoneId: number | string | undefined,\r\n    extFileIncomming: ExtFile[]\r\n): ExtFile[] | undefined => {\r\n    let result: ExtFile[] = [];\r\n\r\n    let arrOfExtFiles: ExtFileInstance[] | undefined =\r\n        ExtFileManager.getExtFileInstanceList(dropzoneId);\r\n\r\n    // continue only if arrOfExtFiles exists\r\n    if (arrOfExtFiles) {\r\n        //different sizes means there was deleted files\r\n        //also can be new files to be uploaded\r\n        //needed an extra flag to allow add files in the middle of uploading process\r\n        // if new files are added, they are added to the Manager\r\n        // outside they were already added to the UI\r\n        // inside Dropzone, will be needed a .next() method for manager\r\n\r\n        // 1st allow deleted files and ignore new ones\r\n        // reduce the arrOfExtFileInstances array\r\n        // parecido a listas ligadas, iterar hasta encontrar null XD\r\n        let incommingTemp: ExtFile[] = [...extFileIncomming];\r\n        incommingTemp = incommingTemp.filter(\r\n            (F) => arrOfExtFiles?.findIndex(I => I.id === F.id) === -1\r\n        );\r\n\r\n        //console.log(\"reconciliation incommingTemp\", incommingTemp);\r\n        \r\n\r\n        //different sizes not allowed\r\n        if (arrOfExtFiles.length !== extFileIncomming.length || extFileIncomming.length === 0) {\r\n            return undefined;\r\n        }\r\n        for (let i = 0; i < arrOfExtFiles.length; i++) {\r\n            if (\r\n                (extFileIncomming[i].uploadStatus === undefined)\r\n                &&\r\n                (arrOfExtFiles[i].uploadStatus === \"preparing\")\r\n            ) {\r\n                //console.log(\"useDropzoneFileListUpdater onCancel i\", i);\r\n                arrOfExtFiles[i].uploadStatus = undefined;\r\n            }\r\n        }\r\n    }\r\n\r\n    return result;\r\n}"],"names":["fileSizeFormater","fileSize","toFixed","DropzoneItalian","defaultLabel","uploadingMessage","amountOfFiles","uploadFinished","uploaded","rejected","concat","noFilesMessage","footer","acceptAll","acceptCustom","accept","header","uploadFilesMessage","maxSizeMessage","maxFileSize","validFilesMessage","numberOfValidFiles","maxFiles","fakeuploadsuccess","fakeUploadError","FileItemItalian","fullInfoLayer","name","size","type","status","preparing","uploading","success","valid","denied","error","aborted","ValidateErrorItalian","maxSizeError","maxSize","acceptError","maxFileCount","DropzoneFrench","FileItemFrench","ValidateErrorFrench","DropzoneEnglish","FileItemEnglish","ValidateErrorEnglish","DropzoneSpanish","FileItemSpanish","ValidateErrorSpanish","DropzoneRussian","FileItemRussian","ValidateErrorRussian","DropzonePortuguese","FileItemPortuguese","ValidateErrorPortuguese","DropzoneSimplifiedChinese","FileItemSimplifiedChinese","ValidateErrorSimplifiedChinese","DropzoneTraditionalChinese","FileItemTraditionalChinese","ValidateErrorTraditionalChinese","FileItemLocalizer","FileItemLocalizerSelector","local","DropzoneLocalizer","DropzoneLocalizerSelector","ValidateErrorLocalizer","ValidateErrorLocalizerSelector","includes","readAsDataURL","file","onProgress","onError","Promise","resolve","reject","reader_1","FileReader","onprogress","onerror","onload","result","undefined","readAsText","encoding","reader_2","readAsBinaryString","reader_3","readAsArrayBuffer","reader_4","resizeImage","base64Str","maxWidth","maxHeight","img_1","Image","src","canvas","document","createElement","MAX_WIDTH","MAX_HEIGHT","width","height","ctx","getContext","drawImage","toDataURL","process","env","NODE_ENV","console","getImageOrientation","imageSource","length","ev","sevenzip","aac","abw","accdb","avi","azw","bmp","bz","bz2","cda","csh","css","csv","docx","drawio","eot","epub","freearc","gif","gzip","html","icalendar","java","jar","javascript","jpeg","json","jsonld","midi","mp3","mp4","mpeg","mpkg","octet","odp","ods","odt","oga","ogv","ogx","opus","otf","pdf","php","png","pptx","psd","python","tar","rar","react","rtf","sass","sh","swf","text","tiff","ttf","typescript","vsd","vue","wav","webm","weba","webp","wma","wmv","woff","xlsx","xml","xul","zip","getExt","fileName","exec","DEF_GEN_MIME","audioSelector","tailMime","textSelector","imageSelector","fontSelector","videoSelector","applicationSelector","mimeSelector","mimeType","headerMime","split","extensionSelector","extension","genericMime","checkIsCode","getURLFileIco","customIcons","fallBack","url","mimeResume","mimeUrlList","extention","customUrl","getURLFileIcoFromNameAndType","arc","mp2t","xhtml","ExtFileInstance","extFile","id","imageUrl","errors","uploadMessage","uploadStatus","progress","xhr","extraData","extraUploadData","serverResponse","downloadUrl","videoUrl","this","toExtFile","extFileInstance","extFileClone","extFileInstanceKeys","Object","keys","extFileInstanceValues","values","i","currentValue","currKey","prototype","ExtFileManager","getNextId","nextId","setFileList","extFilesInstances","fileLists","__spreadArray","createFileListMap","removeFileListMap","getExtFileInstanceList","setFileListMapPreparing","dropzoneId","localFiles","validateFiles","cleanOnUpload","resultExtList","temLocalFiles","filter","map","__assign","F","setFileListMapPreparing2","createUploadConfig","method","headers","uploadLabel","cleanonUpload","SyntheticFile","createFile","File","defineProperty","get","create_aac","create_abw","create_freearc","create_avi","create_azw","create_octet","create_bmp","create_bz","create_bz2","create_cda","create_csh","create_css","create_csv","create_doc","create_docx","create_eot","create_epub","create_gzip","create_gif","create_htm","create_html","create_ico","create_icalendar","create_jar","create_jpeg","create_jpg","create_js","create_json","create_jsonld","create_mid","create_x_mid","create_midi","create_x_midi","create_mjs","create_mp3","create_mp4","create_mpeg","create_mpkg","create_odp","create_ods","create_odt","create_oga","create_ogv","create_ogx","create_opus","create_otf","create_png","create_pdf","create_php","create_ppt","create_pptx","create_rar","create_rtf","create_sh","create_svg","create_swf","create_tar","create_tif","create_tiff","create_ts","create_ttf","create_text","create_typescript","create_vsd","create_wav","create_weba","create_webm","create_webp","create_woff","create_woff2","create_xhtml","create_xlsx","create_xls","create_xml","create_xml_txt","create_xul","create_zip","create_3gp","create_3gp2","create_3gp_a","create_3gp_v","create_7z","create_python","create_java","create_react","create_vue","createFileListMiscelanious","listFile","push","createListOfMultiTypeFile","createSyntheticFile","FileIdGenerator","fileListToExtFileArray","fileList","extFileArray","f","fileListToExtFileInstanceArray","isValidateActive","validator","shrinkWord","word","card","newWord","slice","setPrepToUploading","setTimeout","uploadOne","sleepPreparing","preparingTime","prepToUploadOne","uploadOneExtFile","fakeFuiUpload","Math","floor","random","message","payload","getRandomInt","min","max","cleanInput","inputElement","value","addClassName","baseClassName","className","isUploadAbleExtFile","validateFilesFlag","getLocalFileItemData","localFileName","localFileType","localFileSize","separateAccept","acceptItem","trim","validateAccept","charAt","headerMimeFile","tailMimeFile","fileListvalidator","preValidatedFiles","remainingValids","localValidator","localization","output","countdown","ValidationErrorLocalizer","validatedFile","validateFile","maxFileErrorMessenger","Infinity","validateExtFileList","extFileList","localValidatorProps","fileListResult","remaining","currentExtFile","validateExtFile","validatorProps","localErrors","extFileResult","errorsResult","apply","maxFileSizeErrorMessenger","isValid","idGenerated","listOfErrors","makeSyntheticExtFile","ceil","newUpoadStatus","getRandomUploadStatus","customUploadMessage","randInt","extFileMock","XMLHttpRequest","extraData1","extraData2","deleted","addExtraData","formData","extraDataKeys","append","addHeaders","headerKeys","setRequestHeader","TIMEOUT_ERROR_RESPONSE","ABORTED_ERROR_RESPONSE","JSON_PARSE_ERROR_RESPONSE","UNEXPECTED_ERROR_RESPONSE","NO_XHR_PROVIDED_ERROR","makeServerResponse","JsonParseResponse","jsonResponse","JSON","parse","response","makeSuccessUploadResponse","responseFui","makeErrorUploadResponse","uploadFormData","endpoint","data","finalMethod","toUpperCase","upload","ontimeout","onabort","onloadend","e","__awaiter","onreadystatechange","readyState","open","send","uploadExtFile","uploader","localMethod","fileToUpload","FormData","finalExtraData","otherValue","param2","tecnica","friend","age","addExtraDataUpload","_a","uploadFile","label","_this","sent","FuiUpload","unexpectedErrorUploadResult","unableToUploadResult","uploadedFile","completeUploadResult","uploadStatusresult","toUploadableExtFileList","instantPreparingToUploadOne","preparingToUploadOne","sleepTransition","time","sanitizeArrExtFile","arrExtFile","setNextUploadStatus","extFileobj","prevStatus","nextStstaus","NAMED_COLORS","indianred","lightcoral","salmon","darksalmon","lightsalmon","crimson","red","firebrick","darkred","pink","lightpink","hotpink","deeppink","mediumvioletred","palevioletred","coral","tomato","orangered","darkorange","orange","gold","yellow","lightyellow","lemonchiffon","lightgoldenrodyellow","papayawhip","moccasin","peachpuff","palegoldenrod","khaki","darkkhaki","lavender","thistle","plum","violet","orchid","fuchsia","magenta","mediumorchid","mediumpurple","rebeccapurple","blueviolet","darkviolet","darkorchid","darkmagenta","purple","indigo","slateblue","darkslateblue","mediumslateblue","greenyellow","chartreuse","lawngreen","lime","limegreen","palegreen","lightgreen","mediumspringgreen","springgreen","mediumseagreen","seagreen","forestgreen","green","darkgreen","yellowgreen","olivedrab","olive","darkolivegreen","mediumaquamarine","darkseagreen","lightseagreen","darkcyan","teal","aqua","cyan","lightcyan","paleturquoise","aquamarine","turquoise","mediumturquoise","darkturquoise","cadetblue","steelblue","lightsteelblue","powderblue","lightblue","skyblue","lightskyblue","deepskyblue","dodgerblue","cornflowerblue","royalblue","blue","mediumblue","darkblue","navy","midnightblue","cornsilk","blanchedalmond","bisque","navajowhite","wheat","burlywood","tan","rosybrown","sandybrown","goldenrod","darkgoldenrod","peru","chocolate","saddlebrown","sienna","brown","maroon","white","snow","honeydew","mintcream","azure","aliceblue","ghostwhite","whitesmoke","seashell","beige","oldlace","floralwhite","ivory","antiquewhite","linen","lavenderblush","mistyrose","gainsboro","lightgray","silver","darkgray","gray","dimgray","lightslategray","slategray","darkslategray","black","darkerColor","colorInput","percentage","darkedColor","reduce","component1","component2","component3","isHexColor","colourNameToHex","hexTodec","components","replace","parseInt","brighterColor","brightedColor","increase","hexColorToRGB","perc","defaultColor","resultDefault","color","hexArray","colour","toLocaleLowerCase","decArray","letter","indexOf","asureColor","DEFAULT_FONT_COLOR","completeAsureColor","extFileReconcilation","extFileIncomming","arrOfExtFiles","incommingTemp","findIndex","I"],"mappings":"AAIQ,IAAMA,EAAmB,SAACC,GAE9B,GAAKA,EAiBL,OAdIA,EAAW,KACFA,EAAW,SAGhBA,EAAW,SACDA,EAAW,MAAMC,QAAQ,GAAK,MACjCD,EAAW,YACPA,EAAW,KAAQ,MAAMC,QAAQ,GAAK,MAC1CD,EAAW,eACNA,EAAW,KAAQ,KAAQ,MAAMC,QAAQ,GAAK,OAE7CD,EAAW,KAAQ,KAAQ,KAAQ,MAAMC,QAAQ,GAAK,KAI/E,EClBaC,EAA+B,CACxCC,aAAc,2BAEdC,iBAAkB,SAACC,GAAoB,MAAO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AE1B,CAEf,EAUaE,GAAa,SAACP,GACvB,YAAc/lB,IAAV+lB,GAAiC,KAAVA,EAChBA,EAEAQ,EAEf,EAQaC,GAAqB,SAACT,EAAgBH,GAE/C,YAF+C,IAAAA,IAAAA,EAAQ,GAEhDD,GAAcW,GAAWnB,GAAgBY,IAASH,EAE7D,EAIaW,GAAqB,UCpOrBE,GAAuB,SAChC1b,EACA2b,GAEA,IAEIC,EACAvc,GAAeS,uBAAuBE,GAG1C,GAAI4b,EAAe,CAWf,IAAIC,EAAalc,GAAA,GAAkBgc,GAAgB,GASnD,GARAE,EAAgBA,EAAcvb,QAC1B,SAACG,GAAM,OAAkD,KAAlDmb,eAAAA,EAAeE,WAAU,SAAAC,GAAK,OAAAA,EAAEne,KAAO6C,EAAE7C,EAAX,IAAqB,IAO1Dge,EAAc3kB,SAAW0kB,EAAiB1kB,QAAsC,IAA5B0kB,EAAiB1kB,OACrE,OAEJ,IAAK,IAAIgI,EAAI,EAAGA,EAAI2c,EAAc3kB,OAAQgI,SAEIhK,IAArC0mB,EAAiB1c,GAAGjB,cAEc,cAAlC4d,EAAc3c,GAAGjB,eAGlB4d,EAAc3c,GAAGjB,kBAAe/I,EAG3C,CAED,MAzCwB,EA0C5B"}
\ No newline at end of file
diff --git a/src/core/index.js b/src/core/index.js
new file mode 100644
index 0000000..7310935
--- /dev/null
+++ b/src/core/index.js
@@ -0,0 +1,2 @@
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(e){if(e)return e<1024?e+" Bytes":e<1048576?(e/1024).toFixed(2)+" KB":e<1073741824?(e/1024/1024).toFixed(2)+" MB":e<1099511627776?(e/1024/1024/1024).toFixed(2)+" GB":(e/1024/1024/1024/1024).toFixed(2)+" TB"},t={defaultLabel:"Trascina qui i tuoi file",uploadingMessage:function(e){return"Caricamento di ".concat(e," file")},uploadFinished:function(e,t){return"File caricati: ".concat(e,", File rifiutati: ").concat(t)},noFilesMessage:"Nessun file valido in attesa di essere caricato",footer:{acceptAll:"Tutti i tipi di file sono accettati",acceptCustom:function(e){return"Tipi di file consentiti: ".concat(e)}},header:{uploadFilesMessage:"Caricamento",maxSizeMessage:function(e){return"Dimensione massima ".concat(e)},validFilesMessage:function(e,t){return"File  ".concat(e,"/").concat(t)}},fakeuploadsuccess:"Il file è stato caricato con successo ",fakeUploadError:"Errore di caricamento del file"},r={fullInfoLayer:{name:"Nome: ",size:"Dimensione: ",type:"Tipo: "},status:{preparing:"preparazione",uploading:"In corso",success:"Successo",valid:"Valido",denied:"Non válido",error:"Errore",aborted:"Interrotto"}},a={maxSizeError:function(t){return"Il file è molto grande. Il tam. il massimo è ".concat(e(t))},acceptError:"Tipo di file illegale",maxFileCount:function(e){return"Numero massimo di file (".concat(e,") raggiunto")}},n={defaultLabel:"Déposez vos fichiers ici",uploadingMessage:function(e){return"Envoi de ".concat(e," fichiers")},uploadFinished:function(e,t){return"Fichiers téléchargés : ".concat(e,", Fichiers rejetés: ").concat(t)},noFilesMessage:"Aucun fichier valide ne manque",footer:{acceptAll:"Tous types de fichiers acceptés ",acceptCustom:function(e){return"Types de fichier: ".concat(e)}},header:{uploadFilesMessage:"Envoyer",maxSizeMessage:function(e){return"Taille maximale ".concat(e)},validFilesMessage:function(e,t){return"Fichiers  ".concat(e,"/").concat(t)}},fakeuploadsuccess:"Le fichier a été téléchargé avec succès",fakeUploadError:"Erreur lors du téléchargement "},o={fullInfoLayer:{name:"Le nom: ",size:"Le taille: ",type:"Le type: "},status:{preparing:"préparer",uploading:"En cours",success:"Succès",valid:"Valide",denied:"Refusé",error:"Erreur",aborted:"Interrompu"}},i={maxSizeError:function(t){return"Le fichier est très volumineux. Le tam. le maximum est de ".concat(e(t))},acceptError:"Type de fichier illégal ",maxFileCount:function(e){return"Limite de fichiers atteinte (".concat(e,")")}},s={defaultLabel:"Drop your files here",uploadingMessage:function(e){return"Uploading ".concat(e," files")},uploadFinished:function(e,t){return"Uploaded files: ".concat(e,", Rejected files: ").concat(t)},noFilesMessage:"There is no missing valid file to upload",footer:{acceptAll:"All file types accepted",acceptCustom:function(e){return"Allowed types: ".concat(e)}},header:{uploadFilesMessage:"Upload files",maxSizeMessage:function(e){return"Max file size: ".concat(e)},validFilesMessage:function(e,t){return"Files ".concat(e,"/").concat(t)}},fakeuploadsuccess:"File was successfuly uploaded",fakeUploadError:"Error on uploading. Please try again later."},c={fullInfoLayer:{name:"Name: ",size:"Size: ",type:"Type: "},status:{preparing:"Preparing",uploading:"Uploading",success:"Success",valid:"Valid",denied:"Not valid",error:"Error",aborted:"Aborted"}},u={maxSizeError:function(t){return"File is too big. Max file size allowed is ".concat(e(t))},acceptError:"File type is not allowed",maxFileCount:function(e){return"Max amount of files (".concat(e,") has been reached")}},l={defaultLabel:"Suelta tus archivos aquí",uploadingMessage:function(e){return"Subiendo ".concat(e," archivos")},uploadFinished:function(e,t){return"Archivos subidos: ".concat(e,", Archivos rechazados: ").concat(t)},noFilesMessage:"No hay archivos válidos pendientes por subir",footer:{acceptAll:"Todos los tipos de archivo aceptados",acceptCustom:function(e){return"Tipo(s) de archivo permitidos: ".concat(e)}},header:{uploadFilesMessage:"Subir",maxSizeMessage:function(e){return"Tam. máximo ".concat(e)},validFilesMessage:function(e,t){return"Archivos ".concat(e,"/").concat(t)}},fakeuploadsuccess:"El archivo se subió correctamente",fakeUploadError:"Error al subir el archivo"},p={fullInfoLayer:{name:"Nombre: ",size:"Tamaño: ",type:"Tipo: "},status:{preparing:"Preparando",uploading:"Subiendo",success:"Éxito",valid:"Válido",denied:"No válido",error:"Error",aborted:"Anulado"}},d={maxSizeError:function(t){return"El archivo es muy grande. El tam. máximo es ".concat(e(t))},acceptError:"Tipo de archivo no permitido",maxFileCount:function(e){return"Cantidad máxima de archivos (".concat(e,") alcanzada")}},f={defaultLabel:"Перетащите сюда свои файлы.",uploadingMessage:function(e){return"Выгрузка ".concat(e," файлов")},uploadFinished:function(e,t){return"Загружено файлов: ".concat(e,", отклоненных файлов: ").concat(t)},noFilesMessage:"Действительный файл не отсутствует для загрузки",footer:{acceptAll:"Принимаются все типы файлов ",acceptCustom:function(e){return"Допустимые типы: ".concat(e)}},header:{uploadFilesMessage:"Отправить",maxSizeMessage:function(e){return"макс размер: ".concat(e)},validFilesMessage:function(e,t){return"Файлы ".concat(e,"/").concat(t)}},fakeuploadsuccess:"Файл был успешно загружен",fakeUploadError:"Ошибка при загрузке"},m={fullInfoLayer:{name:"Имя: ",size:"Размер: ",type:"Tип: "},status:{preparing:"подготовка",uploading:"Загрузка",success:"успех",valid:"годный",denied:"выкинутый",error:"ошибка",aborted:"прерванный"}},g={maxSizeError:function(t){return"Файл слишком большой. Максимально допустимый размер файла - ".concat(e(t))},acceptError:"Тип файла не разрешен",maxFileCount:function(e){return"Достигнуто максимальное количество файлов (".concat(e,")")}},h={defaultLabel:"Solte seus arquivos aqui ",uploadingMessage:function(e){return"Enviando ".concat(e," arquivos")},uploadFinished:function(e,t){return"Arquivos enviados: ".concat(e,", Arquivos rejeitados: ").concat(t)},noFilesMessage:"Nenhum arquivo válido está faltando para enviar",footer:{acceptAll:"Todos os tipos de arquivo são aceitos",acceptCustom:function(e){return"Tipos permitidos: ".concat(e)}},header:{uploadFilesMessage:"Enviar",maxSizeMessage:function(e){return"Tamanho máximo: ".concat(e)},validFilesMessage:function(e,t){return"Arquivos ".concat(e,"/").concat(t)}},fakeuploadsuccess:"O arquivo foi enviado com sucesso",fakeUploadError:"Erro ao enviar"},x={fullInfoLayer:{name:"Nome: ",size:"Tamanho: ",type:"Tipo: "},status:{preparing:"Preparando",uploading:"Enviando",success:"Êxito",valid:"válido",denied:"Negado",error:"Erro",aborted:"Abortado"}},b={maxSizeError:function(t){return"O arquivo é muito grande. O tamanho máximo de arquivo permitido é ".concat(e(t))},acceptError:"O tipo de arquivo não é permitido ",maxFileCount:function(e){return"Quantidade máxima de arquivos (".concat(e,") alcançada")}},v={defaultLabel:"将您的文件放在这里",uploadingMessage:function(e){return"上传 ".concat(e," 个文件")},uploadFinished:function(e,t){return"上传文件:".concat(e,",拒绝文件:").concat(t)},noFilesMessage:"没有缺少要加载的有效文件",footer:{acceptAll:"接受所有文件类型",acceptCustom:function(e){return"允许的类型: ".concat(e)}},header:{uploadFilesMessage:"上传文件",maxSizeMessage:function(e){return"最大文件大小:".concat(e)},validFilesMessage:function(e,t){return"文档 ".concat(e,"/").concat(t)}},fakeuploadsuccess:"文件已成功上传",fakeUploadError:"上传时出错"},F={fullInfoLayer:{name:"文档名称: ",size:"尺寸: ",type:"文件类型: "},status:{preparing:"预加载",uploading:"上传",success:"成功",valid:"接受的文件",denied:"被拒绝的文件",error:"错误",aborted:"中止"}},w={maxSizeError:function(t){return"文件太大。 允许的最大文件大小为 ".concat(e(t))},acceptError:"文件类型不允许",maxFileCount:function(e){return"已达到最大文件数 (".concat(e,")")}},_={defaultLabel:"把你的文件放在這裡 ",uploadingMessage:function(e){return"上傳".concat(e,"個文件")},uploadFinished:function(e,t){return"上傳文件: ".concat(e,", 拒絕的文件:").concat(t)},noFilesMessage:"沒有缺少要上傳的有效文件",footer:{acceptAll:"接受所有文件類型",acceptCustom:function(e){return"允許的類型:".concat(e)}},header:{uploadFilesMessage:"上傳文件",maxSizeMessage:function(e){return"最大文件大小:".concat(e)},validFilesMessage:function(e,t){return" 文件 ".concat(e,"/").concat(t)}},fakeuploadsuccess:"文件已成功上傳",fakeUploadError:"上傳時出錯"},E={fullInfoLayer:{name:"文檔名稱: ",size:"文件大小: ",type:"文件類型: "},status:{preparing:"預加載",uploading:"上傳",success:"成功",valid:"有效文件",denied:"無效文件",error:"錯誤",aborted:"中止"}},y={maxSizeError:function(t){return"文件太大。 允許的最大文件大小為 ".concat(e(t))},acceptError:"文件類型不允許",maxFileCount:function(e){return"已達到最大文件數 (".concat(e,")")}},A={"ES-es":p,"EN-en":c,"FR-fr":o,"IT-it":r,"PT-pt":x,"RU-ru":m,"ZH-cn":F,"ZH-hk":E},z={"ES-es":l,"EN-en":s,"FR-fr":n,"IT-it":t,"PT-pt":h,"RU-ru":f,"ZH-cn":v,"ZH-hk":_},S=function(e){switch(e){case"ES-es":return z["ES-es"];case"EN-en":default:return z["EN-en"];case"FR-fr":return z["FR-fr"];case"IT-it":return z["IT-it"];case"PT-pt":return z["PT-pt"];case"RU-ru":return z["RU-ru"];case"ZH-cn":return z["ZH-cn"];case"ZH-hk":return z["ZH-hk"]}},k={"ES-es":d,"EN-en":u,"FR-fr":i,"IT-it":a,"PT-pt":b,"RU-ru":g,"ZH-cn":w,"ZH-hk":y},D=function(e){return e&&["ES-es","EN-en","FR-fr","IT-it","PT-pt","RU-ru","ZH-cn","ZH-hk"].includes(e)?k[e]:k["EN-en"]};var R="https://user-images.githubusercontent.com/43678736/132086517-72a51a12-e403-4675-bfd7-22c23affa730.png",C="https://user-images.githubusercontent.com/43678736/132086518-7026d4f1-ea16-4ed0-89fd-37c1aa8ac3ed.png",M="https://user-images.githubusercontent.com/43678736/132086519-863c63b4-917e-4471-94ff-7e15651cc14b.png",j="https://user-images.githubusercontent.com/43678736/132086520-9bc6aa3b-51c9-4da2-9ef7-349162b86d0b.png",I="https://user-images.githubusercontent.com/43678736/132086521-dbd6cf0d-d4d7-4b92-bb26-17e8a51a9383.png",T="https://user-images.githubusercontent.com/43678736/132086522-070f48e8-78a8-4294-8dbb-aab81525e164.png",L="https://user-images.githubusercontent.com/43678736/132086595-90ab7f90-f87e-4900-94d9-d0b26745df48.png",U="https://user-images.githubusercontent.com/43678736/132086597-e285ad5c-613a-4679-a270-493e5be4ffd9.png",B="https://user-images.githubusercontent.com/43678736/132086598-623c410a-084a-4395-a448-211b2ff61cfe.png",N="https://user-images.githubusercontent.com/43678736/132086600-8b70a007-512d-4252-9c66-eabd3ddd6573.png",P="https://user-images.githubusercontent.com/43678736/132086601-e62e5d1a-d8a2-4475-a14f-85922cec9272.png",O="https://user-images.githubusercontent.com/43678736/132086602-4c772934-f608-4f01-8459-c4622cee8ad5.png",q="https://user-images.githubusercontent.com/43678736/132086604-b5b019fe-572e-477e-92c2-3769a48a1304.png",H="https://user-images.githubusercontent.com/43678736/132086606-715ccb66-4702-4f7d-9b09-ac93ba17b643.png",V="https://user-images.githubusercontent.com/43678736/132086608-bcae9d57-8e54-488c-90c4-4952ae530b5e.png",Z="https://user-images.githubusercontent.com/43678736/132086618-397d6bd2-9fda-43ed-a135-cb40388c35af.png",G="https://user-images.githubusercontent.com/43678736/132086620-2586ba40-c583-4589-b1a4-8bb5b258b44d.png",X="https://user-images.githubusercontent.com/43678736/132086621-3b95fb64-2533-4ccc-abcd-bd2beba572e9.png",J="https://user-images.githubusercontent.com/43678736/132086622-af705a0c-2b25-4ba7-8ab6-bd69ec97f7e2.png",K="https://user-images.githubusercontent.com/43678736/132086624-89141a46-64e4-4fa0-bf69-54a0eb4d48c9.png",Q="https://user-images.githubusercontent.com/43678736/132086625-1b8f2652-1de0-4475-8c12-7da4a9973ffb.png",W="https://user-images.githubusercontent.com/43678736/132086626-38699705-1e6f-4bca-984b-03167b236faa.png",$="https://user-images.githubusercontent.com/43678736/132086650-f1166246-b361-4c30-a04e-9781c555d14a.png",Y="https://user-images.githubusercontent.com/43678736/132086650-f1166246-b361-4c30-a04e-9781c555d14a.png",ee="https://user-images.githubusercontent.com/43678736/132086652-4562942e-aaea-466c-968f-380fffabf3f9.png",te="https://user-images.githubusercontent.com/43678736/132086653-0487e7e2-1ee3-49e2-8cfe-3e20f1f7490a.png",re="https://user-images.githubusercontent.com/43678736/132086656-6e96c815-e4e2-4ffd-9d71-57e9cc2450bc.png",ae="https://user-images.githubusercontent.com/43678736/132086658-5d27d3c2-394f-43fb-b512-9b414a257875.png",ne="https://user-images.githubusercontent.com/43678736/132086659-98f3ef6e-b9f3-4b6d-b18f-469b5334ba27.png",oe="https://user-images.githubusercontent.com/43678736/132086661-a5484553-06c7-4ffa-a8f9-96b57b1b0344.png",ie="https://user-images.githubusercontent.com/43678736/132086662-05ad1597-d5e5-4efa-833e-2876e966a745.png",se="https://user-images.githubusercontent.com/43678736/132086663-90c58955-f7fb-4bdb-ac53-92667d16d4a3.png",ce="https://user-images.githubusercontent.com/43678736/132086664-9a7530e7-6d78-4ef3-a176-20cf7f57b555.png",ue="https://user-images.githubusercontent.com/43678736/132086666-ab3c505d-b2c0-4177-9a06-aed5d9c39ee4.png",le="https://user-images.githubusercontent.com/43678736/132086667-6c7dcbcc-8d83-41a2-8e0a-85b09e2791ae.png",pe="https://user-images.githubusercontent.com/43678736/132086668-9f246e91-cf2e-49cf-9617-e1fbb71abbbb.png",de="https://user-images.githubusercontent.com/43678736/132086669-46113762-84d1-4b32-9441-b0138ce17a5d.png",fe="https://user-images.githubusercontent.com/43678736/145835364-2054509d-3448-4d34-921f-73dd6e297fc7.png",me="https://user-images.githubusercontent.com/43678736/145835367-19172bf8-cd5a-4cbe-b512-d0de1d91f269.png",ge="https://user-images.githubusercontent.com/43678736/145835373-a57ef0f5-3968-483b-9f55-6d67e7f1dcea.png",he="https://user-images.githubusercontent.com/43678736/132086670-0f96e770-cedc-4635-a5f9-cf97894c1d7a.png",xe="https://user-images.githubusercontent.com/43678736/132086671-02ad35ef-ec3a-4a65-abd5-5bf794dfcf7b.png",be="https://user-images.githubusercontent.com/43678736/132086672-3a856fda-823d-4997-b802-c7c640e6ef44.png",ve="https://user-images.githubusercontent.com/43678736/132086673-0c4409ab-754e-4619-8cfa-179d0ccf1bd9.png",Fe="https://user-images.githubusercontent.com/43678736/132086674-fdb56d02-5845-49b7-8462-6357bc963464.png",we="https://user-images.githubusercontent.com/43678736/132086675-c879645d-acb4-41a6-ab3c-4e6c2048badb.png",_e="https://user-images.githubusercontent.com/43678736/132086685-4e327c4c-a409-4b83-b36a-8d88936b314b.png",Ee="https://user-images.githubusercontent.com/43678736/132086688-8e82fae4-3a9b-49c0-bf99-77189525514c.png",ye="https://user-images.githubusercontent.com/43678736/132086689-fe1fef9f-d2db-455b-8f4b-09acd095f571.png",Ae="https://user-images.githubusercontent.com/43678736/132086689-fe1fef9f-d2db-455b-8f4b-09acd095f571.png",ze="https://user-images.githubusercontent.com/43678736/132086691-d472576b-ec6a-4332-acd2-dd6a00b72952.png",Se="https://user-images.githubusercontent.com/43678736/132086693-9d43571e-0c86-438f-b247-e2cb42e19e06.png",ke="https://user-images.githubusercontent.com/43678736/132086694-4e661d6a-1118-441e-8bc3-c52fcb2133b6.png",De="https://user-images.githubusercontent.com/43678736/132086697-1d82d724-35b6-4f06-847a-3c59a5deda6e.png",Re="https://user-images.githubusercontent.com/43678736/132086698-19384230-dbd7-4e05-bc69-ef4537b6aae3.png",Ce="https://user-images.githubusercontent.com/43678736/132086699-5993a482-04f4-4915-b105-9037f527cf61.png",Me="https://user-images.githubusercontent.com/43678736/132086700-c23461c8-6819-46e1-aecd-0a1f8d3507bb.png",je="https://user-images.githubusercontent.com/43678736/132086701-c8044c09-8d95-4af1-9410-66761001d7da.png",Ie="https://user-images.githubusercontent.com/43678736/132086702-59294337-ed99-4302-badd-316b2c1ff62f.png",Te="https://user-images.githubusercontent.com/43678736/132086704-8fd51e7c-afa2-47a3-ab2f-d0bcd0ecae9f.png",Le="https://user-images.githubusercontent.com/43678736/132086705-33294da1-5c0f-49f7-b890-e4857cec0a6d.png",Ue="https://user-images.githubusercontent.com/43678736/132086706-22f805d0-39d4-494b-824e-47dc75d05eb7.png",Be="https://user-images.githubusercontent.com/43678736/132086707-e61a84de-d396-4dbf-8d1b-1d6ee19e1ac8.png",Ne="https://user-images.githubusercontent.com/43678736/132086707-e61a84de-d396-4dbf-8d1b-1d6ee19e1ac8.png",Pe="https://user-images.githubusercontent.com/43678736/132086708-21d096dd-7148-40aa-97f1-cbb099339740.png",Oe="https://user-images.githubusercontent.com/43678736/132086709-811d4e90-3cfa-4044-a956-aeda9c67fc92.png",qe="https://user-images.githubusercontent.com/43678736/132086710-c5479c6c-0249-4542-adad-48b0ef40b775.png",He="https://user-images.githubusercontent.com/43678736/132086711-1524a3e7-3e33-4822-a34f-ff3235404045.png",Ve="https://user-images.githubusercontent.com/43678736/132086712-17e2c491-f6e4-4586-aef6-06bcc5f4b0e5.png",Ze="https://user-images.githubusercontent.com/43678736/132086715-204b5a8b-9c5a-4bac-8294-9237ebc16089.png",Ge="https://user-images.githubusercontent.com/43678736/132086716-64511d20-58cb-45a8-85df-f4d9408b469d.png",Xe="https://user-images.githubusercontent.com/43678736/132086718-a8499333-6282-4820-aa1f-4d133eb54648.png",Je=function(e){var t=/(?:\.([^.]+))?$/.exec(e);return t?t[1]:""},Ke="octet",Qe=function(e){switch(e){case"aac":return"aac";case"midi":case"x-midi":return"midi";case"mpeg":return"mpeg";case"ogg":return"oga";case"opus":return"opus";case"wav":return"wav";case"webm":return"webm";case"wma":return"wma";default:return Ke}},We=function(e){switch(e){case"css":return"css";case"csv":return"csv";case"html":return"html";case"calendar":return"icalendar";case"javascript":case"x-javascript":return"javascript";case"plain":return"text";case"xml":return"xml";default:return Ke}},$e=function(e){switch(e){case"bmp":return"bmp";case"gif":return"gif";case"jpg":case"jpeg":return"jpeg";case"png":return"png";case"tiff":return"tiff";case"webp":return"webp";default:return Ke}},Ye=function(e){switch(e){case"otf":return"otf";case"ttf":return"ttf";case"woff":case"woff2":return"woff";default:return Ke}},et=function(e){switch(e){case"x-msvideo":case"msvideo":case"avi":return"avi";case"mp4":return"mp4";case"mpeg":return"mpeg";case"ogg":return"ogv";case"mp2t":return"mp2t";case"wmv":return"wmv";case"webm":return"webm";default:return Ke}},tt=function(e){switch(e){case"x-abiword":case"abiword":return"abw";case"x-freearc":case"freearc":return"arc";case"vnd.amazon.ebook":return"azw";case"octet-stream":return"octet";case"x-bzip":case"bzip":return"bz";case"x-bzip2":case"bzip2":return"bz2";case"x-cdf":return"cda";case"msaccess":return"accdb";case"csh":case"x-csh":return"csh";case"vnd.ms-fontobject":return"eot";case"epub+zip":return"epub";case"gzip":return"gzip";case"java-archive":return"jar";case"x-javascript":return"javascript";case"json":return"json";case"ld+json":return"jsonld";case"vnd.apple.installer+xml":return"mpkg";case"ogg":return"ogx";case"vnd.rar":return"rar";case"rtf":return"rtf";case"x-sh":case"sh":return"sh";case"x-shockwave-flash":return"swf";case"x-tar":return"tar";case"x-httpd-php":return"php";case"vnd.visio":return"vsd";case"xhtml+xml":return"xhtml";case"xml":return"xml";case"vnd.mozilla.xul+xml":return"xul";case"vnd.openxmlformats-officedocument.wordprocessingml.document":case"msword":return"docx";case"vnd.openxmlformats-officedocument.spreadsheetml.sheet":return"xlsx";case"vnd.openxmlformats-officedocument.presentationml.presentation":case"vnd.ms-powerpoint":return"pptx";case"vnd.oasis.opendocument.presentation":return"odp";case"vnd.oasis.opendocument.text":return"odt";case"vnd.oasis.opendocument.spreadsheet":return"ods";case"zip":case"x-zip-compressed":return"zip";case"pdf":return"pdf";default:return Ke}},rt=function(e){if(!e||!e.includes("/"))return Ke;var t=e.split("/")[0],r=e.split("/")[1];switch(t){case"application":return tt(r);case"audio":return Qe(r);case"video":return et(r);case"text":return We(r);case"image":return $e(r);case"font":return Ye(r);default:return Ke}},at=function(e){var t="octet";return e&&""!==e&&(e.includes("zip")||e.includes("rar")?t="zip":e.includes("doc")?t="docx":e.includes("xls")?t="xlsx":e.includes("drawio")?t="drawio":e.includes("psd")?t="psd":e.includes("csv")?t="csv":"jsx"===e?t="react":"py"===e?t="python":"vue"===e?t="vue":"java"===e?t="java":"ts"===e?t="typescript":"sass"!==e&&"scss"!==e||(t="sass")),t},nt=function(e){var t="text";return e&&""!==e&&("jsx"===e?t="react":"py"===e?t="python":"vue"===e?t="vue":"java"===e?t="java":"ts"===e||"tsx"===e?t="typescript":"js"===e?t="javascript":"xml"===e?t="xml":"php"===e&&(t="php")),t},ot={aac:C,accdb:j,abw:M,arc:X,avi:I,azw:T,octet:ue,bmp:L,bz:U,bz2:B,cda:N,csh:P,css:O,csv:q,docx:H,drawio:V,eot:Z,epub:G,gzip:K,gif:J,html:Q,icalendar:W,jar:Y,jpeg:te,javascript:ee,json:re,jsonld:ae,midi:ne,mp3:oe,mp4:ie,mpeg:se,mpkg:ce,mp2t:ue,odp:le,ods:pe,odt:de,oga:fe,ogv:me,ogx:ge,opus:he,otf:xe,png:Fe,pdf:be,php:ve,pptx:we,psd:_e,rar:Ae,rtf:Se,sass:ke,sh:De,swf:Re,tar:ye,tiff:Me,ttf:je,typescript:Ie,text:Ce,vsd:Te,wav:Ue,weba:Ne,webm:Be,webp:Pe,woff:He,wma:Oe,wmv:qe,xhtml:Q,xlsx:Ve,xml:Ze,xul:Ge,zip:Xe,sevenzip:R,python:Ee,java:$,react:ze,vue:Le,fallBack:ue},it=function(){function e(e){var t=e.id,r=e.file,a=e.name,n=e.size,o=e.type,i=e.imageUrl,s=e.valid,c=e.errors,u=e.uploadMessage,l=e.uploadStatus,p=e.progress,d=e.xhr,f=e.extraData,m=e.extraUploadData,g=e.serverResponse,h=e.downloadUrl,x=e.videoUrl;this.id=t,this.file=r,this.name=a,this.size=n,this.type=o,this.imageUrl=i,this.valid=s,this.errors=c,this.uploadStatus=l,this.uploadMessage=u,this.progress=p,this.xhr=d,this.extraData=f,this.extraUploadData=m,this.serverResponse=g,this.downloadUrl=h,this.videoUrl=x}return e.toExtFile=function(e){for(var t={},r=Object.keys(e),a=Object.values(e),n=0;n<a.length;n++){var o=a[n],i=r[n];void 0!==o&&(t[i]=o)}return t},e.prototype.toExtFile=function(){return e.toExtFile(this)},e}(),st=function(){return st=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},st.apply(this,arguments)};function ct(e,t,r,a){return new(r||(r=Promise))((function(n,o){function i(e){try{c(a.next(e))}catch(e){o(e)}}function s(e){try{c(a.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).next())}))}function ut(e,t){var r,a,n,o,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(i=0)),i;)try{if(r=1,a&&(n=2&s[0]?a.return:s[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;switch(a=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,a=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(n=i.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){i.label=s[1];break}if(6===s[0]&&i.label<n[1]){i.label=n[1],n=s;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(s);break}n[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],a=0}finally{r=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function lt(e,t,r){if(r||2===arguments.length)for(var a,n=0,o=t.length;n<o;n++)!a&&n in t||(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var pt=function(){function e(){}return e.getNextId=function(){return e.nextId++,e.nextId},e.setFileList=function(t,r){return t?(e.fileLists[t]=lt([],r,!0),t):0},e.createFileListMap=function(){var t=e.getNextId();return e.fileLists[t]=[],t},e.removeFileListMap=function(t){if(!t)return 0;try{return e.fileLists[t]=void 0,t}catch(e){return"development"===process.env.NODE_ENV&&console.error("Error on remove",e),0}},e.getExtFileInstanceList=function(t){try{if(!t)return;return e.fileLists[t]}catch(e){return void("development"===process.env.NODE_ENV&&console.error("Error on getExtFileInstanceList",e))}},e.setFileListMapPreparing=function(t,r,a,n){if("number"==typeof t||"string"==typeof t)try{var o,i=lt([],r,!0);n&&a&&(i=i.filter((function(e){return e.valid}))),o=(i=a?i.map((function(e){return"success"!==e.uploadStatus&&e.valid?st(st({},e),{uploadStatus:"preparing"}):st({},e)})):i.map((function(e){return"success"!==e.uploadStatus?st(st({},e),{uploadStatus:"preparing"}):st({},e)}))).map((function(e){return new it(e)}));e.setFileList(t,o);return o}catch(e){return void("development"===process.env.NODE_ENV&&console.error("setFileListMapPreparing Error on get List",e))}},e.setFileListMapPreparing2=function(t,r,a,n){return e.setFileList(t,r.map((function(e){return new it(st(st({},e),{uploadStatus:"preparing"}))}))),e.getExtFileInstanceList(t)},e.nextId=0,e.fileLists={},e}(),dt=function(){function e(){}return e.createFile=function(e,t,r){var a=new File([],e,{type:r});return Object.defineProperty(a,"size",{get:function(){return t}}),a},e.create_aac=function(t){return e.createFile("acc_audio-file-with-large-name.aac",t||3516516,"audio/aac")},e.create_abw=function(t){return e.createFile("abiword-file-with-large-name.abw",t||3516516,"application/x-abiword")},e.create_freearc=function(t){return e.createFile("freearc-file-with-large-name.arc",t||3516516,"application/x-freearc")},e.create_avi=function(t){return e.createFile("avi-file-with-large-name.avi",t||3516516,"video/x-msvideo")},e.create_azw=function(t){return e.createFile("amazon_kindle_ebook-file-with-large-name.azw",t||3516516,"application/vnd.amazon.ebook")},e.create_octet=function(t){return e.createFile("binary_octet_stream-file-with-large-name.bin",t||3516516,"application/octet-stream")},e.create_bmp=function(t){return e.createFile("bit_map-file-with-large-name.bmp",t||3516516,"image/bmp")},e.create_bz=function(t){return e.createFile("x_bzip-file-with-large-name.bz",t||3516516,"application/x-bzip")},e.create_bz2=function(t){return e.createFile("x_bzip_2-file-with-large-name.bz2",t||3516516,"application/x-bzip2")},e.create_cda=function(t){return e.createFile("cd_audio-file-with-large-name.cda",t||3516516,"application/x-cdf")},e.create_csh=function(t){return e.createFile("test-file-with-large-name.csh",t||3516516,"application/x-csh")},e.create_css=function(t){return e.createFile("test-file-with-large-name.css",t||3516516,"text/css")},e.create_csv=function(t){return e.createFile("test-file-with-large-name.csv",t||3516516,"text/csv")},e.create_doc=function(t){return e.createFile("test-file-with-large-name.doc",t||3516516,"application/msword")},e.create_docx=function(t){return e.createFile("test-file-with-large-name.docx",t||3516516,"application/vnd.openxmlformats-officedocument.wordprocessingml.document")},e.create_eot=function(t){return e.createFile("test-file-with-large-name.eot",t||3516516,"application/vnd.ms-fontobject")},e.create_epub=function(t){return e.createFile("test-file-with-large-name.epub",t||3516516,"application/epub+zip")},e.create_gzip=function(t){return e.createFile("test-file-with-large-name.gz",t||3516516,"application/gzip")},e.create_gif=function(t){return e.createFile("test-file-with-large-name.gif",t||3516516,"image/gif")},e.create_htm=function(t){return e.createFile("test-file-with-large-name.htm",t||3516516,"text/html")},e.create_html=function(t){return e.createFile("test-file-with-large-name.html",t||3516516,"text/html")},e.create_ico=function(t){return e.createFile("test-file-with-large-name.ico",t||3516516,"image/vnd.microsoft.icon")},e.create_icalendar=function(t){return e.createFile("test-file-with-large-name.ics",t||3516516,"text/calendar")},e.create_jar=function(t){return e.createFile("test-file-with-large-name.jar",t||3516516,"application/java-archive")},e.create_jpeg=function(t){return e.createFile("test-file-with-large-name.jpeg",t||3516516,"image/jpeg")},e.create_jpg=function(t){return e.createFile("test-file-with-large-name.jpg",t||3516516,"image/jpeg")},e.create_js=function(t){return e.createFile("test-file-with-large-name.js",t||3516516,"text/javascript")},e.create_json=function(t){return e.createFile("test-file-with-large-name.json",t||3516516,"application/json")},e.create_jsonld=function(t){return e.createFile("test-file-with-large-name.jsonld",t||3516516,"application/ld+json")},e.create_mid=function(t){return e.createFile("test-file-with-large-name.mid",t||3516516,"audio/midi")},e.create_x_mid=function(t){return e.createFile("test-file-with-large-name.mid",t||3516516,"audio/x-midi")},e.create_midi=function(t){return e.createFile("test-file-with-large-name.midi",t||3516516,"audio/x-midi")},e.create_x_midi=function(t){return e.createFile("test-file-with-large-name.midi",t||3516516,"audio/x-midi")},e.create_mjs=function(t){return e.createFile("test-file-with-large-name.mjs",t||3516516,"text/javascript")},e.create_mp3=function(t){return e.createFile("test-file-with-large-name.mp3",t||3516516,"audio/mpeg")},e.create_mp4=function(t){return e.createFile("test-file-with-large-name.mp4",t||3516516,"video/mp4")},e.create_mpeg=function(t){return e.createFile("test-file-with-large-name.mpeg",t||3516516,"video/mpeg")},e.create_mpkg=function(t){return e.createFile("test-file-with-large-name.mpkg",t||3516516,"application/vnd.apple.installer+xml")},e.create_odp=function(t){return e.createFile("test-file-with-large-name.odp",t||3516516,"application/vnd.oasis.opendocument.presentation")},e.create_ods=function(t){return e.createFile("test-file-with-large-name.ods",t||3516516,"application/vnd.oasis.opendocument.spreadsheet")},e.create_odt=function(t){return e.createFile("test-file-with-large-name.odt",t||3516516,"application/vnd.oasis.opendocument.text")},e.create_oga=function(t){return e.createFile("test-file-with-large-name.oga",t||3516516,"audio/ogg")},e.create_ogv=function(t){return e.createFile("test-file-with-large-name.ogv",t||3516516,"video/ogg")},e.create_ogx=function(t){return e.createFile("test-file-with-large-name.ogx",t||3516516,"application/ogg")},e.create_opus=function(t){return e.createFile("test-file-with-large-name.opus",t||3516516,"audio/opus")},e.create_otf=function(t){return e.createFile("test-file-with-large-name.otf",t||3516516,"font/otf")},e.create_png=function(t){return e.createFile("test-file-with-large-name.png",t||3516516,"image/png")},e.create_pdf=function(t){return e.createFile("test-file-with-large-name.pdf",t||3516516,"application/pdf")},e.create_php=function(t){return e.createFile("test-file-with-large-name.php",t||3516516,"application/x-httpd-php")},e.create_ppt=function(t){return e.createFile("test-file-with-large-name.ppt",t||3516516,"application/vnd.ms-powerpoint")},e.create_pptx=function(t){return e.createFile("test-file-with-large-name.pptx",t||3516516,"application/vnd.openxmlformats-officedocument.presentationml.presentation")},e.create_rar=function(t){return e.createFile("test-file-with-large-name.rar",t||3516516,"application/vnd.rar")},e.create_rtf=function(t){return e.createFile("test-file-with-large-name.rtf",t||3516516,"application/rtf")},e.create_sh=function(t){return e.createFile("test-file-with-large-name.sh",t||3516516,"application/x-sh")},e.create_svg=function(t){return e.createFile("test-file-with-large-name.svg",t||3516516,"image/svg+xml")},e.create_swf=function(t){return e.createFile("test-file-with-large-name.swf",t||3516516,"application/x-shockwave-flash")},e.create_tar=function(t){return e.createFile("test-file-with-large-name.tar",t||3516516,"application/x-tar")},e.create_tif=function(t){return e.createFile("test-file-with-large-name.tif",t||3516516,"image/tiff")},e.create_tiff=function(t){return e.createFile("test-file-with-large-name.tiff",t||3516516,"image/tiff")},e.create_ts=function(t){return e.createFile("mp2t_video-file-with-large-name.ts",t||3516516,"video/mp2t")},e.create_ttf=function(t){return e.createFile("test-file-with-large-name.ttf",t||3516516,"font/ttf")},e.create_text=function(t){return e.createFile("test-file-with-large-name.txt",t||3516516,"text/plain")},e.create_typescript=function(t){return e.createFile("typescript-file-with-large-name.ts",t||3516516,"text/plain")},e.create_vsd=function(t){return e.createFile("ms_visio-file-with-large-name.vsd",t||3516516,"application/vnd.visio")},e.create_wav=function(t){return e.createFile("wav_audio-file-with-large-name.wav",t||3516516,"audio/wav")},e.create_weba=function(t){return e.createFile("web_audio-file-with-large-name.weba",t||3516516,"audio/webm")},e.create_webm=function(t){return e.createFile("web_video-file-with-large-name.webm",t||3516516,"video/webm")},e.create_webp=function(t){return e.createFile("web_image-file-with-large-name.webp",t||3516516,"image/webp")},e.create_woff=function(t){return e.createFile("test-file-with-large-name.woff",t||3516516,"font/woff")},e.create_woff2=function(t){return e.createFile("test-file-with-large-name.woff2",t||3516516,"font/woff2")},e.create_xhtml=function(t){return e.createFile("test-file-with-large-name.xhtml",t||3516516,"application/xhtml+xml")},e.create_xlsx=function(t){return e.createFile("test-file-with-large-name.xls",t||3516516,"application/vnd.ms-excel")},e.create_xls=function(t){return e.createFile("test-file-with-large-name.xlsx",t||3516516,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")},e.create_xml=function(t){return e.createFile("xml-file-with-large-name.xml",t||3516516,"application/xml")},e.create_xml_txt=function(t){return e.createFile("xml_plain_text-file-with-large-name.xml",t||3516516,"application/xml")},e.create_xul=function(t){return e.createFile("test-file-with-large-name.xul",t||3516516,"application/vnd.mozilla.xul+xml")},e.create_zip=function(t){return e.createFile("zip-file-with-large-name.zip",t||3516516,"application/zip")},e.create_3gp=function(t){return e.createFile("3gp_video-file-with-large-name.3gp",t||3516516,"video/3gpp")},e.create_3gp2=function(t){return e.createFile("3gp2_video-file-with-large-name.3g2",t||3516516,"video/3gpp2")},e.create_3gp_a=function(t){return e.createFile("3gp_audio-file-with-large-name.3gp",t||3516516,"audio/3gpp")},e.create_3gp_v=function(t){return e.createFile("3gp_audio-file-with-large-name.3gp2",t||3516516,"audio/3gpp2")},e.create_7z=function(t){return e.createFile("seven_zip-file-with-large-name.7z",t||3516516,"application/x-7z-compressed")},e.create_python=function(t){return e.createFile("python-file-with-large-name.py",t||3516516,"text/plain")},e.create_java=function(t){return e.createFile("java-file-with-large-name.java",t||3516516,"text/plain")},e.create_react=function(t){return e.createFile("react_jsx-file-with-large-name.jsx",t||3516516,"text/plain")},e.create_vue=function(t){return e.createFile("vue-file-with-large-name.vue",t||3516516,"text/plain")},e.createFileListMiscelanious=function(t){var r=[];return r.push(e.create_aac(t)),r.push(e.create_abw(t)),r.push(e.create_freearc(t)),r.push(e.create_avi(t)),r.push(e.create_azw(t)),r.push(e.create_octet(t)),r.push(e.create_bmp(t)),r.push(e.create_bz(t)),r.push(e.create_bz2(t)),r.push(e.create_cda(t)),r.push(e.create_csh(t)),r.push(e.create_css(t)),r.push(e.create_csv(t)),r.push(e.create_doc(t)),r.push(e.create_docx(t)),r.push(e.create_eot(t)),r.push(e.create_epub(t)),r.push(e.create_gzip(t)),r.push(e.create_gif(t)),r.push(e.create_htm(t)),r.push(e.create_html(t)),r.push(e.create_ico(t)),r.push(e.create_icalendar(t)),r.push(e.create_jar(t)),r.push(e.create_jpeg(t)),r.push(e.create_jpg(t)),r.push(e.create_js(t)),r.push(e.create_json(t)),r.push(e.create_jsonld(t)),r.push(e.create_mid(t)),r.push(e.create_midi(t)),r.push(e.create_x_mid(t)),r.push(e.create_x_midi(t)),r.push(e.create_mjs(t)),r.push(e.create_mp3(t)),r.push(e.create_mp4(t)),r.push(e.create_mpeg(t)),r.push(e.create_mpkg(t)),r.push(e.create_odp(t)),r.push(e.create_ods(t)),r.push(e.create_odt(t)),r.push(e.create_oga(t)),r.push(e.create_ogv(t)),r.push(e.create_ogx(t)),r.push(e.create_opus(t)),r.push(e.create_otf(t)),r.push(e.create_png(t)),r.push(e.create_pdf(t)),r.push(e.create_php(t)),r.push(e.create_ppt(t)),r.push(e.create_pptx(t)),r.push(e.create_rar(t)),r.push(e.create_rtf(t)),r.push(e.create_sh(t)),r.push(e.create_svg(t)),r.push(e.create_swf(t)),r.push(e.create_tar(t)),r.push(e.create_tif(t)),r.push(e.create_tiff(t)),r.push(e.create_ts(t)),r.push(e.create_ttf(t)),r.push(e.create_text(t)),r.push(e.create_typescript(t)),r.push(e.create_vsd(t)),r.push(e.create_wav(t)),r.push(e.create_weba(t)),r.push(e.create_webm(t)),r.push(e.create_webp(t)),r.push(e.create_woff(t)),r.push(e.create_woff2(t)),r.push(e.create_xhtml(t)),r.push(e.create_xlsx(t)),r.push(e.create_xls(t)),r.push(e.create_xml(t)),r.push(e.create_xml_txt(t)),r.push(e.create_xul(t)),r.push(e.create_zip(t)),r.push(e.create_python(t)),r.push(e.create_java(t)),r.push(e.create_react(t)),r.push(e.create_vue(t)),r},e}(),ft=function(e,t,r){return void 0===e&&(e="png-image-file-with-large-name.png"),void 0===t&&(t=455555),void 0===r&&(r="image/png"),dt.createFile(e,t,r)},mt=function(){function e(){}return e.getNextId=function(){return e.nextId++,e.nextId},e.nextId=0,e}();function gt(e,t){return void 0===e&&(e=0),void 0===t&&(t=0),Math.floor(Math.random()*(t-e))+e}var ht=function(e){return e&&0!==e.length?e.split(",").map((function(e){return e.trim()})):[]},xt=function(e,t){for(var r=t.name,a=t.type,n=0;n<e.length;n++){var o=e[n];if(0!==o.length){if("."===o.charAt(0)&&o.includes(Je(r)))return!0;if(a&&a.length>0&&o.includes("/")&&a.includes("/")){var i=o.split("/")[0],s=o.split("/")[1],c=a.split("/")[0],u=a.split("/")[1];if(i===c){if("*"===s)return!0;if(s===u)return!0}}}}return!1},bt=function(e,t,r,a){var n=st({},e),o=[];if(!e.file)return st({},n);if(t){var i=t(n.file).errors;i&&o.push.apply(o,i)}var s=r.maxFileSize,c=r.accept,u=e.file;if(s&&u.size>s){var l=a.maxSizeError;o.push(l(s))}c&&!xt(ht(c),u)&&o.push(a.acceptError);var p=0===o.length;return n=st(st({},n),{valid:p,errors:p?void 0:o})},vt=function(e,t,r,a){var n=mt.getNextId(),o=[];if(t)return st({id:n,file:e},t(e));var i=r.maxFileSize,s=r.accept;if(i&&e.size>i){var c=a.maxSizeError;o.push(c(i))}return s&&!xt(ht(s),e)&&o.push(a.acceptError),{id:n,file:e,valid:0===o.length,errors:o}},Ft=["File is too big. Max file size allowed is 80mb.","File's type is not allowed.","Max amount of files (28) has been reached."];function wt(e,t){for(var r=Object.keys(t||{}),a=0;a<r.length&&t;a++)e.append(r[a],t[r[a]]);e.append("otherValue","HAAAAAAAAAAAAAAa")}function _t(e,t){for(var r=Object.keys(t||{}),a=0;a<r.length&&t;a++)e.setRequestHeader(r[a],t[r[a]])}var Et={success:!1,message:"Timeout error",payload:{}},yt={success:!1,message:"Upload aborted",payload:{}},At={success:!1,message:"Error when parsing JSON response",payload:{}},zt={success:!1,message:"Unexpected error",payload:{}},St=function(e){return st(st({},e),{uploadMessage:"Unable to upload. xhr object was not provided",uploadStatus:"error",serverResponse:{success:!1}})},kt=function(e){try{var t=JSON.parse(e.response),r=t.success,a=t.message;return{success:"boolean"==typeof r&&r,message:"string"==typeof a?a:"Error on message response",payload:t.payload||{}}}catch(e){return At}},Dt=function(e,t){return st(st({},e),{serverResponse:t,uploadMessage:t.message,uploadStatus:"success"})},Rt=function(e,t){return st(st({},e),{uploadMessage:t.message,uploadStatus:"error",serverResponse:t})},Ct=function(e,t,r,a,n){return void 0===t&&(t="POST"),new Promise((function(o,i){var s=["POST","PUT","PATCH"].includes(t.toUpperCase())?t:"POST";e.upload.onload=function(){},e.upload.ontimeout=function(){return o(Et)},e.upload.onabort=function(){o(yt)},e.onloadend=function(e){return ct(void 0,void 0,void 0,(function(){return ut(this,(function(e){return[2]}))}))},e.onreadystatechange=function(t){return ct(void 0,void 0,void 0,(function(){return ut(this,(function(t){return e.readyState,4===e.readyState&&(""!==e.response?o(kt(e)):o(yt)),[2]}))}))},e.open(s,r,!0),_t(e,n),e.send(a)}))};var Mt={indianred:"#CD5C5C",lightcoral:"#F08080",salmon:"#FA8072",darksalmon:"#E9967A",lightsalmon:"#FFA07A",crimson:"#DC143C",red:"#FF0000",firebrick:"#B22222",darkred:"#8B0000",pink:"#FFC0CB",lightpink:"#FFB6C1",hotpink:"#FF69B4",deeppink:"#FF1493",mediumvioletred:"#C71585",palevioletred:"#DB7093",coral:"#FF7F50",tomato:"#FF6347",orangered:"#FF4500",darkorange:"#FF8C00",orange:"#FFA500",gold:"#FFD700",yellow:"#FFFF00",lightyellow:"#FFFFE0",lemonchiffon:"#FFFACD",lightgoldenrodyellow:"#FAFAD2",papayawhip:"#FFEFD5",moccasin:"#FFE4B5",peachpuff:"#FFDAB9",palegoldenrod:"#EEE8AA",khaki:"#F0E68C",darkkhaki:"#BDB76B",lavender:"#E6E6FA",thistle:"#D8BFD8",plum:"#DDA0DD",violet:"#EE82EE",orchid:"#DA70D6",fuchsia:"#FF00FF",magenta:"#FF00FF",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",rebeccapurple:"#663399",blueviolet:"#8A2BE2",darkviolet:"#9400D3",darkorchid:"#9932CC",darkmagenta:"#8B008B",purple:"#800080",indigo:"#4B0082",slateblue:"#6A5ACD",darkslateblue:"#483D8B",mediumslateblue:"#7B68EE",greenyellow:"#ADFF2F",chartreuse:"#7FFF00",lawngreen:"#7CFC00",lime:"#00FF00",limegreen:"#32CD32",palegreen:"#98FB98",lightgreen:"#90EE90",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",mediumseagreen:"#3CB371",seagreen:"#2E8B57",forestgreen:"#228B22",green:"#008000",darkgreen:"#006400",yellowgreen:"#9ACD32",olivedrab:"#6B8E23",olive:"#808000",darkolivegreen:"#556B2F",mediumaquamarine:"#66CDAA",darkseagreen:"#8FBC8B",lightseagreen:"#20B2AA",darkcyan:"#008B8B",teal:"#008080",aqua:"#00FFFF",cyan:"#00FFFF",lightcyan:"#E0FFFF",paleturquoise:"#AFEEEE",aquamarine:"#7FFFD4",turquoise:"#40E0D0",mediumturquoise:"#48D1CC",darkturquoise:"#00CED1",cadetblue:"#5F9EA0",steelblue:"#4682B4",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",lightblue:"#ADD8E6",skyblue:"#87CEEB",lightskyblue:"#87CEFA",deepskyblue:"#00BFFF",dodgerblue:"#1E90FF",cornflowerblue:"#6495ED",royalblue:"#4169E1",blue:"#0000FF",mediumblue:"#0000CD",darkblue:"#00008B",navy:"#000080",midnightblue:"#191970",cornsilk:"#FFF8DC",blanchedalmond:"#FFEBCD",bisque:"#FFE4C4",navajowhite:"#FFDEAD",wheat:"#F5DEB3",burlywood:"#DEB887",tan:"#D2B48C",rosybrown:"#BC8F8F",sandybrown:"#F4A460",goldenrod:"#DAA520",darkgoldenrod:"#B8860B",peru:"#CD853F",chocolate:"#D2691E",saddlebrown:"#8B4513",sienna:"#A0522D",brown:"#A52A2A",maroon:"#800000",white:"#FFFFFF",snow:"#FFFAFA",honeydew:"#F0FFF0",mintcream:"#F5FFFA",azure:"#F0FFFF",aliceblue:"#F0F8FF",ghostwhite:"#F8F8FF",whitesmoke:"#F5F5F5",seashell:"#FFF5EE",beige:"#F5F5DC",oldlace:"#FDF5E6",floralwhite:"#FFFAF0",ivory:"#FFFFF0",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lavenderblush:"#FFF0F5",mistyrose:"#FFE4E1",gainsboro:"#DCDCDC",lightgray:"#D3D3D3",silver:"#C0C0C0",darkgray:"#A9A9A9",gray:"#808080",dimgray:"#696969",lightslategray:"#778899",slategray:"#708090",darkslategray:"#2F4F4F",black:"#000000"},jt=function(e,t,r){void 0===t&&(t=0);var a=r||"rgba(255, 255, 255, 0.6)";if(!e)return a;var n=e.toUpperCase();if(n.includes("RGBA"))return n;if(n.includes("RGB"))return n.replace("RGB","rgba").replace(")",", ".concat(t,")"));if(!It(Tt(n)))return a;var o,i,s;return o=16*Bt(n.charAt(1))+Bt(n.charAt(2)),i=16*Bt(n.charAt(3))+Bt(n.charAt(4)),s=16*Bt(n.charAt(5))+Bt(n.charAt(6)),"rgba(".concat(o,", ").concat(i,",").concat(s," , ").concat(t,")")},It=function(e){if("#"!==e.charAt(0))return!1;if(7!==e.length)return!1;for(var t=1;t<e.length;t++)if(!Lt.includes(e.charAt(t)))return!1;return!0};function Tt(e){return e?void 0!==Mt[e.toLocaleLowerCase()]?Mt[e.toLocaleLowerCase()]:e:""}var Lt=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"],Ut=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],Bt=function(e){return Lt.includes(e)?Ut[Lt.indexOf(e)]:0},Nt=function(e){return void 0!==e&&""!==e?e:Pt},Pt="#646c7f";exports.ABORTED_ERROR_RESPONSE=yt,exports.DropzoneEnglish=s,exports.DropzoneFrench=n,exports.DropzoneItalian=t,exports.DropzoneLocalizer=z,exports.DropzoneLocalizerSelector=S,exports.DropzonePortuguese=h,exports.DropzoneRussian=f,exports.DropzoneSimplifiedChinese=v,exports.DropzoneSpanish=l,exports.DropzoneTraditionalChinese=_,exports.ExtFileInstance=it,exports.ExtFileManager=pt,exports.FileIdGenerator=mt,exports.FileItemEnglish=c,exports.FileItemFrench=o,exports.FileItemItalian=r,exports.FileItemLocalizer=A,exports.FileItemLocalizerSelector=function(e){switch(e){case"ES-es":return A["ES-es"];case"EN-en":default:return A["EN-en"];case"FR-fr":return A["FR-fr"];case"IT-it":return A["IT-it"];case"PT-pt":return A["PT-pt"];case"RU-ru":return A["RU-ru"];case"ZH-cn":return A["ZH-cn"];case"ZH-hk":return A["ZH-hk"]}},exports.FileItemPortuguese=x,exports.FileItemRussian=m,exports.FileItemSimplifiedChinese=F,exports.FileItemSpanish=p,exports.FileItemTraditionalChinese=E,exports.FuiUpload=function(e,t,r,a,n){return new Promise((function(o,i){e.upload.onload=function(){},e.upload.ontimeout=function(){return o(Et)},e.upload.onabort=function(){return o(yt)},e.onreadystatechange=function(t){return ct(void 0,void 0,void 0,(function(){return ut(this,(function(t){return 4===e.readyState&&(""!==e.response?o(kt(e)):o(zt)),[2]}))}))},e.open(t,r,!0);for(var s=Object.keys(n),c=0;c<s.length;c++)e.setRequestHeader(s[c],n[s[c]]);e.send(a)}))},exports.JSON_PARSE_ERROR_RESPONSE=At,exports.JsonParseResponse=kt,exports.NAMED_COLORS=Mt,exports.NO_XHR_PROVIDED_ERROR=St,exports.SyntheticFile=dt,exports.TIMEOUT_ERROR_RESPONSE=Et,exports.UNEXPECTED_ERROR_RESPONSE=zt,exports.ValidateErrorEnglish=u,exports.ValidateErrorFrench=i,exports.ValidateErrorItalian=a,exports.ValidateErrorLocalizer=k,exports.ValidateErrorLocalizerSelector=D,exports.ValidateErrorPortuguese=b,exports.ValidateErrorRussian=g,exports.ValidateErrorSimplifiedChinese=w,exports.ValidateErrorSpanish=d,exports.ValidateErrorTraditionalChinese=y,exports.aac=C,exports.abw=M,exports.accdb=j,exports.addClassName=function(e,t){return t?"".concat(e," ").concat(t):e},exports.addExtraData=wt,exports.addHeaders=_t,exports.applicationSelector=tt,exports.asureColor=Nt,exports.audioSelector=Qe,exports.avi=I,exports.azw=T,exports.bmp=L,exports.brighterColor=function(e,t){void 0===t&&(t=25);var r="",a=(100+t)/100,n=0,o=0,i=0;if(It(Tt(e)))n=16*Bt(e.charAt(1))+Bt(e.charAt(2)),o=16*Bt(e.charAt(3))+Bt(e.charAt(4)),i=16*Bt(e.charAt(5))+Bt(e.charAt(6)),r="rgb(".concat(n*a,", ").concat(o*a,",").concat(i*a,")");else if(e.includes("rgba")){var s=e.replace("rgba(","").split(",");r="rgb(".concat(parseInt(s[0],10)*a,", ").concat(parseInt(s[1],10)*a,",").concat(parseInt(s[2],10)*a,")")}else if(e.includes("rgb")){s=e.replace("rgb(","").split(",");r="rgb(".concat(parseInt(s[0],10)*a,", ").concat(parseInt(s[1],10)*a,",").concat(parseInt(s[2],10)*a,")")}return r},exports.bz=U,exports.bz2=B,exports.cda=N,exports.checkIsCode=nt,exports.cleanInput=function(e){e&&(e.value="")},exports.colourNameToHex=Tt,exports.completeAsureColor=function(e,t){return void 0===t&&(t=1),jt(Nt(Tt(e)),t)},exports.completeUploadResult=function(e,t,r){return{id:e.id,uploadedFile:st(st({},e),{uploadMessage:t.message,uploadStatus:r}),serverResponse:t}},exports.createListOfMultiTypeFile=function(e){return dt.createFileListMiscelanious(e)},exports.createSyntheticFile=ft,exports.createUploadConfig=function(e,t,r,a,n){return{url:e,method:t,headers:r,uploadLabel:a,cleanonUpload:n}},exports.csh=P,exports.css=O,exports.csv=q,exports.darkerColor=function(e,t){void 0===t&&(t=25);var r="",a=(100-t)/100,n=0,o=0,i=0;if(It(Tt(e)))n=16*Bt(e.charAt(1))+Bt(e.charAt(2)),o=16*Bt(e.charAt(3))+Bt(e.charAt(4)),i=16*Bt(e.charAt(5))+Bt(e.charAt(6)),r="rgb(".concat(n*a,", ").concat(o*a,",").concat(i*a,")");else if(e.includes("rgba")){var s=e.replace("rgba(","").split(",");r="rgb(".concat(parseInt(s[0],10)*a,", ").concat(parseInt(s[1],10)*a,",").concat(parseInt(s[2],10)*a,")")}else if(e.includes("rgb")){s=e.replace("rgb(","").split(",");r="rgb(".concat(parseInt(s[0],10)*a,", ").concat(parseInt(s[1],10)*a,",").concat(parseInt(s[2],10)*a,")")}return r},exports.docx=H,exports.drawio=V,exports.eot=Z,exports.epub=G,exports.extFileMock=function(e){return{id:e||mt.getNextId(),name:"fileName.ext",size:29360128,type:"files-ui/mock",file:ft("fileName.ext",29360128,"files-ui/mock"),errors:Ft,uploadMessage:"uploaded",uploadStatus:"preparing",valid:!1,progress:28,xhr:new XMLHttpRequest,extraData:{extraData1:"files-ui is the best",extraData2:{id:1,name:"files-ui.mock"},deleted:!0},downloadUrl:"https://www.files-ui.com/mock/file-download"}},exports.extFileReconcilation=function(e,t){var r=pt.getExtFileInstanceList(e);if(r){var a=lt([],t,!0);if(a=a.filter((function(e){return-1===(null==r?void 0:r.findIndex((function(t){return t.id===e.id})))})),r.length!==t.length||0===t.length)return;for(var n=0;n<r.length;n++)void 0===t[n].uploadStatus&&"preparing"===r[n].uploadStatus&&(r[n].uploadStatus=void 0)}return[]},exports.extensionSelector=at,exports.fakeFuiUpload=function(e,t){void 0===t&&(t=S("EN-en"));var r=e.toExtFile();return new Promise((function(e,a){setTimeout((function(){if(Math.floor(10*Math.random())%2==0){var a=!0,n=t.fakeuploadsuccess,o={url:""};e(st(st({},r),{serverResponse:{success:a,message:n,payload:o},uploadStatus:"success",uploadMessage:n}))}else{a=!1,n=t.fakeUploadError,o={};e(st(st({},r),{serverResponse:{success:a,message:n,payload:o},uploadStatus:"error",uploadMessage:n}))}}),1700)}))},exports.fileListToExtFileArray=function(e){for(var t=[],r=0,a=void 0;a=e[r];r++)t.push({id:mt.getNextId(),file:a,name:a.name,size:a.size,type:a.type});return t},exports.fileListToExtFileInstanceArray=function(e){for(var t=[],r=0,a=void 0;a=e[r];r++)t.push(new it({id:mt.getNextId(),file:a,name:a.name,size:a.size,type:a.type}));return t},exports.fileListvalidator=function(e,t,r,a,n,o){for(var i=[],s=t,c=D(o),u=0,l=void 0;l=e[u];u++){var p=vt(l,a,r,c);if(p.valid){var d=s>0;if(p.valid=d,!d){var f=c.maxFileCount;p.errors=p.errors?lt(lt([],p.errors,!0),[f(n||1/0)],!1):[f(n||1/0)]}s--}i.push(p)}return i},exports.fileSizeFormater=e,exports.fontSelector=Ye,exports.freearc=X,exports.getExt=Je,exports.getImageOrientation=function(e){return new Promise((function(t,r){if(e&&0!==e.length)try{var a=new Image;a.src=e,a.onerror=function(e){r("landscape")},a.onload=function(){var e=a.width,r=a.height;t(e>r?"landscape":"portrait")}}catch(e){"development"===process.env.NODE_ENV&&console.error("An error ocurred when trying to get the image orientation"),r("landscape")}else r("landscape")}))},exports.getLocalFileItemData=function(e,t,r,a){var n="",o=void 0,i=void 0;return e&&"string"==typeof e.name?(n=e.name,o=e.type,i=e.size):t&&"string"==typeof t&&(n=t,o=r,i=a),[n,o,i]},exports.getRandomInt=gt,exports.getURLFileIco=function(e,t){var r="fallBack";if(!e)return r=Ke,(null==t?void 0:t.fallBack)?{url:null==t?void 0:t.fallBack,mimeResume:r}:{url:ot[r],mimeResume:r};r=rt(e.type);var a=Je(e.name);"text"===r&&(r=nt(a)),r===Ke&&(r=at(a));var n=null==t?void 0:t[r];return void 0!==n?{url:n,mimeResume:r}:{url:ot[r],mimeResume:r}},exports.getURLFileIcoFromNameAndType=function(e,t,r){var a="octet";if(!e)return a=Ke,(null==r?void 0:r.fallBack)?{url:null==r?void 0:r.fallBack,mimeResume:a}:{url:ot[a],mimeResume:a};a=rt(t);var n=Je(e);"text"===a&&(a=nt(n)),a===Ke&&(a=at(n));var o=null==r?void 0:r[a];return void 0!==o?{url:o,mimeResume:a}:{url:ot[a],mimeResume:a}},exports.gif=J,exports.gzip=K,exports.hexColorToRGB=jt,exports.hexTodec=Bt,exports.html=Q,exports.icalendar=W,exports.imageSelector=$e,exports.instantPreparingToUploadOne=function(e){return"preparing"===e.uploadStatus?(e.uploadStatus="uploading",st(st({},e),{uploadStatus:"uploading"})):e},exports.isHexColor=It,exports.isUploadAbleExtFile=function(e,t){return(!t||t&&e.valid)&&"success"!==e.uploadStatus},exports.isValidateActive=function(e,t,r,a){return null!=e||null!=t||null!=r||null!=a},exports.jar=Y,exports.java=$,exports.javascript=ee,exports.jpeg=te,exports.json=re,exports.jsonld=ae,exports.makeErrorUploadResponse=Rt,exports.makeServerResponse=function(e,t,r){return{success:e,message:t,payload:r}},exports.makeSuccessUploadResponse=Dt,exports.makeSyntheticExtFile=function(e,t,r,a){void 0===t&&(t=Math.ceil(28*Math.random())%2==0);var n=[],o=r||function(){switch(gt(0,4)){case 0:return"error";case 1:return"uploading";case 2:return"success";default:return}}(),i=a||"";if(t){if(!a)switch(o){case"error":i="Upload failed. There was an error";break;case"success":i="File was successfully upload";break;default:a=void 0}n=void 0}else{var s=gt(0,3);n.push(Ft[s]),o=void 0,i=void 0}return{id:mt.getNextId(),valid:t,file:e,uploadStatus:o,uploadMessage:i,errors:n}},exports.midi=ne,exports.mimeSelector=rt,exports.mp3=oe,exports.mp4=ie,exports.mpeg=se,exports.mpkg=ce,exports.octet=ue,exports.odp=le,exports.ods=pe,exports.odt=de,exports.oga=fe,exports.ogv=me,exports.ogx=ge,exports.opus=he,exports.otf=xe,exports.pdf=be,exports.php=ve,exports.png=Fe,exports.pptx=we,exports.prepToUploadOne=function(e){return new Promise((function(t,r){setTimeout((function(){e.uploadStatus="uploading",t(st(st({},e),{uploadStatus:"uploading"}))}),1500)}))},exports.preparingToUploadOne=function(e){return new Promise((function(t,r){setTimeout((function(){"preparing"===e.uploadStatus?(e.uploadStatus="uploading",t(st(st({},e),{uploadStatus:"uploading"}))):t(e)}),1500)}))},exports.psd=_e,exports.python=Ee,exports.rar=Ae,exports.react=ze,exports.readAsArrayBuffer=function(e,t,r){return new Promise((function(a,n){try{var o=new FileReader;o.onload=function(){a(o.result)},o.onprogress=function(){null==t||t()},o.onerror=function(){null==r||r()},o.readAsArrayBuffer(e)}catch(e){n(void 0)}}))},exports.readAsBinaryString=function(e,t,r){return new Promise((function(a,n){try{var o=new FileReader;o.onload=function(){a(o.result)},o.onprogress=function(){null==t||t()},o.onerror=function(){null==r||r()},o.readAsBinaryString(e)}catch(e){n(void 0)}}))},exports.readAsDataURL=function(e,t,r){return new Promise((function(a,n){try{var o=new FileReader;o.onprogress=function(){null==t||t()},o.onerror=function(){null==r||r()},o.onload=function(){a(o.result)},o.readAsDataURL(e)}catch(e){n(void 0)}}))},exports.readAsText=function(e,t,r,a){return new Promise((function(n,o){try{var i=new FileReader;i.onload=function(){n(i.result)},i.onprogress=function(){null==r||r()},i.onerror=function(){null==a||a()},i.readAsText(e,t||"base64")}catch(e){o(void 0)}}))},exports.resizeImage=function(e,t,r){return void 0===t&&(t=135),void 0===r&&(r=120),new Promise((function(a,n){try{var o=new Image;o.src=e,o.onload=function(){var i=document.createElement("canvas"),s=t,c=r,u=o.width,l=o.height;t>u&&r>l?a(e):u>l?u>s&&(l*=s/u,u=s):l>c&&(u*=c/l,l=c),i.width=u,i.height=l;var p=i.getContext("2d");p?(p.drawImage(o,0,0,u,l),a(i.toDataURL())):("development"===process.env.NODE_ENV&&console.error("An error ocurred when trying to make a thumnail"),n(void 0))}}catch(e){"development"===process.env.NODE_ENV&&console.error("An error ocurred when trying to make a thumnail"),n(void 0)}}))},exports.rtf=Se,exports.sanitizeArrExtFile=function(e){return e.filter((function(e){var t;return!(null===(t=e.extraData)||void 0===t?void 0:t.deleted)})).map((function(e){return"aborted"!==e.uploadStatus||e.uploadMessage||(e.uploadMessage="Upload aborted by user"),it.toExtFile(e)}))},exports.sass=ke,exports.separateAccept=ht,exports.setNextUploadStatus=function(e,t){var r=e.uploadStatus,a=t.uploadStatus;"preparing"===r&&["aborted",void 0].includes(a)?(e.uploadStatus=void 0,e.uploadMessage=t.uploadMessage):"uploading"===r&&["aborted",void 0].includes(a)&&(e.uploadStatus="aborted",e.uploadMessage=t.uploadMessage)},exports.setPrepToUploading=function(e){return new Promise((function(t,r){setTimeout((function(){t(st(st({},e),{uploadStatus:"uploading"}))}),1500)}))},exports.sevenzip=R,exports.sh=De,exports.shrinkWord=function(e,t){void 0===e&&(e=""),void 0===t&&(t=!1);var r=e;return t?e.length>=20&&(r=e.slice(0,10)+"..."+e.slice(-7)):e.length>=30&&(r=e.slice(0,13)+"..."+e.slice(-8)),r},exports.sleepPreparing=function(e){return void 0===e&&(e=5e3),new Promise((function(t,r){setTimeout((function(){t()}),e)}))},exports.sleepTransition=function(e){return void 0===e&&(e=1500),new Promise((function(t,r){setTimeout((function(){t(!0)}),e)}))},exports.swf=Re,exports.tar=ye,exports.text=Ce,exports.textSelector=We,exports.tiff=Me,exports.toUploadableExtFileList=function(e){return e?e.map((function(e){return st(st({},e),{xhr:new XMLHttpRequest})})):[]},exports.ttf=je,exports.typescript=Ie,exports.unableToUploadResult=function(e){return{id:e.id,uploadedFile:st(st({},e),{uploadMessage:"Unable to upload. XHR was not provided",uploadStatus:"error"}),serverResponse:{success:!1,message:"Error on upload: Unable to upload. XHR was not provided ",payload:{}}}},exports.unexpectedErrorUploadResult=function(e){return st(st({},e),{uploadMessage:"Unexpected error",uploadStatus:"error",serverResponse:{success:!1,message:"Error on upload: unexpected error ",payload:{}}})},exports.uploadExtFile=function(e,t,r,a,n){return ct(void 0,void 0,void 0,(function(){return ut(this,(function(o){return[2,new Promise((function(o,i){return ct(void 0,void 0,void 0,(function(){var i,s,c,u,l,p;return ut(this,(function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),(i=e.xhr)?(s=r||"POST",c=e.file,(u=new FormData).append(n||"file",c),l=st({otherValue:"other valueee haaaa",param2:{tecnica:"KIKOHUUUU",friend:"Chaos",age:25}},e.extraUploadData),wt(u,l),p=void 0,[4,Ct(i,s,t,u,a||{})]):(o(St(e)),[2]);case 1:return(p=d.sent()).success?o(Dt(e,p)):o(Rt(e,p)),[3,3];case 2:return d.sent(),o(Rt(e,zt)),[3,3];case 3:return[2]}}))}))}))]}))}))},exports.uploadFile=function(e,t,r,a,n){var o=this;return new Promise((function(i,s){return ct(o,void 0,void 0,(function(){var o,s;return ut(this,(function(c){switch(c.label){case 0:(o=new FormData).append(a||"file",e),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,Ct(new XMLHttpRequest,r,t,o,n)];case 2:return s=c.sent(),i(s),[3,4];case 3:return c.sent(),i(zt),[3,4];case 4:return[2]}}))}))}))},exports.uploadFormData=Ct,exports.uploadOne=function(e){return new Promise((function(t,r){setTimeout((function(){t(st(st({},e),{uploadStatus:"success"}))}),2e3)}))},exports.uploadOneExtFile=function(e){return new Promise((function(t,r){setTimeout((function(){e.uploadStatus="success",t(st(st({},e),{uploadStatus:"success"}))}),2e3)}))},exports.validateAccept=xt,exports.validateExtFile=bt,exports.validateExtFileList=function(e,t,r,a,n,o){var i=[];if(!t)return i;for(var s=t,c=D(o),u=c.maxFileCount,l=0;l<e.length;l++){var p=e[l];if((p=bt(p,a,r,c)).valid){var d=s>0;p.valid=d,d||(p.errors=p.errors?lt(lt([],p.errors,!0),[u(n||1/0)],!1):[u(n||1/0)]),s--}i.push(p)}return i},exports.validateFile=vt,exports.videoSelector=et,exports.vsd=Te,exports.vue=Le,exports.wav=Ue,exports.weba=Ne,exports.webm=Be,exports.webp=Pe,exports.wma=Oe,exports.wmv=qe,exports.woff=He,exports.xlsx=Ve,exports.xml=Ze,exports.xul=Ge,exports.zip=Xe;
+//# sourceMappingURL=index.js.map
diff --git a/src/core/index.js.map b/src/core/index.js.map
new file mode 100644
index 0000000..bfd639e
--- /dev/null
+++ b/src/core/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sources":["../src/utils/fileSizeFormatter.ts","../src/localization/Italian/localization.italian.ts","../src/localization/French/localization.french.ts","../src/localization/English/localization.english.ts","../src/localization/Spanish/localization.spanish.ts","../src/localization/Russian/localization.russian.ts","../src/localization/Portuguese/localization.portuguese.ts","../src/localization/Chinese-simplified/localization.simplifiedChinese.ts","../src/localization/Chinese-traditional/localization.traditionalChinese.ts","../src/localization/FileItem.localization.ts","../src/localization/dropzone.localization.ts","../src/localization/validationError.localization.ts","../src/mime/icons.ts","../src/utils/getExt.ts","../src/mime/mime.ts","../src/types/ExtFile.ts","../src/types/ExtFileManager.ts","../src/synthetic-file/SyntheticFile.ts","../src/utils/IdGenerator.ts","../src/utils/randomInt.ts","../src/utils/input.utils.ts","../src/validation/separateAccept.ts","../src/validation/validateAccept.ts","../src/validation/fileValidator.ts","../src/validation/fakeerros.ts","../src/upload/addExtraData.upload.ts","../src/upload/addheaders.upload.ts","../src/upload/errors.upload.ts","../src/upload/response.upload.ts","../src/upload/upload.ts","../src/color/namedColors.ts","../src/color/colors.ts","../src/utils/addClassName.ts","../src/upload/utils.upload.ts","../src/types/UploadConfig.ts","../src/mocks/extFileMock.ts","../src/file-manager/reconcilation.ts","../src/utils/fakeupload.utils.ts","../src/utils/fileListParser.ts","../src/reader/imageOrientation.ts","../src/utils/getLocalFileItemData.ts","../src/utils/isUploadAbleExtFile.ts","../src/utils/dropzone.utils.ts","../src/synthetic-file/syntheticfileGenerator.ts","../src/validation/randomStatus.ts","../src/reader/readers.ts","../src/reader/resizeImage.ts","../src/utils/shrinkWord.ts"],"sourcesContent":["/**\r\n * Gives a XX.XX format in Bytes KB, MB, GB or TB\r\n * @param fileSize file size to give format in Bytes\r\n */\r\n export const fileSizeFormater = (fileSize?: number | false): string| undefined => {\r\n    let result = \"\";\r\n    if (!fileSize) {\r\n        return undefined;\r\n    }\r\n    if (fileSize < 1024) {\r\n        result = fileSize + \" Bytes\"\r\n    } else {\r\n        //KB\r\n        if (fileSize < 1024 * 1024) {\r\n            result = (fileSize / 1024).toFixed(2) + \" KB\";\r\n        } else if (fileSize < 1024 * 1024 * 1024) {\r\n            result = ((fileSize / 1024) / 1024).toFixed(2) + \" MB\";\r\n        } else if (fileSize < 1024 * 1024 * 1024 * 1024) {\r\n            result = (((fileSize / 1024) / 1024) / 1024).toFixed(2) + \" GB\";\r\n        } else {\r\n            result = ((((fileSize / 1024) / 1024) / 1024) / 1024).toFixed(2) + \" TB\";\r\n        }\r\n    }\r\n    return result;\r\n}","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n/**\r\n * Italian translation for Dropzone component\r\n */\r\nexport const DropzoneItalian: LocalLabels = {\r\n    defaultLabel: \"Trascina qui i tuoi file\",\r\n\r\n    uploadingMessage: (amountOfFiles) => { return `Caricamento di ${amountOfFiles} file`; },\r\n    uploadFinished: (uploaded, rejected) => `File caricati: ${uploaded}, File rifiutati: ${rejected}`,\r\n    noFilesMessage: `Nessun file valido in attesa di essere caricato`,\r\n    footer: {\r\n        acceptAll: `Tutti i tipi di file sono accettati`,\r\n        acceptCustom: (accept) => `Tipi di file consentiti: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"Caricamento\",\r\n        maxSizeMessage: (maxFileSize) => `Dimensione massima ${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `File  ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"Il file è stato caricato con successo \",\r\n    fakeUploadError: \"Errore di caricamento del file\",\r\n}\r\n\r\n/**\r\n * Italian translation for FileItem component\r\n */\r\nexport const FileItemItalian: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `Nome: `,\r\n        size: \"Dimensione: \",\r\n        type: \"Tipo: \"\r\n    },\r\n    status: {\r\n        preparing:\"preparazione\",\r\n        uploading: \"In corso\",\r\n        success: \"Successo\",\r\n        valid: \"Valido\",\r\n        denied: \"Non válido\",\r\n        error: \"Errore\",\r\n        aborted:\"Interrotto\"\r\n    },\r\n}\r\n/**\r\n * Italian translation for Validation Errors\r\n */\r\n export const ValidateErrorItalian: LocalLabels = {\r\n    maxSizeError: (maxSize) => `Il file è molto grande. Il tam. il massimo è ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `Tipo di file illegale`,\r\n    maxFileCount: (maxFiles) => `Numero massimo di file (${maxFiles}) raggiunto`\r\n}","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n/**\r\n * French translation for Dropzone component\r\n */\r\nexport const DropzoneFrench: LocalLabels = {\r\n    defaultLabel: \"Déposez vos fichiers ici\",\r\n\r\n    uploadingMessage: (amountOfFiles) => { return `Envoi de ${amountOfFiles} fichiers`; },\r\n    uploadFinished: (uploaded, rejected) => `Fichiers téléchargés : ${uploaded}, Fichiers rejetés: ${rejected}`,\r\n    noFilesMessage: `Aucun fichier valide ne manque`,\r\n    footer: {\r\n        acceptAll: `Tous types de fichiers acceptés `,\r\n        acceptCustom: (accept) => `Types de fichier: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"Envoyer\",\r\n        maxSizeMessage: (maxFileSize) => `Taille maximale ${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `Fichiers  ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"Le fichier a été téléchargé avec succès\",\r\n    fakeUploadError: \"Erreur lors du téléchargement \",\r\n}\r\n\r\n/**\r\n * French translation for FileItem component\r\n */\r\nexport const FileItemFrench: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `Le nom: `,\r\n        size: \"Le taille: \",\r\n        type: \"Le type: \"\r\n    },\r\n    status: {\r\n        preparing:\"préparer\",\r\n        uploading: \"En cours\",\r\n        success: \"Succès\",\r\n        valid: \"Valide\",\r\n        denied: \"Refusé\",\r\n        error: \"Erreur\",\r\n        aborted:\"Interrompu\"\r\n    },\r\n}\r\n/**\r\n * French translation for Validation Errors\r\n */\r\n export const ValidateErrorFrench: LocalLabels = {\r\n    maxSizeError: (maxSize) => `Le fichier est très volumineux. Le tam. le maximum est de ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `Type de fichier illégal `,\r\n    maxFileCount: (maxFiles) => `Limite de fichiers atteinte (${maxFiles})`\r\n}","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n/**\r\n * English translation for Dropzone component\r\n */\r\nexport const DropzoneEnglish: LocalLabels = {\r\n    defaultLabel: \"Drop your files here\",\r\n    uploadingMessage: (amountOfFiles) => { return `Uploading ${amountOfFiles} files`; },\r\n    uploadFinished: (uploaded, rejected) => `Uploaded files: ${uploaded}, Rejected files: ${rejected}`,\r\n    noFilesMessage: `There is no missing valid file to upload`,\r\n    footer: {\r\n        acceptAll: `All file types accepted`,\r\n        acceptCustom: (accept) => `Allowed types: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"Upload files\",\r\n        maxSizeMessage: (maxFileSize) => `Max file size: ${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `Files ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"File was successfuly uploaded\",\r\n    fakeUploadError: \"Error on uploading. Please try again later.\",\r\n}\r\n\r\n/**\r\n * English translation for FileItem component\r\n */\r\nexport const FileItemEnglish: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `Name: `,\r\n        size: \"Size: \",\r\n        type: \"Type: \"\r\n    },\r\n    status: {\r\n        preparing:\"Preparing\",\r\n        uploading: \"Uploading\",\r\n        success: \"Success\",\r\n        valid: \"Valid\",\r\n        denied: \"Not valid\",\r\n        error: \"Error\",\r\n        aborted:\"Aborted\"\r\n    },\r\n}\r\n\r\n/**\r\n * English translation for Validation Errors\r\n */\r\nexport const ValidateErrorEnglish: LocalLabels = {\r\n    maxSizeError: (maxSize) =>\r\n        `File is too big. Max file size allowed is ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `File type is not allowed`,\r\n    maxFileCount: (maxFiles) =>\r\n        `Max amount of files (${maxFiles}) has been reached`\r\n}","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n/**\r\n * Spanish translation for Dropzone component\r\n */\r\nexport const DropzoneSpanish: LocalLabels = {\r\n    defaultLabel: \"Suelta tus archivos aquí\",\r\n\r\n    uploadingMessage: (amountOfFiles) => { return `Subiendo ${amountOfFiles} archivos`; },\r\n    uploadFinished: (uploaded, rejected) => `Archivos subidos: ${uploaded}, Archivos rechazados: ${rejected}`,\r\n    noFilesMessage: `No hay archivos válidos pendientes por subir`,\r\n    footer: {\r\n        acceptAll: `Todos los tipos de archivo aceptados`,\r\n        acceptCustom: (accept) => `Tipo(s) de archivo permitidos: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"Subir\",\r\n        maxSizeMessage: (maxFileSize) => `Tam. máximo ${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `Archivos ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"El archivo se subió correctamente\",\r\n    fakeUploadError: \"Error al subir el archivo\",\r\n}\r\n\r\n/**\r\n * Spanish translation for FileItem component\r\n */\r\nexport const FileItemSpanish: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `Nombre: `,\r\n        size: \"Tamaño: \",\r\n        type: \"Tipo: \"\r\n    },\r\n    status: {\r\n        preparing:\"Preparando\",\r\n        uploading: \"Subiendo\",\r\n        success: \"Éxito\",\r\n        valid: \"Válido\",\r\n        denied: \"No válido\",\r\n        error: \"Error\",\r\n        aborted: \"Anulado\"\r\n    },\r\n}\r\n/**\r\n * Spanish translation for Validation Errors\r\n */\r\nexport const ValidateErrorSpanish: LocalLabels = {\r\n    maxSizeError: (maxSize) => `El archivo es muy grande. El tam. máximo es ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `Tipo de archivo no permitido`,\r\n    maxFileCount: (maxFiles) => `Cantidad máxima de archivos (${maxFiles}) alcanzada`\r\n}\r\n","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n/**\r\n * Russian translation for Dropzone component\r\n */\r\nexport const DropzoneRussian: LocalLabels = {\r\n    defaultLabel: \"Перетащите сюда свои файлы.\",\r\n    uploadingMessage: (amountOfFiles) => { return `Выгрузка ${amountOfFiles} файлов`; },\r\n    uploadFinished: (uploaded, rejected) => `Загружено файлов: ${uploaded}, отклоненных файлов: ${rejected}`,\r\n    noFilesMessage: `Действительный файл не отсутствует для загрузки`,\r\n    footer: {\r\n        acceptAll: `Принимаются все типы файлов `,\r\n        acceptCustom: (accept) => `Допустимые типы: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"Отправить\",\r\n        maxSizeMessage: (maxFileSize) => `макс размер: ${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `Файлы ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"Файл был успешно загружен\",\r\n    fakeUploadError: \"Ошибка при загрузке\",\r\n}\r\n\r\n/**\r\n * Russian translation for FileItem component\r\n *\r\n */\r\nexport const FileItemRussian: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `Имя: `,\r\n        size: \"Размер: \",\r\n        type: \"Tип: \"\r\n    },\r\n    status: {\r\n        preparing:\"подготовка\",\r\n        uploading: \"Загрузка\",\r\n        success: \"успех\",\r\n        valid: \"годный\",\r\n        denied: \"выкинутый\",\r\n        error: \"ошибка\",\r\n        aborted:\"прерванный\"\r\n    },\r\n}\r\n\r\n/**\r\n * Russian translation for Validation Errors\r\n */\r\nexport const ValidateErrorRussian: LocalLabels = {\r\n    maxSizeError: (maxSize) =>\r\n        `Файл слишком большой. Максимально допустимый размер файла - ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `Тип файла не разрешен`,\r\n    maxFileCount: (maxFiles) =>\r\n        `Достигнуто максимальное количество файлов (${maxFiles})`\r\n}","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n/**\r\n * Portuguese translation for Dropzone\r\n */\r\nexport const DropzonePortuguese: LocalLabels = {\r\n    defaultLabel: \"Solte seus arquivos aqui \",\r\n\r\n    uploadingMessage: (amountOfFiles) => { return `Enviando ${amountOfFiles} arquivos`; },\r\n    uploadFinished: (uploaded, rejected) => `Arquivos enviados: ${uploaded}, Arquivos rejeitados: ${rejected}`,\r\n    noFilesMessage: `Nenhum arquivo válido está faltando para enviar`,\r\n    footer: {\r\n        acceptAll: `Todos os tipos de arquivo são aceitos`,\r\n        acceptCustom: (accept) => `Tipos permitidos: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"Enviar\",\r\n        maxSizeMessage: (maxFileSize) => `Tamanho máximo: ${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `Arquivos ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"O arquivo foi enviado com sucesso\",\r\n    fakeUploadError: \"Erro ao enviar\",\r\n}\r\n\r\n\r\n/**\r\n * Portuguese translation for FileItem component\r\n */\r\nexport const FileItemPortuguese: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `Nome: `,\r\n        size: \"Tamanho: \",\r\n        type: \"Tipo: \"\r\n    },\r\n    status: {\r\n        preparing:\"Preparando\",\r\n        uploading: \"Enviando\",\r\n        success: \"Êxito\",\r\n        valid: \"válido\",\r\n        denied: \"Negado\",\r\n        error: \"Erro\",\r\n        aborted:\"Abortado\"\r\n    },\r\n}\r\n/**\r\n * Portuguese translation for Validation Errors\r\n */\r\n export const ValidateErrorPortuguese: LocalLabels = {\r\n    maxSizeError: (maxSize) => `O arquivo é muito grande. O tamanho máximo de arquivo permitido é ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `O tipo de arquivo não é permitido `,\r\n    maxFileCount: (maxFiles) => `Quantidade máxima de arquivos (${maxFiles}) alcançada`\r\n}","import { LocalLabels } from \"../../types\";\r\nimport { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\n\r\n/**\r\n * English translation for Dropzone component\r\n */\r\nexport const DropzoneSimplifiedChinese: LocalLabels = {\r\n    defaultLabel: \"将您的文件放在这里\",\r\n    uploadingMessage: (amountOfFiles) => { return `上传 ${amountOfFiles} 个文件`; },\r\n    uploadFinished: (uploaded, rejected) => `上传文件:${uploaded},拒绝文件:${rejected}`,\r\n    noFilesMessage: `没有缺少要加载的有效文件`,\r\n    footer: {\r\n        acceptAll: `接受所有文件类型`,\r\n        acceptCustom: (accept) => `允许的类型: ${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"上传文件\",\r\n        maxSizeMessage: (maxFileSize) => `最大文件大小:${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => `文档 ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"文件已成功上传\",\r\n    fakeUploadError: \"上传时出错\",\r\n}\r\n\r\n/**\r\n * Chinnese translation for FileItem component\r\n */\r\nexport const FileItemSimplifiedChinese: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `文档名称: `,\r\n        size: \"尺寸: \",\r\n        type: \"文件类型: \"\r\n    },\r\n    status: {\r\n        preparing:\"预加载\",\r\n        uploading: \"上传\",\r\n        success: \"成功\",\r\n        valid: \"接受的文件\",\r\n        denied: \"被拒绝的文件\",\r\n        error: \"错误\",\r\n        aborted:\"中止\"\r\n    },\r\n}\r\n\r\n/**\r\n * English translation for Validation Errors\r\n */\r\nexport const ValidateErrorSimplifiedChinese: LocalLabels = {\r\n    maxSizeError: (maxSize) =>\r\n        `文件太大。 允许的最大文件大小为 ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `文件类型不允许`,\r\n    maxFileCount: (maxFiles) =>\r\n        `已达到最大文件数 (${maxFiles})`\r\n}","import { fileSizeFormater } from \"../../utils/fileSizeFormatter\";\r\nimport { LocalLabels } from \"../../types\";\r\n\r\n\r\n/**\r\n * English translation for Dropzone component\r\n */\r\nexport const DropzoneTraditionalChinese: LocalLabels = {\r\n    defaultLabel: \"把你的文件放在這裡 \",\r\n    uploadingMessage: (amountOfFiles) => { return `上傳${amountOfFiles}個文件`; },\r\n    uploadFinished: (uploaded, rejected) => `上傳文件: ${uploaded}, 拒絕的文件:${rejected}`,\r\n    noFilesMessage: `沒有缺少要上傳的有效文件`,\r\n    footer: {\r\n        acceptAll: `接受所有文件類型`,\r\n        acceptCustom: (accept) => `允許的類型:${accept}`\r\n    },\r\n    header: {\r\n        uploadFilesMessage: \"上傳文件\",\r\n        maxSizeMessage: (maxFileSize) => `最大文件大小:${maxFileSize}`,\r\n        validFilesMessage: (numberOfValidFiles, maxFiles) => ` 文件 ${numberOfValidFiles}/${maxFiles}`\r\n    },\r\n    fakeuploadsuccess: \"文件已成功上傳\",\r\n    fakeUploadError: \"上傳時出錯\",\r\n}\r\n\r\n/**\r\n * Chinese translation for FileItem component\r\n */\r\nexport const FileItemTraditionalChinese: LocalLabels = {\r\n    fullInfoLayer: {\r\n        name: `文檔名稱: `,\r\n        size: \"文件大小: \",\r\n        type: \"文件類型: \"\r\n    },\r\n    status: {\r\n        preparing: \"預加載\",\r\n        uploading: \"上傳\",\r\n        success: \"成功\",\r\n        valid: \"有效文件\",\r\n        denied: \"無效文件\",\r\n        error: \"錯誤\",\r\n        aborted: \"中止\"\r\n    },\r\n}\r\n\r\n/**\r\n * English translation for Validation Errors\r\n */\r\nexport const ValidateErrorTraditionalChinese: LocalLabels = {\r\n    maxSizeError: (maxSize) =>\r\n        `文件太大。 允許的最大文件大小為 ${fileSizeFormater(maxSize as number)}`,\r\n    acceptError: `文件類型不允許`,\r\n    maxFileCount: (maxFiles) =>\r\n        `已達到最大文件數 (${maxFiles})`\r\n}","import { FileItemRussian } from \"./Russian/localization.russian\";\r\nimport { ComponentLocalizer, LocalLabels, Localization } from \"../types\";\r\nimport { FileItemEnglish } from \"./English/localization.english\";\r\nimport { FileItemFrench } from \"./French/localization.french\";\r\nimport { FileItemPortuguese } from \"./Portuguese/localization.portuguese\";\r\nimport { FileItemSpanish } from \"./Spanish/localization.spanish\";\r\nimport { FileItemSimplifiedChinese } from \"./Chinese-simplified/localization.simplifiedChinese\";\r\nimport { FileItemTraditionalChinese } from \"./Chinese-traditional/localization.traditionalChinese\";\r\nimport { FileItemItalian } from \"./Italian/localization.italian\";\r\n\r\nexport const FileItemLocalizer: ComponentLocalizer = {\r\n    \"ES-es\": FileItemSpanish,\r\n    \"EN-en\": FileItemEnglish,\r\n    \"FR-fr\": FileItemFrench,\r\n    \"IT-it\": FileItemItalian,\r\n    \"PT-pt\": FileItemPortuguese,\r\n    \"RU-ru\": FileItemRussian,\r\n    \"ZH-cn\": FileItemSimplifiedChinese,\r\n    \"ZH-hk\": FileItemTraditionalChinese\r\n}\r\n\r\n/**\r\n * Secure translation through a selector\r\n * @param local the Localization\r\n * @returns a ComponentLocalizer object that contains the translation\r\n */\r\nexport const FileItemLocalizerSelector = (local?: Localization): LocalLabels => {\r\n    switch (local) {\r\n        case \"ES-es\": return FileItemLocalizer[\"ES-es\"];\r\n        case \"EN-en\": return FileItemLocalizer[\"EN-en\"];\r\n        case \"FR-fr\": return FileItemLocalizer[\"FR-fr\"];\r\n        case \"IT-it\": return FileItemLocalizer[\"IT-it\"];\r\n        case \"PT-pt\": return FileItemLocalizer[\"PT-pt\"];\r\n        case \"RU-ru\": return FileItemLocalizer[\"RU-ru\"];\r\n        case \"ZH-cn\": return FileItemLocalizer[\"ZH-cn\"];\r\n        case \"ZH-hk\": return FileItemLocalizer[\"ZH-hk\"];\r\n        default: return FileItemLocalizer[\"EN-en\"];\r\n    }\r\n}","import { DropzoneRussian } from \"./Russian/localization.russian\";\r\nimport { DropzoneEnglish } from \"./English/localization.english\";\r\nimport { DropzoneFrench } from \"./French/localization.french\";\r\nimport { DropzonePortuguese } from \"./Portuguese/localization.portuguese\";\r\nimport { DropzoneSpanish } from \"./Spanish/localization.spanish\";\r\nimport { DropzoneSimplifiedChinese } from \"./Chinese-simplified/localization.simplifiedChinese\";\r\nimport { DropzoneTraditionalChinese } from \"./Chinese-traditional/localization.traditionalChinese\";\r\nimport { DropzoneItalian } from \"./Italian/localization.italian\";\r\nimport { ComponentLocalizer, Localization, LocalLabels } from \"../types\";\r\n\r\nexport const DropzoneLocalizer: ComponentLocalizer = {\r\n    \"ES-es\": DropzoneSpanish,\r\n    \"EN-en\": DropzoneEnglish,\r\n    \"FR-fr\": DropzoneFrench,\r\n    \"IT-it\": DropzoneItalian,\r\n    \"PT-pt\": DropzonePortuguese,\r\n    \"RU-ru\": DropzoneRussian,\r\n    \"ZH-cn\": DropzoneSimplifiedChinese,\r\n    \"ZH-hk\": DropzoneTraditionalChinese\r\n\r\n}\r\n/**\r\n * Secure translation through a selector\r\n * @param local the Localization\r\n * @returns a ComponentLocalizer object that contains the translation\r\n */\r\nexport const DropzoneLocalizerSelector = (local: Localization | undefined): LocalLabels => {\r\n    switch (local) {\r\n        case \"ES-es\": return DropzoneLocalizer[\"ES-es\"];\r\n        case \"EN-en\": return DropzoneLocalizer[\"EN-en\"];\r\n        case \"FR-fr\": return DropzoneLocalizer[\"FR-fr\"];\r\n        case \"IT-it\": return DropzoneLocalizer[\"IT-it\"];\r\n        case \"PT-pt\": return DropzoneLocalizer[\"PT-pt\"];\r\n        case \"RU-ru\": return DropzoneLocalizer[\"RU-ru\"];\r\n        case \"ZH-cn\": return DropzoneLocalizer[\"ZH-cn\"];\r\n        case \"ZH-hk\": return DropzoneLocalizer[\"ZH-hk\"];\r\n        default: return DropzoneLocalizer[\"EN-en\"];\r\n    }\r\n}","import { ValidateErrorRussian } from \"./Russian/localization.russian\";\r\nimport { ComponentLocalizer, LocalLabels, Localization } from \"./../types\";\r\nimport { ValidateErrorEnglish } from \"./English/localization.english\";\r\nimport { ValidateErrorFrench } from \"./French/localization.french\";\r\nimport { ValidateErrorPortuguese } from \"./Portuguese/localization.portuguese\";\r\nimport { ValidateErrorSpanish } from \"./Spanish/localization.spanish\";\r\nimport { ValidateErrorSimplifiedChinese } from \"./Chinese-simplified/localization.simplifiedChinese\";\r\nimport { ValidateErrorTraditionalChinese } from \"./Chinese-traditional/localization.traditionalChinese\";\r\nimport { ValidateErrorItalian } from \"./Italian/localization.italian\";\r\n\r\nexport const ValidateErrorLocalizer: ComponentLocalizer = {\r\n    \"ES-es\": ValidateErrorSpanish,\r\n    \"EN-en\": ValidateErrorEnglish,\r\n    \"FR-fr\": ValidateErrorFrench,\r\n    \"IT-it\": ValidateErrorItalian,\r\n    \"PT-pt\": ValidateErrorPortuguese,\r\n    \"RU-ru\": ValidateErrorRussian,\r\n    \"ZH-cn\": ValidateErrorSimplifiedChinese,\r\n    \"ZH-hk\": ValidateErrorTraditionalChinese,\r\n}\r\n/**\r\n * Secure translation through a selector\r\n * @param local the Localization\r\n * @returns a ComponentLocalizer object that contains the translation\r\n */\r\nexport const ValidateErrorLocalizerSelector = (local: Localization | undefined): LocalLabels => {\r\n    if (!local || ![\"ES-es\", \"EN-en\", \"FR-fr\", \"IT-it\", \"PT-pt\", \"RU-ru\", \"ZH-cn\", \"ZH-hk\"].includes(local)) {\r\n        return ValidateErrorLocalizer[\"EN-en\"];\r\n    }\r\n    return ValidateErrorLocalizer[local];\r\n}","export const sevenzip = \"https://user-images.githubusercontent.com/43678736/132086517-72a51a12-e403-4675-bfd7-22c23affa730.png\";\r\nexport const aac = \"https://user-images.githubusercontent.com/43678736/132086518-7026d4f1-ea16-4ed0-89fd-37c1aa8ac3ed.png\";\r\nexport const abw = \"https://user-images.githubusercontent.com/43678736/132086519-863c63b4-917e-4471-94ff-7e15651cc14b.png\";\r\nexport const accdb = \"https://user-images.githubusercontent.com/43678736/132086520-9bc6aa3b-51c9-4da2-9ef7-349162b86d0b.png\";\r\nexport const avi = \"https://user-images.githubusercontent.com/43678736/132086521-dbd6cf0d-d4d7-4b92-bb26-17e8a51a9383.png\";\r\nexport const azw = \"https://user-images.githubusercontent.com/43678736/132086522-070f48e8-78a8-4294-8dbb-aab81525e164.png\";\r\nexport const bmp = \"https://user-images.githubusercontent.com/43678736/132086595-90ab7f90-f87e-4900-94d9-d0b26745df48.png\";\r\nexport const bz = \"https://user-images.githubusercontent.com/43678736/132086597-e285ad5c-613a-4679-a270-493e5be4ffd9.png\";\r\nexport const bz2 = \"https://user-images.githubusercontent.com/43678736/132086598-623c410a-084a-4395-a448-211b2ff61cfe.png\";\r\nexport const c = \"https://user-images.githubusercontent.com/43678736/132086599-7a5cd692-b4df-45f5-80d9-384cb3e0c314.png\";\r\nexport const cda = \"https://user-images.githubusercontent.com/43678736/132086600-8b70a007-512d-4252-9c66-eabd3ddd6573.png\";\r\nexport const csh = \"https://user-images.githubusercontent.com/43678736/132086601-e62e5d1a-d8a2-4475-a14f-85922cec9272.png\";\r\nexport const css = \"https://user-images.githubusercontent.com/43678736/132086602-4c772934-f608-4f01-8459-c4622cee8ad5.png\";\r\nexport const csv = \"https://user-images.githubusercontent.com/43678736/132086604-b5b019fe-572e-477e-92c2-3769a48a1304.png\";\r\nexport const docx = \"https://user-images.githubusercontent.com/43678736/132086606-715ccb66-4702-4f7d-9b09-ac93ba17b643.png\";\r\nexport const docx2 = \"https://user-images.githubusercontent.com/43678736/132086607-a246b386-52c9-4fe1-a7e4-204894e6722d.png\";\r\nexport const drawio = \"https://user-images.githubusercontent.com/43678736/132086608-bcae9d57-8e54-488c-90c4-4952ae530b5e.png\";\r\nexport const dw = \"https://user-images.githubusercontent.com/43678736/132086616-0c7842d6-d20e-4ede-988b-3dd063a4de8d.png\";\r\nexport const eml = \"https://user-images.githubusercontent.com/43678736/132086617-1e351075-ffaf-4b81-a1fe-0b7b338772a2.png\";\r\nexport const eot = \"https://user-images.githubusercontent.com/43678736/132086618-397d6bd2-9fda-43ed-a135-cb40388c35af.png\";\r\nexport const eps = \"https://user-images.githubusercontent.com/43678736/132086619-9daf0b61-dbb0-4d47-8a12-9fba13b88856.png\";\r\nexport const epub = \"https://user-images.githubusercontent.com/43678736/132086620-2586ba40-c583-4589-b1a4-8bb5b258b44d.png\";\r\nexport const freearc = \"https://user-images.githubusercontent.com/43678736/132086621-3b95fb64-2533-4ccc-abcd-bd2beba572e9.png\";\r\nexport const gif = \"https://user-images.githubusercontent.com/43678736/132086622-af705a0c-2b25-4ba7-8ab6-bd69ec97f7e2.png\";\r\nexport const gzip = \"https://user-images.githubusercontent.com/43678736/132086624-89141a46-64e4-4fa0-bf69-54a0eb4d48c9.png\";\r\nexport const html = \"https://user-images.githubusercontent.com/43678736/132086625-1b8f2652-1de0-4475-8c12-7da4a9973ffb.png\";\r\nexport const icalendar = \"https://user-images.githubusercontent.com/43678736/132086626-38699705-1e6f-4bca-984b-03167b236faa.png\";\r\nexport const ind = \"https://user-images.githubusercontent.com/43678736/132086627-2f24067a-00bc-424a-af36-349a9ba14b6c.png\";\r\nexport const ini = \"https://user-images.githubusercontent.com/43678736/132086649-20c9c9e6-8e63-4d87-9b8e-8fe8eba12ada.png\";\r\nexport const java = \"https://user-images.githubusercontent.com/43678736/132086650-f1166246-b361-4c30-a04e-9781c555d14a.png\";\r\nexport const jar = \"https://user-images.githubusercontent.com/43678736/132086650-f1166246-b361-4c30-a04e-9781c555d14a.png\";\r\nexport const javascript = \"https://user-images.githubusercontent.com/43678736/132086652-4562942e-aaea-466c-968f-380fffabf3f9.png\";\r\nexport const jpeg = \"https://user-images.githubusercontent.com/43678736/132086653-0487e7e2-1ee3-49e2-8cfe-3e20f1f7490a.png\";\r\nexport const jsf = \"https://user-images.githubusercontent.com/43678736/132086654-c510bd8f-8de7-4afe-8c20-cc810b004b07.png\";\r\nexport const json = \"https://user-images.githubusercontent.com/43678736/132086656-6e96c815-e4e2-4ffd-9d71-57e9cc2450bc.png\";\r\nexport const jsonld = \"https://user-images.githubusercontent.com/43678736/132086658-5d27d3c2-394f-43fb-b512-9b414a257875.png\";\r\nexport const midi = \"https://user-images.githubusercontent.com/43678736/132086659-98f3ef6e-b9f3-4b6d-b18f-469b5334ba27.png\";\r\nexport const mov = \"https://user-images.githubusercontent.com/43678736/132086660-adcecedd-56b4-4286-8b0f-69417f77e961.png\";\r\nexport const mp3 = \"https://user-images.githubusercontent.com/43678736/132086661-a5484553-06c7-4ffa-a8f9-96b57b1b0344.png\";\r\nexport const mp4 = \"https://user-images.githubusercontent.com/43678736/132086662-05ad1597-d5e5-4efa-833e-2876e966a745.png\";\r\nexport const mpeg = \"https://user-images.githubusercontent.com/43678736/132086663-90c58955-f7fb-4bdb-ac53-92667d16d4a3.png\";\r\nexport const mpkg = \"https://user-images.githubusercontent.com/43678736/132086664-9a7530e7-6d78-4ef3-a176-20cf7f57b555.png\";\r\nexport const octet = \"https://user-images.githubusercontent.com/43678736/132086666-ab3c505d-b2c0-4177-9a06-aed5d9c39ee4.png\";\r\nexport const odp = \"https://user-images.githubusercontent.com/43678736/132086667-6c7dcbcc-8d83-41a2-8e0a-85b09e2791ae.png\";\r\nexport const ods = \"https://user-images.githubusercontent.com/43678736/132086668-9f246e91-cf2e-49cf-9617-e1fbb71abbbb.png\";\r\nexport const odt = \"https://user-images.githubusercontent.com/43678736/132086669-46113762-84d1-4b32-9441-b0138ce17a5d.png\";\r\nexport const oga = \"https://user-images.githubusercontent.com/43678736/145835364-2054509d-3448-4d34-921f-73dd6e297fc7.png\";\r\nexport const ogv = \"https://user-images.githubusercontent.com/43678736/145835367-19172bf8-cd5a-4cbe-b512-d0de1d91f269.png\";\r\nexport const ogx = \"https://user-images.githubusercontent.com/43678736/145835373-a57ef0f5-3968-483b-9f55-6d67e7f1dcea.png\";\r\nexport const opus = \"https://user-images.githubusercontent.com/43678736/132086670-0f96e770-cedc-4635-a5f9-cf97894c1d7a.png\";\r\nexport const otf = \"https://user-images.githubusercontent.com/43678736/132086671-02ad35ef-ec3a-4a65-abd5-5bf794dfcf7b.png\";\r\nexport const pdf = \"https://user-images.githubusercontent.com/43678736/132086672-3a856fda-823d-4997-b802-c7c640e6ef44.png\";\r\nexport const php = \"https://user-images.githubusercontent.com/43678736/132086673-0c4409ab-754e-4619-8cfa-179d0ccf1bd9.png\";\r\nexport const png = \"https://user-images.githubusercontent.com/43678736/132086674-fdb56d02-5845-49b7-8462-6357bc963464.png\";\r\nexport const pptx = \"https://user-images.githubusercontent.com/43678736/132086675-c879645d-acb4-41a6-ab3c-4e6c2048badb.png\";\r\nexport const pptx2 = \"https://user-images.githubusercontent.com/43678736/132086676-6de1bbd7-764f-4197-9aa4-405a60ce6734.png\";\r\nexport const proj = \"https://user-images.githubusercontent.com/43678736/132086683-3dc0a8b8-72f8-4fa1-a08a-fcfd75b465e1.png\";\r\nexport const psd = \"https://user-images.githubusercontent.com/43678736/132086685-4e327c4c-a409-4b83-b36a-8d88936b314b.png\";\r\nexport const pst = \"https://user-images.githubusercontent.com/43678736/132086686-3888e43a-5abf-41f7-9940-4b86e436521f.png\";\r\nexport const publisher = \"https://user-images.githubusercontent.com/43678736/132086687-d92b56ff-f7f7-4be7-bbf4-47b8a33f4c6f.png\";\r\nexport const python = \"https://user-images.githubusercontent.com/43678736/132086688-8e82fae4-3a9b-49c0-bf99-77189525514c.png\";\r\nexport const tar = \"https://user-images.githubusercontent.com/43678736/132086689-fe1fef9f-d2db-455b-8f4b-09acd095f571.png\";\r\nexport const rar = \"https://user-images.githubusercontent.com/43678736/132086689-fe1fef9f-d2db-455b-8f4b-09acd095f571.png\";\r\nexport const react = \"https://user-images.githubusercontent.com/43678736/132086691-d472576b-ec6a-4332-acd2-dd6a00b72952.png\";\r\nexport const richtextformat = \"https://user-images.githubusercontent.com/43678736/132086692-df6e3518-2e6a-4553-883d-e21694980449.png\";\r\nexport const rtf = \"https://user-images.githubusercontent.com/43678736/132086693-9d43571e-0c86-438f-b247-e2cb42e19e06.png\";\r\nexport const sass = \"https://user-images.githubusercontent.com/43678736/132086694-4e661d6a-1118-441e-8bc3-c52fcb2133b6.png\";\r\nexport const settings = \"https://user-images.githubusercontent.com/43678736/132086696-0dd21f83-b9fc-490c-9ed5-bd88151dc9bb.png\";\r\nexport const sh = \"https://user-images.githubusercontent.com/43678736/132086697-1d82d724-35b6-4f06-847a-3c59a5deda6e.png\";\r\nexport const swf = \"https://user-images.githubusercontent.com/43678736/132086698-19384230-dbd7-4e05-bc69-ef4537b6aae3.png\";\r\nexport const text = \"https://user-images.githubusercontent.com/43678736/132086699-5993a482-04f4-4915-b105-9037f527cf61.png\";\r\nexport const tiff = \"https://user-images.githubusercontent.com/43678736/132086700-c23461c8-6819-46e1-aecd-0a1f8d3507bb.png\";\r\nexport const ttf = \"https://user-images.githubusercontent.com/43678736/132086701-c8044c09-8d95-4af1-9410-66761001d7da.png\";\r\nexport const typescript = \"https://user-images.githubusercontent.com/43678736/132086702-59294337-ed99-4302-badd-316b2c1ff62f.png\";\r\nexport const url = \"https://user-images.githubusercontent.com/43678736/132086703-86d97476-b76e-4949-b89a-31ecb03f3b6e.png\";\r\nexport const vsd = \"https://user-images.githubusercontent.com/43678736/132086704-8fd51e7c-afa2-47a3-ab2f-d0bcd0ecae9f.png\";\r\nexport const vue = \"https://user-images.githubusercontent.com/43678736/132086705-33294da1-5c0f-49f7-b890-e4857cec0a6d.png\";\r\nexport const wav = \"https://user-images.githubusercontent.com/43678736/132086706-22f805d0-39d4-494b-824e-47dc75d05eb7.png\";\r\nexport const webm = \"https://user-images.githubusercontent.com/43678736/132086707-e61a84de-d396-4dbf-8d1b-1d6ee19e1ac8.png\";\r\nexport const weba = \"https://user-images.githubusercontent.com/43678736/132086707-e61a84de-d396-4dbf-8d1b-1d6ee19e1ac8.png\";\r\nexport const webp = \"https://user-images.githubusercontent.com/43678736/132086708-21d096dd-7148-40aa-97f1-cbb099339740.png\";\r\nexport const wma = \"https://user-images.githubusercontent.com/43678736/132086709-811d4e90-3cfa-4044-a956-aeda9c67fc92.png\";\r\nexport const wmv = \"https://user-images.githubusercontent.com/43678736/132086710-c5479c6c-0249-4542-adad-48b0ef40b775.png\";\r\nexport const woff = \"https://user-images.githubusercontent.com/43678736/132086711-1524a3e7-3e33-4822-a34f-ff3235404045.png\";\r\nexport const xlsx = \"https://user-images.githubusercontent.com/43678736/132086712-17e2c491-f6e4-4586-aef6-06bcc5f4b0e5.png\";\r\nexport const xlsx2 = \"https://user-images.githubusercontent.com/43678736/132086714-7ddf285d-2b83-4115-80a5-f02f510300a1.png\";\r\nexport const xml = \"https://user-images.githubusercontent.com/43678736/132086715-204b5a8b-9c5a-4bac-8294-9237ebc16089.png\";\r\nexport const xul = \"https://user-images.githubusercontent.com/43678736/132086716-64511d20-58cb-45a8-85df-f4d9408b469d.png\";\r\nexport const zip = \"https://user-images.githubusercontent.com/43678736/132086718-a8499333-6282-4820-aa1f-4d133eb54648.png\";\r\n","/**\r\n * Looks for the first file extension\r\n * @param fileName file name\r\n * @returns the file name extension\r\n */\r\n export const getExt = (fileName: string): string => {\r\n    const re = /(?:\\.([^.]+))?$/;\r\n    const result = re.exec(fileName);\r\n    if (result) {\r\n        return result[1];\r\n    } else {\r\n        return \"\";\r\n    }\r\n\r\n};","import {\r\n    aac, abw, accdb, avi, azw,\r\n    bmp, bz, bz2, cda,\r\n    csh, css, csv,\r\n    docx, drawio,\r\n    eot, epub,\r\n    freearc, gif, gzip,\r\n    html, icalendar,\r\n    jar, java, javascript, jpeg, json, jsonld,\r\n    midi, mp3, mp4, mpeg, mpkg,\r\n    octet, odp, ods, odt, oga, ogv, ogx, opus, otf,\r\n    pdf, php, png, pptx, psd, python,\r\n    rar, react, rtf,\r\n    sass, sevenzip, sh, swf,\r\n    tar, text, tiff, ttf, typescript,\r\n    vsd, vue,\r\n    wav, weba, webm, webp, wma, wmv, woff,\r\n    xlsx, xml, xul,\r\n    zip\r\n} from \"./icons\";\r\nimport { getExt } from \"../utils/getExt\";\r\nimport { IconsMap } from \"../types\";\r\n\r\nconst DEF_GEN_MIME: keyof IconsMap = \"octet\";\r\n/**\r\n * \r\n * @param tailMime \r\n * @returns \r\n */\r\nexport const audioSelector = (tailMime: string): keyof IconsMap => {\r\n    switch (tailMime) {\r\n        case \"aac\": return \"aac\";\r\n        case \"midi\": return \"midi\";\r\n        case \"x-midi\": return \"midi\";\r\n        case \"mpeg\": return \"mpeg\";//mp3\r\n        case \"ogg\": return \"oga\";\r\n        case \"opus\": return \"opus\";\r\n        case \"wav\": return \"wav\";\r\n        case \"webm\": return \"webm\";\r\n        //case \"3gpp\": return \"threegp\";\r\n        //case \"3gpp2\": return \"threegp\";\r\n        //case \"mp3\": return \"mp3\";\r\n        case \"wma\": return \"wma\";\r\n        default: return DEF_GEN_MIME;\r\n    }\r\n}\r\nexport const textSelector = (tailMime: string): keyof IconsMap => {\r\n    switch (tailMime) {\r\n        case \"css\": return \"css\";\r\n        case \"csv\": return \"csv\";\r\n        case \"html\": return \"html\";\r\n        case \"calendar\": return \"icalendar\";\r\n        case \"javascript\": return \"javascript\";\r\n        case \"x-javascript\": return \"javascript\";\r\n        case \"plain\": return \"text\";\r\n        case \"xml\": return \"xml\";\r\n        default: return DEF_GEN_MIME;\r\n\r\n    }\r\n}\r\nexport const imageSelector = (tailMime: string): keyof IconsMap => {\r\n    switch (tailMime) {\r\n        case \"bmp\": return \"bmp\";\r\n        case \"gif\": return \"gif\";\r\n        // case \"vnd.microsoft.icon\": return \"ico\";\r\n        //case \"ico\": return \"ico\";\r\n        case \"jpg\": return \"jpeg\";\r\n        case \"jpeg\": return \"jpeg\";\r\n        case \"png\": return \"png\";\r\n        //case \"svg+xml\": return \"svg\";\r\n        //case \"svg\": return \"svg\";\r\n        case \"tiff\": return \"tiff\";\r\n        case \"webp\": return \"webp\";\r\n        default: return DEF_GEN_MIME;\r\n\r\n    }\r\n}\r\nexport const fontSelector = (tailMime: string): keyof IconsMap => {\r\n    switch (tailMime) {\r\n        case \"otf\": return \"otf\";\r\n        case \"ttf\": return \"ttf\";\r\n        case \"woff\": return \"woff\";\r\n        case \"woff2\": return \"woff\";\r\n        default: return DEF_GEN_MIME;\r\n\r\n    }\r\n}\r\n\r\nexport const videoSelector = (tailMime: string): keyof IconsMap => {\r\n    switch (tailMime) {\r\n        case \"x-msvideo\": return \"avi\";\r\n        case \"msvideo\": return \"avi\";\r\n        case \"avi\": return \"avi\";\r\n        case \"mp4\": return \"mp4\";\r\n        case \"mpeg\": return \"mpeg\";\r\n        case \"ogg\": return \"ogv\";\r\n        case \"mp2t\": return \"mp2t\";\r\n        case \"wmv\": return \"wmv\";\r\n\r\n        case \"webm\": return \"webm\";\r\n        // case \"3gpp\": return \"threegp\";\r\n        // case \"3gpp2\": return \"threegp2\";\r\n\r\n        default: return DEF_GEN_MIME;\r\n    }\r\n}\r\n/**\r\n * \r\n * @param tailMime \r\n * @returns \r\n */\r\nexport const applicationSelector = (tailMime: string): keyof IconsMap => {\r\n    switch (tailMime) {\r\n        case \"x-abiword\": return \"abw\";\r\n        case \"abiword\": return \"abw\";\r\n        case \"x-freearc\": return \"arc\";\r\n        case \"freearc\": return \"arc\";\r\n        case \"vnd.amazon.ebook\": return \"azw\";\r\n        case \"octet-stream\": return \"octet\";\r\n        case \"x-bzip\": return \"bz\";\r\n        case \"x-bzip2\": return \"bz2\";\r\n        case \"bzip\": return \"bz\";\r\n        case \"bzip2\": return \"bz2\";\r\n        case \"x-cdf\": return \"cda\";\r\n        case \"msaccess\": return \"accdb\";\r\n        case \"csh\": return \"csh\";\r\n        case \"x-csh\": return \"csh\";\r\n        case \"vnd.ms-fontobject\": return \"eot\";\r\n        case \"epub+zip\": return \"epub\";\r\n        case \"gzip\": return \"gzip\";\r\n        case \"java-archive\": return \"jar\";\r\n        case \"x-javascript\": return \"javascript\";\r\n        case \"json\": return \"json\";\r\n        case \"ld+json\": return \"jsonld\";\r\n        case \"vnd.apple.installer+xml\": return \"mpkg\";\r\n        case \"ogg\": return \"ogx\";\r\n        case \"vnd.rar\": return \"rar\";\r\n        case \"rtf\": return \"rtf\";\r\n        case \"x-sh\": return \"sh\";\r\n        case \"sh\": return \"sh\";\r\n        case \"x-shockwave-flash\": return \"swf\";\r\n        case \"x-tar\": return \"tar\";\r\n        case \"x-httpd-php\": return \"php\";\r\n        case \"vnd.visio\": return \"vsd\";\r\n        case \"xhtml+xml\": return \"xhtml\";\r\n        case \"xml\": return \"xml\";\r\n        case \"vnd.mozilla.xul+xml\": return \"xul\";\r\n        case \"vnd.openxmlformats-officedocument.wordprocessingml.document\": return \"docx\";\r\n        case \"msword\": return \"docx\";\r\n        case \"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": return \"xlsx\";\r\n        case \"vnd.openxmlformats-officedocument.presentationml.presentation\": return \"pptx\";\r\n        case \"vnd.ms-powerpoint\": return \"pptx\";\r\n        case \"vnd.oasis.opendocument.presentation\": return \"odp\";\r\n        case \"vnd.oasis.opendocument.text\": return \"odt\";\r\n        case \"vnd.oasis.opendocument.spreadsheet\": return \"ods\";\r\n        case \"zip\": return \"zip\";\r\n        case \"x-zip-compressed\": return \"zip\";\r\n        case \"pdf\": return \"pdf\";\r\n        default: return DEF_GEN_MIME;\r\n    }\r\n}\r\n/**\r\n * Selects to wich mime type the mime type given belongs to\r\n * @param mimeType mime type to be searched \r\n * @returns the generic type, \r\nif not found it return \"octet\" that means generic binary file\r\n */\r\nexport const mimeSelector = (mimeType?: string): keyof IconsMap => {\r\n    // let genericMime: string | undefined = undefined;\r\n    if (!mimeType || !mimeType.includes(\"/\")) {\r\n        return DEF_GEN_MIME;\r\n    }\r\n    let headerMime = mimeType.split(\"/\")[0];\r\n    let tailMime = mimeType.split(\"/\")[1];\r\n    /**\r\n     * Every mimetype that \r\n     * starts with: \"application/....\"\r\n     */\r\n\r\n    switch (headerMime) {\r\n        case \"application\": return applicationSelector(tailMime);\r\n        case \"audio\": return audioSelector(tailMime);\r\n        case \"video\": return videoSelector(tailMime);\r\n        case \"text\": return textSelector(tailMime);\r\n        case \"image\": return imageSelector(tailMime);\r\n        case \"font\": return fontSelector(tailMime);\r\n\r\n        default: return DEF_GEN_MIME;\r\n    }\r\n}\r\n/**\r\n * Selects to wich mapped extension\r\n * the given exension belongs to\r\n * \r\n * @param extension \r\n * @returns \r\n */\r\nexport const extensionSelector = (extension?: string): keyof IconsMap => {\r\n    let genericMime: keyof IconsMap = \"octet\";\r\n\r\n    if (extension && extension !== \"\") {\r\n        if (extension.includes(\"zip\") || extension.includes(\"rar\")) {\r\n            genericMime = \"zip\";\r\n        } else if (extension.includes(\"doc\")) {\r\n            genericMime = \"docx\";\r\n        } else if (extension.includes(\"xls\")) {\r\n            genericMime = \"xlsx\";\r\n        } else if (extension.includes(\"drawio\")) {\r\n            genericMime = \"drawio\";\r\n        } else if (extension.includes(\"psd\")) {\r\n            genericMime = \"psd\";\r\n        } else if (extension.includes(\"csv\")) {\r\n            genericMime = \"csv\";\r\n        } else if (extension === \"jsx\") {\r\n            genericMime = \"react\";\r\n        } else if (extension === \"py\") {\r\n            genericMime = \"python\";\r\n        } else if (extension === \"vue\") {\r\n            genericMime = \"vue\";\r\n        } else if (extension === \"java\") {\r\n            genericMime = \"java\";\r\n        } else if (extension === \"ts\") {\r\n            genericMime = \"typescript\";\r\n        } else if (extension === \"sass\" || extension === \"scss\") {\r\n            genericMime = \"sass\";\r\n        }\r\n    }\r\n    return genericMime;\r\n\r\n}\r\n/**\r\n * Chack for extention whether the file is code os not\r\n * @param extension \r\n * @returns \r\n */\r\nexport const checkIsCode = (extension?: string): keyof IconsMap => {\r\n    let genericMime: keyof IconsMap = \"text\";\r\n    if (extension && extension !== \"\") {\r\n        if (extension === \"jsx\") {\r\n            genericMime = \"react\";\r\n        } else if (extension === \"py\") {\r\n            genericMime = \"python\";\r\n        } else if (extension === \"vue\") {\r\n            genericMime = \"vue\";\r\n        } else if (extension === \"java\") {\r\n            genericMime = \"java\";\r\n        } else if (extension === \"ts\" || extension === \"tsx\") {\r\n            genericMime = \"typescript\";\r\n        } else if (extension === \"js\") {\r\n            genericMime = \"javascript\";\r\n        } else if (extension === \"xml\") {\r\n            genericMime = \"xml\";\r\n        } else if (extension === \"php\") {\r\n            genericMime = \"php\";\r\n        }\r\n    }\r\n    return genericMime;\r\n}\r\n\r\n/**\r\n * Looks for a suitable file icon\r\n * If not found, returns octet-stream url\r\n * @param props mime and extension from file to search\r\n * @returns the result file ico\r\n */\r\nexport const getURLFileIco = (\r\n    file: File | undefined,\r\n    customIcons: IconsMap | undefined\r\n): ResultFileIco => {\r\n\r\n    let result: keyof IconsMap = \"fallBack\";\r\n    //if not file, return octet\r\n    if (!file) {\r\n        result = DEF_GEN_MIME;\r\n        if (customIcons?.fallBack)\r\n            return { url: customIcons?.fallBack, mimeResume: result };\r\n\r\n        return { url: mimeUrlList[result], mimeResume: result };\r\n    } else {\r\n        result = mimeSelector(file.type);\r\n    }\r\n    //If plain text\r\n    const extention: string = getExt(file.name);\r\n\r\n    if (result === \"text\") {\r\n        result = checkIsCode(extention);\r\n\r\n    }\r\n    //If octet stream result, second chance: file extention\r\n    if (result === DEF_GEN_MIME) {\r\n        result = extensionSelector(extention);\r\n    }\r\n\r\n    const customUrl = customIcons?.[result];\r\n    if (customUrl !== undefined)\r\n        return { url: customUrl, mimeResume: result };\r\n\r\n\r\n    return { url: mimeUrlList[result], mimeResume: result };\r\n}\r\n/**\r\n * Looks for a suitable file icon\r\n * @param props mime and extension from file to search\r\n * @returns the result file ico, if not found, turns octet-stream url\r\n */\r\nexport const getURLFileIcoFromNameAndType = (\r\n    name: string | undefined,\r\n    type: string | undefined,\r\n    customIcons: IconsMap | undefined\r\n): ResultFileIco => {\r\n\r\n    let result: keyof IconsMap = \"octet\";\r\n    //if not nam and type, return octet\r\n    if (!name) {\r\n        result = DEF_GEN_MIME;\r\n        if (customIcons?.fallBack)\r\n            return { url: customIcons?.fallBack, mimeResume: result };\r\n        return { url: mimeUrlList[result], mimeResume: result };\r\n    } else {\r\n        result = mimeSelector(type);\r\n    }\r\n    //If plain text\r\n    const extention: string = getExt(name);\r\n\r\n    if (result === \"text\") {\r\n        result = checkIsCode(extention);\r\n\r\n    }\r\n    //If octet stream result, second chance: file extention\r\n    if (result === DEF_GEN_MIME) {\r\n        result = extensionSelector(extention);\r\n    }\r\n    const customUrl = customIcons?.[result];\r\n    if (customUrl !== undefined)\r\n        return { url: customUrl, mimeResume: result };\r\n\r\n    return { url: mimeUrlList[result], mimeResume: result };\r\n}\r\ninterface ResultFileIco {\r\n    url: string;\r\n    mimeResume: keyof IconsMap;\r\n}\r\n/**\r\n * set of registered mimes on MDN\r\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types\r\n * \r\n */\r\ninterface MimeSelector {\r\n    [mime: string]: string;\r\n}\r\n\r\nconst mimeUrlList: MimeSelector = {\r\n    aac: aac,\r\n    accdb: accdb,\r\n    abw: abw,\r\n    arc: freearc,\r\n    avi: avi,\r\n    azw: azw,\r\n    octet: octet,\r\n    bmp: bmp,\r\n    bz: bz,\r\n    bz2: bz2,\r\n    cda: cda,\r\n    csh: csh,\r\n    css: css,\r\n    csv: csv,\r\n    docx: docx,\r\n    drawio: drawio,\r\n    eot: eot,\r\n    epub: epub,\r\n    gzip: gzip,\r\n    gif: gif,\r\n    html: html,\r\n    //ico: ico,\r\n    icalendar: icalendar,\r\n    jar: jar,\r\n    jpeg: jpeg,\r\n    javascript: javascript,\r\n    json: json,\r\n    jsonld: jsonld,\r\n    midi: midi,\r\n    //  js: js,\r\n    mp3: mp3,\r\n    mp4: mp4,\r\n    mpeg: mpeg,\r\n    mpkg: mpkg,\r\n    mp2t: octet,\r\n    odp: odp,\r\n    ods: ods,\r\n    odt: odt,\r\n    oga: oga,\r\n    ogv: ogv,\r\n    ogx: ogx,\r\n    opus: opus,\r\n    otf: otf,\r\n    png: png,\r\n    pdf: pdf,\r\n    php: php,\r\n    pptx: pptx,\r\n    psd: psd,\r\n    rar: rar,\r\n    rtf: rtf,\r\n    sass: sass,\r\n    sh: sh,\r\n    //svg: svg,\r\n    swf: swf,\r\n    tar: tar,\r\n    tiff: tiff,\r\n    ttf: ttf,\r\n    //ts: ts,\r\n    typescript: typescript,\r\n    text: text,\r\n    vsd: vsd,\r\n    wav: wav,\r\n    weba: weba,\r\n    webm: webm,\r\n    webp: webp,\r\n    woff: woff,\r\n    wma: wma,\r\n    wmv: wmv,\r\n    xhtml: html,\r\n    xlsx: xlsx,\r\n    xml: xml,\r\n    xul: xul,\r\n    zip: zip,\r\n    // threegp: threegp,\r\n    sevenzip: sevenzip,\r\n    python: python,\r\n    java: java,\r\n    react: react,\r\n    vue: vue,\r\n\r\n\r\n    fallBack: octet,\r\n};","\r\nimport { UPLOADSTATUS, ServerResponse } from \"../types\";\r\n\r\n/**\r\n * ExtFile === \"Extended File\".\r\n * This object \"extends\" the File Object\r\n */\r\nexport declare type ExtFile = {\r\n    /** \r\n     * An identifier for the extFile\r\n     */\r\n    id?: number | string | undefined;\r\n    /**\r\n     * The file object. Used mostly when user selects or drops files in the client sid.\r\n     */\r\n    file?: File;\r\n    /**\r\n     * The name of the file. Used mostly for displaying file data from server.\r\n     */\r\n    name?: string;\r\n    /**\r\n     * The type of the file. Used mostly for displaying file data from server.\r\n     */\r\n    type?: string;\r\n    /**\r\n     * The size of the file. Used mostly for displaying file data from server.\r\n     */\r\n    size?: number;\r\n    /**\r\n     * a flag that determines whether the file is valid, not valid or it is not validated.\r\n     */\r\n    valid?: boolean;\r\n    /**\r\n     * The list of errors when the file was validated\r\n     */\r\n    errors?: string[];\r\n    /**\r\n     * The current upload status. (e.g. \"uploading\")\r\n     */\r\n    uploadStatus?: UPLOADSTATUS | undefined;\r\n    /**\r\n     * A message that shows the result of the upload process\r\n     */\r\n    uploadMessage?: string;\r\n    /**\r\n     * Link, URI or string representation of an image\r\n     */\r\n    imageUrl?: string;\r\n    /**\r\n     * The XMLHttpRequest object for performing uploads to a server\r\n     */\r\n    xhr?: XMLHttpRequest;\r\n    /**\r\n     * The current percentage of upload progress.\r\n     * This value will have a higher priority over the upload progress value calculated inside the component.\r\n     * @default undefined\r\n     */\r\n    progress?: number;\r\n    /**\r\n     * The additional data that will be sent to the server\r\n     * when files are uploaded individually\r\n     */\r\n    extraUploadData?: Record<string, any>;\r\n    /**\r\n     * Any kind of extra data that could be needed.\r\n     */\r\n    extraData?: Object;\r\n    /**\r\n     * The upload response from server\r\n     */\r\n    serverResponse?: ServerResponse;\r\n    /**\r\n     * The url to be used to perform a GET request in order to download the\r\n        file. If defined, the download icon will be shown.\r\n     */\r\n    downloadUrl?: string;\r\n    /**\r\n     * Link, URI, FIle object or string representation of a video\r\n     */\r\n    videoUrl?: string;\r\n}\r\n\r\n/**\r\n * A class definition for ExtFile.\r\n * This class has the purpose to allow the creation of instances\r\n * of an ExtFile for performing complex operations that cannot be\r\n * accomplished just by using the ExtFile type.\r\n * For instance, it can help in changing the value of some attributes\r\n * across different scopes thanks to memory reference.\r\n */\r\nexport class ExtFileInstance {\r\n    /**\r\n     * An identifier for the extFile\r\n     */\r\n    public id?: number | string;\r\n    /**\r\n     * The file object. Used mostly when user selects or drops files in the client sid.\r\n     */\r\n    public file?: File;\r\n    /**\r\n     * The name of the file. Used mostly for displaying file data from server.\r\n     */\r\n    public name?: string;\r\n    /**\r\n     * The type of the file. Used mostly for displaying file data from server.\r\n     */\r\n    public type?: string;\r\n    /**\r\n     * The size of the file. Used mostly for displaying file data from server.\r\n     */\r\n    public size?: number;\r\n\r\n    public imageUrl?: string;\r\n    /**\r\n     * A flag that determines whether the file is valid, not valid or it is not validated.\r\n     */\r\n    public valid?: boolean;\r\n    /**\r\n     * The list of errors when the file was validated\r\n     */\r\n    public errors?: string[];\r\n    /**\r\n     * A message that shows the result of the upload process\r\n     */\r\n    public uploadMessage?: string;\r\n    /**\r\n     * The current upload status. (e.g. \"uploading\")\r\n     */\r\n    public uploadStatus?: UPLOADSTATUS | undefined;\r\n    /**\r\n     * The current upload progress\r\n     */\r\n    public progress?: number;\r\n    /**\r\n     * The XMLHttpRequest object for performing uploads to a server\r\n     */\r\n    public xhr?: XMLHttpRequest;\r\n    /**\r\n     * The additional data that will be sent to the server\r\n     */\r\n    public extraData?: Record<string, any>;\r\n    /**\r\n     * The additional data that will be sent to the server\r\n     * when filesare uploaded individually\r\n     */\r\n    public extraUploadData?: Record<string, any>;\r\n    /**\r\n     * The upload response from server\r\n     */\r\n    public serverResponse?: ServerResponse;\r\n    /**\r\n     * Url to perform a GET request in order to download the file.\r\n     * This  action is triggered when download button is clicked or pressed.\r\n     * In case onDownload prop is given\r\n     */\r\n    public downloadUrl?: string;\r\n    /**\r\n     * Link, URI, FIle object or string representation of a video\r\n     */\r\n    public videoUrl?: string;\r\n\r\n    constructor(extFile: ExtFile) {\r\n        const {\r\n            id,\r\n            file,\r\n            name,\r\n            size,\r\n            type,\r\n            imageUrl,\r\n            valid,\r\n            errors,\r\n            uploadMessage,\r\n            uploadStatus,\r\n            progress,\r\n            xhr,\r\n            extraData,\r\n            extraUploadData,\r\n            serverResponse,\r\n            downloadUrl, videoUrl\r\n        } = extFile;\r\n\r\n        this.id = id;\r\n        this.file = file;\r\n        this.name = name;\r\n        this.size = size;\r\n        this.type = type;\r\n        this.imageUrl = imageUrl;\r\n\r\n        this.valid = valid;\r\n        this.errors = errors;\r\n        this.uploadStatus = uploadStatus;\r\n        this.uploadMessage = uploadMessage;\r\n        this.progress = progress;\r\n        this.xhr = xhr;\r\n\r\n        this.extraData = extraData;\r\n        this.extraUploadData = extraUploadData;\r\n        this.serverResponse = serverResponse;\r\n\r\n        this.downloadUrl = downloadUrl;\r\n        this.videoUrl = videoUrl;\r\n    }\r\n    /**\r\n     * method under construction\r\n     */\r\n    /*  private static kamuiFile() {\r\n \r\n     }\r\n  */\r\n    /**\r\n     * Copies all non undefined attributes from ExtFileInstance to a new ExtFile object\r\n     * @param extFileInstance the instance of ExtFile\r\n     * @returns an ExtFile object\r\n     */\r\n    static toExtFile(extFileInstance: ExtFileInstance): ExtFile {\r\n        //console.log(\"before toExtFile()\", extFileInstance);\r\n\r\n        let extFileClone: ExtFile = {}; // the new empty object\r\n        const extFileInstanceKeys = Object.keys(extFileInstance) as [keyof ExtFile];\r\n        const extFileInstanceValues = Object.values(extFileInstance) as Array<ExtFile[keyof ExtFile]>;\r\n        // let's copy all user properties into it\r\n        for (let i = 0; i < extFileInstanceValues.length; i++) {\r\n            const currentValue: ExtFile[keyof ExtFile] = extFileInstanceValues[i];\r\n\r\n\r\n            const currKey = extFileInstanceKeys[i];\r\n            if (currentValue !== undefined) {\r\n\r\n                extFileClone[currKey] = currentValue as ExtFile[keyof ExtFile] as never;\r\n            }\r\n        }\r\n        //console.log(\"after toExtFile()\", extFileClone);\r\n        //console.log(\"current extFileClone keys\",Object.keys( extFileClone).length);\r\n        return extFileClone;\r\n    }\r\n    /**\r\n     * Copies all non undefined attributes from ExtFileInstance to a new ExtFile object.\r\n     * @returns an ExtFile object\r\n     */\r\n    toExtFile(): ExtFile {\r\n        return ExtFileInstance.toExtFile(this);\r\n    }\r\n\r\n  /*   static mock = (id?: number): ExtFileInstance => {\r\n        return new ExtFileInstance(\r\n            extFileMock(id)\r\n        );\r\n    } */\r\n}\r\n\r\n\r\n","import { ExtFileInstance, ExtFile } from \"./ExtFile\";\r\n\r\nexport class ExtFileManager {\r\n    private static nextId: number = 0;\r\n    static fileLists: Record<number | string, ExtFileInstance[] | undefined> = {};\r\n    /**\r\n     * Increases the id counter and returns the next id available.\r\n     * @returns the next integer id available\r\n     */\r\n    public static getNextId(): number {\r\n        ExtFileManager.nextId++;\r\n        return ExtFileManager.nextId;\r\n    }\r\n    /**\r\n     * Updates a dui file list given an id\r\n     * @param id id of the fileList\r\n     * @param extFiles list of DuiFiles forinitializing the array\r\n     * @returns the id of the fileList\r\n     */\r\n    public static setFileList(\r\n        id: number | string | undefined,\r\n        extFilesInstances: ExtFileInstance[]\r\n    ): number | string {\r\n        if (!id) {\r\n            return 0;\r\n        } else {\r\n            ExtFileManager.fileLists[id] = [...extFilesInstances];\r\n\r\n            return id;\r\n        }\r\n\r\n    }\r\n    /**\r\n     * Generates a new ID\r\n     * @returns the next Id asociated with a DuiFIle list\r\n     */\r\n    public static createFileListMap(): number {\r\n        const nextId: number = ExtFileManager.getNextId();\r\n        ExtFileManager.fileLists[nextId] = [];\r\n\r\n        return nextId;\r\n    }\r\n\r\n    /**\r\n     * Deletes a list map\r\n     * @returns the next Id asociated with a DuiFIle list\r\n     */\r\n    public static removeFileListMap(id?: number | string): number | string {\r\n        if (!id) {\r\n            return 0;\r\n        } else {\r\n            try {\r\n                ExtFileManager.fileLists[id] = undefined;\r\n                return id;\r\n            } catch (error) {\r\n                if (process.env.NODE_ENV === \"development\")\r\n                    console.error(\"Error on remove\", error);\r\n                return 0;\r\n            }\r\n        }\r\n    }\r\n    /**\r\n     * \r\n     * @param id the id of the dropzone\r\n     * @returns \r\n     */\r\n    public static getExtFileInstanceList(\r\n        id?: number | string\r\n    ): ExtFileInstance[] | undefined {\r\n        try {\r\n            if (!id) {\r\n                return undefined;\r\n            }\r\n            return ExtFileManager.fileLists[id];\r\n        } catch (error) {\r\n            if (process.env.NODE_ENV === \"development\")\r\n                console.error(\"Error on getExtFileInstanceList\", error);\r\n            return undefined;\r\n        }\r\n    }\r\n    /**\r\n     * Updates(replaces) the extFile list on preparing stage and returns the new array.\r\n     * Removes the non valid files if cleanOnUpload is true and validateFiles is also true\r\n     * Then sets on preparing stage all files according to the following creiteria:\r\n     * If theuploadStatus is diferent than \"sucess\" AND\r\n     * then, update the files on preparing stage. Otherwise keep the extFile props.\r\n     * Finally, updates the ExtFileInstance list on ExtFileManager.\r\n     * @param dropzoneId the id to access the right list\r\n     * @param localFiles the list of extFiles\r\n     * @param validateFiles flag that indicates that validation is active or o¿not\r\n     * @param cleanOnUpload flag to determine whther to clena the list oof non valid files or not\r\n     * @returns a list of ExtFileInstance\r\n     */\r\n    public static setFileListMapPreparing(\r\n        dropzoneId: number | string,\r\n        localFiles: ExtFile[],\r\n        validateFiles: boolean,\r\n        cleanOnUpload: boolean\r\n    ): ExtFileInstance[] | undefined {\r\n        //console.log(\"setFileListMapPreparing before if\", dropzoneId, localFiles, cleanOnUpload);\r\n\r\n        if (!(typeof dropzoneId === \"number\" || typeof dropzoneId === \"string\")) return undefined;\r\n\r\n        //console.log(\"setFileListMapPreparing before try\", localFiles, cleanOnUpload);\r\n        try {\r\n\r\n            let resultExtList: ExtFileInstance[] = [];\r\n\r\n            //initializes the extFileLInstance list\r\n            let temLocalFiles: ExtFile[] = [...localFiles];\r\n\r\n            //remove non valids if cleanOnUpload is true and validateFiles is also true\r\n            if (cleanOnUpload && validateFiles) {\r\n                // clean on Upload is true, so non valid files must be removed\r\n                temLocalFiles = temLocalFiles.filter(extFile => extFile.valid)\r\n                //console.log(\"temLocalFiles filter\", temLocalFiles);\r\n            }\r\n\r\n            //console.log(\"setFileListMapPreparing after remove non valids\", temLocalFiles);\r\n\r\n            if (validateFiles) {\r\n                // validation flag was set to true, so only valid=true files will be set to \"preparing\"\r\n\r\n                //so, only valid files was kept in the temLocalfiles array\r\n                //now set the preparing state only for files with uploadStatus !== \"success\"\r\n                temLocalFiles =\r\n                    temLocalFiles\r\n                        .map(extFile => {\r\n                            if (extFile.uploadStatus !== \"success\" && extFile.valid) {\r\n                                return { ...extFile, uploadStatus: \"preparing\" }\r\n                            } else {\r\n                                return { ...extFile }\r\n                            }\r\n                        });\r\n            } else {\r\n                // all files will be set to \"preparing\" whether the valid value\r\n                // except those files with uploadStatus ===\"success\"\r\n                temLocalFiles =\r\n                    temLocalFiles\r\n                        .map(extFile => {\r\n                            if (extFile.uploadStatus !== \"success\") {\r\n                                return { ...extFile, uploadStatus: \"preparing\" }\r\n                            } else {\r\n                                return { ...extFile }\r\n                            }\r\n                        });\r\n            }\r\n\r\n            //console.log(\"setFileListMapPreparing result\", temLocalFiles);\r\n\r\n            //converto to Object instances\r\n            resultExtList = temLocalFiles.map(F => new ExtFileInstance(F));\r\n            //console.log(\"setFileListMapPreparing RESULT resultExtList\", resultExtList);\r\n\r\n            const resultSet = ExtFileManager.setFileList(dropzoneId, resultExtList);\r\n            //console.log(\"setFileListMapPreparing RESULT resultSet\", resultSet);\r\n\r\n            return resultExtList;\r\n            // return ExtFileManager.fileLists[dropzoneId];\r\n        } catch (error) {\r\n            if (process.env.NODE_ENV === \"development\")\r\n                console.error(\"setFileListMapPreparing Error on get List\", error);\r\n            return undefined;\r\n        }\r\n\r\n    }\r\n\r\n\r\n\r\n    /**\r\n * Updates(replaces) the extFile list on preparing stage and returns the new array.\r\n * Removes the non valid files if cleanOnUpload is true and validateFiles is also true\r\n * Then sets on preparing stage all files according to the following creiteria:\r\n * If theuploadStatus is diferent than \"sucess\" AND\r\n * then, update the files on preparing stage. Otherwise keep the extFile props.\r\n * Finally, updates the ExtFileInstance list on ExtFileManager.\r\n * @param dropzoneId the id to access the right list\r\n * @param localFiles the list of extFiles\r\n * @param validateFiles flag that indicates that validation is active or o¿not\r\n * @param cleanOnUpload flag to determine whther to clena the list oof non valid files or not\r\n * @returns a list of ExtFileInstance\r\n */\r\n    public static setFileListMapPreparing2(\r\n        dropzoneId: number | string,\r\n        localFiles: ExtFile[],\r\n        validateFiles: boolean,\r\n        cleanOnUpload: boolean\r\n    ): ExtFileInstance[] | undefined {\r\n\r\n        ExtFileManager.setFileList(dropzoneId, localFiles.map(F => new ExtFileInstance({ ...F, uploadStatus: \"preparing\" })));\r\n\r\n        return ExtFileManager.getExtFileInstanceList(dropzoneId);\r\n    }\r\n\r\n\r\n\r\n    /**\r\n     * \r\n     * @param dropzoneId \r\n     * @param index \r\n     * @param incommingDuiFile \r\n     * @returns \r\n     */\r\n    /* public static updateFileListMapPreparingById(\r\n        dropzoneId: number,\r\n        index: number,\r\n        incommingDuiFile: ExtFileInstance\r\n    ): ExtFileInstance[] | undefined {\r\n        if (!(typeof dropzoneId === \"number\") || !(typeof index === \"number\") || index > 0) return undefined;\r\n        const extFileList: ExtFileInstance[] | undefined = ExtFileManager.fileLists[dropzoneId];\r\n\r\n        if (!(extFileList && extFileList.length > 0)) return undefined;\r\n        extFileList[index]=\r\n        try {\r\n            ExtFileManager.setFileList(dropzoneId, [\r\n                ...localFiles.map(\r\n                    (x) =>\r\n                        new ExtFileInstance({ ...x, uploadStatus: \"preparing\" })\r\n                ),\r\n            ]);\r\n            return ExtFileManager.fileLists[dropzoneId];\r\n        } catch (error) {\r\n            if (process.env.NODE_ENV === \"development\")\r\n            console.error(\"Error on get List\", error);\r\n            return undefined;\r\n        }\r\n\r\n    } */\r\n}","\r\n/**\r\n * A syntetic file creator.\r\n * Very useful for tests\r\n */\r\nexport abstract class SyntheticFile {\r\n    /**\r\n * \r\n * @param name the file name\r\n * @param size the file size\r\n * @param type the file type\r\n * @returns \r\n */\r\n    static createFile = (name: string, size: number, type: string) => {\r\n        const file = new File([], name, { type });\r\n        Object.defineProperty(file, \"size\", {\r\n            get() {\r\n                return size;\r\n            },\r\n        });\r\n        return file;\r\n    };\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_aac = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"acc_audio-file-with-large-name.aac\", size ? size : 3516516, \"audio/aac\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_abw = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"abiword-file-with-large-name.abw\", size ? size : 3516516, \"application/x-abiword\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_freearc = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"freearc-file-with-large-name.arc\", size ? size : 3516516, \"application/x-freearc\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_avi = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"avi-file-with-large-name.avi\", size ? size : 3516516, \"video/x-msvideo\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_azw = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"amazon_kindle_ebook-file-with-large-name.azw\", size ? size : 3516516, \"application/vnd.amazon.ebook\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_octet = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"binary_octet_stream-file-with-large-name.bin\", size ? size : 3516516, \"application/octet-stream\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_bmp = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"bit_map-file-with-large-name.bmp\", size ? size : 3516516, \"image/bmp\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_bz = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"x_bzip-file-with-large-name.bz\", size ? size : 3516516, \"application/x-bzip\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_bz2 = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"x_bzip_2-file-with-large-name.bz2\", size ? size : 3516516, \"application/x-bzip2\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_cda = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"cd_audio-file-with-large-name.cda\", size ? size : 3516516, \"application/x-cdf\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_csh = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.csh\", size ? size : 3516516, \"application/x-csh\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_css = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.css\", size ? size : 3516516, \"text/css\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_csv = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.csv\", size ? size : 3516516, \"text/csv\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_doc = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.doc\", size ? size : 3516516, \"application/msword\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_docx = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.docx\", size ? size : 3516516, \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_eot = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.eot\", size ? size : 3516516, \"application/vnd.ms-fontobject\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_epub = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.epub\", size ? size : 3516516, \"application/epub+zip\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_gzip = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.gz\", size ? size : 3516516, \"application/gzip\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_gif = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.gif\", size ? size : 3516516, \"image/gif\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_htm = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.htm\", size ? size : 3516516, \"text/html\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_html = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.html\", size ? size : 3516516, \"text/html\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ico = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ico\", size ? size : 3516516, \"image/vnd.microsoft.icon\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_icalendar = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ics\", size ? size : 3516516, \"text/calendar\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_jar = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.jar\", size ? size : 3516516, \"application/java-archive\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_jpeg = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.jpeg\", size ? size : 3516516, \"image/jpeg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_jpg = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.jpg\", size ? size : 3516516, \"image/jpeg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_js = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.js\", size ? size : 3516516, \"text/javascript\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_json = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.json\", size ? size : 3516516, \"application/json\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_jsonld = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.jsonld\", size ? size : 3516516, \"application/ld+json\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_mid = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mid\", size ? size : 3516516, \"audio/midi\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_x_mid = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mid\", size ? size : 3516516, \"audio/x-midi\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_midi = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.midi\", size ? size : 3516516, \"audio/x-midi\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_x_midi = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.midi\", size ? size : 3516516, \"audio/x-midi\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_mjs = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mjs\", size ? size : 3516516, \"text/javascript\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_mp3 = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mp3\", size ? size : 3516516, \"audio/mpeg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_mp4 = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mp4\", size ? size : 3516516, \"video/mp4\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_mpeg = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mpeg\", size ? size : 3516516, \"video/mpeg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_mpkg = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.mpkg\", size ? size : 3516516, \"application/vnd.apple.installer+xml\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_odp = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.odp\", size ? size : 3516516, \"application/vnd.oasis.opendocument.presentation\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ods = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ods\", size ? size : 3516516, \"application/vnd.oasis.opendocument.spreadsheet\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_odt = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.odt\", size ? size : 3516516, \"application/vnd.oasis.opendocument.text\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_oga = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.oga\", size ? size : 3516516, \"audio/ogg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ogv = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ogv\", size ? size : 3516516, \"video/ogg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ogx = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ogx\", size ? size : 3516516, \"application/ogg\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_opus = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.opus\", size ? size : 3516516, \"audio/opus\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_otf = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.otf\", size ? size : 3516516, \"font/otf\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_png = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.png\", size ? size : 3516516, \"image/png\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_pdf = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.pdf\", size ? size : 3516516, \"application/pdf\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_php = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.php\", size ? size : 3516516, \"application/x-httpd-php\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ppt = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ppt\", size ? size : 3516516, \"application/vnd.ms-powerpoint\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_pptx = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.pptx\", size ? size : 3516516, \"application/vnd.openxmlformats-officedocument.presentationml.presentation\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_rar = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.rar\", size ? size : 3516516, \"application/vnd.rar\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_rtf = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.rtf\", size ? size : 3516516, \"application/rtf\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_sh = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.sh\", size ? size : 3516516, \"application/x-sh\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_svg = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.svg\", size ? size : 3516516, \"image/svg+xml\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_swf = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.swf\", size ? size : 3516516, \"application/x-shockwave-flash\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_tar = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.tar\", size ? size : 3516516, \"application/x-tar\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_tif = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.tif\", size ? size : 3516516, \"image/tiff\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_tiff = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.tiff\", size ? size : 3516516, \"image/tiff\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ts = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"mp2t_video-file-with-large-name.ts\", size ? size : 3516516, \"video/mp2t\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_ttf = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.ttf\", size ? size : 3516516, \"font/ttf\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_text = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.txt\", size ? size : 3516516, \"text/plain\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_typescript = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"typescript-file-with-large-name.ts\", size ? size : 3516516, \"text/plain\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_vsd = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"ms_visio-file-with-large-name.vsd\", size ? size : 3516516, \"application/vnd.visio\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_wav = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"wav_audio-file-with-large-name.wav\", size ? size : 3516516, \"audio/wav\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_weba = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"web_audio-file-with-large-name.weba\", size ? size : 3516516, \"audio/webm\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_webm = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"web_video-file-with-large-name.webm\", size ? size : 3516516, \"video/webm\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_webp = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"web_image-file-with-large-name.webp\", size ? size : 3516516, \"image/webp\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_woff = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.woff\", size ? size : 3516516, \"font/woff\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_woff2 = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.woff2\", size ? size : 3516516, \"font/woff2\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_xhtml = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.xhtml\", size ? size : 3516516, \"application/xhtml+xml\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_xlsx = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.xls\", size ? size : 3516516, \"application/vnd.ms-excel\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_xls = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.xlsx\", size ? size : 3516516, \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_xml = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"xml-file-with-large-name.xml\", size ? size : 3516516, \"application/xml\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_xml_txt = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"xml_plain_text-file-with-large-name.xml\", size ? size : 3516516, \"application/xml\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_xul = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"test-file-with-large-name.xul\", size ? size : 3516516, \"application/vnd.mozilla.xul+xml\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_zip = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"zip-file-with-large-name.zip\", size ? size : 3516516, \"application/zip\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_3gp = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"3gp_video-file-with-large-name.3gp\", size ? size : 3516516, \"video/3gpp\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_3gp2 = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"3gp2_video-file-with-large-name.3g2\", size ? size : 3516516, \"video/3gpp2\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_3gp_a = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"3gp_audio-file-with-large-name.3gp\", size ? size : 3516516, \"audio/3gpp\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_3gp_v = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"3gp_audio-file-with-large-name.3gp2\", size ? size : 3516516, \"audio/3gpp2\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_7z = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"seven_zip-file-with-large-name.7z\", size ? size : 3516516, \"application/x-7z-compressed\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_python = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"python-file-with-large-name.py\", size ? size : 3516516, \"text/plain\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_java = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"java-file-with-large-name.java\", size ? size : 3516516, \"text/plain\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_react = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"react_jsx-file-with-large-name.jsx\", size ? size : 3516516, \"text/plain\");\r\n    }\r\n    /**\r\n    * \r\n    * @param size the file size\r\n    * @returns a syntetic File object instance\r\n    */\r\n    static create_vue = (size?: number): File => {\r\n        return SyntheticFile.createFile(\"vue-file-with-large-name.vue\", size ? size : 3516516, \"text/plain\");\r\n    }\r\n    /**\r\n     * Creates an array of fake (synthetic) files\r\n     * @param size the file size for all synthetic files\r\n     * @returns an array of all file icon preview supported files\r\n     */\r\n    static createFileListMiscelanious = (size?: number): File[] => {\r\n\r\n        let listFile: File[] = [];\r\n\r\n        listFile.push(SyntheticFile.create_aac(size));\r\n        listFile.push(SyntheticFile.create_abw(size));\r\n        listFile.push(SyntheticFile.create_freearc(size));\r\n        listFile.push(SyntheticFile.create_avi(size));\r\n        listFile.push(SyntheticFile.create_azw(size));\r\n        listFile.push(SyntheticFile.create_octet(size));\r\n        listFile.push(SyntheticFile.create_bmp(size));\r\n        listFile.push(SyntheticFile.create_bz(size));\r\n        listFile.push(SyntheticFile.create_bz2(size));\r\n        listFile.push(SyntheticFile.create_cda(size));\r\n        listFile.push(SyntheticFile.create_csh(size));\r\n        listFile.push(SyntheticFile.create_css(size));\r\n        listFile.push(SyntheticFile.create_csv(size));\r\n        listFile.push(SyntheticFile.create_doc(size));\r\n        listFile.push(SyntheticFile.create_docx(size));\r\n        listFile.push(SyntheticFile.create_eot(size));\r\n        listFile.push(SyntheticFile.create_epub(size));\r\n        listFile.push(SyntheticFile.create_gzip(size));\r\n        listFile.push(SyntheticFile.create_gif(size));\r\n        listFile.push(SyntheticFile.create_htm(size));\r\n        listFile.push(SyntheticFile.create_html(size));\r\n        listFile.push(SyntheticFile.create_ico(size));\r\n        listFile.push(SyntheticFile.create_icalendar(size));\r\n        listFile.push(SyntheticFile.create_jar(size));\r\n        listFile.push(SyntheticFile.create_jpeg(size));\r\n        listFile.push(SyntheticFile.create_jpg(size));\r\n        listFile.push(SyntheticFile.create_js(size));\r\n        listFile.push(SyntheticFile.create_json(size));\r\n        listFile.push(SyntheticFile.create_jsonld(size));\r\n        listFile.push(SyntheticFile.create_mid(size));\r\n        listFile.push(SyntheticFile.create_midi(size));\r\n        listFile.push(SyntheticFile.create_x_mid(size));\r\n        listFile.push(SyntheticFile.create_x_midi(size));\r\n        listFile.push(SyntheticFile.create_mjs(size));\r\n        listFile.push(SyntheticFile.create_mp3(size));\r\n        listFile.push(SyntheticFile.create_mp4(size));\r\n        listFile.push(SyntheticFile.create_mpeg(size));\r\n        listFile.push(SyntheticFile.create_mpkg(size));\r\n        listFile.push(SyntheticFile.create_odp(size));\r\n        listFile.push(SyntheticFile.create_ods(size));\r\n        listFile.push(SyntheticFile.create_odt(size));\r\n        listFile.push(SyntheticFile.create_oga(size));\r\n        listFile.push(SyntheticFile.create_ogv(size));\r\n        listFile.push(SyntheticFile.create_ogx(size));\r\n        listFile.push(SyntheticFile.create_opus(size));\r\n        listFile.push(SyntheticFile.create_otf(size));\r\n        listFile.push(SyntheticFile.create_png(size));\r\n        listFile.push(SyntheticFile.create_pdf(size));\r\n        listFile.push(SyntheticFile.create_php(size));\r\n        listFile.push(SyntheticFile.create_ppt(size));\r\n        listFile.push(SyntheticFile.create_pptx(size));\r\n        listFile.push(SyntheticFile.create_rar(size));\r\n        listFile.push(SyntheticFile.create_rtf(size));\r\n        listFile.push(SyntheticFile.create_sh(size));\r\n        listFile.push(SyntheticFile.create_svg(size));\r\n        listFile.push(SyntheticFile.create_swf(size));\r\n        listFile.push(SyntheticFile.create_tar(size));\r\n        listFile.push(SyntheticFile.create_tif(size));\r\n        listFile.push(SyntheticFile.create_tiff(size));\r\n        listFile.push(SyntheticFile.create_ts(size));\r\n        listFile.push(SyntheticFile.create_ttf(size));\r\n        listFile.push(SyntheticFile.create_text(size));\r\n        listFile.push(SyntheticFile.create_typescript(size));\r\n        listFile.push(SyntheticFile.create_vsd(size));\r\n        listFile.push(SyntheticFile.create_wav(size));\r\n        listFile.push(SyntheticFile.create_weba(size));\r\n        listFile.push(SyntheticFile.create_webm(size));\r\n        listFile.push(SyntheticFile.create_webp(size));\r\n        listFile.push(SyntheticFile.create_woff(size));\r\n        listFile.push(SyntheticFile.create_woff2(size));\r\n        listFile.push(SyntheticFile.create_xhtml(size));\r\n        listFile.push(SyntheticFile.create_xlsx(size));\r\n        listFile.push(SyntheticFile.create_xls(size));\r\n        listFile.push(SyntheticFile.create_xml(size));\r\n        listFile.push(SyntheticFile.create_xml_txt(size));\r\n        listFile.push(SyntheticFile.create_xul(size));\r\n        listFile.push(SyntheticFile.create_zip(size));\r\n        //listFile.push(SyntheticFile.create_3gp(size));\r\n        //listFile.push(SyntheticFile.create_3gp2(size));\r\n        //listFile.push(SyntheticFile.create_3gp_a(size));\r\n        //listFile.push(SyntheticFile.create_3gp_v(size));\r\n        //listFile.push(SyntheticFile.create_7z(size));\r\n        listFile.push(SyntheticFile.create_python(size));\r\n        listFile.push(SyntheticFile.create_java(size));\r\n        listFile.push(SyntheticFile.create_react(size));\r\n        listFile.push(SyntheticFile.create_vue(size));\r\n\r\n        return listFile;\r\n    }\r\n}\r\n///////////////////// SHORTCUTS\r\n/**\r\n * Create a list of synthetic files with different mime types\r\n * @param size the file size for each synthetic file\r\n * @returns a list of synthetic file\r\n */\r\nexport const createListOfMultiTypeFile = (size?: number): File[] => {\r\n    return SyntheticFile.createFileListMiscelanious(size);\r\n}\r\n\r\n/**\r\n * Creates a synthetic file.\r\n * By default, creates a png image file\r\n * @param name the file name to show. By default is set to \"png-image-file-with-large-name.png\"\r\n * @param size the size in bytes of the file. By default this value is set to 455555\r\n * @param type the mime type of the file. By default is set to \"image/png\"\r\n * @returns \r\n */\r\nexport const createSyntheticFile = (\r\n    name = \"png-image-file-with-large-name.png\",\r\n    size = 455555,\r\n    type = \"image/png\",\r\n): File => {\r\n    return SyntheticFile.createFile(name, size, type);\r\n}","/**\r\n * An id generator for FileItems\r\n */\r\n export abstract class FileIdGenerator {\r\n    static nextId = 0;\r\n    /**\r\n     * Increases the id counter and returns the next id available.\r\n     * @returns the next integer id available\r\n     */\r\n    static getNextId(): number {\r\n        FileIdGenerator.nextId++;\r\n        return FileIdGenerator.nextId;\r\n    }\r\n}","/**\r\n * Random integer between min (included) and max (excluded)\r\n * @param min the min number\r\n * @param max the max number\r\n * @returns a random number between min (included) and max (excluded)\r\n */\r\nexport function getRandomInt(min: number = 0, max: number = 0): number {\r\n    return Math.floor(Math.random() * (max - min)) + min;\r\n}\r\n","/**\r\n * Cleans the input.value attribute\r\n * @param inputElement \r\n */\r\nexport const cleanInput = (inputElement?: HTMLInputElement | null) => {\r\n    if (!inputElement) return;\r\n    inputElement.value = \"\";\r\n}","/**\r\n * Separate the accept string array into an array of strings separated by commas\r\n * @param accept the string accept array\r\n * @returns an array of strings in wich every item\r\n */\r\nexport const separateAccept = (accept: string | undefined): string[] => {\r\n    if (!accept || accept.length === 0) {\r\n        return [];\r\n    }\r\n    const commaSeparatedAccpet: string[] = accept.split(\",\").map((acceptItem) => acceptItem.trim());\r\n    return commaSeparatedAccpet;\r\n}","import { getExt } from \"../utils/getExt\";\r\n\r\n/**\r\n * Checks whether a file is valid or not given an array of file extentions and mime types\r\n * e.g. accept =  [\".doc\", \".docx\", \".xml\", \"application/msword\", \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"]\r\n * @param accept the array of strings accept items\r\n * @param file a File object to be evaluated\r\n * @returns true if the mime type file is included in the accept param\r\n */\r\n export const validateAccept = (accept: string[], file: File): boolean => {\r\n    let valid: boolean = false;\r\n    const { name, type } = file;\r\n    //Array(5) [ \".doc\", \".docx\", \".xml\", \"application/msword\", \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" ]\r\n    for (let i = 0; i < accept.length; i++) {\r\n        const acceptItem: string = accept[i];\r\n        //check is not empty\r\n        if (acceptItem.length !== 0) {\r\n            //check extention\r\n            if (acceptItem.charAt(0) === \".\") {\r\n                if (acceptItem.includes(getExt(name))) {\r\n                    return true;\r\n                }\r\n            }\r\n            //check mime\r\n            // header/tail  => image/png  ;  image/* ; audio\r\n            if (type && type.length > 0 && acceptItem.includes(\"/\") && type.includes(\"/\")) {\r\n                let headerMime = acceptItem.split(\"/\")[0];\r\n                let tailMime = acceptItem.split(\"/\")[1];\r\n\r\n                let headerMimeFile = type.split(\"/\")[0];\r\n                let tailMimeFile = type.split(\"/\")[1];\r\n\r\n                if (headerMime === headerMimeFile) {\r\n                    //    image/*\r\n                    if (tailMime === \"*\") {\r\n                        return true;\r\n                    } else if (tailMime === tailMimeFile) {\r\n                        return true;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n    return valid;\r\n}","import { ValidateErrorLocalizerSelector } from \"../localization\";\r\nimport { ExtFile, FunctionLabel, Localization, LocalLabels } from \"../types\";\r\nimport { ValidateFileResponse, FileValidatorProps } from \"../types/validation\";\r\nimport { FileIdGenerator } from \"../utils/IdGenerator\";\r\nimport { separateAccept } from \"./separateAccept\";\r\nimport { validateAccept } from \"./validateAccept\";\r\n\r\n/**\r\n * \r\n * @param preValidatedFiles FileList \r\n * @param remainingValids The number of remaining valid files\r\n * @param localValidator \r\n * @param validator \r\n * @param maxFiles \r\n * @param localization \r\n * @returns \r\n */\r\nexport const fileListvalidator = (\r\n    preValidatedFiles: FileList,\r\n    remainingValids: number,\r\n    localValidator: FileValidatorProps,\r\n    validator?: ((f: File) => ValidateFileResponse) ,\r\n    maxFiles?: number,\r\n    localization?: Localization\r\n): ExtFile[] => {\r\n    const output: ExtFile[] = [];\r\n    //set a countdown when there is a limit on files\r\n    let countdown: number = remainingValids;\r\n    // get localized labels\r\n    const ValidationErrorLocalizer: LocalLabels =\r\n        ValidateErrorLocalizerSelector(localization);\r\n    //Iterate the File list\r\n    for (let i = 0, f: File; (f = preValidatedFiles[i]); i++) {\r\n        // Validate the file list with\r\n        let validatedFile: ExtFile = validateFile(f, validator, localValidator, ValidationErrorLocalizer);\r\n        if (validatedFile.valid) {\r\n            //not valid due to file count limit\r\n            const valid = countdown > 0;\r\n            validatedFile.valid = valid;\r\n            //add error about amount\r\n            if (!valid) {\r\n                const maxFileErrorMessenger: FunctionLabel = ValidationErrorLocalizer.maxFileCount as FunctionLabel;\r\n                validatedFile.errors = validatedFile.errors\r\n                    ? [...validatedFile.errors, maxFileErrorMessenger(maxFiles || Infinity)]\r\n                    : [maxFileErrorMessenger(maxFiles || Infinity)];\r\n            }\r\n            countdown--;\r\n        }\r\n        output.push(validatedFile);\r\n    }\r\n    return output;\r\n};\r\n\r\n\r\n/**\r\n * For each ExtFile sets the valid prop of ExtFile to \"true\" or \"false\"\r\n * depending on the result of the individual validation. \r\n * It also add the list of errors.\r\n * @param extFileList \r\n * @param remainingValids \r\n * @param localValidatorProps \r\n * @param validator \r\n * @param maxFiles \r\n * @param localization \r\n * @returns a new ExtFile list with each item validated\r\n */\r\nexport const validateExtFileList = (\r\n    extFileList: ExtFile[],\r\n    remainingValids: number,\r\n    localValidatorProps: FileValidatorProps,\r\n    validator?: ((f: File) => ValidateFileResponse) ,\r\n    maxFiles?: number,\r\n    localization?: Localization\r\n): ExtFile[] => {\r\n    //console.log(\"remaning valids\", remainingValids);\r\n    let fileListResult: ExtFile[] = [];\r\n    if (!remainingValids) return fileListResult;\r\n    let remaining: number = remainingValids;\r\n    const ValidationErrorLocalizer: LocalLabels =\r\n        ValidateErrorLocalizerSelector(localization);\r\n    const maxFileErrorMessenger: FunctionLabel = ValidationErrorLocalizer.maxFileCount as FunctionLabel;\r\n    for (let i = 0; i < extFileList.length; i++) {\r\n        let currentExtFile: ExtFile = extFileList[i];\r\n\r\n        currentExtFile = validateExtFile(currentExtFile, validator, localValidatorProps, ValidationErrorLocalizer);\r\n        //console.log(\"validateExtFileList after validation\", currentExtFile);\r\n\r\n        if (currentExtFile.valid) {\r\n            //not valid due to file count limit\r\n            const valid = remaining > 0;\r\n            currentExtFile.valid = valid;\r\n            //add error about amount\r\n            if (!valid) {\r\n                currentExtFile.errors = currentExtFile.errors\r\n                    ? [...currentExtFile.errors, maxFileErrorMessenger(maxFiles || Infinity)]\r\n                    : [maxFileErrorMessenger(maxFiles || Infinity)];\r\n            }\r\n            remaining--;\r\n        }\r\n        fileListResult.push(currentExtFile);\r\n\r\n    }\r\n    return fileListResult;\r\n}\r\n\r\n/**\r\n * \r\n * @param extFile \r\n * @param validator \r\n * @param validatorProps \r\n * @param localErrors \r\n * @returns \r\n */\r\nexport const validateExtFile = (\r\n    extFile: ExtFile,\r\n    validator: ((f: File) => ValidateFileResponse) | undefined,\r\n    validatorProps: FileValidatorProps,\r\n    localErrors: LocalLabels\r\n): ExtFile => {\r\n    let extFileResult: ExtFile = { ...extFile };\r\n    let errors: string[] = [];\r\n    //TO-DO: Add extra validation for individual props even if FIle object was not given\r\n    if (!extFile.file) {\r\n        return { ...extFileResult }\r\n    }\r\n\r\n    //TO-DO: add \"overrideValidation\" prop to ignore the rest of validators like accept and maxFileSize\r\n    if (validator) {\r\n        const resultCustomValidation: ValidateFileResponse = validator(extFileResult.file as File);\r\n        const { errors: errorsResult } = resultCustomValidation;\r\n        if (errorsResult)\r\n            errors.push(...errorsResult)\r\n        //return { ...extFileResult, ...validator(extFileResult.file as File) };\r\n    }\r\n\r\n    const { maxFileSize, accept } = validatorProps;\r\n    //console.log(\"Validation\", maxFileSize, accept);\r\n    //check file size\r\n    const file: File = extFile.file;\r\n\r\n\r\n    if (maxFileSize && file.size > maxFileSize) {\r\n        const maxFileSizeErrorMessenger: FunctionLabel = localErrors.maxSizeError as FunctionLabel;\r\n\r\n        //console.log(\"Size error\", maxFileSizeErrorMessenger(maxFileSize));\r\n\r\n        errors.push(maxFileSizeErrorMessenger(maxFileSize));\r\n    }\r\n    //check file type\r\n    if (accept && !validateAccept(separateAccept(accept), file)) {\r\n        errors.push(localErrors.acceptError as string);\r\n    }\r\n    const isValid: boolean = errors.length === 0;\r\n    extFileResult = { ...extFileResult, valid: isValid, errors: !isValid ? errors : undefined };\r\n    //console.log(\"validation extFileResult\", extFileResult);\r\n    return extFileResult;\r\n\r\n}\r\n\r\n\r\n\r\n/**\r\n * Function that validate whether a file is valid, or not\r\n * according to the Filevalidator properties\r\n * @param file a File object to be evaluated\r\n * @param validatorProps the validator object \r\n * @returns a FileValidated object\r\n */\r\nexport const validateFile = (\r\n    file: File,\r\n    validator: undefined | ((f: File) => ValidateFileResponse),\r\n    validatorProps: FileValidatorProps,\r\n    localErrors: LocalLabels\r\n): ExtFile => {\r\n\r\n    const idGenerated = FileIdGenerator.getNextId();\r\n    let errors: string[] = [];\r\n    if (validator) {\r\n        return { id: idGenerated, file, ...validator(file) };\r\n    }\r\n\r\n    const { maxFileSize, accept } = validatorProps;\r\n\r\n    //check file size\r\n    if (maxFileSize && file.size > maxFileSize) {\r\n        const maxFileSizeErrorMessenger: FunctionLabel = localErrors.maxSizeError as FunctionLabel;\r\n        errors.push(maxFileSizeErrorMessenger(maxFileSize));\r\n    }\r\n\r\n    //check file type\r\n    // const allowedTypes = accept.filter((type) => (file.type === type))\r\n    if (accept && !validateAccept(separateAccept(accept), file)) {\r\n        errors.push(localErrors.acceptError as string);\r\n    }\r\n\r\n\r\n    const fileResult: ExtFile = {\r\n        id: idGenerated,\r\n        file: file,\r\n        valid: errors.length === 0,\r\n        errors: errors\r\n    };\r\n    // logic here\r\n    return fileResult;\r\n};","/**\r\n * list of dumy errors in english\r\n */\r\nexport const listOfErrors: string[] =\r\n    [\r\n        \"File is too big. Max file size allowed is 80mb.\",\r\n        \"File's type is not allowed.\",\r\n        \"Max amount of files (28) has been reached.\"\r\n    ];","export default function addExtraData(\r\n    formData: FormData,\r\n    extraData: Record<string, string> | undefined\r\n) {\r\n    //headers\r\n    const extraDataKeys: string[] = Object.keys(extraData || {});\r\n    //const headerValues: string[] = Object.values(headers);\r\n    for (let i = 0; i < extraDataKeys.length && extraData; i++) {\r\n        //console.log(\"uploadFile extraData\", extraDataKeys[i], extraData[extraDataKeys[i]]);\r\n        formData.append(extraDataKeys[i], extraData[extraDataKeys[i]]);\r\n    }\r\n\r\n    formData.append(\"otherValue\", \"HAAAAAAAAAAAAAAa\");\r\n\r\n}","export default function addHeaders(\r\n    xhr: XMLHttpRequest,\r\n    headers: Record<string, string> | undefined\r\n) {\r\n    //headers\r\n    const headerKeys: string[] = Object.keys(headers || {});\r\n    //const headerValues: string[] = Object.values(headers);\r\n    for (let i = 0; i < headerKeys.length && headers; i++) {\r\n        //console.log(\"uploadFile headers\", headerKeys[i], headers[headerKeys[i]]);\r\n        xhr.setRequestHeader(\r\n            headerKeys[i],\r\n            headers[headerKeys[i]]\r\n        );\r\n    }\r\n\r\n\r\n}","import { ExtFile, UploadResponse } from \"../types\";\r\n\r\nexport const TIMEOUT_ERROR_RESPONSE = {\r\n    success: false,\r\n    message: \"Timeout error\",\r\n    payload: {}\r\n};\r\nexport const ABORTED_ERROR_RESPONSE = {\r\n    success: false,\r\n    message: \"Upload aborted\",\r\n    payload: {}\r\n}\r\nexport const JSON_PARSE_ERROR_RESPONSE = {\r\n    success: false,\r\n    message: \"Error when parsing JSON response\",\r\n    payload: {}\r\n}\r\n\r\nexport const UNEXPECTED_ERROR_RESPONSE = {\r\n    success: false,\r\n    message: \"Unexpected error\",\r\n    payload: {}\r\n}\r\n\r\nexport const NO_XHR_PROVIDED_ERROR = (extFile: ExtFile): ExtFile => {\r\n    return {\r\n\r\n        ...extFile,\r\n        uploadMessage: \"Unable to upload. xhr object was not provided\",\r\n        uploadStatus: \"error\",\r\n\r\n        serverResponse: { success: false, }\r\n    }\r\n}","import { ExtFile, ServerResponse, UploadResponse } from \"../types\";\r\nimport { JSON_PARSE_ERROR_RESPONSE } from \"./errors.upload\";\r\n\r\nexport const makeServerResponse = (success: any, message: string, payload: any): ServerResponse => {\r\n    const result: ServerResponse = { success: success, message: message, payload: payload } as ServerResponse;\r\n    return result;\r\n}\r\nexport const JsonParseResponse = (xhr: XMLHttpRequest): ServerResponse => {\r\n    try {\r\n        const jsonResponse = JSON.parse(xhr.response);\r\n        const success: any = jsonResponse.success;\r\n        const message: string = jsonResponse.message;\r\n        const payload: any = jsonResponse.payload;\r\n\r\n        const fuiResponse: ServerResponse = {\r\n            success: typeof success === \"boolean\" ? success : false,\r\n            message: typeof message === \"string\" ? message : \"Error on message response\",\r\n            payload: payload || {}\r\n        }\r\n        return fuiResponse\r\n    } catch (error) {\r\n        //console.log(\"FuiUpload ERROR\", error);\r\n        return JSON_PARSE_ERROR_RESPONSE;\r\n    }\r\n}\r\n\r\n\r\n\r\nexport const makeSuccessUploadResponse = (\r\n    extFile: ExtFile,\r\n    responseFui: ServerResponse\r\n): ExtFile => {\r\n    return {\r\n        ...extFile,\r\n        serverResponse: responseFui,\r\n        uploadMessage: responseFui.message,\r\n        uploadStatus: \"success\"\r\n\r\n    }\r\n}\r\n\r\n\r\nexport const makeErrorUploadResponse = (\r\n    extFile: ExtFile,\r\n    responseFui: ServerResponse\r\n): ExtFile => {\r\n    //console.log(\"makeErrorUploadResponse\", extFile, responseFui);\r\n    return {\r\n        ...extFile,\r\n        uploadMessage: responseFui.message,\r\n        uploadStatus: \"error\", \r\n        serverResponse: responseFui,\r\n    }\r\n}\r\n\r\n","import { ExtFile, Method, UPLOADSTATUS } from \"../types\";\r\nimport { ServerResponse, UploadResponse } from \"../types/uploadTypes\";\r\nimport addExtraDataUpload from \"./addExtraData.upload\";\r\nimport addHeaders from \"./addheaders.upload\";\r\nimport { ABORTED_ERROR_RESPONSE, NO_XHR_PROVIDED_ERROR, TIMEOUT_ERROR_RESPONSE, UNEXPECTED_ERROR_RESPONSE } from \"./errors.upload\";\r\nimport { JsonParseResponse, makeErrorUploadResponse, makeSuccessUploadResponse } from \"./response.upload\";\r\nimport { completeUploadResult, unableToUploadResult } from \"./utils.upload\";\r\n\r\n\r\n/**\r\n * Uploads one formData object to a given endpoint in a promisified way\r\n * @param xhr XMLHTTPrequest object\r\n * @param method method for uploading\r\n * @param endpoint endpoint to upload the file\r\n * @param data FromData object to perform multipart form data upload\r\n * @param headers the set of headers\r\n * @returns a server response that consists on {status, payload, message}\r\n */\r\nexport const uploadFormData = (\r\n    xhr: XMLHttpRequest,\r\n    method: Method | undefined = \"POST\",\r\n    endpoint: string,\r\n    data: FormData,\r\n    headers: Record<string, string> | undefined\r\n) => {\r\n    return new Promise<ServerResponse>((resolve, reject) => {\r\n        //console.log(\"Fui_uploadFormData uploadFile\", xhr, method, endpoint, data, headers);\r\n\r\n        const finalMethod: Method = [\"POST\", \"PUT\", \"PATCH\"].includes(method.toUpperCase()) ? method : \"POST\";\r\n\r\n        let lastLastState: number = -1;\r\n        let lastState: number = 0;\r\n        let jumped: boolean = false;\r\n\r\n        xhr.upload.onload = () => {\r\n            //console.log(\"Fui_uploadFormData uploadFile onLoad\", xhr.readyState, xhr.response);\r\n        };\r\n        xhr.upload.ontimeout = () => resolve(TIMEOUT_ERROR_RESPONSE);\r\n        xhr.upload.onabort = () => {\r\n            //console.log(\"Fui_uploadFormData ABORTEEEEDDDD\");\r\n            resolve(ABORTED_ERROR_RESPONSE);\r\n        };\r\n        xhr.onloadend = async (e) => {\r\n            //console.log(\"onloadend loaded\", e.loaded);\r\n            //console.log(\"onloadend total\", e.total);\r\n            //console.log(\"onloadend lengthComputable\", e.lengthComputable);\r\n\r\n        }\r\n        // listen for `progress` event\r\n        //currently listening on FileItem component hook\r\n        xhr.onreadystatechange = async (e) => {\r\n            //console.log(\"Finished\", xhr);\r\n\r\n            //console.log(\"Fui_uploadFormData uploadFile onreadystatechange e.type\", e.type);\r\n            //console.log(\"Fui_uploadFormData uploadFile onreadystatechange\", xhr.readyState, xhr.response);\r\n\r\n            lastLastState = lastState;\r\n            lastState = xhr.readyState;\r\n\r\n            if (xhr.readyState === 4) {\r\n                if (xhr.response !== \"\") {\r\n                    //there is th answer\r\n                    resolve(JsonParseResponse(xhr));\r\n                } else {\r\n                    //error unexpected\r\n                    // console.log(\"Fui_uploadFormData EMPTY status\", xhr.status);\r\n                    // console.log(\"Fui_uploadFormData EMPTY readyState\", xhr.readyState);\r\n                    // console.log(\"Fui_uploadFormData EMPTY upload\", xhr.upload);\r\n                    //console.log(\"Fui_uploadFormData EMPTY abort\", xhr.abort);\r\n                    //const jumped = lastLastState - lastLastState !== 1;\r\n                    resolve(ABORTED_ERROR_RESPONSE);\r\n\r\n                }\r\n            } else {\r\n                //console.log(\"Fui_uploadFormData FuiUpload NOT YET\" + xhr.readyState);\r\n            }\r\n        };\r\n        // open request\r\n        xhr.open(finalMethod, endpoint, true);\r\n\r\n        //add header to request\r\n        addHeaders(xhr, headers);\r\n        //start uploading\r\n        xhr.send(data);\r\n    });\r\n\r\n};\r\n\r\n/**\r\n * \r\n * @param file the extended file to be uploaded\r\n * @param url the endpoint\r\n * @param method the method for uploading\r\n * @param headers headers for request\r\n * @returns \r\n */\r\nexport const uploadExtFile = async (\r\n    extFile: ExtFile,\r\n    url: string,\r\n    method?: Method,\r\n    headers?: Record<string, string>,\r\n    uploadLabel?: string,\r\n): Promise<ExtFile> => {\r\n    return new Promise(async (resolve, reject) => {\r\n        try {\r\n            const uploader: XMLHttpRequest | undefined = extFile.xhr;\r\n\r\n            if (!uploader) {\r\n                resolve(NO_XHR_PROVIDED_ERROR(extFile));\r\n                return;\r\n            }\r\n\r\n            const localMethod: Method = method || \"POST\";\r\n            const fileToUpload: File = extFile.file as File;\r\n\r\n            const formData = new FormData();\r\n\r\n            formData.append(uploadLabel || \"file\", fileToUpload);\r\n\r\n            // add extra data to upload\r\n            const finalExtraData: Record<string, any> =\r\n                { otherValue: \"other valueee haaaa\", param2: { tecnica: \"KIKOHUUUU\", friend: \"Chaos\", age: 25 }, ...extFile.extraUploadData };\r\n\r\n            addExtraDataUpload(formData, finalExtraData);\r\n            //console.log(\"FORMDATA\", formData);\r\n\r\n            let responseFui: ServerResponse;\r\n            responseFui = await uploadFormData(\r\n                uploader,\r\n                localMethod,\r\n                url,\r\n                formData,\r\n                headers || {});\r\n\r\n            if (responseFui.success) {\r\n                // status is true\r\n                resolve(makeSuccessUploadResponse(extFile, responseFui));\r\n            } else {\r\n                // status is false\r\n                resolve(makeErrorUploadResponse(extFile, responseFui));\r\n            }\r\n        } catch (error) {\r\n            // on error\r\n            //console.log(\"uploadPromiseXHR uploadPromiseXHR ERROR\", error);\r\n            resolve(\r\n                makeErrorUploadResponse(extFile, UNEXPECTED_ERROR_RESPONSE)\r\n            );\r\n        }\r\n    });\r\n};\r\n\r\n\r\n\r\n\r\nexport function uploadFile(\r\n    file: File,\r\n    url: string,\r\n    method?: Method,\r\n    label?: string,\r\n    headers?: Record<string, string>\r\n): Promise<ServerResponse> {\r\n    return new Promise(async (resolve, reject) => {\r\n\r\n\r\n        //start uploading\r\n        const formData = new FormData();\r\n\r\n        formData.append(label || \"file\", file);\r\n\r\n        try {\r\n            const serverResponse: ServerResponse = await uploadFormData(new XMLHttpRequest(), method, url, formData, headers);\r\n            resolve(serverResponse);\r\n        } catch (error) {\r\n            // on error\r\n            //console.log(\"uploadPromiseXHR uploadPromiseXHR ERROR\", error);\r\n            resolve(UNEXPECTED_ERROR_RESPONSE);\r\n        }\r\n    });\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * @deprecated\r\n * Uploads one formData object to a given endpoint in a promisified way\r\n * @param xhr XMLHTTPrequest object\r\n * @param method method for uploading\r\n * @param endpoint endpoint to upload the file\r\n * @param data FromData object to perform multipart form data\r\n * @param headers the set of headers\r\n * @returns a dui server response that consists on {success, payload, message}\r\n */\r\nexport const FuiUpload = (\r\n    xhr: XMLHttpRequest,\r\n    method: Method,\r\n    endpoint: string,\r\n    data: FormData,\r\n    headers: Record<string, string>\r\n) => {\r\n    return new Promise<ServerResponse>((resolve, reject) => {\r\n        //console.log(\"FuiUpload params\", xhr, method, endpoint, data, headers);\r\n\r\n        xhr.upload.onload = () => {\r\n            //console.log(\"FuiUpload onLoad\", xhr.readyState, xhr.response);\r\n        };\r\n\r\n        xhr.upload.ontimeout = () => resolve(TIMEOUT_ERROR_RESPONSE);\r\n        xhr.upload.onabort = () => resolve(ABORTED_ERROR_RESPONSE);\r\n\r\n        // listen for `progress` event\r\n        //currently listening on FileMosaic component hook\r\n\r\n        xhr.onreadystatechange = async (e) => {\r\n            //console.log(\"Finished\", xhr);\r\n            //console.log(\"FuiUpload onreadystatechange\", xhr.readyState, xhr.response, xhr);\r\n\r\n            if (xhr.readyState === 4) {\r\n                if (xhr.response !== \"\") {\r\n                    //there is th answer\r\n                    resolve(JsonParseResponse(xhr));\r\n                } else {\r\n                    //error unexpected\r\n                    resolve(UNEXPECTED_ERROR_RESPONSE);\r\n                }\r\n            } else {\r\n                //console.log(\"FuiUpload NOT YET\" + xhr.readyState);\r\n            }\r\n        };\r\n        // open request\r\n        xhr.open(method, endpoint, true);\r\n        const headerKeys: string[] = Object.keys(headers);\r\n        //const headerValues: string[] = Object.values(headers);\r\n        for (let i = 0; i < headerKeys.length; i++) {\r\n            //console.log(\"FuiUpload  headers\", headerKeys[i], headers[headerKeys[i]]);\r\n            xhr.setRequestHeader(\r\n                headerKeys[i],\r\n                headers[headerKeys[i]]\r\n            );\r\n        }\r\n        //start uploading\r\n        xhr.send(data);\r\n    });\r\n\r\n};\r\n\r\n\r\n","import { NamedColor } from \"../types/NamedColor\";\r\n\r\n/**\r\n * The full list of named Colors provided by\r\n * https://htmlcolorcodes.com/es/nombres-de-los-colores/\r\n */\r\nexport const NAMED_COLORS: NamedColor =\r\n{\r\n    //RED\r\n    indianred: \"#CD5C5C\",\r\n    lightcoral: \"#F08080\",\r\n    salmon: \"#FA8072\",\r\n    darksalmon: \"#E9967A\",\r\n    lightsalmon: \"#FFA07A\",\r\n    crimson: \"#DC143C\",\r\n    red: \"#FF0000\",\r\n    firebrick: \"#B22222\",\r\n    darkred: \"#8B0000\",\r\n    //PINK\r\n    pink: \"#FFC0CB\",\r\n    lightpink: \"#FFB6C1\",\r\n    hotpink: \"#FF69B4\",\r\n    deeppink: \"#FF1493\",\r\n    mediumvioletred: \"#C71585\",\r\n    palevioletred: \"#DB7093\",\r\n    //ORANGE\r\n    //\"lightsalmon: \"#FFA07A\",\r\n    coral: \"#FF7F50\",\r\n    tomato: \"#FF6347\",\r\n    orangered: \"#FF4500\",\r\n    darkorange: \"#FF8C00\",\r\n    orange: \"#FFA500\",\r\n    //YELLOW\r\n    gold: \"#FFD700\",\r\n    yellow: \"#FFFF00\",\r\n    lightyellow: \"#FFFFE0\",\r\n    lemonchiffon: \"#FFFACD\",\r\n    lightgoldenrodyellow: \"#FAFAD2\",\r\n    papayawhip: \"#FFEFD5\",\r\n    moccasin: \"#FFE4B5\",\r\n    peachpuff: \"#FFDAB9\",\r\n    palegoldenrod: \"#EEE8AA\",\r\n    khaki: \"#F0E68C\",\r\n    darkkhaki: \"#BDB76B\",\r\n    //PURPLE\r\n    lavender: \"#E6E6FA\",\r\n    thistle: \"#D8BFD8\",\r\n    plum: \"#DDA0DD\",\r\n    violet: \"#EE82EE\",\r\n    orchid: \"#DA70D6\",\r\n    fuchsia: \"#FF00FF\",\r\n    magenta: \"#FF00FF\",\r\n    mediumorchid: \"#BA55D3\",\r\n    mediumpurple: \"#9370DB\",\r\n    rebeccapurple: \"#663399\",\r\n    blueviolet: \"#8A2BE2\",\r\n    darkviolet: \"#9400D3\",\r\n    darkorchid: \"#9932CC\",\r\n    darkmagenta: \"#8B008B\",\r\n    purple: \"#800080\",\r\n    indigo: \"#4B0082\",\r\n    slateblue: \"#6A5ACD\",\r\n    darkslateblue: \"#483D8B\",\r\n    mediumslateblue: \"#7B68EE\",\r\n    //GREEN\r\n    greenyellow: \"#ADFF2F\",\r\n    chartreuse: \"#7FFF00\",\r\n    lawngreen: \"#7CFC00\",\r\n    lime: \"#00FF00\",\r\n    limegreen: \"#32CD32\",\r\n    palegreen: \"#98FB98\",\r\n    lightgreen: \"#90EE90\",\r\n    mediumspringgreen: \"#00FA9A\",\r\n    springgreen: \"#00FF7F\",\r\n    mediumseagreen: \"#3CB371\",\r\n    seagreen: \"#2E8B57\",\r\n    forestgreen: \"#228B22\",\r\n    green: \"#008000\",\r\n    darkgreen: \"#006400\",\r\n    yellowgreen: \"#9ACD32\",\r\n    olivedrab: \"#6B8E23\",\r\n    olive: \"#808000\",\r\n    darkolivegreen: \"#556B2F\",\r\n    mediumaquamarine: \"#66CDAA\",\r\n    darkseagreen: \"#8FBC8B\",\r\n    lightseagreen: \"#20B2AA\",\r\n    darkcyan: \"#008B8B\",\r\n    teal: \"#008080\",\r\n    //BLUE\r\n    aqua: \"#00FFFF\",\r\n    cyan: \"#00FFFF\",\r\n    lightcyan: \"#E0FFFF\",\r\n    paleturquoise: \"#AFEEEE\",\r\n    aquamarine: \"#7FFFD4\",\r\n    turquoise: \"#40E0D0\",\r\n    mediumturquoise: \"#48D1CC\",\r\n    darkturquoise: \"#00CED1\",\r\n    cadetblue: \"#5F9EA0\",\r\n    steelblue: \"#4682B4\",\r\n    lightsteelblue: \"#B0C4DE\",\r\n    powderblue: \"#B0E0E6\",\r\n    lightblue: \"#ADD8E6\",\r\n    skyblue: \"#87CEEB\",\r\n    lightskyblue: \"#87CEFA\",\r\n    deepskyblue: \"#00BFFF\",\r\n    dodgerblue: \"#1E90FF\",\r\n    cornflowerblue: \"#6495ED\",\r\n    //\"mediumslateblue: \"#7B68EE\",\r\n    royalblue: \"#4169E1\",\r\n    blue: \"#0000FF\",\r\n    mediumblue: \"#0000CD\",\r\n    darkblue: \"#00008B\",\r\n    navy: \"#000080\",\r\n    midnightblue: \"#191970\",\r\n    //BROWN\r\n    cornsilk: \"#FFF8DC\",\r\n    blanchedalmond: \"#FFEBCD\",\r\n    bisque: \"#FFE4C4\",\r\n    navajowhite: \"#FFDEAD\",\r\n    wheat: \"#F5DEB3\",\r\n    burlywood: \"#DEB887\",\r\n    tan: \"#D2B48C\",\r\n    rosybrown: \"#BC8F8F\",\r\n    sandybrown: \"#F4A460\",\r\n    goldenrod: \"#DAA520\",\r\n    darkgoldenrod: \"#B8860B\",\r\n    peru: \"#CD853F\",\r\n    chocolate: \"#D2691E\",\r\n    saddlebrown: \"#8B4513\",\r\n    sienna: \"#A0522D\",\r\n    brown: \"#A52A2A\",\r\n    maroon: \"#800000\",\r\n    //WHITE\r\n    white: \"#FFFFFF\",\r\n    snow: \"#FFFAFA\",\r\n    honeydew: \"#F0FFF0\",\r\n    mintcream: \"#F5FFFA\",\r\n    azure: \"#F0FFFF\",\r\n    aliceblue: \"#F0F8FF\",\r\n    ghostwhite: \"#F8F8FF\",\r\n    whitesmoke: \"#F5F5F5\",\r\n    seashell: \"#FFF5EE\",\r\n    beige: \"#F5F5DC\",\r\n    oldlace: \"#FDF5E6\",\r\n    floralwhite: \"#FFFAF0\",\r\n    ivory: \"#FFFFF0\",\r\n    antiquewhite: \"#FAEBD7\",\r\n    linen: \"#FAF0E6\",\r\n    lavenderblush: \"#FFF0F5\",\r\n    mistyrose: \"#FFE4E1\",\r\n    //GREY\r\n    gainsboro: \"#DCDCDC\",\r\n    lightgray: \"#D3D3D3\",\r\n    silver: \"#C0C0C0\",\r\n    darkgray: \"#A9A9A9\",\r\n    gray: \"#808080\",\r\n    dimgray: \"#696969\",\r\n    lightslategray: \"#778899\",\r\n    slategray: \"#708090\",\r\n    darkslategray: \"#2F4F4F\",\r\n    black: \"#000000\"\r\n}","import { NAMED_COLORS } from \"./namedColors\";\r\n\r\n/**\r\n * Make the color into a darker color\r\n * @param colorInput \r\n * @returns the darked color in\r\n */\r\nexport const darkerColor = (colorInput: string, percentage = 25): string => {\r\n    let darkedColor = \"\";\r\n    const reduce = (100 - percentage) / 100;\r\n    let component1: number = 0;\r\n    let component2: number = 0;\r\n    let component3: number = 0;\r\n    if (isHexColor(colourNameToHex(colorInput))) {\r\n\r\n        component1 = hexTodec(colorInput.charAt(1)) * 16 + hexTodec(colorInput.charAt(2));\r\n        component2 = hexTodec(colorInput.charAt(3)) * 16 + hexTodec(colorInput.charAt(4));\r\n        component3 = hexTodec(colorInput.charAt(5)) * 16 + hexTodec(colorInput.charAt(6));\r\n\r\n        darkedColor = `rgb(${component1 * reduce}, ${component2 * reduce},${component3 * reduce})`;\r\n    } else {\r\n        if (colorInput.includes(\"rgba\")) {\r\n            let slicer = colorInput.replace(\"rgba(\", \"\");\r\n            let components: string[] = slicer.split(\",\");\r\n            darkedColor = `rgb(${parseInt(components[0], 10) * reduce}, ${parseInt(components[1], 10) * reduce},${parseInt(components[2], 10) * reduce})`;\r\n            //return darkedColor;\r\n        } else if (colorInput.includes(\"rgb\")) {\r\n\r\n            let slicer = colorInput.replace(\"rgb(\", \"\");\r\n            let components: string[] = slicer.split(\",\");\r\n            darkedColor = `rgb(${parseInt(components[0], 10) * reduce}, ${parseInt(components[1], 10) * reduce},${parseInt(components[2], 10) * reduce})`;\r\n            // return darkedColor;\r\n        }\r\n    }\r\n\r\n    return darkedColor;\r\n}\r\n/**\r\n * Make the color into a brighted color\r\n * @param colorInput \r\n * @returns the brighted color \r\n */\r\nexport const brighterColor = (colorInput: string, percentage = 25): string => {\r\n    let brightedColor = \"\";\r\n    const increase = (100 + percentage) / 100;\r\n    let component1: number = 0;\r\n    let component2: number = 0;\r\n    let component3: number = 0;\r\n    if (isHexColor(colourNameToHex(colorInput))) {\r\n\r\n        component1 = hexTodec(colorInput.charAt(1)) * 16 + hexTodec(colorInput.charAt(2));\r\n        component2 = hexTodec(colorInput.charAt(3)) * 16 + hexTodec(colorInput.charAt(4));\r\n        component3 = hexTodec(colorInput.charAt(5)) * 16 + hexTodec(colorInput.charAt(6));\r\n\r\n        brightedColor = `rgb(${component1 * increase}, ${component2 * increase},${component3 * increase})`;\r\n    } else {\r\n        if (colorInput.includes(\"rgba\")) {\r\n            let slicer = colorInput.replace(\"rgba(\", \"\");\r\n            let components: string[] = slicer.split(\",\");\r\n            brightedColor = `rgb(${parseInt(components[0], 10) * increase}, ${parseInt(components[1], 10) * increase},${parseInt(components[2], 10) * increase})`;\r\n            //return darkedColor;\r\n        } else if (colorInput.includes(\"rgb\")) {\r\n\r\n            let slicer = colorInput.replace(\"rgb(\", \"\");\r\n            let components: string[] = slicer.split(\",\");\r\n            brightedColor = `rgb(${parseInt(components[0], 10) * increase}, ${parseInt(components[1], 10) * increase},${parseInt(components[2], 10) * increase})`;\r\n            // return darkedColor;\r\n        }\r\n    }\r\n\r\n    return brightedColor;\r\n}\r\n\r\n/**\r\n * In order to managae rgba() we convert hex colors into rgba()\r\n * If the given color is already a rgb() color, it can add the percentage to convert it into rgba()\r\n * \r\n * \r\n * @param colorInput color in hex or in rgb\r\n * @param perc percentage for RGBA() color \r\n * @returns the rgba representation of a hex color\r\n */\r\nexport const hexColorToRGB = (colorInput: string | undefined, perc = 0, defaultColor?: string): string => {\r\n    let resultDefault: string = defaultColor ? defaultColor : \"rgba(255, 255, 255, 0.6)\";\r\n    if (!colorInput) {\r\n        return resultDefault;\r\n    }\r\n    //work only in uppercase\r\n    const color: string = colorInput.toUpperCase();\r\n    // is already a rgba color\r\n    if (color.includes(\"RGBA\")) {\r\n        return color;\r\n    }\r\n\r\n    //return rbg => rgba\r\n    if (color.includes(\"RGB\")) {\r\n        return color.replace('RGB', `rgba`).replace(')', `, ${perc})`);\r\n    }\r\n\r\n    // if is a hex color or named color\r\n    if (!isHexColor(colourNameToHex(color))) {\r\n        return resultDefault;\r\n    }\r\n    let resultOk: string = \"\";\r\n    //let strVar: string = \"\";\r\n    let component1: number = 0;\r\n    let component2: number = 0;\r\n    let component3: number = 0;\r\n    //If passed all validations, proceed to transform\r\n    component1 = hexTodec(color.charAt(1)) * 16 + hexTodec(color.charAt(2));\r\n    component2 = hexTodec(color.charAt(3)) * 16 + hexTodec(color.charAt(4));\r\n    component3 = hexTodec(color.charAt(5)) * 16 + hexTodec(color.charAt(6));\r\n    resultOk = `rgba(${component1}, ${component2},${component3} , ${perc})`;\r\n    return resultOk;\r\n}\r\n\r\n/**\r\n * Validates wheteher the color is hexadecimal css color\r\n * Example:  #FF56AC\r\n * \r\n * \r\n * @param colorInput the color inpt to test \r\n * @returns true if the inputColor is a hexadecimal css color\r\n */\r\nexport const isHexColor = (colorInput: string): boolean => {\r\n\r\n    // if first element is no '#' return default background color\r\n    if (colorInput.charAt(0) !== '#') {\r\n\r\n        return false;\r\n    }\r\n    // if color lenght is not exactly 7 return default\r\n    if (colorInput.length !== 7) {\r\n\r\n\r\n        return false;\r\n    }\r\n    // if one of the letters is not included in hex array return  default\r\n    for (let i = 1; i < colorInput.length; i++) {\r\n        if (!hexArray.includes(colorInput.charAt(i))) {\r\n\r\n\r\n            return false;\r\n        }\r\n    }\r\n\r\n    return true;\r\n}\r\n\r\n/**\r\n * Converts a named color into hexadecimal color\r\n * from a list of well known namd colors if found.\r\n * When not given returns a \"\"\r\n * When not found in the list, returns the same value given\r\n * @param colour the named color\r\n * @returns The hex representation of the color or \"\" or the same color\r\n */\r\nexport function colourNameToHex(colour: string | undefined): string {\r\n    /**\r\n     * When not given\r\n     */\r\n    if (!colour) {\r\n        return \"\";\r\n    }\r\n    /**\r\n     * when named color is found\r\n     */\r\n    if (NAMED_COLORS[colour.toLocaleLowerCase()] !== undefined) {\r\n        return NAMED_COLORS[colour.toLocaleLowerCase()];\r\n    }\r\n    /**\r\n     * When the named color was not found\r\n     */\r\n\r\n    return colour;\r\n}\r\n\r\n/**\r\n * hexArray & decArray\r\n * \r\n * arrays of numbers used to convert hexadecimal numbers into decimal and viceversa\r\n */\r\nconst hexArray = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'];\r\nconst decArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];\r\n\r\n/**\r\n * Converts hex number in string representation to decimal number\r\n * \r\n * \r\n * @param letter the string hex number\r\n * @returns a decimal number\r\n */\r\nexport const hexTodec = (letter: string): number => {\r\n    if (hexArray.includes(letter)) {\r\n        return decArray[hexArray.indexOf(letter)];\r\n    } else {\r\n        return 0;\r\n    }\r\n}\r\n\r\n\r\n/** \r\n * Asure a base color. When not given or when given an incorrect color format\r\n * default color is this kind of grey #5d6475\r\n * \r\n * @param color param color given by user\r\n * @returns returns the same color \r\n */\r\nexport const asureColor = (color?: string): string => {\r\n    if (color !== undefined && color !== \"\") {\r\n        return color;\r\n    } else {\r\n        return DEFAULT_FONT_COLOR;\r\n    }\r\n}\r\n/** \r\n * Asure a base color. When not given or when given an incorrect color format\r\n * default color is this kind of grey #5d6475\r\n * \r\n * @param color param color given by user\r\n * @returns returns the same color \r\n */\r\nexport const completeAsureColor = (color?: string, perc = 1): string => {\r\n\r\n    return hexColorToRGB(asureColor(colourNameToHex(color)), perc);\r\n\r\n}\r\n\r\n\r\n\r\nexport const DEFAULT_FONT_COLOR = \"#646c7f\";","/**\r\n * If className is given, adds class name in string format to a base class name\r\n * @param baseClassName the base class name\r\n * @param className the class name to be added\r\n * @returns a new class name obtained by adding the second paramater\r\n */\r\nexport const addClassName = (\r\n    baseClassName: string,\r\n    className: string | undefined\r\n): string => {\r\n    if (className)\r\n        return `${baseClassName} ${className}`;\r\n    return baseClassName;\r\n}","\r\nimport { ExtFile, ExtFileInstance, ServerResponse, UploadResponse, UPLOADSTATUS } from \"../types\"\r\n\r\nexport const unexpectedErrorUploadResult = (extFile: ExtFile): ExtFile => {\r\n    return {\r\n        ...extFile,\r\n        uploadMessage: \"Unexpected error\",\r\n        uploadStatus: \"error\",\r\n        serverResponse: {\r\n            success: false,\r\n            message: \"Error on upload: unexpected error \",\r\n            payload: {},\r\n        }\r\n    }\r\n}\r\nexport const unableToUploadResult = (\r\n    extFile: ExtFile\r\n): UploadResponse => {\r\n    return {\r\n        id: extFile.id,\r\n        uploadedFile: {\r\n            ...extFile,\r\n            uploadMessage: \"Unable to upload. XHR was not provided\",\r\n            uploadStatus: \"error\"\r\n        },\r\n        serverResponse: {\r\n            success: false,\r\n            message: \"Error on upload: Unable to upload. XHR was not provided \",\r\n            payload: {},\r\n        }\r\n    }\r\n}\r\nexport const completeUploadResult = (\r\n    extFile: ExtFile,\r\n    serverResponse: ServerResponse,\r\n    uploadStatusresult: UPLOADSTATUS\r\n): UploadResponse => {\r\n    return {\r\n        id: extFile.id,\r\n        uploadedFile: {\r\n            ...extFile,\r\n            uploadMessage: serverResponse.message,\r\n            uploadStatus: uploadStatusresult\r\n        },\r\n        serverResponse: serverResponse\r\n    }\r\n}\r\n\r\n/**\r\n * Initializes the xhr attribute for performing uploads\r\n * @param extFileList the list of extended files\r\n * @returns the array of extFiles with the xhr attribute initialized\r\n */\r\nexport const toUploadableExtFileList = (\r\n    extFileList: ExtFile[] | ExtFileInstance[]\r\n): ExtFile[] => {\r\n    if (!extFileList) return [];\r\n    return extFileList.map(extFile => {\r\n        return { ...extFile, xhr: new XMLHttpRequest() }\r\n    });\r\n}\r\n\r\n/**\r\n * Updates the uploadStatus of the given extFile \r\n * from \"preparing\" to \"uploading\"\r\n * @param extFile the extended file\r\n * @returns the extended file with uploadStatus updated to \"uploading\"\r\n */\r\nexport const instantPreparingToUploadOne = (\r\n    extFile: ExtFileInstance | ExtFile\r\n): ExtFileInstance | ExtFile => {\r\n    if (extFile.uploadStatus === \"preparing\") {\r\n        //for ExtFile instance\r\n        extFile.uploadStatus = \"uploading\";\r\n        //for ExtFile type\r\n        return {\r\n            ...extFile,\r\n            uploadStatus: \"uploading\",\r\n        };\r\n    }\r\n    return extFile;\r\n};\r\n\r\n/**\r\n * \r\n * @param extFile the extended file\r\n * @returns \r\n */\r\nexport const preparingToUploadOne = (\r\n    extFile: ExtFileInstance | ExtFile\r\n): Promise<ExtFileInstance | ExtFile> => {\r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            if (extFile.uploadStatus === \"preparing\") {\r\n                //for ExtFile instance\r\n                extFile.uploadStatus = \"uploading\";\r\n                //for ExtFile type\r\n                resolve({\r\n                    ...extFile,\r\n                    uploadStatus: \"uploading\",\r\n                });\r\n            } else\r\n                resolve(extFile);\r\n        }, 1500);\r\n    });\r\n};\r\n/**\r\n * Sleeps for 1200 miliseconds for showing a better transition\r\n * on uploading\r\n * @param time the time to sleep in miliseconds\r\n * @returns true is everything is ok\r\n */\r\nexport const sleepTransition = (time = 1500\r\n): Promise<boolean> => {\r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            resolve(true);\r\n        }, time);\r\n    });\r\n}\r\n/**\r\n * Removes the deleted files and updates the aborted ones with a message\r\n * @param arrExtFile incomming arr of extFle instances\r\n * @returns an array of ExtFle objects\r\n */\r\nexport const sanitizeArrExtFile = (arrExtFile: ExtFileInstance[]): ExtFile[] => {\r\n  \r\n    return arrExtFile.filter((extFileInstance: ExtFileInstance) =>\r\n        !extFileInstance.extraData?.deleted)\r\n\r\n        .map((extFileInstance: ExtFileInstance) => {\r\n            if (extFileInstance.uploadStatus === \"aborted\"\r\n                && !extFileInstance.uploadMessage) {\r\n                    // TO-DO: ad localization for this message\r\n                extFileInstance.uploadMessage = \"Upload aborted by user\";\r\n                //extFileInstance.uploadStatus = \"error\";\r\n            }\r\n            return ExtFileInstance.toExtFile(extFileInstance) as ExtFile\r\n        });\r\n}\r\n/**\r\n * \r\n * @param extFileInstance \r\n * @param extFileobj \r\n */\r\nexport const setNextUploadStatus = (\r\n    extFileInstance: ExtFileInstance,\r\n    extFileobj: ExtFile) => {\r\n\r\n    const prevStatus: UPLOADSTATUS | undefined = extFileInstance.uploadStatus;\r\n    const nextStstaus: UPLOADSTATUS | undefined = extFileobj.uploadStatus;\r\n\r\n    //console.log(\"setNextUploadStatus\", prevStatus, nextStstaus);\r\n    //console.log(\"setNextUploadStatus\", extFileInstance.uploadMessage, extFileobj.uploadMessage);\r\n    if (\r\n        prevStatus === \"preparing\" &&\r\n        [\"aborted\", undefined].includes(nextStstaus)\r\n    ) {\r\n        extFileInstance.uploadStatus = undefined;\r\n        extFileInstance.uploadMessage = extFileobj.uploadMessage;\r\n\r\n    } else if (\r\n        prevStatus === \"uploading\" &&\r\n        [\"aborted\", undefined].includes(nextStstaus)\r\n    ) {\r\n        extFileInstance.uploadStatus = \"aborted\";\r\n        extFileInstance.uploadMessage = extFileobj.uploadMessage;\r\n\r\n    }\r\n\r\n}\r\n\r\n","import { Method } from \"./method\"\r\n\r\nexport type UploadConfig = {\r\n    /**\r\n     * The url endpoint to upload the file.\r\n     * e.g. https://www.myasomwbackend/uploads/file\r\n     */\r\n    url?: string;\r\n    /**\r\n     * upload method, can be POST | PUT | PATCH\r\n     * @default \"POST\"\r\n     */\r\n    method?: Method;\r\n    /**\r\n     * Request headers for http request.\r\n     * e.g.\r\n     * ```jsx\r\n     * headers = { \r\n     *    \"content-type\": \"multipart/form-data\",\r\n     *    Authorization: \"Bearer YOUR_BEARER_TOKEN_GOES_HERE\",\r\n     * } \r\n     * ```\r\n     */\r\n    headers?: Record<string, string>;\r\n    /**\r\n     * the label to use in request\r\n     * On server this must be the label to get the file.\r\n     * @default \"file\"\r\n     */\r\n    uploadLabel?: string;\r\n    /**\r\n     * Flag for indicating whther to remove the non-valid files\r\n     * before starting the upload process.\r\n     * This flag is valid only if validation is enable\r\n     */\r\n    cleanOnUpload?: boolean;\r\n    /**\r\n     * If true, onDrop event or file selection not only will make Dropzone to return the list of files, but also\r\n     * it will start the upload stage for the files if at least url was set\r\n     * By default is false\r\n     */\r\n    autoUpload?: boolean;\r\n    /**\r\n     * The time that will last the \"preparing\" stage\r\n     * By default is 1500 miliseconds = 1.5 seconds\r\n     */\r\n    preparingTime?: number;\r\n    /**\r\n     * A message to show in the footer when the uploading process takes place.\r\n     */\r\n    uploadingMessage?: string;\r\n}\r\n\r\nexport const createUploadConfig = (\r\n    url?: string,\r\n    method?: Method,\r\n    headers?: Record<string, string>,\r\n    uploadLabel?: string,\r\n    cleanonUpload?: boolean\r\n) => {\r\n    return {\r\n        url,\r\n        method,\r\n        headers,\r\n        uploadLabel,\r\n        cleanonUpload\r\n    }\r\n}","import { createSyntheticFile } from \"../synthetic-file\"\r\nimport { ExtFile } from \"../types\"\r\nimport { FileIdGenerator } from \"../utils\"\r\nimport { listOfErrors } from \"../validation\"\r\n\r\nexport const extFileMock = (id?: number): ExtFile => {\r\n    return {\r\n        id: id || FileIdGenerator.getNextId(),\r\n        name: \"fileName.ext\",\r\n        size: 28 * 1024 * 1024,\r\n        type: \"files-ui/mock\",\r\n        file: createSyntheticFile(\"fileName.ext\", 28 * 1024 * 1024, \"files-ui/mock\"),\r\n        errors: listOfErrors,\r\n        uploadMessage: \"uploaded\",\r\n        uploadStatus: \"preparing\",\r\n        valid: false,\r\n        progress: 28,\r\n        xhr: new XMLHttpRequest(),\r\n        extraData: {\r\n            extraData1: \"files-ui is the best\",\r\n            extraData2: {\r\n                id: 1,\r\n                name: \"files-ui.mock\"\r\n            },\r\n            deleted: true\r\n        },\r\n        downloadUrl: \"https://www.files-ui.com/mock/file-download\"\r\n    }\r\n}","import { ExtFile, ExtFileInstance, ExtFileManager } from \"../types\";\r\n\r\nexport const extFileReconcilation = (\r\n    dropzoneId: number | string | undefined,\r\n    extFileIncomming: ExtFile[]\r\n): ExtFile[] | undefined => {\r\n    let result: ExtFile[] = [];\r\n\r\n    let arrOfExtFiles: ExtFileInstance[] | undefined =\r\n        ExtFileManager.getExtFileInstanceList(dropzoneId);\r\n\r\n    // continue only if arrOfExtFiles exists\r\n    if (arrOfExtFiles) {\r\n        //different sizes means there was deleted files\r\n        //also can be new files to be uploaded\r\n        //needed an extra flag to allow add files in the middle of uploading process\r\n        // if new files are added, they are added to the Manager\r\n        // outside they were already added to the UI\r\n        // inside Dropzone, will be needed a .next() method for manager\r\n\r\n        // 1st allow deleted files and ignore new ones\r\n        // reduce the arrOfExtFileInstances array\r\n        // parecido a listas ligadas, iterar hasta encontrar null XD\r\n        let incommingTemp: ExtFile[] = [...extFileIncomming];\r\n        incommingTemp = incommingTemp.filter(\r\n            (F) => arrOfExtFiles?.findIndex(I => I.id === F.id) === -1\r\n        );\r\n\r\n        //console.log(\"reconciliation incommingTemp\", incommingTemp);\r\n        \r\n\r\n        //different sizes not allowed\r\n        if (arrOfExtFiles.length !== extFileIncomming.length || extFileIncomming.length === 0) {\r\n            return undefined;\r\n        }\r\n        for (let i = 0; i < arrOfExtFiles.length; i++) {\r\n            if (\r\n                (extFileIncomming[i].uploadStatus === undefined)\r\n                &&\r\n                (arrOfExtFiles[i].uploadStatus === \"preparing\")\r\n            ) {\r\n                //console.log(\"useDropzoneFileListUpdater onCancel i\", i);\r\n                arrOfExtFiles[i].uploadStatus = undefined;\r\n            }\r\n        }\r\n    }\r\n\r\n    return result;\r\n}","\r\nimport { DropzoneLocalizerSelector } from \"../localization\";\r\nimport { ExtFile, ExtFileInstance, UploadResponse } from \"../types\";\r\n\r\n/**\r\n * Updates a extFile and sets its uploadStatus to \"uploading\"\r\n * @param extFile the extended file object\r\n * @returns the extended file with the uploadStatus attribute modified\r\n */\r\nexport const setPrepToUploading = (\r\n    extFile: ExtFile\r\n): Promise<ExtFile> => {\r\n    //console.log(\"prepToUpload One\", extFile);\r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            resolve({\r\n                ...extFile,\r\n                uploadStatus: \"uploading\",\r\n            });\r\n        }, 1500);\r\n\r\n    });\r\n};\r\n/**\r\n * Updates a extFile and sets its uploadStatus to \"success\"\r\n * @param extFile the extended file object\r\n * @returns the extended file with the uploadStatus attribute modified\r\n */\r\nexport const uploadOne = (\r\n    extFile: ExtFile\r\n): Promise<ExtFile> => {\r\n    //console.log(\"upload One\", extFile);\r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            resolve({\r\n                ...extFile,\r\n                uploadStatus: \"success\",\r\n            });\r\n        }, 2000);\r\n    });\r\n};\r\n/**\r\n * Awaits the given time before start uploading\r\n * @param preparingTime the time in miliseconds, by default it will wait 1.5 secs\r\n * @returns an empty object\r\n */\r\nexport const sleepPreparing = (\r\n    preparingTime: number = 5000\r\n): Promise<void> => {\r\n    //console.log(\"uploadfiles preparingTime One\", preparingTime);\r\n    return new Promise((resolve, reject) => {\r\n\r\n        setTimeout(() => {\r\n            resolve();\r\n        }, preparingTime);\r\n\r\n    });\r\n}\r\n\r\n/**\r\n * \r\n * @param extFileInstance \r\n * @returns \r\n */\r\nexport const prepToUploadOne = (\r\n    extFileInstance: ExtFileInstance | ExtFile\r\n): Promise<ExtFileInstance | ExtFile> => {\r\n    //console.log(\"prepToUpload One\", extFileInstance);\r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            extFileInstance.uploadStatus = \"uploading\";\r\n            resolve({\r\n                ...extFileInstance,\r\n                uploadStatus: \"uploading\",\r\n            });\r\n        }, 1500);\r\n\r\n    });\r\n};\r\n\r\n/**\r\n * \r\n * @param extFileInstance \r\n * @returns \r\n */\r\nexport const uploadOneExtFile = (\r\n    extFileInstance: ExtFileInstance\r\n): Promise<Object> => {\r\n    //console.log(\"upload One\", extFileInstance);\r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            extFileInstance.uploadStatus = \"success\";\r\n            resolve({\r\n                ...extFileInstance,\r\n                uploadStatus: \"success\",\r\n            });\r\n        }, 2000);\r\n    });\r\n};\r\n\r\n\r\n/**\r\n * \r\n * @param extFile the extFile to upload \r\n * @param DropzoneLocalizer the localization\r\n * @returns a duiUploadResponse object that describes the result\r\n */\r\nexport const fakeFuiUpload = (\r\n    extFileInstance: ExtFileInstance,\r\n    DropzoneLocalizer = DropzoneLocalizerSelector(\"EN-en\")\r\n): Promise<ExtFile> => {\r\n    \r\n    const extFile:ExtFile = extFileInstance.toExtFile();\r\n    \r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            const randomNumber: number = Math.floor(Math.random() * 10);\r\n            if (randomNumber % 2 === 0) {\r\n                const success = true;\r\n                const message = DropzoneLocalizer.fakeuploadsuccess as string;\r\n                const payload = { url: \"\" };\r\n                resolve({\r\n                    ...extFile,\r\n                    serverResponse: { success, message, payload },\r\n                    uploadStatus: \"success\",\r\n                    uploadMessage: message,\r\n\r\n                });\r\n            } else {\r\n                const success = false;\r\n                const message = DropzoneLocalizer.fakeUploadError as string;\r\n                const payload = {};\r\n                resolve({\r\n                    ...extFile,\r\n                    serverResponse: { success, message, payload },\r\n                    uploadStatus: \"error\",\r\n                    uploadMessage: message,\r\n                });\r\n            }\r\n        }, 1700);\r\n    });\r\n};\r\n\r\n\r\n/**\r\n * \r\n * @param extFile the extFile to upload \r\n * @param DropzoneLocalizer the localization\r\n * @returns a duiUploadResponse object that describes the result\r\n */\r\nexport const fakeFuiUploadExtFile = (\r\n    extFileInstance: ExtFileInstance,\r\n    DropzoneLocalizer = DropzoneLocalizerSelector(\"EN-en\")\r\n): Promise<UploadResponse> => {\r\n    \r\n    const extFile:ExtFile = extFileInstance.toExtFile();\r\n    \r\n    return new Promise((resolve, reject) => {\r\n        setTimeout(() => {\r\n            const randomNumber: number = Math.floor(Math.random() * 10);\r\n            if (randomNumber % 2 === 0) {\r\n                const status = true;\r\n                const message = DropzoneLocalizer.fakeuploadsuccess as string;\r\n                const payload = { url: \"\" };\r\n\r\n                resolve({\r\n                    id: extFile.id,\r\n                    serverResponse: { status, message, payload },\r\n                    uploadedFile: {\r\n                        ...extFile,\r\n                        uploadStatus: \"success\",\r\n                        uploadMessage: message,\r\n                        progress: 100\r\n                    }\r\n\r\n                });\r\n            } else {\r\n                const status = false;\r\n                const message = DropzoneLocalizer.fakeUploadError as string;\r\n                const payload = {};\r\n                resolve({\r\n                    id: extFile.id,\r\n                    serverResponse: { status, message, payload },\r\n                    uploadedFile: {\r\n                        ...extFile,\r\n                        uploadStatus: \"error\",\r\n                        uploadMessage: message,\r\n                        progress: 60\r\n                    },\r\n                });\r\n            }\r\n        }, 1700);\r\n    });\r\n};\r\n","import { ExtFile, ExtFileInstance } from \"../types\";\r\nimport { FileIdGenerator } from \"./IdGenerator\";\r\n\r\n\r\n/**\r\n * Converts the fileList into an array of separated ExtFile objects\r\n * @param fileList the FileList object given by input(event.target.files) or drop operation (event.dataTransfer)\r\n * @returns an array of ExtFile objects\r\n */\r\nexport const fileListToExtFileArray = (fileList: FileList): ExtFile[] => {\r\n    let extFileArray: ExtFile[] = [];\r\n    for (let i = 0, f: File; (f = fileList[i]); i++) {\r\n        extFileArray.push({ id: FileIdGenerator.getNextId(), file: f, name: f.name, size: f.size, type: f.type });\r\n    }\r\n    return extFileArray;\r\n};\r\n\r\n/**\r\n * Converts the fileList into an array of separated ExtFile instances\r\n * @param fileList the FileList object given by input (event.target.files) or drop operation (event.dataTransfer)\r\n * @returns an array of ExtFile instances\r\n */\r\nexport const fileListToExtFileInstanceArray = (fileList: FileList): ExtFileInstance[] => {\r\n    let extFileArray: ExtFileInstance[] = [];\r\n    for (let i = 0, f: File; (f = fileList[i]); i++) {\r\n        extFileArray.push(new ExtFileInstance({ id: FileIdGenerator.getNextId(), file: f, name: f.name, size: f.size, type: f.type  }));\r\n    }\r\n    return extFileArray;\r\n};","/**\r\n * Resize an image resolution given maxWidth and maxHeight\r\n * \r\n * Should be called with await\r\n * @param base64Str a string representation of an imae file\r\n * @param maxWidth the max width of he image\r\n * @param maxHeight the max height of he image\r\n * @returns the resized image\r\n */\r\nexport function getImageOrientation(\r\n    imageSource: string | undefined,\r\n): Promise<\"landscape\" | \"portrait\"> {\r\n    return new Promise((resolve, reject) => {\r\n        //console.log(\"getImageOrientation imageSource\", imageSource);\r\n        if (!imageSource || imageSource.length === 0) {\r\n           // console.log(\"getImageOrientation rejected\", imageSource);\r\n\r\n            reject(\"landscape\");\r\n            return;\r\n        }\r\n        try {\r\n            //console.log(\"getImageOrientation try ini\", imageSource);\r\n\r\n            let img: HTMLImageElement = new Image();\r\n            img.src = imageSource;\r\n            img.onerror = (ev: string | Event) => {\r\n                //console.log(\"getImageOrientation There was a ne error reading\", ev);\r\n                reject(\"landscape\");\r\n            }\r\n            img.onload = () => {\r\n                let width: number = img.width;\r\n                let height: number = img.height;\r\n                if (width > height) {\r\n                    resolve(\"landscape\");\r\n                } else {\r\n                    resolve(\"portrait\");\r\n                }\r\n            }\r\n        } catch (error) {\r\n            //console.error(\"An error ocurred when trying to get the image orientation\");\r\n\r\n            if (process.env.NODE_ENV === \"development\") {\r\n                console.error(\"An error ocurred when trying to get the image orientation\");\r\n            }\r\n            reject(\"landscape\");\r\n        }\r\n    });\r\n}\r\n\r\n","/**\r\n * \r\n * @param file \r\n * @param name \r\n * @param type \r\n * @param size \r\n * @returns the file name, type and size\r\n */\r\nexport const getLocalFileItemData = (\r\n    file: File | undefined,\r\n    name: string | undefined,\r\n    type: string | undefined,\r\n    size: number | undefined\r\n): [string, string | undefined, number | undefined] => {\r\n\r\n    let localFileName: string = \"\";\r\n    let localFileType: string | undefined = undefined;\r\n    let localFileSize: number | undefined = undefined;\r\n\r\n    // if file object is valid, obtain metadata from it\r\n    // otherwise try to get file data from individual props in string format\r\n    if (file && typeof file.name === \"string\") {\r\n        localFileName = file.name;\r\n        localFileType = file.type;\r\n        localFileSize = file.size;\r\n    } else if (name && typeof name === \"string\") {\r\n        localFileName = name;\r\n        localFileType = type;\r\n        localFileSize = size;\r\n    }\r\n    return [localFileName, localFileType, localFileSize]\r\n}","import { ExtFile } from \"../types\";\r\n\r\nexport const isUploadAbleExtFile = (extFile: ExtFile, validateFilesFlag: boolean) => {\r\n    return (!validateFilesFlag || (validateFilesFlag && extFile.valid)) && extFile.uploadStatus !== \"success\";\r\n}","export const isValidateActive = (\r\n    accept: string | undefined,\r\n    maxFileSize: number | undefined,\r\n    maxFiles: number | undefined,\r\n    validator: Function | undefined\r\n  ): boolean => {\r\n    return (\r\n      (accept !== undefined && accept !== null) ||\r\n      (maxFileSize !== undefined && maxFileSize !== null) ||\r\n      (maxFiles !== undefined && maxFiles !== null) ||\r\n      (validator !== undefined && validator !== null)\r\n    );\r\n  };\r\n  ","import { ExtFile, UPLOADSTATUS } from \"../types\";\r\nimport { FileIdGenerator, getRandomInt } from \"../utils\";\r\nimport { getRandomUploadStatus, listOfErrors } from \"../validation\";\r\n\r\n\r\n/**\r\n * Make a validated file that is ready to be used on FileItem component,\r\n * if valid is not set, a random operation will decide whether the file is valid or not\r\n * If valid is false, then the natural order is not to be uploadable and wont have upload message nor upload status\r\n * If valid is true, then file can be uploaded and can have upload message if the status is succes or error\r\n * @param file The file\r\n * @param valid true if it is a valid file, otherwise is false\r\n * @param uploadStatus the current upload status. If not given a random upload status will be set\r\n * @param uploadMessage the upload message after uploading\r\n * @returns a Vaidated File object\r\n */\r\n export const makeSyntheticExtFile = (\r\n    file?: File ,\r\n    valid = (Math.ceil(Math.random() * 28) % 2 === 0),\r\n    uploadStatus?: UPLOADSTATUS,\r\n    uploadMessage?: string\r\n): ExtFile => {\r\n    //if valid, naturally, can be uploaded\r\n    let errors: string[] | undefined = [];\r\n    let newUpoadStatus = uploadStatus || getRandomUploadStatus();\r\n\r\n    let customUploadMessage: string | undefined = uploadMessage || \"\";\r\n    if (valid) {\r\n        //we can decide according to upload status \r\n        if (!uploadMessage) {\r\n            switch (newUpoadStatus) {\r\n                case \"error\": customUploadMessage = \"Upload failed. There was an error\"; break;\r\n                case \"success\": customUploadMessage = \"File was successfully upload\"; break;\r\n                default: uploadMessage = undefined;\r\n            }\r\n        }\r\n        errors = undefined;\r\n    } else {\r\n        //if not valid, just show error messages\r\n        const randInt: number = getRandomInt(0, 3);\r\n        errors.push(listOfErrors[randInt]);\r\n        newUpoadStatus = undefined;\r\n        customUploadMessage = undefined;\r\n    }\r\n    //now make a File Validated instance \r\n    const newFileValidated: ExtFile = {\r\n        id: FileIdGenerator.getNextId(),\r\n        valid: valid,\r\n        file: file,\r\n        uploadStatus: newUpoadStatus,\r\n        uploadMessage: customUploadMessage,\r\n        errors: errors\r\n    };\r\n    return newFileValidated;\r\n}\r\n","import { UPLOADSTATUS } from \"../types\";\r\nimport { getRandomInt } from \"../utils/randomInt\";\r\n\r\n/**\r\n * Generates a random number betwen 0 and 3\r\n * where\r\n * 0 => error\r\n * 1 => uploading\r\n * 2 => success\r\n * 3 => undefined\r\n * @returns a random upload status or undefined\r\n */\r\n export const getRandomUploadStatus = (): UPLOADSTATUS | undefined => {\r\n    const result: number = getRandomInt(0, 4);\r\n    switch (result) {\r\n        case 0: return \"error\";\r\n        case 1: return \"uploading\";\r\n        case 2: return \"success\";\r\n        default:\r\n            return undefined;\r\n    }\r\n}","/**\r\n * Reads an image (or other type) file as data URL in a promise way, \r\n * so you can use await.\r\n * It will return a string that contains the URL representation\r\n * @param file File or Blob object\r\n * @returns data URL of the file\r\n */\r\nexport const readAsDataURL = (file: File | Blob, onProgress?: Function, onError?: Function): Promise<string | undefined> => {\r\n    return new Promise<string | undefined>((resolve, reject) => {\r\n        try {\r\n            const reader = new FileReader();\r\n            reader.onprogress = () => {\r\n                onProgress?.();\r\n            }\r\n            reader.onerror = function () {\r\n                onError?.();\r\n            }\r\n            reader.onload = function () {\r\n                resolve(reader.result as string);\r\n            }\r\n            reader.readAsDataURL(file);\r\n        } catch (error) {\r\n            reject(undefined);\r\n        }\r\n    });\r\n}\r\n\r\n\r\n\r\n/**\r\n * Reads a file as Text in a promise way, so you can use await.\r\n * If other kind of file is sent, this function will read it anyway\r\n * and will return a string that contains the URL representation\r\n * @param file File or Blob object\r\n * @param encoding The type of encoding such as \"base64\"\r\n * @returns data text of the file\r\n */\r\nexport const readAsText = (file: File | Blob, encoding?: string, onProgress?: Function, onError?: Function): Promise<string | undefined> => {\r\n    return new Promise<string | undefined>((resolve, reject) => {\r\n        try {\r\n            const reader = new FileReader();\r\n            reader.onload = function () {\r\n                resolve(reader.result as string);\r\n            }\r\n            reader.onprogress = () => {\r\n                onProgress?.();\r\n            }\r\n            reader.onerror = function () {\r\n                onError?.();\r\n            }\r\n            reader.readAsText(file, encoding ? encoding : \"base64\");\r\n        } catch (error) {\r\n            reject(undefined);\r\n        }\r\n    });\r\n}\r\n\r\n\r\n\r\n/**\r\n * Reads a file and return the raw binary data from the file. \r\n * @param file File or Blob object\r\n * @param encoding The type of encoding such as \"base64\"\r\n * @returns raw binary data of the file\r\n */\r\nexport const readAsBinaryString = (file: File | Blob, onProgress?: Function, onError?: Function): Promise<string | undefined> => {\r\n    return new Promise<string | undefined>((resolve, reject) => {\r\n        try {\r\n            const reader = new FileReader();\r\n            reader.onload = function () {\r\n                resolve(reader.result as string);\r\n            }\r\n            reader.onprogress = () => {\r\n                onProgress?.();\r\n            }\r\n            reader.onerror = function () {\r\n                onError?.();\r\n            }\r\n            reader.readAsBinaryString(file);\r\n        } catch (error) {\r\n            reject(undefined);\r\n        }\r\n    });\r\n}\r\n\r\n/**\r\n * Reads a file and returns an ArrayBuffer representing the file's data \r\n * @param file File or blob object\r\n * @param encoding The type of encoding such as \"base64\"\r\n * @returns ArrayBuffer representation of the file\r\n */\r\nexport const readAsArrayBuffer = (file: File | Blob, onProgress?: Function, onError?: Function): Promise<string | undefined> => {\r\n    return new Promise<string | undefined>((resolve, reject) => {\r\n        try {\r\n            const reader = new FileReader();\r\n            reader.onload = function () {\r\n                resolve(reader.result as string);\r\n            }\r\n            reader.onprogress = () => {\r\n                onProgress?.();\r\n            }\r\n            reader.onerror = function () {\r\n                onError?.();\r\n            }\r\n            reader.readAsArrayBuffer(file);\r\n        } catch (error) {\r\n            reject(undefined);\r\n        }\r\n    });\r\n}","/**\r\n * Resize an image resolution given maxWidth and maxHeight\r\n * \r\n * Should be called with await\r\n * @param base64Str a string representation of an imae file\r\n * @param maxWidth the max width of he image\r\n * @param maxHeight the max height of he image\r\n * @returns the resized image\r\n */\r\nexport function resizeImage(\r\n    base64Str: string,\r\n    maxWidth = 135,\r\n    maxHeight = 120\r\n): Promise<string | undefined> {\r\n    return new Promise((resolve, reject) => {\r\n        try {\r\n            let img: HTMLImageElement = new Image();\r\n            img.src = base64Str;\r\n            img.onload = () => {\r\n                let canvas: HTMLCanvasElement = document.createElement('canvas');\r\n                const MAX_WIDTH: number = maxWidth;\r\n                const MAX_HEIGHT: number = maxHeight;\r\n                let width: number = img.width;\r\n                let height: number = img.height;\r\n\r\n                if (maxWidth > width && maxHeight > height) {\r\n                    resolve(base64Str);\r\n                } else\r\n                    if (width > height) {\r\n                        if (width > MAX_WIDTH) {\r\n                            height *= MAX_WIDTH / width;\r\n                            width = MAX_WIDTH;\r\n                        }\r\n                    } else {\r\n                        if (height > MAX_HEIGHT) {\r\n                            width *= MAX_HEIGHT / height;\r\n                            height = MAX_HEIGHT;\r\n                        }\r\n                    }\r\n                canvas.width = width\r\n                canvas.height = height\r\n                let ctx: CanvasRenderingContext2D | null = canvas.getContext('2d')\r\n                if (ctx) {\r\n                    ctx.drawImage(img, 0, 0, width, height);\r\n                    resolve(canvas.toDataURL());\r\n\r\n                } else {\r\n                    if (process.env.NODE_ENV === \"development\") {\r\n                        console.error(\"An error ocurred when trying to make a thumnail\");\r\n                    }\r\n                    reject(undefined);\r\n                }\r\n            }\r\n        } catch (error) {\r\n            if (process.env.NODE_ENV === \"development\") {\r\n                console.error(\"An error ocurred when trying to make a thumnail\");\r\n            }\r\n            reject(undefined);\r\n        }\r\n    });\r\n}\r\n\r\n","/**\r\n * The max size of the word in characters\r\n */\r\nexport const DEFAULT_MAX_SIZE_WORD = 30;\r\n/**\r\n * \r\n * @param word the word to be shrinked\r\n * @returns the shrinked word\r\n */\r\nexport const shrinkWord = (word = \"\", card = false): string => {\r\n    let newWord = word;\r\n    if (card) {\r\n        if (word.length >= 20) {\r\n            newWord = word.slice(0, 10) + \"...\" + word.slice(-7);\r\n        }\r\n    } else if (word.length >= DEFAULT_MAX_SIZE_WORD) {\r\n        newWord = word.slice(0, 13) + \"...\" + word.slice(-8);\r\n    }\r\n    return newWord;\r\n};"],"names":["fileSizeFormater","fileSize","toFixed","DropzoneItalian","defaultLabel","uploadingMessage","amountOfFiles","uploadFinished","uploaded","rejected","concat","noFilesMessage","footer","acceptAll","acceptCustom","accept","header","uploadFilesMessage","maxSizeMessage","maxFileSize","validFilesMessage","numberOfValidFiles","maxFiles","fakeuploadsuccess","fakeUploadError","FileItemItalian","fullInfoLayer","name","size","type","status","preparing","uploading","success","valid","denied","error","aborted","ValidateErrorItalian","maxSizeError","maxSize","acceptError","maxFileCount","DropzoneFrench","FileItemFrench","ValidateErrorFrench","DropzoneEnglish","FileItemEnglish","ValidateErrorEnglish","DropzoneSpanish","FileItemSpanish","ValidateErrorSpanish","DropzoneRussian","FileItemRussian","ValidateErrorRussian","DropzonePortuguese","FileItemPortuguese","ValidateErrorPortuguese","DropzoneSimplifiedChinese","FileItemSimplifiedChinese","ValidateErrorSimplifiedChinese","DropzoneTraditionalChinese","FileItemTraditionalChinese","ValidateErrorTraditionalChinese","FileItemLocalizer","DropzoneLocalizer","DropzoneLocalizerSelector","local","ValidateErrorLocalizer","ValidateErrorLocalizerSelector","includes","sevenzip","aac","abw","accdb","avi","azw","bmp","bz","bz2","cda","csh","css","csv","docx","drawio","eot","epub","freearc","gif","gzip","html","icalendar","java","jar","javascript","jpeg","json","jsonld","midi","mp3","mp4","mpeg","mpkg","octet","odp","ods","odt","oga","ogv","ogx","opus","otf","pdf","php","png","pptx","psd","python","tar","rar","react","rtf","sass","sh","swf","text","tiff","ttf","typescript","vsd","vue","wav","webm","weba","webp","wma","wmv","woff","xlsx","xml","xul","zip","getExt","fileName","result","exec","DEF_GEN_MIME","audioSelector","tailMime","textSelector","imageSelector","fontSelector","videoSelector","applicationSelector","mimeSelector","mimeType","headerMime","split","extensionSelector","extension","genericMime","checkIsCode","mimeUrlList","arc","mp2t","xhtml","fallBack","ExtFileInstance","extFile","id","file","imageUrl","errors","uploadMessage","uploadStatus","progress","xhr","extraData","extraUploadData","serverResponse","downloadUrl","videoUrl","this","toExtFile","extFileInstance","extFileClone","extFileInstanceKeys","Object","keys","extFileInstanceValues","values","i","length","currentValue","currKey","undefined","prototype","ExtFileManager","getNextId","nextId","setFileList","extFilesInstances","fileLists","__spreadArray","createFileListMap","removeFileListMap","process","env","NODE_ENV","console","getExtFileInstanceList","setFileListMapPreparing","dropzoneId","localFiles","validateFiles","cleanOnUpload","resultExtList","temLocalFiles","filter","map","__assign","F","setFileListMapPreparing2","SyntheticFile","createFile","File","defineProperty","get","create_aac","create_abw","create_freearc","create_avi","create_azw","create_octet","create_bmp","create_bz","create_bz2","create_cda","create_csh","create_css","create_csv","create_doc","create_docx","create_eot","create_epub","create_gzip","create_gif","create_htm","create_html","create_ico","create_icalendar","create_jar","create_jpeg","create_jpg","create_js","create_json","create_jsonld","create_mid","create_x_mid","create_midi","create_x_midi","create_mjs","create_mp3","create_mp4","create_mpeg","create_mpkg","create_odp","create_ods","create_odt","create_oga","create_ogv","create_ogx","create_opus","create_otf","create_png","create_pdf","create_php","create_ppt","create_pptx","create_rar","create_rtf","create_sh","create_svg","create_swf","create_tar","create_tif","create_tiff","create_ts","create_ttf","create_text","create_typescript","create_vsd","create_wav","create_weba","create_webm","create_webp","create_woff","create_woff2","create_xhtml","create_xlsx","create_xls","create_xml","create_xml_txt","create_xul","create_zip","create_3gp","create_3gp2","create_3gp_a","create_3gp_v","create_7z","create_python","create_java","create_react","create_vue","createFileListMiscelanious","listFile","push","createSyntheticFile","FileIdGenerator","getRandomInt","min","max","Math","floor","random","separateAccept","acceptItem","trim","validateAccept","charAt","headerMimeFile","tailMimeFile","validateExtFile","validator","validatorProps","localErrors","extFileResult","errorsResult","apply","maxFileSizeErrorMessenger","isValid","validateFile","idGenerated","listOfErrors","addExtraData","formData","extraDataKeys","append","addHeaders","headers","headerKeys","setRequestHeader","TIMEOUT_ERROR_RESPONSE","message","payload","ABORTED_ERROR_RESPONSE","JSON_PARSE_ERROR_RESPONSE","UNEXPECTED_ERROR_RESPONSE","NO_XHR_PROVIDED_ERROR","JsonParseResponse","jsonResponse","JSON","parse","response","makeSuccessUploadResponse","responseFui","makeErrorUploadResponse","uploadFormData","method","endpoint","data","Promise","resolve","reject","finalMethod","toUpperCase","upload","onload","ontimeout","onabort","onloadend","e","__awaiter","onreadystatechange","readyState","open","send","NAMED_COLORS","indianred","lightcoral","salmon","darksalmon","lightsalmon","crimson","red","firebrick","darkred","pink","lightpink","hotpink","deeppink","mediumvioletred","palevioletred","coral","tomato","orangered","darkorange","orange","gold","yellow","lightyellow","lemonchiffon","lightgoldenrodyellow","papayawhip","moccasin","peachpuff","palegoldenrod","khaki","darkkhaki","lavender","thistle","plum","violet","orchid","fuchsia","magenta","mediumorchid","mediumpurple","rebeccapurple","blueviolet","darkviolet","darkorchid","darkmagenta","purple","indigo","slateblue","darkslateblue","mediumslateblue","greenyellow","chartreuse","lawngreen","lime","limegreen","palegreen","lightgreen","mediumspringgreen","springgreen","mediumseagreen","seagreen","forestgreen","green","darkgreen","yellowgreen","olivedrab","olive","darkolivegreen","mediumaquamarine","darkseagreen","lightseagreen","darkcyan","teal","aqua","cyan","lightcyan","paleturquoise","aquamarine","turquoise","mediumturquoise","darkturquoise","cadetblue","steelblue","lightsteelblue","powderblue","lightblue","skyblue","lightskyblue","deepskyblue","dodgerblue","cornflowerblue","royalblue","blue","mediumblue","darkblue","navy","midnightblue","cornsilk","blanchedalmond","bisque","navajowhite","wheat","burlywood","tan","rosybrown","sandybrown","goldenrod","darkgoldenrod","peru","chocolate","saddlebrown","sienna","brown","maroon","white","snow","honeydew","mintcream","azure","aliceblue","ghostwhite","whitesmoke","seashell","beige","oldlace","floralwhite","ivory","antiquewhite","linen","lavenderblush","mistyrose","gainsboro","lightgray","silver","darkgray","gray","dimgray","lightslategray","slategray","darkslategray","black","hexColorToRGB","colorInput","perc","defaultColor","resultDefault","color","replace","isHexColor","colourNameToHex","component1","component2","component3","hexTodec","hexArray","colour","toLocaleLowerCase","decArray","letter","indexOf","asureColor","DEFAULT_FONT_COLOR","baseClassName","className","percentage","brightedColor","increase","components","parseInt","inputElement","value","uploadStatusresult","uploadedFile","url","uploadLabel","cleanonUpload","darkedColor","reduce","XMLHttpRequest","extraData1","extraData2","deleted","extFileIncomming","arrOfExtFiles","incommingTemp","findIndex","I","setTimeout","fileList","extFileArray","f","preValidatedFiles","remainingValids","localValidator","localization","output","countdown","ValidationErrorLocalizer","validatedFile","maxFileErrorMessenger","Infinity","imageSource","img_1","Image","src","onerror","ev","width","height","localFileName","localFileType","localFileSize","customIcons","mimeResume","extention","customUrl","validateFilesFlag","ceil","newUpoadStatus","getRandomUploadStatus","customUploadMessage","randInt","onProgress","onError","reader_4","FileReader","onprogress","readAsArrayBuffer","reader_3","readAsBinaryString","reader_1","readAsDataURL","encoding","reader_2","readAsText","base64Str","maxWidth","maxHeight","canvas","document","createElement","MAX_WIDTH","MAX_HEIGHT","ctx","getContext","drawImage","toDataURL","arrExtFile","_a","extFileobj","prevStatus","nextStstaus","word","card","newWord","slice","preparingTime","time","extFileList","uploader","localMethod","fileToUpload","FormData","finalExtraData","otherValue","param2","tecnica","friend","age","addExtraDataUpload","label","_this","sent","localValidatorProps","fileListResult","remaining","currentExtFile"],"mappings":"oEAIQ,IAAMA,EAAmB,SAACC,GAE9B,GAAKA,EAiBL,OAdIA,EAAW,KACFA,EAAW,SAGhBA,EAAW,SACDA,EAAW,MAAMC,QAAQ,GAAK,MACjCD,EAAW,YACPA,EAAW,KAAQ,MAAMC,QAAQ,GAAK,MAC1CD,EAAW,eACNA,EAAW,KAAQ,KAAQ,MAAMC,QAAQ,GAAK,OAE7CD,EAAW,KAAQ,KAAQ,KAAQ,MAAMC,QAAQ,GAAK,KAI/E,EClBaC,EAA+B,CACxCC,aAAc,2BAEdC,iBAAkB,SAACC,GAAoB,MAAO,yBAAkBA,EAAa,QAAU,EACvFC,eAAgB,SAACC,EAAUC,GAAa,MAAA,kBAAAC,OAAkBF,EAAQ,sBAAAE,OAAqBD,EAAU,EACjGE,eAAgB,kDAChBC,OAAQ,CACJC,UAAW,sCACXC,aAAc,SAACC,GAAW,MAAA,4BAA4BL,OAAAK,EAAQ,GAElEC,OAAQ,CACJC,mBAAoB,cACpBC,eAAgB,SAACC,GAAgB,MAAA,sBAAsBT,OAAAS,EAAa,EACpEC,kBAAmB,SAACC,EAAoBC,GAAa,MAAA,SAAAZ,OAASW,EAAkB,KAAAX,OAAIY,EAAU,GAElGC,kBAAmB,yCACnBC,gBAAiB,kCAMRC,EAA+B,CACxCC,cAAe,CACXC,KAAM,SACNC,KAAM,eACNC,KAAM,UAEVC,OAAQ,CACJC,UAAU,eACVC,UAAW,WACXC,QAAS,WACTC,MAAO,SACPC,OAAQ,aACRC,MAAO,SACPC,QAAQ,eAMFC,EAAoC,CAC9CC,aAAc,SAACC,GAAY,MAAA,g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AAA,OAAA,GAAA,uEAI/B1T,EAAW,IAAIiT,UAEZ/S,OAAOuT,GAAS,OAAQxe,oBAGU,6BAAA,CAAA,EAAMqM,GAAe,IAAIuM,eAAkBtM,EAAQiM,EAAKxN,EAAUI,kBAAnG1K,EAAiCyc,EAA0EwB,OACjHhS,EAAQjM,gCAIRiM,EAAQf,8BAEf,GAAA,GACL,8CQtJyB,SACrB7L,GAGA,OAAO,IAAI2M,SAAQ,SAACC,EAASC,GACzB0M,YAAW,WACP3M,WACO5M,GAAO,CACVM,aAAc,YAErB,GAAE,IACP,GACJ,2BA6CgC,SAC5BU,GAGA,OAAO,IAAI2L,SAAQ,SAACC,EAASC,GACzB0M,YAAW,WACPvY,EAAgBV,aAAe,UAC/BsM,WACO5L,GAAe,CAClBV,aAAc,YAErB,GAAE,IACP,GACJ,mFdhCmC,SAC/Bwd,EACAlE,EACAiF,EACAxU,EACAxT,EACAijB,GAGA,IAAIgF,EAA4B,GAChC,IAAKlF,EAAiB,OAAOkF,EAK7B,IAJA,IAAIC,EAAoBnF,EAClBK,EACFrgB,EAA+BkgB,GAC7BK,EAAuCF,EAAyBhiB,aAC7DsJ,EAAI,EAAGA,EAAIuc,EAAYtc,OAAQD,IAAK,CACzC,IAAIyd,EAA0BlB,EAAYvc,GAK1C,IAHAyd,EAAiB5U,GAAgB4U,EAAgB3U,EAAWwU,EAAqB5E,IAG9DxiB,MAAO,CAEtB,IAAMA,EAAQsnB,EAAY,EAC1BC,EAAevnB,MAAQA,EAElBA,IACDunB,EAAe5e,OAAS4e,EAAe5e,OAClC+B,GAAAA,GAAA,GAAK6c,EAAe5e,YAAQ+Z,EAAsBtjB,GAAYujB,UAC7D,CAACD,EAAsBtjB,GAAYujB,OAE7C2E,GACH,CACDD,EAAe1V,KAAK4V,EAEvB,CACD,OAAOF,CACX"}
\ No newline at end of file
diff --git a/src/core/localization/Chinese-simplified/localization.simplifiedChinese.d.ts b/src/core/localization/Chinese-simplified/localization.simplifiedChinese.d.ts
new file mode 100644
index 0000000..86e19f4
--- /dev/null
+++ b/src/core/localization/Chinese-simplified/localization.simplifiedChinese.d.ts
@@ -0,0 +1,13 @@
+import { LocalLabels } from "../../types";
+/**
+ * English translation for Dropzone component
+ */
+export declare const DropzoneSimplifiedChinese: LocalLabels;
+/**
+ * Chinnese translation for FileItem component
+ */
+export declare const FileItemSimplifiedChinese: LocalLabels;
+/**
+ * English translation for Validation Errors
+ */
+export declare const ValidateErrorSimplifiedChinese: LocalLabels;
diff --git a/src/core/localization/Chinese-traditional/localization.traditionalChinese.d.ts b/src/core/localization/Chinese-traditional/localization.traditionalChinese.d.ts
new file mode 100644
index 0000000..49e8ee4
--- /dev/null
+++ b/src/core/localization/Chinese-traditional/localization.traditionalChinese.d.ts
@@ -0,0 +1,13 @@
+import { LocalLabels } from "../../types";
+/**
+ * English translation for Dropzone component
+ */
+export declare const DropzoneTraditionalChinese: LocalLabels;
+/**
+ * Chinese translation for FileItem component
+ */
+export declare const FileItemTraditionalChinese: LocalLabels;
+/**
+ * English translation for Validation Errors
+ */
+export declare const ValidateErrorTraditionalChinese: LocalLabels;
diff --git a/src/core/localization/English/localization.english.d.ts b/src/core/localization/English/localization.english.d.ts
new file mode 100644
index 0000000..85e31db
--- /dev/null
+++ b/src/core/localization/English/localization.english.d.ts
@@ -0,0 +1,13 @@
+import { LocalLabels } from "../../types";
+/**
+ * English translation for Dropzone component
+ */
+export declare const DropzoneEnglish: LocalLabels;
+/**
+ * English translation for FileItem component
+ */
+export declare const FileItemEnglish: LocalLabels;
+/**
+ * English translation for Validation Errors
+ */
+export declare const ValidateErrorEnglish: LocalLabels;
diff --git a/src/core/localization/FileItem.localization.d.ts b/src/core/localization/FileItem.localization.d.ts
new file mode 100644
index 0000000..b1a9b14
--- /dev/null
+++ b/src/core/localization/FileItem.localization.d.ts
@@ -0,0 +1,8 @@
+import { ComponentLocalizer, LocalLabels, Localization } from "../types";
+export declare const FileItemLocalizer: ComponentLocalizer;
+/**
+ * Secure translation through a selector
+ * @param local the Localization
+ * @returns a ComponentLocalizer object that contains the translation
+ */
+export declare const FileItemLocalizerSelector: (local?: Localization) => LocalLabels;
diff --git a/src/core/localization/French/localization.french.d.ts b/src/core/localization/French/localization.french.d.ts
new file mode 100644
index 0000000..ebdaf57
--- /dev/null
+++ b/src/core/localization/French/localization.french.d.ts
@@ -0,0 +1,13 @@
+import { LocalLabels } from "../../types";
+/**
+ * French translation for Dropzone component
+ */
+export declare const DropzoneFrench: LocalLabels;
+/**
+ * French translation for FileItem component
+ */
+export declare const FileItemFrench: LocalLabels;
+/**
+ * French translation for Validation Errors
+ */
+export declare const ValidateErrorFrench: LocalLabels;
diff --git a/src/core/localization/Italian/localization.italian.d.ts b/src/core/localization/Italian/localization.italian.d.ts
new file mode 100644
index 0000000..5ee58b5
--- /dev/null
+++ b/src/core/localization/Italian/localization.italian.d.ts
@@ -0,0 +1,13 @@
+import { LocalLabels } from "../../types";
+/**
+ * Italian translation for Dropzone component
+ */
+export declare const DropzoneItalian: LocalLabels;
+/**
+ * Italian translation for FileItem component
+ */
+export declare const FileItemItalian: LocalLabels;
+/**
+ * Italian translation for Validation Errors
+ */
+export declare const ValidateErrorItalian: LocalLabels;
diff --git a/src/core/localization/Portuguese/localization.portuguese.d.ts b/src/core/localization/Portuguese/localization.portuguese.d.ts
new file mode 100644
index 0000000..bafe87d
--- /dev/null
+++ b/src/core/localization/Portuguese/localization.portuguese.d.ts
@@ -0,0 +1,13 @@
+import { LocalLabels } from "../../types";
+/**
+ * Portuguese translation for Dropzone
+ */
+export declare const DropzonePortuguese: LocalLabels;
+/**
+ * Portuguese translation for FileItem component
+ */
+export declare const FileItemPortuguese: LocalLabels;
+/**
+ * Portuguese translation for Validation Errors
+ */
+export declare const ValidateErrorPortuguese: LocalLabels;
diff --git a/src/core/localization/Russian/localization.russian.d.ts b/src/core/localization/Russian/localization.russian.d.ts
new file mode 100644
index 0000000..3e68a80
--- /dev/null
+++ b/src/core/localization/Russian/localization.russian.d.ts
@@ -0,0 +1,14 @@
+import { LocalLabels } from "../../types";
+/**
+ * Russian translation for Dropzone component
+ */
+export declare const DropzoneRussian: LocalLabels;
+/**
+ * Russian translation for FileItem component
+ *
+ */
+export declare const FileItemRussian: LocalLabels;
+/**
+ * Russian translation for Validation Errors
+ */
+export declare const ValidateErrorRussian: LocalLabels;
diff --git a/src/core/localization/Spanish/localization.spanish.d.ts b/src/core/localization/Spanish/localization.spanish.d.ts
new file mode 100644
index 0000000..75c9376
--- /dev/null
+++ b/src/core/localization/Spanish/localization.spanish.d.ts
@@ -0,0 +1,13 @@
+import { LocalLabels } from "../../types";
+/**
+ * Spanish translation for Dropzone component
+ */
+export declare const DropzoneSpanish: LocalLabels;
+/**
+ * Spanish translation for FileItem component
+ */
+export declare const FileItemSpanish: LocalLabels;
+/**
+ * Spanish translation for Validation Errors
+ */
+export declare const ValidateErrorSpanish: LocalLabels;
diff --git a/src/core/localization/avatar.localization.d.ts b/src/core/localization/avatar.localization.d.ts
new file mode 100644
index 0000000..3130a0a
--- /dev/null
+++ b/src/core/localization/avatar.localization.d.ts
@@ -0,0 +1,11 @@
+import { ComponentLocalizer, LocalLabels, Localization } from "../types";
+/**
+ * TO-DO: Add Avatar localization in next release, inthe meanwhile it accepts custom labels
+ */
+export declare const AvatarLocalizer: ComponentLocalizer;
+/**
+ * Secure translation through a selector
+ * @param local the Localization
+ * @returns a ComponentLocalizer object that contains the translation
+ */
+export declare const AvatarLocalizerSelector: (local?: Localization) => LocalLabels;
diff --git a/src/core/localization/dropzone.localization.d.ts b/src/core/localization/dropzone.localization.d.ts
new file mode 100644
index 0000000..cdd1082
--- /dev/null
+++ b/src/core/localization/dropzone.localization.d.ts
@@ -0,0 +1,8 @@
+import { ComponentLocalizer, Localization, LocalLabels } from "../types";
+export declare const DropzoneLocalizer: ComponentLocalizer;
+/**
+ * Secure translation through a selector
+ * @param local the Localization
+ * @returns a ComponentLocalizer object that contains the translation
+ */
+export declare const DropzoneLocalizerSelector: (local: Localization | undefined) => LocalLabels;
diff --git a/src/core/localization/index.d.ts b/src/core/localization/index.d.ts
new file mode 100644
index 0000000..440cac8
--- /dev/null
+++ b/src/core/localization/index.d.ts
@@ -0,0 +1,14 @@
+import { FileItemItalian, DropzoneItalian, ValidateErrorItalian } from "./Italian/localization.italian";
+import { FileItemFrench, DropzoneFrench, ValidateErrorFrench } from "./French/localization.french";
+import { FileItemEnglish, DropzoneEnglish, ValidateErrorEnglish } from "./English/localization.english";
+import { FileItemSpanish, DropzoneSpanish, ValidateErrorSpanish } from "./Spanish/localization.spanish";
+import { FileItemRussian, DropzoneRussian, ValidateErrorRussian } from "./Russian/localization.russian";
+import { FileItemPortuguese, DropzonePortuguese, ValidateErrorPortuguese } from "./Portuguese/localization.portuguese";
+import { FileItemSimplifiedChinese, DropzoneSimplifiedChinese, ValidateErrorSimplifiedChinese } from "./Chinese-simplified/localization.simplifiedChinese";
+import { FileItemTraditionalChinese, DropzoneTraditionalChinese, ValidateErrorTraditionalChinese } from "./Chinese-traditional/localization.traditionalChinese";
+import { FileItemLocalizerSelector, FileItemLocalizer } from "./FileItem.localization";
+import { DropzoneLocalizerSelector, DropzoneLocalizer } from "./dropzone.localization";
+import { ValidateErrorLocalizer, ValidateErrorLocalizerSelector } from "./validationError.localization";
+export { ValidateErrorLocalizerSelector, ValidateErrorLocalizer, ValidateErrorItalian, ValidateErrorFrench, ValidateErrorEnglish, ValidateErrorSpanish, ValidateErrorPortuguese, ValidateErrorRussian, ValidateErrorSimplifiedChinese, ValidateErrorTraditionalChinese };
+export { DropzoneLocalizerSelector, DropzoneLocalizer, DropzoneItalian, DropzoneFrench, DropzoneEnglish, DropzoneSpanish, DropzonePortuguese, DropzoneRussian, DropzoneSimplifiedChinese, DropzoneTraditionalChinese };
+export { FileItemLocalizerSelector, FileItemLocalizer, FileItemItalian, FileItemFrench, FileItemEnglish, FileItemSpanish, FileItemPortuguese, FileItemRussian, FileItemSimplifiedChinese, FileItemTraditionalChinese };
diff --git a/src/core/localization/validationError.localization.d.ts b/src/core/localization/validationError.localization.d.ts
new file mode 100644
index 0000000..8284ffa
--- /dev/null
+++ b/src/core/localization/validationError.localization.d.ts
@@ -0,0 +1,8 @@
+import { ComponentLocalizer, LocalLabels, Localization } from "./../types";
+export declare const ValidateErrorLocalizer: ComponentLocalizer;
+/**
+ * Secure translation through a selector
+ * @param local the Localization
+ * @returns a ComponentLocalizer object that contains the translation
+ */
+export declare const ValidateErrorLocalizerSelector: (local: Localization | undefined) => LocalLabels;
diff --git a/src/core/mime/icons.d.ts b/src/core/mime/icons.d.ts
new file mode 100644
index 0000000..a36bfb9
--- /dev/null
+++ b/src/core/mime/icons.d.ts
@@ -0,0 +1,89 @@
+export declare const sevenzip = "https://user-images.githubusercontent.com/43678736/132086517-72a51a12-e403-4675-bfd7-22c23affa730.png";
+export declare const aac = "https://user-images.githubusercontent.com/43678736/132086518-7026d4f1-ea16-4ed0-89fd-37c1aa8ac3ed.png";
+export declare const abw = "https://user-images.githubusercontent.com/43678736/132086519-863c63b4-917e-4471-94ff-7e15651cc14b.png";
+export declare const accdb = "https://user-images.githubusercontent.com/43678736/132086520-9bc6aa3b-51c9-4da2-9ef7-349162b86d0b.png";
+export declare const avi = "https://user-images.githubusercontent.com/43678736/132086521-dbd6cf0d-d4d7-4b92-bb26-17e8a51a9383.png";
+export declare const azw = "https://user-images.githubusercontent.com/43678736/132086522-070f48e8-78a8-4294-8dbb-aab81525e164.png";
+export declare const bmp = "https://user-images.githubusercontent.com/43678736/132086595-90ab7f90-f87e-4900-94d9-d0b26745df48.png";
+export declare const bz = "https://user-images.githubusercontent.com/43678736/132086597-e285ad5c-613a-4679-a270-493e5be4ffd9.png";
+export declare const bz2 = "https://user-images.githubusercontent.com/43678736/132086598-623c410a-084a-4395-a448-211b2ff61cfe.png";
+export declare const c = "https://user-images.githubusercontent.com/43678736/132086599-7a5cd692-b4df-45f5-80d9-384cb3e0c314.png";
+export declare const cda = "https://user-images.githubusercontent.com/43678736/132086600-8b70a007-512d-4252-9c66-eabd3ddd6573.png";
+export declare const csh = "https://user-images.githubusercontent.com/43678736/132086601-e62e5d1a-d8a2-4475-a14f-85922cec9272.png";
+export declare const css = "https://user-images.githubusercontent.com/43678736/132086602-4c772934-f608-4f01-8459-c4622cee8ad5.png";
+export declare const csv = "https://user-images.githubusercontent.com/43678736/132086604-b5b019fe-572e-477e-92c2-3769a48a1304.png";
+export declare const docx = "https://user-images.githubusercontent.com/43678736/132086606-715ccb66-4702-4f7d-9b09-ac93ba17b643.png";
+export declare const docx2 = "https://user-images.githubusercontent.com/43678736/132086607-a246b386-52c9-4fe1-a7e4-204894e6722d.png";
+export declare const drawio = "https://user-images.githubusercontent.com/43678736/132086608-bcae9d57-8e54-488c-90c4-4952ae530b5e.png";
+export declare const dw = "https://user-images.githubusercontent.com/43678736/132086616-0c7842d6-d20e-4ede-988b-3dd063a4de8d.png";
+export declare const eml = "https://user-images.githubusercontent.com/43678736/132086617-1e351075-ffaf-4b81-a1fe-0b7b338772a2.png";
+export declare const eot = "https://user-images.githubusercontent.com/43678736/132086618-397d6bd2-9fda-43ed-a135-cb40388c35af.png";
+export declare const eps = "https://user-images.githubusercontent.com/43678736/132086619-9daf0b61-dbb0-4d47-8a12-9fba13b88856.png";
+export declare const epub = "https://user-images.githubusercontent.com/43678736/132086620-2586ba40-c583-4589-b1a4-8bb5b258b44d.png";
+export declare const freearc = "https://user-images.githubusercontent.com/43678736/132086621-3b95fb64-2533-4ccc-abcd-bd2beba572e9.png";
+export declare const gif = "https://user-images.githubusercontent.com/43678736/132086622-af705a0c-2b25-4ba7-8ab6-bd69ec97f7e2.png";
+export declare const gzip = "https://user-images.githubusercontent.com/43678736/132086624-89141a46-64e4-4fa0-bf69-54a0eb4d48c9.png";
+export declare const html = "https://user-images.githubusercontent.com/43678736/132086625-1b8f2652-1de0-4475-8c12-7da4a9973ffb.png";
+export declare const icalendar = "https://user-images.githubusercontent.com/43678736/132086626-38699705-1e6f-4bca-984b-03167b236faa.png";
+export declare const ind = "https://user-images.githubusercontent.com/43678736/132086627-2f24067a-00bc-424a-af36-349a9ba14b6c.png";
+export declare const ini = "https://user-images.githubusercontent.com/43678736/132086649-20c9c9e6-8e63-4d87-9b8e-8fe8eba12ada.png";
+export declare const java = "https://user-images.githubusercontent.com/43678736/132086650-f1166246-b361-4c30-a04e-9781c555d14a.png";
+export declare const jar = "https://user-images.githubusercontent.com/43678736/132086650-f1166246-b361-4c30-a04e-9781c555d14a.png";
+export declare const javascript = "https://user-images.githubusercontent.com/43678736/132086652-4562942e-aaea-466c-968f-380fffabf3f9.png";
+export declare const jpeg = "https://user-images.githubusercontent.com/43678736/132086653-0487e7e2-1ee3-49e2-8cfe-3e20f1f7490a.png";
+export declare const jsf = "https://user-images.githubusercontent.com/43678736/132086654-c510bd8f-8de7-4afe-8c20-cc810b004b07.png";
+export declare const json = "https://user-images.githubusercontent.com/43678736/132086656-6e96c815-e4e2-4ffd-9d71-57e9cc2450bc.png";
+export declare const jsonld = "https://user-images.githubusercontent.com/43678736/132086658-5d27d3c2-394f-43fb-b512-9b414a257875.png";
+export declare const midi = "https://user-images.githubusercontent.com/43678736/132086659-98f3ef6e-b9f3-4b6d-b18f-469b5334ba27.png";
+export declare const mov = "https://user-images.githubusercontent.com/43678736/132086660-adcecedd-56b4-4286-8b0f-69417f77e961.png";
+export declare const mp3 = "https://user-images.githubusercontent.com/43678736/132086661-a5484553-06c7-4ffa-a8f9-96b57b1b0344.png";
+export declare const mp4 = "https://user-images.githubusercontent.com/43678736/132086662-05ad1597-d5e5-4efa-833e-2876e966a745.png";
+export declare const mpeg = "https://user-images.githubusercontent.com/43678736/132086663-90c58955-f7fb-4bdb-ac53-92667d16d4a3.png";
+export declare const mpkg = "https://user-images.githubusercontent.com/43678736/132086664-9a7530e7-6d78-4ef3-a176-20cf7f57b555.png";
+export declare const octet = "https://user-images.githubusercontent.com/43678736/132086666-ab3c505d-b2c0-4177-9a06-aed5d9c39ee4.png";
+export declare const odp = "https://user-images.githubusercontent.com/43678736/132086667-6c7dcbcc-8d83-41a2-8e0a-85b09e2791ae.png";
+export declare const ods = "https://user-images.githubusercontent.com/43678736/132086668-9f246e91-cf2e-49cf-9617-e1fbb71abbbb.png";
+export declare const odt = "https://user-images.githubusercontent.com/43678736/132086669-46113762-84d1-4b32-9441-b0138ce17a5d.png";
+export declare const oga = "https://user-images.githubusercontent.com/43678736/145835364-2054509d-3448-4d34-921f-73dd6e297fc7.png";
+export declare const ogv = "https://user-images.githubusercontent.com/43678736/145835367-19172bf8-cd5a-4cbe-b512-d0de1d91f269.png";
+export declare const ogx = "https://user-images.githubusercontent.com/43678736/145835373-a57ef0f5-3968-483b-9f55-6d67e7f1dcea.png";
+export declare const opus = "https://user-images.githubusercontent.com/43678736/132086670-0f96e770-cedc-4635-a5f9-cf97894c1d7a.png";
+export declare const otf = "https://user-images.githubusercontent.com/43678736/132086671-02ad35ef-ec3a-4a65-abd5-5bf794dfcf7b.png";
+export declare const pdf = "https://user-images.githubusercontent.com/43678736/132086672-3a856fda-823d-4997-b802-c7c640e6ef44.png";
+export declare const php = "https://user-images.githubusercontent.com/43678736/132086673-0c4409ab-754e-4619-8cfa-179d0ccf1bd9.png";
+export declare const png = "https://user-images.githubusercontent.com/43678736/132086674-fdb56d02-5845-49b7-8462-6357bc963464.png";
+export declare const pptx = "https://user-images.githubusercontent.com/43678736/132086675-c879645d-acb4-41a6-ab3c-4e6c2048badb.png";
+export declare const pptx2 = "https://user-images.githubusercontent.com/43678736/132086676-6de1bbd7-764f-4197-9aa4-405a60ce6734.png";
+export declare const proj = "https://user-images.githubusercontent.com/43678736/132086683-3dc0a8b8-72f8-4fa1-a08a-fcfd75b465e1.png";
+export declare const psd = "https://user-images.githubusercontent.com/43678736/132086685-4e327c4c-a409-4b83-b36a-8d88936b314b.png";
+export declare const pst = "https://user-images.githubusercontent.com/43678736/132086686-3888e43a-5abf-41f7-9940-4b86e436521f.png";
+export declare const publisher = "https://user-images.githubusercontent.com/43678736/132086687-d92b56ff-f7f7-4be7-bbf4-47b8a33f4c6f.png";
+export declare const python = "https://user-images.githubusercontent.com/43678736/132086688-8e82fae4-3a9b-49c0-bf99-77189525514c.png";
+export declare const tar = "https://user-images.githubusercontent.com/43678736/132086689-fe1fef9f-d2db-455b-8f4b-09acd095f571.png";
+export declare const rar = "https://user-images.githubusercontent.com/43678736/132086689-fe1fef9f-d2db-455b-8f4b-09acd095f571.png";
+export declare const react = "https://user-images.githubusercontent.com/43678736/132086691-d472576b-ec6a-4332-acd2-dd6a00b72952.png";
+export declare const richtextformat = "https://user-images.githubusercontent.com/43678736/132086692-df6e3518-2e6a-4553-883d-e21694980449.png";
+export declare const rtf = "https://user-images.githubusercontent.com/43678736/132086693-9d43571e-0c86-438f-b247-e2cb42e19e06.png";
+export declare const sass = "https://user-images.githubusercontent.com/43678736/132086694-4e661d6a-1118-441e-8bc3-c52fcb2133b6.png";
+export declare const settings = "https://user-images.githubusercontent.com/43678736/132086696-0dd21f83-b9fc-490c-9ed5-bd88151dc9bb.png";
+export declare const sh = "https://user-images.githubusercontent.com/43678736/132086697-1d82d724-35b6-4f06-847a-3c59a5deda6e.png";
+export declare const swf = "https://user-images.githubusercontent.com/43678736/132086698-19384230-dbd7-4e05-bc69-ef4537b6aae3.png";
+export declare const text = "https://user-images.githubusercontent.com/43678736/132086699-5993a482-04f4-4915-b105-9037f527cf61.png";
+export declare const tiff = "https://user-images.githubusercontent.com/43678736/132086700-c23461c8-6819-46e1-aecd-0a1f8d3507bb.png";
+export declare const ttf = "https://user-images.githubusercontent.com/43678736/132086701-c8044c09-8d95-4af1-9410-66761001d7da.png";
+export declare const typescript = "https://user-images.githubusercontent.com/43678736/132086702-59294337-ed99-4302-badd-316b2c1ff62f.png";
+export declare const url = "https://user-images.githubusercontent.com/43678736/132086703-86d97476-b76e-4949-b89a-31ecb03f3b6e.png";
+export declare const vsd = "https://user-images.githubusercontent.com/43678736/132086704-8fd51e7c-afa2-47a3-ab2f-d0bcd0ecae9f.png";
+export declare const vue = "https://user-images.githubusercontent.com/43678736/132086705-33294da1-5c0f-49f7-b890-e4857cec0a6d.png";
+export declare const wav = "https://user-images.githubusercontent.com/43678736/132086706-22f805d0-39d4-494b-824e-47dc75d05eb7.png";
+export declare const webm = "https://user-images.githubusercontent.com/43678736/132086707-e61a84de-d396-4dbf-8d1b-1d6ee19e1ac8.png";
+export declare const weba = "https://user-images.githubusercontent.com/43678736/132086707-e61a84de-d396-4dbf-8d1b-1d6ee19e1ac8.png";
+export declare const webp = "https://user-images.githubusercontent.com/43678736/132086708-21d096dd-7148-40aa-97f1-cbb099339740.png";
+export declare const wma = "https://user-images.githubusercontent.com/43678736/132086709-811d4e90-3cfa-4044-a956-aeda9c67fc92.png";
+export declare const wmv = "https://user-images.githubusercontent.com/43678736/132086710-c5479c6c-0249-4542-adad-48b0ef40b775.png";
+export declare const woff = "https://user-images.githubusercontent.com/43678736/132086711-1524a3e7-3e33-4822-a34f-ff3235404045.png";
+export declare const xlsx = "https://user-images.githubusercontent.com/43678736/132086712-17e2c491-f6e4-4586-aef6-06bcc5f4b0e5.png";
+export declare const xlsx2 = "https://user-images.githubusercontent.com/43678736/132086714-7ddf285d-2b83-4115-80a5-f02f510300a1.png";
+export declare const xml = "https://user-images.githubusercontent.com/43678736/132086715-204b5a8b-9c5a-4bac-8294-9237ebc16089.png";
+export declare const xul = "https://user-images.githubusercontent.com/43678736/132086716-64511d20-58cb-45a8-85df-f4d9408b469d.png";
+export declare const zip = "https://user-images.githubusercontent.com/43678736/132086718-a8499333-6282-4820-aa1f-4d133eb54648.png";
diff --git a/src/core/mime/index.d.ts b/src/core/mime/index.d.ts
new file mode 100644
index 0000000..3549a7a
--- /dev/null
+++ b/src/core/mime/index.d.ts
@@ -0,0 +1,3 @@
+import { aac, abw, accdb, avi, azw, bmp, bz, bz2, cda, csh, css, csv, docx, drawio, eot, epub, freearc, gif, gzip, html, icalendar, jar, java, javascript, jpeg, json, jsonld, midi, mp3, mp4, mpeg, mpkg, octet, odp, ods, odt, oga, ogv, ogx, opus, otf, pdf, php, png, pptx, psd, python, rar, react, rtf, sass, sevenzip, sh, swf, tar, text, tiff, ttf, typescript, vsd, vue, wav, weba, webm, webp, wma, wmv, woff, xlsx, xml, xul, zip } from "./icons";
+export { aac, abw, accdb, avi, azw, bmp, bz, bz2, cda, csh, css, csv, docx, drawio, eot, epub, freearc, gif, gzip, html, icalendar, jar, java, javascript, jpeg, json, jsonld, midi, mp3, mp4, mpeg, mpkg, octet, odp, ods, odt, oga, ogv, ogx, opus, otf, pdf, php, png, pptx, psd, python, rar, react, rtf, sass, sevenzip, sh, swf, tar, text, tiff, ttf, typescript, vsd, vue, wav, weba, webm, webp, wma, wmv, woff, xlsx, xml, xul, zip };
+export { applicationSelector, audioSelector, checkIsCode, extensionSelector, fontSelector, getURLFileIco, imageSelector, mimeSelector, textSelector, videoSelector, getURLFileIcoFromNameAndType, } from "./mime";
diff --git a/src/core/mime/mime.d.ts b/src/core/mime/mime.d.ts
new file mode 100644
index 0000000..3b88f13
--- /dev/null
+++ b/src/core/mime/mime.d.ts
@@ -0,0 +1,56 @@
+import { IconsMap } from "../types";
+/**
+ *
+ * @param tailMime
+ * @returns
+ */
+export declare const audioSelector: (tailMime: string) => keyof IconsMap;
+export declare const textSelector: (tailMime: string) => keyof IconsMap;
+export declare const imageSelector: (tailMime: string) => keyof IconsMap;
+export declare const fontSelector: (tailMime: string) => keyof IconsMap;
+export declare const videoSelector: (tailMime: string) => keyof IconsMap;
+/**
+ *
+ * @param tailMime
+ * @returns
+ */
+export declare const applicationSelector: (tailMime: string) => keyof IconsMap;
+/**
+ * Selects to wich mime type the mime type given belongs to
+ * @param mimeType mime type to be searched
+ * @returns the generic type,
+if not found it return "octet" that means generic binary file
+ */
+export declare const mimeSelector: (mimeType?: string) => keyof IconsMap;
+/**
+ * Selects to wich mapped extension
+ * the given exension belongs to
+ *
+ * @param extension
+ * @returns
+ */
+export declare const extensionSelector: (extension?: string) => keyof IconsMap;
+/**
+ * Chack for extention whether the file is code os not
+ * @param extension
+ * @returns
+ */
+export declare const checkIsCode: (extension?: string) => keyof IconsMap;
+/**
+ * Looks for a suitable file icon
+ * If not found, returns octet-stream url
+ * @param props mime and extension from file to search
+ * @returns the result file ico
+ */
+export declare const getURLFileIco: (file: File | undefined, customIcons: IconsMap | undefined) => ResultFileIco;
+/**
+ * Looks for a suitable file icon
+ * @param props mime and extension from file to search
+ * @returns the result file ico, if not found, turns octet-stream url
+ */
+export declare const getURLFileIcoFromNameAndType: (name: string | undefined, type: string | undefined, customIcons: IconsMap | undefined) => ResultFileIco;
+interface ResultFileIco {
+    url: string;
+    mimeResume: keyof IconsMap;
+}
+export {};
diff --git a/src/core/mocks/extFileMock.d.ts b/src/core/mocks/extFileMock.d.ts
new file mode 100644
index 0000000..1446956
--- /dev/null
+++ b/src/core/mocks/extFileMock.d.ts
@@ -0,0 +1,2 @@
+import { ExtFile } from "../types";
+export declare const extFileMock: (id?: number) => ExtFile;
diff --git a/src/core/mocks/index.d.ts b/src/core/mocks/index.d.ts
new file mode 100644
index 0000000..eb8f2d8
--- /dev/null
+++ b/src/core/mocks/index.d.ts
@@ -0,0 +1 @@
+export { extFileMock } from "./extFileMock";
diff --git a/src/core/reader/imageOrientation.d.ts b/src/core/reader/imageOrientation.d.ts
new file mode 100644
index 0000000..55b3c8c
--- /dev/null
+++ b/src/core/reader/imageOrientation.d.ts
@@ -0,0 +1,10 @@
+/**
+ * Resize an image resolution given maxWidth and maxHeight
+ *
+ * Should be called with await
+ * @param base64Str a string representation of an imae file
+ * @param maxWidth the max width of he image
+ * @param maxHeight the max height of he image
+ * @returns the resized image
+ */
+export declare function getImageOrientation(imageSource: string | undefined): Promise<"landscape" | "portrait">;
diff --git a/src/core/reader/index.d.ts b/src/core/reader/index.d.ts
new file mode 100644
index 0000000..f51527a
--- /dev/null
+++ b/src/core/reader/index.d.ts
@@ -0,0 +1,3 @@
+export { readAsArrayBuffer, readAsBinaryString, readAsDataURL, readAsText } from "./readers";
+export { resizeImage } from "./resizeImage";
+export { getImageOrientation } from "./imageOrientation";
diff --git a/src/core/reader/readers.d.ts b/src/core/reader/readers.d.ts
new file mode 100644
index 0000000..4e65f59
--- /dev/null
+++ b/src/core/reader/readers.d.ts
@@ -0,0 +1,31 @@
+/**
+ * Reads an image (or other type) file as data URL in a promise way,
+ * so you can use await.
+ * It will return a string that contains the URL representation
+ * @param file File or Blob object
+ * @returns data URL of the file
+ */
+export declare const readAsDataURL: (file: File | Blob, onProgress?: Function, onError?: Function) => Promise<string | undefined>;
+/**
+ * Reads a file as Text in a promise way, so you can use await.
+ * If other kind of file is sent, this function will read it anyway
+ * and will return a string that contains the URL representation
+ * @param file File or Blob object
+ * @param encoding The type of encoding such as "base64"
+ * @returns data text of the file
+ */
+export declare const readAsText: (file: File | Blob, encoding?: string, onProgress?: Function, onError?: Function) => Promise<string | undefined>;
+/**
+ * Reads a file and return the raw binary data from the file.
+ * @param file File or Blob object
+ * @param encoding The type of encoding such as "base64"
+ * @returns raw binary data of the file
+ */
+export declare const readAsBinaryString: (file: File | Blob, onProgress?: Function, onError?: Function) => Promise<string | undefined>;
+/**
+ * Reads a file and returns an ArrayBuffer representing the file's data
+ * @param file File or blob object
+ * @param encoding The type of encoding such as "base64"
+ * @returns ArrayBuffer representation of the file
+ */
+export declare const readAsArrayBuffer: (file: File | Blob, onProgress?: Function, onError?: Function) => Promise<string | undefined>;
diff --git a/src/core/reader/resizeImage.d.ts b/src/core/reader/resizeImage.d.ts
new file mode 100644
index 0000000..3ac433a
--- /dev/null
+++ b/src/core/reader/resizeImage.d.ts
@@ -0,0 +1,10 @@
+/**
+ * Resize an image resolution given maxWidth and maxHeight
+ *
+ * Should be called with await
+ * @param base64Str a string representation of an imae file
+ * @param maxWidth the max width of he image
+ * @param maxHeight the max height of he image
+ * @returns the resized image
+ */
+export declare function resizeImage(base64Str: string, maxWidth?: number, maxHeight?: number): Promise<string | undefined>;
diff --git a/src/core/synthetic-file/SyntheticFile.d.ts b/src/core/synthetic-file/SyntheticFile.d.ts
new file mode 100644
index 0000000..43cb064
--- /dev/null
+++ b/src/core/synthetic-file/SyntheticFile.d.ts
@@ -0,0 +1,551 @@
+/**
+ * A syntetic file creator.
+ * Very useful for tests
+ */
+export declare abstract class SyntheticFile {
+    /**
+ *
+ * @param name the file name
+ * @param size the file size
+ * @param type the file type
+ * @returns
+ */
+    static createFile: (name: string, size: number, type: string) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_aac: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_abw: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_freearc: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_avi: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_azw: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_octet: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_bmp: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_bz: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_bz2: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_cda: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_csh: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_css: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_csv: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_doc: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_docx: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_eot: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_epub: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_gzip: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_gif: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_htm: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_html: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_ico: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_icalendar: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_jar: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_jpeg: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_jpg: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_js: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_json: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_jsonld: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_mid: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_x_mid: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_midi: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_x_midi: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_mjs: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_mp3: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_mp4: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_mpeg: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_mpkg: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_odp: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_ods: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_odt: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_oga: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_ogv: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_ogx: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_opus: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_otf: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_png: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_pdf: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_php: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_ppt: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_pptx: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_rar: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_rtf: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_sh: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_svg: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_swf: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_tar: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_tif: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_tiff: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_ts: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_ttf: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_text: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_typescript: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_vsd: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_wav: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_weba: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_webm: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_webp: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_woff: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_woff2: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_xhtml: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_xlsx: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_xls: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_xml: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_xml_txt: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_xul: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_zip: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_3gp: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_3gp2: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_3gp_a: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_3gp_v: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_7z: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_python: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_java: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_react: (size?: number) => File;
+    /**
+    *
+    * @param size the file size
+    * @returns a syntetic File object instance
+    */
+    static create_vue: (size?: number) => File;
+    /**
+     * Creates an array of fake (synthetic) files
+     * @param size the file size for all synthetic files
+     * @returns an array of all file icon preview supported files
+     */
+    static createFileListMiscelanious: (size?: number) => File[];
+}
+/**
+ * Create a list of synthetic files with different mime types
+ * @param size the file size for each synthetic file
+ * @returns a list of synthetic file
+ */
+export declare const createListOfMultiTypeFile: (size?: number) => File[];
+/**
+ * Creates a synthetic file.
+ * By default, creates a png image file
+ * @param name the file name to show. By default is set to "png-image-file-with-large-name.png"
+ * @param size the size in bytes of the file. By default this value is set to 455555
+ * @param type the mime type of the file. By default is set to "image/png"
+ * @returns
+ */
+export declare const createSyntheticFile: (name?: string, size?: number, type?: string) => File;
diff --git a/src/core/synthetic-file/index.d.ts b/src/core/synthetic-file/index.d.ts
new file mode 100644
index 0000000..185ff18
--- /dev/null
+++ b/src/core/synthetic-file/index.d.ts
@@ -0,0 +1,2 @@
+export { SyntheticFile, createListOfMultiTypeFile, createSyntheticFile } from "./SyntheticFile";
+export { makeSyntheticExtFile } from "./syntheticfileGenerator";
diff --git a/src/core/synthetic-file/syntheticfileGenerator.d.ts b/src/core/synthetic-file/syntheticfileGenerator.d.ts
new file mode 100644
index 0000000..5479f50
--- /dev/null
+++ b/src/core/synthetic-file/syntheticfileGenerator.d.ts
@@ -0,0 +1,13 @@
+import { ExtFile, UPLOADSTATUS } from "../types";
+/**
+ * Make a validated file that is ready to be used on FileItem component,
+ * if valid is not set, a random operation will decide whether the file is valid or not
+ * If valid is false, then the natural order is not to be uploadable and wont have upload message nor upload status
+ * If valid is true, then file can be uploaded and can have upload message if the status is succes or error
+ * @param file The file
+ * @param valid true if it is a valid file, otherwise is false
+ * @param uploadStatus the current upload status. If not given a random upload status will be set
+ * @param uploadMessage the upload message after uploading
+ * @returns a Vaidated File object
+ */
+export declare const makeSyntheticExtFile: (file?: File, valid?: boolean, uploadStatus?: UPLOADSTATUS, uploadMessage?: string) => ExtFile;
diff --git a/src/core/types/ExtFile.d.ts b/src/core/types/ExtFile.d.ts
new file mode 100644
index 0000000..6d2dcc5
--- /dev/null
+++ b/src/core/types/ExtFile.d.ts
@@ -0,0 +1,172 @@
+import { UPLOADSTATUS, ServerResponse } from "../types";
+/**
+ * ExtFile === "Extended File".
+ * This object "extends" the File Object
+ */
+export declare type ExtFile = {
+    /**
+     * An identifier for the extFile
+     */
+    id?: number | string | undefined;
+    /**
+     * The file object. Used mostly when user selects or drops files in the client sid.
+     */
+    file?: File;
+    /**
+     * The name of the file. Used mostly for displaying file data from server.
+     */
+    name?: string;
+    /**
+     * The type of the file. Used mostly for displaying file data from server.
+     */
+    type?: string;
+    /**
+     * The size of the file. Used mostly for displaying file data from server.
+     */
+    size?: number;
+    /**
+     * a flag that determines whether the file is valid, not valid or it is not validated.
+     */
+    valid?: boolean;
+    /**
+     * The list of errors when the file was validated
+     */
+    errors?: string[];
+    /**
+     * The current upload status. (e.g. "uploading")
+     */
+    uploadStatus?: UPLOADSTATUS | undefined;
+    /**
+     * A message that shows the result of the upload process
+     */
+    uploadMessage?: string;
+    /**
+     * Link, URI or string representation of an image
+     */
+    imageUrl?: string;
+    /**
+     * The XMLHttpRequest object for performing uploads to a server
+     */
+    xhr?: XMLHttpRequest;
+    /**
+     * The current percentage of upload progress.
+     * This value will have a higher priority over the upload progress value calculated inside the component.
+     * @default undefined
+     */
+    progress?: number;
+    /**
+     * The additional data that will be sent to the server
+     * when files are uploaded individually
+     */
+    extraUploadData?: Record<string, any>;
+    /**
+     * Any kind of extra data that could be needed.
+     */
+    extraData?: Object;
+    /**
+     * The upload response from server
+     */
+    serverResponse?: ServerResponse;
+    /**
+     * The url to be used to perform a GET request in order to download the
+        file. If defined, the download icon will be shown.
+     */
+    downloadUrl?: string;
+    /**
+     * Link, URI, FIle object or string representation of a video
+     */
+    videoUrl?: string;
+};
+/**
+ * A class definition for ExtFile.
+ * This class has the purpose to allow the creation of instances
+ * of an ExtFile for performing complex operations that cannot be
+ * accomplished just by using the ExtFile type.
+ * For instance, it can help in changing the value of some attributes
+ * across different scopes thanks to memory reference.
+ */
+export declare class ExtFileInstance {
+    /**
+     * An identifier for the extFile
+     */
+    id?: number | string;
+    /**
+     * The file object. Used mostly when user selects or drops files in the client sid.
+     */
+    file?: File;
+    /**
+     * The name of the file. Used mostly for displaying file data from server.
+     */
+    name?: string;
+    /**
+     * The type of the file. Used mostly for displaying file data from server.
+     */
+    type?: string;
+    /**
+     * The size of the file. Used mostly for displaying file data from server.
+     */
+    size?: number;
+    imageUrl?: string;
+    /**
+     * A flag that determines whether the file is valid, not valid or it is not validated.
+     */
+    valid?: boolean;
+    /**
+     * The list of errors when the file was validated
+     */
+    errors?: string[];
+    /**
+     * A message that shows the result of the upload process
+     */
+    uploadMessage?: string;
+    /**
+     * The current upload status. (e.g. "uploading")
+     */
+    uploadStatus?: UPLOADSTATUS | undefined;
+    /**
+     * The current upload progress
+     */
+    progress?: number;
+    /**
+     * The XMLHttpRequest object for performing uploads to a server
+     */
+    xhr?: XMLHttpRequest;
+    /**
+     * The additional data that will be sent to the server
+     */
+    extraData?: Record<string, any>;
+    /**
+     * The additional data that will be sent to the server
+     * when filesare uploaded individually
+     */
+    extraUploadData?: Record<string, any>;
+    /**
+     * The upload response from server
+     */
+    serverResponse?: ServerResponse;
+    /**
+     * Url to perform a GET request in order to download the file.
+     * This  action is triggered when download button is clicked or pressed.
+     * In case onDownload prop is given
+     */
+    downloadUrl?: string;
+    /**
+     * Link, URI, FIle object or string representation of a video
+     */
+    videoUrl?: string;
+    constructor(extFile: ExtFile);
+    /**
+     * method under construction
+     */
+    /**
+     * Copies all non undefined attributes from ExtFileInstance to a new ExtFile object
+     * @param extFileInstance the instance of ExtFile
+     * @returns an ExtFile object
+     */
+    static toExtFile(extFileInstance: ExtFileInstance): ExtFile;
+    /**
+     * Copies all non undefined attributes from ExtFileInstance to a new ExtFile object.
+     * @returns an ExtFile object
+     */
+    toExtFile(): ExtFile;
+}
diff --git a/src/core/types/ExtFileManager.d.ts b/src/core/types/ExtFileManager.d.ts
new file mode 100644
index 0000000..8922bca
--- /dev/null
+++ b/src/core/types/ExtFileManager.d.ts
@@ -0,0 +1,61 @@
+import { ExtFileInstance, ExtFile } from "./ExtFile";
+export declare class ExtFileManager {
+    private static nextId;
+    static fileLists: Record<number | string, ExtFileInstance[] | undefined>;
+    /**
+     * Increases the id counter and returns the next id available.
+     * @returns the next integer id available
+     */
+    static getNextId(): number;
+    /**
+     * Updates a dui file list given an id
+     * @param id id of the fileList
+     * @param extFiles list of DuiFiles forinitializing the array
+     * @returns the id of the fileList
+     */
+    static setFileList(id: number | string | undefined, extFilesInstances: ExtFileInstance[]): number | string;
+    /**
+     * Generates a new ID
+     * @returns the next Id asociated with a DuiFIle list
+     */
+    static createFileListMap(): number;
+    /**
+     * Deletes a list map
+     * @returns the next Id asociated with a DuiFIle list
+     */
+    static removeFileListMap(id?: number | string): number | string;
+    /**
+     *
+     * @param id the id of the dropzone
+     * @returns
+     */
+    static getExtFileInstanceList(id?: number | string): ExtFileInstance[] | undefined;
+    /**
+     * Updates(replaces) the extFile list on preparing stage and returns the new array.
+     * Removes the non valid files if cleanOnUpload is true and validateFiles is also true
+     * Then sets on preparing stage all files according to the following creiteria:
+     * If theuploadStatus is diferent than "sucess" AND
+     * then, update the files on preparing stage. Otherwise keep the extFile props.
+     * Finally, updates the ExtFileInstance list on ExtFileManager.
+     * @param dropzoneId the id to access the right list
+     * @param localFiles the list of extFiles
+     * @param validateFiles flag that indicates that validation is active or o¿not
+     * @param cleanOnUpload flag to determine whther to clena the list oof non valid files or not
+     * @returns a list of ExtFileInstance
+     */
+    static setFileListMapPreparing(dropzoneId: number | string, localFiles: ExtFile[], validateFiles: boolean, cleanOnUpload: boolean): ExtFileInstance[] | undefined;
+    /**
+ * Updates(replaces) the extFile list on preparing stage and returns the new array.
+ * Removes the non valid files if cleanOnUpload is true and validateFiles is also true
+ * Then sets on preparing stage all files according to the following creiteria:
+ * If theuploadStatus is diferent than "sucess" AND
+ * then, update the files on preparing stage. Otherwise keep the extFile props.
+ * Finally, updates the ExtFileInstance list on ExtFileManager.
+ * @param dropzoneId the id to access the right list
+ * @param localFiles the list of extFiles
+ * @param validateFiles flag that indicates that validation is active or o¿not
+ * @param cleanOnUpload flag to determine whther to clena the list oof non valid files or not
+ * @returns a list of ExtFileInstance
+ */
+    static setFileListMapPreparing2(dropzoneId: number | string, localFiles: ExtFile[], validateFiles: boolean, cleanOnUpload: boolean): ExtFileInstance[] | undefined;
+}
diff --git a/src/core/types/FileListMap.d.ts b/src/core/types/FileListMap.d.ts
new file mode 100644
index 0000000..b5d6917
--- /dev/null
+++ b/src/core/types/FileListMap.d.ts
@@ -0,0 +1,4 @@
+import { ExtFileInstance } from "./ExtFile";
+export declare type ExtFileListMap = {
+    [id: number | string]: ExtFileInstance[] | undefined;
+};
diff --git a/src/core/types/IconsMap.d.ts b/src/core/types/IconsMap.d.ts
new file mode 100644
index 0000000..dbd9ea5
--- /dev/null
+++ b/src/core/types/IconsMap.d.ts
@@ -0,0 +1,77 @@
+export type IconsMap = {
+    aac?: string;
+    accdb?: string;
+    abw?: string;
+    arc?: string;
+    avi?: string;
+    azw?: string;
+    octet?: string;
+    bmp?: string;
+    bz?: string;
+    bz2?: string;
+    cda?: string;
+    csh?: string;
+    css?: string;
+    csv?: string;
+    docx?: string;
+    drawio?: string;
+    eot?: string;
+    epub?: string;
+    gzip?: string;
+    gif?: string;
+    html?: string;
+    icalendar?: string;
+    jar?: string;
+    jpeg?: string;
+    javascript?: string;
+    json?: string;
+    jsonld?: string;
+    midi?: string;
+    mp3?: string;
+    mp4?: string;
+    mpeg?: string;
+    mpkg?: string;
+    mp2t?: string;
+    odp?: string;
+    ods?: string;
+    odt?: string;
+    oga?: string;
+    ogv?: string;
+    ogx?: string;
+    opus?: string;
+    otf?: string;
+    png?: string;
+    pdf?: string;
+    php?: string;
+    pptx?: string;
+    psd?: string;
+    rar?: string;
+    rtf?: string;
+    sass?: string;
+    sh?: string;
+    swf?: string;
+    tar?: string;
+    tiff?: string;
+    ttf?: string;
+    typescript?: string;
+    text?: string;
+    vsd?: string;
+    wav?: string;
+    weba?: string;
+    webm?: string;
+    webp?: string;
+    woff?: string;
+    wma?: string;
+    wmv?: string;
+    xhtml?: string;
+    xlsx?: string;
+    xml?: string;
+    xul?: string;
+    zip?: string;
+    sevenzip?: string;
+    python?: string;
+    java?: string;
+    react?: string;
+    vue?: string;
+    fallBack?: string;
+};
diff --git a/src/core/types/NamedColor.d.ts b/src/core/types/NamedColor.d.ts
new file mode 100644
index 0000000..e4cf51b
--- /dev/null
+++ b/src/core/types/NamedColor.d.ts
@@ -0,0 +1,6 @@
+/**
+ * Interface to describe a named color
+ */
+export interface NamedColor {
+    [colorName: string]: string;
+}
diff --git a/src/core/types/UploadConfig.d.ts b/src/core/types/UploadConfig.d.ts
new file mode 100644
index 0000000..59cfa60
--- /dev/null
+++ b/src/core/types/UploadConfig.d.ts
@@ -0,0 +1,58 @@
+import { Method } from "./method";
+export type UploadConfig = {
+    /**
+     * The url endpoint to upload the file.
+     * e.g. https://www.myasomwbackend/uploads/file
+     */
+    url?: string;
+    /**
+     * upload method, can be POST | PUT | PATCH
+     * @default "POST"
+     */
+    method?: Method;
+    /**
+     * Request headers for http request.
+     * e.g.
+     * ```jsx
+     * headers = {
+     *    "content-type": "multipart/form-data",
+     *    Authorization: "Bearer YOUR_BEARER_TOKEN_GOES_HERE",
+     * }
+     * ```
+     */
+    headers?: Record<string, string>;
+    /**
+     * the label to use in request
+     * On server this must be the label to get the file.
+     * @default "file"
+     */
+    uploadLabel?: string;
+    /**
+     * Flag for indicating whther to remove the non-valid files
+     * before starting the upload process.
+     * This flag is valid only if validation is enable
+     */
+    cleanOnUpload?: boolean;
+    /**
+     * If true, onDrop event or file selection not only will make Dropzone to return the list of files, but also
+     * it will start the upload stage for the files if at least url was set
+     * By default is false
+     */
+    autoUpload?: boolean;
+    /**
+     * The time that will last the "preparing" stage
+     * By default is 1500 miliseconds = 1.5 seconds
+     */
+    preparingTime?: number;
+    /**
+     * A message to show in the footer when the uploading process takes place.
+     */
+    uploadingMessage?: string;
+};
+export declare const createUploadConfig: (url?: string, method?: Method, headers?: Record<string, string>, uploadLabel?: string, cleanonUpload?: boolean) => {
+    url: string;
+    method: Method;
+    headers: Record<string, string>;
+    uploadLabel: string;
+    cleanonUpload: boolean;
+};
diff --git a/src/core/types/UploadStatus.d.ts b/src/core/types/UploadStatus.d.ts
new file mode 100644
index 0000000..6fce661
--- /dev/null
+++ b/src/core/types/UploadStatus.d.ts
@@ -0,0 +1 @@
+export type UPLOADSTATUS = "preparing" | "aborted" | "uploading" | "success" | "error";
diff --git a/src/core/types/behaviur.d.ts b/src/core/types/behaviur.d.ts
new file mode 100644
index 0000000..b39ce8a
--- /dev/null
+++ b/src/core/types/behaviur.d.ts
@@ -0,0 +1,4 @@
+/**
+ * View mode for File Items inside dropzone
+ */
+export declare type Behaviour = "add" | "replace";
diff --git a/src/core/types/index.d.ts b/src/core/types/index.d.ts
new file mode 100644
index 0000000..b2d02fb
--- /dev/null
+++ b/src/core/types/index.d.ts
@@ -0,0 +1,14 @@
+export type { Behaviour } from "./behaviur";
+export type { ExtFile } from "./ExtFile";
+export { ExtFileInstance } from "./ExtFile";
+export { ExtFileManager } from "./ExtFileManager";
+export type { ExtFileListMap } from "./FileListMap";
+export type { Localization, FunctionLabel, ComponentLocalizer, LocalLabels } from "./localization";
+export type { Method } from "./method";
+export type { NamedColor } from "./NamedColor";
+export type { UPLOADSTATUS } from "./UploadStatus";
+export type { ServerResponse, UploadPromiseResponse, UploadResponse } from "./uploadTypes";
+export type { ValidateFileResponse, FileValidatorProps } from "./validation";
+export type { UploadConfig } from "./UploadConfig";
+export { createUploadConfig } from "./UploadConfig";
+export type { IconsMap } from "./IconsMap";
diff --git a/src/core/types/localization.d.ts b/src/core/types/localization.d.ts
new file mode 100644
index 0000000..a0ff069
--- /dev/null
+++ b/src/core/types/localization.d.ts
@@ -0,0 +1,8 @@
+export type Localization = "EN-en" | "ES-es" | "FR-fr" | "IT-it" | "PT-pt" | "RU-ru" | "ZH-cn" | "ZH-hk";
+export type FunctionLabel = ((s1: string | number, s2?: string | number, s3?: string) => string);
+export type LocalLabels = {
+    [label: string]: string | FunctionLabel | LocalLabels;
+};
+export type ComponentLocalizer = {
+    [language in Localization]: LocalLabels;
+};
diff --git a/src/core/types/method.d.ts b/src/core/types/method.d.ts
new file mode 100644
index 0000000..b752da5
--- /dev/null
+++ b/src/core/types/method.d.ts
@@ -0,0 +1,10 @@
+/**
+ * Method to be used for request
+ */
+export declare type Method = "POST" | "PUT" | "PATCH";
+/**
+ *
+ * @param method the method in string format
+ * @returns true if method is included in ["POST", "PUT", "PATCH"]
+ */
+export declare const idValidMethod: (method: string) => boolean;
diff --git a/src/core/types/uploadTypes.d.ts b/src/core/types/uploadTypes.d.ts
new file mode 100644
index 0000000..0266517
--- /dev/null
+++ b/src/core/types/uploadTypes.d.ts
@@ -0,0 +1,28 @@
+import { ExtFile } from "./ExtFile";
+export declare type UploadResponse_ = {
+    id: number | string | undefined;
+    uploadedFile: ExtFile;
+};
+export declare type UploadPromiseResponse = {
+    uploadResponse: UploadResponse;
+    uploadedFile: ExtFile;
+};
+export declare type UploadResponse = {
+    id: number | string | undefined;
+    serverResponse: ServerResponse | {};
+    uploadedFile: ExtFile;
+};
+export type ServerResponse = {
+    /**
+     * If true, it means that the request was successful.
+     */
+    success: boolean;
+    /**
+     * A message that describes the result of the request.
+     */
+    message?: string;
+    /**
+     * The response of the server.
+     */
+    payload?: any;
+};
diff --git a/src/core/types/validation.d.ts b/src/core/types/validation.d.ts
new file mode 100644
index 0000000..f35040a
--- /dev/null
+++ b/src/core/types/validation.d.ts
@@ -0,0 +1,20 @@
+export declare type FileValidatorProps = {
+    /**
+     * max file size in bytes
+     */
+    maxFileSize?: number;
+    /**
+     * a comma separated list of mime types or file extensions.
+     */
+    accept?: string;
+};
+export declare type ValidateFileResponse = {
+    /**
+     * if true, that means the file is valid
+     */
+    valid: boolean;
+    /**
+     * the list of erros associated with an specific file
+     */
+    errors?: string[];
+};
diff --git a/src/core/upload/addExtraData.upload.d.ts b/src/core/upload/addExtraData.upload.d.ts
new file mode 100644
index 0000000..a57b6d5
--- /dev/null
+++ b/src/core/upload/addExtraData.upload.d.ts
@@ -0,0 +1 @@
+export default function addExtraData(formData: FormData, extraData: Record<string, string> | undefined): void;
diff --git a/src/core/upload/addheaders.upload.d.ts b/src/core/upload/addheaders.upload.d.ts
new file mode 100644
index 0000000..6889520
--- /dev/null
+++ b/src/core/upload/addheaders.upload.d.ts
@@ -0,0 +1 @@
+export default function addHeaders(xhr: XMLHttpRequest, headers: Record<string, string> | undefined): void;
diff --git a/src/core/upload/errors.upload.d.ts b/src/core/upload/errors.upload.d.ts
new file mode 100644
index 0000000..0975c24
--- /dev/null
+++ b/src/core/upload/errors.upload.d.ts
@@ -0,0 +1,22 @@
+import { ExtFile } from "../types";
+export declare const TIMEOUT_ERROR_RESPONSE: {
+    success: boolean;
+    message: string;
+    payload: {};
+};
+export declare const ABORTED_ERROR_RESPONSE: {
+    success: boolean;
+    message: string;
+    payload: {};
+};
+export declare const JSON_PARSE_ERROR_RESPONSE: {
+    success: boolean;
+    message: string;
+    payload: {};
+};
+export declare const UNEXPECTED_ERROR_RESPONSE: {
+    success: boolean;
+    message: string;
+    payload: {};
+};
+export declare const NO_XHR_PROVIDED_ERROR: (extFile: ExtFile) => ExtFile;
diff --git a/src/core/upload/index.d.ts b/src/core/upload/index.d.ts
new file mode 100644
index 0000000..ef809cc
--- /dev/null
+++ b/src/core/upload/index.d.ts
@@ -0,0 +1,6 @@
+export { uploadExtFile, FuiUpload, uploadFile, uploadFormData, } from "./upload";
+export { ABORTED_ERROR_RESPONSE, JSON_PARSE_ERROR_RESPONSE, NO_XHR_PROVIDED_ERROR, TIMEOUT_ERROR_RESPONSE, UNEXPECTED_ERROR_RESPONSE, } from "./errors.upload";
+export { JsonParseResponse, makeErrorUploadResponse, makeServerResponse, makeSuccessUploadResponse, } from "./response.upload";
+export { default as addExtraData } from "./addExtraData.upload";
+export { default as addHeaders } from "./addheaders.upload";
+export { instantPreparingToUploadOne, preparingToUploadOne, sleepTransition, toUploadableExtFileList, completeUploadResult, sanitizeArrExtFile, unableToUploadResult, unexpectedErrorUploadResult, setNextUploadStatus } from "./utils.upload";
diff --git a/src/core/upload/response.upload.d.ts b/src/core/upload/response.upload.d.ts
new file mode 100644
index 0000000..2a24ac4
--- /dev/null
+++ b/src/core/upload/response.upload.d.ts
@@ -0,0 +1,5 @@
+import { ExtFile, ServerResponse } from "../types";
+export declare const makeServerResponse: (success: any, message: string, payload: any) => ServerResponse;
+export declare const JsonParseResponse: (xhr: XMLHttpRequest) => ServerResponse;
+export declare const makeSuccessUploadResponse: (extFile: ExtFile, responseFui: ServerResponse) => ExtFile;
+export declare const makeErrorUploadResponse: (extFile: ExtFile, responseFui: ServerResponse) => ExtFile;
diff --git a/src/core/upload/upload.d.ts b/src/core/upload/upload.d.ts
new file mode 100644
index 0000000..783be82
--- /dev/null
+++ b/src/core/upload/upload.d.ts
@@ -0,0 +1,33 @@
+import { ExtFile, Method } from "../types";
+import { ServerResponse } from "../types/uploadTypes";
+/**
+ * Uploads one formData object to a given endpoint in a promisified way
+ * @param xhr XMLHTTPrequest object
+ * @param method method for uploading
+ * @param endpoint endpoint to upload the file
+ * @param data FromData object to perform multipart form data upload
+ * @param headers the set of headers
+ * @returns a server response that consists on {status, payload, message}
+ */
+export declare const uploadFormData: (xhr: XMLHttpRequest, method: Method | undefined, endpoint: string, data: FormData, headers: Record<string, string> | undefined) => Promise<ServerResponse>;
+/**
+ *
+ * @param file the extended file to be uploaded
+ * @param url the endpoint
+ * @param method the method for uploading
+ * @param headers headers for request
+ * @returns
+ */
+export declare const uploadExtFile: (extFile: ExtFile, url: string, method?: Method, headers?: Record<string, string>, uploadLabel?: string) => Promise<ExtFile>;
+export declare function uploadFile(file: File, url: string, method?: Method, label?: string, headers?: Record<string, string>): Promise<ServerResponse>;
+/**
+ * @deprecated
+ * Uploads one formData object to a given endpoint in a promisified way
+ * @param xhr XMLHTTPrequest object
+ * @param method method for uploading
+ * @param endpoint endpoint to upload the file
+ * @param data FromData object to perform multipart form data
+ * @param headers the set of headers
+ * @returns a dui server response that consists on {success, payload, message}
+ */
+export declare const FuiUpload: (xhr: XMLHttpRequest, method: Method, endpoint: string, data: FormData, headers: Record<string, string>) => Promise<ServerResponse>;
diff --git a/src/core/upload/utils.upload.d.ts b/src/core/upload/utils.upload.d.ts
new file mode 100644
index 0000000..54e00c2
--- /dev/null
+++ b/src/core/upload/utils.upload.d.ts
@@ -0,0 +1,42 @@
+import { ExtFile, ExtFileInstance, ServerResponse, UploadResponse, UPLOADSTATUS } from "../types";
+export declare const unexpectedErrorUploadResult: (extFile: ExtFile) => ExtFile;
+export declare const unableToUploadResult: (extFile: ExtFile) => UploadResponse;
+export declare const completeUploadResult: (extFile: ExtFile, serverResponse: ServerResponse, uploadStatusresult: UPLOADSTATUS) => UploadResponse;
+/**
+ * Initializes the xhr attribute for performing uploads
+ * @param extFileList the list of extended files
+ * @returns the array of extFiles with the xhr attribute initialized
+ */
+export declare const toUploadableExtFileList: (extFileList: ExtFile[] | ExtFileInstance[]) => ExtFile[];
+/**
+ * Updates the uploadStatus of the given extFile
+ * from "preparing" to "uploading"
+ * @param extFile the extended file
+ * @returns the extended file with uploadStatus updated to "uploading"
+ */
+export declare const instantPreparingToUploadOne: (extFile: ExtFileInstance | ExtFile) => ExtFileInstance | ExtFile;
+/**
+ *
+ * @param extFile the extended file
+ * @returns
+ */
+export declare const preparingToUploadOne: (extFile: ExtFileInstance | ExtFile) => Promise<ExtFileInstance | ExtFile>;
+/**
+ * Sleeps for 1200 miliseconds for showing a better transition
+ * on uploading
+ * @param time the time to sleep in miliseconds
+ * @returns true is everything is ok
+ */
+export declare const sleepTransition: (time?: number) => Promise<boolean>;
+/**
+ * Removes the deleted files and updates the aborted ones with a message
+ * @param arrExtFile incomming arr of extFle instances
+ * @returns an array of ExtFle objects
+ */
+export declare const sanitizeArrExtFile: (arrExtFile: ExtFileInstance[]) => ExtFile[];
+/**
+ *
+ * @param extFileInstance
+ * @param extFileobj
+ */
+export declare const setNextUploadStatus: (extFileInstance: ExtFileInstance, extFileobj: ExtFile) => void;
diff --git a/src/core/utils/IdGenerator.d.ts b/src/core/utils/IdGenerator.d.ts
new file mode 100644
index 0000000..d1bcc09
--- /dev/null
+++ b/src/core/utils/IdGenerator.d.ts
@@ -0,0 +1,11 @@
+/**
+ * An id generator for FileItems
+ */
+export declare abstract class FileIdGenerator {
+    static nextId: number;
+    /**
+     * Increases the id counter and returns the next id available.
+     * @returns the next integer id available
+     */
+    static getNextId(): number;
+}
diff --git a/src/core/utils/addClassName.d.ts b/src/core/utils/addClassName.d.ts
new file mode 100644
index 0000000..c1b5925
--- /dev/null
+++ b/src/core/utils/addClassName.d.ts
@@ -0,0 +1,7 @@
+/**
+ * If className is given, adds class name in string format to a base class name
+ * @param baseClassName the base class name
+ * @param className the class name to be added
+ * @returns a new class name obtained by adding the second paramater
+ */
+export declare const addClassName: (baseClassName: string, className: string | undefined) => string;
diff --git a/src/core/utils/dropzone.utils.d.ts b/src/core/utils/dropzone.utils.d.ts
new file mode 100644
index 0000000..c872040
--- /dev/null
+++ b/src/core/utils/dropzone.utils.d.ts
@@ -0,0 +1 @@
+export declare const isValidateActive: (accept: string | undefined, maxFileSize: number | undefined, maxFiles: number | undefined, validator: Function | undefined) => boolean;
diff --git a/src/core/utils/fakeupload.utils.d.ts b/src/core/utils/fakeupload.utils.d.ts
new file mode 100644
index 0000000..ea34da1
--- /dev/null
+++ b/src/core/utils/fakeupload.utils.d.ts
@@ -0,0 +1,45 @@
+import { ExtFile, ExtFileInstance, UploadResponse } from "../types";
+/**
+ * Updates a extFile and sets its uploadStatus to "uploading"
+ * @param extFile the extended file object
+ * @returns the extended file with the uploadStatus attribute modified
+ */
+export declare const setPrepToUploading: (extFile: ExtFile) => Promise<ExtFile>;
+/**
+ * Updates a extFile and sets its uploadStatus to "success"
+ * @param extFile the extended file object
+ * @returns the extended file with the uploadStatus attribute modified
+ */
+export declare const uploadOne: (extFile: ExtFile) => Promise<ExtFile>;
+/**
+ * Awaits the given time before start uploading
+ * @param preparingTime the time in miliseconds, by default it will wait 1.5 secs
+ * @returns an empty object
+ */
+export declare const sleepPreparing: (preparingTime?: number) => Promise<void>;
+/**
+ *
+ * @param extFileInstance
+ * @returns
+ */
+export declare const prepToUploadOne: (extFileInstance: ExtFileInstance | ExtFile) => Promise<ExtFileInstance | ExtFile>;
+/**
+ *
+ * @param extFileInstance
+ * @returns
+ */
+export declare const uploadOneExtFile: (extFileInstance: ExtFileInstance) => Promise<Object>;
+/**
+ *
+ * @param extFile the extFile to upload
+ * @param DropzoneLocalizer the localization
+ * @returns a duiUploadResponse object that describes the result
+ */
+export declare const fakeFuiUpload: (extFileInstance: ExtFileInstance, DropzoneLocalizer?: import("../types").LocalLabels) => Promise<ExtFile>;
+/**
+ *
+ * @param extFile the extFile to upload
+ * @param DropzoneLocalizer the localization
+ * @returns a duiUploadResponse object that describes the result
+ */
+export declare const fakeFuiUploadExtFile: (extFileInstance: ExtFileInstance, DropzoneLocalizer?: import("../types").LocalLabels) => Promise<UploadResponse>;
diff --git a/src/core/utils/fileListParser.d.ts b/src/core/utils/fileListParser.d.ts
new file mode 100644
index 0000000..940a123
--- /dev/null
+++ b/src/core/utils/fileListParser.d.ts
@@ -0,0 +1,13 @@
+import { ExtFile, ExtFileInstance } from "../types";
+/**
+ * Converts the fileList into an array of separated ExtFile objects
+ * @param fileList the FileList object given by input(event.target.files) or drop operation (event.dataTransfer)
+ * @returns an array of ExtFile objects
+ */
+export declare const fileListToExtFileArray: (fileList: FileList) => ExtFile[];
+/**
+ * Converts the fileList into an array of separated ExtFile instances
+ * @param fileList the FileList object given by input (event.target.files) or drop operation (event.dataTransfer)
+ * @returns an array of ExtFile instances
+ */
+export declare const fileListToExtFileInstanceArray: (fileList: FileList) => ExtFileInstance[];
diff --git a/src/core/utils/fileSizeFormatter.d.ts b/src/core/utils/fileSizeFormatter.d.ts
new file mode 100644
index 0000000..a3a53b6
--- /dev/null
+++ b/src/core/utils/fileSizeFormatter.d.ts
@@ -0,0 +1,5 @@
+/**
+ * Gives a XX.XX format in Bytes KB, MB, GB or TB
+ * @param fileSize file size to give format in Bytes
+ */
+export declare const fileSizeFormater: (fileSize?: number | false) => string | undefined;
diff --git a/src/core/utils/getExt.d.ts b/src/core/utils/getExt.d.ts
new file mode 100644
index 0000000..110c9f0
--- /dev/null
+++ b/src/core/utils/getExt.d.ts
@@ -0,0 +1,6 @@
+/**
+ * Looks for the first file extension
+ * @param fileName file name
+ * @returns the file name extension
+ */
+export declare const getExt: (fileName: string) => string;
diff --git a/src/core/utils/getLocalFileItemData.d.ts b/src/core/utils/getLocalFileItemData.d.ts
new file mode 100644
index 0000000..6a94345
--- /dev/null
+++ b/src/core/utils/getLocalFileItemData.d.ts
@@ -0,0 +1,9 @@
+/**
+ *
+ * @param file
+ * @param name
+ * @param type
+ * @param size
+ * @returns the file name, type and size
+ */
+export declare const getLocalFileItemData: (file: File | undefined, name: string | undefined, type: string | undefined, size: number | undefined) => [string, string | undefined, number | undefined];
diff --git a/src/core/utils/index.d.ts b/src/core/utils/index.d.ts
new file mode 100644
index 0000000..c48ce5d
--- /dev/null
+++ b/src/core/utils/index.d.ts
@@ -0,0 +1,13 @@
+import { fileListToExtFileArray, fileListToExtFileInstanceArray } from "./fileListParser";
+import { fileSizeFormater } from "./fileSizeFormatter";
+import { getExt } from "./getExt";
+import { FileIdGenerator } from "./IdGenerator";
+export { FileIdGenerator, fileListToExtFileArray, fileListToExtFileInstanceArray, fileSizeFormater, getExt, };
+export { isValidateActive } from "./dropzone.utils";
+export { shrinkWord } from "./shrinkWord";
+export { fakeFuiUpload, prepToUploadOne, setPrepToUploading, sleepPreparing, uploadOne, uploadOneExtFile } from "./fakeupload.utils";
+export { getRandomInt } from "./randomInt";
+export { cleanInput } from "./input.utils";
+export { addClassName } from "./addClassName";
+export { isUploadAbleExtFile } from "./isUploadAbleExtFile";
+export { getLocalFileItemData } from "./getLocalFileItemData";
diff --git a/src/core/utils/input.utils.d.ts b/src/core/utils/input.utils.d.ts
new file mode 100644
index 0000000..658f95c
--- /dev/null
+++ b/src/core/utils/input.utils.d.ts
@@ -0,0 +1,5 @@
+/**
+ * Cleans the input.value attribute
+ * @param inputElement
+ */
+export declare const cleanInput: (inputElement?: HTMLInputElement | null) => void;
diff --git a/src/core/utils/isUploadAbleExtFile.d.ts b/src/core/utils/isUploadAbleExtFile.d.ts
new file mode 100644
index 0000000..248c16c
--- /dev/null
+++ b/src/core/utils/isUploadAbleExtFile.d.ts
@@ -0,0 +1,2 @@
+import { ExtFile } from "../types";
+export declare const isUploadAbleExtFile: (extFile: ExtFile, validateFilesFlag: boolean) => boolean;
diff --git a/src/core/utils/randomInt.d.ts b/src/core/utils/randomInt.d.ts
new file mode 100644
index 0000000..1d459e1
--- /dev/null
+++ b/src/core/utils/randomInt.d.ts
@@ -0,0 +1,7 @@
+/**
+ * Random integer between min (included) and max (excluded)
+ * @param min the min number
+ * @param max the max number
+ * @returns a random number between min (included) and max (excluded)
+ */
+export declare function getRandomInt(min?: number, max?: number): number;
diff --git a/src/core/utils/shrinkWord.d.ts b/src/core/utils/shrinkWord.d.ts
new file mode 100644
index 0000000..fd5c13e
--- /dev/null
+++ b/src/core/utils/shrinkWord.d.ts
@@ -0,0 +1,10 @@
+/**
+ * The max size of the word in characters
+ */
+export declare const DEFAULT_MAX_SIZE_WORD = 30;
+/**
+ *
+ * @param word the word to be shrinked
+ * @returns the shrinked word
+ */
+export declare const shrinkWord: (word?: string, card?: boolean) => string;
diff --git a/src/core/validation/fakeerros.d.ts b/src/core/validation/fakeerros.d.ts
new file mode 100644
index 0000000..4c6e643
--- /dev/null
+++ b/src/core/validation/fakeerros.d.ts
@@ -0,0 +1,4 @@
+/**
+ * list of dumy errors in english
+ */
+export declare const listOfErrors: string[];
diff --git a/src/core/validation/fileValidator.d.ts b/src/core/validation/fileValidator.d.ts
new file mode 100644
index 0000000..ca0b54e
--- /dev/null
+++ b/src/core/validation/fileValidator.d.ts
@@ -0,0 +1,43 @@
+import { ExtFile, Localization, LocalLabels } from "../types";
+import { ValidateFileResponse, FileValidatorProps } from "../types/validation";
+/**
+ *
+ * @param preValidatedFiles FileList
+ * @param remainingValids The number of remaining valid files
+ * @param localValidator
+ * @param validator
+ * @param maxFiles
+ * @param localization
+ * @returns
+ */
+export declare const fileListvalidator: (preValidatedFiles: FileList, remainingValids: number, localValidator: FileValidatorProps, validator?: (f: File) => ValidateFileResponse, maxFiles?: number, localization?: Localization) => ExtFile[];
+/**
+ * For each ExtFile sets the valid prop of ExtFile to "true" or "false"
+ * depending on the result of the individual validation.
+ * It also add the list of errors.
+ * @param extFileList
+ * @param remainingValids
+ * @param localValidatorProps
+ * @param validator
+ * @param maxFiles
+ * @param localization
+ * @returns a new ExtFile list with each item validated
+ */
+export declare const validateExtFileList: (extFileList: ExtFile[], remainingValids: number, localValidatorProps: FileValidatorProps, validator?: (f: File) => ValidateFileResponse, maxFiles?: number, localization?: Localization) => ExtFile[];
+/**
+ *
+ * @param extFile
+ * @param validator
+ * @param validatorProps
+ * @param localErrors
+ * @returns
+ */
+export declare const validateExtFile: (extFile: ExtFile, validator: (f: File) => ValidateFileResponse, validatorProps: FileValidatorProps, localErrors: LocalLabels) => ExtFile;
+/**
+ * Function that validate whether a file is valid, or not
+ * according to the Filevalidator properties
+ * @param file a File object to be evaluated
+ * @param validatorProps the validator object
+ * @returns a FileValidated object
+ */
+export declare const validateFile: (file: File, validator: (f: File) => ValidateFileResponse, validatorProps: FileValidatorProps, localErrors: LocalLabels) => ExtFile;
diff --git a/src/core/validation/index.d.ts b/src/core/validation/index.d.ts
new file mode 100644
index 0000000..60029ff
--- /dev/null
+++ b/src/core/validation/index.d.ts
@@ -0,0 +1,5 @@
+export { validateExtFileList, fileListvalidator, validateExtFile, validateFile } from "./fileValidator";
+export { separateAccept } from "./separateAccept";
+export { validateAccept } from "./validateAccept";
+export { getRandomUploadStatus } from "./randomStatus";
+export { listOfErrors } from "./fakeerros";
diff --git a/src/core/validation/randomStatus.d.ts b/src/core/validation/randomStatus.d.ts
new file mode 100644
index 0000000..9e7e4a0
--- /dev/null
+++ b/src/core/validation/randomStatus.d.ts
@@ -0,0 +1,11 @@
+import { UPLOADSTATUS } from "../types";
+/**
+ * Generates a random number betwen 0 and 3
+ * where
+ * 0 => error
+ * 1 => uploading
+ * 2 => success
+ * 3 => undefined
+ * @returns a random upload status or undefined
+ */
+export declare const getRandomUploadStatus: () => UPLOADSTATUS | undefined;
diff --git a/src/core/validation/separateAccept.d.ts b/src/core/validation/separateAccept.d.ts
new file mode 100644
index 0000000..fc7c610
--- /dev/null
+++ b/src/core/validation/separateAccept.d.ts
@@ -0,0 +1,6 @@
+/**
+ * Separate the accept string array into an array of strings separated by commas
+ * @param accept the string accept array
+ * @returns an array of strings in wich every item
+ */
+export declare const separateAccept: (accept: string | undefined) => string[];
diff --git a/src/core/validation/validateAccept.d.ts b/src/core/validation/validateAccept.d.ts
new file mode 100644
index 0000000..90f11d6
--- /dev/null
+++ b/src/core/validation/validateAccept.d.ts
@@ -0,0 +1,8 @@
+/**
+ * Checks whether a file is valid or not given an array of file extentions and mime types
+ * e.g. accept =  [".doc", ".docx", ".xml", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"]
+ * @param accept the array of strings accept items
+ * @param file a File object to be evaluated
+ * @returns true if the mime type file is included in the accept param
+ */
+export declare const validateAccept: (accept: string[], file: File) => boolean;
diff --git a/tests/Dropone.test.tsx b/tests/Dropone.test.tsx
new file mode 100644
index 0000000..7b8c72a
--- /dev/null
+++ b/tests/Dropone.test.tsx
@@ -0,0 +1,10 @@
+import "@testing-library/jest-dom";
+import React from "react";
+import { Dropzone } from "../src";
+
+import { cleanup, fireEvent, render, screen } from "@testing-library/react";
+
+test("Validate label text must be 'Drop yor files here...'", () => {
+  render(<Dropzone> Drop yor files here...</Dropzone>);
+  expect(screen.getByText("Drop yor files here...")).toBeInTheDocument();
+});
diff --git a/tests/FileItem.test.tsx b/tests/FileItem.test.tsx
new file mode 100644
index 0000000..db1c547
--- /dev/null
+++ b/tests/FileItem.test.tsx
@@ -0,0 +1,14 @@
+import "@testing-library/jest-dom";
+import React from "react";
+import { FileMosaic } from "../src";
+
+import { cleanup, fireEvent, render, screen } from "@testing-library/react";
+
+test("Validate size formatted 28.00 MB'", () => {
+
+  const size= 28*1024*1024;
+  const sizeFormatted="28.00 MB";
+    render(<FileMosaic name="myfile.png" type="image/png" size={size}/>);
+    expect(screen.getByText(sizeFormatted)).toBeInTheDocument();
+  });
+  
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
index 302e032..c613772 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -4,12 +4,13 @@
     "declarationDir": "build",
     "module": "esnext",
     "target": "es5",
-    "lib": ["es6", "dom", "es2016", "es2017"],
+    "lib": ["es6", "dom", "es2016", "es2021"],
     "sourceMap": true,
     "jsx": "react",
     "moduleResolution": "node",
     "allowSyntheticDefaultImports": true,
-    "esModuleInterop": true
+    "esModuleInterop": true,
+    
   },
   "include": ["src/**/*"],
   "exclude": ["node_modules", "build"],
-- 
GitLab