{"version":3,"file":"ng-primitives-color.mjs","sources":["../../../../packages/ng-primitives/color/src/color/color.ts","../../../../packages/ng-primitives/color/src/color-picker/color-picker-state.ts","../../../../packages/ng-primitives/color/src/color-slider/color-slider-state.ts","../../../../packages/ng-primitives/color/src/color-slider/color-slider.ts","../../../../packages/ng-primitives/color/src/color-slider-track/color-slider-track-state.ts","../../../../packages/ng-primitives/color/src/color-slider-track/color-slider-track.ts","../../../../packages/ng-primitives/color/src/color-slider-thumb/color-slider-thumb-state.ts","../../../../packages/ng-primitives/color/src/color-slider-thumb/color-slider-thumb.ts","../../../../packages/ng-primitives/color/src/color-area/color-area-state.ts","../../../../packages/ng-primitives/color/src/color-area/color-area.ts","../../../../packages/ng-primitives/color/src/color-area-thumb/color-area-thumb-state.ts","../../../../packages/ng-primitives/color/src/color-area-thumb/color-area-thumb.ts","../../../../packages/ng-primitives/color/src/color-field/color-field-state.ts","../../../../packages/ng-primitives/color/src/color-field/color-field.ts","../../../../packages/ng-primitives/color/src/color-picker/color-picker.ts","../../../../packages/ng-primitives/color/src/color-swatch/color-swatch-state.ts","../../../../packages/ng-primitives/color/src/color-swatch/color-swatch.ts","../../../../packages/ng-primitives/color/src/color-wheel/color-wheel-state.ts","../../../../packages/ng-primitives/color/src/color-wheel/color-wheel.ts","../../../../packages/ng-primitives/color/src/color-wheel-thumb/color-wheel-thumb-state.ts","../../../../packages/ng-primitives/color/src/color-wheel-thumb/color-wheel-thumb.ts","../../../../packages/ng-primitives/color/src/color-swatch-picker/color-swatch-picker-state.ts","../../../../packages/ng-primitives/color/src/color-swatch-picker/color-swatch-picker.ts","../../../../packages/ng-primitives/color/src/color-swatch-picker-item/color-swatch-picker-item-state.ts","../../../../packages/ng-primitives/color/src/color-swatch-picker-item/color-swatch-picker-item.ts","../../../../packages/ng-primitives/color/src/ng-primitives-color.ts"],"sourcesContent":["/**\n * A minimal immutable color model supporting the rgb, hsl and hsb color spaces (each with alpha).\n * Construct with {@link Color.parse}; derive new colors with the immutable `with*` methods. Reads and\n * withers auto-convert across spaces, so any channel is accessible regardless of the color's own space.\n */\nexport type ColorSpace = 'rgb' | 'hsl' | 'hsb';\n\nexport type ColorChannel =\n  | 'red'\n  | 'green'\n  | 'blue'\n  | 'hue'\n  | 'saturation'\n  | 'lightness'\n  | 'brightness'\n  | 'alpha';\n\nexport interface ColorChannelRange {\n  min: number;\n  max: number;\n  step: number;\n}\n\nconst SPACE_CHANNELS: Record<ColorSpace, [ColorChannel, ColorChannel, ColorChannel]> = {\n  rgb: ['red', 'green', 'blue'],\n  hsl: ['hue', 'saturation', 'lightness'],\n  hsb: ['hue', 'saturation', 'brightness'],\n};\n\nconst RANGES: Record<ColorChannel, ColorChannelRange> = {\n  red: { min: 0, max: 255, step: 1 },\n  green: { min: 0, max: 255, step: 1 },\n  blue: { min: 0, max: 255, step: 1 },\n  hue: { min: 0, max: 360, step: 1 },\n  saturation: { min: 0, max: 100, step: 1 },\n  lightness: { min: 0, max: 100, step: 1 },\n  brightness: { min: 0, max: 100, step: 1 },\n  alpha: { min: 0, max: 1, step: 0.01 },\n};\n\n/** The space a channel resolves to when it is not present in a color's own space (ambiguous → hsb). */\nconst CHANNEL_SPACE: Record<Exclude<ColorChannel, 'alpha'>, ColorSpace> = {\n  red: 'rgb',\n  green: 'rgb',\n  blue: 'rgb',\n  lightness: 'hsl',\n  brightness: 'hsb',\n  hue: 'hsb',\n  saturation: 'hsb',\n};\n\nfunction clamp(value: number, { min, max }: ColorChannelRange): number {\n  return Math.min(max, Math.max(min, value));\n}\n\nfunction isChannelInSpace(space: ColorSpace, channel: ColorChannel): boolean {\n  return channel === 'alpha' || SPACE_CHANNELS[space].includes(channel);\n}\n\nconst ZERO: Record<ColorChannel, number> = {\n  red: 0,\n  green: 0,\n  blue: 0,\n  hue: 0,\n  saturation: 0,\n  lightness: 0,\n  brightness: 0,\n  alpha: 1,\n};\n\nexport class Color {\n  private constructor(\n    private readonly space: ColorSpace,\n    private readonly values: Record<ColorChannel, number>,\n    private readonly alpha: number,\n  ) {}\n\n  /** Parse a CSS color string (hex, rgb(a), hsl(a) or hsb(a)) into a `Color`. Throws on invalid input. */\n  static parse(value: string): Color {\n    const input = value.trim();\n\n    const hex = HEX_RE.exec(input);\n    if (hex) {\n      return Color.fromHex(hex[1]);\n    }\n\n    // normalise out-of-range channel values to match CSS semantics: hue wraps (hsl(400) -> 40),\n    // the rest clamp to their range (rgb(999,...) -> 255)\n    const ch = (v: string, channel: ColorChannel) =>\n      channel === 'hue' ? ((+v % 360) + 360) % 360 : clamp(+v, RANGES[channel]);\n    const alpha = (v: string | undefined) => (v === undefined ? 1 : clamp(+v, RANGES.alpha));\n\n    const rgb = RGB_RE.exec(input);\n    if (rgb) {\n      return new Color(\n        'rgb',\n        { ...ZERO, red: ch(rgb[1], 'red'), green: ch(rgb[2], 'green'), blue: ch(rgb[3], 'blue') },\n        alpha(rgb[4]),\n      );\n    }\n\n    const hsl = HSL_RE.exec(input);\n    if (hsl) {\n      return new Color(\n        'hsl',\n        {\n          ...ZERO,\n          hue: ch(hsl[1], 'hue'),\n          saturation: ch(hsl[2], 'saturation'),\n          lightness: ch(hsl[3], 'lightness'),\n        },\n        alpha(hsl[4]),\n      );\n    }\n\n    const hsb = HSB_RE.exec(input);\n    if (hsb) {\n      return new Color(\n        'hsb',\n        {\n          ...ZERO,\n          hue: ch(hsb[1], 'hue'),\n          saturation: ch(hsb[2], 'saturation'),\n          brightness: ch(hsb[3], 'brightness'),\n        },\n        alpha(hsb[4]),\n      );\n    }\n\n    throw new Error(`Invalid color value: \"${value}\"`);\n  }\n\n  /** The color space this color is defined in. */\n  getColorSpace(): ColorSpace {\n    return this.space;\n  }\n\n  /** The three non-alpha channels of this color's space, in order. */\n  getColorChannels(): ColorChannel[] {\n    return [...SPACE_CHANNELS[this.space]];\n  }\n\n  /** The value of a channel. Channels outside this color's space are read by converting. */\n  getChannelValue(channel: ColorChannel): number {\n    if (channel === 'alpha') {\n      return this.alpha;\n    }\n    if (isChannelInSpace(this.space, channel)) {\n      return this.values[channel];\n    }\n    return this.toFormat(CHANNEL_SPACE[channel]).getChannelValue(channel);\n  }\n\n  /** The valid range and step for a channel. */\n  getChannelRange(channel: ColorChannel): ColorChannelRange {\n    return RANGES[channel];\n  }\n\n  /** The red channel (0-255), converting to rgb if needed. */\n  getRed(): number {\n    return this.getChannelValue('red');\n  }\n  /** The green channel (0-255), converting to rgb if needed. */\n  getGreen(): number {\n    return this.getChannelValue('green');\n  }\n  /** The blue channel (0-255), converting to rgb if needed. */\n  getBlue(): number {\n    return this.getChannelValue('blue');\n  }\n  /** The hue (0-360), converting if needed. */\n  getHue(): number {\n    return this.getChannelValue('hue');\n  }\n  /** The saturation (0-100), resolving to hsb when the color is not already hsl/hsb. */\n  getSaturation(): number {\n    return this.getChannelValue('saturation');\n  }\n  /** The lightness (0-100), converting to hsl if needed. */\n  getLightness(): number {\n    return this.getChannelValue('lightness');\n  }\n  /** The brightness (0-100), converting to hsb if needed. */\n  getBrightness(): number {\n    return this.getChannelValue('brightness');\n  }\n  /** The alpha (0-1). */\n  getAlpha(): number {\n    return this.alpha;\n  }\n\n  /** A new color with `channel` set to `value` (clamped). Converts space if the channel is foreign. */\n  withChannelValue(channel: ColorChannel, value: number): Color {\n    if (channel === 'alpha') {\n      return new Color(this.space, { ...this.values }, clamp(value, RANGES.alpha));\n    }\n    const targetSpace = isChannelInSpace(this.space, channel) ? this.space : CHANNEL_SPACE[channel];\n    const base = this.toFormat(targetSpace);\n    return new Color(\n      targetSpace,\n      { ...base.values, [channel]: clamp(value, RANGES[channel]) },\n      base.alpha,\n    );\n  }\n\n  /** @returns a new color with the red channel set (in rgb). */\n  withRed(value: number): Color {\n    return this.withChannelValue('red', value);\n  }\n  /** @returns a new color with the green channel set (in rgb). */\n  withGreen(value: number): Color {\n    return this.withChannelValue('green', value);\n  }\n  /** @returns a new color with the blue channel set (in rgb). */\n  withBlue(value: number): Color {\n    return this.withChannelValue('blue', value);\n  }\n  /** @returns a new color with the hue set (in hsb, unless already hsl). */\n  withHue(value: number): Color {\n    return this.withChannelValue('hue', value);\n  }\n  /** @returns a new color with the saturation set (in hsb, unless already hsl). */\n  withSaturation(value: number): Color {\n    return this.withChannelValue('saturation', value);\n  }\n  /** @returns a new color with the lightness set (in hsl). */\n  withLightness(value: number): Color {\n    return this.withChannelValue('lightness', value);\n  }\n  /** @returns a new color with the brightness set (in hsb). */\n  withBrightness(value: number): Color {\n    return this.withChannelValue('brightness', value);\n  }\n  /** @returns a new color with the alpha set (0-1). */\n  withAlpha(value: number): Color {\n    return this.withChannelValue('alpha', value);\n  }\n\n  /** This color converted to another color space (alpha preserved). */\n  toFormat(space: ColorSpace): Color {\n    if (space === this.space) {\n      return this;\n    }\n    const { r, g, b } = this.toRgbChannels();\n    return Color.fromRgb(space, r, g, b, this.alpha);\n  }\n\n  /** '#rrggbb' */\n  toHex(): string {\n    const { r, g, b } = this.toRgbChannels();\n    return `#${hex2(r)}${hex2(g)}${hex2(b)}`;\n  }\n  /** '#rrggbbaa' */\n  toHexa(): string {\n    return `${this.toHex()}${hex2(this.alpha * 255)}`;\n  }\n  /** 'rgb(r, g, b)' */\n  toRgb(): string {\n    const { r, g, b } = this.toRgbChannels();\n    return `rgb(${Math.round(r)}, ${Math.round(g)}, ${Math.round(b)})`;\n  }\n  /** 'rgba(r, g, b, a)' */\n  toRgba(): string {\n    const { r, g, b } = this.toRgbChannels();\n    return `rgba(${Math.round(r)}, ${Math.round(g)}, ${Math.round(b)}, ${round2(this.alpha)})`;\n  }\n  /** 'hsl(h, s%, l%)' */\n  toHsl(): string {\n    const c = this.toFormat('hsl');\n    return `hsl(${Math.round(c.values.hue)}, ${Math.round(c.values.saturation)}%, ${Math.round(c.values.lightness)}%)`;\n  }\n  /** 'hsla(h, s%, l%, a)' */\n  toHsla(): string {\n    const c = this.toFormat('hsl');\n    return `hsla(${Math.round(c.values.hue)}, ${Math.round(c.values.saturation)}%, ${Math.round(c.values.lightness)}%, ${round2(this.alpha)})`;\n  }\n  /** 'hsb(h, s%, b%)' */\n  toHsb(): string {\n    const c = this.toFormat('hsb');\n    return `hsb(${Math.round(c.values.hue)}, ${Math.round(c.values.saturation)}%, ${Math.round(c.values.brightness)}%)`;\n  }\n  /** 'hsba(h, s%, b%, a)' */\n  toHsba(): string {\n    const c = this.toFormat('hsb');\n    return `hsba(${Math.round(c.values.hue)}, ${Math.round(c.values.saturation)}%, ${Math.round(c.values.brightness)}%, ${round2(this.alpha)})`;\n  }\n  /** The shortest sensible CSS: hex when opaque, rgba when translucent. */\n  toCss(): string {\n    return this.alpha < 1 ? this.toRgba() : this.toHex();\n  }\n  /** Delegates to {@link toCss}, so `${color}` yields a valid CSS string. */\n  toString(): string {\n    return this.toCss();\n  }\n\n  /** Convert this color to rgb channels in the 0-255 range (unrounded). */\n  private toRgbChannels(): { r: number; g: number; b: number } {\n    if (this.space === 'rgb') {\n      return { r: this.values.red, g: this.values.green, b: this.values.blue };\n    }\n    const h = this.values.hue;\n    const s = this.values.saturation / 100;\n    if (this.space === 'hsl') {\n      return hslToRgb(h, s, this.values.lightness / 100);\n    }\n    return hsbToRgb(h, s, this.values.brightness / 100);\n  }\n\n  private static fromHex(hex: string): Color {\n    const full =\n      hex.length <= 4\n        ? hex\n            .split('')\n            .map(c => c + c)\n            .join('')\n        : hex;\n    return new Color(\n      'rgb',\n      {\n        ...ZERO,\n        red: parseInt(full.slice(0, 2), 16),\n        green: parseInt(full.slice(2, 4), 16),\n        blue: parseInt(full.slice(4, 6), 16),\n      },\n      full.length === 8 ? parseInt(full.slice(6, 8), 16) / 255 : 1,\n    );\n  }\n\n  private static fromRgb(space: ColorSpace, r: number, g: number, b: number, alpha: number): Color {\n    if (space === 'rgb') {\n      return new Color('rgb', { ...ZERO, red: r, green: g, blue: b }, alpha);\n    }\n    const { h, s, x } = space === 'hsl' ? rgbToHsl(r, g, b) : rgbToHsb(r, g, b);\n    const third = space === 'hsl' ? 'lightness' : 'brightness';\n    return new Color(space, { ...ZERO, hue: h, saturation: s, [third]: x }, alpha);\n  }\n}\n\nfunction hex2(value: number): string {\n  return Math.round(clamp(value, RANGES.red)).toString(16).padStart(2, '0');\n}\n\nfunction round2(value: number): number {\n  return Math.round(value * 100) / 100;\n}\n\nfunction rgbHue(r: number, g: number, b: number, max: number, delta: number): number {\n  if (delta === 0) {\n    return 0;\n  }\n  let h: number;\n  if (max === r) {\n    h = ((g - b) / delta) % 6;\n  } else if (max === g) {\n    h = (b - r) / delta + 2;\n  } else {\n    h = (r - g) / delta + 4;\n  }\n  h *= 60;\n  return h < 0 ? h + 360 : h;\n}\n\nfunction rgbToHsl(r: number, g: number, b: number): { h: number; s: number; x: number } {\n  r /= 255;\n  g /= 255;\n  b /= 255;\n  const max = Math.max(r, g, b);\n  const min = Math.min(r, g, b);\n  const delta = max - min;\n  const l = (max + min) / 2;\n  const s = delta === 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));\n  return { h: rgbHue(r, g, b, max, delta), s: s * 100, x: l * 100 };\n}\n\nfunction rgbToHsb(r: number, g: number, b: number): { h: number; s: number; x: number } {\n  r /= 255;\n  g /= 255;\n  b /= 255;\n  const max = Math.max(r, g, b);\n  const min = Math.min(r, g, b);\n  const delta = max - min;\n  const s = max === 0 ? 0 : delta / max;\n  return { h: rgbHue(r, g, b, max, delta), s: s * 100, x: max * 100 };\n}\n\nfunction hslToRgb(h: number, s: number, l: number): { r: number; g: number; b: number } {\n  const c = (1 - Math.abs(2 * l - 1)) * s;\n  const [r, g, b] = hueChroma(h, c, l - c / 2);\n  return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\nfunction hsbToRgb(h: number, s: number, v: number): { r: number; g: number; b: number } {\n  const c = v * s;\n  const [r, g, b] = hueChroma(h, c, v - c);\n  return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\nfunction hueChroma(h: number, c: number, m: number): [number, number, number] {\n  const hp = (((h % 360) + 360) % 360) / 60;\n  const x = c * (1 - Math.abs((hp % 2) - 1));\n  let rgb: [number, number, number];\n  if (hp < 1) rgb = [c, x, 0];\n  else if (hp < 2) rgb = [x, c, 0];\n  else if (hp < 3) rgb = [0, c, x];\n  else if (hp < 4) rgb = [0, x, c];\n  else if (hp < 5) rgb = [x, 0, c];\n  else rgb = [c, 0, x];\n  return [rgb[0] + m, rgb[1] + m, rgb[2] + m];\n}\n\nconst HEX_RE = /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;\n// accept comma- or space-separated channels, and a comma or slash before alpha (modern CSS)\nconst RGB_RE = /^rgba?\\(\\s*([\\d.]+)[\\s,]+([\\d.]+)[\\s,]+([\\d.]+)\\s*(?:[,/]\\s*([\\d.]+)\\s*)?\\)$/i;\nconst HSL_RE = /^hsla?\\(\\s*([\\d.]+)[\\s,]+([\\d.]+)%[\\s,]+([\\d.]+)%\\s*(?:[,/]\\s*([\\d.]+)\\s*)?\\)$/i;\nconst HSB_RE = /^hsba?\\(\\s*([\\d.]+)[\\s,]+([\\d.]+)%[\\s,]+([\\d.]+)%\\s*(?:[,/]\\s*([\\d.]+)\\s*)?\\)$/i;\n","import { Signal, signal, WritableSignal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  controlled,\n  controlledState,\n  createPrimitive,\n  deprecatedSetter,\n  SetterOptions,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\nimport { Color } from '../color/color';\n\n/**\n * Public state surface for the Color Picker primitive - a coordinator that holds a single\n * color value shared across child color components (area, sliders, fields).\n */\nexport interface NgpColorPickerState {\n  /** The id of the picker. */\n  readonly id: Signal<string>;\n  /** The shared color value. */\n  readonly value: WritableSignal<Color>;\n  /** Emits when the value changes. */\n  readonly valueChange: Observable<Color>;\n  /** Set the shared color value. */\n  setValue(value: Color, options?: SetterOptions): void;\n  /** Set the default color value used in uncontrolled mode. */\n  setDefaultValue(value: Color): void;\n}\n\n/**\n * Inputs for configuring the Color Picker primitive.\n */\nexport interface NgpColorPickerProps {\n  readonly id?: Signal<string>;\n  /** The shared color value. When defined the picker is controlled. */\n  readonly value?: Signal<Color | undefined>;\n  /** The default color value for uncontrolled usage. */\n  readonly defaultValue?: Signal<Color>;\n  readonly onValueChange?: (value: Color) => void;\n}\n\nexport const [\n  NgpColorPickerStateToken,\n  ngpColorPicker,\n  injectColorPickerState,\n  provideColorPickerState,\n] = createPrimitive(\n  'NgpColorPicker',\n  ({\n    id = signal(uniqueId('ngp-color-picker')),\n    value: _value = signal<Color | undefined>(undefined),\n    defaultValue: _defaultValue,\n    onValueChange,\n  }: NgpColorPickerProps): NgpColorPickerState => {\n    const element = injectElementRef();\n    const defaultValue = controlled(_defaultValue, Color.parse('#ff0000'));\n    const [value, setValueInternal, valueChange] = controlledState<Color>({\n      value: _value,\n      defaultValue,\n      onChange: onValueChange,\n    });\n\n    attrBinding(element, 'id', id);\n\n    function setValue(newValue: Color, options?: SetterOptions): void {\n      setValueInternal(newValue, options);\n    }\n\n    return {\n      id,\n      value: deprecatedSetter(value, 'setValue', setValue),\n      valueChange,\n      setValue,\n      setDefaultValue: defaultValue.set,\n    } satisfies NgpColorPickerState;\n  },\n);\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { computed, Signal, signal, WritableSignal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { ngpSlider } from 'ng-primitives/slider';\nimport {\n  controlled,\n  controlledState,\n  createPrimitive,\n  emitter,\n  SetterOptions,\n  styleBinding,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\nimport { injectColorPickerState } from '../color-picker/color-picker-state';\nimport { Color, ColorChannel, ColorChannelRange, ColorSpace } from '../color/color';\n\n/**\n * Public state surface for the Color Slider primitive.\n *\n * A color slider composes the underlying {@link ngpSlider} primitive, mapping a single\n * color channel to a numeric slider value. The slider parts (track, thumb) are the\n * standard slider parts and read the composed slider state directly.\n */\nexport interface NgpColorSliderState {\n  /** The id of the slider. */\n  readonly id: Signal<string>;\n  /** The current color value (the parent picker's value when inside one). */\n  readonly value: Signal<Color>;\n  /** The channel this slider adjusts. */\n  readonly channel: Signal<ColorChannel>;\n  /** The color space the slider operates in (resolved from the channel/value if not set). */\n  readonly colorSpace: Signal<ColorSpace>;\n  /** The current value of the adjusted channel. */\n  readonly channelValue: Signal<number>;\n  /** The range (min/max/step) of the adjusted channel. */\n  readonly channelRange: Signal<ColorChannelRange>;\n  /** The thumb position as a percentage (0-100). */\n  readonly percentage: Signal<number>;\n  /** A CSS gradient representing the channel across its range. */\n  readonly gradient: Signal<string>;\n  /** The slider orientation. */\n  readonly orientation: WritableSignal<NgpOrientation>;\n  /** Whether the slider is disabled (includes form control state). */\n  readonly disabled: WritableSignal<boolean>;\n  /** Emits when the value changes. */\n  readonly valueChange: Observable<Color>;\n  /** Set the full color value. */\n  setValue(value: Color, options?: SetterOptions): void;\n  /** Focus the thumb element. */\n  focusThumb(origin: FocusOrigin): void;\n  /** Set the disabled state. */\n  setDisabled(disabled: boolean): void;\n\n  /** Set the default value used in uncontrolled mode. */\n  setDefaultValue(value: Color): void;\n  /** Set the orientation. */\n  setOrientation(orientation: NgpOrientation): void;\n}\n\n/**\n * Inputs for configuring the Color Slider primitive.\n */\nexport interface NgpColorSliderProps {\n  readonly id?: Signal<string>;\n  readonly value?: Signal<Color | undefined>;\n  /** The default color value for uncontrolled usage. */\n  readonly defaultValue?: Signal<Color>;\n  readonly channel?: Signal<ColorChannel>;\n  readonly colorSpace?: Signal<ColorSpace | undefined>;\n  readonly orientation?: Signal<NgpOrientation>;\n  readonly disabled?: Signal<boolean>;\n  readonly onValueChange?: (value: Color) => void;\n}\n\n/** Resolve the color space to operate in from the channel, an explicit override, and the value's own space. */\nfunction resolveColorSpace(\n  channel: ColorChannel,\n  explicit: ColorSpace | undefined,\n  valueSpace: ColorSpace,\n): ColorSpace {\n  if (explicit) {\n    return explicit;\n  }\n  switch (channel) {\n    case 'red':\n    case 'green':\n    case 'blue':\n      return 'rgb';\n    case 'lightness':\n      return 'hsl';\n    case 'brightness':\n      return 'hsb';\n    case 'hue':\n    case 'saturation':\n      return valueSpace === 'hsl' ? 'hsl' : 'hsb';\n    case 'alpha':\n      return valueSpace;\n  }\n}\n\nexport const [\n  NgpColorSliderStateToken,\n  ngpColorSlider,\n  injectColorSliderState,\n  provideColorSliderState,\n] = createPrimitive(\n  'NgpColorSlider',\n  ({\n    id = signal(uniqueId('ngp-color-slider')),\n    value: _value = signal<Color | undefined>(undefined),\n    defaultValue: _defaultValue,\n    channel = signal<ColorChannel>('hue'),\n    colorSpace: _colorSpace = signal<ColorSpace | undefined>(undefined),\n    orientation = signal<NgpOrientation>('horizontal'),\n    disabled = signal(false),\n    onValueChange,\n  }: NgpColorSliderProps): NgpColorSliderState => {\n    const element = injectElementRef();\n    // Bind to a parent color picker when present, otherwise own the value locally.\n    const picker = injectColorPickerState({ optional: true });\n    const defaultValue = controlled(_defaultValue, Color.parse('#ff0000'));\n    const [local, setLocal] = controlledState<Color>({ value: _value, defaultValue });\n    const value = computed(() => picker()?.value() ?? local());\n    const valueChange = emitter<Color>();\n\n    const colorSpace = computed(() =>\n      resolveColorSpace(channel(), _colorSpace(), value().getColorSpace()),\n    );\n    // the value converted into the space we operate in, so the channel is readable/writable\n    const converted = computed(() => value().toFormat(colorSpace()));\n    const channelRange = computed(() => converted().getChannelRange(channel()));\n    const channelValue = computed(() => converted().getChannelValue(channel()));\n\n    // Compose the numeric slider: it owns percentage, clamping/stepping, track/thumb\n    // registration, keyboard, drag, focus, orientation and form-control state. We only\n    // translate the adjusted channel to and from a Color value.\n    const slider = ngpSlider({\n      id,\n      value: channelValue,\n      min: computed(() => channelRange().min),\n      max: computed(() => channelRange().max),\n      step: computed(() => channelRange().step),\n      orientation,\n      disabled,\n      onValueChange: channelNumber =>\n        setValue(converted().withChannelValue(channel(), channelNumber)),\n    });\n\n    const gradient = computed(() =>\n      channelGradient(converted(), channel(), channelRange(), slider.orientation()),\n    );\n\n    // Expose the channel gradient as a custom property; it inherits down to the track.\n    styleBinding(element, '--ngp-color-slider-background', gradient);\n\n    function setValue(newValue: Color, options?: SetterOptions): void {\n      const parent = picker();\n      if (parent) {\n        parent.setValue(newValue, options);\n      } else {\n        setLocal(newValue, { emit: false });\n      }\n      if (options?.emit !== false) {\n        onValueChange?.(newValue);\n        valueChange.emit(newValue);\n      }\n    }\n\n    return {\n      id,\n      value,\n      channel,\n      colorSpace,\n      channelValue,\n      channelRange,\n      percentage: slider.percentage,\n      gradient,\n      orientation: slider.orientation,\n      disabled: slider.disabled,\n      valueChange: valueChange.asObservable(),\n      setValue,\n      setDefaultValue: defaultValue.set,\n      focusThumb: slider.focusThumb,\n      setDisabled: slider.setDisabled,\n      setOrientation: slider.setOrientation,\n    } satisfies NgpColorSliderState;\n  },\n);\n\n/** Build a CSS `linear-gradient` sampling `channel` across its range, holding the other channels. */\nfunction channelGradient(\n  color: Color,\n  channel: ColorChannel,\n  range: ColorChannelRange,\n  orientation: NgpOrientation,\n): string {\n  // ponytail: fixed stop counts — hue needs many samples to render the spectrum,\n  // lightness needs a midpoint (black→color→white), the rest read fine as endpoints.\n  const stops = channel === 'hue' ? 12 : channel === 'lightness' ? 2 : 1;\n  const direction = orientation === 'horizontal' ? 'to right' : 'to top';\n  const parts: string[] = [];\n  for (let i = 0; i <= stops; i++) {\n    const channelValue = range.min + ((range.max - range.min) * i) / stops;\n    parts.push(color.withChannelValue(channel, channelValue).toRgba());\n  }\n  return `linear-gradient(${direction}, ${parts.join(', ')})`;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { provideSliderState } from 'ng-primitives/slider';\nimport { SetterOptions } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Color, ColorChannel, ColorSpace } from '../color/color';\nimport { ngpColorSlider, provideColorSliderState } from './color-slider-state';\n\n/**\n * Apply the `ngpColorSlider` directive to an element that contains a color slider track and thumb.\n * A color slider adjusts a single channel (e.g. hue, saturation, alpha) of a color value. It composes\n * the underlying slider primitive, so it provides the slider state its track and thumb parts read.\n */\n@Directive({\n  selector: '[ngpColorSlider]',\n  exportAs: 'ngpColorSlider',\n  providers: [provideColorSliderState(), provideSliderState({ inherit: false })],\n})\nexport class NgpColorSlider {\n  /** The id of the slider. */\n  readonly id = input<string>(uniqueId('ngp-color-slider'));\n\n  /** The color value. */\n  readonly value = input<Color | undefined>(undefined, {\n    alias: 'ngpColorSliderValue',\n  });\n\n  /** The default color value for uncontrolled usage. */\n  readonly defaultValue = input<Color>(Color.parse('#ff0000'), {\n    alias: 'ngpColorSliderDefaultValue',\n  });\n\n  /** Emits when the value changes. */\n  readonly valueChange = output<Color>({\n    alias: 'ngpColorSliderValueChange',\n  });\n\n  /** The channel this slider adjusts. */\n  readonly channel = input<ColorChannel>('hue', {\n    alias: 'ngpColorSliderChannel',\n  });\n\n  /** The color space to operate in. Resolved from the channel/value when not set. */\n  readonly colorSpace = input<ColorSpace | undefined>(undefined, {\n    alias: 'ngpColorSliderColorSpace',\n  });\n\n  /** The orientation of the slider. */\n  readonly orientation = input<NgpOrientation>('horizontal', {\n    alias: 'ngpColorSliderOrientation',\n  });\n\n  /** The disabled state of the slider. */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpColorSliderDisabled',\n    transform: booleanAttribute,\n  });\n\n  protected readonly state = ngpColorSlider({\n    id: this.id,\n    value: this.value,\n    defaultValue: this.defaultValue,\n    channel: this.channel,\n    colorSpace: this.colorSpace,\n    orientation: this.orientation,\n    disabled: this.disabled,\n    onValueChange: value => this.valueChange.emit(value),\n  });\n\n  /** Set the value of the slider. */\n  setValue(value: Color, options?: SetterOptions): void {\n    this.state.setValue(value, options);\n  }\n\n  /** Set the disabled state. */\n  setDisabled(disabled: boolean): void {\n    this.state.setDisabled(disabled);\n  }\n\n  /** Set the orientation. */\n  setOrientation(orientation: NgpOrientation): void {\n    this.state.setOrientation(orientation);\n  }\n}\n","import { ngpSliderTrack } from 'ng-primitives/slider';\nimport { createPrimitive } from 'ng-primitives/state';\n\n/**\n * Public state surface for the Color Slider Track primitive.\n */\nexport interface NgpColorSliderTrackState {}\n\n/**\n * Inputs for configuring the Color Slider Track primitive.\n */\nexport interface NgpColorSliderTrackProps {}\n\nexport const [\n  NgpColorSliderTrackStateToken,\n  ngpColorSliderTrack,\n  injectColorSliderTrackState,\n  provideColorSliderTrackState,\n] = createPrimitive(\n  'NgpColorSliderTrack',\n  ({}: NgpColorSliderTrackProps): NgpColorSliderTrackState => {\n    // Compose the slider track: it registers the track element and handles pointer\n    // interactions that set the value from the click position.\n    ngpSliderTrack({});\n    return {} satisfies NgpColorSliderTrackState;\n  },\n);\n","import { Directive } from '@angular/core';\nimport { provideSliderTrackState } from 'ng-primitives/slider';\nimport { ngpColorSliderTrack, provideColorSliderTrackState } from './color-slider-track-state';\n\n/**\n * Apply the `ngpColorSliderTrack` directive to the element that represents the color slider track.\n * Set its background to `var(--ngp-color-slider-background)` to render the channel gradient.\n */\n@Directive({\n  selector: '[ngpColorSliderTrack]',\n  exportAs: 'ngpColorSliderTrack',\n  providers: [provideColorSliderTrackState(), provideSliderTrackState()],\n})\nexport class NgpColorSliderTrack {\n  constructor() {\n    ngpColorSliderTrack({});\n  }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { ngpSliderThumb } from 'ng-primitives/slider';\nimport { attrBinding, createPrimitive } from 'ng-primitives/state';\nimport { injectColorSliderState } from '../color-slider/color-slider-state';\n\n/**\n * Public state surface for the Color Slider Thumb primitive.\n */\nexport interface NgpColorSliderThumbState {\n  /** Whether the thumb is currently dragging. */\n  readonly dragging: Signal<boolean>;\n  /** Focus the thumb element. */\n  focus(origin?: FocusOrigin): void;\n}\n\n/**\n * Inputs for configuring the Color Slider Thumb primitive.\n */\nexport interface NgpColorSliderThumbProps {\n  /** Callback fired when dragging starts. */\n  readonly onDragStart?: () => void;\n  /** Callback fired when dragging ends. */\n  readonly onDragEnd?: () => void;\n}\n\nexport const [\n  NgpColorSliderThumbStateToken,\n  ngpColorSliderThumb,\n  injectColorSliderThumbState,\n  provideColorSliderThumbState,\n] = createPrimitive(\n  'NgpColorSliderThumb',\n  ({ onDragStart, onDragEnd }: NgpColorSliderThumbProps): NgpColorSliderThumbState => {\n    const element = injectElementRef<HTMLElement>();\n    const color = injectColorSliderState();\n\n    // Compose the slider thumb: it owns role=slider, aria-value*, keyboard, drag and focus.\n    const thumb = ngpSliderThumb({ onDragStart, onDragEnd });\n\n    // Name and describe the slider in terms of the color channel for screen readers.\n    attrBinding(element, 'aria-label', () => color().channel());\n    attrBinding(\n      element,\n      'aria-valuetext',\n      () => `${color().channel()} ${Math.round(color().channelValue())}`,\n    );\n\n    return thumb;\n  },\n);\n","import { Directive, output } from '@angular/core';\nimport { provideSliderThumbState } from 'ng-primitives/slider';\nimport { ngpColorSliderThumb, provideColorSliderThumbState } from './color-slider-thumb-state';\n\n/**\n * Apply the `ngpColorSliderThumb` directive to the element that represents the color slider thumb.\n */\n@Directive({\n  selector: '[ngpColorSliderThumb]',\n  exportAs: 'ngpColorSliderThumb',\n  providers: [provideColorSliderThumbState(), provideSliderThumbState()],\n})\nexport class NgpColorSliderThumb {\n  /** Emits when the thumb drag starts. */\n  readonly dragStart = output<void>({\n    alias: 'ngpColorSliderThumbDragStart',\n  });\n\n  /** Emits when the thumb drag ends. */\n  readonly dragEnd = output<void>({\n    alias: 'ngpColorSliderThumbDragEnd',\n  });\n\n  constructor() {\n    ngpColorSliderThumb({\n      onDragStart: () => this.dragStart.emit(),\n      onDragEnd: () => this.dragEnd.emit(),\n    });\n  }\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { DOCUMENT } from '@angular/common';\nimport {\n  computed,\n  ElementRef,\n  inject,\n  Injector,\n  Signal,\n  signal,\n  WritableSignal,\n} from '@angular/core';\nimport { ngpFormControl } from 'ng-primitives/form-field';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  controlled,\n  controlledState,\n  createPrimitive,\n  dataBinding,\n  emitter,\n  listener,\n  SetterOptions,\n  styleBinding,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\nimport { injectColorPickerState } from '../color-picker/color-picker-state';\nimport { Color, ColorChannel, ColorChannelRange, ColorSpace } from '../color/color';\n\n/**\n * Public state surface for the Color Area primitive - a 2D surface adjusting two channels\n * of a color value against a gradient background.\n */\nexport interface NgpColorAreaState {\n  /** The id of the area. */\n  readonly id: Signal<string>;\n  /** The current color value (the parent picker's value when inside one). */\n  readonly value: Signal<Color>;\n  /** The channel mapped to the horizontal axis. */\n  readonly xChannel: Signal<ColorChannel>;\n  /** The channel mapped to the vertical axis. */\n  readonly yChannel: Signal<ColorChannel>;\n  /** The color space the area operates in. */\n  readonly colorSpace: Signal<ColorSpace>;\n  /** The current value of the x channel. */\n  readonly xValue: Signal<number>;\n  /** The current value of the y channel. */\n  readonly yValue: Signal<number>;\n  /** The range of the x channel. */\n  readonly xRange: Signal<ColorChannelRange>;\n  /** The range of the y channel. */\n  readonly yRange: Signal<ColorChannelRange>;\n  /** The thumb horizontal position as a percentage (0-100). */\n  readonly xPercentage: Signal<number>;\n  /** The thumb vertical position as a percentage (0-100, 0 = top). */\n  readonly yPercentage: Signal<number>;\n  /** A CSS background representing the 2D gradient. */\n  readonly gradient: Signal<string>;\n  /** Whether the area is disabled (includes form control state). */\n  readonly disabled: WritableSignal<boolean>;\n  /** @internal The thumb element reference. */\n  readonly thumb: Signal<ElementRef<HTMLElement> | undefined>;\n  /** Emits when the value changes. */\n  readonly valueChange: Observable<Color>;\n  /** Set the full color value. */\n  setValue(value: Color, options?: SetterOptions): void;\n  /** Set both channels to values (clamped + stepped). */\n  setChannels(xValue: number, yValue: number, options?: SetterOptions): void;\n  /** Adjust a single channel by a delta (clamped + stepped). */\n  adjustChannel(channel: ColorChannel, delta: number, options?: SetterOptions): void;\n  /** @internal Register the thumb element. */\n  setThumb(thumb: ElementRef<HTMLElement> | undefined): void;\n  /** Focus the thumb element. */\n  focusThumb(origin: FocusOrigin): void;\n  /** Set the disabled state. */\n  setDisabled(disabled: boolean): void;\n\n  /** Set the default value used in uncontrolled mode. */\n  setDefaultValue(value: Color): void;\n}\n\n/**\n * Inputs for configuring the Color Area primitive.\n */\nexport interface NgpColorAreaProps {\n  readonly id?: Signal<string>;\n  readonly value?: Signal<Color | undefined>;\n  /** The default color value for uncontrolled usage. */\n  readonly defaultValue?: Signal<Color>;\n  readonly xChannel?: Signal<ColorChannel>;\n  readonly yChannel?: Signal<ColorChannel>;\n  readonly colorSpace?: Signal<ColorSpace | undefined>;\n  readonly disabled?: Signal<boolean>;\n  readonly onValueChange?: (value: Color) => void;\n}\n\nconst spaceOfChannel: Record<ColorChannel, ColorSpace | undefined> = {\n  red: 'rgb',\n  green: 'rgb',\n  blue: 'rgb',\n  lightness: 'hsl',\n  brightness: 'hsb',\n  hue: undefined,\n  saturation: undefined,\n  alpha: undefined,\n};\n\n/** Resolve the working space from the two channels, an explicit override, and the value's space. */\nfunction resolveColorSpace(\n  xChannel: ColorChannel,\n  yChannel: ColorChannel,\n  explicit: ColorSpace | undefined,\n  valueSpace: ColorSpace,\n): ColorSpace {\n  return explicit ?? spaceOfChannel[xChannel] ?? spaceOfChannel[yChannel] ?? valueSpace;\n}\n\nfunction clampStep(value: number, { min, max, step }: ColorChannelRange): number {\n  const clamped = Math.min(max, Math.max(min, value));\n  const stepped = Math.round((clamped - min) / step) * step + min;\n  return Math.min(max, Math.max(min, stepped));\n}\n\nfunction percentage(value: number, { min, max }: ColorChannelRange): number {\n  const range = max - min;\n  return range <= 0 ? 0 : Math.min(100, Math.max(0, ((value - min) / range) * 100));\n}\n\nexport const [NgpColorAreaStateToken, ngpColorArea, injectColorAreaState, provideColorAreaState] =\n  createPrimitive(\n    'NgpColorArea',\n    ({\n      id = signal(uniqueId('ngp-color-area')),\n      value: _value = signal<Color | undefined>(undefined),\n      defaultValue: _defaultValue,\n      xChannel = signal<ColorChannel>('saturation'),\n      yChannel = signal<ColorChannel>('brightness'),\n      colorSpace: _colorSpace = signal<ColorSpace | undefined>(undefined),\n      disabled: _disabled = signal(false),\n      onValueChange,\n    }: NgpColorAreaProps): NgpColorAreaState => {\n      const element = injectElementRef<HTMLElement>();\n      const focusMonitor = inject(FocusMonitor);\n      const injector = inject(Injector);\n      const document = inject(DOCUMENT);\n      // Bind to a parent color picker when present, otherwise own the value locally.\n      const picker = injectColorPickerState({ optional: true });\n      const defaultValue = controlled(_defaultValue, Color.parse('hsb(0, 100%, 100%)'));\n      const [local, setLocal] = controlledState<Color>({ value: _value, defaultValue });\n      const value = computed(() => picker()?.value() ?? local());\n      const disabled = controlled(_disabled);\n      const valueChange = emitter<Color>();\n      const thumb = signal<ElementRef<HTMLElement> | undefined>(undefined);\n\n      const status = ngpFormControl({ id, disabled });\n\n      const colorSpace = computed(() =>\n        resolveColorSpace(xChannel(), yChannel(), _colorSpace(), value().getColorSpace()),\n      );\n      const converted = computed(() => value().toFormat(colorSpace()));\n      const xRange = computed(() => converted().getChannelRange(xChannel()));\n      const yRange = computed(() => converted().getChannelRange(yChannel()));\n      const xValue = computed(() => converted().getChannelValue(xChannel()));\n      const yValue = computed(() => converted().getChannelValue(yChannel()));\n      const xPercentage = computed(() => percentage(xValue(), xRange()));\n      const yPercentage = computed(() => percentage(yValue(), yRange()));\n\n      const gradient = computed(() =>\n        areaGradient(converted(), xChannel(), yChannel(), xRange(), yRange()),\n      );\n\n      // Host bindings\n      attrBinding(element, 'id', id);\n      dataBinding(element, 'data-disabled', () => status().disabled);\n      styleBinding(element, '--ngp-color-area-background', gradient);\n\n      let dragging = false;\n      let activePointerId: number | null = null;\n      let cleanup: (() => void)[] = [];\n\n      // Pointer down anywhere on the surface positions the thumb and begins a drag.\n      listener(element, 'pointerdown', (event: PointerEvent) => {\n        if (status().disabled) {\n          return;\n        }\n        event.preventDefault();\n        dragging = true;\n        activePointerId = event.pointerId;\n        setFromPointer(event);\n        focusThumb(event.pointerType === 'touch' ? 'touch' : 'mouse');\n\n        cleanup.forEach(fn => fn());\n        cleanup = [\n          listener(document, 'pointermove', onPointerMove, { config: false, injector }),\n          listener(document, 'pointerup', onPointerEnd, { config: false, injector }),\n          listener(document, 'pointercancel', onPointerEnd, { config: false, injector }),\n        ];\n      });\n\n      function onPointerMove(event: PointerEvent): void {\n        if (status().disabled || !dragging || event.pointerId !== activePointerId) {\n          return;\n        }\n        setFromPointer(event);\n      }\n\n      function onPointerEnd(event: PointerEvent): void {\n        if (event.pointerId !== activePointerId) {\n          return;\n        }\n        dragging = false;\n        activePointerId = null;\n        cleanup.forEach(fn => fn());\n        cleanup = [];\n      }\n\n      function setFromPointer(event: PointerEvent): void {\n        const rect = element.nativeElement.getBoundingClientRect();\n        const xPct = rect.width === 0 ? 0 : (event.clientX - rect.left) / rect.width;\n        // invert y so the top of the surface is the channel maximum\n        const yPct = rect.height === 0 ? 0 : 1 - (event.clientY - rect.top) / rect.height;\n        const x = xRange().min + (xRange().max - xRange().min) * Math.max(0, Math.min(1, xPct));\n        const y = yRange().min + (yRange().max - yRange().min) * Math.max(0, Math.min(1, yPct));\n        setChannels(x, y);\n      }\n\n      function setValue(newValue: Color, options?: SetterOptions): void {\n        const parent = picker();\n        if (parent) {\n          parent.setValue(newValue, options);\n        } else {\n          setLocal(newValue, { emit: false });\n        }\n        if (options?.emit !== false) {\n          onValueChange?.(newValue);\n          valueChange.emit(newValue);\n        }\n      }\n\n      function setChannels(x: number, y: number, options?: SetterOptions): void {\n        const newColor = converted()\n          .withChannelValue(xChannel(), clampStep(x, xRange()))\n          .withChannelValue(yChannel(), clampStep(y, yRange()));\n        setValue(newColor, options);\n      }\n\n      function adjustChannel(channel: ColorChannel, delta: number, options?: SetterOptions): void {\n        const range = channel === xChannel() ? xRange() : yRange();\n        const current = channel === xChannel() ? xValue() : yValue();\n        setValue(converted().withChannelValue(channel, clampStep(current + delta, range)), options);\n      }\n\n      function setThumb(newThumb: ElementRef<HTMLElement> | undefined): void {\n        thumb.set(newThumb);\n      }\n\n      function focusThumb(origin: FocusOrigin): void {\n        const el = thumb();\n        if (el) {\n          focusMonitor.focusVia(el, origin, { preventScroll: true });\n        }\n      }\n\n      function setDisabled(isDisabled: boolean): void {\n        disabled.set(isDisabled);\n      }\n\n      return {\n        id,\n        value,\n        xChannel,\n        yChannel,\n        colorSpace,\n        xValue,\n        yValue,\n        xRange,\n        yRange,\n        xPercentage,\n        yPercentage,\n        gradient,\n        disabled,\n        thumb,\n        valueChange: valueChange.asObservable(),\n        setValue,\n        setDefaultValue: defaultValue.set,\n        setChannels,\n        adjustChannel,\n        setThumb,\n        focusThumb,\n        setDisabled,\n      } satisfies NgpColorAreaState;\n    },\n  );\n\n/**\n * Build a CSS background for the 2D area.\n * ponytail: tuned for the default saturation(x)×brightness(y) square (the overwhelmingly common\n * pairing) — a white→transparent horizontal layer and a transparent→black vertical layer over the\n * full-strength base color. Consumers can override `--ngp-color-area-background` for other pairings.\n */\nfunction areaGradient(\n  color: Color,\n  xChannel: ColorChannel,\n  yChannel: ColorChannel,\n  xRange: ColorChannelRange,\n  yRange: ColorChannelRange,\n): string {\n  const base = color\n    .withChannelValue(xChannel, xRange.max)\n    .withChannelValue(yChannel, yRange.max)\n    .toRgb();\n  return `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent), ${base}`;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport { SetterOptions } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Color, ColorChannel, ColorSpace } from '../color/color';\nimport { ngpColorArea, provideColorAreaState } from './color-area-state';\n\n/**\n * Apply the `ngpColorArea` directive to a 2D surface that adjusts two channels of a color value.\n * The surface should set its background to `var(--ngp-color-area-background)` and contain a thumb.\n */\n@Directive({\n  selector: '[ngpColorArea]',\n  exportAs: 'ngpColorArea',\n  providers: [provideColorAreaState()],\n})\nexport class NgpColorArea {\n  /** The id of the area. */\n  readonly id = input<string>(uniqueId('ngp-color-area'));\n\n  /** The color value. */\n  readonly value = input<Color | undefined>(undefined, {\n    alias: 'ngpColorAreaValue',\n  });\n\n  /** The default color value for uncontrolled usage. */\n  readonly defaultValue = input<Color>(Color.parse('hsb(0, 100%, 100%)'), {\n    alias: 'ngpColorAreaDefaultValue',\n  });\n\n  /** Emits when the value changes. */\n  readonly valueChange = output<Color>({\n    alias: 'ngpColorAreaValueChange',\n  });\n\n  /** The channel mapped to the horizontal axis. */\n  readonly xChannel = input<ColorChannel>('saturation', {\n    alias: 'ngpColorAreaXChannel',\n  });\n\n  /** The channel mapped to the vertical axis. */\n  readonly yChannel = input<ColorChannel>('brightness', {\n    alias: 'ngpColorAreaYChannel',\n  });\n\n  /** The color space to operate in. Resolved from the channels/value when not set. */\n  readonly colorSpace = input<ColorSpace | undefined>(undefined, {\n    alias: 'ngpColorAreaColorSpace',\n  });\n\n  /** The disabled state of the area. */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpColorAreaDisabled',\n    transform: booleanAttribute,\n  });\n\n  protected readonly state = ngpColorArea({\n    id: this.id,\n    value: this.value,\n    defaultValue: this.defaultValue,\n    xChannel: this.xChannel,\n    yChannel: this.yChannel,\n    colorSpace: this.colorSpace,\n    disabled: this.disabled,\n    onValueChange: value => this.valueChange.emit(value),\n  });\n\n  /** Set the value of the area. */\n  setValue(value: Color, options?: SetterOptions): void {\n    this.state.setValue(value, options);\n  }\n\n  /** Set the disabled state. */\n  setDisabled(disabled: boolean): void {\n    this.state.setDisabled(disabled);\n  }\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { computed, inject } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  createPrimitive,\n  dataBinding,\n  listener,\n  onDestroy,\n  styleBinding,\n} from 'ng-primitives/state';\nimport { injectColorAreaState } from '../color-area/color-area-state';\n\ntype AreaKey = 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown';\n\n/**\n * Public state surface for the Color Area Thumb primitive.\n */\nexport interface NgpColorAreaThumbState {\n  /** Focus the thumb element. */\n  focus(origin?: FocusOrigin): void;\n}\n\n/**\n * Inputs for configuring the Color Area Thumb primitive.\n */\nexport interface NgpColorAreaThumbProps {}\n\nexport const [\n  NgpColorAreaThumbStateToken,\n  ngpColorAreaThumb,\n  injectColorAreaThumbState,\n  provideColorAreaThumbState,\n] = createPrimitive('NgpColorAreaThumb', ({}: NgpColorAreaThumbProps): NgpColorAreaThumbState => {\n  const element = injectElementRef<HTMLElement>();\n  const area = injectColorAreaState();\n  const focusMonitor = inject(FocusMonitor);\n\n  const tabindex = computed(() => (area().disabled() ? -1 : 0));\n\n  // Host bindings. A color area is a 2D control with no single ARIA role, so we expose a\n  // slider whose aria-valuetext describes both channels (aria-valuenow tracks the x channel).\n  attrBinding(element, 'role', 'slider');\n  attrBinding(element, 'aria-label', () => `${area().xChannel()} and ${area().yChannel()}`);\n  attrBinding(element, 'aria-valuemin', () => area().xRange().min.toString());\n  attrBinding(element, 'aria-valuemax', () => area().xRange().max.toString());\n  attrBinding(element, 'aria-valuenow', () => Math.round(area().xValue()).toString());\n  attrBinding(\n    element,\n    'aria-valuetext',\n    () =>\n      `${area().xChannel()} ${Math.round(area().xValue())}, ${area().yChannel()} ${Math.round(\n        area().yValue(),\n      )}`,\n  );\n  attrBinding(element, 'tabindex', () => tabindex().toString());\n  dataBinding(element, 'data-disabled', () => area().disabled());\n  styleBinding(element, 'inset-inline-start.%', () => area().xPercentage());\n  styleBinding(element, 'inset-block-start.%', () => 100 - area().yPercentage());\n\n  ngpInteractions({\n    hover: true,\n    focusVisible: true,\n    press: true,\n    disabled: area().disabled,\n  });\n\n  area().setThumb(element);\n  onDestroy(() => area().setThumb(undefined));\n\n  // Keyboard: arrows move in 2D (x = left/right, y = up/down), shift for a x10 step.\n  listener(element, 'keydown', (event: KeyboardEvent) => {\n    if (area().disabled()) {\n      return;\n    }\n\n    const isRTL = getComputedStyle(element.nativeElement).direction === 'rtl';\n    const multiplier = event.shiftKey ? 10 : 1;\n\n    switch (event.key as AreaKey) {\n      case 'ArrowLeft':\n        area().adjustChannel(\n          area().xChannel(),\n          (isRTL ? 1 : -1) * area().xRange().step * multiplier,\n        );\n        break;\n      case 'ArrowRight':\n        area().adjustChannel(\n          area().xChannel(),\n          (isRTL ? -1 : 1) * area().xRange().step * multiplier,\n        );\n        break;\n      case 'ArrowUp':\n        area().adjustChannel(area().yChannel(), area().yRange().step * multiplier);\n        break;\n      case 'ArrowDown':\n        area().adjustChannel(area().yChannel(), -area().yRange().step * multiplier);\n        break;\n      default:\n        return;\n    }\n\n    event.preventDefault();\n  });\n\n  function focus(origin: FocusOrigin = 'program'): void {\n    focusMonitor.focusVia(element, origin, { preventScroll: true });\n  }\n\n  return { focus } satisfies NgpColorAreaThumbState;\n});\n","import { Directive } from '@angular/core';\nimport { ngpColorAreaThumb, provideColorAreaThumbState } from './color-area-thumb-state';\n\n/**\n * Apply the `ngpColorAreaThumb` directive to the element that represents the color area thumb.\n */\n@Directive({\n  selector: '[ngpColorAreaThumb]',\n  exportAs: 'ngpColorAreaThumb',\n  providers: [provideColorAreaThumbState()],\n})\nexport class NgpColorAreaThumb {\n  constructor() {\n    ngpColorAreaThumb({});\n  }\n}\n","import { computed, effect, Signal, signal, WritableSignal } from '@angular/core';\nimport { ngpInput } from 'ng-primitives/input';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  controlled,\n  controlledState,\n  createPrimitive,\n  emitter,\n  listener,\n  SetterOptions,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\nimport { injectColorPickerState } from '../color-picker/color-picker-state';\nimport { Color, ColorChannel, ColorChannelRange, ColorSpace } from '../color/color';\n\nexport type NgpColorFieldMode = 'hex' | 'channel';\n\n/**\n * Public state surface for the Color Field primitive - a text input that edits a color as a hex\n * string, or a single channel as a number.\n */\nexport interface NgpColorFieldState {\n  /** The id of the field. */\n  readonly id: Signal<string>;\n  /** The current color value (the parent picker's value when inside one). */\n  readonly value: Signal<Color>;\n  /** The editing mode - `hex` (whole color) or `channel` (single channel number). */\n  readonly mode: Signal<NgpColorFieldMode>;\n  /** The channel being edited, when in channel mode. */\n  readonly channel: Signal<ColorChannel | undefined>;\n  /** Whether the field is disabled. */\n  readonly disabled: WritableSignal<boolean>;\n  /** Emits when the value changes. */\n  readonly valueChange: Observable<Color>;\n  /** Set the full color value. */\n  setValue(value: Color, options?: SetterOptions): void;\n  /** Set the disabled state. */\n  setDisabled(disabled: boolean): void;\n\n  /** Set the default value used in uncontrolled mode. */\n  setDefaultValue(value: Color): void;\n}\n\n/**\n * Inputs for configuring the Color Field primitive.\n */\nexport interface NgpColorFieldProps {\n  readonly id?: Signal<string>;\n  readonly value?: Signal<Color | undefined>;\n  /** The default color value for uncontrolled usage. */\n  readonly defaultValue?: Signal<Color>;\n  readonly channel?: Signal<ColorChannel | undefined>;\n  readonly colorSpace?: Signal<ColorSpace | undefined>;\n  readonly disabled?: Signal<boolean>;\n  readonly onValueChange?: (value: Color) => void;\n}\n\nfunction spaceForChannel(channel: ColorChannel, valueSpace: ColorSpace): ColorSpace {\n  switch (channel) {\n    case 'red':\n    case 'green':\n    case 'blue':\n      return 'rgb';\n    case 'lightness':\n      return 'hsl';\n    case 'brightness':\n      return 'hsb';\n    case 'hue':\n    case 'saturation':\n      return valueSpace === 'hsl' ? 'hsl' : 'hsb';\n    case 'alpha':\n      return valueSpace;\n  }\n}\n\nfunction clampStep(value: number, { min, max, step }: ColorChannelRange): number {\n  const clamped = Math.min(max, Math.max(min, value));\n  const stepped = Math.round((clamped - min) / step) * step + min;\n  return Math.min(max, Math.max(min, stepped));\n}\n\nexport const [\n  NgpColorFieldStateToken,\n  ngpColorField,\n  injectColorFieldState,\n  provideColorFieldState,\n] = createPrimitive(\n  'NgpColorField',\n  ({\n    id = signal(uniqueId('ngp-color-field')),\n    value: _value = signal<Color | undefined>(undefined),\n    defaultValue: _defaultValue,\n    channel = signal<ColorChannel | undefined>(undefined),\n    colorSpace: _colorSpace = signal<ColorSpace | undefined>(undefined),\n    disabled = signal(false),\n    onValueChange,\n  }: NgpColorFieldProps): NgpColorFieldState => {\n    const element = injectElementRef<HTMLInputElement>();\n    // Bind to a parent color picker when present, otherwise own the value locally.\n    const picker = injectColorPickerState({ optional: true });\n    const defaultValue = controlled(_defaultValue, Color.parse('#ff0000'));\n    const [local, setLocal] = controlledState<Color>({ value: _value, defaultValue });\n    const value = computed(() => picker()?.value() ?? local());\n    const valueChange = emitter<Color>();\n\n    // Compose the base input primitive (form control, interactions, disabled binding).\n    const input = ngpInput({ id, disabled });\n\n    const mode = computed<NgpColorFieldMode>(() => (channel() ? 'channel' : 'hex'));\n\n    // channel-mode derivations (only read while in channel mode)\n    const colorSpace = computed(\n      () => _colorSpace() ?? spaceForChannel(channel()!, value().getColorSpace()),\n    );\n    const converted = computed(() => value().toFormat(colorSpace()));\n    const channelRange = computed(() => converted().getChannelRange(channel()!));\n    const channelValue = computed(() => converted().getChannelValue(channel()!));\n\n    const displayValue = computed(() => {\n      if (mode() === 'hex') {\n        const color = value();\n        return color.getChannelValue('alpha') < 1 ? color.toHexa() : color.toHex();\n      }\n      // integer channels round to whole numbers; the fractional alpha channel (step 0.01) keeps 2dp\n      return Number.isInteger(channelRange().step)\n        ? String(Math.round(channelValue()))\n        : String(Math.round(channelValue() * 100) / 100);\n    });\n\n    // Native input has no ARIA role of its own to add; hint the keyboard/autocomplete.\n    attrBinding(element, 'inputmode', () => (mode() === 'channel' ? 'numeric' : 'text'));\n    attrBinding(element, 'autocomplete', 'off');\n    attrBinding(element, 'spellcheck', 'false');\n\n    let focused = false;\n\n    function render(): void {\n      element.nativeElement.value = displayValue();\n    }\n\n    // Reflect external value changes into the input while the user is not editing.\n    effect(() => {\n      displayValue();\n      if (!focused) {\n        render();\n      }\n    });\n\n    function setValue(newValue: Color, options?: SetterOptions): void {\n      const parent = picker();\n      if (parent) {\n        parent.setValue(newValue, options);\n      } else {\n        setLocal(newValue, { emit: false });\n      }\n      if (options?.emit !== false) {\n        onValueChange?.(newValue);\n        valueChange.emit(newValue);\n      }\n    }\n\n    function parseInput(raw: string): Color | null {\n      const text = raw.trim();\n      if (mode() === 'hex') {\n        try {\n          return Color.parse(text.startsWith('#') ? text : `#${text}`);\n        } catch {\n          return null;\n        }\n      }\n      if (text === '' || Number.isNaN(Number(text))) {\n        return null;\n      }\n      return converted().withChannelValue(channel()!, clampStep(Number(text), channelRange()));\n    }\n\n    function commit(): void {\n      const parsed = parseInput(element.nativeElement.value);\n      if (parsed) {\n        setValue(parsed);\n      }\n      // reformat to the canonical representation (also reverts invalid input)\n      render();\n    }\n\n    // Restrict typed characters to the current mode.\n    listener(element, 'input', () => {\n      const current = element.nativeElement.value;\n      const cleaned =\n        mode() === 'hex' ? current.replace(/[^#0-9a-fA-F]/g, '') : current.replace(/[^0-9.]/g, '');\n      // ponytail: naive sanitize resets the caret to the end — fine for these short fields.\n      if (cleaned !== current) {\n        element.nativeElement.value = cleaned;\n      }\n    });\n\n    listener(element, 'keydown', (event: KeyboardEvent) => {\n      if (input.disabled()) {\n        return;\n      }\n      if (mode() === 'channel' && (event.key === 'ArrowUp' || event.key === 'ArrowDown')) {\n        event.preventDefault();\n        const delta =\n          (event.key === 'ArrowUp' ? 1 : -1) * channelRange().step * (event.shiftKey ? 10 : 1);\n        setValue(\n          converted().withChannelValue(\n            channel()!,\n            clampStep(channelValue() + delta, channelRange()),\n          ),\n        );\n        render();\n        return;\n      }\n      if (event.key === 'Enter') {\n        commit();\n      }\n    });\n\n    listener(element, 'focus', () => {\n      focused = true;\n      element.nativeElement.select();\n    });\n\n    listener(element, 'blur', () => {\n      focused = false;\n      commit();\n    });\n\n    function setDisabled(isDisabled: boolean): void {\n      input.setDisabled(isDisabled);\n    }\n\n    return {\n      id,\n      value,\n      mode,\n      channel,\n      disabled: input.disabled,\n      valueChange: valueChange.asObservable(),\n      setValue,\n      setDefaultValue: defaultValue.set,\n      setDisabled,\n    } satisfies NgpColorFieldState;\n  },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport { provideInputState } from 'ng-primitives/input';\nimport { SetterOptions } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Color, ColorChannel, ColorSpace } from '../color/color';\nimport { ngpColorField, provideColorFieldState } from './color-field-state';\n\n/**\n * Apply the `ngpColorField` directive to an `input` element to edit a color. Without a channel it\n * edits the whole color as a hex string; with a channel it edits that single channel as a number.\n * It composes the input primitive, so it provides the input state.\n */\n@Directive({\n  selector: 'input[ngpColorField]',\n  exportAs: 'ngpColorField',\n  providers: [provideColorFieldState(), provideInputState({ inherit: false })],\n})\nexport class NgpColorField {\n  /** The id of the field. */\n  readonly id = input<string>(uniqueId('ngp-color-field'));\n\n  /** The color value. */\n  readonly value = input<Color | undefined>(undefined, {\n    alias: 'ngpColorFieldValue',\n  });\n\n  /** The default color value for uncontrolled usage. */\n  readonly defaultValue = input<Color>(Color.parse('#ff0000'), {\n    alias: 'ngpColorFieldDefaultValue',\n  });\n\n  /** Emits when the value changes. */\n  readonly valueChange = output<Color>({\n    alias: 'ngpColorFieldValueChange',\n  });\n\n  /** The channel to edit. When omitted, the field edits the whole color as hex. */\n  readonly channel = input<ColorChannel | undefined>(undefined, {\n    alias: 'ngpColorFieldChannel',\n  });\n\n  /** The color space for channel mode. Resolved from the channel/value when not set. */\n  readonly colorSpace = input<ColorSpace | undefined>(undefined, {\n    alias: 'ngpColorFieldColorSpace',\n  });\n\n  /** The disabled state of the field. */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpColorFieldDisabled',\n    transform: booleanAttribute,\n  });\n\n  protected readonly state = ngpColorField({\n    id: this.id,\n    value: this.value,\n    defaultValue: this.defaultValue,\n    channel: this.channel,\n    colorSpace: this.colorSpace,\n    disabled: this.disabled,\n    onValueChange: value => this.valueChange.emit(value),\n  });\n\n  /** Set the value of the field. */\n  setValue(value: Color, options?: SetterOptions): void {\n    this.state.setValue(value, options);\n  }\n\n  /** Set the disabled state. */\n  setDisabled(disabled: boolean): void {\n    this.state.setDisabled(disabled);\n  }\n}\n","import { Directive, input, output } from '@angular/core';\nimport { SetterOptions } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Color } from '../color/color';\nimport { ngpColorPicker, provideColorPickerState } from './color-picker-state';\n\n/**\n * Apply the `ngpColorPicker` directive to a container that coordinates a single color value across\n * child color components. Child areas, sliders and fields bind to the picker's value automatically.\n */\n@Directive({\n  selector: '[ngpColorPicker]',\n  exportAs: 'ngpColorPicker',\n  providers: [provideColorPickerState()],\n})\nexport class NgpColorPicker {\n  /** The id of the picker. */\n  readonly id = input<string>(uniqueId('ngp-color-picker'));\n\n  /** The color value. When defined the picker is controlled. */\n  readonly value = input<Color | undefined>(undefined, {\n    alias: 'ngpColorPickerValue',\n  });\n\n  /** The default color value for uncontrolled usage. */\n  readonly defaultValue = input<Color>(Color.parse('#ff0000'), {\n    alias: 'ngpColorPickerDefaultValue',\n  });\n\n  /** Emits when the value changes. */\n  readonly valueChange = output<Color>({\n    alias: 'ngpColorPickerValueChange',\n  });\n\n  protected readonly state = ngpColorPicker({\n    id: this.id,\n    value: this.value,\n    defaultValue: this.defaultValue,\n    onValueChange: value => this.valueChange.emit(value),\n  });\n\n  /** Set the value of the picker. */\n  setValue(value: Color, options?: SetterOptions): void {\n    this.state.setValue(value, options);\n  }\n}\n","import { computed, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, styleBinding } from 'ng-primitives/state';\nimport { injectColorPickerState } from '../color-picker/color-picker-state';\nimport { Color } from '../color/color';\n\n/**\n * Public state surface for the Color Swatch primitive - a non-interactive preview of a color.\n */\nexport interface NgpColorSwatchState {\n  /** The color being displayed. */\n  readonly color: Signal<Color>;\n}\n\n/**\n * Inputs for configuring the Color Swatch primitive.\n */\nexport interface NgpColorSwatchProps {\n  /** The color to display. Falls back to the parent picker's value when omitted. */\n  readonly color?: Signal<Color | undefined>;\n  /** An accessible label. Defaults to the color's hex string. */\n  readonly label?: Signal<string | undefined>;\n}\n\nexport const [\n  NgpColorSwatchStateToken,\n  ngpColorSwatch,\n  injectColorSwatchState,\n  provideColorSwatchState,\n] = createPrimitive(\n  'NgpColorSwatch',\n  ({ color: _color, label }: NgpColorSwatchProps): NgpColorSwatchState => {\n    const element = injectElementRef<HTMLElement>();\n    const picker = injectColorPickerState({ optional: true });\n\n    const color = computed(() => _color?.() ?? picker()?.value() ?? Color.parse('#000000'));\n\n    // A swatch is a picture of a color for assistive tech.\n    attrBinding(element, 'role', 'img');\n    attrBinding(element, 'aria-label', () => label?.() ?? color().toHex());\n    // Expose the color (with alpha) as a custom property to opt into as a background.\n    styleBinding(element, '--ngp-color-swatch-color', () => color().toRgba());\n\n    return { color } satisfies NgpColorSwatchState;\n  },\n);\n","import { Directive, input } from '@angular/core';\nimport { Color } from '../color/color';\nimport { ngpColorSwatch, provideColorSwatchState } from './color-swatch-state';\n\n/**\n * Apply the `ngpColorSwatch` directive to an element to display a color preview. Set its background to\n * `var(--ngp-color-swatch-color)`. Inside a color picker it shows the picker's value by default.\n */\n@Directive({\n  selector: '[ngpColorSwatch]',\n  exportAs: 'ngpColorSwatch',\n  providers: [provideColorSwatchState()],\n})\nexport class NgpColorSwatch {\n  /** The color to display. Falls back to the parent picker's value when omitted. */\n  readonly color = input<Color | undefined, Color | '' | undefined>(undefined, {\n    alias: 'ngpColorSwatch',\n    // an empty/bare attribute means \"no explicit color\" — fall back to the parent picker\n    transform: value => value || undefined,\n  });\n\n  /** An accessible label. Defaults to the color's hex string. */\n  readonly label = input<string | undefined>(undefined, {\n    alias: 'ngpColorSwatchLabel',\n  });\n\n  protected readonly state = ngpColorSwatch({\n    color: this.color,\n    label: this.label,\n  });\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { DOCUMENT } from '@angular/common';\nimport {\n  computed,\n  ElementRef,\n  inject,\n  Injector,\n  Signal,\n  signal,\n  WritableSignal,\n} from '@angular/core';\nimport { ngpFormControl } from 'ng-primitives/form-field';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  controlled,\n  controlledState,\n  createPrimitive,\n  dataBinding,\n  emitter,\n  listener,\n  SetterOptions,\n  styleBinding,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\nimport { injectColorPickerState } from '../color-picker/color-picker-state';\nimport { Color, ColorSpace } from '../color/color';\n\n/**\n * Public state surface for the Color Wheel primitive - a circular control adjusting the hue channel.\n */\nexport interface NgpColorWheelState {\n  /** The id of the wheel. */\n  readonly id: Signal<string>;\n  /** The current color value (the parent picker's value when inside one). */\n  readonly value: Signal<Color>;\n  /** The color space the wheel operates in. */\n  readonly colorSpace: Signal<ColorSpace>;\n  /** The current hue in degrees (0-360). */\n  readonly hue: Signal<number>;\n  /** A conic-gradient of the full hue spectrum. */\n  readonly gradient: Signal<string>;\n  /** Whether the wheel is disabled (includes form control state). */\n  readonly disabled: WritableSignal<boolean>;\n  /** @internal The thumb element reference. */\n  readonly thumb: Signal<ElementRef<HTMLElement> | undefined>;\n  /** Emits when the value changes. */\n  readonly valueChange: Observable<Color>;\n  /** Set the full color value. */\n  setValue(value: Color, options?: SetterOptions): void;\n  /** Set the hue to a value in degrees (clamped 0-360). */\n  setHue(hue: number, options?: SetterOptions): void;\n  /** @internal Register the thumb element. */\n  setThumb(thumb: ElementRef<HTMLElement> | undefined): void;\n  /** Focus the thumb element. */\n  focusThumb(origin: FocusOrigin): void;\n  /** Set the disabled state. */\n  setDisabled(disabled: boolean): void;\n\n  /** Set the default value used in uncontrolled mode. */\n  setDefaultValue(value: Color): void;\n}\n\n/**\n * Inputs for configuring the Color Wheel primitive.\n */\nexport interface NgpColorWheelProps {\n  readonly id?: Signal<string>;\n  readonly value?: Signal<Color | undefined>;\n  /** The default color value for uncontrolled usage. */\n  readonly defaultValue?: Signal<Color>;\n  readonly colorSpace?: Signal<ColorSpace>;\n  readonly disabled?: Signal<boolean>;\n  readonly onValueChange?: (value: Color) => void;\n}\n\n/** Angle from the top of the circle, measured clockwise, in degrees (0-360). Matches CSS conic-gradient. */\nfunction angleFromCenter(dx: number, dy: number): number {\n  const deg = (Math.atan2(dx, -dy) * 180) / Math.PI;\n  return (deg + 360) % 360;\n}\n\nexport const [\n  NgpColorWheelStateToken,\n  ngpColorWheel,\n  injectColorWheelState,\n  provideColorWheelState,\n] = createPrimitive(\n  'NgpColorWheel',\n  ({\n    id = signal(uniqueId('ngp-color-wheel')),\n    value: _value = signal<Color | undefined>(undefined),\n    defaultValue: _defaultValue,\n    colorSpace = signal<ColorSpace>('hsl'),\n    disabled: _disabled = signal(false),\n    onValueChange,\n  }: NgpColorWheelProps): NgpColorWheelState => {\n    const element = injectElementRef<HTMLElement>();\n    const focusMonitor = inject(FocusMonitor);\n    const injector = inject(Injector);\n    const document = inject(DOCUMENT);\n    const picker = injectColorPickerState({ optional: true });\n    const defaultValue = controlled(_defaultValue, Color.parse('hsl(0, 100%, 50%)'));\n    const [local, setLocal] = controlledState<Color>({ value: _value, defaultValue });\n    const value = computed(() => picker()?.value() ?? local());\n    const disabled = controlled(_disabled);\n    const valueChange = emitter<Color>();\n    const thumb = signal<ElementRef<HTMLElement> | undefined>(undefined);\n\n    const status = ngpFormControl({ id, disabled });\n\n    const converted = computed(() => value().toFormat(colorSpace()));\n    const hue = computed(() => converted().getChannelValue('hue'));\n\n    const gradient = computed(() => hueGradient(converted()));\n\n    // Host bindings\n    attrBinding(element, 'id', id);\n    dataBinding(element, 'data-disabled', () => status().disabled);\n    styleBinding(element, '--ngp-color-wheel-background', gradient);\n    // the hue angle, for positioning the thumb: transform: rotate(var(--ngp-color-wheel-hue)) ...\n    styleBinding(element, '--ngp-color-wheel-hue', () => `${hue()}deg`);\n\n    let dragging = false;\n    let activePointerId: number | null = null;\n    let cleanup: (() => void)[] = [];\n\n    listener(element, 'pointerdown', (event: PointerEvent) => {\n      if (status().disabled) {\n        return;\n      }\n      event.preventDefault();\n      dragging = true;\n      activePointerId = event.pointerId;\n      setFromPointer(event);\n      focusThumb(event.pointerType === 'touch' ? 'touch' : 'mouse');\n\n      cleanup.forEach(fn => fn());\n      cleanup = [\n        listener(document, 'pointermove', onPointerMove, { config: false, injector }),\n        listener(document, 'pointerup', onPointerEnd, { config: false, injector }),\n        listener(document, 'pointercancel', onPointerEnd, { config: false, injector }),\n      ];\n    });\n\n    function onPointerMove(event: PointerEvent): void {\n      if (status().disabled || !dragging || event.pointerId !== activePointerId) {\n        return;\n      }\n      setFromPointer(event);\n    }\n\n    function onPointerEnd(event: PointerEvent): void {\n      if (event.pointerId !== activePointerId) {\n        return;\n      }\n      dragging = false;\n      activePointerId = null;\n      cleanup.forEach(fn => fn());\n      cleanup = [];\n    }\n\n    function setFromPointer(event: PointerEvent): void {\n      const rect = element.nativeElement.getBoundingClientRect();\n      const dx = event.clientX - (rect.left + rect.width / 2);\n      const dy = event.clientY - (rect.top + rect.height / 2);\n      setHue(angleFromCenter(dx, dy));\n    }\n\n    function setValue(newValue: Color, options?: SetterOptions): void {\n      const parent = picker();\n      if (parent) {\n        parent.setValue(newValue, options);\n      } else {\n        setLocal(newValue, { emit: false });\n      }\n      if (options?.emit !== false) {\n        onValueChange?.(newValue);\n        valueChange.emit(newValue);\n      }\n    }\n\n    function setHue(newHue: number, options?: SetterOptions): void {\n      const clamped = Math.min(360, Math.max(0, Math.round(newHue)));\n      setValue(converted().withChannelValue('hue', clamped), options);\n    }\n\n    function setThumb(newThumb: ElementRef<HTMLElement> | undefined): void {\n      thumb.set(newThumb);\n    }\n\n    function focusThumb(origin: FocusOrigin): void {\n      const el = thumb();\n      if (el) {\n        focusMonitor.focusVia(el, origin, { preventScroll: true });\n      }\n    }\n\n    function setDisabled(isDisabled: boolean): void {\n      disabled.set(isDisabled);\n    }\n\n    return {\n      id,\n      value,\n      colorSpace,\n      hue,\n      gradient,\n      disabled,\n      thumb,\n      valueChange: valueChange.asObservable(),\n      setValue,\n      setDefaultValue: defaultValue.set,\n      setHue,\n      setThumb,\n      focusThumb,\n      setDisabled,\n    } satisfies NgpColorWheelState;\n  },\n);\n\n/** A conic-gradient of the full hue spectrum (red at top, clockwise), matching the thumb angle. */\nfunction hueGradient(color: Color): string {\n  const stops: string[] = [];\n  for (let hue = 0; hue <= 360; hue += 60) {\n    stops.push(color.withChannelValue('hue', hue).toRgb());\n  }\n  return `conic-gradient(${stops.join(', ')})`;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport { SetterOptions } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Color, ColorSpace } from '../color/color';\nimport { ngpColorWheel, provideColorWheelState } from './color-wheel-state';\n\n/**\n * Apply the `ngpColorWheel` directive to a circular element that adjusts the hue channel of a color.\n * Set its background to `var(--ngp-color-wheel-background)` and contain a thumb.\n */\n@Directive({\n  selector: '[ngpColorWheel]',\n  exportAs: 'ngpColorWheel',\n  providers: [provideColorWheelState()],\n})\nexport class NgpColorWheel {\n  /** The id of the wheel. */\n  readonly id = input<string>(uniqueId('ngp-color-wheel'));\n\n  /** The color value. */\n  readonly value = input<Color | undefined>(undefined, {\n    alias: 'ngpColorWheelValue',\n  });\n\n  /** The default color value for uncontrolled usage. */\n  readonly defaultValue = input<Color>(Color.parse('hsl(0, 100%, 50%)'), {\n    alias: 'ngpColorWheelDefaultValue',\n  });\n\n  /** Emits when the value changes. */\n  readonly valueChange = output<Color>({\n    alias: 'ngpColorWheelValueChange',\n  });\n\n  /** The color space to operate in. */\n  readonly colorSpace = input<ColorSpace>('hsl', {\n    alias: 'ngpColorWheelColorSpace',\n  });\n\n  /** The disabled state of the wheel. */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpColorWheelDisabled',\n    transform: booleanAttribute,\n  });\n\n  protected readonly state = ngpColorWheel({\n    id: this.id,\n    value: this.value,\n    defaultValue: this.defaultValue,\n    colorSpace: this.colorSpace,\n    disabled: this.disabled,\n    onValueChange: value => this.valueChange.emit(value),\n  });\n\n  /** Set the value of the wheel. */\n  setValue(value: Color, options?: SetterOptions): void {\n    this.state.setValue(value, options);\n  }\n\n  /** Set the disabled state. */\n  setDisabled(disabled: boolean): void {\n    this.state.setDisabled(disabled);\n  }\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { computed, inject } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  createPrimitive,\n  dataBinding,\n  listener,\n  onDestroy,\n} from 'ng-primitives/state';\nimport { injectColorWheelState } from '../color-wheel/color-wheel-state';\n\ntype WheelKey = 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown' | 'Home' | 'End';\n\n/**\n * Public state surface for the Color Wheel Thumb primitive.\n */\nexport interface NgpColorWheelThumbState {\n  /** Focus the thumb element. */\n  focus(origin?: FocusOrigin): void;\n}\n\n/**\n * Inputs for configuring the Color Wheel Thumb primitive.\n */\nexport interface NgpColorWheelThumbProps {}\n\nexport const [\n  NgpColorWheelThumbStateToken,\n  ngpColorWheelThumb,\n  injectColorWheelThumbState,\n  provideColorWheelThumbState,\n] = createPrimitive(\n  'NgpColorWheelThumb',\n  ({}: NgpColorWheelThumbProps): NgpColorWheelThumbState => {\n    const element = injectElementRef<HTMLElement>();\n    const wheel = injectColorWheelState();\n    const focusMonitor = inject(FocusMonitor);\n\n    const tabindex = computed(() => (wheel().disabled() ? -1 : 0));\n\n    // Host bindings — the wheel adjusts a single hue value, so it is an ARIA slider.\n    attrBinding(element, 'role', 'slider');\n    attrBinding(element, 'aria-label', 'Hue');\n    attrBinding(element, 'aria-valuemin', '0');\n    attrBinding(element, 'aria-valuemax', '360');\n    attrBinding(element, 'aria-valuenow', () => Math.round(wheel().hue()).toString());\n    attrBinding(element, 'aria-valuetext', () => `${Math.round(wheel().hue())}°`);\n    attrBinding(element, 'tabindex', () => tabindex().toString());\n    dataBinding(element, 'data-disabled', () => wheel().disabled());\n\n    ngpInteractions({\n      hover: true,\n      focusVisible: true,\n      press: true,\n      disabled: wheel().disabled,\n    });\n\n    wheel().setThumb(element);\n    onDestroy(() => wheel().setThumb(undefined));\n\n    listener(element, 'keydown', (event: KeyboardEvent) => {\n      if (wheel().disabled()) {\n        return;\n      }\n      const step = event.shiftKey ? 10 : 1;\n      const hue = wheel().hue();\n\n      switch (event.key as WheelKey) {\n        case 'ArrowRight':\n        case 'ArrowUp':\n          wheel().setHue(hue + step);\n          break;\n        case 'ArrowLeft':\n        case 'ArrowDown':\n          wheel().setHue(hue - step);\n          break;\n        case 'Home':\n          wheel().setHue(0);\n          break;\n        case 'End':\n          wheel().setHue(360);\n          break;\n        default:\n          return;\n      }\n\n      event.preventDefault();\n    });\n\n    function focus(origin: FocusOrigin = 'program'): void {\n      focusMonitor.focusVia(element, origin, { preventScroll: true });\n    }\n\n    return { focus } satisfies NgpColorWheelThumbState;\n  },\n);\n","import { Directive } from '@angular/core';\nimport { ngpColorWheelThumb, provideColorWheelThumbState } from './color-wheel-thumb-state';\n\n/**\n * Apply the `ngpColorWheelThumb` directive to the element that represents the color wheel thumb.\n * Position it with the `--ngp-color-wheel-hue` custom property, e.g.\n * `transform: translate(-50%, -50%) rotate(var(--ngp-color-wheel-hue)) translateY(calc(-1 * <radius>))`.\n */\n@Directive({\n  selector: '[ngpColorWheelThumb]',\n  exportAs: 'ngpColorWheelThumb',\n  providers: [provideColorWheelThumbState()],\n})\nexport class NgpColorWheelThumb {\n  constructor() {\n    ngpColorWheelThumb({});\n  }\n}\n","import { computed, Signal, signal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { ngpRovingFocusGroup } from 'ng-primitives/roving-focus';\nimport {\n  attrBinding,\n  controlled,\n  controlledState,\n  createPrimitive,\n  dataBinding,\n  emitter,\n  SetterOptions,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\nimport { injectColorPickerState } from '../color-picker/color-picker-state';\nimport { Color } from '../color/color';\n\n/**\n * Public state surface for the Color Swatch Picker primitive - a list of selectable color swatches.\n */\nexport interface NgpColorSwatchPickerState {\n  /** The id of the swatch picker. */\n  readonly id: Signal<string>;\n  /** The currently selected color (the parent picker's value when inside one). */\n  readonly value: Signal<Color>;\n  /** Whether the swatch picker is disabled. */\n  readonly disabled: Signal<boolean>;\n  /** Emits when the selected color changes. */\n  readonly valueChange: Observable<Color>;\n  /** Whether a color matches the current selection. */\n  isSelected(color: Color): boolean;\n  /** Select a color. */\n  select(color: Color, options?: SetterOptions): void;\n  /** Set the default selected color used in uncontrolled mode. */\n  setDefaultValue(value: Color | undefined): void;\n}\n\n/**\n * Inputs for configuring the Color Swatch Picker primitive.\n */\nexport interface NgpColorSwatchPickerProps {\n  readonly id?: Signal<string>;\n  /** The selected color. When defined the swatch picker is controlled. */\n  readonly value?: Signal<Color | undefined>;\n  /** The default selected color for uncontrolled usage (undefined = no selection). */\n  readonly defaultValue?: Signal<Color | undefined>;\n  readonly orientation?: Signal<NgpOrientation>;\n  readonly disabled?: Signal<boolean>;\n  readonly onValueChange?: (value: Color) => void;\n}\n\n/** Two colors are equal if they serialize identically (including alpha). */\nfunction colorsEqual(a: Color, b: Color): boolean {\n  return a.toRgba() === b.toRgba();\n}\n\nexport const [\n  NgpColorSwatchPickerStateToken,\n  ngpColorSwatchPicker,\n  injectColorSwatchPickerState,\n  provideColorSwatchPickerState,\n] = createPrimitive(\n  'NgpColorSwatchPicker',\n  ({\n    id = signal(uniqueId('ngp-color-swatch-picker')),\n    value: _value = signal<Color | undefined>(undefined),\n    defaultValue: _defaultValue,\n    orientation = signal<NgpOrientation>('horizontal'),\n    disabled = signal(false),\n    onValueChange,\n  }: NgpColorSwatchPickerProps): NgpColorSwatchPickerState => {\n    const element = injectElementRef<HTMLElement>();\n    const picker = injectColorPickerState({ optional: true });\n    // `undefined` local means \"no selection\", so the default is undefined too.\n    const defaultValue = controlled<Color | undefined>(_defaultValue, undefined);\n    const [local, setLocal] = controlledState<Color | undefined>({\n      value: _value,\n      defaultValue,\n    });\n    const value = computed(() => picker()?.value() ?? local() ?? Color.parse('#000000'));\n    const hasSelection = computed(() => !!(picker() || local()));\n    const valueChange = emitter<Color>();\n\n    // Compose roving focus so arrow keys move between swatches with a single tab stop.\n    ngpRovingFocusGroup({\n      orientation,\n      wrap: signal(true),\n      homeEnd: signal(true),\n      disabled,\n      inherit: false,\n    });\n\n    // Host bindings — a single-select list of colors.\n    attrBinding(element, 'id', id);\n    attrBinding(element, 'role', 'listbox');\n    dataBinding(element, 'data-orientation', orientation);\n    dataBinding(element, 'data-disabled', disabled);\n\n    function isSelected(color: Color): boolean {\n      return hasSelection() && colorsEqual(color, value());\n    }\n\n    function select(color: Color, options?: SetterOptions): void {\n      const parent = picker();\n      if (parent) {\n        parent.setValue(color, options);\n      } else {\n        setLocal(color, { emit: false });\n      }\n      if (options?.emit !== false) {\n        onValueChange?.(color);\n        valueChange.emit(color);\n      }\n    }\n\n    return {\n      id,\n      value,\n      disabled,\n      valueChange: valueChange.asObservable(),\n      isSelected,\n      select,\n      setDefaultValue: defaultValue.set,\n    } satisfies NgpColorSwatchPickerState;\n  },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { provideRovingFocusGroupState } from 'ng-primitives/roving-focus';\nimport { SetterOptions } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Color } from '../color/color';\nimport { ngpColorSwatchPicker, provideColorSwatchPickerState } from './color-swatch-picker-state';\n\n/**\n * Apply the `ngpColorSwatchPicker` directive to a container of selectable color swatches. It composes\n * roving focus for keyboard navigation, so it provides the roving focus group state.\n */\n@Directive({\n  selector: '[ngpColorSwatchPicker]',\n  exportAs: 'ngpColorSwatchPicker',\n  providers: [provideColorSwatchPickerState(), provideRovingFocusGroupState({ inherit: false })],\n})\nexport class NgpColorSwatchPicker {\n  /** The id of the swatch picker. */\n  readonly id = input<string>(uniqueId('ngp-color-swatch-picker'));\n\n  /** The selected color. When defined the swatch picker is controlled. */\n  readonly value = input<Color | undefined>(undefined, {\n    alias: 'ngpColorSwatchPickerValue',\n  });\n\n  /** The default selected color for uncontrolled usage (undefined = no selection). */\n  readonly defaultValue = input<Color | undefined>(undefined, {\n    alias: 'ngpColorSwatchPickerDefaultValue',\n  });\n\n  /** Emits when the selected color changes. */\n  readonly valueChange = output<Color>({\n    alias: 'ngpColorSwatchPickerValueChange',\n  });\n\n  /** The orientation of the swatch list. */\n  readonly orientation = input<NgpOrientation>('horizontal', {\n    alias: 'ngpColorSwatchPickerOrientation',\n  });\n\n  /** The disabled state of the swatch picker. */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpColorSwatchPickerDisabled',\n    transform: booleanAttribute,\n  });\n\n  protected readonly state = ngpColorSwatchPicker({\n    id: this.id,\n    value: this.value,\n    defaultValue: this.defaultValue,\n    orientation: this.orientation,\n    disabled: this.disabled,\n    onValueChange: value => this.valueChange.emit(value),\n  });\n\n  /** Select a color. */\n  select(color: Color, options?: SetterOptions): void {\n    this.state.select(color, options);\n  }\n}\n","import { computed, Signal, signal } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { ngpRovingFocusItem } from 'ng-primitives/roving-focus';\nimport {\n  attrBinding,\n  createPrimitive,\n  dataBinding,\n  listener,\n  styleBinding,\n} from 'ng-primitives/state';\nimport { injectColorSwatchPickerState } from '../color-swatch-picker/color-swatch-picker-state';\nimport { Color } from '../color/color';\n\n/**\n * Public state surface for a Color Swatch Picker Item primitive.\n */\nexport interface NgpColorSwatchPickerItemState {\n  /** Whether this swatch is the selected color. */\n  readonly selected: Signal<boolean>;\n}\n\n/**\n * Inputs for configuring the Color Swatch Picker Item primitive.\n */\nexport interface NgpColorSwatchPickerItemProps {\n  /** The color this swatch represents. */\n  readonly color: Signal<Color>;\n  /** Whether the swatch is disabled. */\n  readonly disabled?: Signal<boolean>;\n}\n\nexport const [\n  NgpColorSwatchPickerItemStateToken,\n  ngpColorSwatchPickerItem,\n  injectColorSwatchPickerItemState,\n  provideColorSwatchPickerItemState,\n] = createPrimitive(\n  'NgpColorSwatchPickerItem',\n  ({\n    color,\n    disabled = signal(false),\n  }: NgpColorSwatchPickerItemProps): NgpColorSwatchPickerItemState => {\n    const element = injectElementRef<HTMLElement>();\n    const picker = injectColorSwatchPickerState();\n\n    // Compose roving focus so this swatch participates in single-tab-stop keyboard navigation.\n    ngpRovingFocusItem({ disabled });\n\n    const selected = computed(() => picker().isSelected(color()));\n\n    // Host bindings — an option in the listbox.\n    attrBinding(element, 'role', 'option');\n    attrBinding(element, 'aria-selected', () => (selected() ? 'true' : 'false'));\n    attrBinding(element, 'aria-label', () => color().toHex());\n    dataBinding(element, 'data-selected', selected);\n    dataBinding(element, 'data-disabled', disabled);\n    styleBinding(element, '--ngp-color-swatch-color', () => color().toRgba());\n\n    ngpInteractions({ hover: true, focusVisible: true, press: true, disabled });\n\n    listener(element, 'click', () => {\n      if (!disabled()) {\n        picker().select(color());\n      }\n    });\n\n    listener(element, 'keydown', (event: KeyboardEvent) => {\n      if (disabled()) {\n        return;\n      }\n      if (event.key === 'Enter' || event.key === ' ') {\n        event.preventDefault();\n        picker().select(color());\n      }\n    });\n\n    return { selected } satisfies NgpColorSwatchPickerItemState;\n  },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { provideRovingFocusItemState } from 'ng-primitives/roving-focus';\nimport { Color } from '../color/color';\nimport {\n  ngpColorSwatchPickerItem,\n  provideColorSwatchPickerItemState,\n} from './color-swatch-picker-item-state';\n\n/**\n * Apply the `ngpColorSwatchPickerItem` directive to a selectable swatch within a swatch picker. Set its\n * background to `var(--ngp-color-swatch-color)`. It composes a roving focus item.\n */\n@Directive({\n  selector: '[ngpColorSwatchPickerItem]',\n  exportAs: 'ngpColorSwatchPickerItem',\n  providers: [provideColorSwatchPickerItemState(), provideRovingFocusItemState()],\n})\nexport class NgpColorSwatchPickerItem {\n  /** The color this swatch represents. */\n  readonly color = input<Color>(Color.parse('#000000'), {\n    alias: 'ngpColorSwatchPickerItem',\n  });\n\n  /** Whether the swatch is disabled. */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpColorSwatchPickerItemDisabled',\n    transform: booleanAttribute,\n  });\n\n  protected readonly state = ngpColorSwatchPickerItem({\n    color: this.color,\n    disabled: this.disabled,\n  });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["resolveColorSpace","clampStep"],"mappings":";;;;;;;;;;;;;AAuBA,MAAM,cAAc,GAAmE;AACrF,IAAA,GAAG,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC;AAC7B,IAAA,GAAG,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,WAAW,CAAC;AACvC,IAAA,GAAG,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,CAAC;CACzC;AAED,MAAM,MAAM,GAA4C;AACtD,IAAA,GAAG,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE;AAClC,IAAA,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