{"version":3,"file":"coercion.es5.js","sources":["../../packages/cdk/esm5/coercion/boolean-property.js","../../packages/cdk/esm5/coercion/number-property.js","../../packages/cdk/esm5/coercion/array.js","../../packages/cdk/esm5/coercion/index.js"],"sourcesContent":["/**\n * Coerces a data-bound value (typically a string) to a boolean.\n * @param {?} value\n * @return {?}\n */\nexport function coerceBooleanProperty(value) {\n return value != null && \"\" + value !== 'false';\n}\n//# sourceMappingURL=boolean-property.js.map","/**\n * Coerces a data-bound value (typically a string) to a number.\n * @param {?} value\n * @param {?=} fallbackValue\n * @return {?}\n */\nexport function coerceNumberProperty(value, fallbackValue) {\n if (fallbackValue === void 0) { fallbackValue = 0; }\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return isNaN(parseFloat(/** @type {?} */ (value))) || isNaN(Number(value)) ? fallbackValue : Number(value);\n}\n//# sourceMappingURL=number-property.js.map","/**\n * Wraps the provided value in an array, unless the provided value is an array.\n * @template T\n * @param {?} value\n * @return {?}\n */\nexport function coerceArray(value) {\n return Array.isArray(value) ? value : [value];\n}\n//# sourceMappingURL=array.js.map","/**\n * Generated bundle index. Do not edit.\n */\nexport { coerceBooleanProperty, coerceNumberProperty, coerceArray } from './public-api';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;;;AAAA;;;;;AAKA,AAAO,SAAS,qBAAqB,CAAC,KAAK,EAAE;IACzC,OAAO,KAAK,IAAI,IAAI,IAAI,EAAE,GAAG,KAAK,KAAK,OAAO,CAAC;CAClD,AACD;;ACRA;;;;;;AAMA,AAAO,SAAS,oBAAoB,CAAC,KAAK,EAAE,aAAa,EAAE;IACvD,IAAI,aAAa,KAAK,KAAK,CAAC,EAAE,EAAE,aAAa,GAAG,CAAC,CAAC,EAAE;;;;IAIpD,OAAO,KAAK,CAAC,UAAU,mBAAmB,KAAK,EAAE,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;CAC9G,AACD;;ACbA;;;;;;AAMA,AAAO,SAAS,WAAW,CAAC,KAAK,EAAE;IAC/B,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;CACjD,AACD;;ACTA;;GAEG,AACH,AAAwF,AACxF;;"}