@fluid-experimental/property-common 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.216897

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/chronometer.d.ts +1 -0
  2. package/dist/chronometer.d.ts.map +1 -1
  3. package/dist/chronometer.js +1 -0
  4. package/dist/chronometer.js.map +1 -1
  5. package/dist/consoleUtils.d.ts +1 -0
  6. package/dist/consoleUtils.d.ts.map +1 -1
  7. package/dist/consoleUtils.js +1 -0
  8. package/dist/consoleUtils.js.map +1 -1
  9. package/dist/constants.d.ts +3 -0
  10. package/dist/constants.d.ts.map +1 -1
  11. package/dist/constants.js +3 -0
  12. package/dist/constants.js.map +1 -1
  13. package/dist/datastructures/collection.d.ts +3 -0
  14. package/dist/datastructures/collection.d.ts.map +1 -1
  15. package/dist/datastructures/collection.js +3 -0
  16. package/dist/datastructures/collection.js.map +1 -1
  17. package/dist/datastructures/dataArray.d.ts +28 -0
  18. package/dist/datastructures/dataArray.d.ts.map +1 -1
  19. package/dist/datastructures/dataArray.js +28 -0
  20. package/dist/datastructures/dataArray.js.map +1 -1
  21. package/dist/datastructures/integer64.d.ts +3 -0
  22. package/dist/datastructures/integer64.d.ts.map +1 -1
  23. package/dist/datastructures/integer64.js +3 -0
  24. package/dist/datastructures/integer64.js.map +1 -1
  25. package/dist/datastructures/sortedCollection.d.ts +3 -0
  26. package/dist/datastructures/sortedCollection.d.ts.map +1 -1
  27. package/dist/datastructures/sortedCollection.js +3 -0
  28. package/dist/datastructures/sortedCollection.js.map +1 -1
  29. package/dist/deferredPromise.d.ts +1 -0
  30. package/dist/deferredPromise.d.ts.map +1 -1
  31. package/dist/deferredPromise.js +1 -0
  32. package/dist/deferredPromise.js.map +1 -1
  33. package/dist/deterministicRandomGenerator.d.ts +1 -0
  34. package/dist/deterministicRandomGenerator.d.ts.map +1 -1
  35. package/dist/deterministicRandomGenerator.js +1 -0
  36. package/dist/deterministicRandomGenerator.js.map +1 -1
  37. package/dist/error_objects/flaggedError.d.ts +3 -0
  38. package/dist/error_objects/flaggedError.d.ts.map +1 -1
  39. package/dist/error_objects/flaggedError.js +3 -0
  40. package/dist/error_objects/flaggedError.js.map +1 -1
  41. package/dist/error_objects/httpError.d.ts +1 -0
  42. package/dist/error_objects/httpError.d.ts.map +1 -1
  43. package/dist/error_objects/httpError.js +1 -0
  44. package/dist/error_objects/httpError.js.map +1 -1
  45. package/dist/error_objects/httpErrorNoStack.d.ts +1 -0
  46. package/dist/error_objects/httpErrorNoStack.d.ts.map +1 -1
  47. package/dist/error_objects/httpErrorNoStack.js +1 -0
  48. package/dist/error_objects/httpErrorNoStack.js.map +1 -1
  49. package/dist/error_objects/operationError.d.ts +3 -0
  50. package/dist/error_objects/operationError.d.ts.map +1 -1
  51. package/dist/error_objects/operationError.js +3 -0
  52. package/dist/error_objects/operationError.js.map +1 -1
  53. package/dist/guidUtils.d.ts +3 -0
  54. package/dist/guidUtils.d.ts.map +1 -1
  55. package/dist/guidUtils.js +3 -0
  56. package/dist/guidUtils.js.map +1 -1
  57. package/dist/hashCalculator.d.ts +3 -0
  58. package/dist/hashCalculator.d.ts.map +1 -1
  59. package/dist/hashCalculator.js +3 -0
  60. package/dist/hashCalculator.js.map +1 -1
  61. package/dist/joinPaths.d.ts +1 -0
  62. package/dist/joinPaths.d.ts.map +1 -1
  63. package/dist/joinPaths.js +1 -0
  64. package/dist/joinPaths.js.map +1 -1
  65. package/lib/chronometer.d.ts +1 -0
  66. package/lib/chronometer.d.ts.map +1 -1
  67. package/lib/chronometer.js +1 -0
  68. package/lib/chronometer.js.map +1 -1
  69. package/lib/consoleUtils.d.ts +1 -0
  70. package/lib/consoleUtils.d.ts.map +1 -1
  71. package/lib/consoleUtils.js +1 -0
  72. package/lib/consoleUtils.js.map +1 -1
  73. package/lib/constants.d.ts +3 -0
  74. package/lib/constants.d.ts.map +1 -1
  75. package/lib/constants.js +3 -0
  76. package/lib/constants.js.map +1 -1
  77. package/lib/datastructures/collection.d.ts +3 -0
  78. package/lib/datastructures/collection.d.ts.map +1 -1
  79. package/lib/datastructures/collection.js +3 -0
  80. package/lib/datastructures/collection.js.map +1 -1
  81. package/lib/datastructures/dataArray.d.ts +28 -0
  82. package/lib/datastructures/dataArray.d.ts.map +1 -1
  83. package/lib/datastructures/dataArray.js +28 -0
  84. package/lib/datastructures/dataArray.js.map +1 -1
  85. package/lib/datastructures/integer64.d.ts +3 -0
  86. package/lib/datastructures/integer64.d.ts.map +1 -1
  87. package/lib/datastructures/integer64.js +3 -0
  88. package/lib/datastructures/integer64.js.map +1 -1
  89. package/lib/datastructures/sortedCollection.d.ts +3 -0
  90. package/lib/datastructures/sortedCollection.d.ts.map +1 -1
  91. package/lib/datastructures/sortedCollection.js +3 -0
  92. package/lib/datastructures/sortedCollection.js.map +1 -1
  93. package/lib/deferredPromise.d.ts +1 -0
  94. package/lib/deferredPromise.d.ts.map +1 -1
  95. package/lib/deferredPromise.js +1 -0
  96. package/lib/deferredPromise.js.map +1 -1
  97. package/lib/deterministicRandomGenerator.d.ts +1 -0
  98. package/lib/deterministicRandomGenerator.d.ts.map +1 -1
  99. package/lib/deterministicRandomGenerator.js +1 -0
  100. package/lib/deterministicRandomGenerator.js.map +1 -1
  101. package/lib/error_objects/flaggedError.d.ts +3 -0
  102. package/lib/error_objects/flaggedError.d.ts.map +1 -1
  103. package/lib/error_objects/flaggedError.js +3 -0
  104. package/lib/error_objects/flaggedError.js.map +1 -1
  105. package/lib/error_objects/httpError.d.ts +1 -0
  106. package/lib/error_objects/httpError.d.ts.map +1 -1
  107. package/lib/error_objects/httpError.js +1 -0
  108. package/lib/error_objects/httpError.js.map +1 -1
  109. package/lib/error_objects/httpErrorNoStack.d.ts +1 -0
  110. package/lib/error_objects/httpErrorNoStack.d.ts.map +1 -1
  111. package/lib/error_objects/httpErrorNoStack.js +1 -0
  112. package/lib/error_objects/httpErrorNoStack.js.map +1 -1
  113. package/lib/error_objects/operationError.d.ts +3 -0
  114. package/lib/error_objects/operationError.d.ts.map +1 -1
  115. package/lib/error_objects/operationError.js +3 -0
  116. package/lib/error_objects/operationError.js.map +1 -1
  117. package/lib/guidUtils.d.ts +3 -0
  118. package/lib/guidUtils.d.ts.map +1 -1
  119. package/lib/guidUtils.js +3 -0
  120. package/lib/guidUtils.js.map +1 -1
  121. package/lib/hashCalculator.d.ts +3 -0
  122. package/lib/hashCalculator.d.ts.map +1 -1
  123. package/lib/hashCalculator.js +3 -0
  124. package/lib/hashCalculator.js.map +1 -1
  125. package/lib/joinPaths.d.ts +1 -0
  126. package/lib/joinPaths.d.ts.map +1 -1
  127. package/lib/joinPaths.js +1 -0
  128. package/lib/joinPaths.js.map +1 -1
  129. package/package.json +2 -2
  130. package/platform-dependent/package.json +1 -1
  131. package/src/chronometer.ts +1 -0
  132. package/src/consoleUtils.ts +1 -0
  133. package/src/constants.ts +3 -0
  134. package/src/datastructures/collection.ts +3 -0
  135. package/src/datastructures/dataArray.ts +28 -0
  136. package/src/datastructures/integer64.ts +3 -0
  137. package/src/datastructures/sortedCollection.ts +3 -0
  138. package/src/deferredPromise.ts +1 -0
  139. package/src/deterministicRandomGenerator.ts +1 -0
  140. package/src/error_objects/flaggedError.ts +3 -0
  141. package/src/error_objects/httpError.ts +1 -0
  142. package/src/error_objects/httpErrorNoStack.ts +1 -0
  143. package/src/error_objects/operationError.ts +3 -0
  144. package/src/guidUtils.ts +3 -0
  145. package/src/hashCalculator.ts +3 -0
  146. package/src/joinPaths.ts +1 -0
  147. package/api-extractor.json +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"collection.js","sourceRoot":"","sources":["../../src/datastructures/collection.ts"],"names":[],"mappings":";;;;;;AAAA;;;GAGG;AACH,4DAA4D;AAC5D;;GAEG;AACH,oDAAuB;AAEvB,MAAM,IAAI,GAAG;IACZ,aAAa,EAAE,0CAA0C;IACzD,kBAAkB,EAAE,iCAAiC;IACrD,kBAAkB,EAAE,mDA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AAM,CAAC,CAAC;QAC5B,OAAO,MAAM,CAAC;IACf,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,aAA4B;QAChC,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,aAAa,CAAC,KAAK,CAAC;QAEhC,gBAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;YACzB,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;IAC1B,CAAC;CACD;AA/ZD,gCA+ZC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint accessor-pairs: [2, { \"getWithoutSet\": false }] */\n/**\n * @fileoverview Collection class definition\n */\nimport _ from \"lodash\";\n\nconst MSGS = {\n\tTYPE_MISMATCH: \"Type does not match this collection type\",\n\tKEY_ALREADY_EXISTS: \"Collection key already exists. \",\n\tKEY_DOES_NOT_EXIST: \"Collection key does not exist in this collection.\",\n\tMUST_GIVE_KEY: \"Collection missing key.\",\n\tMUST_GIVE_VALUE: \"Collection missing value.\",\n\tKEY_NOT_VALID: \"Key must be of type String or Number\",\n};\n\nexport class Collection<T> {\n\tprotected _items: { [key: string]: T } = {};\n\tprotected _order: (string | number)[] = [];\n\n\t/**\n\t * @param _name - a friendly name to describe this collection. If undefined\n\t * the collection will have a default \"Untitled Collection\" assigned to its name.\n\t * @param _type - optional parameter pointing to the constructor\n\t * of a type this Collection will host.\n\t */\n\tconstructor(\n\t\tprotected _name = \"Untitled Collection\",\n\t\tprotected _type?: new () => any,\n\t) {}\n\n\t// Pass-thru binding handles\n\tonAdd(in_key, in_value) {}\n\tonRemove(in_key, in_value) {}\n\tonClear(in_items) {}\n\n\tpublic get items() {\n\t\treturn this._items;\n\t}\n\n\tpublic get keys() {\n\t\treturn Object.keys(this._items);\n\t}\n\n\t/**\n\t * @param in_key - Key to store the value under\n\t * @param in_value - Value to store in the collection\n\t * @returns Return the value passed in\n\t */\n\tadd(in_key: number | string, in_value: T): T {\n\t\tthis._checkType(in_value);\n\t\tthis._checkIsNewKey(in_key);\n\n\t\tthis._items[in_key] = in_value;\n\t\tthis._order.push(in_key);\n\n\t\tthis.onAdd(in_key, in_value);\n\n\t\treturn in_value;\n\t}\n\n\t/**\n\t * Checks if in_value's type is equal to this Collection type. If this collection\n\t * has no type set, the check will pass.\n\t *\n\t * @param in_value - A value that is equal to the type managed by this collection.\n\t * @returns Return true if the type is a valid type for this\n\t * collection, throw otherwise.\n\t */\n\tprivate _checkType(in_value: T) {\n\t\tif (this._type && !(in_value instanceof this._type)) {\n\t\t\tthrow new Error(MSGS.TYPE_MISMATCH);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t/**\n\t * Bulk add items.\n\t * @param in_items - List of key-value pairs to be stored in the collection\n\t * @returns this collection after add\n\t */\n\tbulkAdd(in_items: { [key: string]: T }) {\n\t\t_.each(in_items, (item, key) => {\n\t\t\tthis.add(key, item);\n\t\t});\n\t\treturn this;\n\t}\n\n\t/**\n\t * Bulk remove items.\n\t * @param in_items - List of key-value items to be removed\n\t * @returns this collection after add\n\t */\n\tbulkRemove(in_items: { [key: string]: T }) {\n\t\t_.each(in_items, (item, key) => {\n\t\t\tthis.remove(key);\n\t\t});\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Test if this collection is empty\n\t * @returns true if empty, false otherwise\n\t * */\n\tisEmpty() {\n\t\treturn _.isEmpty(this._items);\n\t}\n\n\t/**\n\t * Return the first item in the collection, null if empty\n\t * @returns first item, or undefined if empty\n\t * */\n\tgetFirstItem(): T | undefined {\n\t\tconst index = _.first(this._order);\n\t\treturn index === undefined ? index : this._items[index];\n\t}\n\n\t/**\n\t * Return the last item in the collection, undefined if empty\n\t * @returns The last item, or undefined if empty\n\t * */\n\tgetLastItem(): T | undefined {\n\t\tconst index = _.last(this._order);\n\t\treturn index === undefined ? index : this._items[index];\n\t}\n\n\t/**\n\t * @returns Returns the type of collection (Array, etc.)\n\t */\n\tgetType() {\n\t\treturn this._type;\n\t}\n\n\t/**\n\t * @returns Returns the name of the collection\n\t */\n\tgetName(): string {\n\t\treturn this._name;\n\t}\n\n\t/**\n\t * Filter out by function\n\t * @param in_filterFunction - with arguments key and item\n\t * @returns A new filtered collection\n\t */\n\tfilter(in_filterFunction: (key: string, item: T) => boolean): Collection<T> {\n\t\tconst rtn = new Collection<T>();\n\n\t\tconst filterCb = function (in_key, in_item) {\n\t\t\tconst keeper = in_filterFunction(in_key, in_item);\n\t\t\tif (keeper) {\n\t\t\t\trtn.add(in_key, in_item);\n\t\t\t}\n\t\t};\n\n\t\tthis.iterate(filterCb);\n\n\t\treturn rtn;\n\t}\n\n\t/**\n\t * Filter out all keys NOT matching the in_filterKey\n\t * @param in_filterKey - a single key or an array of keys, if the\n\t * item matches any of the keys it will be filtered in.\n\t * @returns New filtered collection with all the items\n\t * matching at least one key.\n\t */\n\tfilterByKey(in_filterKey: string | string[]): Collection<T> {\n\t\tconst rtn = new Collection<T>();\n\n\t\tconst filterCb = _.isArray(in_filterKey)\n\t\t\t? function (in_key, in_item) {\n\t\t\t\t\tif (in_filterKey.includes(in_key)) {\n\t\t\t\t\t\trtn.add(in_key, in_item);\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: function (in_key, in_item) {\n\t\t\t\t\tif (in_key === in_filterKey) {\n\t\t\t\t\t\trtn.add(in_key, in_item);\n\t\t\t\t\t}\n\t\t\t };\n\n\t\tthis.iterate(filterCb);\n\n\t\treturn rtn;\n\t}\n\n\t/**\n\t * Filter out all keys NOT matching the in_filterValue\n\t * @param in_filterValue - Value to filter on\n\t * @returns Return a filtered collection\n\t */\n\tfilterByValue(in_filterValue: T): Collection<T> {\n\t\tconst rtn = new Collection<T>();\n\n\t\tconst filterCb = function (in_key, in_item) {\n\t\t\tif (in_item === in_filterValue) {\n\t\t\t\trtn.add(in_key, in_item);\n\t\t\t}\n\t\t};\n\n\t\tthis.iterate(filterCb);\n\n\t\treturn rtn;\n\t}\n\n\t/**\n\t * Remove an item from this Collection. This method returns a Boolean indicating\n\t * the success or failure of the removal. This is practical because if we were\n\t * to throw an error when the key doesn't exist, it would require additional\n\t * checks by the caller to make sure this key exists prior to removal. Which\n\t * would make the attempt of removal more verbose and also costly because the\n\t * caller would have to keep a list – somewhere else – of the things he can\n\t * and cannot remove.\n\t *\n\t * @param in_key - the key we wish to remove\n\t * @returns true if the key exists and was removed, false otherwise.\n\t */\n\tremove(in_key: number | string): boolean {\n\t\tif (!this.has(in_key)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst remember = this._items[in_key];\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\t\tdelete this._items[in_key];\n\t\tthis._order.splice(this._order.indexOf(in_key), 1);\n\n\t\tthis.onRemove(in_key, remember);\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Return the number of items in this Collection\n\t * @returns the number of items in the collection\n\t */\n\tgetCount(): number {\n\t\treturn this._order.length;\n\t}\n\n\t/**\n\t * Returns this collection as an ordered Array\n\t * @returns Array including the values\n\t */\n\tgetAsArray() {\n\t\tconst rtnArr: T[] = new Array(this.getCount());\n\n\t\tfor (let i = 0; i < this._order.length; i++) {\n\t\t\trtnArr[i] = this._items[this._order[i]];\n\t\t}\n\n\t\treturn rtnArr;\n\t}\n\n\t/**\n\t * @param in_key - the key we are looking for\n\t * @returns true if the item exists\n\t */\n\thas(in_key: string | number): boolean {\n\t\treturn Object.prototype.hasOwnProperty.call(this._items, in_key);\n\t}\n\n\t/**\n\t * Return an item associated with the given key\n\t * @param in_key - the key for the item in this\n\t * Collection\n\t * @returns The item\n\t */\n\titem(in_key: number | string) {\n\t\treturn this._items[in_key];\n\t}\n\n\t/**\n\t * Checks if this is a new key in the collection. Throw if already exists.\n\t * @param in_key - The key to check against\n\t * @returns true if key is new\n\t */\n\tprivate _checkIsNewKey(in_key: number | string) {\n\t\tif (this.has(in_key)) {\n\t\t\tthrow new Error(`${MSGS.KEY_ALREADY_EXISTS} ${in_key}`);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks if the key exists in the collection. Throw if not.\n\t * @param in_key - the key to check against\n\t * @returns true if key exists\n\t */\n\tprivate _checkKeyExists(in_key: number | string) {\n\t\tif (!this.has(in_key)) {\n\t\t\tthrow new Error(`${MSGS.KEY_DOES_NOT_EXIST} ${in_key}`);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Set an existing key to a value. If key doesn't exist this call will throw\n\t * an error.\n\t * @param in_key - The key we want to modify\n\t * @param in_value - The value we are to set at this key\n\t * @returns The value passed in\n\t */\n\tset(in_key: string, in_value: T) {\n\t\tthis._checkKeyExists(in_key);\n\n\t\tthis._items[in_key] = in_value;\n\n\t\treturn in_value;\n\t}\n\n\t/**\n\t * Iterate over this collection and run the callback with passing the key and\n\t * item in the iteration loop.\n\t * @param in_callback - A function that we will call on each item\n\t * of this collection. If the callback returns false then the iteration will exit early.\n\t */\n\titerate(in_callback) {\n\t\tfor (const key of this._order) {\n\t\t\tconst continu = in_callback(key, this._items[key]);\n\t\t\tif (continu === false) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Iterate over this collection starting from the tail and run the callback with passing the key and\n\t * item in the iteration loop.\n\t * @param in_callback - a function that we will call on each item\n\t * of this collection. If the callback returns false then the iteration will exit early.\n\t */\n\titerateFromTail(in_callback) {\n\t\tlet key;\n\t\tlet continu;\n\t\tfor (let i = this._order.length - 1; i >= 0; i--) {\n\t\t\tkey = this._order[i];\n\t\t\tcontinu = in_callback(key, this._items[key]);\n\t\t\tif (continu === false) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @returns Return an object containing the items of this collection\n\t */\n\tgetItems(): { [key: string]: T } {\n\t\tconst result = {};\n\n\t\t_.each(this._items, function (item, key) {\n\t\t\tresult[key] = item;\n\t\t});\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Return the list of keys\n\t * @returns List of keys\n\t */\n\tgetKeys(): string[] {\n\t\treturn Object.keys(this._items);\n\t}\n\n\t/**\n\t * Method used to get the first element in the collection along with its key.\n\t */\n\tpeak() {\n\t\treturn {\n\t\t\titem: this._items[this._order[0]],\n\t\t\tkey: this._order[0],\n\t\t};\n\t}\n\n\t/**\n\t * Clear this collection\n\t * @returns this collection\n\t */\n\tclear() {\n\t\tif (_.isEmpty(this._items)) {\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.onClear(this._items);\n\n\t\t// Best to just iterate through and remove everything, so that OnRemove\n\t\t// handlers are called.\n\n\t\t_.each(this.getKeys(), (key) => {\n\t\t\tthis.remove(key);\n\t\t});\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Copy the items of in_collection to this collection.\n\t * @param in_collection - the collection we want to\n\t * copy from.\n\t * @returns new Collection\n\t */\n\tclone(): Collection<T> {\n\t\tconst newCol = new Collection<T>(this._name, this._type);\n\t\tnewCol.bulkAdd(this._items);\n\t\treturn newCol;\n\t}\n\n\t/**\n\t * Copy the items of in_collection to this collection.\n\t * @param in_collection - the collection we want to\n\t * copy from.\n\t */\n\tcopy(in_collection: Collection<T>) {\n\t\tthis.clear();\n\t\tconst its = in_collection.items;\n\n\t\t_.each(its, (item, key) => {\n\t\t\tthis.add(key, item);\n\t\t});\n\t}\n\n\tget values() {\n\t\treturn this.getAsArray();\n\t}\n}\n"]}
1
+ {"version":3,"file":"collection.js","sourceRoot":"","sources":["../../src/datastructures/collection.ts"],"names":[],"mappings":";;;;;;AAAA;;;GAGG;AACH,4DAA4D;AAC5D;;GAEG;AACH,oDAAuB;AAEvB,MAAM,IAAI,GAAG;IACZ,aAAa,EAAE,0CAA0C;IACzD,kBAAkB,EAAE,iCAAiC;IACrD,kBAAkB,EAAE,mDAAmD;I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AAC,MAAM,CAAC,CAAC;QAC5B,OAAO,MAAM,CAAC;IACf,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,aAA4B;QAChC,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,aAAa,CAAC,KAAK,CAAC;QAEhC,gBAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;YACzB,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;IAC1B,CAAC;CACD;AA/ZD,gCA+ZC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint accessor-pairs: [2, { \"getWithoutSet\": false }] */\n/**\n * @fileoverview Collection class definition\n */\nimport _ from \"lodash\";\n\nconst MSGS = {\n\tTYPE_MISMATCH: \"Type does not match this collection type\",\n\tKEY_ALREADY_EXISTS: \"Collection key already exists. \",\n\tKEY_DOES_NOT_EXIST: \"Collection key does not exist in this collection.\",\n\tMUST_GIVE_KEY: \"Collection missing key.\",\n\tMUST_GIVE_VALUE: \"Collection missing value.\",\n\tKEY_NOT_VALID: \"Key must be of type String or Number\",\n};\n\n/**\n * @internal\n */\nexport class Collection<T> {\n\tprotected _items: { [key: string]: T } = {};\n\tprotected _order: (string | number)[] = [];\n\n\t/**\n\t * @param _name - a friendly name to describe this collection. If undefined\n\t * the collection will have a default \"Untitled Collection\" assigned to its name.\n\t * @param _type - optional parameter pointing to the constructor\n\t * of a type this Collection will host.\n\t */\n\tconstructor(\n\t\tprotected _name = \"Untitled Collection\",\n\t\tprotected _type?: new () => any,\n\t) {}\n\n\t// Pass-thru binding handles\n\tonAdd(in_key, in_value) {}\n\tonRemove(in_key, in_value) {}\n\tonClear(in_items) {}\n\n\tpublic get items() {\n\t\treturn this._items;\n\t}\n\n\tpublic get keys() {\n\t\treturn Object.keys(this._items);\n\t}\n\n\t/**\n\t * @param in_key - Key to store the value under\n\t * @param in_value - Value to store in the collection\n\t * @returns Return the value passed in\n\t */\n\tadd(in_key: number | string, in_value: T): T {\n\t\tthis._checkType(in_value);\n\t\tthis._checkIsNewKey(in_key);\n\n\t\tthis._items[in_key] = in_value;\n\t\tthis._order.push(in_key);\n\n\t\tthis.onAdd(in_key, in_value);\n\n\t\treturn in_value;\n\t}\n\n\t/**\n\t * Checks if in_value's type is equal to this Collection type. If this collection\n\t * has no type set, the check will pass.\n\t *\n\t * @param in_value - A value that is equal to the type managed by this collection.\n\t * @returns Return true if the type is a valid type for this\n\t * collection, throw otherwise.\n\t */\n\tprivate _checkType(in_value: T) {\n\t\tif (this._type && !(in_value instanceof this._type)) {\n\t\t\tthrow new Error(MSGS.TYPE_MISMATCH);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t/**\n\t * Bulk add items.\n\t * @param in_items - List of key-value pairs to be stored in the collection\n\t * @returns this collection after add\n\t */\n\tbulkAdd(in_items: { [key: string]: T }) {\n\t\t_.each(in_items, (item, key) => {\n\t\t\tthis.add(key, item);\n\t\t});\n\t\treturn this;\n\t}\n\n\t/**\n\t * Bulk remove items.\n\t * @param in_items - List of key-value items to be removed\n\t * @returns this collection after add\n\t */\n\tbulkRemove(in_items: { [key: string]: T }) {\n\t\t_.each(in_items, (item, key) => {\n\t\t\tthis.remove(key);\n\t\t});\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Test if this collection is empty\n\t * @returns true if empty, false otherwise\n\t * */\n\tisEmpty() {\n\t\treturn _.isEmpty(this._items);\n\t}\n\n\t/**\n\t * Return the first item in the collection, null if empty\n\t * @returns first item, or undefined if empty\n\t * */\n\tgetFirstItem(): T | undefined {\n\t\tconst index = _.first(this._order);\n\t\treturn index === undefined ? index : this._items[index];\n\t}\n\n\t/**\n\t * Return the last item in the collection, undefined if empty\n\t * @returns The last item, or undefined if empty\n\t * */\n\tgetLastItem(): T | undefined {\n\t\tconst index = _.last(this._order);\n\t\treturn index === undefined ? index : this._items[index];\n\t}\n\n\t/**\n\t * @returns Returns the type of collection (Array, etc.)\n\t */\n\tgetType() {\n\t\treturn this._type;\n\t}\n\n\t/**\n\t * @returns Returns the name of the collection\n\t */\n\tgetName(): string {\n\t\treturn this._name;\n\t}\n\n\t/**\n\t * Filter out by function\n\t * @param in_filterFunction - with arguments key and item\n\t * @returns A new filtered collection\n\t */\n\tfilter(in_filterFunction: (key: string, item: T) => boolean): Collection<T> {\n\t\tconst rtn = new Collection<T>();\n\n\t\tconst filterCb = function (in_key, in_item) {\n\t\t\tconst keeper = in_filterFunction(in_key, in_item);\n\t\t\tif (keeper) {\n\t\t\t\trtn.add(in_key, in_item);\n\t\t\t}\n\t\t};\n\n\t\tthis.iterate(filterCb);\n\n\t\treturn rtn;\n\t}\n\n\t/**\n\t * Filter out all keys NOT matching the in_filterKey\n\t * @param in_filterKey - a single key or an array of keys, if the\n\t * item matches any of the keys it will be filtered in.\n\t * @returns New filtered collection with all the items\n\t * matching at least one key.\n\t */\n\tfilterByKey(in_filterKey: string | string[]): Collection<T> {\n\t\tconst rtn = new Collection<T>();\n\n\t\tconst filterCb = _.isArray(in_filterKey)\n\t\t\t? function (in_key, in_item) {\n\t\t\t\t\tif (in_filterKey.includes(in_key)) {\n\t\t\t\t\t\trtn.add(in_key, in_item);\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: function (in_key, in_item) {\n\t\t\t\t\tif (in_key === in_filterKey) {\n\t\t\t\t\t\trtn.add(in_key, in_item);\n\t\t\t\t\t}\n\t\t\t };\n\n\t\tthis.iterate(filterCb);\n\n\t\treturn rtn;\n\t}\n\n\t/**\n\t * Filter out all keys NOT matching the in_filterValue\n\t * @param in_filterValue - Value to filter on\n\t * @returns Return a filtered collection\n\t */\n\tfilterByValue(in_filterValue: T): Collection<T> {\n\t\tconst rtn = new Collection<T>();\n\n\t\tconst filterCb = function (in_key, in_item) {\n\t\t\tif (in_item === in_filterValue) {\n\t\t\t\trtn.add(in_key, in_item);\n\t\t\t}\n\t\t};\n\n\t\tthis.iterate(filterCb);\n\n\t\treturn rtn;\n\t}\n\n\t/**\n\t * Remove an item from this Collection. This method returns a Boolean indicating\n\t * the success or failure of the removal. This is practical because if we were\n\t * to throw an error when the key doesn't exist, it would require additional\n\t * checks by the caller to make sure this key exists prior to removal. Which\n\t * would make the attempt of removal more verbose and also costly because the\n\t * caller would have to keep a list – somewhere else – of the things he can\n\t * and cannot remove.\n\t *\n\t * @param in_key - the key we wish to remove\n\t * @returns true if the key exists and was removed, false otherwise.\n\t */\n\tremove(in_key: number | string): boolean {\n\t\tif (!this.has(in_key)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst remember = this._items[in_key];\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\t\tdelete this._items[in_key];\n\t\tthis._order.splice(this._order.indexOf(in_key), 1);\n\n\t\tthis.onRemove(in_key, remember);\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Return the number of items in this Collection\n\t * @returns the number of items in the collection\n\t */\n\tgetCount(): number {\n\t\treturn this._order.length;\n\t}\n\n\t/**\n\t * Returns this collection as an ordered Array\n\t * @returns Array including the values\n\t */\n\tgetAsArray() {\n\t\tconst rtnArr: T[] = new Array(this.getCount());\n\n\t\tfor (let i = 0; i < this._order.length; i++) {\n\t\t\trtnArr[i] = this._items[this._order[i]];\n\t\t}\n\n\t\treturn rtnArr;\n\t}\n\n\t/**\n\t * @param in_key - the key we are looking for\n\t * @returns true if the item exists\n\t */\n\thas(in_key: string | number): boolean {\n\t\treturn Object.prototype.hasOwnProperty.call(this._items, in_key);\n\t}\n\n\t/**\n\t * Return an item associated with the given key\n\t * @param in_key - the key for the item in this\n\t * Collection\n\t * @returns The item\n\t */\n\titem(in_key: number | string) {\n\t\treturn this._items[in_key];\n\t}\n\n\t/**\n\t * Checks if this is a new key in the collection. Throw if already exists.\n\t * @param in_key - The key to check against\n\t * @returns true if key is new\n\t */\n\tprivate _checkIsNewKey(in_key: number | string) {\n\t\tif (this.has(in_key)) {\n\t\t\tthrow new Error(`${MSGS.KEY_ALREADY_EXISTS} ${in_key}`);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks if the key exists in the collection. Throw if not.\n\t * @param in_key - the key to check against\n\t * @returns true if key exists\n\t */\n\tprivate _checkKeyExists(in_key: number | string) {\n\t\tif (!this.has(in_key)) {\n\t\t\tthrow new Error(`${MSGS.KEY_DOES_NOT_EXIST} ${in_key}`);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Set an existing key to a value. If key doesn't exist this call will throw\n\t * an error.\n\t * @param in_key - The key we want to modify\n\t * @param in_value - The value we are to set at this key\n\t * @returns The value passed in\n\t */\n\tset(in_key: string, in_value: T) {\n\t\tthis._checkKeyExists(in_key);\n\n\t\tthis._items[in_key] = in_value;\n\n\t\treturn in_value;\n\t}\n\n\t/**\n\t * Iterate over this collection and run the callback with passing the key and\n\t * item in the iteration loop.\n\t * @param in_callback - A function that we will call on each item\n\t * of this collection. If the callback returns false then the iteration will exit early.\n\t */\n\titerate(in_callback) {\n\t\tfor (const key of this._order) {\n\t\t\tconst continu = in_callback(key, this._items[key]);\n\t\t\tif (continu === false) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Iterate over this collection starting from the tail and run the callback with passing the key and\n\t * item in the iteration loop.\n\t * @param in_callback - a function that we will call on each item\n\t * of this collection. If the callback returns false then the iteration will exit early.\n\t */\n\titerateFromTail(in_callback) {\n\t\tlet key;\n\t\tlet continu;\n\t\tfor (let i = this._order.length - 1; i >= 0; i--) {\n\t\t\tkey = this._order[i];\n\t\t\tcontinu = in_callback(key, this._items[key]);\n\t\t\tif (continu === false) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @returns Return an object containing the items of this collection\n\t */\n\tgetItems(): { [key: string]: T } {\n\t\tconst result = {};\n\n\t\t_.each(this._items, function (item, key) {\n\t\t\tresult[key] = item;\n\t\t});\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Return the list of keys\n\t * @returns List of keys\n\t */\n\tgetKeys(): string[] {\n\t\treturn Object.keys(this._items);\n\t}\n\n\t/**\n\t * Method used to get the first element in the collection along with its key.\n\t */\n\tpeak() {\n\t\treturn {\n\t\t\titem: this._items[this._order[0]],\n\t\t\tkey: this._order[0],\n\t\t};\n\t}\n\n\t/**\n\t * Clear this collection\n\t * @returns this collection\n\t */\n\tclear() {\n\t\tif (_.isEmpty(this._items)) {\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.onClear(this._items);\n\n\t\t// Best to just iterate through and remove everything, so that OnRemove\n\t\t// handlers are called.\n\n\t\t_.each(this.getKeys(), (key) => {\n\t\t\tthis.remove(key);\n\t\t});\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Copy the items of in_collection to this collection.\n\t * @param in_collection - the collection we want to\n\t * copy from.\n\t * @returns new Collection\n\t */\n\tclone(): Collection<T> {\n\t\tconst newCol = new Collection<T>(this._name, this._type);\n\t\tnewCol.bulkAdd(this._items);\n\t\treturn newCol;\n\t}\n\n\t/**\n\t * Copy the items of in_collection to this collection.\n\t * @param in_collection - the collection we want to\n\t * copy from.\n\t */\n\tcopy(in_collection: Collection<T>) {\n\t\tthis.clear();\n\t\tconst its = in_collection.items;\n\n\t\t_.each(its, (item, key) => {\n\t\t\tthis.add(key, item);\n\t\t});\n\t}\n\n\tget values() {\n\t\treturn this.getAsArray();\n\t}\n}\n"]}
@@ -8,6 +8,7 @@
8
8
  /**
9
9
  * A typed data container that is persistable, high-performance, and can be used
10
10
  * as a backing store for collaborative property sets.
11
+ * @internal
11
12
  */
12
13
  declare class BaseDataArray {
13
14
  protected _buffer: any;
@@ -126,27 +127,51 @@ declare class BaseDataArray {
126
127
  copy(): any;
127
128
  get length(): number;
128
129
  }
130
+ /**
131
+ * @internal
132
+ */
129
133
  declare class Int8DataArray extends BaseDataArray {
130
134
  constructor(size: number);
131
135
  }
136
+ /**
137
+ * @internal
138
+ */
132
139
  declare class Int16DataArray extends BaseDataArray {
133
140
  constructor(size: number);
134
141
  }
142
+ /**
143
+ * @internal
144
+ */
135
145
  declare class Int32DataArray extends BaseDataArray {
136
146
  constructor(size: number);
137
147
  }
148
+ /**
149
+ * @internal
150
+ */
138
151
  declare class Uint8DataArray extends BaseDataArray {
139
152
  constructor(size: number);
140
153
  }
154
+ /**
155
+ * @internal
156
+ */
141
157
  declare class Uint16DataArray extends BaseDataArray {
142
158
  constructor(size: number);
143
159
  }
160
+ /**
161
+ * @internal
162
+ */
144
163
  declare class Uint32DataArray extends BaseDataArray {
145
164
  constructor(size: number);
146
165
  }
166
+ /**
167
+ * @internal
168
+ */
147
169
  declare class Float32DataArray extends BaseDataArray {
148
170
  constructor(size: number);
149
171
  }
172
+ /**
173
+ * @internal
174
+ */
150
175
  declare class Float64DataArray extends BaseDataArray {
151
176
  constructor(size: number);
152
177
  }
@@ -154,6 +179,7 @@ declare class Float64DataArray extends BaseDataArray {
154
179
  * A data container that can contain every native type
155
180
  *
156
181
  * @param size - The initial size with which to allocate the array.
182
+ * @internal
157
183
  */
158
184
  declare class UniversalDataArray extends BaseDataArray {
159
185
  constructor(bufferConstructor: any, size: number);
@@ -209,6 +235,7 @@ declare class UniversalDataArray extends BaseDataArray {
209
235
  }
210
236
  /**
211
237
  * A data container that contains a string
238
+ * @internal
212
239
  */
213
240
  declare class StringDataArray extends BaseDataArray {
214
241
  constructor();
@@ -241,6 +268,7 @@ declare class StringDataArray extends BaseDataArray {
241
268
  }
242
269
  /**
243
270
  * A data container that can contain boolean type
271
+ * @internal
244
272
  */
245
273
  declare class BoolDataArray extends UniversalDataArray {
246
274
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dataArray.d.ts","sourceRoot":"","sources":["../../src/datastructures/dataArray.ts"],"names":[],"mappings":"AAAA;;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AAE,MAAM;IAIxB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAQpB;;;;OAIG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE;IAM9C;;;;OAIG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,KAAA;CAa/B;AAED,OAAO,EACN,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,aAAa,GACb,CAAC"}
@@ -13,6 +13,7 @@ exports.BoolDataArray = exports.StringDataArray = exports.UniversalDataArray = e
13
13
  /**
14
14
  * A typed data container that is persistable, high-performance, and can be used
15
15
  * as a backing store for collaborative property sets.
16
+ * @internal
16
17
  */
17
18
  class BaseDataArray {
18
19
  constructor(a, b) {
@@ -247,48 +248,72 @@ class BaseDataArray {
247
248
  }
248
249
  }
249
250
  exports.BaseDataArray = BaseDataArray;
251
+ /**
252
+ * @internal
253
+ */
250
254
  class Int8DataArray extends BaseDataArray {
251
255
  constructor(size) {
252
256
  super(Int8Array, size);
253
257
  }
254
258
  }
255
259
  exports.Int8DataArray = Int8DataArray;
260
+ /**
261
+ * @internal
262
+ */
256
263
  class Int16DataArray extends BaseDataArray {
257
264
  constructor(size) {
258
265
  super(Int16Array, size);
259
266
  }
260
267
  }
261
268
  exports.Int16DataArray = Int16DataArray;
269
+ /**
270
+ * @internal
271
+ */
262
272
  class Int32DataArray extends BaseDataArray {
263
273
  constructor(size) {
264
274
  super(Int32Array, size);
265
275
  }
266
276
  }
267
277
  exports.Int32DataArray = Int32DataArray;
278
+ /**
279
+ * @internal
280
+ */
268
281
  class Uint8DataArray extends BaseDataArray {
269
282
  constructor(size) {
270
283
  super(Uint8Array, size);
271
284
  }
272
285
  }
273
286
  exports.Uint8DataArray = Uint8DataArray;
287
+ /**
288
+ * @internal
289
+ */
274
290
  class Uint16DataArray extends BaseDataArray {
275
291
  constructor(size) {
276
292
  super(Uint16Array, size);
277
293
  }
278
294
  }
279
295
  exports.Uint16DataArray = Uint16DataArray;
296
+ /**
297
+ * @internal
298
+ */
280
299
  class Uint32DataArray extends BaseDataArray {
281
300
  constructor(size) {
282
301
  super(Uint32Array, size);
283
302
  }
284
303
  }
285
304
  exports.Uint32DataArray = Uint32DataArray;
305
+ /**
306
+ * @internal
307
+ */
286
308
  class Float32DataArray extends BaseDataArray {
287
309
  constructor(size) {
288
310
  super(Float32Array, size);
289
311
  }
290
312
  }
291
313
  exports.Float32DataArray = Float32DataArray;
314
+ /**
315
+ * @internal
316
+ */
292
317
  class Float64DataArray extends BaseDataArray {
293
318
  constructor(size) {
294
319
  super(Float64Array, size);
@@ -299,6 +324,7 @@ exports.Float64DataArray = Float64DataArray;
299
324
  * A data container that can contain every native type
300
325
  *
301
326
  * @param size - The initial size with which to allocate the array.
327
+ * @internal
302
328
  */
303
329
  class UniversalDataArray extends BaseDataArray {
304
330
  constructor(a, b) {
@@ -406,6 +432,7 @@ class UniversalDataArray extends BaseDataArray {
406
432
  exports.UniversalDataArray = UniversalDataArray;
407
433
  /**
408
434
  * A data container that contains a string
435
+ * @internal
409
436
  */
410
437
  class StringDataArray extends BaseDataArray {
411
438
  constructor() {
@@ -463,6 +490,7 @@ class StringDataArray extends BaseDataArray {
463
490
  exports.StringDataArray = StringDataArray;
464
491
  /**
465
492
  * A data container that can contain boolean type
493
+ * @internal
466
494
  */
467
495
  class BoolDataArray extends UniversalDataArray {
468
496
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dataArray.js","sourceRoot":"","sources":["../../src/datastructures/dataArray.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAAwD;AACxD,4DAA4D;AAE5D;;GAEG;AAEH;;;GAGG;AACH,MAAM,aAAa;IAYlB,YAAY,CAAC,EAAE,CAAE;QAChB,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;YAC1B,IAAI,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C,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,EAAE,EAAE,SAAS,CAAC,CAAC;SACjE;aAAM;YACN,OAAO,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;SACpF;IACF,CAAC;CACD;AAcA,sCAAa","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint accessor-pairs: [2, { \"getWithoutSet\": false }] */\n\n/**\n * The data arrays definition file.\n */\n\n/**\n * A typed data container that is persistable, high-performance, and can be used\n * as a backing store for collaborative property sets.\n */\nclass BaseDataArray {\n\tprotected _buffer: any;\n\tprivate readonly bufferConstructor;\n\tprotected size: number;\n\n\tconstructor(size: number);\n\n\t/**\n\t * @param bufferConstructor - This is the constructor to be used to setup the internal buffer of the DataArray.\n\t * @param size - The initial size with which to allocate the array.\n\t */\n\tconstructor(bufferConstructor: any, size: number);\n\tconstructor(a, b?) {\n\t\tif (typeof a === \"number\") {\n\t\t\tthis.size = a;\n\t\t\tthis.bufferConstructor = this.getBufferCtor();\n\t\t} else {\n\t\t\tthis.bufferConstructor = a;\n\t\t\tthis.size = b;\n\t\t}\n\t\t// The 'eslint-...' is used to disable the rule that requires\n\t\t// constructors to start with a capitalized letter.\n\t\tthis._buffer = new this.bufferConstructor(this.size);\n\t}\n\n\t/**\n\t * Get the value at an index. If no index is passed, return zeroth item.\n\t * @param in_idx - The specific item in the data array.\n\t * @returns The value at that index.\n\t */\n\tgetValue(in_idx = 0): any {\n\t\tif (in_idx >= this.size || in_idx < 0) {\n\t\t\tthrow new Error(\"Trying to access out of bounds!\");\n\t\t}\n\n\t\treturn this._buffer[in_idx];\n\t}\n\n\t/**\n\t * Return a range of values in the array.\n\t * @param in_idxStart - the starting index\n\t * @param in_idxEnd - the end index\n\t * @returns the array of values in the range\n\t */\n\tgetValueRange(in_idxStart: number, in_idxEnd: number) {\n\t\tif (in_idxStart >= this.size || in_idxEnd > this.size || in_idxStart < 0 || in_idxEnd < 0) {\n\t\t\tthrow new Error(\"Trying to access out of bounds!\");\n\t\t}\n\n\t\treturn this._buffer.subarray(in_idxStart, in_idxEnd);\n\t}\n\n\t/**\n\t * Return the serialized form of Data Arrays.\n\t * @returns An object containing an array of the values.\n\t */\n\tserialize(): number[] {\n\t\treturn Array.from(this._buffer.subarray(0, this.size));\n\t}\n\n\t/**\n\t * Deserialize data from a serialized representation\n\t * @param in_serialized - the serialized representation\n\t */\n\tdeserialize(in_serialized) {\n\t\tconst values = in_serialized;\n\t\tconst length = in_serialized.length;\n\t\tif (length !== this.size) {\n\t\t\tthis.resize(length);\n\t\t\tthis.size = length;\n\t\t}\n\t\tlet i;\n\t\tfor (i = 0; i < length; i++) {\n\t\t\tthis._buffer[i] = values[i];\n\t\t}\n\t}\n\n\t/**\n\t * Set value at an index.\n\t * @param in_idx - the index\n\t * @param in_value - the value we want to set at index\n\t */\n\tsetValue(in_idx: number, in_value) {\n\t\tif (in_idx < this._buffer.length) {\n\t\t\tthis._buffer[in_idx] = in_value;\n\t\t} else {\n\t\t\tconsole.error(\"DataArray setValue in_idx is out of bounds.\");\n\t\t}\n\t}\n\n\t/**\n\t * creates a copy of a typed array with removed elements\n\t * @param in_arr - the input array (won't be modified)\n\t * @param in_offset - starting index of range that will be removed\n\t * @param in_deleteCount - number of removed elements\n\t * @returns a copy of the input array without the selected range\n\t */\n\tprivate _removeElementsFromArray(in_arr, in_offset: number, in_deleteCount: number) {\n\t\t// TODO: this function can be optimized\n\t\tconst newSize = this.size - in_deleteCount;\n\t\tconst splicedArray = new in_arr.constructor(newSize);\n\t\tsplicedArray.set(in_arr.subarray(0, in_offset));\n\t\tsplicedArray.set(in_arr.subarray(in_offset + in_deleteCount, this.size), in_offset);\n\t\treturn splicedArray;\n\t}\n\n\t/**\n\t * remove a range of elements from the array\n\t * @param in_offset - start of the range\n\t * @param in_deleteCount - number of elements to be removed\n\t */\n\tremoveRange(in_offset: number, in_deleteCount: number) {\n\t\tif (in_offset + in_deleteCount < (this._buffer.length as number) + 1) {\n\t\t\tthis._buffer = this._removeElementsFromArray(this._buffer, in_offset, in_deleteCount);\n\t\t\tthis.size = this.size - in_deleteCount;\n\t\t} else {\n\t\t\tconsole.error(\"DataArray removeRange in_offset + in_deleteCount is out of bounds.\");\n\t\t}\n\t}\n\n\t/**\n\t * copy an array with elements inserted into the copy\n\t * @param in_arr - the input array (won't be modified)\n\t * @param in_offset - the index where the new elements will be inserted\n\t * @param in_addedArray - the array with the elements that will be added\n\t * @returns the combined array\n\t */\n\tprivate _insert(in_arr, in_offset: number, in_addedArray) {\n\t\t// TODO: this function can be optimized\n\t\tconst newSize = this.size + (in_addedArray.length as number);\n\t\tconst insertedArray = new in_arr.constructor(newSize);\n\t\tinsertedArray.set(in_arr.subarray(0, in_offset));\n\t\tinsertedArray.set(in_addedArray, in_offset);\n\t\tinsertedArray.set(\n\t\t\tin_arr.subarray(in_offset, this.size),\n\t\t\tin_offset + (in_addedArray.length as number),\n\t\t);\n\t\treturn insertedArray;\n\t}\n\n\t/**\n\t * insert the content of an array into the DataArray\n\t * @param in_offset - the target index\n\t * @param in_array - the array to be inserted\n\t */\n\tinsertRange(in_offset: number, in_array) {\n\t\tthis._buffer = this._insert(this._buffer, in_offset, in_array);\n\t\tthis.size = this.size + (in_array.length as number);\n\t}\n\n\t/**\n\t * Set this array values to be equal to in_array values.\n\t * @param in_offset - An optional offset in this array to begin start setting this arrays values to in_array values.\n\t * @param in_array - The input array.\n\t */\n\tset(in_offset: number, in_array) {\n\t\tif (\n\t\t\tin_array instanceof ArrayBuffer ||\n\t\t\tin_array instanceof Array ||\n\t\t\tin_array instanceof this.getBufferCtor()\n\t\t) {\n\t\t\tthis._buffer.set(in_array, in_offset);\n\t\t} else if (in_array instanceof BaseDataArray) {\n\t\t\tthis._buffer.set(in_array.getBuffer(), in_offset);\n\t\t} else {\n\t\t\tconsole.error(\"DataArray set() must be called with Array, TypedArray or DataArray\");\n\t\t}\n\t}\n\n\t/**\n\t * Insert a value at the end of the array, creates a new element at the end and sets the value.\n\t * @param in_value - The new value.\n\t */\n\tpush(in_value) {\n\t\t// Adjust the buffer if necessary\n\t\tconst bufferLength = this._buffer.length;\n\t\tif (this.size > bufferLength - 1) {\n\t\t\tthis._alloc(this.size * 2 || 1); // grow by a factor of 2x\n\t\t}\n\t\t// set the value and update size\n\t\tthis.setValue(this.size, in_value);\n\t\tthis.size++;\n\t}\n\n\t/**\n\t * Get direct access to the data (for performance reasons) this should be uses read only.\n\t * @returns The (read only) raw data.\n\t */\n\tgetBuffer() {\n\t\treturn this._buffer;\n\t}\n\n\t/**\n\t * Get the constructor of the underlying `TypedArray`.\n\t * @returns The constructor for the data buffer.\n\t */\n\tgetBufferCtor() {\n\t\treturn this.bufferConstructor;\n\t}\n\n\t/**\n\t * Apply a given function to all elements of the array.\n\t * @param in_fn - The function that will be applied to every element.\n\t */\n\titerate(in_fn) {\n\t\tconst l = this.size;\n\t\tfor (let i = 0; i < l; i++) {\n\t\t\tin_fn(this._buffer[i]);\n\t\t}\n\t}\n\n\t/**\n\t * Tet a resized buffer copy.\n\t * @param in_bufferCtor - The constructor for the returned buffer.\n\t * @param in_buffer - The input buffer (won't be modified).\n\t * @param in_newSize - The target size.\n\t * @returns The buffer with the new size.\n\t */\n\tprivate resizeBuffer(in_bufferCtor, in_buffer, in_newSize: number) {\n\t\t// target buffer with the desired new size\n\t\t// The 'eslint-...' is used to disable the rule that requires\n\t\t// constructors to start with a capitalized letter.\n\t\tconst newBuffer = new in_bufferCtor(in_newSize);\n\t\tconst oldSize = in_buffer.length;\n\t\tconst oldBuffer = in_buffer;\n\t\tconst isShrinking = oldSize > in_newSize;\n\t\tnewBuffer.set(isShrinking ? oldBuffer.subarray(0, in_newSize) : oldBuffer);\n\t\treturn newBuffer;\n\t}\n\n\t/**\n\t * Allocate memory for the array (for performance reasons, you can allocate more space than the current length,\n\t * which makes pushes to the array less expensive later).\n\t * @param size - The target allocated space.\n\t * @returns The DataArray itself.\n\t */\n\tprotected _alloc(size: number): any {\n\t\tthis._buffer = this.resizeBuffer(this.bufferConstructor, this._buffer, size);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Change the size of the array\n\t * @param size - The target size\n\t * @returns The DataArray itself\n\t */\n\tresize(size: number) {\n\t\t// this can be costly!!!\n\t\tthis._alloc(size);\n\t\tthis.size = size;\n\t\treturn this;\n\t}\n\n\tcopy() {\n\t\t// and this!\n\t\tconst newBuffer = new this.bufferConstructor(this.size); // buffer with the desired new size\n\t\tnewBuffer.set(this._buffer);\n\t\treturn newBuffer;\n\t}\n\n\tget length() {\n\t\treturn this.size;\n\t}\n}\n\nclass Int8DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Int8Array, size);\n\t}\n}\n\nclass Int16DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Int16Array, size);\n\t}\n}\n\nclass Int32DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Int32Array, size);\n\t}\n}\n\nclass Uint8DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Uint8Array, size);\n\t}\n}\n\nclass Uint16DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Uint16Array, size);\n\t}\n}\n\nclass Uint32DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Uint32Array, size);\n\t}\n}\n\nclass Float32DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Float32Array, size);\n\t}\n}\n\nclass Float64DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Float64Array, size);\n\t}\n}\n\n/**\n * A data container that can contain every native type\n *\n * @param size - The initial size with which to allocate the array.\n */\nclass UniversalDataArray extends BaseDataArray {\n\tconstructor(bufferConstructor: any, size: number);\n\tconstructor(size: number);\n\tconstructor(a?, b?) {\n\t\tif (b === undefined) {\n\t\t\tsuper(Array, a);\n\t\t} else {\n\t\t\tsuper(a, b);\n\t\t}\n\t}\n\n\t/**\n\t * Helper function to write array values into another array at a given offset.\n\t *\n\t * @param array - The target array.\n\t * @param values - The values we need to write.\n\t * @param offset - The starting index in target array.\n\t */\n\tprivate arraySet(array, values, offset = 0) {\n\t\tlet index = 0;\n\t\tvalues.forEach(function (value) {\n\t\t\tarray[index + offset] = value;\n\t\t\tindex++;\n\t\t});\n\t}\n\n\t/**\n\t * Insert the content of an array into the DataArray.\n\t * @param in_offset - The target index.\n\t * @param in_array - The array to be inserted.\n\t */\n\tinsertRange(in_offset: number, in_array: any[]) {\n\t\tthis._buffer.splice.call(this._buffer, ...[in_offset, 0].concat(in_array));\n\t\tthis.size = this.size + in_array.length;\n\t}\n\n\t/**\n\t * Eemove a range of elements from the array.\n\t * @param in_offset - The start of the range.\n\t * @param in_deleteCount - The number of elements to be removed.\n\t */\n\tremoveRange(in_offset: number, in_deleteCount: number) {\n\t\tif (in_offset + in_deleteCount < (this._buffer.length as number) + 1) {\n\t\t\tthis._buffer.splice(in_offset, in_deleteCount);\n\t\t\tthis.size -= in_deleteCount;\n\t\t} else {\n\t\t\tthrow Error(\"DataArray removeRange in_offset + in_deleteCount is out of bounds.\");\n\t\t}\n\t}\n\n\t/**\n\t * Set this array values to be equal to in_array values.\n\t * @param in_offset - An optional offset in this array to begin start\n\t * setting this arrays values to in_array values.\n\t * @param in_array - The input array.\n\t */\n\tset(in_offset: number, in_array) {\n\t\tif (\n\t\t\tin_array instanceof ArrayBuffer ||\n\t\t\tin_array instanceof Array ||\n\t\t\tin_array instanceof this.getBufferCtor()\n\t\t) {\n\t\t\tthis.arraySet(this._buffer, in_array, in_offset);\n\t\t} else if (in_array instanceof BaseDataArray) {\n\t\t\tthis.arraySet(this._buffer, in_array.getBuffer(), in_offset);\n\t\t} else {\n\t\t\tconsole.error(\"DataArray set() must be called with Array, TypedArray or DataArray\");\n\t\t}\n\t}\n\n\t/**\n\t * Return a range of values in the array.\n\t * @param in_idxStart - the starting index\n\t * @param in_idxEnd - the end index - this offset is exclusive\n\t * @returns the array of values in the range\n\t */\n\tgetValueRange(in_idxStart: number, in_idxEnd: number) {\n\t\tif (in_idxStart >= this.size || in_idxEnd > this.size || in_idxStart < 0 || in_idxEnd < 0) {\n\t\t\tthrow new Error(\"Trying to access out of bounds!\");\n\t\t}\n\t\treturn this._buffer.slice(in_idxStart, in_idxEnd);\n\t}\n\n\t/**\n\t * change the size of a javascript array and keep the content, if possible. Keeps the input buffer.\n\t * @param in_buffer - input buffer - not changed\n\t * @param in_newSize - target size\n\t * @returns an Array of the new size\n\t */\n\tprivate resizeBufferArray(in_buffer, in_newSize) {\n\t\t// target buffer with the desired new size\n\t\tconst newBuffer = new Array(in_newSize);\n\t\tconst oldSize = in_buffer.length;\n\t\tconst oldBuffer = in_buffer;\n\t\tconst isShrinking = oldSize > in_newSize;\n\t\tthis.arraySet(newBuffer, isShrinking ? oldBuffer.slice(0, in_newSize) : oldBuffer);\n\t\treturn newBuffer;\n\t}\n\n\t/**\n\t * allocate memory for the array (for performance reasons, you can allocate more space than the current length,\n\t * which makes pushes to the array less expensive later)\n\t * @param size - the target allocated space\n\t * @returns the DataArray itself\n\t */\n\tprotected _alloc(size: number): any {\n\t\tthis._buffer = this.resizeBufferArray(this._buffer, size);\n\t\treturn this;\n\t}\n}\n\n/**\n * A data container that contains a string\n */\nclass StringDataArray extends BaseDataArray {\n\tconstructor() {\n\t\tsuper(String, 0);\n\t\tthis.size = 0;\n\t\tthis._buffer = \"\";\n\t}\n\t/**\n\t * insert the content of a string into the StringDataArray\n\t * @param in_offset - the target index\n\t * @param in_string - the string to be inserted\n\t */\n\tinsertRange(in_offset: number, in_string: string) {\n\t\tthis._buffer = `${this._buffer.substr(0, in_offset)}${in_string}${this._buffer.substr(\n\t\t\tin_offset,\n\t\t)}`;\n\t\tthis.size = this.size + in_string.length;\n\t}\n\n\t/**\n\t * remove a range of elements from the string\n\t * @param in_offset - start of the range\n\t * @param in_deleteCount - number of elements to be removed\n\t */\n\tremoveRange(in_offset: number, in_deleteCount: number) {\n\t\tif (in_offset + in_deleteCount < (this._buffer.length as number) + 1) {\n\t\t\tthis._buffer = `${this._buffer.substr(0, in_offset)}${this._buffer.substr(\n\t\t\t\tin_offset + in_deleteCount,\n\t\t\t)}`;\n\t\t\tthis.size -= in_deleteCount;\n\t\t} else {\n\t\t\tthrow Error(\"DataArray removeRange in_offset + in_deleteCount is out of bounds.\");\n\t\t}\n\t}\n\n\t/**\n\t * Set this array values to be equal to in_string values.\n\t * @param in_offset - The offset in this array to begin start setting this arrays values to in_string values.\n\t * @param in_string - The input string.\n\t */\n\tset(in_offset: number, in_string: string) {\n\t\tthis._buffer = `${this._buffer.substr(0, in_offset)}${in_string}${this._buffer.substr(\n\t\t\tin_offset + in_string.length,\n\t\t)}`;\n\t}\n\n\t/**\n\t * Return a range of characters in the string.\n\t * @param in_idxStart - the starting index\n\t * @param in_idxEnd - the end index - this offset is exclusive\n\t * @returns the characters in the range\n\t */\n\tgetValueRange(in_idxStart: number, in_idxEnd: number): string {\n\t\tif (in_idxStart >= this.size || in_idxEnd > this.size || in_idxStart < 0 || in_idxEnd < 0) {\n\t\t\tthrow new Error(\"Trying to access out of bounds!\");\n\t\t}\n\t\treturn this._buffer.slice(in_idxStart, in_idxEnd);\n\t}\n\n\tget length() {\n\t\treturn this._buffer.length;\n\t}\n}\n\n/**\n * A data container that can contain boolean type\n */\nclass BoolDataArray extends UniversalDataArray {\n\t/**\n\t * @param size - The initial size with which to allocate the array.\n\t */\n\tconstructor(size: number) {\n\t\tsuper(Array, size);\n\t}\n\n\t/**\n\t * helper function to write and cast to boolean array values into another array at a given offset\n\t * @param array - target array\n\t * @param values - the values we need to write\n\t * @param offset - starting index in target array\n\t */\n\tprivate arraySetBool(array, values, offset = 0) {\n\t\tlet index = 0;\n\t\tvalues.forEach(function (value) {\n\t\t\tarray[index + offset] = !!(value as boolean);\n\t\t\tindex++;\n\t\t});\n\t}\n\n\t/**\n\t * insert the content of an array into the DataArray\n\t * @param in_offset - the target index\n\t * @param in_array - the array to be inserted\n\t */\n\tinsertRange(in_offset: number, in_array: any[]) {\n\t\tconst toBeAdded: any[] = in_array.map((val) => !!(val as boolean));\n\t\tthis._buffer.splice.call(this._buffer, ...[in_offset, 0].concat(toBeAdded));\n\t\tthis.size = this.size + in_array.length;\n\t}\n\n\t/**\n\t * Set this array values to be equal to in_array values.\n\t * @param in_offset - An optional offset in this array to begin start setting this arrays values to in_array values.\n\t * @param in_array - The input array.\n\t */\n\tset(in_offset: number, in_array) {\n\t\tif (\n\t\t\tin_array instanceof ArrayBuffer ||\n\t\t\tin_array instanceof Array ||\n\t\t\tin_array instanceof this.getBufferCtor()\n\t\t) {\n\t\t\tthis.arraySetBool(this._buffer, in_array, in_offset);\n\t\t} else if (in_array instanceof BaseDataArray) {\n\t\t\tthis.arraySetBool(this._buffer, in_array.getBuffer(), in_offset);\n\t\t} else {\n\t\t\tconsole.error(\"DataArray set() must be called with Array, TypedArray or DataArray\");\n\t\t}\n\t}\n}\n\nexport {\n\tBaseDataArray,\n\tFloat32DataArray,\n\tFloat64DataArray,\n\tInt8DataArray,\n\tInt16DataArray,\n\tInt32DataArray,\n\tUint8DataArray,\n\tUint16DataArray,\n\tUint32DataArray,\n\tUniversalDataArray,\n\tStringDataArray,\n\tBoolDataArray,\n};\n"]}
1
+ {"version":3,"file":"dataArray.js","sourceRoot":"","sources":["../../src/datastructures/dataArray.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAAwD;AACxD,4DAA4D;AAE5D;;GAEG;AAEH;;;;GAIG;AACH,MAAM,aAAa;IAYlB,YAAY,CAAC,EAAE,CAAE;QAChB,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;YAC1B,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;YACd,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;SAC9C;aAAM;YACN,IAAI,CAAC,iBAAiB,GAAG,CAA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EAAE,EAAE,SAAS,CAAC,CAAC;SACjE;aAAM;YACN,OAAO,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;SACpF;IACF,CAAC;CACD;AAcA,sCAAa","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint accessor-pairs: [2, { \"getWithoutSet\": false }] */\n\n/**\n * The data arrays definition file.\n */\n\n/**\n * A typed data container that is persistable, high-performance, and can be used\n * as a backing store for collaborative property sets.\n * @internal\n */\nclass BaseDataArray {\n\tprotected _buffer: any;\n\tprivate readonly bufferConstructor;\n\tprotected size: number;\n\n\tconstructor(size: number);\n\n\t/**\n\t * @param bufferConstructor - This is the constructor to be used to setup the internal buffer of the DataArray.\n\t * @param size - The initial size with which to allocate the array.\n\t */\n\tconstructor(bufferConstructor: any, size: number);\n\tconstructor(a, b?) {\n\t\tif (typeof a === \"number\") {\n\t\t\tthis.size = a;\n\t\t\tthis.bufferConstructor = this.getBufferCtor();\n\t\t} else {\n\t\t\tthis.bufferConstructor = a;\n\t\t\tthis.size = b;\n\t\t}\n\t\t// The 'eslint-...' is used to disable the rule that requires\n\t\t// constructors to start with a capitalized letter.\n\t\tthis._buffer = new this.bufferConstructor(this.size);\n\t}\n\n\t/**\n\t * Get the value at an index. If no index is passed, return zeroth item.\n\t * @param in_idx - The specific item in the data array.\n\t * @returns The value at that index.\n\t */\n\tgetValue(in_idx = 0): any {\n\t\tif (in_idx >= this.size || in_idx < 0) {\n\t\t\tthrow new Error(\"Trying to access out of bounds!\");\n\t\t}\n\n\t\treturn this._buffer[in_idx];\n\t}\n\n\t/**\n\t * Return a range of values in the array.\n\t * @param in_idxStart - the starting index\n\t * @param in_idxEnd - the end index\n\t * @returns the array of values in the range\n\t */\n\tgetValueRange(in_idxStart: number, in_idxEnd: number) {\n\t\tif (in_idxStart >= this.size || in_idxEnd > this.size || in_idxStart < 0 || in_idxEnd < 0) {\n\t\t\tthrow new Error(\"Trying to access out of bounds!\");\n\t\t}\n\n\t\treturn this._buffer.subarray(in_idxStart, in_idxEnd);\n\t}\n\n\t/**\n\t * Return the serialized form of Data Arrays.\n\t * @returns An object containing an array of the values.\n\t */\n\tserialize(): number[] {\n\t\treturn Array.from(this._buffer.subarray(0, this.size));\n\t}\n\n\t/**\n\t * Deserialize data from a serialized representation\n\t * @param in_serialized - the serialized representation\n\t */\n\tdeserialize(in_serialized) {\n\t\tconst values = in_serialized;\n\t\tconst length = in_serialized.length;\n\t\tif (length !== this.size) {\n\t\t\tthis.resize(length);\n\t\t\tthis.size = length;\n\t\t}\n\t\tlet i;\n\t\tfor (i = 0; i < length; i++) {\n\t\t\tthis._buffer[i] = values[i];\n\t\t}\n\t}\n\n\t/**\n\t * Set value at an index.\n\t * @param in_idx - the index\n\t * @param in_value - the value we want to set at index\n\t */\n\tsetValue(in_idx: number, in_value) {\n\t\tif (in_idx < this._buffer.length) {\n\t\t\tthis._buffer[in_idx] = in_value;\n\t\t} else {\n\t\t\tconsole.error(\"DataArray setValue in_idx is out of bounds.\");\n\t\t}\n\t}\n\n\t/**\n\t * creates a copy of a typed array with removed elements\n\t * @param in_arr - the input array (won't be modified)\n\t * @param in_offset - starting index of range that will be removed\n\t * @param in_deleteCount - number of removed elements\n\t * @returns a copy of the input array without the selected range\n\t */\n\tprivate _removeElementsFromArray(in_arr, in_offset: number, in_deleteCount: number) {\n\t\t// TODO: this function can be optimized\n\t\tconst newSize = this.size - in_deleteCount;\n\t\tconst splicedArray = new in_arr.constructor(newSize);\n\t\tsplicedArray.set(in_arr.subarray(0, in_offset));\n\t\tsplicedArray.set(in_arr.subarray(in_offset + in_deleteCount, this.size), in_offset);\n\t\treturn splicedArray;\n\t}\n\n\t/**\n\t * remove a range of elements from the array\n\t * @param in_offset - start of the range\n\t * @param in_deleteCount - number of elements to be removed\n\t */\n\tremoveRange(in_offset: number, in_deleteCount: number) {\n\t\tif (in_offset + in_deleteCount < (this._buffer.length as number) + 1) {\n\t\t\tthis._buffer = this._removeElementsFromArray(this._buffer, in_offset, in_deleteCount);\n\t\t\tthis.size = this.size - in_deleteCount;\n\t\t} else {\n\t\t\tconsole.error(\"DataArray removeRange in_offset + in_deleteCount is out of bounds.\");\n\t\t}\n\t}\n\n\t/**\n\t * copy an array with elements inserted into the copy\n\t * @param in_arr - the input array (won't be modified)\n\t * @param in_offset - the index where the new elements will be inserted\n\t * @param in_addedArray - the array with the elements that will be added\n\t * @returns the combined array\n\t */\n\tprivate _insert(in_arr, in_offset: number, in_addedArray) {\n\t\t// TODO: this function can be optimized\n\t\tconst newSize = this.size + (in_addedArray.length as number);\n\t\tconst insertedArray = new in_arr.constructor(newSize);\n\t\tinsertedArray.set(in_arr.subarray(0, in_offset));\n\t\tinsertedArray.set(in_addedArray, in_offset);\n\t\tinsertedArray.set(\n\t\t\tin_arr.subarray(in_offset, this.size),\n\t\t\tin_offset + (in_addedArray.length as number),\n\t\t);\n\t\treturn insertedArray;\n\t}\n\n\t/**\n\t * insert the content of an array into the DataArray\n\t * @param in_offset - the target index\n\t * @param in_array - the array to be inserted\n\t */\n\tinsertRange(in_offset: number, in_array) {\n\t\tthis._buffer = this._insert(this._buffer, in_offset, in_array);\n\t\tthis.size = this.size + (in_array.length as number);\n\t}\n\n\t/**\n\t * Set this array values to be equal to in_array values.\n\t * @param in_offset - An optional offset in this array to begin start setting this arrays values to in_array values.\n\t * @param in_array - The input array.\n\t */\n\tset(in_offset: number, in_array) {\n\t\tif (\n\t\t\tin_array instanceof ArrayBuffer ||\n\t\t\tin_array instanceof Array ||\n\t\t\tin_array instanceof this.getBufferCtor()\n\t\t) {\n\t\t\tthis._buffer.set(in_array, in_offset);\n\t\t} else if (in_array instanceof BaseDataArray) {\n\t\t\tthis._buffer.set(in_array.getBuffer(), in_offset);\n\t\t} else {\n\t\t\tconsole.error(\"DataArray set() must be called with Array, TypedArray or DataArray\");\n\t\t}\n\t}\n\n\t/**\n\t * Insert a value at the end of the array, creates a new element at the end and sets the value.\n\t * @param in_value - The new value.\n\t */\n\tpush(in_value) {\n\t\t// Adjust the buffer if necessary\n\t\tconst bufferLength = this._buffer.length;\n\t\tif (this.size > bufferLength - 1) {\n\t\t\tthis._alloc(this.size * 2 || 1); // grow by a factor of 2x\n\t\t}\n\t\t// set the value and update size\n\t\tthis.setValue(this.size, in_value);\n\t\tthis.size++;\n\t}\n\n\t/**\n\t * Get direct access to the data (for performance reasons) this should be uses read only.\n\t * @returns The (read only) raw data.\n\t */\n\tgetBuffer() {\n\t\treturn this._buffer;\n\t}\n\n\t/**\n\t * Get the constructor of the underlying `TypedArray`.\n\t * @returns The constructor for the data buffer.\n\t */\n\tgetBufferCtor() {\n\t\treturn this.bufferConstructor;\n\t}\n\n\t/**\n\t * Apply a given function to all elements of the array.\n\t * @param in_fn - The function that will be applied to every element.\n\t */\n\titerate(in_fn) {\n\t\tconst l = this.size;\n\t\tfor (let i = 0; i < l; i++) {\n\t\t\tin_fn(this._buffer[i]);\n\t\t}\n\t}\n\n\t/**\n\t * Tet a resized buffer copy.\n\t * @param in_bufferCtor - The constructor for the returned buffer.\n\t * @param in_buffer - The input buffer (won't be modified).\n\t * @param in_newSize - The target size.\n\t * @returns The buffer with the new size.\n\t */\n\tprivate resizeBuffer(in_bufferCtor, in_buffer, in_newSize: number) {\n\t\t// target buffer with the desired new size\n\t\t// The 'eslint-...' is used to disable the rule that requires\n\t\t// constructors to start with a capitalized letter.\n\t\tconst newBuffer = new in_bufferCtor(in_newSize);\n\t\tconst oldSize = in_buffer.length;\n\t\tconst oldBuffer = in_buffer;\n\t\tconst isShrinking = oldSize > in_newSize;\n\t\tnewBuffer.set(isShrinking ? oldBuffer.subarray(0, in_newSize) : oldBuffer);\n\t\treturn newBuffer;\n\t}\n\n\t/**\n\t * Allocate memory for the array (for performance reasons, you can allocate more space than the current length,\n\t * which makes pushes to the array less expensive later).\n\t * @param size - The target allocated space.\n\t * @returns The DataArray itself.\n\t */\n\tprotected _alloc(size: number): any {\n\t\tthis._buffer = this.resizeBuffer(this.bufferConstructor, this._buffer, size);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Change the size of the array\n\t * @param size - The target size\n\t * @returns The DataArray itself\n\t */\n\tresize(size: number) {\n\t\t// this can be costly!!!\n\t\tthis._alloc(size);\n\t\tthis.size = size;\n\t\treturn this;\n\t}\n\n\tcopy() {\n\t\t// and this!\n\t\tconst newBuffer = new this.bufferConstructor(this.size); // buffer with the desired new size\n\t\tnewBuffer.set(this._buffer);\n\t\treturn newBuffer;\n\t}\n\n\tget length() {\n\t\treturn this.size;\n\t}\n}\n\n/**\n * @internal\n */\nclass Int8DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Int8Array, size);\n\t}\n}\n\n/**\n * @internal\n */\nclass Int16DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Int16Array, size);\n\t}\n}\n\n/**\n * @internal\n */\nclass Int32DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Int32Array, size);\n\t}\n}\n\n/**\n * @internal\n */\nclass Uint8DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Uint8Array, size);\n\t}\n}\n\n/**\n * @internal\n */\nclass Uint16DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Uint16Array, size);\n\t}\n}\n\n/**\n * @internal\n */\nclass Uint32DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Uint32Array, size);\n\t}\n}\n\n/**\n * @internal\n */\nclass Float32DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Float32Array, size);\n\t}\n}\n\n/**\n * @internal\n */\nclass Float64DataArray extends BaseDataArray {\n\tconstructor(size: number) {\n\t\tsuper(Float64Array, size);\n\t}\n}\n\n/**\n * A data container that can contain every native type\n *\n * @param size - The initial size with which to allocate the array.\n * @internal\n */\nclass UniversalDataArray extends BaseDataArray {\n\tconstructor(bufferConstructor: any, size: number);\n\tconstructor(size: number);\n\tconstructor(a?, b?) {\n\t\tif (b === undefined) {\n\t\t\tsuper(Array, a);\n\t\t} else {\n\t\t\tsuper(a, b);\n\t\t}\n\t}\n\n\t/**\n\t * Helper function to write array values into another array at a given offset.\n\t *\n\t * @param array - The target array.\n\t * @param values - The values we need to write.\n\t * @param offset - The starting index in target array.\n\t */\n\tprivate arraySet(array, values, offset = 0) {\n\t\tlet index = 0;\n\t\tvalues.forEach(function (value) {\n\t\t\tarray[index + offset] = value;\n\t\t\tindex++;\n\t\t});\n\t}\n\n\t/**\n\t * Insert the content of an array into the DataArray.\n\t * @param in_offset - The target index.\n\t * @param in_array - The array to be inserted.\n\t */\n\tinsertRange(in_offset: number, in_array: any[]) {\n\t\tthis._buffer.splice.call(this._buffer, ...[in_offset, 0].concat(in_array));\n\t\tthis.size = this.size + in_array.length;\n\t}\n\n\t/**\n\t * Eemove a range of elements from the array.\n\t * @param in_offset - The start of the range.\n\t * @param in_deleteCount - The number of elements to be removed.\n\t */\n\tremoveRange(in_offset: number, in_deleteCount: number) {\n\t\tif (in_offset + in_deleteCount < (this._buffer.length as number) + 1) {\n\t\t\tthis._buffer.splice(in_offset, in_deleteCount);\n\t\t\tthis.size -= in_deleteCount;\n\t\t} else {\n\t\t\tthrow Error(\"DataArray removeRange in_offset + in_deleteCount is out of bounds.\");\n\t\t}\n\t}\n\n\t/**\n\t * Set this array values to be equal to in_array values.\n\t * @param in_offset - An optional offset in this array to begin start\n\t * setting this arrays values to in_array values.\n\t * @param in_array - The input array.\n\t */\n\tset(in_offset: number, in_array) {\n\t\tif (\n\t\t\tin_array instanceof ArrayBuffer ||\n\t\t\tin_array instanceof Array ||\n\t\t\tin_array instanceof this.getBufferCtor()\n\t\t) {\n\t\t\tthis.arraySet(this._buffer, in_array, in_offset);\n\t\t} else if (in_array instanceof BaseDataArray) {\n\t\t\tthis.arraySet(this._buffer, in_array.getBuffer(), in_offset);\n\t\t} else {\n\t\t\tconsole.error(\"DataArray set() must be called with Array, TypedArray or DataArray\");\n\t\t}\n\t}\n\n\t/**\n\t * Return a range of values in the array.\n\t * @param in_idxStart - the starting index\n\t * @param in_idxEnd - the end index - this offset is exclusive\n\t * @returns the array of values in the range\n\t */\n\tgetValueRange(in_idxStart: number, in_idxEnd: number) {\n\t\tif (in_idxStart >= this.size || in_idxEnd > this.size || in_idxStart < 0 || in_idxEnd < 0) {\n\t\t\tthrow new Error(\"Trying to access out of bounds!\");\n\t\t}\n\t\treturn this._buffer.slice(in_idxStart, in_idxEnd);\n\t}\n\n\t/**\n\t * change the size of a javascript array and keep the content, if possible. Keeps the input buffer.\n\t * @param in_buffer - input buffer - not changed\n\t * @param in_newSize - target size\n\t * @returns an Array of the new size\n\t */\n\tprivate resizeBufferArray(in_buffer, in_newSize) {\n\t\t// target buffer with the desired new size\n\t\tconst newBuffer = new Array(in_newSize);\n\t\tconst oldSize = in_buffer.length;\n\t\tconst oldBuffer = in_buffer;\n\t\tconst isShrinking = oldSize > in_newSize;\n\t\tthis.arraySet(newBuffer, isShrinking ? oldBuffer.slice(0, in_newSize) : oldBuffer);\n\t\treturn newBuffer;\n\t}\n\n\t/**\n\t * allocate memory for the array (for performance reasons, you can allocate more space than the current length,\n\t * which makes pushes to the array less expensive later)\n\t * @param size - the target allocated space\n\t * @returns the DataArray itself\n\t */\n\tprotected _alloc(size: number): any {\n\t\tthis._buffer = this.resizeBufferArray(this._buffer, size);\n\t\treturn this;\n\t}\n}\n\n/**\n * A data container that contains a string\n * @internal\n */\nclass StringDataArray extends BaseDataArray {\n\tconstructor() {\n\t\tsuper(String, 0);\n\t\tthis.size = 0;\n\t\tthis._buffer = \"\";\n\t}\n\t/**\n\t * insert the content of a string into the StringDataArray\n\t * @param in_offset - the target index\n\t * @param in_string - the string to be inserted\n\t */\n\tinsertRange(in_offset: number, in_string: string) {\n\t\tthis._buffer = `${this._buffer.substr(0, in_offset)}${in_string}${this._buffer.substr(\n\t\t\tin_offset,\n\t\t)}`;\n\t\tthis.size = this.size + in_string.length;\n\t}\n\n\t/**\n\t * remove a range of elements from the string\n\t * @param in_offset - start of the range\n\t * @param in_deleteCount - number of elements to be removed\n\t */\n\tremoveRange(in_offset: number, in_deleteCount: number) {\n\t\tif (in_offset + in_deleteCount < (this._buffer.length as number) + 1) {\n\t\t\tthis._buffer = `${this._buffer.substr(0, in_offset)}${this._buffer.substr(\n\t\t\t\tin_offset + in_deleteCount,\n\t\t\t)}`;\n\t\t\tthis.size -= in_deleteCount;\n\t\t} else {\n\t\t\tthrow Error(\"DataArray removeRange in_offset + in_deleteCount is out of bounds.\");\n\t\t}\n\t}\n\n\t/**\n\t * Set this array values to be equal to in_string values.\n\t * @param in_offset - The offset in this array to begin start setting this arrays values to in_string values.\n\t * @param in_string - The input string.\n\t */\n\tset(in_offset: number, in_string: string) {\n\t\tthis._buffer = `${this._buffer.substr(0, in_offset)}${in_string}${this._buffer.substr(\n\t\t\tin_offset + in_string.length,\n\t\t)}`;\n\t}\n\n\t/**\n\t * Return a range of characters in the string.\n\t * @param in_idxStart - the starting index\n\t * @param in_idxEnd - the end index - this offset is exclusive\n\t * @returns the characters in the range\n\t */\n\tgetValueRange(in_idxStart: number, in_idxEnd: number): string {\n\t\tif (in_idxStart >= this.size || in_idxEnd > this.size || in_idxStart < 0 || in_idxEnd < 0) {\n\t\t\tthrow new Error(\"Trying to access out of bounds!\");\n\t\t}\n\t\treturn this._buffer.slice(in_idxStart, in_idxEnd);\n\t}\n\n\tget length() {\n\t\treturn this._buffer.length;\n\t}\n}\n\n/**\n * A data container that can contain boolean type\n * @internal\n */\nclass BoolDataArray extends UniversalDataArray {\n\t/**\n\t * @param size - The initial size with which to allocate the array.\n\t */\n\tconstructor(size: number) {\n\t\tsuper(Array, size);\n\t}\n\n\t/**\n\t * helper function to write and cast to boolean array values into another array at a given offset\n\t * @param array - target array\n\t * @param values - the values we need to write\n\t * @param offset - starting index in target array\n\t */\n\tprivate arraySetBool(array, values, offset = 0) {\n\t\tlet index = 0;\n\t\tvalues.forEach(function (value) {\n\t\t\tarray[index + offset] = !!(value as boolean);\n\t\t\tindex++;\n\t\t});\n\t}\n\n\t/**\n\t * insert the content of an array into the DataArray\n\t * @param in_offset - the target index\n\t * @param in_array - the array to be inserted\n\t */\n\tinsertRange(in_offset: number, in_array: any[]) {\n\t\tconst toBeAdded: any[] = in_array.map((val) => !!(val as boolean));\n\t\tthis._buffer.splice.call(this._buffer, ...[in_offset, 0].concat(toBeAdded));\n\t\tthis.size = this.size + in_array.length;\n\t}\n\n\t/**\n\t * Set this array values to be equal to in_array values.\n\t * @param in_offset - An optional offset in this array to begin start setting this arrays values to in_array values.\n\t * @param in_array - The input array.\n\t */\n\tset(in_offset: number, in_array) {\n\t\tif (\n\t\t\tin_array instanceof ArrayBuffer ||\n\t\t\tin_array instanceof Array ||\n\t\t\tin_array instanceof this.getBufferCtor()\n\t\t) {\n\t\t\tthis.arraySetBool(this._buffer, in_array, in_offset);\n\t\t} else if (in_array instanceof BaseDataArray) {\n\t\t\tthis.arraySetBool(this._buffer, in_array.getBuffer(), in_offset);\n\t\t} else {\n\t\t\tconsole.error(\"DataArray set() must be called with Array, TypedArray or DataArray\");\n\t\t}\n\t}\n}\n\nexport {\n\tBaseDataArray,\n\tFloat32DataArray,\n\tFloat64DataArray,\n\tInt8DataArray,\n\tInt16DataArray,\n\tInt32DataArray,\n\tUint8DataArray,\n\tUint16DataArray,\n\tUint32DataArray,\n\tUniversalDataArray,\n\tStringDataArray,\n\tBoolDataArray,\n};\n"]}
@@ -12,6 +12,7 @@
12
12
  *
13
13
  * @param low - Lower 32 bit
14
14
  * @param high - Higher 32 bit
15
+ * @internal
15
16
  */
16
17
  export declare class Integer64 {
17
18
  protected low: number;
@@ -29,6 +30,7 @@ export declare class Integer64 {
29
30
  }
30
31
  /**
31
32
  * A data representation class for the signed 64 bit integer type
33
+ * @internal
32
34
  */
33
35
  export declare class Int64 extends Integer64 {
34
36
  static fromString: (in_string: string, radix?: number) => Int64;
@@ -37,6 +39,7 @@ export declare class Int64 extends Integer64 {
37
39
  }
38
40
  /**
39
41
  * A data representation class for the unsigned 64 bit integer type
42
+ * @internal
40
43
  */
41
44
  export declare class Uint64 extends Integer64 {
42
45
  static fromString(in_string: string, in_radix?: number): Uint64;
@@ -1 +1 @@
1
- {"version":3,"file":"integer64.d.ts","sourceRoot":"","sources":["../../src/datastructures/integer64.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH;;;;;;;;;;GAUG;AACH,qBAAa,SAAS;IAEpB,SAAS,CAAC,GAAG;IACb,SAAS,CAAC,IAAI;gBADJ,GAAG,SAAI,EACP,IAAI,SAAI;IAGnB;;OAEG;IACH,YAAY;IAIZ;;OAEG;IACH,WAAW;IAIX,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,SAAK,GAAG,MAAM;CAwBlE;AA0DD;;GAEG;AACH,qBAAa,KAAM,SAAQ,SAAS;IACnC,MAAM,CAAC,UAAU,cAAwB,MAAM,2BAG7C;IAEF,KAAK;IAIL,QAAQ,CAAC,KAAK,SAAK;CAGnB;AAED;;GAEG;AACH,qBAAa,MAAO,SAAQ,SAAS;IACpC,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,SAAK;IAKlD,KAAK;IAIL,QAAQ,CAAC,KAAK,KAAA;CAGd"}
1
+ {"version":3,"file":"integer64.d.ts","sourceRoot":"","sources":["../../src/datastructures/integer64.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH;;;;;;;;;;;GAWG;AACH,qBAAa,SAAS;IAEpB,SAAS,CAAC,GAAG;IACb,SAAS,CAAC,IAAI;gBADJ,GAAG,SAAI,EACP,IAAI,SAAI;IAGnB;;OAEG;IACH,YAAY;IAIZ;;OAEG;IACH,WAAW;IAIX,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,SAAK,GAAG,MAAM;CAwBlE;AA0DD;;;GAGG;AACH,qBAAa,KAAM,SAAQ,SAAS;IACnC,MAAM,CAAC,UAAU,cAAwB,MAAM,2BAG7C;IAEF,KAAK;IAIL,QAAQ,CAAC,KAAK,SAAK;CAGnB;AAED;;;GAGG;AACH,qBAAa,MAAO,SAAQ,SAAS;IACpC,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,SAAK;IAKlD,KAAK;IAIL,QAAQ,CAAC,KAAK,KAAA;CAGd"}
@@ -26,6 +26,7 @@ const { MSG } = constants_1.constants;
26
26
  *
27
27
  * @param low - Lower 32 bit
28
28
  * @param high - Higher 32 bit
29
+ * @internal
29
30
  */
30
31
  class Integer64 {
31
32
  constructor(low = 0, high = 0) {
@@ -117,6 +118,7 @@ function _stringToInt64(in_signed, in_string, in_radix = 10) {
117
118
  }
118
119
  /**
119
120
  * A data representation class for the signed 64 bit integer type
121
+ * @internal
120
122
  */
121
123
  class Int64 extends Integer64 {
122
124
  clone() {
@@ -133,6 +135,7 @@ Int64.fromString = function (in_string, radix = 10) {
133
135
  };
134
136
  /**
135
137
  * A data representation class for the unsigned 64 bit integer type
138
+ * @internal
136
139
  */
137
140
  class Uint64 extends Integer64 {
138
141
  static fromString(in_string, in_radix = 10) {
@@ -1 +1 @@
1
- {"version":3,"file":"integer64.js","sourceRoot":"","sources":["../../src/datastructures/integer64.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH;;GAEG;AAEH,oDAAuB;AACvB,kDAA+C;AAC/C,4CAAyC;AAEzC,MAAM,KAAK,GAAG,UAAU,CAAC;AACzB,MAAM,EAAE,GAAG,EAAE,GAAG,qBAAS,CAAC;AAE1B;;;;;;;;;;GAUG;AACH,MAAa,SAAS;IACrB,YACW,MAAM,CAAC,EACP,OAAO,CAAC;QADR,QAAG,GAAH,GAAG,CAAI;QACP,SAAI,GAAJ,IAAI,CAAI;IAChB,CAAC;IAEJ;;OAEG;IACH,YAAY;QACX,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IAED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;IAC9B,CAAC;IAED,KAAK;QACJ,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,QAAQ,CAAC,KAAK;QACb,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;CACD;AAbD,wBAaC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview implements (U)Int64 Datastructures\n */\n\nimport _ from \"lodash\";\nimport { ConsoleUtils } from \"../consoleUtils\";\nimport { constants } from \"../constants\";\n\nconst BIT32 = 4294967296;\nconst { MSG } = constants;\n\n/**\n * A data representation class for 64 bit integer types.\n *\n * @remarks This is necessary since js doesn't support 64bit integers natively yet.\n *\n * Please note this class is immutable.\n * There are and there won't be set functions! (see javascript String class)\n *\n * @param low - Lower 32 bit\n * @param high - Higher 32 bit\n */\nexport class Integer64 {\n\tconstructor(\n\t\tprotected low = 0,\n\t\tprotected high = 0,\n\t) {}\n\n\t/**\n\t * @returns The higher 32 bit integer part\n\t */\n\tgetValueHigh() {\n\t\treturn this.high;\n\t}\n\n\t/**\n\t * @returns The lower 32 bit integer part\n\t */\n\tgetValueLow() {\n\t\treturn this.low;\n\t}\n\n\tprotected _int64toString(isSigned: boolean, in_radix = 10): string {\n\t\tConsoleUtils.assert(_.isNumber(in_radix), `${MSG.IN_RADIX_MUST_BE_NUMBER} ${in_radix}`);\n\t\tConsoleUtils.assert(\n\t\t\tin_radix >= 2 && 36 >= in_radix,\n\t\t\t`${MSG.BASE_OUT_OF_RANGE} ${in_radix}`,\n\t\t);\n\n\t\tlet high = this.getValueHigh();\n\t\tlet low = this.getValueLow();\n\t\tlet result = \"\";\n\t\tconst sign = !!(isSigned && high & 0x80000000); // eslint-disable-line no-bitwise\n\t\tif (sign) {\n\t\t\thigh = ~high; // eslint-disable-line no-bitwise\n\t\t\tlow = BIT32 - low;\n\t\t}\n\t\tdo {\n\t\t\tconst mod = (high % in_radix) * BIT32 + low;\n\t\t\thigh = Math.floor(high / in_radix);\n\t\t\tlow = Math.floor(mod / in_radix);\n\t\t\tresult = (mod % in_radix).toString(in_radix) + result;\n\t\t} while (high || low);\n\n\t\treturn sign ? `-${result}` : result;\n\t}\n}\n\n/**\n * stringToInt function parses a string argument updates object's lower and higher 32 bit integer parts.\n *\n * @param in_signed - If the expect response should be signed or unsigned.\n * @param in_string - The value to parse. Leading whitespace in the string argument is ignored.\n * @param in_radix - An integer between 2 and 36 that represents the\n * radix (the base in mathematical numeral systems) of the above mentioned string.\n *\n * @throws If `in_string` is not a string.\n * @throws If `in_radix` is entered but is not a number between 2 and 36.\n * @throws If the property is a `Uint64` property and `in_string` is a negative number.\n * @throws If `in_string` contains characters other than numbers.\n *\n * @returns Low and high bits of `Int64`.\n */\nfunction _stringToInt64(in_signed: boolean, in_string: string, in_radix = 10): number[] {\n\tConsoleUtils.assert(_.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);\n\tconst string = in_string.trim();\n\n\tConsoleUtils.assert(_.isNumber(in_radix), `${MSG.IN_RADIX_BETWEEN_2_36} ${in_radix}`);\n\tConsoleUtils.assert(in_radix >= 2 && 36 >= in_radix, `${MSG.BASE_OUT_OF_RANGE} ${in_radix}`);\n\n\tlet position = 0;\n\tlet negative = false;\n\tlet high = 0;\n\tlet low = 0;\n\tif (string.startsWith(\"-\")) {\n\t\tnegative = true;\n\t\tposition += 1;\n\t}\n\n\tConsoleUtils.assert(!negative || in_signed, MSG.CANNOT_UPDATE_TO_NEGATIVE + string);\n\n\twhile (position < string.length) {\n\t\tconst digit = parseInt(string[position++], in_radix);\n\t\tif (isNaN(digit)) {\n\t\t\tthrow new TypeError(MSG.CANNOT_PARSE_INVALID_CHARACTERS + string);\n\t\t}\n\t\tlow = low * in_radix + digit;\n\t\thigh = high * in_radix + Math.floor(low / BIT32);\n\t\tlow %= BIT32;\n\t}\n\n\tif (negative) {\n\t\t// eslint-disable-next-line no-bitwise\n\t\thigh = ~high;\n\t\tif (low) {\n\t\t\tlow = BIT32 - low;\n\t\t} else {\n\t\t\thigh += 1;\n\t\t}\n\t}\n\n\treturn [low, high];\n}\n\n/**\n * A data representation class for the signed 64 bit integer type\n */\nexport class Int64 extends Integer64 {\n\tstatic fromString = function (in_string: string, radix = 10) {\n\t\tconst [low, high] = _stringToInt64(true, in_string, radix);\n\t\treturn new Int64(low, high);\n\t};\n\n\tclone() {\n\t\treturn new Int64(this.low, this.high);\n\t}\n\n\ttoString(radix = 10) {\n\t\treturn this._int64toString(true, radix);\n\t}\n}\n\n/**\n * A data representation class for the unsigned 64 bit integer type\n */\nexport class Uint64 extends Integer64 {\n\tstatic fromString(in_string: string, in_radix = 10) {\n\t\tconst [low, high] = _stringToInt64.call(this, false, in_string, in_radix);\n\t\treturn new Uint64(low, high);\n\t}\n\n\tclone() {\n\t\treturn new Uint64(this.low, this.high);\n\t}\n\n\ttoString(radix) {\n\t\treturn this._int64toString(false, radix);\n\t}\n}\n"]}
1
+ {"version":3,"file":"integer64.js","sourceRoot":"","sources":["../../src/datastructures/integer64.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH;;GAEG;AAEH,oDAAuB;AACvB,kDAA+C;AAC/C,4CAAyC;AAEzC,MAAM,KAAK,GAAG,UAAU,CAAC;AACzB,MAAM,EAAE,GAAG,EAAE,GAAG,qBAAS,CAAC;AAE1B;;;;;;;;;;;GAWG;AACH,MAAa,SAAS;IACrB,YACW,MAAM,CAAC,EACP,OAAO,CAAC;QADR,QAAG,GAAH,GAAG,CAAI;QACP,SAAI,GAAJ,IAAI,CAAI;IAChB,CAAC;IAEJ;;OAEG;IACH,YAAY;QACX,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IAED;;OAEG;IACH,WAAW;QACV,OAAO,IAAI,CAAC,GAAG,CAAC;IACjB,CAAC;IAES,cAAc,CAAC,QAAiB,EA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,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,QAAQ,CAAC,KAAK;QACb,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;CACD;AAbD,wBAaC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview implements (U)Int64 Datastructures\n */\n\nimport _ from \"lodash\";\nimport { ConsoleUtils } from \"../consoleUtils\";\nimport { constants } from \"../constants\";\n\nconst BIT32 = 4294967296;\nconst { MSG } = constants;\n\n/**\n * A data representation class for 64 bit integer types.\n *\n * @remarks This is necessary since js doesn't support 64bit integers natively yet.\n *\n * Please note this class is immutable.\n * There are and there won't be set functions! (see javascript String class)\n *\n * @param low - Lower 32 bit\n * @param high - Higher 32 bit\n * @internal\n */\nexport class Integer64 {\n\tconstructor(\n\t\tprotected low = 0,\n\t\tprotected high = 0,\n\t) {}\n\n\t/**\n\t * @returns The higher 32 bit integer part\n\t */\n\tgetValueHigh() {\n\t\treturn this.high;\n\t}\n\n\t/**\n\t * @returns The lower 32 bit integer part\n\t */\n\tgetValueLow() {\n\t\treturn this.low;\n\t}\n\n\tprotected _int64toString(isSigned: boolean, in_radix = 10): string {\n\t\tConsoleUtils.assert(_.isNumber(in_radix), `${MSG.IN_RADIX_MUST_BE_NUMBER} ${in_radix}`);\n\t\tConsoleUtils.assert(\n\t\t\tin_radix >= 2 && 36 >= in_radix,\n\t\t\t`${MSG.BASE_OUT_OF_RANGE} ${in_radix}`,\n\t\t);\n\n\t\tlet high = this.getValueHigh();\n\t\tlet low = this.getValueLow();\n\t\tlet result = \"\";\n\t\tconst sign = !!(isSigned && high & 0x80000000); // eslint-disable-line no-bitwise\n\t\tif (sign) {\n\t\t\thigh = ~high; // eslint-disable-line no-bitwise\n\t\t\tlow = BIT32 - low;\n\t\t}\n\t\tdo {\n\t\t\tconst mod = (high % in_radix) * BIT32 + low;\n\t\t\thigh = Math.floor(high / in_radix);\n\t\t\tlow = Math.floor(mod / in_radix);\n\t\t\tresult = (mod % in_radix).toString(in_radix) + result;\n\t\t} while (high || low);\n\n\t\treturn sign ? `-${result}` : result;\n\t}\n}\n\n/**\n * stringToInt function parses a string argument updates object's lower and higher 32 bit integer parts.\n *\n * @param in_signed - If the expect response should be signed or unsigned.\n * @param in_string - The value to parse. Leading whitespace in the string argument is ignored.\n * @param in_radix - An integer between 2 and 36 that represents the\n * radix (the base in mathematical numeral systems) of the above mentioned string.\n *\n * @throws If `in_string` is not a string.\n * @throws If `in_radix` is entered but is not a number between 2 and 36.\n * @throws If the property is a `Uint64` property and `in_string` is a negative number.\n * @throws If `in_string` contains characters other than numbers.\n *\n * @returns Low and high bits of `Int64`.\n */\nfunction _stringToInt64(in_signed: boolean, in_string: string, in_radix = 10): number[] {\n\tConsoleUtils.assert(_.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);\n\tconst string = in_string.trim();\n\n\tConsoleUtils.assert(_.isNumber(in_radix), `${MSG.IN_RADIX_BETWEEN_2_36} ${in_radix}`);\n\tConsoleUtils.assert(in_radix >= 2 && 36 >= in_radix, `${MSG.BASE_OUT_OF_RANGE} ${in_radix}`);\n\n\tlet position = 0;\n\tlet negative = false;\n\tlet high = 0;\n\tlet low = 0;\n\tif (string.startsWith(\"-\")) {\n\t\tnegative = true;\n\t\tposition += 1;\n\t}\n\n\tConsoleUtils.assert(!negative || in_signed, MSG.CANNOT_UPDATE_TO_NEGATIVE + string);\n\n\twhile (position < string.length) {\n\t\tconst digit = parseInt(string[position++], in_radix);\n\t\tif (isNaN(digit)) {\n\t\t\tthrow new TypeError(MSG.CANNOT_PARSE_INVALID_CHARACTERS + string);\n\t\t}\n\t\tlow = low * in_radix + digit;\n\t\thigh = high * in_radix + Math.floor(low / BIT32);\n\t\tlow %= BIT32;\n\t}\n\n\tif (negative) {\n\t\t// eslint-disable-next-line no-bitwise\n\t\thigh = ~high;\n\t\tif (low) {\n\t\t\tlow = BIT32 - low;\n\t\t} else {\n\t\t\thigh += 1;\n\t\t}\n\t}\n\n\treturn [low, high];\n}\n\n/**\n * A data representation class for the signed 64 bit integer type\n * @internal\n */\nexport class Int64 extends Integer64 {\n\tstatic fromString = function (in_string: string, radix = 10) {\n\t\tconst [low, high] = _stringToInt64(true, in_string, radix);\n\t\treturn new Int64(low, high);\n\t};\n\n\tclone() {\n\t\treturn new Int64(this.low, this.high);\n\t}\n\n\ttoString(radix = 10) {\n\t\treturn this._int64toString(true, radix);\n\t}\n}\n\n/**\n * A data representation class for the unsigned 64 bit integer type\n * @internal\n */\nexport class Uint64 extends Integer64 {\n\tstatic fromString(in_string: string, in_radix = 10) {\n\t\tconst [low, high] = _stringToInt64.call(this, false, in_string, in_radix);\n\t\treturn new Uint64(low, high);\n\t}\n\n\tclone() {\n\t\treturn new Uint64(this.low, this.high);\n\t}\n\n\ttoString(radix) {\n\t\treturn this._int64toString(false, radix);\n\t}\n}\n"]}
@@ -3,6 +3,9 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { Collection } from "./collection";
6
+ /**
7
+ * @internal
8
+ */
6
9
  export declare class SortedCollection<T> extends Collection<T> {
7
10
  private _sortedKeys;
8
11
  private _comparisonFunction?;
@@ -1 +1 @@
1
- {"version":3,"file":"sortedCollection.d.ts","sourceRoot":"","sources":["../../src/datastructures/sortedCollection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,qBAAa,gBAAgB,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IACrD,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,mBAAmB,CAAC,CAA+C;IAE3E;;;;;;OAMG;gBACS,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,KAAA;IAItC;;;;;;;;;;;OAWG;IACH,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,MA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AAE,MAAM;IAUjC;;;;;;OAMG;IACH,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAS9C"}
@@ -14,6 +14,9 @@ exports.SortedCollection = void 0;
14
14
  */
15
15
  const lodash_1 = __importDefault(require("lodash"));
16
16
  const collection_1 = require("./collection");
17
+ /**
18
+ * @internal
19
+ */
17
20
  class SortedCollection extends collection_1.Collection {
18
21
  /**
19
22
  * A sorted collection class.
@@ -1 +1 @@
1
- {"version":3,"file":"sortedCollection.js","sourceRoot":"","sources":["../../src/datastructures/sortedCollection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH;;;GAGG;AAEH,oDAAuB;AACvB,6CAA0C;AAE1C,MAAa,gBAAoB,SAAQ,uBAAa;IAIrD;;;;;;OAMG;IACH,YAAY,OAAgB,EAAE,OAAQ;QACrC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAXjB,gBAAW,GAAa,EAAE,CAAC;QAC3B,wBAAmB,GAAsC,SAAS,CAAC;IAW3E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,qBAAqB,CAAC,KAAwC;QAC7D,OAAO,CAAC,MAAM,CAAC,gBAAC,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,yBAAyB,CAAC,CAAC;QAC/D,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,MAAuB,EAAE,QAAW;QACvC,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAE7C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAEhD,OAAO,QAAQ,CAAC;IACjB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAc;QACpB,MAA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AG,CAAC,EAAE;gBAChE,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;oBAC1B,OAAO,CAAC,CAAC;iBACT;gBAED,OAAO,CACN,WAAW;oBACX,CAAC;oBACD,IAAI,CAAC,yBAAyB,CAC7B,QAAQ,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,EAChD,MAAM,CACN,CACD,CAAC;aACF;YAED,OAAO,WAAW,CAAC;SACnB;IACF,CAAC;IAED;;;;;;OAMG;IACH,kBAAkB,CAAC,MAAc;QAChC,MAAM,gBAAgB,GAAG,IAAI,CAAC,yBAAyB,CACtD,IAAI,CAAC,WAAW,EAChB,MAAM,CAAC,QAAQ,EAAE,CACjB,CAAC;QACF,OAAO,gBAAgB,KAAK,IAAI,CAAC,QAAQ,EAAE;YAC1C,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAClD,CAAC;IAED;;;;;;OAMG;IACH,sBAAsB,CAAC,MAAuB;QAC7C,MAAM,oBAAoB,GAAG,IAAI,CAAC,yBAAyB,CAC1D,IAAI,CAAC,WAAW,EAChB,MAAM,CAAC,QAAQ,EAAE,CACjB,CAAC;QACF,OAAO,oBAAoB,KAAK,CAAC;YAChC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,oBAAoB,GAAG,CAAC,CAAC,CAAC,CAAC;IAC1D,CAAC;CACD;AA5JD,4CA4JC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Declaration of the SortedCollection class\n */\n\nimport _ from \"lodash\";\nimport { Collection } from \"./collection\";\n\nexport class SortedCollection<T> extends Collection<T> {\n\tprivate _sortedKeys: string[] = [];\n\tprivate _comparisonFunction?: (x: string, y: string) => number = undefined;\n\n\t/**\n\t * A sorted collection class.\n\t * @param in_name - a friendly name to describe this collection. If undefined\n\t * the collection will have a default \"Untitled Collection\" assigned to its name.\n\t * @param in_type - optional parameter pointing to the constructor\n\t * of a type this Collection will host.\n\t */\n\tconstructor(in_name?: string, in_type?) {\n\t\tsuper(in_name, in_type);\n\t}\n\n\t/**\n\t * Set the comparison function. By default the keys will be sorted wrt their ASCII code.\n\t *\n\t * @param in_fn - The function to compare two entries.\n\t * The return value of this function must convey to the following cases:\n\t *\n\t * - if a \\> b, then the return value must be greater than 0.\n\t *\n\t * - if a \\< b, then the return value must be less than 0.\n\t *\n\t * - if a == b, then the return value must be 0.\n\t */\n\tsetComparisonFunction(in_fn?: (x: string, y: string) => number) {\n\t\tconsole.assert(_.isFunction(in_fn), \"Must provide a function\");\n\t\tthis._comparisonFunction = in_fn;\n\t}\n\n\t/**\n\t * Add an item to the collection. Sort the list of keys in an ascending order.\n\t *\n\t * @param in_key - Key to store the value under.\n\t * @param in_value - Value to store in the collection.\n\t *\n\t * @returns The value passed in.\n\t */\n\tadd(in_key: string | number, in_value: T) {\n\t\tconst toReturn = super.add(in_key, in_value);\n\n\t\tthis._sortedKeys.push(in_key.toString());\n\t\tthis._sortedKeys.sort(this._comparisonFunction);\n\n\t\treturn toReturn;\n\t}\n\n\t/**\n\t * Remove an item from this Collection. This method returns a Boolean indicating\n\t * the success or failure of the removal. This is practical because if we were\n\t * to throw an error when the key doesn't exist, it would require additional\n\t * checks by the caller to make sure this key exists prior to removal. Which\n\t * would make the attempt of removal more verbose and also costly because the\n\t * caller would have to keep a list – somewhere else – of the things he can\n\t * and cannot remove.\n\t *\n\t * @param in_key - the key we wish to remove\n\t * @returns true if the key exists and was removed, false otherwise.\n\t */\n\tremove(in_key: string) {\n\t\tconst toReturn = super.remove(in_key);\n\t\tthis._sortedKeys = _.without(this._sortedKeys, in_key);\n\t\treturn toReturn;\n\t}\n\n\t/**\n\t * Copy the items of in_collection to this collection.\n\t * @returns cloned SortedCollection\n\t */\n\tclone(): SortedCollection<T> {\n\t\tconst newCol = new SortedCollection<T>(this._name, this._type);\n\t\tnewCol.setComparisonFunction(this._comparisonFunction);\n\t\tnewCol.bulkAdd(this._items);\n\t\treturn newCol;\n\t}\n\n\t/**\n\t * Internal function use to search (binary search) for the nearest index that\n\t * the given key would be inserted.\n\t * i.e. given the array [10, 20, 30, 40, 50] the index that 35 should be inserted at is 3\n\t * @param in_array - Target array\n\t * @param in_key - Key to check against\n\t * @returns The index at which the key would be inserted in\n\t */\n\tprivate _binarySearchNearestIndex(in_array: string[], in_key: string): number {\n\t\tif (this._comparisonFunction === undefined) {\n\t\t\treturn _.sortedIndex(in_array, in_key);\n\t\t} else {\n\t\t\tconst middleIndex = Math.floor((in_array.length - 1) / 2);\n\n\t\t\tif (middleIndex < 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (this._comparisonFunction(in_array[middleIndex], in_key) > 0) {\n\t\t\t\tif (in_array.length === 1) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn this._binarySearchNearestIndex(in_array.slice(0, middleIndex), in_key);\n\t\t\t}\n\n\t\t\tif (this._comparisonFunction(in_array[middleIndex], in_key) < 0) {\n\t\t\t\tif (in_array.length === 1) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tmiddleIndex +\n\t\t\t\t\t1 +\n\t\t\t\t\tthis._binarySearchNearestIndex(\n\t\t\t\t\t\tin_array.slice(middleIndex + 1, in_array.length),\n\t\t\t\t\t\tin_key,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn middleIndex;\n\t\t}\n\t}\n\n\t/**\n\t * Return the nearest next item to the given key i.e.\n\t * For the given list of keys ['1.0.1', '2.0.0', '2.2.0', '7.0.1'] the nearest next item to 6.0.1 is\n\t * the item mapped by '7.0.1'\n\t * @param in_key - The key to check against in order to get the nearest next item\n\t * @returns The nearest next item\n\t */\n\tgetNearestNextItem(in_key: string) {\n\t\tconst closestNextIndex = this._binarySearchNearestIndex(\n\t\t\tthis._sortedKeys,\n\t\t\tin_key.toString(),\n\t\t);\n\t\treturn closestNextIndex === this.getCount()\n\t\t\t? undefined\n\t\t\t: this.item(this._sortedKeys[closestNextIndex]);\n\t}\n\n\t/**\n\t * Return the nearest previous item to the given key i.e.\n\t * For the given list of keys ['1.0.1', '2.0.0', '2.2.0', '7.0.1'] the nearest previous item to 6.0.1 is\n\t * the item mapped by '7.0.1'\n\t * @param in_key - The key to check against in order to get the nearest previous item\n\t * @returns The nearest previous item\n\t */\n\tgetNearestPreviousItem(in_key: string | number) {\n\t\tconst closestPreviousIndex = this._binarySearchNearestIndex(\n\t\t\tthis._sortedKeys,\n\t\t\tin_key.toString(),\n\t\t);\n\t\treturn closestPreviousIndex === 0\n\t\t\t? undefined\n\t\t\t: this.item(this._sortedKeys[closestPreviousIndex - 1]);\n\t}\n}\n"]}
1
+ {"version":3,"file":"sortedCollection.js","sourceRoot":"","sources":["../../src/datastructures/sortedCollection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH;;;GAGG;AAEH,oDAAuB;AACvB,6CAA0C;AAE1C;;GAEG;AACH,MAAa,gBAAoB,SAAQ,uBAAa;IAIrD;;;;;;OAMG;IACH,YAAY,OAAgB,EAAE,OAAQ;QACrC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAXjB,gBAAW,GAAa,EAAE,CAAC;QAC3B,wBAAmB,GAAsC,SAAS,CAAC;IAW3E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,qBAAqB,CAAC,KAAwC;QAC7D,OAAO,CAAC,MAAM,CAAC,gBAAC,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,yBAAyB,CAAC,CAAC;QAC/D,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,MAAuB,EAAE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AAI,CAAC,IAAI,CAAC,WAAW,CAAC,oBAAoB,GAAG,CAAC,CAAC,CAAC,CAAC;IAC1D,CAAC;CACD;AA5JD,4CA4JC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Declaration of the SortedCollection class\n */\n\nimport _ from \"lodash\";\nimport { Collection } from \"./collection\";\n\n/**\n * @internal\n */\nexport class SortedCollection<T> extends Collection<T> {\n\tprivate _sortedKeys: string[] = [];\n\tprivate _comparisonFunction?: (x: string, y: string) => number = undefined;\n\n\t/**\n\t * A sorted collection class.\n\t * @param in_name - a friendly name to describe this collection. If undefined\n\t * the collection will have a default \"Untitled Collection\" assigned to its name.\n\t * @param in_type - optional parameter pointing to the constructor\n\t * of a type this Collection will host.\n\t */\n\tconstructor(in_name?: string, in_type?) {\n\t\tsuper(in_name, in_type);\n\t}\n\n\t/**\n\t * Set the comparison function. By default the keys will be sorted wrt their ASCII code.\n\t *\n\t * @param in_fn - The function to compare two entries.\n\t * The return value of this function must convey to the following cases:\n\t *\n\t * - if a \\> b, then the return value must be greater than 0.\n\t *\n\t * - if a \\< b, then the return value must be less than 0.\n\t *\n\t * - if a == b, then the return value must be 0.\n\t */\n\tsetComparisonFunction(in_fn?: (x: string, y: string) => number) {\n\t\tconsole.assert(_.isFunction(in_fn), \"Must provide a function\");\n\t\tthis._comparisonFunction = in_fn;\n\t}\n\n\t/**\n\t * Add an item to the collection. Sort the list of keys in an ascending order.\n\t *\n\t * @param in_key - Key to store the value under.\n\t * @param in_value - Value to store in the collection.\n\t *\n\t * @returns The value passed in.\n\t */\n\tadd(in_key: string | number, in_value: T) {\n\t\tconst toReturn = super.add(in_key, in_value);\n\n\t\tthis._sortedKeys.push(in_key.toString());\n\t\tthis._sortedKeys.sort(this._comparisonFunction);\n\n\t\treturn toReturn;\n\t}\n\n\t/**\n\t * Remove an item from this Collection. This method returns a Boolean indicating\n\t * the success or failure of the removal. This is practical because if we were\n\t * to throw an error when the key doesn't exist, it would require additional\n\t * checks by the caller to make sure this key exists prior to removal. Which\n\t * would make the attempt of removal more verbose and also costly because the\n\t * caller would have to keep a list – somewhere else – of the things he can\n\t * and cannot remove.\n\t *\n\t * @param in_key - the key we wish to remove\n\t * @returns true if the key exists and was removed, false otherwise.\n\t */\n\tremove(in_key: string) {\n\t\tconst toReturn = super.remove(in_key);\n\t\tthis._sortedKeys = _.without(this._sortedKeys, in_key);\n\t\treturn toReturn;\n\t}\n\n\t/**\n\t * Copy the items of in_collection to this collection.\n\t * @returns cloned SortedCollection\n\t */\n\tclone(): SortedCollection<T> {\n\t\tconst newCol = new SortedCollection<T>(this._name, this._type);\n\t\tnewCol.setComparisonFunction(this._comparisonFunction);\n\t\tnewCol.bulkAdd(this._items);\n\t\treturn newCol;\n\t}\n\n\t/**\n\t * Internal function use to search (binary search) for the nearest index that\n\t * the given key would be inserted.\n\t * i.e. given the array [10, 20, 30, 40, 50] the index that 35 should be inserted at is 3\n\t * @param in_array - Target array\n\t * @param in_key - Key to check against\n\t * @returns The index at which the key would be inserted in\n\t */\n\tprivate _binarySearchNearestIndex(in_array: string[], in_key: string): number {\n\t\tif (this._comparisonFunction === undefined) {\n\t\t\treturn _.sortedIndex(in_array, in_key);\n\t\t} else {\n\t\t\tconst middleIndex = Math.floor((in_array.length - 1) / 2);\n\n\t\t\tif (middleIndex < 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (this._comparisonFunction(in_array[middleIndex], in_key) > 0) {\n\t\t\t\tif (in_array.length === 1) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn this._binarySearchNearestIndex(in_array.slice(0, middleIndex), in_key);\n\t\t\t}\n\n\t\t\tif (this._comparisonFunction(in_array[middleIndex], in_key) < 0) {\n\t\t\t\tif (in_array.length === 1) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tmiddleIndex +\n\t\t\t\t\t1 +\n\t\t\t\t\tthis._binarySearchNearestIndex(\n\t\t\t\t\t\tin_array.slice(middleIndex + 1, in_array.length),\n\t\t\t\t\t\tin_key,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn middleIndex;\n\t\t}\n\t}\n\n\t/**\n\t * Return the nearest next item to the given key i.e.\n\t * For the given list of keys ['1.0.1', '2.0.0', '2.2.0', '7.0.1'] the nearest next item to 6.0.1 is\n\t * the item mapped by '7.0.1'\n\t * @param in_key - The key to check against in order to get the nearest next item\n\t * @returns The nearest next item\n\t */\n\tgetNearestNextItem(in_key: string) {\n\t\tconst closestNextIndex = this._binarySearchNearestIndex(\n\t\t\tthis._sortedKeys,\n\t\t\tin_key.toString(),\n\t\t);\n\t\treturn closestNextIndex === this.getCount()\n\t\t\t? undefined\n\t\t\t: this.item(this._sortedKeys[closestNextIndex]);\n\t}\n\n\t/**\n\t * Return the nearest previous item to the given key i.e.\n\t * For the given list of keys ['1.0.1', '2.0.0', '2.2.0', '7.0.1'] the nearest previous item to 6.0.1 is\n\t * the item mapped by '7.0.1'\n\t * @param in_key - The key to check against in order to get the nearest previous item\n\t * @returns The nearest previous item\n\t */\n\tgetNearestPreviousItem(in_key: string | number) {\n\t\tconst closestPreviousIndex = this._binarySearchNearestIndex(\n\t\t\tthis._sortedKeys,\n\t\t\tin_key.toString(),\n\t\t);\n\t\treturn closestPreviousIndex === 0\n\t\t\t? undefined\n\t\t\t: this.item(this._sortedKeys[closestPreviousIndex - 1]);\n\t}\n}\n"]}
@@ -7,6 +7,7 @@
7
7
  * through the constructor's executor).
8
8
  * For example, a deferred promise could be fulfilled after waiting for many asynchronous
9
9
  * tasks to terminate. This class becomes useful when combining classic async calls with promises.
10
+ * @internal
10
11
  */
11
12
  export declare class DeferredPromise<T> implements Promise<T> {
12
13
  private _resolveSelf;
@@ -1 +1 @@
1
- {"version":3,"file":"deferredPromise.d.ts","sourceRoot":"","sources":["../src/deferredPromise.ts"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