{"version":3,"file":"eui-components-pipes.mjs","sources":["../../pipes/eui-truncate.pipe.ts","../../pipes/eui-is-empty.pipe.ts","../../pipes/eui-components-pipes.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * @description\n * Pipe for truncating strings to a specified length with trailing indicator.\n * Supports both start and end truncation based on limit sign.\n * Positive limit truncates from the end, negative limit truncates from the start.\n * Commonly used for displaying long text in constrained spaces like tables, cards, or lists.\n * @param value - The string to truncate\n * @param limit - Maximum character length (positive for end truncation, negative for start truncation). Default: 40\n * @param trail - Trailing indicator appended to truncated text. Default: '…' (ellipsis character U+2026)\n * @returns Truncated string with trail indicator, or original string if within limit\n */\n@Pipe({\n    name: 'euiTruncate',\n})\nexport class EuiTruncatePipe implements PipeTransform {\n    transform(value: string, limit = 40, trail = '\\u2026'): string {\n        if (value) {\n            if (limit < 0) {\n                limit *= -1;\n                return value.length > limit ? trail + value.substring(value.length - limit, value.length) : value;\n            } else {\n                return value.length > limit ? value.substring(0, limit) + trail : value;\n            }\n        }\n        return;\n    }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\n\n@Pipe({\n    name: 'coerceBool',\n    pure: true,\n})\nexport class EuiCoerceBooleanPipe implements PipeTransform {\n    transform(value: BooleanInput): boolean {\n        return coerceBooleanProperty(value);\n    }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAEA;;;;;;;;;;AAUG;MAIU,eAAe,CAAA;IACxB,SAAS,CAAC,KAAa,EAAE,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,QAAQ,EAAA;QACjD,IAAI,KAAK,EAAE;AACP,YAAA,IAAI,KAAK,GAAG,CAAC,EAAE;gBACX,KAAK,IAAI,CAAC,CAAC;AACX,gBAAA,OAAO,KAAK,CAAC,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,KA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