{"version":3,"file":"primeng-progressbar.mjs","sources":["../../src/progressbar/style/progressbarstyle.ts","../../src/progressbar/progressbar.ts","../../src/progressbar/primeng-progressbar.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = ({ dt }) => `\n.p-progressbar {\n    position: relative;\n    overflow: hidden;\n    height: ${dt('progressbar.height')};\n    background: ${dt('progressbar.background')};\n    border-radius: ${dt('progressbar.border.radius')};\n}\n\n.p-progressbar-value {\n    margin: 0;\n    background: ${dt('progressbar.value.background')};\n}\n\n.p-progressbar-label {\n    color: ${dt('progressbar.label.color')};\n    font-size: ${dt('progressbar.label.font.size')};\n    font-weight: ${dt('progressbar.label.font.weight')};\n}\n\n.p-progressbar-determinate .p-progressbar-value {\n    height: 100%;\n    width: 0%;\n    position: absolute;\n    display: none;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    overflow: hidden;\n    transition: width 1s ease-in-out;\n}\n\n.p-progressbar-determinate .p-progressbar-label {\n    display: inline-flex;\n}\n\n.p-progressbar-indeterminate .p-progressbar-value::before {\n    content: \"\";\n    position: absolute;\n    background: inherit;\n    top: 0;\n    inset-inline-start: 0;\n    bottom: 0;\n    will-change: inset-inline-start, inset-inline-end;\n    animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n\n.p-progressbar-indeterminate .p-progressbar-value::after {\n    content: \"\";\n    position: absolute;\n    background: inherit;\n    top: 0;\n    inset-inline-start: 0;\n    bottom: 0;\n    will-change: inset-inline-start, inset-inline-end;\n    animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n    animation-delay: 1.15s;\n}\n\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n    0% {\n        inset-inline-start: -35%;\n        inset-inline-end: 100%;\n    }\n    60% {\n        inset-inline-start: 100%;\n        inset-inline-end: -90%;\n    }\n    100% {\n        inset-inline-start: 100%;\n        inset-inline-end: -90%;\n    }\n}\n@keyframes p-progressbar-indeterminate-anim {\n    0% {\n        inset-inline-start: -35%;\n        inset-inline-end: 100%;\n    }\n    60% {\n        inset-inline-start: 100%;\n        inset-inline-end: -90%;\n    }\n    100% {\n        inset-inline-start: 100%;\n        inset-inline-end: -90%;\n    }\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n    0% {\n        inset-inline-start: -200%;\n        inset-inline-end: 100%;\n    }\n    60% {\n        inset-inline-start: 107%;\n        inset-inline-end: -8%;\n    }\n    100% {\n        inset-inline-start: 107%;\n        inset-inline-end: -8%;\n    }\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n    0% {\n        inset-inline-start: -200%;\n        inset-inline-end: 100%;\n    }\n    60% {\n        inset-inline-start: 107%;\n        inset-inline-end: -8%;\n    }\n    100% {\n        inset-inline-start: 107%;\n        inset-inline-end: -8%;\n    }\n}\n`;\n\nconst classes = {\n    root: ({ instance }) => [\n        'p-progressbar p-component',\n        {\n            'p-progressbar-determinate': instance.determinate,\n            'p-progressbar-indeterminate': instance.indeterminate\n        }\n    ],\n    value: 'p-progressbar-value',\n    label: 'p-progressbar-label'\n};\n\n@Injectable()\nexport class ProgressBarStyle extends BaseStyle {\n    name = 'progressbar';\n\n    theme = theme;\n\n    classes = classes;\n}\n\n/**\n *\n * ProgressBar is a process status indicator.\n *\n * [Live Demo](https://www.primeng.org/progressbar)\n *\n * @module progressbarstyle\n *\n */\nexport enum ProgressBarClasses {\n    /**\n     * Class name of the root element\n     */\n    root = 'p-progressbar',\n    /**\n     * Class name of the value element\n     */\n    value = 'p-progressbar-value',\n    /**\n     * Class name of the label element\n     */\n    label = 'p-progressbar-label'\n}\n\nexport interface ProgressBarStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport { AfterContentInit, booleanAttribute, ChangeDetectionStrategy, Component, ContentChild, ContentChildren, inject, Input, NgModule, numberAttribute, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { PrimeTemplate, SharedModule } from 'primeng/api';\nimport { BaseComponent } from 'primeng/basecomponent';\nimport { ProgressBarStyle } from './style/progressbarstyle';\n\n/**\n * ProgressBar is a process status indicator.\n * @group Components\n */\n@Component({\n    selector: 'p-progressBar, p-progressbar, p-progress-bar',\n    standalone: true,\n    imports: [CommonModule, SharedModule],\n    template: `\n        <div\n            role=\"progressbar\"\n            [class]=\"styleClass\"\n            [ngStyle]=\"style\"\n            [attr.aria-valuemin]=\"0\"\n            [attr.aria-valuenow]=\"value\"\n            [attr.aria-valuemax]=\"100\"\n            [attr.data-pc-name]=\"'progressbar'\"\n            [attr.data-pc-section]=\"'root'\"\n            [ngClass]=\"{\n                'p-progressbar p-component': true,\n                'p-progressbar-determinate': mode === 'determinate',\n                'p-progressbar-indeterminate': mode === 'indeterminate'\n            }\"\n            [attr.aria-label]=\"value + unit\"\n        >\n            <div *ngIf=\"mode === 'determinate'\" [ngClass]=\"'p-progressbar-value p-progressbar-value-animate'\" [class]=\"valueStyleClass\" [style.width]=\"value + '%'\" style=\"display:flex\" [style.background]=\"color\" [attr.data-pc-section]=\"'value'\">\n                <div class=\"p-progressbar-label\">\n                    <div *ngIf=\"showValue && !contentTemplate && !_contentTemplate\" [style.display]=\"value != null && value !== 0 ? 'flex' : 'none'\" [attr.data-pc-section]=\"'label'\">{{ value }}{{ unit }}</div>\n                    <ng-container *ngTemplateOutlet=\"contentTemplate || _contentTemplate; context: { $implicit: value }\"></ng-container>\n                </div>\n            </div>\n            <div *ngIf=\"mode === 'indeterminate'\" [ngClass]=\"'p-progressbar-indeterminate-container'\" [class]=\"valueStyleClass\" [attr.data-pc-section]=\"'container'\">\n                <div class=\"p-progressbar-value p-progressbar-value-animate\" [style.background]=\"color\" [attr.data-pc-section]=\"'value'\"></div>\n            </div>\n        </div>\n    `,\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    encapsulation: ViewEncapsulation.None,\n    providers: [ProgressBarStyle]\n})\nexport class ProgressBar extends BaseComponent implements AfterContentInit {\n    /**\n     * Current value of the progress.\n     * @group Props\n     */\n    @Input({ transform: numberAttribute }) value: number | undefined;\n    /**\n     * Whether to display the progress bar value.\n     * @group Props\n     */\n    @Input({ transform: booleanAttribute }) showValue: boolean = true;\n    /**\n     * Style class of the element.\n     * @group Props\n     */\n    @Input() styleClass: string | undefined;\n    /**\n     * Style class of the value element.\n     * @group Props\n     */\n    @Input() valueStyleClass: string | undefined;\n    /**\n     * Inline style of the element.\n     * @group Props\n     */\n    @Input() style: { [klass: string]: any } | null | undefined;\n    /**\n     * Unit sign appended to the value.\n     * @group Props\n     */\n    @Input() unit: string = '%';\n    /**\n     * Defines the mode of the progress\n     * @group Props\n     */\n    @Input() mode: string = 'determinate';\n    /**\n     * Color for the background of the progress.\n     * @group Props\n     */\n    @Input() color: string | undefined;\n    /**\n     * Template of the content.\n     * @group templates\n     */\n    @ContentChild('content', { descendants: false }) contentTemplate: TemplateRef<any> | undefined;\n\n    _componentStyle = inject(ProgressBarStyle);\n\n    @ContentChildren(PrimeTemplate) templates: QueryList<PrimeTemplate> | undefined;\n\n    _contentTemplate: TemplateRef<any> | undefined;\n\n    ngAfterContentInit() {\n        this.templates?.forEach((item) => {\n            switch (item.getType()) {\n                case 'content':\n                    this._contentTemplate = item.template;\n                    break;\n                default:\n                    this._contentTemplate = item.template;\n            }\n        });\n    }\n}\n\n@NgModule({\n    imports: [ProgressBar, SharedModule],\n    exports: [ProgressBar, SharedModule]\n})\nexport class ProgressBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAGA,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;;;;cAIZ,EAAE,CAAC,oBAAoB,CAAC,CAAA;kBACpB,EAAE,CAAC,wBAAwB,CAAC,CAAA;qBACzB,EAAE,CAAC,2BAA2B,CAAC,CAAA;;;;;kBAKlC,EAAE,CAAC,8BAA8B,CAAC,CAAA;;;;aAIvC,EAAE,CAAC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