diff options
author | Minteck <contact@minteck.org> | 2023-02-23 19:34:56 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2023-02-23 19:34:56 +0100 |
commit | 3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 (patch) | |
tree | 75be5fba4368472fb11c8015aee026b2b9a71888 /school/node_modules/ranges-sort/dist | |
parent | 8cc1f13c17fa2fb5a4410542d39e650e02945634 (diff) | |
download | pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.gz pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.bz2 pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.zip |
Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated)
Diffstat (limited to 'school/node_modules/ranges-sort/dist')
4 files changed, 0 insertions, 258 deletions
diff --git a/school/node_modules/ranges-sort/dist/ranges-sort.cjs.js b/school/node_modules/ranges-sort/dist/ranges-sort.cjs.js deleted file mode 100644 index 03dde06..0000000 --- a/school/node_modules/ranges-sort/dist/ranges-sort.cjs.js +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @name ranges-sort - * @fileoverview Sort string index ranges - * @version 4.1.0 - * @author Roy Revelt, Codsen Ltd - * @license MIT - * {@link https://codsen.com/os/ranges-sort/} - */ - -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var _objectSpread = require('@babel/runtime/helpers/objectSpread2'); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread); - -var version$1 = "4.1.0"; - -var version = version$1; -var defaults = { - strictlyTwoElementsInRangeArrays: false, - progressFn: null -}; -function rSort(arrOfRanges, originalOptions) { - if (!Array.isArray(arrOfRanges) || !arrOfRanges.length) { - return arrOfRanges; - } - var opts = _objectSpread__default['default'](_objectSpread__default['default']({}, defaults), originalOptions); - var culpritsIndex; - var culpritsLen; - if (opts.strictlyTwoElementsInRangeArrays && !arrOfRanges.filter(function (range) { - return range; - }).every(function (rangeArr, indx) { - if (rangeArr.length !== 2) { - culpritsIndex = indx; - culpritsLen = rangeArr.length; - return false; - } - return true; - })) { - throw new TypeError("ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ".concat(culpritsIndex, "th range (").concat(JSON.stringify(arrOfRanges[culpritsIndex], null, 4), ") has not two but ").concat(culpritsLen, " elements!")); - } - if (!arrOfRanges.filter(function (range) { - return range; - }).every(function (rangeArr, indx) { - if (!Number.isInteger(rangeArr[0]) || rangeArr[0] < 0 || !Number.isInteger(rangeArr[1]) || rangeArr[1] < 0) { - culpritsIndex = indx; - return false; - } - return true; - })) { - throw new TypeError("ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ".concat(culpritsIndex, "th range (").concat(JSON.stringify(arrOfRanges[culpritsIndex], null, 4), ") does not consist of only natural numbers!")); - } - var maxPossibleIterations = Math.pow(arrOfRanges.filter(function (range) { - return range; - }).length, 2); - var counter = 0; - return Array.from(arrOfRanges).filter(function (range) { - return range; - }).sort(function (range1, range2) { - if (opts.progressFn) { - counter += 1; - opts.progressFn(Math.floor(counter * 100 / maxPossibleIterations)); - } - if (range1[0] === range2[0]) { - if (range1[1] < range2[1]) { - return -1; - } - if (range1[1] > range2[1]) { - return 1; - } - return 0; - } - if (range1[0] < range2[0]) { - return -1; - } - return 1; - }); -} - -exports.defaults = defaults; -exports.rSort = rSort; -exports.version = version; diff --git a/school/node_modules/ranges-sort/dist/ranges-sort.dev.umd.js b/school/node_modules/ranges-sort/dist/ranges-sort.dev.umd.js deleted file mode 100644 index ea07705..0000000 --- a/school/node_modules/ranges-sort/dist/ranges-sort.dev.umd.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * @name ranges-sort - * @fileoverview Sort string index ranges - * @version 4.1.0 - * @author Roy Revelt, Codsen Ltd - * @license MIT - * {@link https://codsen.com/os/ranges-sort/} - */ - -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.rangesSort = {})); -}(this, (function (exports) { 'use strict'; - -var version$1 = "4.1.0"; - -const version = version$1; -const defaults = { - strictlyTwoElementsInRangeArrays: false, - progressFn: null, -}; -function rSort(arrOfRanges, originalOptions) { - // quick ending - if (!Array.isArray(arrOfRanges) || !arrOfRanges.length) { - return arrOfRanges; - } - // fill any settings with defaults if missing: - const opts = { ...defaults, ...originalOptions }; - // arrOfRanges validation - let culpritsIndex; - let culpritsLen; - // validate does every range consist of exactly two indexes: - if (opts.strictlyTwoElementsInRangeArrays && - !arrOfRanges - .filter((range) => range) - .every((rangeArr, indx) => { - if (rangeArr.length !== 2) { - culpritsIndex = indx; - culpritsLen = rangeArr.length; - return false; - } - return true; - })) { - throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${culpritsIndex}th range (${JSON.stringify(arrOfRanges[culpritsIndex], null, 4)}) has not two but ${culpritsLen} elements!`); - } - // validate are range indexes natural numbers: - if (!arrOfRanges - .filter((range) => range) - .every((rangeArr, indx) => { - if (!Number.isInteger(rangeArr[0]) || - rangeArr[0] < 0 || - !Number.isInteger(rangeArr[1]) || - rangeArr[1] < 0) { - culpritsIndex = indx; - return false; - } - return true; - })) { - throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${culpritsIndex}th range (${JSON.stringify(arrOfRanges[culpritsIndex], null, 4)}) does not consist of only natural numbers!`); - } - // let's assume worst case scenario is N x N. - const maxPossibleIterations = arrOfRanges.filter((range) => range).length ** 2; - let counter = 0; - return Array.from(arrOfRanges) - .filter((range) => range) - .sort((range1, range2) => { - if (opts.progressFn) { - counter += 1; - opts.progressFn(Math.floor((counter * 100) / maxPossibleIterations)); - } - if (range1[0] === range2[0]) { - if (range1[1] < range2[1]) { - return -1; - } - if (range1[1] > range2[1]) { - return 1; - } - return 0; - } - if (range1[0] < range2[0]) { - return -1; - } - return 1; - }); -} - -exports.defaults = defaults; -exports.rSort = rSort; -exports.version = version; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/school/node_modules/ranges-sort/dist/ranges-sort.esm.js b/school/node_modules/ranges-sort/dist/ranges-sort.esm.js deleted file mode 100644 index 31f0662..0000000 --- a/school/node_modules/ranges-sort/dist/ranges-sort.esm.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @name ranges-sort - * @fileoverview Sort string index ranges - * @version 4.1.0 - * @author Roy Revelt, Codsen Ltd - * @license MIT - * {@link https://codsen.com/os/ranges-sort/} - */ - -var version$1 = "4.1.0"; - -const version = version$1; -const defaults = { - strictlyTwoElementsInRangeArrays: false, - progressFn: null -}; -function rSort(arrOfRanges, originalOptions) { - if (!Array.isArray(arrOfRanges) || !arrOfRanges.length) { - return arrOfRanges; - } - const opts = { ...defaults, - ...originalOptions - }; - let culpritsIndex; - let culpritsLen; - if (opts.strictlyTwoElementsInRangeArrays && !arrOfRanges.filter(range => range).every((rangeArr, indx) => { - if (rangeArr.length !== 2) { - culpritsIndex = indx; - culpritsLen = rangeArr.length; - return false; - } - return true; - })) { - throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${culpritsIndex}th range (${JSON.stringify(arrOfRanges[culpritsIndex], null, 4)}) has not two but ${culpritsLen} elements!`); - } - if (!arrOfRanges.filter(range => range).every((rangeArr, indx) => { - if (!Number.isInteger(rangeArr[0]) || rangeArr[0] < 0 || !Number.isInteger(rangeArr[1]) || rangeArr[1] < 0) { - culpritsIndex = indx; - return false; - } - return true; - })) { - throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${culpritsIndex}th range (${JSON.stringify(arrOfRanges[culpritsIndex], null, 4)}) does not consist of only natural numbers!`); - } - const maxPossibleIterations = arrOfRanges.filter(range => range).length ** 2; - let counter = 0; - return Array.from(arrOfRanges).filter(range => range).sort((range1, range2) => { - if (opts.progressFn) { - counter += 1; - opts.progressFn(Math.floor(counter * 100 / maxPossibleIterations)); - } - if (range1[0] === range2[0]) { - if (range1[1] < range2[1]) { - return -1; - } - if (range1[1] > range2[1]) { - return 1; - } - return 0; - } - if (range1[0] < range2[0]) { - return -1; - } - return 1; - }); -} - -export { defaults, rSort, version }; diff --git a/school/node_modules/ranges-sort/dist/ranges-sort.umd.js b/school/node_modules/ranges-sort/dist/ranges-sort.umd.js deleted file mode 100644 index 2be317f..0000000 --- a/school/node_modules/ranges-sort/dist/ranges-sort.umd.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @name ranges-sort - * @fileoverview Sort string index ranges - * @version 4.1.0 - * @author Roy Revelt, Codsen Ltd - * @license MIT - * {@link https://codsen.com/os/ranges-sort/} - */ - -!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).rangesSort={})}(this,(function(e){"use strict";const r={strictlyTwoElementsInRangeArrays:!1,progressFn:null};e.defaults=r,e.rSort=function(e,n){if(!Array.isArray(e)||!e.length)return e;const t={...r,...n};let s,o;if(t.strictlyTwoElementsInRangeArrays&&!e.filter((e=>e)).every(((e,r)=>2===e.length||(s=r,o=e.length,!1))))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${s}th range (${JSON.stringify(e[s],null,4)}) has not two but ${o} elements!`);if(!e.filter((e=>e)).every(((e,r)=>!(!Number.isInteger(e[0])||e[0]<0||!Number.isInteger(e[1])||e[1]<0)||(s=r,!1))))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${s}th range (${JSON.stringify(e[s],null,4)}) does not consist of only natural numbers!`);const i=e.filter((e=>e)).length**2;let a=0;return Array.from(e).filter((e=>e)).sort(((e,r)=>(t.progressFn&&(a+=1,t.progressFn(Math.floor(100*a/i))),e[0]===r[0]?e[1]<r[1]?-1:e[1]>r[1]?1:0:e[0]<r[0]?-1:1)))},e.version="4.1.0",Object.defineProperty(e,"__esModule",{value:!0})})); |