@itwin/core-orbitgt 5.5.0-dev.2 → 5.5.0-dev.5
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.
- package/CHANGELOG.md +6 -1
- package/lib/cjs/core-orbitgt.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/AttributeMask.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/AttributeReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/BlockRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/ContainerFile.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/ContainerFilePart.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/DirectoryReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/DirectoryRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/EmbeddedAttributeReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileAccess.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/GeometryReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/GeometryRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/OPCReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/PointReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/TileReadBuffer.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/TileRecord.js.map +1 -1
- package/lib/cjs/pointcloud/model/AttributeTypes.js.map +1 -1
- package/lib/cjs/pointcloud/model/AttributeValue.js.map +1 -1
- package/lib/cjs/pointcloud/model/BlockIndex.js.map +1 -1
- package/lib/cjs/pointcloud/model/CloudPoint.js.map +1 -1
- package/lib/cjs/pointcloud/model/Grid.js.map +1 -1
- package/lib/cjs/pointcloud/model/GridIndex.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointAttribute.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointCloudReader.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointData.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointDataRaw.js.map +1 -1
- package/lib/cjs/pointcloud/model/ReadRequest.js.map +1 -1
- package/lib/cjs/pointcloud/model/StandardAttributes.js.map +1 -1
- package/lib/cjs/pointcloud/model/TileIndex.js.map +1 -1
- package/lib/cjs/pointcloud/render/AViewRequest.js.map +1 -1
- package/lib/cjs/pointcloud/render/Block.js.map +1 -1
- package/lib/cjs/pointcloud/render/DataManager.js.map +1 -1
- package/lib/cjs/pointcloud/render/FrameData.js.map +1 -1
- package/lib/cjs/pointcloud/render/Level.js.map +1 -1
- package/lib/cjs/pointcloud/render/TileLoadSorter.js.map +1 -1
- package/lib/cjs/pointcloud/render/ViewTree.js.map +1 -1
- package/lib/cjs/spatial/crs/CRSEngine.js.map +1 -1
- package/lib/cjs/spatial/crs/CRSManager.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Axis.js.map +1 -1
- package/lib/cjs/spatial/ecrs/CRS.js.map +1 -1
- package/lib/cjs/spatial/ecrs/CoordinateSystem.js.map +1 -1
- package/lib/cjs/spatial/ecrs/DataFileUnit.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Datum.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Ellipsoid.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OnlineEngine.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OnlineRegistry.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Operation.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OperationMethod.js.map +1 -1
- package/lib/cjs/spatial/ecrs/ParameterValue.js.map +1 -1
- package/lib/cjs/spatial/ecrs/ParameterValueList.js.map +1 -1
- package/lib/cjs/spatial/ecrs/PrimeMeridian.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Registry.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Transform.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Unit.js.map +1 -1
- package/lib/cjs/spatial/ecrs/VerticalModel.js.map +1 -1
- package/lib/cjs/spatial/ecrs/WellKnownText.js.map +1 -1
- package/lib/cjs/spatial/ecrs/WellKnownTextNode.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/transformation/PositionVector.js.map +1 -1
- package/lib/cjs/spatial/geom/Bounds.js.map +1 -1
- package/lib/cjs/spatial/geom/Coordinate.js.map +1 -1
- package/lib/cjs/spatial/geom/Line.js.map +1 -1
- package/lib/cjs/spatial/geom/Transform.js.map +1 -1
- package/lib/cjs/system/buffer/ABuffer.js.map +1 -1
- package/lib/cjs/system/buffer/Float32Buffer.js.map +1 -1
- package/lib/cjs/system/buffer/LittleEndian.js.map +1 -1
- package/lib/cjs/system/buffer/Uint16Buffer.js.map +1 -1
- package/lib/cjs/system/buffer/Uint8Buffer.js.map +1 -1
- package/lib/cjs/system/collection/AList.js.map +1 -1
- package/lib/cjs/system/collection/IntMap.js.map +1 -1
- package/lib/cjs/system/collection/StringMap.js.map +1 -1
- package/lib/cjs/system/io/ABufferInStream.js.map +1 -1
- package/lib/cjs/system/io/InStream.js.map +1 -1
- package/lib/cjs/system/io/OutStream.js.map +1 -1
- package/lib/cjs/system/runtime/ALong.js.map +1 -1
- package/lib/cjs/system/runtime/ASystem.js.map +1 -1
- package/lib/cjs/system/runtime/Downloader.js.map +1 -1
- package/lib/cjs/system/runtime/DownloaderNode.js.map +1 -1
- package/lib/cjs/system/runtime/DownloaderXhr.js.map +1 -1
- package/lib/cjs/system/runtime/Message.js.map +1 -1
- package/lib/cjs/system/runtime/Numbers.js.map +1 -1
- package/lib/cjs/system/runtime/Strings.js.map +1 -1
- package/lib/cjs/system/runtime/iComparator.js.map +1 -1
- package/lib/cjs/system/storage/CacheList.js.map +1 -1
- package/lib/cjs/system/storage/CachedItem.js.map +1 -1
- package/lib/cjs/system/storage/ContentLoader.js.map +1 -1
- package/lib/cjs/system/storage/FileContent.js.map +1 -1
- package/lib/cjs/system/storage/FileRange.js.map +1 -1
- package/lib/cjs/system/storage/FileStorage.js.map +1 -1
- package/lib/cjs/system/storage/NodeFS.js.map +1 -1
- package/lib/cjs/system/storage/PageCachedFile.js.map +1 -1
- package/lib/cjs/system/storage/UrlFS.js.map +1 -1
- package/lib/esm/core-orbitgt.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/AttributeMask.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/AttributeReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/BlockRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/ContainerFile.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/ContainerFilePart.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/DirectoryReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/DirectoryRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/EmbeddedAttributeReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileAccess.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/GeometryReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/GeometryRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/OPCReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/PointReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/TileReadBuffer.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/TileRecord.js.map +1 -1
- package/lib/esm/pointcloud/model/AttributeTypes.js.map +1 -1
- package/lib/esm/pointcloud/model/AttributeValue.js.map +1 -1
- package/lib/esm/pointcloud/model/BlockIndex.js.map +1 -1
- package/lib/esm/pointcloud/model/CloudPoint.js.map +1 -1
- package/lib/esm/pointcloud/model/Grid.js.map +1 -1
- package/lib/esm/pointcloud/model/GridIndex.js.map +1 -1
- package/lib/esm/pointcloud/model/PointAttribute.js.map +1 -1
- package/lib/esm/pointcloud/model/PointCloudReader.js.map +1 -1
- package/lib/esm/pointcloud/model/PointData.js.map +1 -1
- package/lib/esm/pointcloud/model/PointDataRaw.js.map +1 -1
- package/lib/esm/pointcloud/model/ReadRequest.js.map +1 -1
- package/lib/esm/pointcloud/model/StandardAttributes.js.map +1 -1
- package/lib/esm/pointcloud/model/TileIndex.js.map +1 -1
- package/lib/esm/pointcloud/render/AViewRequest.js.map +1 -1
- package/lib/esm/pointcloud/render/Block.js.map +1 -1
- package/lib/esm/pointcloud/render/DataManager.js.map +1 -1
- package/lib/esm/pointcloud/render/FrameData.js.map +1 -1
- package/lib/esm/pointcloud/render/Level.js.map +1 -1
- package/lib/esm/pointcloud/render/TileLoadSorter.js.map +1 -1
- package/lib/esm/pointcloud/render/ViewTree.js.map +1 -1
- package/lib/esm/spatial/crs/CRSEngine.js.map +1 -1
- package/lib/esm/spatial/crs/CRSManager.js.map +1 -1
- package/lib/esm/spatial/ecrs/Axis.js.map +1 -1
- package/lib/esm/spatial/ecrs/CRS.js.map +1 -1
- package/lib/esm/spatial/ecrs/CoordinateSystem.js.map +1 -1
- package/lib/esm/spatial/ecrs/DataFileUnit.js.map +1 -1
- package/lib/esm/spatial/ecrs/Datum.js.map +1 -1
- package/lib/esm/spatial/ecrs/Ellipsoid.js.map +1 -1
- package/lib/esm/spatial/ecrs/OnlineEngine.js.map +1 -1
- package/lib/esm/spatial/ecrs/OnlineRegistry.js.map +1 -1
- package/lib/esm/spatial/ecrs/Operation.js.map +1 -1
- package/lib/esm/spatial/ecrs/OperationMethod.js.map +1 -1
- package/lib/esm/spatial/ecrs/ParameterValue.js.map +1 -1
- package/lib/esm/spatial/ecrs/ParameterValueList.js.map +1 -1
- package/lib/esm/spatial/ecrs/PrimeMeridian.js.map +1 -1
- package/lib/esm/spatial/ecrs/Registry.js.map +1 -1
- package/lib/esm/spatial/ecrs/Transform.js.map +1 -1
- package/lib/esm/spatial/ecrs/Unit.js.map +1 -1
- package/lib/esm/spatial/ecrs/VerticalModel.js.map +1 -1
- package/lib/esm/spatial/ecrs/WellKnownText.js.map +1 -1
- package/lib/esm/spatial/ecrs/WellKnownTextNode.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/transformation/PositionVector.js.map +1 -1
- package/lib/esm/spatial/geom/Bounds.js.map +1 -1
- package/lib/esm/spatial/geom/Coordinate.js.map +1 -1
- package/lib/esm/spatial/geom/Line.js.map +1 -1
- package/lib/esm/spatial/geom/Transform.js.map +1 -1
- package/lib/esm/system/buffer/ABuffer.js.map +1 -1
- package/lib/esm/system/buffer/Float32Buffer.js.map +1 -1
- package/lib/esm/system/buffer/LittleEndian.js.map +1 -1
- package/lib/esm/system/buffer/Uint16Buffer.js.map +1 -1
- package/lib/esm/system/buffer/Uint8Buffer.js.map +1 -1
- package/lib/esm/system/collection/AList.js.map +1 -1
- package/lib/esm/system/collection/IntMap.js.map +1 -1
- package/lib/esm/system/collection/StringMap.js.map +1 -1
- package/lib/esm/system/io/ABufferInStream.js.map +1 -1
- package/lib/esm/system/io/InStream.js.map +1 -1
- package/lib/esm/system/io/OutStream.js.map +1 -1
- package/lib/esm/system/runtime/ALong.js.map +1 -1
- package/lib/esm/system/runtime/ASystem.js.map +1 -1
- package/lib/esm/system/runtime/Downloader.js.map +1 -1
- package/lib/esm/system/runtime/DownloaderNode.js.map +1 -1
- package/lib/esm/system/runtime/DownloaderXhr.js.map +1 -1
- package/lib/esm/system/runtime/Message.js.map +1 -1
- package/lib/esm/system/runtime/Numbers.js.map +1 -1
- package/lib/esm/system/runtime/Strings.js.map +1 -1
- package/lib/esm/system/runtime/iComparator.js.map +1 -1
- package/lib/esm/system/storage/CacheList.js.map +1 -1
- package/lib/esm/system/storage/CachedItem.js.map +1 -1
- package/lib/esm/system/storage/ContentLoader.js.map +1 -1
- package/lib/esm/system/storage/FileContent.js.map +1 -1
- package/lib/esm/system/storage/FileRange.js.map +1 -1
- package/lib/esm/system/storage/FileStorage.js.map +1 -1
- package/lib/esm/system/storage/NodeFS.js.map +1 -1
- package/lib/esm/system/storage/PageCachedFile.js.map +1 -1
- package/lib/esm/system/storage/UrlFS.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ALong.js","sourceRoot":"","sources":["../../../../src/system/runtime/ALong.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAWH,uCAAoC;AACpC,uCAAoC;AACpC,uCAAoC;AAEpC;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,KAAK;IACd,iCAAiC;IACzB,MAAM,CAA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AC,cAAc,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACI,QAAQ;QACX,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC;;AApqBL,sBAqqBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.system.runtime;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\n\nimport { ASystem } from \"./ASystem\";\nimport { Numbers } from \"./Numbers\";\nimport { Strings } from \"./Strings\";\n\n/**\n * Class ALong defines a signed 64-bit integer using two (high and low) 64-bit floats.\n *\n * @version 1.0 February 2019\n */\n/** @internal */\nexport class ALong {\n /** The value of a 32 bit unit */\n private static readonly _U32: float64 = 4294967296.0;\n /** The value of a 31 bit unit */\n private static readonly _U31: float64 = 2147483648.0;\n /** The value of a 24 bit unit */\n private static readonly _U24: float64 = 16777216.0;\n /** The value of a 16 bit unit */\n private static readonly _U16: float64 = 65536.0;\n /** The value of a 8 bit unit */\n private static readonly _U8: float64 = 256.0;\n\n /** The integer value 0 */\n public static ZERO: ALong = new ALong(0.0, 0.0);\n /** The integer value 1 */\n public static ONE: ALong = new ALong(0.0, 1.0);\n /** The integer value 2 */\n public static TWO: ALong = new ALong(0.0, 2.0);\n /** The integer value 4 */\n public static FOUR: ALong = new ALong(0.0, 4.0);\n /** The integer value 10 */\n public static TEN: ALong = new ALong(0.0, 10.0);\n /** The integer value -1 */\n public static MINUS_ONE: ALong = new ALong(ALong._U32 - 1.0, ALong._U32 - 1.0);\n /** The maximum positive value of a signed_ 64-bit integer (9223372036854775807) */\n public static MAX_VALUE: ALong = new ALong(ALong._U31 - 1.0, ALong._U32 - 1.0);\n /** The minimum negative value of a signed 64-bit integer (-9223372036854775808) */\n public static MIN_VALUE: ALong = new ALong(ALong._U31, 0.0);\n\n /** The high value (unsigned integer [0..U32[ after normalization, negative i64 if >= U31) */\n private _high: float64;\n /** The low value (unsigned integer [0..U32[ after normalization) */\n private _low: float64;\n\n /**\n * Create a new value.\n * @param high the 32-bit high part.\n * @param low the 32-bit low part.\n */\n private constructor(high: float64, low: float64) {\n this._high = high;\n this._low = low;\n }\n\n /**\n * Check if the number is zero.\n * @return true if zero.\n */\n public isZero(): boolean {\n return (this._high == 0.0) && (this._low == 0.0);\n }\n\n /**\n * Check if the number is not zero.\n * @return true if zero.\n */\n public isNonZero(): boolean {\n return (this.isZero() == false);\n }\n\n /**\n * Check if the number is one.\n * @return true if one.\n */\n public isOne(): boolean {\n return (this._high == 0.0) && (this._low == 1.0);\n }\n\n /**\n * Check if the number is positive.\n * @return true if positive (false if zero).\n */\n public isPositive(): boolean {\n return this.isZero() ? false : (this._high < ALong._U31);\n }\n\n /**\n * Check if the number is negative.\n * @return true if negative (false if zero).\n */\n public isNegative(): boolean {\n return this.isZero() ? false : (this._high >= ALong._U31);\n }\n\n /**\n * Normalize the number.\n * @return this number for chaining operations.\n */\n private static normalize2(high: float64, low: float64): ALong {\n // normalize the low part\n let overflowLow: float64 = Numbers.floor(low / ALong._U32);\n low = (low - overflowLow * ALong._U32); // inside range [0..U32[\n high += overflowLow;\n // normalize the high part\n let overflowHigh: float64 = Numbers.floor(high / ALong._U32);\n high = (high - overflowHigh * ALong._U32); // inside range [0..U32[\n // return the result\n return new ALong(high, low);\n }\n\n /**\n * Negate the number.\n * @return the result.\n */\n public negate(): ALong {\n /* Zero? */\n if (this.isZero()) {\n /* Return this immutable instance */\n return this;\n }\n /* Compute */\n let resultHigh: float64 = (ALong._U32 - 1.0 - this._high);\n let resultLow: float64 = (ALong._U32 - this._low);\n /* Overflow? */\n if (resultLow == ALong._U32) {\n resultLow = 0.0;\n resultHigh += 1.0; // in case we try to invert ALong.MIN_VALUE we get ALong.MIN_VALUE as a result again\n }\n /* Return the result */\n return new ALong(resultHigh, resultLow);\n }\n\n /**\n * Add a number.\n * @param value the value to add.\n * @return the result.\n */\n public add(value: ALong): ALong {\n /* Compute */\n let resultHigh: float64 = (this._high + value._high);\n let resultLow: float64 = (this._low + value._low);\n /* Return the result */\n return ALong.normalize2(resultHigh, resultLow);\n }\n\n /**\n * Add a number.\n * @param value the value to add.\n * @return the result.\n */\n public addInt(value: int32): ALong {\n return this.add(ALong.fromInt(value));\n }\n\n /**\n * Increase by one.\n * @return the result.\n */\n public increase(): ALong {\n return this.addInt(1);\n }\n\n /**\n * Subtract a number.\n * @param value the value to subtract.\n * @return the result.\n */\n public sub(value: ALong): ALong {\n return this.add(value.negate());\n }\n\n /**\n * Subtract a number.\n * @param value the value to subtract.\n * @return the result.\n */\n public subInt(value: int32): ALong {\n return this.sub(ALong.fromInt(value));\n }\n\n /**\n * Decrease by one.\n * @return the result.\n */\n public decrease(): ALong {\n return this.subInt(1);\n }\n\n /**\n * Multiply two unsigned 32-bit integer values.\n * @param v1 the first value.\n * @param v2 the second value.\n * @param high0 the initial high value of the result.\n * @return the unsigned 64-bit product.\n */\n private static mul2(v1: ALong, v2: ALong): ALong {\n /* Zero? */\n if (v1.isZero()) return v1;\n if (v2.isZero()) return v2;\n /* Make the values unsigned */\n let neg1: int32 = v1.isNegative() ? 1 : 0;\n if (neg1 == 1) v1 = v1.negate();\n let neg2: int32 = v2.isNegative() ? 1 : 0;\n if (neg2 == 1) v2 = v2.negate();\n /* Split first low into 16-bit parts */\n let a1: float64 = Numbers.floor(v1._low / ALong._U16);;\n let a2: float64 = (v1._low - a1 * ALong._U16);\n /* Split second low into 16-bit parts */\n let b1: float64 = Numbers.floor(v2._low / ALong._U16);;\n let b2: float64 = (v2._low - b1 * ALong._U16);\n /* Compute */\n let resultHigh: float64 = (v1._high * v2._low + v1._low * v2._high) + (a1 * b1);\n let resultLow: float64 = (a1 * b2 + a2 * b1) * ALong._U16 + (a2 * b2);\n let result: ALong = ALong.normalize2(resultHigh, resultLow);\n /* Return the result */\n return (neg1 + neg2 == 1) ? result.negate() : result;\n }\n\n /**\n * Multiply by a number.\n * @param value the value to multiply.\n * @return the result.\n */\n public mul(value: ALong): ALong {\n return ALong.mul2(this, value);\n }\n\n /**\n * Multiply by a number.\n * @param value the value to multiply.\n * @return the result.\n */\n public mulInt(value: int32): ALong {\n return this.mul(ALong.fromInt(value));\n }\n\n /**\n * Divide by a number.\n * @param value the value to divide by.\n * @return the result.\n */\n public div(value: ALong): ALong {\n /* Division by zero? */\n ASystem.assertNot(value.isZero(), \"ALong division by ALong zero\");\n /* Division by one? */\n if (value.isOne()) return this;\n /* Make the values unsigned */\n let currentValue: ALong = this;\n let neg1: boolean = currentValue.isNegative();\n if (neg1) currentValue = currentValue.negate();\n let value2: ALong = value;\n let neg2: boolean = value2.isNegative();\n if (neg2) value2.negate();\n let neg: boolean = (neg1 && !neg2) || (!neg1 && neg2);\n /* Loop until the remainder is smaller than the value */\n let result: ALong = ALong.ZERO;\n while (currentValue.isLargerThanOrEqualTo(value2)) {\n /* Shift the value as much as possible */\n let test: ALong = value2;\n let times: ALong = ALong.ONE;\n if (test.isSmallerThan(currentValue)) {\n while (test.isSmallerThan(currentValue)) {\n test = test.mulInt(2);\n times = times.mulInt(2);\n }\n test = test.divInt(2);\n times = times.divInt(2);\n }\n /* Subtract the shifted value */\n currentValue = currentValue.sub(test);\n result = result.add(times);\n }\n /* Return the result */\n return (neg) ? result.negate() : result;\n }\n\n /**\n * Divide by a number.\n * @param value the value to divide by.\n * @return the result.\n */\n public divInt(value: int32): ALong {\n /* Division by zero? */\n ASystem.assertNot(value == 0, \"ALong division by int zero\");\n /* Division by one? */\n if (value == 1) return this;\n /* Make the values unsigned */\n let value1: ALong = this;\n let neg1: boolean = value1.isNegative();\n if (neg1) value1 = value1.negate();\n let neg2: boolean = (value < 0);\n if (neg2) value = -1 * value;\n let neg: boolean = (neg1 && !neg2) || (!neg1 && neg2);\n /* Compute */\n let valueF: float64 = (0.0 + value);\n let h1: float64 = Numbers.floor(value1._high / valueF);\n let h2: float64 = (value1._high - valueF * h1);\n let l1: float64 = Numbers.floor(value1._low / valueF);\n let l2: float64 = (value1._low - valueF * l1);\n let t: float64 = (h2 * ALong._U32 + l2);\n let t1: float64 = Numbers.floor(t / valueF);\n let t2: float64 = (t - valueF * t1); // remainder\n let result: ALong = ALong.normalize2(h1, l1 + t1);\n /* Return the result */\n return (neg) ? result.negate() : result;\n }\n\n /**\n * Modulate by a number.\n * @param value the value to modulate by.\n * @return the result.\n */\n public mod(value: ALong): ALong {\n /* Division by zero? */\n ASystem.assertNot(value.isZero(), \"ALong modulo by ALong zero\");\n /* Division by one? */\n if (value.isOne()) return ALong.ZERO;\n /* Compute */\n let result: ALong = this.sub(this.div(value).mul(value));\n /* Return the result */\n return result;\n }\n\n /**\n * Modulate by a number.\n * @param value the value to modulate by.\n * @return the modulo value.\n */\n public modInt(value: int32): int32 {\n /* Division by zero? */\n ASystem.assertNot(value == 0, \"ALong modulo by int zero\");\n /* Division by one? */\n if (value == 1) return 0;\n /* Make the values unsigned */\n let value1: ALong = this;\n let neg1: boolean = value1.isNegative();\n if (neg1) value1 = value1.negate();\n let neg2: boolean = (value < 0);\n if (neg2) value = -1 * value;\n let neg: boolean = (neg1 && !neg2) || (!neg1 && neg2);\n /* Compute */\n let valueF: float64 = (0.0 + value);\n let h1: float64 = Numbers.floor(value1._high / valueF);\n let h2: float64 = (value1._high - valueF * h1);\n let l1: float64 = Numbers.floor(value1._low / valueF);\n let l2: float64 = (value1._low - valueF * l1);\n let t: float64 = (h2 * ALong._U32 + l2);\n let t1: float64 = Numbers.floor(t / valueF);\n let t2: float64 = (t - valueF * t1); // remainder\n let result: int32 = Math.trunc(t2);\n /* Return the result */\n return result;\n }\n\n /**\n * Create a new number.\n * @param value the 64-bit float value.\n * @return the new number.\n */\n public static fromDouble(value: float64): ALong {\n /* Make the value unsigned */\n let neg: boolean = (value < 0.0);\n if (neg) value = (-1.0 * value);\n /* Compute */\n value = Numbers.floor(value);\n let high: float64 = Numbers.floor(value / ALong._U32);\n let low: float64 = (value - high * ALong._U32);\n let result: ALong = ALong.normalize2(high, low);\n /* Return the result */\n return (neg) ? result.negate() : result;\n }\n\n /**\n * Get a double.\n * @return the double value.\n */\n public toDouble(): float64 {\n /* Make the value unsigned */\n let value: ALong = this;\n let neg: boolean = value.isNegative();\n if (neg) value = value.negate();\n /* Compute */\n let result: float64 = (value._high * ALong._U32) + value._low;\n if (neg) result *= -1.0;\n /* Return the result */\n return result;\n }\n\n /**\n * Create a new number.\n * @param value the 32-bit integer value.\n * @return the new number.\n */\n public static fromInt(value: float64): ALong {\n return (value < 0.0) ? new ALong(ALong._U32 - 1.0, ALong._U32 + value) : new ALong(0.0, value);\n }\n\n /**\n * Get a 32-bit integer.\n * @return the integer value.\n */\n public toInt(): int32 {\n /* Make the value unsigned */\n let value: ALong = this;\n let neg: boolean = value.isNegative();\n if (neg) value = value.negate();\n /* Compute */\n let result: float64 = value._low;\n if (neg) result *= -1.0;\n /* Return the result */\n return Numbers.doubleToInt(result);\n }\n\n /**\n * Create a new number.\n * @param i1 the 32-bit high part.\n * @param i0 the 32-bit low part.\n * @return the new number.\n */\n public static fromHighLow(i1: float64, i0: float64): ALong {\n if (i1 < 0.0) i1 += ALong._U32; // make unsigned\n if (i0 < 0.0) i0 += ALong._U32;\n return new ALong(i1, i0);\n }\n\n /**\n * Get the high part.\n * @return the integer value (0..4294967295)\n */\n public getHigh(): float64 {\n return this._high;\n }\n\n /**\n * Get the low part.\n * @return the integer value (0..4294967295)\n */\n public getLow(): float64 {\n return this._low;\n }\n\n /**\n * Create a new number.\n * @param b7 the most significant 8-bit byte of the high part (0..255).\n * @param b6 the most third 8-bit byte of the high part (0..255).\n * @param b5 the most second 8-bit byte of the high part (0..255).\n * @param b4 the most least 8-bit byte of the high part (0..255).\n * @param b3 the most significant 8-bit byte of the low part (0..255).\n * @param b2 the most third 8-bit byte of the low part (0..255).\n * @param b1 the most second 8-bit byte of the low part (0..255).\n * @param b0 the most least 8-bit byte of the low part (0..255).\n * @return the new number.\n */\n public static fromBytes(b7: float64, b6: float64, b5: float64, b4: float64, b3: float64, b2: float64, b1: float64, b0: float64): ALong {\n if (b7 < 0.0) b7 += ALong._U8; // make unsigned\n if (b6 < 0.0) b6 += ALong._U8;\n if (b5 < 0.0) b5 += ALong._U8;\n if (b4 < 0.0) b4 += ALong._U8;\n if (b3 < 0.0) b3 += ALong._U8;\n if (b2 < 0.0) b2 += ALong._U8;\n if (b1 < 0.0) b1 += ALong._U8;\n if (b0 < 0.0) b0 += ALong._U8;\n let high: float64 = (b7 * ALong._U24 + b6 * ALong._U16 + b5 * ALong._U8 + b4);\n let low: float64 = (b3 * ALong._U24 + b2 * ALong._U16 + b1 * ALong._U8 + b0);\n return ALong.fromHighLow(high, low);\n }\n\n /**\n * Get a byte.\n * @param index the index of the byte (0..7 where 0 is low).\n * @return the byte value (0..255)\n */\n public getByte(index: int32): int32 {\n let value: float64 = (index < 4) ? this._low : this._high; // this should be unsigned\n let position: int32 = (index < 4) ? index : (index - 4);\n for (let i: number = 0; i < position; i++) value = Numbers.floor(value / 256.0);\n return Math.trunc(value % 256);\n }\n\n /**\n * Check if a number is equal.\n * @param value the value to check.\n * @return true if equal.\n */\n public isEqualTo(value: ALong): boolean {\n return (value._high == this._high) && (value._low == this._low);\n }\n\n /**\n * Check if a number is not equal.\n * @param value the value to check.\n * @return true if equal.\n */\n public isNotEqualTo(value: ALong): boolean {\n return (this.isEqualTo(value) == false);\n }\n\n /**\n * Check if a number is equal.\n * @param value the value to check.\n * @return true if equal.\n */\n public same(value: ALong): boolean {\n return this.isEqualTo(value);\n }\n\n /**\n * Check if a number is equal.\n * @param value the value to check.\n * @return true if equal.\n */\n public equals(value: ALong): boolean {\n return this.isEqualTo(value);\n }\n\n /**\n * Compare this long to another long.\n * @param value the other long.\n * @return zero if equal, positive if smaller, or negative if value is larger.\n */\n public compareTo(value: ALong): int32 {\n let diff: ALong = this.sub(value);\n if (diff.isZero()) return 0;\n return diff.isNegative() ? -1 : 1;\n }\n\n\t/**\n\t * Check if a value is larger.\n\t * @param value the value to check.\n\t * @return true if this number is larger than the check value.\n\t */\n public isLargerThan(value: ALong): boolean {\n return (this.compareTo(value) > 0);\n }\n\n\t/**\n\t * Check if a value is larger.\n\t * @param value the value to check.\n\t * @return true if this number is larger than the check value.\n\t */\n public isLargerThanOrEqualTo(value: ALong): boolean {\n return (this.compareTo(value) >= 0);\n }\n\n\t/**\n\t * Check if a value is smaller.\n\t * @param value the value to check.\n\t * @return true if this number is smaller than the check value.\n\t */\n public isSmallerThan(value: ALong): boolean {\n return (this.compareTo(value) < 0);\n }\n\n\t/**\n\t * Check if a value is smaller.\n\t * @param value the value to check.\n\t * @return true if this number is smaller than the check value.\n\t */\n public isSmallerThanOrEqualTo(value: ALong): boolean {\n return (this.compareTo(value) <= 0);\n }\n\n /**\n * Get the maximum value.\n * @param v1 the first value.\n * @param v2 the second value.\n * @return the maximum value.\n */\n public static max(v1: ALong, v2: ALong): ALong {\n return (v2.isLargerThan(v1)) ? v2 : v1;\n }\n\n /**\n * Get the minimum value.\n * @param v1 the first value.\n * @param v2 the second value.\n * @return the minimum value.\n */\n public static min(v1: ALong, v2: ALong): ALong {\n return (v2.isSmallerThan(v1)) ? v2 : v1;\n }\n\n /**\n * Create a number from a string.\n * @param svalue the string value.\n * @param radix the radix (2 to 36).\n * @return the number.\n */\n public static fromRadixString(svalue: string, radix: int32): ALong {\n /* Check the radix */\n ASystem.assertNot((radix < 2) || (radix > 36), \"Invalid radix: \" + radix);\n /* Common values? */\n if (Strings.equals(svalue, \"0\")) return ALong.ZERO;\n if (Strings.equals(svalue, \"1\")) return ALong.ONE;\n /* Negative? */\n let neg: boolean = Strings.startsWith(svalue, \"-\");\n if (neg) svalue = Strings.substringFrom(svalue, 1);\n /* Add all digits */\n let result: ALong = ALong.ZERO;\n let unit: ALong = ALong.ONE;\n let radixHL: ALong = ALong.fromInt(radix);\n let slength: int32 = Strings.getLength(svalue);\n for (let i: number = 0; i < slength; i++) {\n /* Add the next digit */\n let charCode: int32 = Strings.charCodeAt(svalue, slength - 1 - i);\n let digit: int32 = (charCode >= 65) ? (charCode - 65 + 10) : (charCode - 48);\n if (digit > 0) result = result.add(unit.mulInt(digit));\n unit = unit.mul(radixHL);\n }\n /* Return the result */\n return (neg) ? result.negate() : result;\n }\n\n /**\n * Create a number from a decimal string.\n * @param value the string value.\n * @return the number.\n */\n public static fromString(value: string): ALong {\n if (value == null) return null;\n return ALong.fromRadixString(value, 10);\n }\n\n /**\n * Create a number from a hexadecimal string.\n * @param value the string value.\n * @return the number.\n */\n public static fromHexString(value: string): ALong {\n if (value == null) return null;\n return ALong.fromRadixString(value, 16);\n }\n\n /**\n * Convert the number to a string.\n * @param radix the radix (2 to 36).\n * @return the string.\n */\n public getRadixString(radix: int32): string {\n /* Check the radix */\n ASystem.assertNot((radix < 2) || (radix > 36), \"Invalid radix: \" + radix);\n /* Common values? */\n let value: ALong = this;\n if (value.isZero()) return \"0\";\n /* Make the value unsigned */\n let neg: boolean = value.isNegative();\n if (neg) value = value.negate();\n /* Add all digits */\n let result: string = \"\";\n while (true) {\n /* Add the next digit */\n if (value.isZero()) break;\n let digit: int32 = value.modInt(radix);\n value = value.divInt(radix);\n let sdigit: string = (digit < 10) ? Strings.charCodeToString(48 + digit) : Strings.charCodeToString(65 + digit - 10);\n result = (sdigit + result);\n /* Fail? */\n ASystem.assertNot(Strings.getLength(result) > 20, \"Failed to convert longHL to string (radix \" + radix + \"): \" + this._high + \";\" + this._low);\n }\n if (neg) result = (\"-\" + result);\n /* Return the result */\n return result;\n }\n\n /**\n * Convert the number to a decimal string.\n * @return the string.\n */\n public getString(): string {\n return this.getRadixString(10);\n }\n\n /**\n * Convert the number to a hexadecimal string.\n * @return the string.\n */\n public getHexString(): string {\n return this.getRadixString(16);\n }\n\n /**\n * The standard toString method.\n * @see Object#toString\n */\n public toString(): string {\n return this.getString();\n }\n}\n"]}
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YAAE,MAAM,GAAG,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC;QACjC,uBAAuB;QACvB,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;OAGG;IACI,SAAS;QACZ,OAAO,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACI,YAAY;QACf,OAAO,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACI,QAAQ;QACX,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC;;AApqBL,sBAqqBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.system.runtime;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\n\r\nimport { ASystem } from \"./ASystem\";\r\nimport { Numbers } from \"./Numbers\";\r\nimport { Strings } from \"./Strings\";\r\n\r\n/**\r\n * Class ALong defines a signed 64-bit integer using two (high and low) 64-bit floats.\r\n *\r\n * @version 1.0 February 2019\r\n */\r\n/** @internal */\r\nexport class ALong {\r\n /** The value of a 32 bit unit */\r\n private static readonly _U32: float64 = 4294967296.0;\r\n /** The value of a 31 bit unit */\r\n private static readonly _U31: float64 = 2147483648.0;\r\n /** The value of a 24 bit unit */\r\n private static readonly _U24: float64 = 16777216.0;\r\n /** The value of a 16 bit unit */\r\n private static readonly _U16: float64 = 65536.0;\r\n /** The value of a 8 bit unit */\r\n private static readonly _U8: float64 = 256.0;\r\n\r\n /** The integer value 0 */\r\n public static ZERO: ALong = new ALong(0.0, 0.0);\r\n /** The integer value 1 */\r\n public static ONE: ALong = new ALong(0.0, 1.0);\r\n /** The integer value 2 */\r\n public static TWO: ALong = new ALong(0.0, 2.0);\r\n /** The integer value 4 */\r\n public static FOUR: ALong = new ALong(0.0, 4.0);\r\n /** The integer value 10 */\r\n public static TEN: ALong = new ALong(0.0, 10.0);\r\n /** The integer value -1 */\r\n public static MINUS_ONE: ALong = new ALong(ALong._U32 - 1.0, ALong._U32 - 1.0);\r\n /** The maximum positive value of a signed_ 64-bit integer (9223372036854775807) */\r\n public static MAX_VALUE: ALong = new ALong(ALong._U31 - 1.0, ALong._U32 - 1.0);\r\n /** The minimum negative value of a signed 64-bit integer (-9223372036854775808) */\r\n public static MIN_VALUE: ALong = new ALong(ALong._U31, 0.0);\r\n\r\n /** The high value (unsigned integer [0..U32[ after normalization, negative i64 if >= U31) */\r\n private _high: float64;\r\n /** The low value (unsigned integer [0..U32[ after normalization) */\r\n private _low: float64;\r\n\r\n /**\r\n * Create a new value.\r\n * @param high the 32-bit high part.\r\n * @param low the 32-bit low part.\r\n */\r\n private constructor(high: float64, low: float64) {\r\n this._high = high;\r\n this._low = low;\r\n }\r\n\r\n /**\r\n * Check if the number is zero.\r\n * @return true if zero.\r\n */\r\n public isZero(): boolean {\r\n return (this._high == 0.0) && (this._low == 0.0);\r\n }\r\n\r\n /**\r\n * Check if the number is not zero.\r\n * @return true if zero.\r\n */\r\n public isNonZero(): boolean {\r\n return (this.isZero() == false);\r\n }\r\n\r\n /**\r\n * Check if the number is one.\r\n * @return true if one.\r\n */\r\n public isOne(): boolean {\r\n return (this._high == 0.0) && (this._low == 1.0);\r\n }\r\n\r\n /**\r\n * Check if the number is positive.\r\n * @return true if positive (false if zero).\r\n */\r\n public isPositive(): boolean {\r\n return this.isZero() ? false : (this._high < ALong._U31);\r\n }\r\n\r\n /**\r\n * Check if the number is negative.\r\n * @return true if negative (false if zero).\r\n */\r\n public isNegative(): boolean {\r\n return this.isZero() ? false : (this._high >= ALong._U31);\r\n }\r\n\r\n /**\r\n * Normalize the number.\r\n * @return this number for chaining operations.\r\n */\r\n private static normalize2(high: float64, low: float64): ALong {\r\n // normalize the low part\r\n let overflowLow: float64 = Numbers.floor(low / ALong._U32);\r\n low = (low - overflowLow * ALong._U32); // inside range [0..U32[\r\n high += overflowLow;\r\n // normalize the high part\r\n let overflowHigh: float64 = Numbers.floor(high / ALong._U32);\r\n high = (high - overflowHigh * ALong._U32); // inside range [0..U32[\r\n // return the result\r\n return new ALong(high, low);\r\n }\r\n\r\n /**\r\n * Negate the number.\r\n * @return the result.\r\n */\r\n public negate(): ALong {\r\n /* Zero? */\r\n if (this.isZero()) {\r\n /* Return this immutable instance */\r\n return this;\r\n }\r\n /* Compute */\r\n let resultHigh: float64 = (ALong._U32 - 1.0 - this._high);\r\n let resultLow: float64 = (ALong._U32 - this._low);\r\n /* Overflow? */\r\n if (resultLow == ALong._U32) {\r\n resultLow = 0.0;\r\n resultHigh += 1.0; // in case we try to invert ALong.MIN_VALUE we get ALong.MIN_VALUE as a result again\r\n }\r\n /* Return the result */\r\n return new ALong(resultHigh, resultLow);\r\n }\r\n\r\n /**\r\n * Add a number.\r\n * @param value the value to add.\r\n * @return the result.\r\n */\r\n public add(value: ALong): ALong {\r\n /* Compute */\r\n let resultHigh: float64 = (this._high + value._high);\r\n let resultLow: float64 = (this._low + value._low);\r\n /* Return the result */\r\n return ALong.normalize2(resultHigh, resultLow);\r\n }\r\n\r\n /**\r\n * Add a number.\r\n * @param value the value to add.\r\n * @return the result.\r\n */\r\n public addInt(value: int32): ALong {\r\n return this.add(ALong.fromInt(value));\r\n }\r\n\r\n /**\r\n * Increase by one.\r\n * @return the result.\r\n */\r\n public increase(): ALong {\r\n return this.addInt(1);\r\n }\r\n\r\n /**\r\n * Subtract a number.\r\n * @param value the value to subtract.\r\n * @return the result.\r\n */\r\n public sub(value: ALong): ALong {\r\n return this.add(value.negate());\r\n }\r\n\r\n /**\r\n * Subtract a number.\r\n * @param value the value to subtract.\r\n * @return the result.\r\n */\r\n public subInt(value: int32): ALong {\r\n return this.sub(ALong.fromInt(value));\r\n }\r\n\r\n /**\r\n * Decrease by one.\r\n * @return the result.\r\n */\r\n public decrease(): ALong {\r\n return this.subInt(1);\r\n }\r\n\r\n /**\r\n * Multiply two unsigned 32-bit integer values.\r\n * @param v1 the first value.\r\n * @param v2 the second value.\r\n * @param high0 the initial high value of the result.\r\n * @return the unsigned 64-bit product.\r\n */\r\n private static mul2(v1: ALong, v2: ALong): ALong {\r\n /* Zero? */\r\n if (v1.isZero()) return v1;\r\n if (v2.isZero()) return v2;\r\n /* Make the values unsigned */\r\n let neg1: int32 = v1.isNegative() ? 1 : 0;\r\n if (neg1 == 1) v1 = v1.negate();\r\n let neg2: int32 = v2.isNegative() ? 1 : 0;\r\n if (neg2 == 1) v2 = v2.negate();\r\n /* Split first low into 16-bit parts */\r\n let a1: float64 = Numbers.floor(v1._low / ALong._U16);;\r\n let a2: float64 = (v1._low - a1 * ALong._U16);\r\n /* Split second low into 16-bit parts */\r\n let b1: float64 = Numbers.floor(v2._low / ALong._U16);;\r\n let b2: float64 = (v2._low - b1 * ALong._U16);\r\n /* Compute */\r\n let resultHigh: float64 = (v1._high * v2._low + v1._low * v2._high) + (a1 * b1);\r\n let resultLow: float64 = (a1 * b2 + a2 * b1) * ALong._U16 + (a2 * b2);\r\n let result: ALong = ALong.normalize2(resultHigh, resultLow);\r\n /* Return the result */\r\n return (neg1 + neg2 == 1) ? result.negate() : result;\r\n }\r\n\r\n /**\r\n * Multiply by a number.\r\n * @param value the value to multiply.\r\n * @return the result.\r\n */\r\n public mul(value: ALong): ALong {\r\n return ALong.mul2(this, value);\r\n }\r\n\r\n /**\r\n * Multiply by a number.\r\n * @param value the value to multiply.\r\n * @return the result.\r\n */\r\n public mulInt(value: int32): ALong {\r\n return this.mul(ALong.fromInt(value));\r\n }\r\n\r\n /**\r\n * Divide by a number.\r\n * @param value the value to divide by.\r\n * @return the result.\r\n */\r\n public div(value: ALong): ALong {\r\n /* Division by zero? */\r\n ASystem.assertNot(value.isZero(), \"ALong division by ALong zero\");\r\n /* Division by one? */\r\n if (value.isOne()) return this;\r\n /* Make the values unsigned */\r\n let currentValue: ALong = this;\r\n let neg1: boolean = currentValue.isNegative();\r\n if (neg1) currentValue = currentValue.negate();\r\n let value2: ALong = value;\r\n let neg2: boolean = value2.isNegative();\r\n if (neg2) value2.negate();\r\n let neg: boolean = (neg1 && !neg2) || (!neg1 && neg2);\r\n /* Loop until the remainder is smaller than the value */\r\n let result: ALong = ALong.ZERO;\r\n while (currentValue.isLargerThanOrEqualTo(value2)) {\r\n /* Shift the value as much as possible */\r\n let test: ALong = value2;\r\n let times: ALong = ALong.ONE;\r\n if (test.isSmallerThan(currentValue)) {\r\n while (test.isSmallerThan(currentValue)) {\r\n test = test.mulInt(2);\r\n times = times.mulInt(2);\r\n }\r\n test = test.divInt(2);\r\n times = times.divInt(2);\r\n }\r\n /* Subtract the shifted value */\r\n currentValue = currentValue.sub(test);\r\n result = result.add(times);\r\n }\r\n /* Return the result */\r\n return (neg) ? result.negate() : result;\r\n }\r\n\r\n /**\r\n * Divide by a number.\r\n * @param value the value to divide by.\r\n * @return the result.\r\n */\r\n public divInt(value: int32): ALong {\r\n /* Division by zero? */\r\n ASystem.assertNot(value == 0, \"ALong division by int zero\");\r\n /* Division by one? */\r\n if (value == 1) return this;\r\n /* Make the values unsigned */\r\n let value1: ALong = this;\r\n let neg1: boolean = value1.isNegative();\r\n if (neg1) value1 = value1.negate();\r\n let neg2: boolean = (value < 0);\r\n if (neg2) value = -1 * value;\r\n let neg: boolean = (neg1 && !neg2) || (!neg1 && neg2);\r\n /* Compute */\r\n let valueF: float64 = (0.0 + value);\r\n let h1: float64 = Numbers.floor(value1._high / valueF);\r\n let h2: float64 = (value1._high - valueF * h1);\r\n let l1: float64 = Numbers.floor(value1._low / valueF);\r\n let l2: float64 = (value1._low - valueF * l1);\r\n let t: float64 = (h2 * ALong._U32 + l2);\r\n let t1: float64 = Numbers.floor(t / valueF);\r\n let t2: float64 = (t - valueF * t1); // remainder\r\n let result: ALong = ALong.normalize2(h1, l1 + t1);\r\n /* Return the result */\r\n return (neg) ? result.negate() : result;\r\n }\r\n\r\n /**\r\n * Modulate by a number.\r\n * @param value the value to modulate by.\r\n * @return the result.\r\n */\r\n public mod(value: ALong): ALong {\r\n /* Division by zero? */\r\n ASystem.assertNot(value.isZero(), \"ALong modulo by ALong zero\");\r\n /* Division by one? */\r\n if (value.isOne()) return ALong.ZERO;\r\n /* Compute */\r\n let result: ALong = this.sub(this.div(value).mul(value));\r\n /* Return the result */\r\n return result;\r\n }\r\n\r\n /**\r\n * Modulate by a number.\r\n * @param value the value to modulate by.\r\n * @return the modulo value.\r\n */\r\n public modInt(value: int32): int32 {\r\n /* Division by zero? */\r\n ASystem.assertNot(value == 0, \"ALong modulo by int zero\");\r\n /* Division by one? */\r\n if (value == 1) return 0;\r\n /* Make the values unsigned */\r\n let value1: ALong = this;\r\n let neg1: boolean = value1.isNegative();\r\n if (neg1) value1 = value1.negate();\r\n let neg2: boolean = (value < 0);\r\n if (neg2) value = -1 * value;\r\n let neg: boolean = (neg1 && !neg2) || (!neg1 && neg2);\r\n /* Compute */\r\n let valueF: float64 = (0.0 + value);\r\n let h1: float64 = Numbers.floor(value1._high / valueF);\r\n let h2: float64 = (value1._high - valueF * h1);\r\n let l1: float64 = Numbers.floor(value1._low / valueF);\r\n let l2: float64 = (value1._low - valueF * l1);\r\n let t: float64 = (h2 * ALong._U32 + l2);\r\n let t1: float64 = Numbers.floor(t / valueF);\r\n let t2: float64 = (t - valueF * t1); // remainder\r\n let result: int32 = Math.trunc(t2);\r\n /* Return the result */\r\n return result;\r\n }\r\n\r\n /**\r\n * Create a new number.\r\n * @param value the 64-bit float value.\r\n * @return the new number.\r\n */\r\n public static fromDouble(value: float64): ALong {\r\n /* Make the value unsigned */\r\n let neg: boolean = (value < 0.0);\r\n if (neg) value = (-1.0 * value);\r\n /* Compute */\r\n value = Numbers.floor(value);\r\n let high: float64 = Numbers.floor(value / ALong._U32);\r\n let low: float64 = (value - high * ALong._U32);\r\n let result: ALong = ALong.normalize2(high, low);\r\n /* Return the result */\r\n return (neg) ? result.negate() : result;\r\n }\r\n\r\n /**\r\n * Get a double.\r\n * @return the double value.\r\n */\r\n public toDouble(): float64 {\r\n /* Make the value unsigned */\r\n let value: ALong = this;\r\n let neg: boolean = value.isNegative();\r\n if (neg) value = value.negate();\r\n /* Compute */\r\n let result: float64 = (value._high * ALong._U32) + value._low;\r\n if (neg) result *= -1.0;\r\n /* Return the result */\r\n return result;\r\n }\r\n\r\n /**\r\n * Create a new number.\r\n * @param value the 32-bit integer value.\r\n * @return the new number.\r\n */\r\n public static fromInt(value: float64): ALong {\r\n return (value < 0.0) ? new ALong(ALong._U32 - 1.0, ALong._U32 + value) : new ALong(0.0, value);\r\n }\r\n\r\n /**\r\n * Get a 32-bit integer.\r\n * @return the integer value.\r\n */\r\n public toInt(): int32 {\r\n /* Make the value unsigned */\r\n let value: ALong = this;\r\n let neg: boolean = value.isNegative();\r\n if (neg) value = value.negate();\r\n /* Compute */\r\n let result: float64 = value._low;\r\n if (neg) result *= -1.0;\r\n /* Return the result */\r\n return Numbers.doubleToInt(result);\r\n }\r\n\r\n /**\r\n * Create a new number.\r\n * @param i1 the 32-bit high part.\r\n * @param i0 the 32-bit low part.\r\n * @return the new number.\r\n */\r\n public static fromHighLow(i1: float64, i0: float64): ALong {\r\n if (i1 < 0.0) i1 += ALong._U32; // make unsigned\r\n if (i0 < 0.0) i0 += ALong._U32;\r\n return new ALong(i1, i0);\r\n }\r\n\r\n /**\r\n * Get the high part.\r\n * @return the integer value (0..4294967295)\r\n */\r\n public getHigh(): float64 {\r\n return this._high;\r\n }\r\n\r\n /**\r\n * Get the low part.\r\n * @return the integer value (0..4294967295)\r\n */\r\n public getLow(): float64 {\r\n return this._low;\r\n }\r\n\r\n /**\r\n * Create a new number.\r\n * @param b7 the most significant 8-bit byte of the high part (0..255).\r\n * @param b6 the most third 8-bit byte of the high part (0..255).\r\n * @param b5 the most second 8-bit byte of the high part (0..255).\r\n * @param b4 the most least 8-bit byte of the high part (0..255).\r\n * @param b3 the most significant 8-bit byte of the low part (0..255).\r\n * @param b2 the most third 8-bit byte of the low part (0..255).\r\n * @param b1 the most second 8-bit byte of the low part (0..255).\r\n * @param b0 the most least 8-bit byte of the low part (0..255).\r\n * @return the new number.\r\n */\r\n public static fromBytes(b7: float64, b6: float64, b5: float64, b4: float64, b3: float64, b2: float64, b1: float64, b0: float64): ALong {\r\n if (b7 < 0.0) b7 += ALong._U8; // make unsigned\r\n if (b6 < 0.0) b6 += ALong._U8;\r\n if (b5 < 0.0) b5 += ALong._U8;\r\n if (b4 < 0.0) b4 += ALong._U8;\r\n if (b3 < 0.0) b3 += ALong._U8;\r\n if (b2 < 0.0) b2 += ALong._U8;\r\n if (b1 < 0.0) b1 += ALong._U8;\r\n if (b0 < 0.0) b0 += ALong._U8;\r\n let high: float64 = (b7 * ALong._U24 + b6 * ALong._U16 + b5 * ALong._U8 + b4);\r\n let low: float64 = (b3 * ALong._U24 + b2 * ALong._U16 + b1 * ALong._U8 + b0);\r\n return ALong.fromHighLow(high, low);\r\n }\r\n\r\n /**\r\n * Get a byte.\r\n * @param index the index of the byte (0..7 where 0 is low).\r\n * @return the byte value (0..255)\r\n */\r\n public getByte(index: int32): int32 {\r\n let value: float64 = (index < 4) ? this._low : this._high; // this should be unsigned\r\n let position: int32 = (index < 4) ? index : (index - 4);\r\n for (let i: number = 0; i < position; i++) value = Numbers.floor(value / 256.0);\r\n return Math.trunc(value % 256);\r\n }\r\n\r\n /**\r\n * Check if a number is equal.\r\n * @param value the value to check.\r\n * @return true if equal.\r\n */\r\n public isEqualTo(value: ALong): boolean {\r\n return (value._high == this._high) && (value._low == this._low);\r\n }\r\n\r\n /**\r\n * Check if a number is not equal.\r\n * @param value the value to check.\r\n * @return true if equal.\r\n */\r\n public isNotEqualTo(value: ALong): boolean {\r\n return (this.isEqualTo(value) == false);\r\n }\r\n\r\n /**\r\n * Check if a number is equal.\r\n * @param value the value to check.\r\n * @return true if equal.\r\n */\r\n public same(value: ALong): boolean {\r\n return this.isEqualTo(value);\r\n }\r\n\r\n /**\r\n * Check if a number is equal.\r\n * @param value the value to check.\r\n * @return true if equal.\r\n */\r\n public equals(value: ALong): boolean {\r\n return this.isEqualTo(value);\r\n }\r\n\r\n /**\r\n * Compare this long to another long.\r\n * @param value the other long.\r\n * @return zero if equal, positive if smaller, or negative if value is larger.\r\n */\r\n public compareTo(value: ALong): int32 {\r\n let diff: ALong = this.sub(value);\r\n if (diff.isZero()) return 0;\r\n return diff.isNegative() ? -1 : 1;\r\n }\r\n\r\n\t/**\r\n\t * Check if a value is larger.\r\n\t * @param value the value to check.\r\n\t * @return true if this number is larger than the check value.\r\n\t */\r\n public isLargerThan(value: ALong): boolean {\r\n return (this.compareTo(value) > 0);\r\n }\r\n\r\n\t/**\r\n\t * Check if a value is larger.\r\n\t * @param value the value to check.\r\n\t * @return true if this number is larger than the check value.\r\n\t */\r\n public isLargerThanOrEqualTo(value: ALong): boolean {\r\n return (this.compareTo(value) >= 0);\r\n }\r\n\r\n\t/**\r\n\t * Check if a value is smaller.\r\n\t * @param value the value to check.\r\n\t * @return true if this number is smaller than the check value.\r\n\t */\r\n public isSmallerThan(value: ALong): boolean {\r\n return (this.compareTo(value) < 0);\r\n }\r\n\r\n\t/**\r\n\t * Check if a value is smaller.\r\n\t * @param value the value to check.\r\n\t * @return true if this number is smaller than the check value.\r\n\t */\r\n public isSmallerThanOrEqualTo(value: ALong): boolean {\r\n return (this.compareTo(value) <= 0);\r\n }\r\n\r\n /**\r\n * Get the maximum value.\r\n * @param v1 the first value.\r\n * @param v2 the second value.\r\n * @return the maximum value.\r\n */\r\n public static max(v1: ALong, v2: ALong): ALong {\r\n return (v2.isLargerThan(v1)) ? v2 : v1;\r\n }\r\n\r\n /**\r\n * Get the minimum value.\r\n * @param v1 the first value.\r\n * @param v2 the second value.\r\n * @return the minimum value.\r\n */\r\n public static min(v1: ALong, v2: ALong): ALong {\r\n return (v2.isSmallerThan(v1)) ? v2 : v1;\r\n }\r\n\r\n /**\r\n * Create a number from a string.\r\n * @param svalue the string value.\r\n * @param radix the radix (2 to 36).\r\n * @return the number.\r\n */\r\n public static fromRadixString(svalue: string, radix: int32): ALong {\r\n /* Check the radix */\r\n ASystem.assertNot((radix < 2) || (radix > 36), \"Invalid radix: \" + radix);\r\n /* Common values? */\r\n if (Strings.equals(svalue, \"0\")) return ALong.ZERO;\r\n if (Strings.equals(svalue, \"1\")) return ALong.ONE;\r\n /* Negative? */\r\n let neg: boolean = Strings.startsWith(svalue, \"-\");\r\n if (neg) svalue = Strings.substringFrom(svalue, 1);\r\n /* Add all digits */\r\n let result: ALong = ALong.ZERO;\r\n let unit: ALong = ALong.ONE;\r\n let radixHL: ALong = ALong.fromInt(radix);\r\n let slength: int32 = Strings.getLength(svalue);\r\n for (let i: number = 0; i < slength; i++) {\r\n /* Add the next digit */\r\n let charCode: int32 = Strings.charCodeAt(svalue, slength - 1 - i);\r\n let digit: int32 = (charCode >= 65) ? (charCode - 65 + 10) : (charCode - 48);\r\n if (digit > 0) result = result.add(unit.mulInt(digit));\r\n unit = unit.mul(radixHL);\r\n }\r\n /* Return the result */\r\n return (neg) ? result.negate() : result;\r\n }\r\n\r\n /**\r\n * Create a number from a decimal string.\r\n * @param value the string value.\r\n * @return the number.\r\n */\r\n public static fromString(value: string): ALong {\r\n if (value == null) return null;\r\n return ALong.fromRadixString(value, 10);\r\n }\r\n\r\n /**\r\n * Create a number from a hexadecimal string.\r\n * @param value the string value.\r\n * @return the number.\r\n */\r\n public static fromHexString(value: string): ALong {\r\n if (value == null) return null;\r\n return ALong.fromRadixString(value, 16);\r\n }\r\n\r\n /**\r\n * Convert the number to a string.\r\n * @param radix the radix (2 to 36).\r\n * @return the string.\r\n */\r\n public getRadixString(radix: int32): string {\r\n /* Check the radix */\r\n ASystem.assertNot((radix < 2) || (radix > 36), \"Invalid radix: \" + radix);\r\n /* Common values? */\r\n let value: ALong = this;\r\n if (value.isZero()) return \"0\";\r\n /* Make the value unsigned */\r\n let neg: boolean = value.isNegative();\r\n if (neg) value = value.negate();\r\n /* Add all digits */\r\n let result: string = \"\";\r\n while (true) {\r\n /* Add the next digit */\r\n if (value.isZero()) break;\r\n let digit: int32 = value.modInt(radix);\r\n value = value.divInt(radix);\r\n let sdigit: string = (digit < 10) ? Strings.charCodeToString(48 + digit) : Strings.charCodeToString(65 + digit - 10);\r\n result = (sdigit + result);\r\n /* Fail? */\r\n ASystem.assertNot(Strings.getLength(result) > 20, \"Failed to convert longHL to string (radix \" + radix + \"): \" + this._high + \";\" + this._low);\r\n }\r\n if (neg) result = (\"-\" + result);\r\n /* Return the result */\r\n return result;\r\n }\r\n\r\n /**\r\n * Convert the number to a decimal string.\r\n * @return the string.\r\n */\r\n public getString(): string {\r\n return this.getRadixString(10);\r\n }\r\n\r\n /**\r\n * Convert the number to a hexadecimal string.\r\n * @return the string.\r\n */\r\n public getHexString(): string {\r\n return this.getRadixString(16);\r\n }\r\n\r\n /**\r\n * The standard toString method.\r\n * @see Object#toString\r\n */\r\n public toString(): string {\r\n return this.getString();\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASystem.js","sourceRoot":"","sources":["../../../../src/system/runtime/ASystem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,gBAAgB;AAChB,MAAa,OAAO;IACR,MAAM,CAAC,KAAK,GAAW,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAEpD;IACA,CAAC;IAEM,MAAM,CAAC,OAAO,CAAC,SAAkB,EAAE,OAAe;QACrD,IAAI,SAAS,IAAI,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,GAAG,OAAO,CAAC,CAAC;IACzE,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,SAAkB,EAAE,OAAe;QACvD,IAAI,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,OAAO,CAAC,CAAC;IACnE,CAAC;IAEM,MAAM,CAAC,IAAI;QACd,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC,kBAAkB;IAC9E,CAAC;;AAhBL,0BAiBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n/**\n * Class ASystem defines low level capabilities of the runtime platform.\n */\n/** @internal */\nexport class ASystem {\n private static TIME0: number = new Date().getTime();\n\n private constructor() {\n }\n\n public static assert0(condition: boolean, message: string): void {\n if (condition == false) throw new Error(\"Assert failed: \" + message);\n }\n\n public static assertNot(condition: boolean, message: string): void {\n if (condition) throw new Error(\"AssertNot failed: \" + message);\n }\n\n public static time(): number {\n return (new Date().getTime() - ASystem.TIME0) / 1000.0; // time in seconds\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ASystem.js","sourceRoot":"","sources":["../../../../src/system/runtime/ASystem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,gBAAgB;AAChB,MAAa,OAAO;IACR,MAAM,CAAC,KAAK,GAAW,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAEpD;IACA,CAAC;IAEM,MAAM,CAAC,OAAO,CAAC,SAAkB,EAAE,OAAe;QACrD,IAAI,SAAS,IAAI,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,GAAG,OAAO,CAAC,CAAC;IACzE,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,SAAkB,EAAE,OAAe;QACvD,IAAI,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,OAAO,CAAC,CAAC;IACnE,CAAC;IAEM,MAAM,CAAC,IAAI;QACd,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC,kBAAkB;IAC9E,CAAC;;AAhBL,0BAiBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n/**\r\n * Class ASystem defines low level capabilities of the runtime platform.\r\n */\r\n/** @internal */\r\nexport class ASystem {\r\n private static TIME0: number = new Date().getTime();\r\n\r\n private constructor() {\r\n }\r\n\r\n public static assert0(condition: boolean, message: string): void {\r\n if (condition == false) throw new Error(\"Assert failed: \" + message);\r\n }\r\n\r\n public static assertNot(condition: boolean, message: string): void {\r\n if (condition) throw new Error(\"AssertNot failed: \" + message);\r\n }\r\n\r\n public static time(): number {\r\n return (new Date().getTime() - ASystem.TIME0) / 1000.0; // time in seconds\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Downloader.js","sourceRoot":"","sources":["../../../../src/system/runtime/Downloader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAaH;;GAEG;AACH,gBAAgB;AAChB,MAAa,UAAU;IACnB,mHAAmH;IAC5G,MAAM,CAAC,QAAQ,GAAe,IAAI,CAAC;IAE1C,0BAA0B;IAC1B,EAAE;IACF;IACA,CAAC;IAED,wBAAwB;IACxB,EAAE;IACK,KAAK,CAAC,aAAa,CAAC,MAAc,EAAE,UAAkB,EAAE,cAAiC,EAAE,QAAgB,EAAE,QAAiB,EAAE,eAAkC;QACrK,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kBAAkB;IAClB,EAAE;IACK,KAAK,CAAC,YAAY,CAAC,MAAc,EAAE,UAAkB,EAAE,cAAiC,EAAE,QAAgB,EAAE,QAAiB,EAAE,eAAkC;QACpK,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,0CAA0C;IAC1C,EAAE;IACK,KAAK,CAAC,aAAa,CAAC,UAAkB;QACzC,OAAO,IAAI,CAAC;IAChB,CAAC;;AAzBL,gCA0BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.system.runtime;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { ABuffer } from \"../buffer/ABuffer\";\nimport { StringMap } from \"../collection/StringMap\";\n\n/**\n * Class Downloader defines a platform independant download tool.\n */\n/** @internal */\nexport class Downloader {\n /** The default instance of this tool for this runtime. This needs to be set by the host application on startup. */\n public static INSTANCE: Downloader = null;\n\n // create a new downloader\n //\n public constructor() {\n }\n\n // download a byte array\n //\n public async downloadBytes(method: string, requestURL: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>): Promise<ABuffer> {\n return null;\n }\n\n // download a text\n //\n public async downloadText(method: string, requestURL: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>): Promise<string> {\n return null;\n }\n\n // download a text without request options\n //\n public async downloadText2(requestURL: string): Promise<string> {\n return null;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Downloader.js","sourceRoot":"","sources":["../../../../src/system/runtime/Downloader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAaH;;GAEG;AACH,gBAAgB;AAChB,MAAa,UAAU;IACnB,mHAAmH;IAC5G,MAAM,CAAC,QAAQ,GAAe,IAAI,CAAC;IAE1C,0BAA0B;IAC1B,EAAE;IACF;IACA,CAAC;IAED,wBAAwB;IACxB,EAAE;IACK,KAAK,CAAC,aAAa,CAAC,MAAc,EAAE,UAAkB,EAAE,cAAiC,EAAE,QAAgB,EAAE,QAAiB,EAAE,eAAkC;QACrK,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kBAAkB;IAClB,EAAE;IACK,KAAK,CAAC,YAAY,CAAC,MAAc,EAAE,UAAkB,EAAE,cAAiC,EAAE,QAAgB,EAAE,QAAiB,EAAE,eAAkC;QACpK,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,0CAA0C;IAC1C,EAAE;IACK,KAAK,CAAC,aAAa,CAAC,UAAkB;QACzC,OAAO,IAAI,CAAC;IAChB,CAAC;;AAzBL,gCA0BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.system.runtime;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { ABuffer } from \"../buffer/ABuffer\";\r\nimport { StringMap } from \"../collection/StringMap\";\r\n\r\n/**\r\n * Class Downloader defines a platform independant download tool.\r\n */\r\n/** @internal */\r\nexport class Downloader {\r\n /** The default instance of this tool for this runtime. This needs to be set by the host application on startup. */\r\n public static INSTANCE: Downloader = null;\r\n\r\n // create a new downloader\r\n //\r\n public constructor() {\r\n }\r\n\r\n // download a byte array\r\n //\r\n public async downloadBytes(method: string, requestURL: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>): Promise<ABuffer> {\r\n return null;\r\n }\r\n\r\n // download a text\r\n //\r\n public async downloadText(method: string, requestURL: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>): Promise<string> {\r\n return null;\r\n }\r\n\r\n // download a text without request options\r\n //\r\n public async downloadText2(requestURL: string): Promise<string> {\r\n return null;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloaderNode.js","sourceRoot":"","sources":["../../../../src/system/runtime/DownloaderNode.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,6BAA6B;AAC7B,+BAA+B;AAC/B,+CAA4C;AAC5C,uDAAoD;AACpD,6CAA0C;AAE1C;;GAEG;AACH,gBAAgB;AAChB,MAAa,cAAe,SAAQ,uBAAU;IAC1C,0BAA0B;IAC1B,EAAE;IACF;QACI,KAAK,EAAE,CAAC;IACZ,CAAC;IAED,8DAA8D;IAC9D,EAAE;IACM,MAAM,CAAC,UAAU,CAAC,OAAsB,EAAE,YAAoB;QAClE,yFAAyF;QACzF,IAAI,MAAM,GAAW,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,YAAY,KAAK,MAAM;YAAE,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC5D,OAAO,iBAAO,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9E,CAAC;IAED,0BAA0B;IAC1B,EAAE;IACM,SAAS,CAAC,MAAc,EAAE,UAAkB,EAAE,YAAoB,EAAE,cAAiC,EAAE,QAAgB,EAAE,QAAiB,EAAE,eAAkC,EAAE,QAAiC,EAAE,aAAiC;QACxP,mBAAmB;QACnB,IAAI,MAAM,IAAI,IAAI;YAAE,MAAM,GAAG,KAAK,CAAC;QACnC,IAAI,cAAc,IAAI,IAAI;YAAE,cAAc,GAAG,IAAI,qBAAS,EAAU,CAAC;QACrE,kBAAkB;QAClB,iEAAiE;QACjE,IAAI,OAAO,GAAW,EAAE,CAAC;QACzB,OAAO,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;QAC3B,cAAc;QACd,IAAI,GAAG,GAAQ,IAAI,G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AgB,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3L,CAAC;IAED,wCAAwC;IACxC,EAAE;IACc,KAAK,CAAC,aAAa,CAAC,UAAkB;QAClD,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9E,CAAC;CACJ;AA1GD,wCA0GC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\nimport * as http from \"http\";\nimport * as https from \"https\";\nimport { ABuffer } from \"../buffer/ABuffer\";\nimport { StringMap } from \"../collection/StringMap\";\nimport { Downloader } from \"./Downloader\";\n\n/**\n * Class DownloaderNode implements a downloader using the Node platform.\n */\n/** @internal */\nexport class DownloaderNode extends Downloader {\n // create a new downloader\n //\n public constructor() {\n super();\n }\n\n // join the downloaded chunks into the requested response type\n //\n private static joinChunks(buffers: Array<Buffer>, responseType: string): any {\n //console.log(\"joining \"+buffers.length+\" downloaded chunks to type '\"+responseType+\"'\");\n let joined: Buffer = Buffer.concat(buffers);\n if (responseType === \"text\") return joined.toString('utf8');\n return ABuffer.wrapRange(joined.buffer, joined.byteOffset, joined.length);\n }\n\n // make a generic download\n //\n private download0(method: string, requestURL: string, responseType: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>, callback: (response: any) => void, errorCallback: (err: any) => void): void {\n // set the defaults\n if (method == null) method = \"GET\";\n if (requestHeaders == null) requestHeaders = new StringMap<string>();\n // set the options\n //console.log(\"connect method '\"+method+\"' to '\"+requestURL+\"'\");\n let options: object = {};\n options[\"method\"] = method;\n // set the URL\n let url: URL = new URL(requestURL);\n options[\"protocol\"] = url.protocol;\n options[\"host\"] = url.hostname;\n options[\"port\"] = url.port;\n options[\"path\"] = url.pathname + url.search;\n // set the request headers\n if (requestHeaders.size() > 0) {\n // create the headers object\n //console.log(\"adding request headers\");\n let headers: object = {};\n options[\"headers\"] = headers;\n // add the header lines\n for (let headerName of requestHeaders.keys()) {\n let headerValue: string = requestHeaders.get(headerName);\n //console.log(\"setting request header '\"+headerName+\"' value '\"+headerValue+\"'\");\n headers[headerName] = headerValue;\n }\n }\n // make the request\n let request: http.ClientRequest;\n if (url.protocol === \"http:\") request = http.request(options, (response) => {\n //console.log(\"download '\"+requestURL+\"' response code: \"+response.statusCode);\n if (responseHeaders != null) {\n for (let propertyName in response.headers) {\n if (typeof response.headers[propertyName] === \"string\") responseHeaders.set(propertyName, response.headers[propertyName] as string);\n }\n }\n // process the incoming download chuncks\n let chunks: Array<Buffer> = [];\n response.on(\"data\", data => { chunks.push(data); });\n response.on(\"end\", () => { callback(DownloaderNode.joinChunks(chunks, responseType)); });\n response.on(\"error\", () => { errorCallback(\"error when downloading '\" + requestURL + \"'\"); });\n })\n else request = https.request(options, (response) => {\n //console.log(\"download '\"+requestURL+\"' response code: \"+response.statusCode);\n if (responseHeaders != null) {\n for (let propertyName in response.headers) {\n if (typeof response.headers[propertyName] === \"string\") responseHeaders.set(propertyName, response.headers[propertyName] as string);\n }\n }\n // process the incoming download chuncks\n let chunks: Array<Buffer> = [];\n response.on(\"data\", data => { chunks.push(data); });\n response.on(\"end\", () => { callback(DownloaderNode.joinChunks(chunks, responseType)); });\n response.on(\"error\", () => { errorCallback(\"error when downloading '\" + requestURL + \"'\"); });\n });\n // post text?\n if (postText != null) {\n // send the request to the server\n //console.log(\"posting text '\"+postText+\"'\");\n request.write(postText); // encoding argument is optional, defaults to 'utf8'\n }\n // post data?\n else if (postData != null) {\n // send the request to the server\n //console.log(\"posting binary data, size \"+postData.size());\n request.write(Buffer.from(postData.toNativeBuffer()));\n }\n // send the request\n request.end();\n }\n\n // Downloader base class method override\n //\n public override async downloadBytes(method: string, requestURL: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>): Promise<ABuffer> {\n return new Promise<ABuffer>((resolve, reject) => { this.download0(method, requestURL, \"arraybuffer\"/*responseType*/, requestHeaders, postText, postData, responseHeaders, resolve, reject); });\n }\n\n // Downloader base class method override\n //\n public override async downloadText(method: string, requestURL: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>): Promise<string> {\n return new Promise<string>((resolve, reject) => { this.download0(method, requestURL, \"text\"/*responseType*/, requestHeaders, postText, postData, responseHeaders, resolve, reject); });\n }\n\n // Downloader base class method override\n //\n public override async downloadText2(requestURL: string): Promise<string> {\n return await this.downloadText(\"GET\", requestURL, null, null, null, null);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DownloaderNode.js","sourceRoot":"","sources":["../../../../src/system/runtime/DownloaderNode.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,6BAA6B;AAC7B,+BAA+B;AAC/B,+CAA4C;AAC5C,uDAAoD;AACpD,6CAA0C;AAE1C;;GAEG;AACH,gBAAgB;AAChB,MAAa,cAAe,SAAQ,uBAAU;IAC1C,0BAA0B;IAC1B,EAAE;IACF;QACI,KAAK,EAAE,CAAC;IACZ,CAAC;IAED,8DAA8D;IAC9D,EAAE;IACM,MAAM,CAAC,UAAU,CAAC,OAAsB,EAAE,YAAoB;QAClE,yFAAyF;QACzF,IAAI,MAAM,GAAW,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,YAAY,KAAK,MAAM;YAAE,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC5D,OAAO,iBAAO,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9E,CAAC;IA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AAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,CAAA,gBAAgB,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnM,CAAC;IAED,wCAAwC;IACxC,EAAE;IACc,KAAK,CAAC,YAAY,CAAC,MAAc,EAAE,UAAkB,EAAE,cAAiC,EAAE,QAAgB,EAAE,QAAiB,EAAE,eAAkC;QAC7K,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAA,gBAAgB,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3L,CAAC;IAED,wCAAwC;IACxC,EAAE;IACc,KAAK,CAAC,aAAa,CAAC,UAAkB;QAClD,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9E,CAAC;CACJ;AA1GD,wCA0GC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\nimport * as http from \"http\";\r\nimport * as https from \"https\";\r\nimport { ABuffer } from \"../buffer/ABuffer\";\r\nimport { StringMap } from \"../collection/StringMap\";\r\nimport { Downloader } from \"./Downloader\";\r\n\r\n/**\r\n * Class DownloaderNode implements a downloader using the Node platform.\r\n */\r\n/** @internal */\r\nexport class DownloaderNode extends Downloader {\r\n // create a new downloader\r\n //\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // join the downloaded chunks into the requested response type\r\n //\r\n private static joinChunks(buffers: Array<Buffer>, responseType: string): any {\r\n //console.log(\"joining \"+buffers.length+\" downloaded chunks to type '\"+responseType+\"'\");\r\n let joined: Buffer = Buffer.concat(buffers);\r\n if (responseType === \"text\") return joined.toString('utf8');\r\n return ABuffer.wrapRange(joined.buffer, joined.byteOffset, joined.length);\r\n }\r\n\r\n // make a generic download\r\n //\r\n private download0(method: string, requestURL: string, responseType: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>, callback: (response: any) => void, errorCallback: (err: any) => void): void {\r\n // set the defaults\r\n if (method == null) method = \"GET\";\r\n if (requestHeaders == null) requestHeaders = new StringMap<string>();\r\n // set the options\r\n //console.log(\"connect method '\"+method+\"' to '\"+requestURL+\"'\");\r\n let options: object = {};\r\n options[\"method\"] = method;\r\n // set the URL\r\n let url: URL = new URL(requestURL);\r\n options[\"protocol\"] = url.protocol;\r\n options[\"host\"] = url.hostname;\r\n options[\"port\"] = url.port;\r\n options[\"path\"] = url.pathname + url.search;\r\n // set the request headers\r\n if (requestHeaders.size() > 0) {\r\n // create the headers object\r\n //console.log(\"adding request headers\");\r\n let headers: object = {};\r\n options[\"headers\"] = headers;\r\n // add the header lines\r\n for (let headerName of requestHeaders.keys()) {\r\n let headerValue: string = requestHeaders.get(headerName);\r\n //console.log(\"setting request header '\"+headerName+\"' value '\"+headerValue+\"'\");\r\n headers[headerName] = headerValue;\r\n }\r\n }\r\n // make the request\r\n let request: http.ClientRequest;\r\n if (url.protocol === \"http:\") request = http.request(options, (response) => {\r\n //console.log(\"download '\"+requestURL+\"' response code: \"+response.statusCode);\r\n if (responseHeaders != null) {\r\n for (let propertyName in response.headers) {\r\n if (typeof response.headers[propertyName] === \"string\") responseHeaders.set(propertyName, response.headers[propertyName] as string);\r\n }\r\n }\r\n // process the incoming download chuncks\r\n let chunks: Array<Buffer> = [];\r\n response.on(\"data\", data => { chunks.push(data); });\r\n response.on(\"end\", () => { callback(DownloaderNode.joinChunks(chunks, responseType)); });\r\n response.on(\"error\", () => { errorCallback(\"error when downloading '\" + requestURL + \"'\"); });\r\n })\r\n else request = https.request(options, (response) => {\r\n //console.log(\"download '\"+requestURL+\"' response code: \"+response.statusCode);\r\n if (responseHeaders != null) {\r\n for (let propertyName in response.headers) {\r\n if (typeof response.headers[propertyName] === \"string\") responseHeaders.set(propertyName, response.headers[propertyName] as string);\r\n }\r\n }\r\n // process the incoming download chuncks\r\n let chunks: Array<Buffer> = [];\r\n response.on(\"data\", data => { chunks.push(data); });\r\n response.on(\"end\", () => { callback(DownloaderNode.joinChunks(chunks, responseType)); });\r\n response.on(\"error\", () => { errorCallback(\"error when downloading '\" + requestURL + \"'\"); });\r\n });\r\n // post text?\r\n if (postText != null) {\r\n // send the request to the server\r\n //console.log(\"posting text '\"+postText+\"'\");\r\n request.write(postText); // encoding argument is optional, defaults to 'utf8'\r\n }\r\n // post data?\r\n else if (postData != null) {\r\n // send the request to the server\r\n //console.log(\"posting binary data, size \"+postData.size());\r\n request.write(Buffer.from(postData.toNativeBuffer()));\r\n }\r\n // send the request\r\n request.end();\r\n }\r\n\r\n // Downloader base class method override\r\n //\r\n public override async downloadBytes(method: string, requestURL: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>): Promise<ABuffer> {\r\n return new Promise<ABuffer>((resolve, reject) => { this.download0(method, requestURL, \"arraybuffer\"/*responseType*/, requestHeaders, postText, postData, responseHeaders, resolve, reject); });\r\n }\r\n\r\n // Downloader base class method override\r\n //\r\n public override async downloadText(method: string, requestURL: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>): Promise<string> {\r\n return new Promise<string>((resolve, reject) => { this.download0(method, requestURL, \"text\"/*responseType*/, requestHeaders, postText, postData, responseHeaders, resolve, reject); });\r\n }\r\n\r\n // Downloader base class method override\r\n //\r\n public override async downloadText2(requestURL: string): Promise<string> {\r\n return await this.downloadText(\"GET\", requestURL, null, null, null, null);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloaderXhr.js","sourceRoot":"","sources":["../../../../src/system/runtime/DownloaderXhr.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+CAA4C;AAC5C,uDAAoD;AACpD,6CAA0C;AAE1C;;GAEG;AACH,gBAAgB;AAChB,MAAa,aAAc,SAAQ,uBAAU;IAC5C,0BAA0B;IAC1B,EAAE;IACF;QACC,KAAK,EAAE,CAAC;IACT,CAAC;IAED,4BAA4B;IAC5B,EAAE;IACM,MAAM,CAAC,mBAAmB,CAAC,OAAuB,EAAE,eAAkC;QAC7F,2CAA2C;QAC3C,MAAM,WAAW,GAAkB,OAAO,CAAC,qBAAqB,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC3F,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACtC,MAAM,KAAK,GAAkB,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,IAAI,GAAW,KAAK,CAAC,CAAC,CAAC,CAAC;YAC9B,MAAM,KAAK,GAAW,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACtD,eAAe,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACjC,+DAA+D;QAChE,CAAC;IACF,CAAC;IAED,0BAA0B;IAC1B,EAAE;IACM,SAAS,CAAC,MAAc,EAAE,UAAkB,EAAE,YAAoB,EAAE,cAAiC,EAAE,QAAgB,EAAE,QAAiB,EAAE,eAAkC,EAAE,QAAiC,EAAE,aAAiC;QAC3P,mBAAmB;QACnB,IAAI,MAAM,IAAI,IAAI;YAAE,MAAM,GAAG,KAAK,CAAC;QACnC,IAAI,cAAc,IAAI,IAAI;YAAE,cAAc,GAAG,IAAI,qBAAS,EAAU,CAAC;QACrE,qBAAq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AAE,eAAe,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjM,CAAC;IAED,wCAAwC;IACxC,EAAE;IACc,KAAK,CAAC,YAAY,CAAC,MAAc,EAAE,UAAkB,EAAE,cAAiC,EAAE,QAAgB,EAAE,QAAiB,EAAE,eAAkC;QAChL,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAA,iBAAiB,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzL,CAAC;IAED,wCAAwC;IACxC,EAAE;IACc,KAAK,CAAC,aAAa,CAAC,UAAkB;QACrD,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;CACD;AAzGD,sCAyGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\nimport { ABuffer } from \"../buffer/ABuffer\";\nimport { StringMap } from \"../collection/StringMap\";\nimport { Downloader } from \"./Downloader\";\n\n/**\n * Class DownloaderXhr implements a downloader using an XmlHttpRequest (XHR).\n */\n/** @internal */\nexport class DownloaderXhr extends Downloader {\n\t// create a new downloader\n\t//\n\tpublic constructor() {\n\t\tsuper();\n\t}\n\n\t// read the response headers\n\t//\n\tprivate static readResponseHeaders(request: XMLHttpRequest, responseHeaders: StringMap<string>): void {\n\t\t// console.log(\"reading response headers\");\n\t\tconst headerLines: Array<string> = request.getAllResponseHeaders().trim().split(/[\\r\\n]+/);\n\t\tfor (const headerLine of headerLines) {\n\t\t\tconst parts: Array<string> = headerLine.split(\": \");\n\t\t\tconst name: string = parts[0];\n\t\t\tconst value: string = request.getResponseHeader(name);\n\t\t\tresponseHeaders.set(name, value);\n\t\t\t// console.log(\"response header '\"+name+\"' value '\"+value+\"'\");\n\t\t}\n\t}\n\n\t// make a generic download\n\t//\n\tprivate download0(method: string, requestURL: string, responseType: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>, callback: (response: any) => void, errorCallback: (err: any) => void): void {\n\t\t// set the defaults\n\t\tif (method == null) method = \"GET\";\n\t\tif (requestHeaders == null) requestHeaders = new StringMap<string>();\n\t\t// create the request\n\t\t// console.log(\"connect method '\"+method+\"' to '\"+requestURL+\"'\");\n\t\tconst request: XMLHttpRequest = new XMLHttpRequest();\n\t\trequest.open(method, requestURL);\n\t\t// set the request headers\n\t\tfor (const headerName of requestHeaders.keys()) {\n\t\t\tconst headerValue: string = requestHeaders.get(headerName);\n\t\t\trequest.setRequestHeader(headerName, headerValue);\n\t\t\t// console.log(\"setting request header '\"+headerName+\"' value '\"+headerValue+\"'\");\n\t\t}\n\t\t// set the response type?\n\t\tif (responseType != null) {\n\t\t\t// either \"arraybuffer\" or \"blob\" or \"document\" or \"json\" or \"text\"\n\t\t\tif (responseType == \"bytes\") request.responseType = \"arraybuffer\";\n\t\t\tif (responseType == \"arraybuffer\") request.responseType = \"arraybuffer\";\n\t\t\tif (responseType == \"blob\") request.responseType = \"blob\";\n\t\t\tif (responseType == \"json\") request.responseType = \"json\";\n\t\t\tif (responseType == \"text\") request.responseType = \"text\";\n\t\t\t// console.log(\"response type '\"+request.responseType+\"'\");\n\t\t}\n\t\t// set the response handler\n\t\trequest.onload = function () {\n\t\t\t// valid response?\n\t\t\t// console.log(\"download '\"+requestURL+\"' response code: \"+this.status);\n\t\t\tif (this.status >= 200 && this.status < 400) {\n\t\t\t\t// read the response headers?\n\t\t\t\tif (responseHeaders != null) DownloaderXhr.readResponseHeaders(this, responseHeaders);\n\t\t\t\t// read the reponse body\n\t\t\t\tif (this.responseType == \"arraybuffer\") callback(ABuffer.wrap(this.response));\n\t\t\t\telse callback(this.responseText);\n\t\t\t} else {\n\t\t\t\t// invalid response\n\t\t\t\t// console.log(\"> error code, so no response\");\n\t\t\t\tcallback(null);\n\t\t\t}\n\t\t};\n\t\t// set the error handler\n\t\trequest.onerror = function (err) {\n\t\t\tconsole.error(`download '${requestURL}' error: ${err}`);\n\t\t\terrorCallback(err);\n\t\t};\n\t\t// post text?\n\t\tif (postText != null) {\n\t\t\t// send the request to the server\n\t\t\t// console.log(\"posting text '\"+postText+\"'\");\n\t\t\trequest.setRequestHeader(\"Content-Type\", \"text/plain\");\n\t\t\trequest.send(postText);\n\t\t}\n\t\t// post data?\n\t\telse if (postData != null) {\n\t\t\t// send the request to the server\n\t\t\t// console.log(\"posting binary data, size \"+postData.size());\n\t\t\trequest.setRequestHeader(\"Content-Type\", \"application/octet-stream\");\n\t\t\trequest.send(postData.toNativeBuffer());\n\t\t} else {\n\t\t\t// send the request to the server\n\t\t\t// console.log(\"sending request\");\n\t\t\trequest.send(null);\n\t\t}\n\t}\n\n\t// Downloader base class method override\n\t//\n\tpublic override async downloadBytes(method: string, requestURL: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>): Promise<ABuffer> {\n\t\treturn new Promise<ABuffer>((resolve, reject) => { this.download0(method, requestURL, \"arraybuffer\"/* responseType*/, requestHeaders, postText, postData, responseHeaders, resolve, reject); });\n\t}\n\n\t// Downloader base class method override\n\t//\n\tpublic override async downloadText(method: string, requestURL: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>): Promise<string> {\n\t\treturn new Promise<string>((resolve, reject) => { this.download0(method, requestURL, \"text\"/* responseType*/, requestHeaders, postText, postData, responseHeaders, resolve, reject); });\n\t}\n\n\t// Downloader base class method override\n\t//\n\tpublic override async downloadText2(requestURL: string): Promise<string> {\n\t\treturn await this.downloadText(\"GET\", requestURL, null, null, null, null);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DownloaderXhr.js","sourceRoot":"","sources":["../../../../src/system/runtime/DownloaderXhr.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+CAA4C;AAC5C,uDAAoD;AACpD,6CAA0C;AAE1C;;GAEG;AACH,gBAAgB;AAChB,MAAa,aAAc,SAAQ,uBAAU;IAC5C,0BAA0B;IAC1B,EAAE;IACF;QACC,KAAK,EAAE,CAAC;IACT,CAAC;IAED,4BAA4B;IAC5B,EAAE;IACM,MAAM,CAAC,mBAAmB,CAAC,OAAuB,EAAE,eAAkC;QAC7F,2CAA2C;QAC3C,MAAM,WAAW,GAAkB,OAAO,CAAC,qBAAqB,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC3F,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACtC,MAAM,KAAK,GAAkB,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,IAAI,GAAW,KAAK,CAAC,CAAC,CAAC,CAAC;YAC9B,MAAM,KAAK,GAAW,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACtD,eAAe,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACjC,+DAA+D;QAChE,CAAC;IACF,CAAC;IAED,0BAA0B;IAC1B,EAAE;IACM,SAAS,CAAC,MAAc,EAAE,UAAkB,EAAE,YAAoB,EAAE,cAAiC,EAAE,QAAgB,EAAE,QAAiB,EAAE,eAAkC,EAAE,QAAiC,EAAE,aAAiC;QAC3P,mBAAmB;QACnB,IAAI,MAAM,IAAI,IAAI;YAAE,MAAM,GAAG,KAAK,CAAC;QACnC,IAAI,cAAc,IAAI,IAAI;YAAE,cAAc,GAAG,IAAI,qBAAS,EAAU,CAAC;QACrE,qBAAqB;QACrB,kEAAkE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,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjM,CAAC;IAED,wCAAwC;IACxC,EAAE;IACc,KAAK,CAAC,YAAY,CAAC,MAAc,EAAE,UAAkB,EAAE,cAAiC,EAAE,QAAgB,EAAE,QAAiB,EAAE,eAAkC;QAChL,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAA,iBAAiB,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzL,CAAC;IAED,wCAAwC;IACxC,EAAE;IACc,KAAK,CAAC,aAAa,CAAC,UAAkB;QACrD,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;CACD;AAzGD,sCAyGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\nimport { ABuffer } from \"../buffer/ABuffer\";\r\nimport { StringMap } from \"../collection/StringMap\";\r\nimport { Downloader } from \"./Downloader\";\r\n\r\n/**\r\n * Class DownloaderXhr implements a downloader using an XmlHttpRequest (XHR).\r\n */\r\n/** @internal */\r\nexport class DownloaderXhr extends Downloader {\r\n\t// create a new downloader\r\n\t//\r\n\tpublic constructor() {\r\n\t\tsuper();\r\n\t}\r\n\r\n\t// read the response headers\r\n\t//\r\n\tprivate static readResponseHeaders(request: XMLHttpRequest, responseHeaders: StringMap<string>): void {\r\n\t\t// console.log(\"reading response headers\");\r\n\t\tconst headerLines: Array<string> = request.getAllResponseHeaders().trim().split(/[\\r\\n]+/);\r\n\t\tfor (const headerLine of headerLines) {\r\n\t\t\tconst parts: Array<string> = headerLine.split(\": \");\r\n\t\t\tconst name: string = parts[0];\r\n\t\t\tconst value: string = request.getResponseHeader(name);\r\n\t\t\tresponseHeaders.set(name, value);\r\n\t\t\t// console.log(\"response header '\"+name+\"' value '\"+value+\"'\");\r\n\t\t}\r\n\t}\r\n\r\n\t// make a generic download\r\n\t//\r\n\tprivate download0(method: string, requestURL: string, responseType: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>, callback: (response: any) => void, errorCallback: (err: any) => void): void {\r\n\t\t// set the defaults\r\n\t\tif (method == null) method = \"GET\";\r\n\t\tif (requestHeaders == null) requestHeaders = new StringMap<string>();\r\n\t\t// create the request\r\n\t\t// console.log(\"connect method '\"+method+\"' to '\"+requestURL+\"'\");\r\n\t\tconst request: XMLHttpRequest = new XMLHttpRequest();\r\n\t\trequest.open(method, requestURL);\r\n\t\t// set the request headers\r\n\t\tfor (const headerName of requestHeaders.keys()) {\r\n\t\t\tconst headerValue: string = requestHeaders.get(headerName);\r\n\t\t\trequest.setRequestHeader(headerName, headerValue);\r\n\t\t\t// console.log(\"setting request header '\"+headerName+\"' value '\"+headerValue+\"'\");\r\n\t\t}\r\n\t\t// set the response type?\r\n\t\tif (responseType != null) {\r\n\t\t\t// either \"arraybuffer\" or \"blob\" or \"document\" or \"json\" or \"text\"\r\n\t\t\tif (responseType == \"bytes\") request.responseType = \"arraybuffer\";\r\n\t\t\tif (responseType == \"arraybuffer\") request.responseType = \"arraybuffer\";\r\n\t\t\tif (responseType == \"blob\") request.responseType = \"blob\";\r\n\t\t\tif (responseType == \"json\") request.responseType = \"json\";\r\n\t\t\tif (responseType == \"text\") request.responseType = \"text\";\r\n\t\t\t// console.log(\"response type '\"+request.responseType+\"'\");\r\n\t\t}\r\n\t\t// set the response handler\r\n\t\trequest.onload = function () {\r\n\t\t\t// valid response?\r\n\t\t\t// console.log(\"download '\"+requestURL+\"' response code: \"+this.status);\r\n\t\t\tif (this.status >= 200 && this.status < 400) {\r\n\t\t\t\t// read the response headers?\r\n\t\t\t\tif (responseHeaders != null) DownloaderXhr.readResponseHeaders(this, responseHeaders);\r\n\t\t\t\t// read the reponse body\r\n\t\t\t\tif (this.responseType == \"arraybuffer\") callback(ABuffer.wrap(this.response));\r\n\t\t\t\telse callback(this.responseText);\r\n\t\t\t} else {\r\n\t\t\t\t// invalid response\r\n\t\t\t\t// console.log(\"> error code, so no response\");\r\n\t\t\t\tcallback(null);\r\n\t\t\t}\r\n\t\t};\r\n\t\t// set the error handler\r\n\t\trequest.onerror = function (err) {\r\n\t\t\tconsole.error(`download '${requestURL}' error: ${err}`);\r\n\t\t\terrorCallback(err);\r\n\t\t};\r\n\t\t// post text?\r\n\t\tif (postText != null) {\r\n\t\t\t// send the request to the server\r\n\t\t\t// console.log(\"posting text '\"+postText+\"'\");\r\n\t\t\trequest.setRequestHeader(\"Content-Type\", \"text/plain\");\r\n\t\t\trequest.send(postText);\r\n\t\t}\r\n\t\t// post data?\r\n\t\telse if (postData != null) {\r\n\t\t\t// send the request to the server\r\n\t\t\t// console.log(\"posting binary data, size \"+postData.size());\r\n\t\t\trequest.setRequestHeader(\"Content-Type\", \"application/octet-stream\");\r\n\t\t\trequest.send(postData.toNativeBuffer());\r\n\t\t} else {\r\n\t\t\t// send the request to the server\r\n\t\t\t// console.log(\"sending request\");\r\n\t\t\trequest.send(null);\r\n\t\t}\r\n\t}\r\n\r\n\t// Downloader base class method override\r\n\t//\r\n\tpublic override async downloadBytes(method: string, requestURL: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>): Promise<ABuffer> {\r\n\t\treturn new Promise<ABuffer>((resolve, reject) => { this.download0(method, requestURL, \"arraybuffer\"/* responseType*/, requestHeaders, postText, postData, responseHeaders, resolve, reject); });\r\n\t}\r\n\r\n\t// Downloader base class method override\r\n\t//\r\n\tpublic override async downloadText(method: string, requestURL: string, requestHeaders: StringMap<string>, postText: string, postData: ABuffer, responseHeaders: StringMap<string>): Promise<string> {\r\n\t\treturn new Promise<string>((resolve, reject) => { this.download0(method, requestURL, \"text\"/* responseType*/, requestHeaders, postText, postData, responseHeaders, resolve, reject); });\r\n\t}\r\n\r\n\t// Downloader base class method override\r\n\t//\r\n\tpublic override async downloadText2(requestURL: string): Promise<string> {\r\n\t\treturn await this.downloadText(\"GET\", requestURL, null, null, null, null);\r\n\t}\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../../src/system/runtime/Message.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,gBAAgB;AAChB,MAAa,OAAO;IAChB,sDAAsD;IAC/C,MAAM,CAAC,OAAO,GAAY,KAAK,CAAC;IAEvC;IACA,CAAC;IAEM,MAAM,CAAC,GAAG,CAAC,OAAe;QAC7B,IAAI,OAAO,CAAC,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,MAAc,EAAE,OAAe;QAC/C,IAAI,OAAO,CAAC,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;IAC/D,CAAC;IAEM,MAAM,CAAC,YAAY,CAAC,MAAc,EAAE,OAAe;QACtD,IAAI,OAAO,CAAC,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;IAC7E,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,MAAc,EAAE,SAAc,EAAE,OAAe;QACpE,IAAI,OAAO,CAAC,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;QACvE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;IAC9E,CAAC;;AAtBL,0BAuBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n/**\n * Class Message prints debug, information, warning and error messages to the console.\n */\n/** @internal */\nexport class Message {\n /** Disabled by default, enable to see all messages */\n public static DISPLAY: boolean = false;\n\n private constructor() {\n }\n\n public static log(message: string): void {\n if (Message.DISPLAY) console.log(message);\n }\n\n public static print(module: string, message: string): void {\n if (Message.DISPLAY) console.log(module + \" : \" + message);\n }\n\n public static printWarning(module: string, message: string): void {\n if (Message.DISPLAY) console.log(\"WARNING: \" + module + \" : \" + message);\n }\n\n public static printError(module: string, exception: any, message: string): void {\n if (Message.DISPLAY) console.log(\"ERROR: \" + module + \" : \" + message);\n if ((Message.DISPLAY) && (exception != null)) console.log(\"\" + exception);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../../src/system/runtime/Message.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,gBAAgB;AAChB,MAAa,OAAO;IAChB,sDAAsD;IAC/C,MAAM,CAAC,OAAO,GAAY,KAAK,CAAC;IAEvC;IACA,CAAC;IAEM,MAAM,CAAC,GAAG,CAAC,OAAe;QAC7B,IAAI,OAAO,CAAC,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,MAAc,EAAE,OAAe;QAC/C,IAAI,OAAO,CAAC,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;IAC/D,CAAC;IAEM,MAAM,CAAC,YAAY,CAAC,MAAc,EAAE,OAAe;QACtD,IAAI,OAAO,CAAC,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;IAC7E,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,MAAc,EAAE,SAAc,EAAE,OAAe;QACpE,IAAI,OAAO,CAAC,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;QACvE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;IAC9E,CAAC;;AAtBL,0BAuBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n/**\r\n * Class Message prints debug, information, warning and error messages to the console.\r\n */\r\n/** @internal */\r\nexport class Message {\r\n /** Disabled by default, enable to see all messages */\r\n public static DISPLAY: boolean = false;\r\n\r\n private constructor() {\r\n }\r\n\r\n public static log(message: string): void {\r\n if (Message.DISPLAY) console.log(message);\r\n }\r\n\r\n public static print(module: string, message: string): void {\r\n if (Message.DISPLAY) console.log(module + \" : \" + message);\r\n }\r\n\r\n public static printWarning(module: string, message: string): void {\r\n if (Message.DISPLAY) console.log(\"WARNING: \" + module + \" : \" + message);\r\n }\r\n\r\n public static printError(module: string, exception: any, message: string): void {\r\n if (Message.DISPLAY) console.log(\"ERROR: \" + module + \" : \" + message);\r\n if ((Message.DISPLAY) && (exception != null)) console.log(\"\" + exception);\r\n }\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MAAM,CAAC;IAC1D,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,KAAa,EAAE,YAAqB;QACxD,IAAI,KAAK,IAAI,SAAS;YAAE,OAAO,YAAY,CAAC;QAC5C,IAAI,KAAK,IAAI,IAAI;YAAE,OAAO,YAAY,CAAC;QACvC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;YAAE,OAAO,YAAY,CAAC;QAC3C,IAAI,MAAM,GAAY,UAAU,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1D,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,KAAY;QAClC,IAAI,CAAC,GAAU,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;QACpC,IAAI,CAAC,GAAU,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;QACnC,IAAI,CAAC,GAAU,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;QACnC,OAAO,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;IACtC,CAAC;;AA7EL,0BA8EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { ALong } from \"./ALong\";\n\n/**\n * Class Numbers defines the common numerical tools.\n */\n/** @internal */\nexport class Numbers {\n /** The static byte buffer for number format conversions */\n private static readonly BUFFER1: ArrayBuffer = new ArrayBuffer(8);\n private static readonly I8_BUFFER1: Int8Array = new Int8Array(Numbers.BUFFER1);\n private static readonly I32_BUFFER1: Int32Array = new Int32Array(Numbers.BUFFER1);\n private static readonly F32_BUFFER1: Float32Array = new Float32Array(Numbers.BUFFER1);\n private static readonly F64_BUFFER1: Float64Array = new Float64Array(Numbers.BUFFER1);\n\n private constructor() {\n }\n\n public static sqrt(value: float64): float64 {\n return Math.sqrt(value);\n }\n\n public static floor(value: float64): float64 {\n return Math.floor(value);\n }\n\n public static intFloor(value: float64): int32 {\n return Math.floor(value);\n }\n\n public static divInt(value1: int32, value2: int32): int32 {\n return Math.trunc(value1 / value2);\n }\n\n public static intBitsToFloat(value: int32): float32 {\n Numbers.I32_BUFFER1[0] = value;\n return Numbers.F32_BUFFER1[0];\n }\n\n public static floatToIntBits(value: float32): int32 {\n Numbers.F32_BUFFER1[0] = value;\n return Numbers.I32_BUFFER1[0];\n }\n\n public static longBitsToDouble(value: ALong): float64 {\n Numbers.I32_BUFFER1[0] = value.getLow();\n Numbers.I32_BUFFER1[1] = value.getHigh();\n return Numbers.F64_BUFFER1[0];\n }\n\n public static doubleToLongBits(value: float64): ALong {\n Numbers.F64_BUFFER1[0] = value;\n return ALong.fromHighLow(Numbers.I32_BUFFER1[1], Numbers.I32_BUFFER1[0]);\n }\n\n public static intToDouble(value: int32): float64 {\n return value;\n }\n\n public static doubleToInt(value: float64): int32 {\n return Math.floor(value);\n }\n\n public static getInteger(value: string, defaultValue: int32): int32 {\n if (value == undefined) return defaultValue;\n if (value == null) return defaultValue;\n if (value.length == 0) return defaultValue;\n let parsed: int32 = parseInt(value);\n return (Number.isNaN(parsed)) ? defaultValue : parsed;\n }\n\n public static getDouble(value: string, defaultValue: float64): float64 {\n if (value == undefined) return defaultValue;\n if (value == null) return defaultValue;\n if (value.length == 0) return defaultValue;\n let parsed: float64 = parseFloat(value);\n return (Number.isNaN(parsed)) ? defaultValue : parsed;\n }\n\n public static rgbToString(color: int32): string {\n let r: int32 = (color >> 16) & 0xFF;\n let g: int32 = (color >> 8) & 0xFF;\n let b: int32 = (color >> 0) & 0xFF;\n return \"\"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AAM,CAAC;IAC1D,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,KAAa,EAAE,YAAqB;QACxD,IAAI,KAAK,IAAI,SAAS;YAAE,OAAO,YAAY,CAAC;QAC5C,IAAI,KAAK,IAAI,IAAI;YAAE,OAAO,YAAY,CAAC;QACvC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;YAAE,OAAO,YAAY,CAAC;QAC3C,IAAI,MAAM,GAAY,UAAU,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1D,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,KAAY;QAClC,IAAI,CAAC,GAAU,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;QACpC,IAAI,CAAC,GAAU,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;QACnC,IAAI,CAAC,GAAU,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;QACnC,OAAO,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;IACtC,CAAC;;AA7EL,0BA8EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { ALong } from \"./ALong\";\r\n\r\n/**\r\n * Class Numbers defines the common numerical tools.\r\n */\r\n/** @internal */\r\nexport class Numbers {\r\n /** The static byte buffer for number format conversions */\r\n private static readonly BUFFER1: ArrayBuffer = new ArrayBuffer(8);\r\n private static readonly I8_BUFFER1: Int8Array = new Int8Array(Numbers.BUFFER1);\r\n private static readonly I32_BUFFER1: Int32Array = new Int32Array(Numbers.BUFFER1);\r\n private static readonly F32_BUFFER1: Float32Array = new Float32Array(Numbers.BUFFER1);\r\n private static readonly F64_BUFFER1: Float64Array = new Float64Array(Numbers.BUFFER1);\r\n\r\n private constructor() {\r\n }\r\n\r\n public static sqrt(value: float64): float64 {\r\n return Math.sqrt(value);\r\n }\r\n\r\n public static floor(value: float64): float64 {\r\n return Math.floor(value);\r\n }\r\n\r\n public static intFloor(value: float64): int32 {\r\n return Math.floor(value);\r\n }\r\n\r\n public static divInt(value1: int32, value2: int32): int32 {\r\n return Math.trunc(value1 / value2);\r\n }\r\n\r\n public static intBitsToFloat(value: int32): float32 {\r\n Numbers.I32_BUFFER1[0] = value;\r\n return Numbers.F32_BUFFER1[0];\r\n }\r\n\r\n public static floatToIntBits(value: float32): int32 {\r\n Numbers.F32_BUFFER1[0] = value;\r\n return Numbers.I32_BUFFER1[0];\r\n }\r\n\r\n public static longBitsToDouble(value: ALong): float64 {\r\n Numbers.I32_BUFFER1[0] = value.getLow();\r\n Numbers.I32_BUFFER1[1] = value.getHigh();\r\n return Numbers.F64_BUFFER1[0];\r\n }\r\n\r\n public static doubleToLongBits(value: float64): ALong {\r\n Numbers.F64_BUFFER1[0] = value;\r\n return ALong.fromHighLow(Numbers.I32_BUFFER1[1], Numbers.I32_BUFFER1[0]);\r\n }\r\n\r\n public static intToDouble(value: int32): float64 {\r\n return value;\r\n }\r\n\r\n public static doubleToInt(value: float64): int32 {\r\n return Math.floor(value);\r\n }\r\n\r\n public static getInteger(value: string, defaultValue: int32): int32 {\r\n if (value == undefined) return defaultValue;\r\n if (value == null) return defaultValue;\r\n if (value.length == 0) return defaultValue;\r\n let parsed: int32 = parseInt(value);\r\n return (Number.isNaN(parsed)) ? defaultValue : parsed;\r\n }\r\n\r\n public static getDouble(value: string, defaultValue: float64): float64 {\r\n if (value == undefined) return defaultValue;\r\n if (value == null) return defaultValue;\r\n if (value.length == 0) return defaultValue;\r\n let parsed: float64 = parseFloat(value);\r\n return (Number.isNaN(parsed)) ? defaultValue : parsed;\r\n }\r\n\r\n public static rgbToString(color: int32): string {\r\n let r: int32 = (color >> 16) & 0xFF;\r\n let g: int32 = (color >> 8) & 0xFF;\r\n let b: int32 = (color >> 0) & 0xFF;\r\n return \"\" + r + \".\" + g + \".\" + b;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../src/system/runtime/Strings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAQH,+CAA4C;AAE5C;;GAEG;AACH,gBAAgB;AAChB,MAAa,OAAO;IAChB,+BAA+B;IACxB,MAAM,CAAC,QAAQ,GAAW,QAAQ,CAAC;IAC1C,mCAAmC;IAC5B,MAAM,CAAC,MAAM,GAAW,IAAI,CAAC;IACpC,mCAAmC;IAC5B,MAAM,CAAC,MAAM,GAAW,GAAG,CAAC;IACnC,0BAA0B;IACnB,MAAM,CAAC,GAAG,GAAW,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACnD,sCAAsC;IAC/B,MAAM,CAAC,EAAE,GAAW,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IACnD,sDAAsD;IAC/C,MAAM,CAAC,EAAE,GAAW,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IACnD,6EAA6E;IACtE,MAAM,CAAC,KAAK,GAAW,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAEhF;IACA,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,KAAa;QACjC,OAAO,KAAK,CAAC,MAAM,CAAC;IACxB,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,KAAa,EAAE,KAAY;QAC/C,OAAO,KAAK,CAAC,UAAU,CAAC,KAAK,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,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;gBACrC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC;YAClB,CAAC;YACD,YAAY;iBACP,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC7B,KAAK,IAAI,CAAC,CAAC;YACf,CAAC;YACD,aAAa;iBACR,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC9B,KAAK,IAAI,CAAC,CAAC;YACf,CAAC;QACL,CAAC;QACD,uBAAuB;QACvB,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QAClC,sBAAsB;QACtB,OAAO,KAAK,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,IAAI,CAAC,KAAa;QAC5B,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC;IAEM,MAAM,CAAC,OAAO,CAAC,IAAY,EAAE,GAAW,EAAE,KAAa;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;;AAjLL,0BAkLC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { AList } from \"../collection/AList\";\n\n/**\n * Class Strings defines the common string tools.\n */\n/** @internal */\nexport class Strings {\n /** The 'infinity' character */\n public static INFINITY: string = \"\\u221E\";\n /** The 'double-quote' character */\n public static DQUOTE: string = \"\\\"\";\n /** The 'single-quote' character */\n public static SQUOTE: string = \"'\";\n /** The 'tab' character */\n public static TAB: string = String.fromCharCode(9);\n /** The 'carriage return' character */\n public static CR: string = String.fromCharCode(13);\n /** The 'newline' (linux line terminator) character */\n public static NL: string = String.fromCharCode(10);\n /** The 'carriage return+newline' (dos line terminator) character sequence */\n public static CR_NL: string = String.fromCharCode(13) + String.fromCharCode(10);\n\n private constructor() {\n }\n\n public static getLength(value: string): int32 {\n return value.length;\n }\n\n public static getCharAt(value: string, index: int32): int16 {\n return value.charCodeAt(index);\n }\n\n public static appendChar(value: string, charCode: int16): string {\n return value + String.fromCharCode(charCode);\n }\n\n public static prependChar(value: string, charCode: int16): string {\n return String.fromCharCode(charCode) + value;\n }\n\n public static equals(value1: string, value2: string): boolean {\n if (value1 == null) return (value2 == null);\n if (value2 == null) return false;\n return (value1 === value2);\n }\n\n public static equalsIgnoreCase(value1: string, value2: string): boolean {\n if (value1 == null) return (value2 == null);\n if (value2 == null) return false;\n return (value1.toLowerCase() === value2.toLowerCase());\n }\n\n public static startsWith(value: string, prefix: string): boolean {\n return value.startsWith(prefix);\n }\n\n public static endsWith(value: string, suffix: string): boolean {\n return value.endsWith(suffix);\n }\n\n public static substring(value: string, index0: int32, index1: int32): string {\n return value.substring(index0, index1);\n }\n\n public static substringFrom(value: string, index: int32): string {\n return value.substring(index);\n }\n\n public static charCodeAt(value: string, index: int32): int32 {\n return value.charCodeAt(index);\n }\n\n public static charCodeToString(code: int32): string {\n return String.fromCharCode(code);\n }\n\n public static indexOf(value: string, part: string): int32 {\n return value.indexOf(part);\n }\n\n public static lastIndexOf(value: string, part: string): int32 {\n return value.lastIndexOf(part);\n }\n\n public static indexOfFrom(value: string, part: string, index: int32): int32 {\n return value.indexOf(part, index);\n }\n\n public static compareTo(value1: string, value2: string): int32 {\n if (value1 === value2) return 0;\n return (value1 < value2) ? -1 : 1;\n }\n\n public static compareToIgnoreCase(value1: string, value2: string): int32 {\n return Strings.compareTo(value1.toLowerCase(), value2.toLowerCase());\n }\n\n public static splitAsList(value: string, separators: string): AList<string> {\n /* Null? */\n if (value == null) return null;\n /* Make a list of parts */\n let parts: AList<string> = new AList<string>();\n /* Fast-out */\n if (value.length == 0) return parts;\n /* Make a list of parts */\n while (true) {\n /* Get the index of the next separator */\n let index: int32 = value.length;\n for (let i: int32 = 0; i < separators.length; i++) {\n let nextIndex: int32 = value.indexOf(separators.charAt(i));\n if ((nextIndex >= 0) && (nextIndex < index)) index = nextIndex;\n }\n /* None remaining ? */\n if (index == value.length) {\n /* Done */\n parts.add(value);\n break;\n }\n else {\n /* Add a substring */\n parts.add(value.substring(0, index));\n value = value.substring(index + 1);\n }\n }\n /* Return the parts */\n return parts;\n }\n\n public static splitAdvanced(value: string, separators: string, opens: string, closes: string, literals: string): AList<string> {\n /* Check the value */\n if (value == null) return null;\n /* Check the parameters */\n if (separators == null) separators = \"\";\n if (opens == null) opens = \"\";\n if (closes == null) closes = \"\";\n if (literals == null) literals = \"\";\n /* Make a list of parts */\n let parts: AList<string> = new AList<string>();\n /* Check all characters in the value */\n let level: int32 = 0;\n let start: int32 = 0;\n let literal: string = null;\n for (let i: int32 = 0; i < value.length; i++) {\n /* Get the next character */\n let c: string = value.substring(i, i + 1);\n /* Escaped character ? */\n if ((i > 0) && (value.substring(i - 1, i) === \"\\\\\")) continue;\n /* Quote bound ? */\n if (literal != null ? literal === c : ((literals.length > 0) && (literals.indexOf(c) >= 0))) {\n /* Toggle */\n literal = literal == null ? c : null;\n continue;\n }\n /* Ignore this character ? */\n if (literal != null) continue;\n /* Separator ? */\n if ((separators.indexOf(c) >= 0) && (level == 0)) {\n /* Get the part */\n parts.add(value.substring(start, i));\n start = i + 1;\n }\n /* Open ? */\n else if (opens.indexOf(c) >= 0) {\n level += 1;\n }\n /* Close ? */\n else if (closes.indexOf(c) >= 0) {\n level -= 1;\n }\n }\n /* Add the last part */\n parts.add(value.substring(start));\n /* Return the parts */\n return parts;\n }\n\n public static trim(value: string): string {\n return value.trim();\n }\n\n public static replace(line: string, key: string, value: string): string {\n return line.replace(key, value);\n }\n}\n"]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AAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC9B,KAAK,IAAI,CAAC,CAAC;YACf,CAAC;QACL,CAAC;QACD,uBAAuB;QACvB,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QAClC,sBAAsB;QACtB,OAAO,KAAK,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,IAAI,CAAC,KAAa;QAC5B,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC;IAEM,MAAM,CAAC,OAAO,CAAC,IAAY,EAAE,GAAW,EAAE,KAAa;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;;AAjLL,0BAkLC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { AList } from \"../collection/AList\";\r\n\r\n/**\r\n * Class Strings defines the common string tools.\r\n */\r\n/** @internal */\r\nexport class Strings {\r\n /** The 'infinity' character */\r\n public static INFINITY: string = \"\\u221E\";\r\n /** The 'double-quote' character */\r\n public static DQUOTE: string = \"\\\"\";\r\n /** The 'single-quote' character */\r\n public static SQUOTE: string = \"'\";\r\n /** The 'tab' character */\r\n public static TAB: string = String.fromCharCode(9);\r\n /** The 'carriage return' character */\r\n public static CR: string = String.fromCharCode(13);\r\n /** The 'newline' (linux line terminator) character */\r\n public static NL: string = String.fromCharCode(10);\r\n /** The 'carriage return+newline' (dos line terminator) character sequence */\r\n public static CR_NL: string = String.fromCharCode(13) + String.fromCharCode(10);\r\n\r\n private constructor() {\r\n }\r\n\r\n public static getLength(value: string): int32 {\r\n return value.length;\r\n }\r\n\r\n public static getCharAt(value: string, index: int32): int16 {\r\n return value.charCodeAt(index);\r\n }\r\n\r\n public static appendChar(value: string, charCode: int16): string {\r\n return value + String.fromCharCode(charCode);\r\n }\r\n\r\n public static prependChar(value: string, charCode: int16): string {\r\n return String.fromCharCode(charCode) + value;\r\n }\r\n\r\n public static equals(value1: string, value2: string): boolean {\r\n if (value1 == null) return (value2 == null);\r\n if (value2 == null) return false;\r\n return (value1 === value2);\r\n }\r\n\r\n public static equalsIgnoreCase(value1: string, value2: string): boolean {\r\n if (value1 == null) return (value2 == null);\r\n if (value2 == null) return false;\r\n return (value1.toLowerCase() === value2.toLowerCase());\r\n }\r\n\r\n public static startsWith(value: string, prefix: string): boolean {\r\n return value.startsWith(prefix);\r\n }\r\n\r\n public static endsWith(value: string, suffix: string): boolean {\r\n return value.endsWith(suffix);\r\n }\r\n\r\n public static substring(value: string, index0: int32, index1: int32): string {\r\n return value.substring(index0, index1);\r\n }\r\n\r\n public static substringFrom(value: string, index: int32): string {\r\n return value.substring(index);\r\n }\r\n\r\n public static charCodeAt(value: string, index: int32): int32 {\r\n return value.charCodeAt(index);\r\n }\r\n\r\n public static charCodeToString(code: int32): string {\r\n return String.fromCharCode(code);\r\n }\r\n\r\n public static indexOf(value: string, part: string): int32 {\r\n return value.indexOf(part);\r\n }\r\n\r\n public static lastIndexOf(value: string, part: string): int32 {\r\n return value.lastIndexOf(part);\r\n }\r\n\r\n public static indexOfFrom(value: string, part: string, index: int32): int32 {\r\n return value.indexOf(part, index);\r\n }\r\n\r\n public static compareTo(value1: string, value2: string): int32 {\r\n if (value1 === value2) return 0;\r\n return (value1 < value2) ? -1 : 1;\r\n }\r\n\r\n public static compareToIgnoreCase(value1: string, value2: string): int32 {\r\n return Strings.compareTo(value1.toLowerCase(), value2.toLowerCase());\r\n }\r\n\r\n public static splitAsList(value: string, separators: string): AList<string> {\r\n /* Null? */\r\n if (value == null) return null;\r\n /* Make a list of parts */\r\n let parts: AList<string> = new AList<string>();\r\n /* Fast-out */\r\n if (value.length == 0) return parts;\r\n /* Make a list of parts */\r\n while (true) {\r\n /* Get the index of the next separator */\r\n let index: int32 = value.length;\r\n for (let i: int32 = 0; i < separators.length; i++) {\r\n let nextIndex: int32 = value.indexOf(separators.charAt(i));\r\n if ((nextIndex >= 0) && (nextIndex < index)) index = nextIndex;\r\n }\r\n /* None remaining ? */\r\n if (index == value.length) {\r\n /* Done */\r\n parts.add(value);\r\n break;\r\n }\r\n else {\r\n /* Add a substring */\r\n parts.add(value.substring(0, index));\r\n value = value.substring(index + 1);\r\n }\r\n }\r\n /* Return the parts */\r\n return parts;\r\n }\r\n\r\n public static splitAdvanced(value: string, separators: string, opens: string, closes: string, literals: string): AList<string> {\r\n /* Check the value */\r\n if (value == null) return null;\r\n /* Check the parameters */\r\n if (separators == null) separators = \"\";\r\n if (opens == null) opens = \"\";\r\n if (closes == null) closes = \"\";\r\n if (literals == null) literals = \"\";\r\n /* Make a list of parts */\r\n let parts: AList<string> = new AList<string>();\r\n /* Check all characters in the value */\r\n let level: int32 = 0;\r\n let start: int32 = 0;\r\n let literal: string = null;\r\n for (let i: int32 = 0; i < value.length; i++) {\r\n /* Get the next character */\r\n let c: string = value.substring(i, i + 1);\r\n /* Escaped character ? */\r\n if ((i > 0) && (value.substring(i - 1, i) === \"\\\\\")) continue;\r\n /* Quote bound ? */\r\n if (literal != null ? literal === c : ((literals.length > 0) && (literals.indexOf(c) >= 0))) {\r\n /* Toggle */\r\n literal = literal == null ? c : null;\r\n continue;\r\n }\r\n /* Ignore this character ? */\r\n if (literal != null) continue;\r\n /* Separator ? */\r\n if ((separators.indexOf(c) >= 0) && (level == 0)) {\r\n /* Get the part */\r\n parts.add(value.substring(start, i));\r\n start = i + 1;\r\n }\r\n /* Open ? */\r\n else if (opens.indexOf(c) >= 0) {\r\n level += 1;\r\n }\r\n /* Close ? */\r\n else if (closes.indexOf(c) >= 0) {\r\n level -= 1;\r\n }\r\n }\r\n /* Add the last part */\r\n parts.add(value.substring(start));\r\n /* Return the parts */\r\n return parts;\r\n }\r\n\r\n public static trim(value: string): string {\r\n return value.trim();\r\n }\r\n\r\n public static replace(line: string, key: string, value: string): string {\r\n return line.replace(key, value);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iComparator.js","sourceRoot":"","sources":["../../../../src/system/runtime/iComparator.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.system.runtime;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\n/**\n * Interface iComparator allows sorting of objects by comparing them to one another.\n */\n/** @internal */\nexport interface iComparator<T> {\n compare(value1: T, value2: T): int32;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"iComparator.js","sourceRoot":"","sources":["../../../../src/system/runtime/iComparator.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.system.runtime;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\n/**\r\n * Interface iComparator allows sorting of objects by comparing them to one another.\r\n */\r\n/** @internal */\r\nexport interface iComparator<T> {\r\n compare(value1: T, value2: T): int32;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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AI,iBAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;gBACpC,wDAAwD;gBACxD,IAAI,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;oBAC3C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;oBACjC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBAC1B,CAAC;gBACD,4BAA4B;gBAC5B,KAAK,CAAC,UAAU,GAAG,iBAAO,CAAC,IAAI,EAAE,CAAC;gBAClC,yBAAyB;gBACzB,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAChB,OAAO,KAAK,CAAC,OAAO,CAAC;YACtB,CAAC;QACF,CAAC;QACD,wBAAwB;QACxB,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACI,QAAQ,CAAC,GAAW,EAAE,OAAU;QACtC,6CAA6C;QAC7C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,uBAAU,CAAI,GAAG,EAAE,OAAO,EAAE,iBAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC;YAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAClG,CAAC;CACD;AAzED,8BAyEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.system.storage;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { AList } from \"../collection/AList\";\nimport { ASystem } from \"../runtime/ASystem\";\nimport { Strings } from \"../runtime/Strings\";\nimport { CachedItem } from \"./CachedItem\";\n\n/**\n * Class CacheList caches a list of items based on last-recently-used order.\n */\n/** @internal */\nexport class CacheList<T>\n{\n\t/** The optional maximum number of entries in the list (no maximum if zero) */\n\tprivate _maxEntries: int32;\n\t/** The list of entries (most used at the back) */\n\tprivate _entries: AList<CachedItem<T>>;\n\t/** The number of times a requested item was found in the cache */\n\tpublic hitCount: int32;\n\t/** The number of times a requested item was not found in the cache */\n\tpublic missCount: int32;\n\n\t/**\n\t * Create a new cache, with an optional non-zero maximum number of entries.\n\t */\n\tpublic constructor(maxEntries: int32) {\n\t\tthis._maxEntries = maxEntries;\n\t\tthis._entries = new AList<CachedItem<T>>();\n\t\tthis.hitCount = 0;\n\t\tthis.missCount = 0;\n\t}\n\n\t/**\n\t * Get the number of entries in the cache.\n\t */\n\tpublic size(): int32 {\n\t\treturn this._entries.size();\n\t}\n\n\t/**\n\t * Clear all entries.\n\t */\n\tpublic clear(): void {\n\t\tthis._entries.clear();\n\t\tthis.hitCount = 0;\n\t\tthis.missCount = 0;\n\t}\n\n\t/**\n\t * Find an entry in the cache, or return null if not found.\n\t */\n\tpublic findEntry(key: string): T {\n\t\t/* Check all entries */\n\t\tfor (let i: number = 0; i < this._entries.size(); i++) {\n\t\t\t/* Search back (most used) to front (least used) */\n\t\t\tlet entryIndex: int32 = (this._entries.size() - 1 - i);\n\t\t\t/* Is this the requested entry? */\n\t\t\tlet entry: CachedItem<T> = this._entries.get(entryIndex);\n\t\t\tif (Strings.equals(entry.key, key)) {\n\t\t\t\t/* Move the latest-used entry to the back of the list */\n\t\t\t\tif (entryIndex < this._entries.size() - 1) {\n\t\t\t\t\tthis._entries.remove(entryIndex);\n\t\t\t\t\tthis._entries.add(entry);\n\t\t\t\t}\n\t\t\t\t/* Update the access time */\n\t\t\t\tentry.accessTime = ASystem.time();\n\t\t\t\t/* The entry was found */\n\t\t\t\tthis.hitCount++;\n\t\t\t\treturn entry.element;\n\t\t\t}\n\t\t}\n\t\t/* No entry was found */\n\t\tthis.missCount++;\n\t\treturn null;\n\t}\n\n\t/**\n\t * Add an entry to the cache, pushing out the oldest entry if the cache is full.\n\t */\n\tpublic addEntry(key: string, element: T): void {\n\t\t/* Add a new entry to the back of the list */\n\t\tthis._entries.add(new CachedItem<T>(key, element, ASystem.time()));\n\t\tif ((this._maxEntries > 0) && (this._entries.size() > this._maxEntries)) this._entries.remove(0);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CacheList.js","sourceRoot":"","sources":["../../../../src/system/storage/CacheList.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH,+CAA4C;AAC5C,gDAA6C;AAC7C,gDAA6C;AAC7C,6CAA0C;AAE1C;;GAEG;AACH,gBAAgB;AAChB,MAAa,SAAS;IAErB,8EAA8E;IACtE,WAAW,CAAQ;IAC3B,kDAAkD;IAC1C,QAAQ,CAAuB;IACvC,kEAAkE;IAC3D,QAAQ,CAAQ;IACvB,sEAAsE;IAC/D,SAAS,CAAQ;IAExB;;OAEG;IACH,YAAmB,UAAiB;QACnC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,aAAK,EAAiB,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACpB,CAAC;IAED;;OAEG;IACI,IAAI;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACI,KAAK;QACX,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACpB,CAAC;IAED;;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IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC;YAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAClG,CAAC;CACD;AAzED,8BAyEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.system.storage;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { AList } from \"../collection/AList\";\r\nimport { ASystem } from \"../runtime/ASystem\";\r\nimport { Strings } from \"../runtime/Strings\";\r\nimport { CachedItem } from \"./CachedItem\";\r\n\r\n/**\r\n * Class CacheList caches a list of items based on last-recently-used order.\r\n */\r\n/** @internal */\r\nexport class CacheList<T>\r\n{\r\n\t/** The optional maximum number of entries in the list (no maximum if zero) */\r\n\tprivate _maxEntries: int32;\r\n\t/** The list of entries (most used at the back) */\r\n\tprivate _entries: AList<CachedItem<T>>;\r\n\t/** The number of times a requested item was found in the cache */\r\n\tpublic hitCount: int32;\r\n\t/** The number of times a requested item was not found in the cache */\r\n\tpublic missCount: int32;\r\n\r\n\t/**\r\n\t * Create a new cache, with an optional non-zero maximum number of entries.\r\n\t */\r\n\tpublic constructor(maxEntries: int32) {\r\n\t\tthis._maxEntries = maxEntries;\r\n\t\tthis._entries = new AList<CachedItem<T>>();\r\n\t\tthis.hitCount = 0;\r\n\t\tthis.missCount = 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the number of entries in the cache.\r\n\t */\r\n\tpublic size(): int32 {\r\n\t\treturn this._entries.size();\r\n\t}\r\n\r\n\t/**\r\n\t * Clear all entries.\r\n\t */\r\n\tpublic clear(): void {\r\n\t\tthis._entries.clear();\r\n\t\tthis.hitCount = 0;\r\n\t\tthis.missCount = 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Find an entry in the cache, or return null if not found.\r\n\t */\r\n\tpublic findEntry(key: string): T {\r\n\t\t/* Check all entries */\r\n\t\tfor (let i: number = 0; i < this._entries.size(); i++) {\r\n\t\t\t/* Search back (most used) to front (least used) */\r\n\t\t\tlet entryIndex: int32 = (this._entries.size() - 1 - i);\r\n\t\t\t/* Is this the requested entry? */\r\n\t\t\tlet entry: CachedItem<T> = this._entries.get(entryIndex);\r\n\t\t\tif (Strings.equals(entry.key, key)) {\r\n\t\t\t\t/* Move the latest-used entry to the back of the list */\r\n\t\t\t\tif (entryIndex < this._entries.size() - 1) {\r\n\t\t\t\t\tthis._entries.remove(entryIndex);\r\n\t\t\t\t\tthis._entries.add(entry);\r\n\t\t\t\t}\r\n\t\t\t\t/* Update the access time */\r\n\t\t\t\tentry.accessTime = ASystem.time();\r\n\t\t\t\t/* The entry was found */\r\n\t\t\t\tthis.hitCount++;\r\n\t\t\t\treturn entry.element;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* No entry was found */\r\n\t\tthis.missCount++;\r\n\t\treturn null;\r\n\t}\r\n\r\n\t/**\r\n\t * Add an entry to the cache, pushing out the oldest entry if the cache is full.\r\n\t */\r\n\tpublic addEntry(key: string, element: T): void {\r\n\t\t/* Add a new entry to the back of the list */\r\n\t\tthis._entries.add(new CachedItem<T>(key, element, ASystem.time()));\r\n\t\tif ((this._maxEntries > 0) && (this._entries.size() > this._maxEntries)) this._entries.remove(0);\r\n\t}\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CachedItem.js","sourceRoot":"","sources":["../../../../src/system/storage/CachedItem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH;;GAEG;AACH,gBAAgB;AAChB,MAAa,UAAU;IAEtB,iCAAiC;IAC1B,GAAG,CAAS;IACnB,wBAAwB;IACjB,OAAO,CAAI;IAClB,yCAAyC;IAClC,UAAU,CAAU;IAE3B;;OAEG;IACH,YAAmB,GAAW,EAAE,OAAU,EAAE,UAAmB;QAC9D,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC9B,CAAC;CACD;AAjBD,gCAiBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.system.storage;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\n/**\n * Class CachedItem stores a single entry in a cache of items.\n */\n/** @internal */\nexport class CachedItem<T>\n{\n\t/** The unique key of the item */\n\tpublic key: string;\n\t/** The item to cache */\n\tpublic element: T;\n\t/** The latest access time of the item */\n\tpublic accessTime: float64;\n\n\t/**\n\t * Create a new item.\n\t */\n\tpublic constructor(key: string, element: T, accessTime: float64) {\n\t\tthis.key = key;\n\t\tthis.element = element;\n\t\tthis.accessTime = accessTime;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CachedItem.js","sourceRoot":"","sources":["../../../../src/system/storage/CachedItem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH;;GAEG;AACH,gBAAgB;AAChB,MAAa,UAAU;IAEtB,iCAAiC;IAC1B,GAAG,CAAS;IACnB,wBAAwB;IACjB,OAAO,CAAI;IAClB,yCAAyC;IAClC,UAAU,CAAU;IAE3B;;OAEG;IACH,YAAmB,GAAW,EAAE,OAAU,EAAE,UAAmB;QAC9D,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC9B,CAAC;CACD;AAjBD,gCAiBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.system.storage;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\n/**\r\n * Class CachedItem stores a single entry in a cache of items.\r\n */\r\n/** @internal */\r\nexport class CachedItem<T>\r\n{\r\n\t/** The unique key of the item */\r\n\tpublic key: string;\r\n\t/** The item to cache */\r\n\tpublic element: T;\r\n\t/** The latest access time of the item */\r\n\tpublic accessTime: float64;\r\n\r\n\t/**\r\n\t * Create a new item.\r\n\t */\r\n\tpublic constructor(key: string, element: T, accessTime: float64) {\r\n\t\tthis.key = key;\r\n\t\tthis.element = element;\r\n\t\tthis.accessTime = accessTime;\r\n\t}\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentLoader.js","sourceRoot":"","sources":["../../../../src/system/storage/ContentLoader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH,+CAA4C;AAE5C,gDAA6C;AAE7C,2CAAwC;AAGxC;;GAEG;AACH,gBAAgB;AAChB,MAAa,aAAa;IACtB,8BAA8B;IACtB,MAAM,CAAU,MAAM,GAAW,eAAe,CAAC;IAEzD,oCAAoC;IAC5B,YAAY,CAAc;IAClC,2BAA2B;IACnB,SAAS,CAAS;IAE1B,2BAA2B;IACnB,SAAS,CAAmB;IACpC,2BAA2B;IACnB,QAAQ,CAAU;IAC1B,2BAA2B;IACnB,OAAO,CAAU;IACzB,4BAA4B;IACpB,UAAU,CAAqB;IAEvC;;OAEG;IACH,YAAmB,WAAwB,EAAE,QAAgB;QACzD,I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;QACb,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QACxF,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACI,WAAW,CAAC,MAAa,EAAE,IAAW;QACzC,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YACtD,IAAI,QAAQ,GAAgB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACnD,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;gBACpE,OAAO,QAAQ,CAAC,OAAO,CAAC;YAC5B,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;;AAjGL,sCAkGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.system.storage;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\n\nimport { ABuffer } from \"../buffer/ABuffer\";\nimport { AList } from \"../collection/AList\";\nimport { ALong } from \"../runtime/ALong\";\nimport { Message } from \"../runtime/Message\";\nimport { FileContent } from \"./FileContent\";\nimport { FileRange } from \"./FileRange\";\nimport { FileStorage } from \"./FileStorage\";\n\n/**\n * Class ContentLoader helps requesting and loading multiple ranges from a file with a single request to the storage service.\n */\n/** @internal */\nexport class ContentLoader {\n /** The name of this module */\n private static readonly MODULE: string = \"ContentLoader\";\n\n /** The storage space of the file */\n private _fileStorage: FileStorage;\n /** The name of the file */\n private _fileName: string;\n\n /** The list of requests */\n private _requests: AList<FileRange>;\n /** Has loading started? */\n private _loading: boolean;\n /** Has loading stopped? */\n private _loaded: boolean;\n /** The list of responses */\n private _responses: AList<FileContent>;\n\n /**\n * Create a new content loader.\n */\n public constructor(fileStorage: FileStorage, fileName: string) {\n this._fileStorage = fileStorage;\n this._fileName = fileName;\n this.clear();\n }\n\n /**\n * Clear the content loader for reuse.\n */\n public clear(): void {\n this._requests = new AList<FileRange>();\n this._loading = false;\n this._loaded = false;\n this._responses = null;\n }\n\n /**\n * Add a request to load a content range.\n */\n public requestFilePart(offset: ALong, size: int32): ContentLoader {\n this._requests.add(new FileRange(offset, size));\n return this;\n }\n\n /**\n * Get the total size of the data to be loaded.\n */\n public getTotalRequestSize(): int32 {\n let totalSize: int32 = 0;\n for (let i: number = 0; i < this._requests.size(); i++) totalSize += this._requests.get(i).size;\n return totalSize;\n }\n\n /**\n * Print info.\n */\n public printInfo(): void {\n Message.print(ContentLoader.MODULE, \"Requesting \" + this._requests.size() + \" parts from '\" + this._fileName + \"' with total size \" + this.getTotalRequestSize());\n }\n\n /**\n * Has all content been loaded?\n */\n public isLoaded(): boolean {\n return this._loaded;\n }\n\n /**\n * Has all content been loaded?\n */\n public isAvailable(): boolean {\n return this.isLoaded();\n }\n\n /**\n * Load all content from storage.\n */\n public async load(): Promise<ContentLoader> {\n this._loading = true;\n this.printInfo();\n this._responses = await this._fileStorage.readFileParts(this._fileName, this._requests);\n this._loaded = true;\n return this;\n }\n\n /**\n * Get a content range that has been loaded.\n */\n public getFilePart(offset: ALong, size: int32): ABuffer {\n for (let i: number = 0; i < this._responses.size(); i++) {\n let response: FileContent = this._responses.get(i);\n if (response.offset.same(offset) && (response.content.size() == size)) {\n return response.content;\n }\n }\n return null;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ContentLoader.js","sourceRoot":"","sources":["../../../../src/system/storage/ContentLoader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH,+CAA4C;AAE5C,gDAA6C;AAE7C,2CAAwC;AAGxC;;GAEG;AACH,gBAAgB;AAChB,MAAa,aAAa;IACtB,8BAA8B;IACtB,MAAM,CAAU,MAAM,GAAW,eAAe,CAAC;IAEzD,oCAAoC;IAC5B,YAAY,CAAc;IAClC,2BAA2B;IACnB,SAAS,CAAS;IAE1B,2BAA2B;IACnB,SAAS,CAAmB;IACpC,2BAA2B;IACnB,QAAQ,CAAU;IAC1B,2BAA2B;IACnB,OAAO,CAAU;IACzB,4BAA4B;IACpB,UAAU,CAAqB;IAEvC;;OAEG;IACH,YAAmB,WAAwB,EAAE,QAAgB;QACzD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAED;;OAEG;IACI,KAAK;QACR,IAAI,CAAC,SAAS,GAAG,IAAI,aAAK,EAAa,CAAC;QACxC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,eAAe,CAAC,MAAa,EAAE,IAAW;QAC7C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,qBAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACI,mBAAmB;QACtB,IAAI,SAAS,GAAU,CAAC,CAAC;QACzB,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,E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gBACpE,OAAO,QAAQ,CAAC,OAAO,CAAC;YAC5B,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;;AAjGL,sCAkGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.system.storage;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\n\r\nimport { ABuffer } from \"../buffer/ABuffer\";\r\nimport { AList } from \"../collection/AList\";\r\nimport { ALong } from \"../runtime/ALong\";\r\nimport { Message } from \"../runtime/Message\";\r\nimport { FileContent } from \"./FileContent\";\r\nimport { FileRange } from \"./FileRange\";\r\nimport { FileStorage } from \"./FileStorage\";\r\n\r\n/**\r\n * Class ContentLoader helps requesting and loading multiple ranges from a file with a single request to the storage service.\r\n */\r\n/** @internal */\r\nexport class ContentLoader {\r\n /** The name of this module */\r\n private static readonly MODULE: string = \"ContentLoader\";\r\n\r\n /** The storage space of the file */\r\n private _fileStorage: FileStorage;\r\n /** The name of the file */\r\n private _fileName: string;\r\n\r\n /** The list of requests */\r\n private _requests: AList<FileRange>;\r\n /** Has loading started? */\r\n private _loading: boolean;\r\n /** Has loading stopped? */\r\n private _loaded: boolean;\r\n /** The list of responses */\r\n private _responses: AList<FileContent>;\r\n\r\n /**\r\n * Create a new content loader.\r\n */\r\n public constructor(fileStorage: FileStorage, fileName: string) {\r\n this._fileStorage = fileStorage;\r\n this._fileName = fileName;\r\n this.clear();\r\n }\r\n\r\n /**\r\n * Clear the content loader for reuse.\r\n */\r\n public clear(): void {\r\n this._requests = new AList<FileRange>();\r\n this._loading = false;\r\n this._loaded = false;\r\n this._responses = null;\r\n }\r\n\r\n /**\r\n * Add a request to load a content range.\r\n */\r\n public requestFilePart(offset: ALong, size: int32): ContentLoader {\r\n this._requests.add(new FileRange(offset, size));\r\n return this;\r\n }\r\n\r\n /**\r\n * Get the total size of the data to be loaded.\r\n */\r\n public getTotalRequestSize(): int32 {\r\n let totalSize: int32 = 0;\r\n for (let i: number = 0; i < this._requests.size(); i++) totalSize += this._requests.get(i).size;\r\n return totalSize;\r\n }\r\n\r\n /**\r\n * Print info.\r\n */\r\n public printInfo(): void {\r\n Message.print(ContentLoader.MODULE, \"Requesting \" + this._requests.size() + \" parts from '\" + this._fileName + \"' with total size \" + this.getTotalRequestSize());\r\n }\r\n\r\n /**\r\n * Has all content been loaded?\r\n */\r\n public isLoaded(): boolean {\r\n return this._loaded;\r\n }\r\n\r\n /**\r\n * Has all content been loaded?\r\n */\r\n public isAvailable(): boolean {\r\n return this.isLoaded();\r\n }\r\n\r\n /**\r\n * Load all content from storage.\r\n */\r\n public async load(): Promise<ContentLoader> {\r\n this._loading = true;\r\n this.printInfo();\r\n this._responses = await this._fileStorage.readFileParts(this._fileName, this._requests);\r\n this._loaded = true;\r\n return this;\r\n }\r\n\r\n /**\r\n * Get a content range that has been loaded.\r\n */\r\n public getFilePart(offset: ALong, size: int32): ABuffer {\r\n for (let i: number = 0; i < this._responses.size(); i++) {\r\n let response: FileContent = this._responses.get(i);\r\n if (response.offset.same(offset) && (response.content.size() == size)) {\r\n return response.content;\r\n }\r\n }\r\n return null;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileContent.js","sourceRoot":"","sources":["../../../../src/system/storage/FileContent.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAaH;;GAEG;AACH,gBAAgB;AAChB,MAAa,WAAW;IACpB,gDAAgD;IACzC,MAAM,CAAQ;IACrB,kBAAkB;IACX,OAAO,CAAU;IAExB;;OAEG;IACH,YAAmB,MAAa,EAAE,OAAgB;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;CACJ;AAbD,kCAaC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.system.storage;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { ABuffer } from \"../buffer/ABuffer\";\nimport { ALong } from \"../runtime/ALong\";\n\n/**\n * Class FileContent holds partial content (a single range) of a file.\n */\n/** @internal */\nexport class FileContent {\n /** The (integer) offset of the content range */\n public offset: ALong;\n /** The content */\n public content: ABuffer;\n\n /**\n * Create a new content holder.\n */\n public constructor(offset: ALong, content: ABuffer) {\n this.offset = offset;\n this.content = content;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FileContent.js","sourceRoot":"","sources":["../../../../src/system/storage/FileContent.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAaH;;GAEG;AACH,gBAAgB;AAChB,MAAa,WAAW;IACpB,gDAAgD;IACzC,MAAM,CAAQ;IACrB,kBAAkB;IACX,OAAO,CAAU;IAExB;;OAEG;IACH,YAAmB,MAAa,EAAE,OAAgB;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;CACJ;AAbD,kCAaC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.system.storage;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { ABuffer } from \"../buffer/ABuffer\";\r\nimport { ALong } from \"../runtime/ALong\";\r\n\r\n/**\r\n * Class FileContent holds partial content (a single range) of a file.\r\n */\r\n/** @internal */\r\nexport class FileContent {\r\n /** The (integer) offset of the content range */\r\n public offset: ALong;\r\n /** The content */\r\n public content: ABuffer;\r\n\r\n /**\r\n * Create a new content holder.\r\n */\r\n public constructor(offset: ALong, content: ABuffer) {\r\n this.offset = offset;\r\n this.content = content;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileRange.js","sourceRoot":"","sources":["../../../../src/system/storage/FileRange.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH;;GAEG;AACH,gBAAgB;AAChB,MAAa,SAAS;IAClB,gDAAgD;IACzC,MAAM,CAAQ;IACrB,oCAAoC;IAC7B,IAAI,CAAQ;IAEnB;;OAEG;IACH,YAAmB,MAAa,EAAE,IAAW;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CACJ;AAbD,8BAaC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.system.storage;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { ALong } from \"../runtime/ALong\";\n\n/**\n * Class FileRange defines a content range in a file.\n */\n/** @internal */\nexport class FileRange {\n /** The (integer) offset of the content range */\n public offset: ALong;\n /** The size of the content range */\n public size: int32;\n\n /**\n * Create a new content range.\n */\n public constructor(offset: ALong, size: int32) {\n this.offset = offset;\n this.size = size;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FileRange.js","sourceRoot":"","sources":["../../../../src/system/storage/FileRange.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH;;GAEG;AACH,gBAAgB;AAChB,MAAa,SAAS;IAClB,gDAAgD;IACzC,MAAM,CAAQ;IACrB,oCAAoC;IAC7B,IAAI,CAAQ;IAEnB;;OAEG;IACH,YAAmB,MAAa,EAAE,IAAW;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CACJ;AAbD,8BAaC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.system.storage;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { ALong } from \"../runtime/ALong\";\r\n\r\n/**\r\n * Class FileRange defines a content range in a file.\r\n */\r\n/** @internal */\r\nexport class FileRange {\r\n /** The (integer) offset of the content range */\r\n public offset: ALong;\r\n /** The size of the content range */\r\n public size: int32;\r\n\r\n /**\r\n * Create a new content range.\r\n */\r\n public constructor(offset: ALong, size: int32) {\r\n this.offset = offset;\r\n this.size = size;\r\n }\r\n}\r\n"]}
|