vendor: 4,772 bytes, lines 1-163
1/** 2 * @license 3 * Cesium - https://github.com/CesiumGS/cesium 4 * Version 1.145.0 5 * 6 * Copyright 2011-2022 Cesium Contributors 7 * 8 * Licensed under the Apache License, Version 2.0 (the "License"); 9 * you may not use this file except in compliance with the License. 10 * You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, software 15 * distributed under the License is distributed on an "AS IS" BASIS, 16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 * See the License for the specific language governing permissions and 18 * limitations under the License. 19 * 20 * Columbus View (Pat. Pend.) 21 * 22 * Portions licensed separately. 23 * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. 24 */ 25 26import { 27 defined_default 28} from "./chunk-B4AVL7VI.js"; 29 30// packages/engine/Source/Core/DeveloperError.js 31function DeveloperError(message) { 32 this.name = "DeveloperError"; 33 this.message = message; 34 let stack; 35 try { 36 throw new Error(); 37 } catch (e) { 38 stack = e.stack; 39 } 40 this.stack = stack; 41} 42if (defined_default(Object.create)) { 43 DeveloperError.prototype = Object.create(Error.prototype); 44 DeveloperError.prototype.constructor = DeveloperError; 45} 46DeveloperError.prototype.toString = function() { 47 let str = `${this.name}: ${this.message}`; 48 if (defined_default(this.stack)) { 49 str += ` 50${this.stack.toString()}`; 51 } 52 return str; 53}; 54DeveloperError.throwInstantiationError = function() { 55 throw new DeveloperError( 56 "This function defines an interface and should not be called directly." 57 ); 58}; 59var DeveloperError_default = DeveloperError; 60 61// packages/engine/Source/Core/Check.js 62var Check = {}; 63Check.typeOf = {}; 64function getUndefinedErrorMessage(name) { 65 return `${name} is required, actual value was undefined`; 66} 67function getFailedTypeErrorMessage(actual, expected, name) { 68 return `Expected ${name} to be typeof ${expected}, actual typeof was ${actual}`; 69} 70Check.defined = function(name, test) { 71 if (!defined_default(test)) { 72 throw new DeveloperError_default(getUndefinedErrorMessage(name)); 73 } 74}; 75Check.typeOf.func = function(name, test) { 76 if (typeof test !== "function") { 77 throw new DeveloperError_default( 78 getFailedTypeErrorMessage(typeof test, "function", name) 79 ); 80 } 81}; 82Check.typeOf.string = function(name, test) { 83 if (typeof test !== "string") { 84 throw new DeveloperError_default( 85 getFailedTypeErrorMessage(typeof test, "string", name) 86 ); 87 } 88}; 89Check.typeOf.number = function(name, test) { 90 if (typeof test !== "number") { 91 throw new DeveloperError_default( 92 getFailedTypeErrorMessage(typeof test, "number", name) 93 ); 94 } 95}; 96Check.typeOf.number.lessThan = function(name, test, limit) { 97 Check.typeOf.number(name, test); 98 if (test >= limit) { 99 throw new DeveloperError_default( 100 `Expected ${name} to be less than ${limit}, actual value was ${test}` 101 ); 102 } 103}; 104Check.typeOf.number.lessThanOrEquals = function(name, test, limit) { 105 Check.typeOf.number(name, test); 106 if (test > limit) { 107 throw new DeveloperError_default( 108 `Expected ${name} to be less than or equal to ${limit}, actual value was ${test}` 109 ); 110 } 111}; 112Check.typeOf.number.greaterThan = function(name, test, limit) { 113 Check.typeOf.number(name, test); 114 if (test <= limit) { 115 throw new DeveloperError_default( 116 `Expected ${name} to be greater than ${limit}, actual value was ${test}` 117 ); 118 } 119}; 120Check.typeOf.number.greaterThanOrEquals = function(name, test, limit) { 121 Check.typeOf.number(name, test); 122 if (test < limit) { 123 throw new DeveloperError_default( 124 `Expected ${name} to be greater than or equal to ${limit}, actual value was ${test}` 125 ); 126 } 127}; 128Check.typeOf.object = function(name, test) { 129 if (typeof test !== "object") { 130 throw new DeveloperError_default( 131 getFailedTypeErrorMessage(typeof test, "object", name) 132 ); 133 } 134}; 135Check.typeOf.bool = function(name, test) { 136 if (typeof test !== "boolean") { 137 throw new DeveloperError_default( 138 getFailedTypeErrorMessage(typeof test, "boolean", name) 139 ); 140 } 141}; 142Check.typeOf.bigint = function(name, test) { 143 if (typeof test !== "bigint") { 144 throw new DeveloperError_default( 145 getFailedTypeErrorMessage(typeof test, "bigint", name) 146 ); 147 } 148}; 149Check.typeOf.number.equals = function(name1, name2, test1, test2) { 150 Check.typeOf.number(name1, test1); 151 Check.typeOf.number(name2, test2); 152 if (test1 !== test2) { 153 throw new DeveloperError_default( 154 `${name1} must be equal to ${name2}, the actual values are ${test1} and ${test2}` 155 ); 156 } 157}; 158var Check_default = Check; 159 160export { 161 DeveloperError_default, 162 Check_default 163};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.