{"version":3,"file":"primeng-rating.mjs","sources":["../../src/app/components/rating/rating.ts","../../src/app/components/rating/primeng-rating.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, EventEmitter, forwardRef, Input, NgModule, numberAttribute, OnInit, Output, QueryList, signal, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { PrimeNGConfig, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { BanIcon } from 'primeng/icons/ban';\nimport { StarIcon } from 'primeng/icons/star';\nimport { StarFillIcon } from 'primeng/icons/starfill';\nimport { Nullable } from 'primeng/ts-helpers';\nimport { RatingRateEvent } from './rating.interface';\nimport { DomHandler } from 'primeng/dom';\nimport { UniqueComponentId } from 'primeng/utils';\nimport { AutoFocusModule } from 'primeng/autofocus';\n\nexport const RATING_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Rating),\n multi: true\n};\n/**\n * Rating is an extension to standard radio button element with theming.\n * @group Components\n */\n@Component({\n selector: 'p-rating',\n template: `\n
\n `,\n providers: [RATING_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./rating.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class Rating implements OnInit, ControlValueAccessor {\n /**\n * When present, it specifies that the element should be disabled.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) disabled: boolean | undefined;\n /**\n * When present, changing the value is not possible.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) readonly: boolean | undefined;\n /**\n * Number of stars.\n * @group Props\n */\n @Input({ transform: numberAttribute }) stars: number = 5;\n /**\n * When specified a cancel icon is displayed to allow removing the value.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) cancel: boolean = true;\n /**\n * Style class of the on icon.\n * @group Props\n */\n @Input() iconOnClass: string | undefined;\n /**\n * Inline style of the on icon.\n * @group Props\n */\n @Input() iconOnStyle: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the off icon.\n * @group Props\n */\n @Input() iconOffClass: string | undefined;\n /**\n * Inline style of the off icon.\n * @group Props\n */\n @Input() iconOffStyle: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the cancel icon.\n * @group Props\n */\n @Input() iconCancelClass: string | undefined;\n /**\n * Inline style of the cancel icon.\n * @group Props\n */\n @Input() iconCancelStyle: { [klass: string]: any } | null | undefined;\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) autofocus: boolean | undefined;\n /**\n * Emitted on value change.\n * @param {RatingRateEvent} value - Custom rate event.\n * @group Emits\n */\n @Output() onRate: EventEmitter