@forgeroute/ui 0.4.92 → 0.4.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5359,7 +5359,7 @@ function createFieldReveal(showErrors) {
5359
5359
  });
5360
5360
  return {
5361
5361
  touched,
5362
- revealed: computed(() => touched() || showErrors())
5362
+ revealed: computed(() => touched())
5363
5363
  };
5364
5364
  }
5365
5365
  const isEnglishLocale = (locale) => {
@@ -5514,7 +5514,7 @@ var CheckboxComponent = class CheckboxComponent {
5514
5514
  this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
5515
5515
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
5516
5516
  this.invalidChange = output();
5517
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
5517
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
5518
5518
  this._onValidatorChange = () => {};
5519
5519
  this._disabledInput = input(false, {
5520
5520
  ...ngDevMode ? { debugName: "_disabledInput" } : /* istanbul ignore next */ {},
@@ -7600,7 +7600,7 @@ var TextInputComponent = class TextInputComponent {
7600
7600
  this._issue = computed(() => this._check(this._value()), ...ngDevMode ? [{ debugName: "_issue" }] : /* istanbul ignore next */ []);
7601
7601
  this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
7602
7602
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
7603
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
7603
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
7604
7604
  this._inputId = `ti-${Math.random().toString(36).slice(2, 8)}`;
7605
7605
  this._onChange = (_) => {};
7606
7606
  this._onTouched = () => {};
@@ -10049,7 +10049,7 @@ var SelectComponent = class SelectComponent {
10049
10049
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
10050
10050
  this.invalidChange = output();
10051
10051
  this.valueChange = output();
10052
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
10052
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
10053
10053
  this._onValidatorChange = () => {};
10054
10054
  this._selectId = `sl-${Math.random().toString(36).slice(2, 8)}`;
10055
10055
  this._labels = inject(UiLabelsService);
@@ -15254,6 +15254,7 @@ var DataTableComponent = class DataTableComponent {
15254
15254
  this.page = input("", ...ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []);
15255
15255
  this.showToolbar = input(true, ...ngDevMode ? [{ debugName: "showToolbar" }] : /* istanbul ignore next */ []);
15256
15256
  this.showMoreActions = input(true, ...ngDevMode ? [{ debugName: "showMoreActions" }] : /* istanbul ignore next */ []);
15257
+ this.quickTabLabelFn = input(null, ...ngDevMode ? [{ debugName: "quickTabLabelFn" }] : /* istanbul ignore next */ []);
15257
15258
  this.showSearch = input(true, ...ngDevMode ? [{ debugName: "showSearch" }] : /* istanbul ignore next */ []);
15258
15259
  this.showQuickTabs = input(true, ...ngDevMode ? [{ debugName: "showQuickTabs" }] : /* istanbul ignore next */ []);
15259
15260
  this.showPagination = input(true, ...ngDevMode ? [{ debugName: "showPagination" }] : /* istanbul ignore next */ []);
@@ -15318,7 +15319,8 @@ var DataTableComponent = class DataTableComponent {
15318
15319
  const active = this._activeTab();
15319
15320
  const keys = Object.keys(counts).length > 0 && active && !present.includes(active) ? [...present, active] : present;
15320
15321
  if (!keys.length) return [];
15321
- const toLabel = (s) => this._columnBadgeLabel(s) ?? (/[a-z]/.test(s) ? s : s.toLowerCase()).replace(/([a-z])([A-Z])/g, "$1 $2").replace(/-/g, " ").replace(/(^|\s)\p{L}/gu, (c) => c.toUpperCase());
15322
+ const hostLabel = this.quickTabLabelFn();
15323
+ const toLabel = (s) => hostLabel?.(s) || (this._columnBadgeLabel(s) ?? (/[a-z]/.test(s) ? s : s.toLowerCase()).replace(/([a-z])([A-Z])/g, "$1 $2").replace(/-/g, " ").replace(/(^|\s)\p{L}/gu, (c) => c.toUpperCase()));
15322
15324
  const singleValue = keys.length === 1;
15323
15325
  return [{
15324
15326
  value: "",
@@ -16390,6 +16392,13 @@ var DataTableComponent = class DataTableComponent {
16390
16392
  isRequired: false,
16391
16393
  transformFunction: null
16392
16394
  },
16395
+ quickTabLabelFn: {
16396
+ classPropertyName: "quickTabLabelFn",
16397
+ publicName: "quickTabLabelFn",
16398
+ isSignal: true,
16399
+ isRequired: false,
16400
+ transformFunction: null
16401
+ },
16393
16402
  showSearch: {
16394
16403
  classPropertyName: "showSearch",
16395
16404
  publicName: "showSearch",
@@ -18564,6 +18573,14 @@ i0.ɵɵngDeclareClassMetadata({
18564
18573
  required: false
18565
18574
  }]
18566
18575
  }],
18576
+ quickTabLabelFn: [{
18577
+ type: i0.Input,
18578
+ args: [{
18579
+ isSignal: true,
18580
+ alias: "quickTabLabelFn",
18581
+ required: false
18582
+ }]
18583
+ }],
18567
18584
  showSearch: [{
18568
18585
  type: i0.Input,
18569
18586
  args: [{
@@ -21901,7 +21918,7 @@ var StarRatingComponent = class StarRatingComponent {
21901
21918
  this._issue = computed(() => this._check(this._value()), ...ngDevMode ? [{ debugName: "_issue" }] : /* istanbul ignore next */ []);
21902
21919
  this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
21903
21920
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
21904
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
21921
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
21905
21922
  this._onValidatorChange = () => {};
21906
21923
  this._onChange = (_) => {};
21907
21924
  this._onTouched = () => {};
@@ -23586,7 +23603,7 @@ var BusinessHoursComponent = class BusinessHoursComponent {
23586
23603
  this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
23587
23604
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
23588
23605
  this.invalidChange = output();
23589
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
23606
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
23590
23607
  this._onValidatorChange = () => {};
23591
23608
  this._options = computed(() => businessTimeOptions(this.step(), this.hour24(), this.labels.locale()), ...ngDevMode ? [{ debugName: "_options" }] : /* istanbul ignore next */ []);
23592
23609
  this._onChange = (_) => {};
@@ -24697,7 +24714,7 @@ var RadioGroupComponent = class RadioGroupComponent {
24697
24714
  this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
24698
24715
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
24699
24716
  this.invalidChange = output();
24700
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
24717
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
24701
24718
  this._onValidatorChange = () => {};
24702
24719
  this._onChange = (_) => {};
24703
24720
  this._onTouched = () => {};
@@ -26901,7 +26918,7 @@ var ContactPickerComponent = class ContactPickerComponent {
26901
26918
  this.fieldInvalid = computed(() => this.invalid() || this.requiredEmpty(), ...ngDevMode ? [{ debugName: "fieldInvalid" }] : /* istanbul ignore next */ []);
26902
26919
  this.errorMessage = computed(() => this.requiredEmpty() ? requiredIssue(this.label()).message : "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
26903
26920
  this.visibleErrorMessage = computed(() => this.reveal.revealed() ? this.errorMessage() : "", ...ngDevMode ? [{ debugName: "visibleErrorMessage" }] : /* istanbul ignore next */ []);
26904
- this.ariaInvalid = computed(() => this.invalid() || this.showErrors() && this.requiredEmpty(), ...ngDevMode ? [{ debugName: "ariaInvalid" }] : /* istanbul ignore next */ []);
26921
+ this.ariaInvalid = computed(() => this.reveal.revealed() && (this.invalid() || this.requiredEmpty()), ...ngDevMode ? [{ debugName: "ariaInvalid" }] : /* istanbul ignore next */ []);
26905
26922
  this.showHint = computed(() => this.isMultiSelect() || !this.selected(), ...ngDevMode ? [{ debugName: "showHint" }] : /* istanbul ignore next */ []);
26906
26923
  this.describedBy = computed(() => {
26907
26924
  const ids = [this.hint() && this.showHint() ? this.hintId : "", this.errorId()].filter(Boolean);
@@ -26959,6 +26976,9 @@ var ContactPickerComponent = class ContactPickerComponent {
26959
26976
  this.clearBlurTimer();
26960
26977
  if (this.query.length >= 2) this.showResults.set(true);
26961
26978
  }
26979
+ onSelectedFocusOut() {
26980
+ this.reveal.touched.set(true);
26981
+ }
26962
26982
  onBlur() {
26963
26983
  this.reveal.touched.set(true);
26964
26984
  this.clearBlurTimer();
@@ -27263,7 +27283,7 @@ var ContactPickerComponent = class ContactPickerComponent {
27263
27283
  <!-- ── Single-select mode ── -->
27264
27284
  } @else {
27265
27285
  @if (selected()) {
27266
- <div class="selected-input" role="group" tabindex="-1" [attr.aria-labelledby]="label() ? labelId : null"
27286
+ <div class="selected-input" role="group" tabindex="-1" (focusout)="onSelectedFocusOut()" [attr.aria-labelledby]="label() ? labelId : null"
27267
27287
  [attr.aria-describedby]="describedBy()" [attr.aria-invalid]="ariaInvalid() ? 'true' : null">
27268
27288
  <span>{{ selected()!.name }}</span>
27269
27289
  <button type="button" class="clear-btn" (click)="clear()" [attr.aria-label]="labels.t('contactPicker.clearSelection')">&times;</button>
@@ -27506,7 +27526,7 @@ i0.ɵɵngDeclareClassMetadata({
27506
27526
  <!-- ── Single-select mode ── -->
27507
27527
  } @else {
27508
27528
  @if (selected()) {
27509
- <div class="selected-input" role="group" tabindex="-1" [attr.aria-labelledby]="label() ? labelId : null"
27529
+ <div class="selected-input" role="group" tabindex="-1" (focusout)="onSelectedFocusOut()" [attr.aria-labelledby]="label() ? labelId : null"
27510
27530
  [attr.aria-describedby]="describedBy()" [attr.aria-invalid]="ariaInvalid() ? 'true' : null">
27511
27531
  <span>{{ selected()!.name }}</span>
27512
27532
  <button type="button" class="clear-btn" (click)="clear()" [attr.aria-label]="labels.t('contactPicker.clearSelection')">&times;</button>
@@ -27731,7 +27751,7 @@ var TextareaInputComponent = class TextareaInputComponent {
27731
27751
  this.invalidChange = output();
27732
27752
  this.focused = output();
27733
27753
  this.blurred = output();
27734
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
27754
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
27735
27755
  this._onValidatorChange = () => {};
27736
27756
  this._inputId = `ta-${Math.random().toString(36).slice(2, 8)}`;
27737
27757
  this._hostEl = inject(ElementRef);
@@ -30177,7 +30197,7 @@ var FileInputComponent = class FileInputComponent {
30177
30197
  this._issue = computed(() => this.disabled() || !this.required() || this._files().length > 0 ? null : requiredIssue(this.label() || this.labels.t("common.file")), ...ngDevMode ? [{ debugName: "_issue" }] : /* istanbul ignore next */ []);
30178
30198
  this.invalid = computed(() => !!this.error() || !!this._rejection() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
30179
30199
  this.errorMessage = computed(() => (this.listRejections() && this._rejected().length > 0 ? this.rejectionLines().join(" ") : this._rejection()) || this._issue()?.message || "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
30180
- this._shownError = computed(() => (this.showField() ? this.error() : "") || this._rejection() || (this._reveal.revealed() ? this._issue()?.message ?? "" : ""), ...ngDevMode ? [{ debugName: "_shownError" }] : /* istanbul ignore next */ []);
30200
+ this._shownError = computed(() => this._rejection() || (this._reveal.revealed() ? (this.showField() ? this.error() : "") || (this._issue()?.message ?? "") : ""), ...ngDevMode ? [{ debugName: "_shownError" }] : /* istanbul ignore next */ []);
30181
30201
  this.summary = computed(() => {
30182
30202
  const f = this._files();
30183
30203
  if (f.length === 0) return "";
@@ -31447,7 +31467,7 @@ var DateInputComponent = class DateInputComponent {
31447
31467
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
31448
31468
  this.invalidChange = output();
31449
31469
  this.valueChange = output();
31450
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
31470
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
31451
31471
  this._onValidatorChange = () => {};
31452
31472
  this._inputId = `di-${Math.random().toString(36).slice(2, 8)}`;
31453
31473
  this._onChange = (_) => {};
@@ -31823,7 +31843,7 @@ var DatetimeInputComponent = class DatetimeInputComponent {
31823
31843
  this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
31824
31844
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
31825
31845
  this.invalidChange = output();
31826
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
31846
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
31827
31847
  this._onValidatorChange = () => {};
31828
31848
  this._inputId = `dti-${Math.random().toString(36).slice(2, 8)}`;
31829
31849
  this._onChange = (_) => {};
@@ -32193,7 +32213,7 @@ var TimeInputComponent = class TimeInputComponent {
32193
32213
  this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
32194
32214
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
32195
32215
  this.invalidChange = output();
32196
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
32216
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
32197
32217
  this._onValidatorChange = () => {};
32198
32218
  this._onChange = (_) => {};
32199
32219
  this._onTouched = () => {};
@@ -32616,7 +32636,7 @@ var ComboboxComponent = class ComboboxComponent {
32616
32636
  this._issue = computed(() => this._check(this._selected()), ...ngDevMode ? [{ debugName: "_issue" }] : /* istanbul ignore next */ []);
32617
32637
  this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
32618
32638
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
32619
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
32639
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
32620
32640
  this._inputText = computed(() => this._editing() ? this._text() : this.displayText() || this._selected()?.label || "", ...ngDevMode ? [{ debugName: "_inputText" }] : /* istanbul ignore next */ []);
32621
32641
  this._showClear = computed(() => !this.disabled() && !this._editing() && !!(this._selected() || this.displayText()), ...ngDevMode ? [{ debugName: "_showClear" }] : /* istanbul ignore next */ []);
32622
32642
  this._belowMin = computed(() => this._term().length < this.minChars(), ...ngDevMode ? [{ debugName: "_belowMin" }] : /* istanbul ignore next */ []);
@@ -33609,8 +33629,13 @@ var MultiSelectComponent = class MultiSelectComponent {
33609
33629
  return q ? this.options().filter((o) => fold(o.label).includes(q)) : this.options();
33610
33630
  }, ...ngDevMode ? [{ debugName: "_filteredOptions" }] : /* istanbul ignore next */ []);
33611
33631
  this._onChange = (_) => {};
33632
+ this._touched = signal(false, ...ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []);
33633
+ this._shownError = computed(() => this._touched() ? this.error() : "", ...ngDevMode ? [{ debugName: "_shownError" }] : /* istanbul ignore next */ []);
33612
33634
  this._onTouched = () => {};
33613
33635
  }
33636
+ resetTouched() {
33637
+ this._touched.set(false);
33638
+ }
33614
33639
  writeValue(val) {
33615
33640
  this.selected.set(val ?? []);
33616
33641
  }
@@ -33626,6 +33651,12 @@ var MultiSelectComponent = class MultiSelectComponent {
33626
33651
  onDocumentClick(event) {
33627
33652
  if (this._open() && !this.el.nativeElement.contains(event.target)) this.close();
33628
33653
  }
33654
+ onFocusOut(event) {
33655
+ const next = event.relatedTarget;
33656
+ if (!next || this.el.nativeElement.contains(next)) return;
33657
+ this._touched.set(true);
33658
+ this._onTouched();
33659
+ }
33629
33660
  onEscape(event) {
33630
33661
  if (!this._open()) return;
33631
33662
  event.preventDefault();
@@ -33650,6 +33681,7 @@ var MultiSelectComponent = class MultiSelectComponent {
33650
33681
  close() {
33651
33682
  this._open.set(false);
33652
33683
  this._query.set("");
33684
+ this._touched.set(true);
33653
33685
  this._onTouched();
33654
33686
  }
33655
33687
  _set(values) {
@@ -33746,7 +33778,10 @@ var MultiSelectComponent = class MultiSelectComponent {
33746
33778
  }
33747
33779
  },
33748
33780
  outputs: { selected: "selectedChange" },
33749
- host: { listeners: { "document:click": "onDocumentClick($event)" } },
33781
+ host: { listeners: {
33782
+ "document:click": "onDocumentClick($event)",
33783
+ "focusout": "onFocusOut($event)"
33784
+ } },
33750
33785
  providers: [{
33751
33786
  provide: NG_VALUE_ACCESSOR,
33752
33787
  useExisting: forwardRef(() => MultiSelectComponent),
@@ -33754,7 +33789,7 @@ var MultiSelectComponent = class MultiSelectComponent {
33754
33789
  }],
33755
33790
  ngImport: i0,
33756
33791
  template: `
33757
- <div class="ms-field" [class.ms-has-error]="error()" [class.ms-disabled]="disabled()">
33792
+ <div class="ms-field" [class.ms-has-error]="_shownError()" [class.ms-disabled]="disabled()">
33758
33793
  @if (label()) {
33759
33794
  <span class="ms-label" [id]="_id + '-label'">
33760
33795
  {{ label() }}
@@ -33780,8 +33815,8 @@ var MultiSelectComponent = class MultiSelectComponent {
33780
33815
  [attr.aria-expanded]="_open()"
33781
33816
  [attr.aria-controls]="_open() ? _id + '-options' : null"
33782
33817
  [attr.aria-labelledby]="label() ? _id + '-label' : null"
33783
- [attr.aria-describedby]="error() ? _id + '-error' : (hint() ? _id + '-hint' : null)"
33784
- [attr.aria-invalid]="error() ? 'true' : null"
33818
+ [attr.aria-describedby]="_shownError() ? _id + '-error' : (hint() ? _id + '-hint' : null)"
33819
+ [attr.aria-invalid]="_shownError() ? 'true' : null"
33785
33820
  [attr.aria-required]="required() ? 'true' : null"
33786
33821
  (click)="toggleOpen()"
33787
33822
  (keydown.escape)="onEscape($event)">
@@ -33819,8 +33854,8 @@ var MultiSelectComponent = class MultiSelectComponent {
33819
33854
  }
33820
33855
  </div>
33821
33856
 
33822
- @if (error()) {
33823
- <p class="ms-desc ms-desc-error" [id]="_id + '-error'" role="alert">{{ error() }}</p>
33857
+ @if (_shownError()) {
33858
+ <p class="ms-desc ms-desc-error" [id]="_id + '-error'" role="alert">{{ _shownError() }}</p>
33824
33859
  } @else if (hint()) {
33825
33860
  <p class="ms-desc" [id]="_id + '-hint'">{{ hint() }}</p>
33826
33861
  }
@@ -33893,7 +33928,7 @@ i0.ɵɵngDeclareClassMetadata({
33893
33928
  multi: true
33894
33929
  }],
33895
33930
  template: `
33896
- <div class="ms-field" [class.ms-has-error]="error()" [class.ms-disabled]="disabled()">
33931
+ <div class="ms-field" [class.ms-has-error]="_shownError()" [class.ms-disabled]="disabled()">
33897
33932
  @if (label()) {
33898
33933
  <span class="ms-label" [id]="_id + '-label'">
33899
33934
  {{ label() }}
@@ -33919,8 +33954,8 @@ i0.ɵɵngDeclareClassMetadata({
33919
33954
  [attr.aria-expanded]="_open()"
33920
33955
  [attr.aria-controls]="_open() ? _id + '-options' : null"
33921
33956
  [attr.aria-labelledby]="label() ? _id + '-label' : null"
33922
- [attr.aria-describedby]="error() ? _id + '-error' : (hint() ? _id + '-hint' : null)"
33923
- [attr.aria-invalid]="error() ? 'true' : null"
33957
+ [attr.aria-describedby]="_shownError() ? _id + '-error' : (hint() ? _id + '-hint' : null)"
33958
+ [attr.aria-invalid]="_shownError() ? 'true' : null"
33924
33959
  [attr.aria-required]="required() ? 'true' : null"
33925
33960
  (click)="toggleOpen()"
33926
33961
  (keydown.escape)="onEscape($event)">
@@ -33958,8 +33993,8 @@ i0.ɵɵngDeclareClassMetadata({
33958
33993
  }
33959
33994
  </div>
33960
33995
 
33961
- @if (error()) {
33962
- <p class="ms-desc ms-desc-error" [id]="_id + '-error'" role="alert">{{ error() }}</p>
33996
+ @if (_shownError()) {
33997
+ <p class="ms-desc ms-desc-error" [id]="_id + '-error'" role="alert">{{ _shownError() }}</p>
33963
33998
  } @else if (hint()) {
33964
33999
  <p class="ms-desc" [id]="_id + '-hint'">{{ hint() }}</p>
33965
34000
  }
@@ -34055,6 +34090,10 @@ i0.ɵɵngDeclareClassMetadata({
34055
34090
  onDocumentClick: [{
34056
34091
  type: HostListener,
34057
34092
  args: ["document:click", ["$event"]]
34093
+ }],
34094
+ onFocusOut: [{
34095
+ type: HostListener,
34096
+ args: ["focusout", ["$event"]]
34058
34097
  }]
34059
34098
  }
34060
34099
  });
@@ -42479,7 +42518,8 @@ var AddressInputComponent = class AddressInputComponent {
42479
42518
  this.invalid = computed(() => !!this.error() || this._firstIssue(this._issues()) !== null, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
42480
42519
  this.errorMessage = computed(() => this._firstIssue(this._issues())?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
42481
42520
  this._req = computed(() => this.required() || this.requireComplete() && this._hasText(this._v()), ...ngDevMode ? [{ debugName: "_req" }] : /* istanbul ignore next */ []);
42482
- this._describedBy = computed(() => this.error() ? this._errorId : this.hint() ? this._hintId : null, ...ngDevMode ? [{ debugName: "_describedBy" }] : /* istanbul ignore next */ []);
42521
+ this._shownError = computed(() => this._touched().size > 0 ? this.error() : "", ...ngDevMode ? [{ debugName: "_shownError" }] : /* istanbul ignore next */ []);
42522
+ this._describedBy = computed(() => this._shownError() ? this._errorId : this.hint() ? this._hintId : null, ...ngDevMode ? [{ debugName: "_describedBy" }] : /* istanbul ignore next */ []);
42483
42523
  this._onChange = (_) => {};
42484
42524
  this._textModel = false;
42485
42525
  this._edited = /* @__PURE__ */ new Set();
@@ -42554,7 +42594,7 @@ var AddressInputComponent = class AddressInputComponent {
42554
42594
  if (!next || !this.host.nativeElement.contains(next)) this._onTouched();
42555
42595
  }
42556
42596
  _revealed(field) {
42557
- return this.showErrors() || this._touched().has(field);
42597
+ return this._touched().has(field);
42558
42598
  }
42559
42599
  _fieldError(field) {
42560
42600
  if (this.disabled() || this.readonly()) return "";
@@ -42911,8 +42951,8 @@ var AddressInputComponent = class AddressInputComponent {
42911
42951
  (focusout)="_onFocusOut('zip', $event)" />
42912
42952
  </ui-form-row>
42913
42953
  </ui-form-section>
42914
- @if (error()) {
42915
- <ui-error [errorId]="_errorId" [message]="error()" />
42954
+ @if (_shownError()) {
42955
+ <ui-error [errorId]="_errorId" [message]="_shownError()" />
42916
42956
  } @else if (hint()) {
42917
42957
  <ui-hint [attr.id]="_hintId">{{ hint() }}</ui-hint>
42918
42958
  }
@@ -43130,8 +43170,8 @@ i0.ɵɵngDeclareClassMetadata({
43130
43170
  (focusout)="_onFocusOut('zip', $event)" />
43131
43171
  </ui-form-row>
43132
43172
  </ui-form-section>
43133
- @if (error()) {
43134
- <ui-error [errorId]="_errorId" [message]="error()" />
43173
+ @if (_shownError()) {
43174
+ <ui-error [errorId]="_errorId" [message]="_shownError()" />
43135
43175
  } @else if (hint()) {
43136
43176
  <ui-hint [attr.id]="_hintId">{{ hint() }}</ui-hint>
43137
43177
  }
@@ -45667,6 +45707,9 @@ const STATE_COMMANDS = [
45667
45707
  ];
45668
45708
  let nextId$3 = 0;
45669
45709
  var RichTextEditorComponent = class RichTextEditorComponent {
45710
+ resetTouched() {
45711
+ this._touched.set(false);
45712
+ }
45670
45713
  headingText(tag) {
45671
45714
  return this.labels.t(`richTextEditor.heading.${tag}`);
45672
45715
  }
@@ -45688,6 +45731,8 @@ var RichTextEditorComponent = class RichTextEditorComponent {
45688
45731
  this.readonly = input(false, ...ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []);
45689
45732
  this.hint = input("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
45690
45733
  this.error = input("", ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
45734
+ this._touched = signal(false, ...ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []);
45735
+ this._activeError = computed(() => this._touched() ? this.error() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
45691
45736
  this.minHeight = input(200, ...ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []);
45692
45737
  this.maxHeight = input(600, ...ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []);
45693
45738
  this.hide = input([], ...ngDevMode ? [{ debugName: "hide" }] : /* istanbul ignore next */ []);
@@ -45791,6 +45836,7 @@ var RichTextEditorComponent = class RichTextEditorComponent {
45791
45836
  }
45792
45837
  onBlur() {
45793
45838
  this._saveSelection();
45839
+ this._touched.set(true);
45794
45840
  this._onTouched();
45795
45841
  }
45796
45842
  onToolbarMouseDown(event) {
@@ -46080,7 +46126,7 @@ var RichTextEditorComponent = class RichTextEditorComponent {
46080
46126
  }],
46081
46127
  ngImport: i0,
46082
46128
  template: `
46083
- <div class="rte-field" [class.rte-error]="error()" [class.rte-disabled]="disabled()">
46129
+ <div class="rte-field" [class.rte-error]="_activeError()" [class.rte-disabled]="disabled()">
46084
46130
  @if (label()) {
46085
46131
  <label class="rte-label" [id]="_labelId" (click)="focus()">
46086
46132
  {{ label() }}
@@ -46294,8 +46340,8 @@ var RichTextEditorComponent = class RichTextEditorComponent {
46294
46340
  [attr.aria-required]="required() || null"
46295
46341
  [attr.aria-readonly]="readonly() || null"
46296
46342
  [attr.aria-disabled]="disabled() || null"
46297
- [attr.aria-invalid]="error() ? 'true' : null"
46298
- [attr.aria-describedby]="error() ? _errorId : null"
46343
+ [attr.aria-invalid]="_activeError() ? 'true' : null"
46344
+ [attr.aria-describedby]="_activeError() ? _errorId : null"
46299
46345
  [attr.data-placeholder]="placeholder()"
46300
46346
  [attr.data-empty]="empty() ? 'true' : null"
46301
46347
  [style.min-height.px]="minHeight()"
@@ -46309,8 +46355,8 @@ var RichTextEditorComponent = class RichTextEditorComponent {
46309
46355
  ></div>
46310
46356
  </div>
46311
46357
 
46312
- @if (error()) {
46313
- <p class="rte-desc rte-desc-error" [id]="_errorId" role="alert">{{ error() }}</p>
46358
+ @if (_activeError()) {
46359
+ <p class="rte-desc rte-desc-error" [id]="_errorId" role="alert">{{ _activeError() }}</p>
46314
46360
  }
46315
46361
  </div>
46316
46362
  `,
@@ -46341,7 +46387,7 @@ i0.ɵɵngDeclareClassMetadata({
46341
46387
  "(document:selectionchange)": "onSelectionChange()"
46342
46388
  },
46343
46389
  template: `
46344
- <div class="rte-field" [class.rte-error]="error()" [class.rte-disabled]="disabled()">
46390
+ <div class="rte-field" [class.rte-error]="_activeError()" [class.rte-disabled]="disabled()">
46345
46391
  @if (label()) {
46346
46392
  <label class="rte-label" [id]="_labelId" (click)="focus()">
46347
46393
  {{ label() }}
@@ -46555,8 +46601,8 @@ i0.ɵɵngDeclareClassMetadata({
46555
46601
  [attr.aria-required]="required() || null"
46556
46602
  [attr.aria-readonly]="readonly() || null"
46557
46603
  [attr.aria-disabled]="disabled() || null"
46558
- [attr.aria-invalid]="error() ? 'true' : null"
46559
- [attr.aria-describedby]="error() ? _errorId : null"
46604
+ [attr.aria-invalid]="_activeError() ? 'true' : null"
46605
+ [attr.aria-describedby]="_activeError() ? _errorId : null"
46560
46606
  [attr.data-placeholder]="placeholder()"
46561
46607
  [attr.data-empty]="empty() ? 'true' : null"
46562
46608
  [style.min-height.px]="minHeight()"
@@ -46570,8 +46616,8 @@ i0.ɵɵngDeclareClassMetadata({
46570
46616
  ></div>
46571
46617
  </div>
46572
46618
 
46573
- @if (error()) {
46574
- <p class="rte-desc rte-desc-error" [id]="_errorId" role="alert">{{ error() }}</p>
46619
+ @if (_activeError()) {
46620
+ <p class="rte-desc rte-desc-error" [id]="_errorId" role="alert">{{ _activeError() }}</p>
46575
46621
  }
46576
46622
  </div>
46577
46623
  `,
@@ -46703,7 +46749,7 @@ var SwatchPickerComponent = class SwatchPickerComponent {
46703
46749
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
46704
46750
  this.invalidChange = output();
46705
46751
  this.valueChange = output();
46706
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
46752
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
46707
46753
  this._onValidatorChange = () => {};
46708
46754
  this._onChange = (_) => {};
46709
46755
  this._onTouched = () => {};
@@ -47115,7 +47161,7 @@ var IconPickerComponent = class IconPickerComponent {
47115
47161
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
47116
47162
  this.invalidChange = output();
47117
47163
  this.valueChange = output();
47118
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
47164
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
47119
47165
  this._onValidatorChange = () => {};
47120
47166
  this._onChange = (_) => {};
47121
47167
  this._onTouched = () => {};
@@ -47527,7 +47573,7 @@ var RadioMatrixComponent = class RadioMatrixComponent {
47527
47573
  this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
47528
47574
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
47529
47575
  this.invalidChange = output();
47530
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
47576
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
47531
47577
  this._onValidatorChange = () => {};
47532
47578
  this._onChange = (_) => {};
47533
47579
  this._onTouched = () => {};
@@ -47964,12 +48010,17 @@ i0.ɵɵngDeclareClassMetadata({
47964
48010
  });
47965
48011
  let nextPadId = 0;
47966
48012
  var SignaturePadComponent = class SignaturePadComponent {
48013
+ resetTouched() {
48014
+ this._touched.set(false);
48015
+ }
47967
48016
  constructor() {
47968
48017
  this.labels = inject(UiLabelsService);
47969
48018
  this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
47970
48019
  this.ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
47971
48020
  this.hint = input("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
47972
48021
  this.error = input("", ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
48022
+ this._touched = signal(false, ...ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []);
48023
+ this._activeError = computed(() => this._touched() ? this.error() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
47973
48024
  this.width = input(600, ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
47974
48025
  this.height = input(120, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
47975
48026
  this.outputWidth = input(600, ...ngDevMode ? [{ debugName: "outputWidth" }] : /* istanbul ignore next */ []);
@@ -48002,7 +48053,7 @@ var SignaturePadComponent = class SignaturePadComponent {
48002
48053
  this._descId = `sp-desc-${this._id}`;
48003
48054
  this._helpId = `sp-help-${this._id}`;
48004
48055
  this._accessibleName = computed(() => this.ariaLabel() || (this.label() ? null : this.labels.t("signaturePad.name")), ...ngDevMode ? [{ debugName: "_accessibleName" }] : /* istanbul ignore next */ []);
48005
- this._describedBy = computed(() => (this.error() || this.hint() ? this._descId + " " : "") + this._helpId, ...ngDevMode ? [{ debugName: "_describedBy" }] : /* istanbul ignore next */ []);
48056
+ this._describedBy = computed(() => (this._activeError() || this.hint() ? this._descId + " " : "") + this._helpId, ...ngDevMode ? [{ debugName: "_describedBy" }] : /* istanbul ignore next */ []);
48006
48057
  this._ctx = null;
48007
48058
  this._pointerId = null;
48008
48059
  this._dirty = false;
@@ -48139,6 +48190,7 @@ var SignaturePadComponent = class SignaturePadComponent {
48139
48190
  onPointerEnd(event) {
48140
48191
  if (this._pointerId === null || event.pointerId !== this._pointerId) return;
48141
48192
  this._pointerId = null;
48193
+ this._touched.set(true);
48142
48194
  this._commit();
48143
48195
  }
48144
48196
  onKeyDown(event) {
@@ -48198,6 +48250,7 @@ var SignaturePadComponent = class SignaturePadComponent {
48198
48250
  onBlur() {
48199
48251
  this._stopKeyboardStroke();
48200
48252
  this._cursorVisible.set(false);
48253
+ this._touched.set(true);
48201
48254
  this._onTouched();
48202
48255
  }
48203
48256
  _stopKeyboardStroke() {
@@ -48397,7 +48450,7 @@ var SignaturePadComponent = class SignaturePadComponent {
48397
48450
  }],
48398
48451
  ngImport: i0,
48399
48452
  template: `
48400
- <div class="sp-field" [class.sp-disabled]="disabled()" [class.sp-error]="!!error()">
48453
+ <div class="sp-field" [class.sp-disabled]="disabled()" [class.sp-error]="!!_activeError()">
48401
48454
  @if (label()) {
48402
48455
  <span class="sp-label" [id]="_labelId">{{ label() }}</span>
48403
48456
  }
@@ -48414,7 +48467,7 @@ var SignaturePadComponent = class SignaturePadComponent {
48414
48467
  [attr.aria-labelledby]="!ariaLabel() && label() ? _labelId : null"
48415
48468
  [attr.aria-describedby]="_describedBy()"
48416
48469
  [attr.aria-disabled]="disabled() ? 'true' : null"
48417
- [attr.aria-invalid]="error() ? 'true' : null"
48470
+ [attr.aria-invalid]="_activeError() ? 'true' : null"
48418
48471
  (pointerdown)="onPointerDown($event)"
48419
48472
  (pointermove)="onPointerMove($event)"
48420
48473
  (pointerup)="onPointerEnd($event)"
@@ -48429,8 +48482,8 @@ var SignaturePadComponent = class SignaturePadComponent {
48429
48482
  </div>
48430
48483
  <span class="sp-sr" [id]="_helpId">{{ labels.t('signaturePad.keyboardHelp') }}</span>
48431
48484
  <span class="sp-sr" role="status" aria-live="polite">{{ _announcement() }}</span>
48432
- @if (error()) {
48433
- <p class="sp-desc sp-desc-error" [id]="_descId" role="alert">{{ error() }}</p>
48485
+ @if (_activeError()) {
48486
+ <p class="sp-desc sp-desc-error" [id]="_descId" role="alert">{{ _activeError() }}</p>
48434
48487
  } @else if (hint()) {
48435
48488
  <p class="sp-desc" [id]="_descId">{{ hint() }}</p>
48436
48489
  }
@@ -48493,7 +48546,7 @@ i0.ɵɵngDeclareClassMetadata({
48493
48546
  multi: true
48494
48547
  }],
48495
48548
  template: `
48496
- <div class="sp-field" [class.sp-disabled]="disabled()" [class.sp-error]="!!error()">
48549
+ <div class="sp-field" [class.sp-disabled]="disabled()" [class.sp-error]="!!_activeError()">
48497
48550
  @if (label()) {
48498
48551
  <span class="sp-label" [id]="_labelId">{{ label() }}</span>
48499
48552
  }
@@ -48510,7 +48563,7 @@ i0.ɵɵngDeclareClassMetadata({
48510
48563
  [attr.aria-labelledby]="!ariaLabel() && label() ? _labelId : null"
48511
48564
  [attr.aria-describedby]="_describedBy()"
48512
48565
  [attr.aria-disabled]="disabled() ? 'true' : null"
48513
- [attr.aria-invalid]="error() ? 'true' : null"
48566
+ [attr.aria-invalid]="_activeError() ? 'true' : null"
48514
48567
  (pointerdown)="onPointerDown($event)"
48515
48568
  (pointermove)="onPointerMove($event)"
48516
48569
  (pointerup)="onPointerEnd($event)"
@@ -48525,8 +48578,8 @@ i0.ɵɵngDeclareClassMetadata({
48525
48578
  </div>
48526
48579
  <span class="sp-sr" [id]="_helpId">{{ labels.t('signaturePad.keyboardHelp') }}</span>
48527
48580
  <span class="sp-sr" role="status" aria-live="polite">{{ _announcement() }}</span>
48528
- @if (error()) {
48529
- <p class="sp-desc sp-desc-error" [id]="_descId" role="alert">{{ error() }}</p>
48581
+ @if (_activeError()) {
48582
+ <p class="sp-desc sp-desc-error" [id]="_descId" role="alert">{{ _activeError() }}</p>
48530
48583
  } @else if (hint()) {
48531
48584
  <p class="sp-desc" [id]="_descId">{{ hint() }}</p>
48532
48585
  }
@@ -50363,7 +50416,7 @@ var ColorInputComponent = class ColorInputComponent {
50363
50416
  this._issue = computed(() => this._check(this._model(), this._edited()), ...ngDevMode ? [{ debugName: "_issue" }] : /* istanbul ignore next */ []);
50364
50417
  this.invalid = computed(() => !!this.error() || !!this._issue(), ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
50365
50418
  this.errorMessage = computed(() => this._issue()?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
50366
- this._activeError = computed(() => this.error() || (this._reveal.revealed() ? this.errorMessage() : ""), ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
50419
+ this._activeError = computed(() => this._reveal.revealed() ? this.error() || this.errorMessage() : "", ...ngDevMode ? [{ debugName: "_activeError" }] : /* istanbul ignore next */ []);
50367
50420
  this._valid = computed(() => normalizeHexColor(this._model(), this.allowAlpha()), ...ngDevMode ? [{ debugName: "_valid" }] : /* istanbul ignore next */ []);
50368
50421
  this._swatchColor = computed(() => this._valid() ?? "transparent", ...ngDevMode ? [{ debugName: "_swatchColor" }] : /* istanbul ignore next */ []);
50369
50422
  this._nativeValue = computed(() => (this._valid() ?? "#000000").slice(0, 7), ...ngDevMode ? [{ debugName: "_nativeValue" }] : /* istanbul ignore next */ []);
@@ -59723,12 +59776,13 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
59723
59776
  this.submitAttempted = signal(false, ...ngDevMode ? [{ debugName: "submitAttempted" }] : /* istanbul ignore next */ []);
59724
59777
  this.nameTouched = signal(false, ...ngDevMode ? [{ debugName: "nameTouched" }] : /* istanbul ignore next */ []);
59725
59778
  this.subjectTouched = signal(false, ...ngDevMode ? [{ debugName: "subjectTouched" }] : /* istanbul ignore next */ []);
59726
- this.nameErrorShown = computed(() => this.nameTouched() || this.submitAttempted() ? this.nameError() : "", ...ngDevMode ? [{ debugName: "nameErrorShown" }] : /* istanbul ignore next */ []);
59727
- this.subjectErrorShown = computed(() => this.subjectTouched() || this.submitAttempted() ? this.subjectError() : "", ...ngDevMode ? [{ debugName: "subjectErrorShown" }] : /* istanbul ignore next */ []);
59728
- this.bodyErrorShown = computed(() => this.bodyEdited() || this.submitAttempted() ? this.bodyError() : "", ...ngDevMode ? [{ debugName: "bodyErrorShown" }] : /* istanbul ignore next */ []);
59779
+ this.nameErrorShown = computed(() => this.nameTouched() ? this.nameError() : "", ...ngDevMode ? [{ debugName: "nameErrorShown" }] : /* istanbul ignore next */ []);
59780
+ this.subjectErrorShown = computed(() => this.subjectTouched() ? this.subjectError() : "", ...ngDevMode ? [{ debugName: "subjectErrorShown" }] : /* istanbul ignore next */ []);
59781
+ this.bodyBlurred = signal(false, ...ngDevMode ? [{ debugName: "bodyBlurred" }] : /* istanbul ignore next */ []);
59782
+ this.bodyErrorShown = computed(() => this.bodyEdited() || this.bodyBlurred() ? this.bodyError() : "", ...ngDevMode ? [{ debugName: "bodyErrorShown" }] : /* istanbul ignore next */ []);
59729
59783
  this.assignmentError = computed(() => this.assignmentOptions().length > 0 && !this.assignmentState().some((a) => a.assigned) ? this.labels.t("emailTemplateEditor.assignmentRequired") : "", ...ngDevMode ? [{ debugName: "assignmentError" }] : /* istanbul ignore next */ []);
59730
59784
  this.assignmentsTouched = signal(false, ...ngDevMode ? [{ debugName: "assignmentsTouched" }] : /* istanbul ignore next */ []);
59731
- this.assignmentErrorShown = computed(() => this.assignmentsTouched() || this.submitAttempted() ? this.assignmentError() : "", ...ngDevMode ? [{ debugName: "assignmentErrorShown" }] : /* istanbul ignore next */ []);
59785
+ this.assignmentErrorShown = computed(() => this.assignmentsTouched() ? this.assignmentError() : "", ...ngDevMode ? [{ debugName: "assignmentErrorShown" }] : /* istanbul ignore next */ []);
59732
59786
  this.canSave = computed(() => !this.nameError() && !this.subjectError() && !this.bodyError() && !this.datesError() && !this.assignmentError(), ...ngDevMode ? [{ debugName: "canSave" }] : /* istanbul ignore next */ []);
59733
59787
  this.saveDisabled = computed(() => !this.canWrite() || !this.canSave(), ...ngDevMode ? [{ debugName: "saveDisabled" }] : /* istanbul ignore next */ []);
59734
59788
  this.saveHint = computed(() => {
@@ -59740,6 +59794,11 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
59740
59794
  if (this.assignmentError()) missing.push(this.labels.t("emailTemplateEditor.missing.assignment"));
59741
59795
  return missing.length ? this.labels.t("emailTemplateEditor.saveHint", { items: missing.join(", ") }) : this.datesError();
59742
59796
  }, ...ngDevMode ? [{ debugName: "saveHint" }] : /* istanbul ignore next */ []);
59797
+ this.datesTouched = signal(false, ...ngDevMode ? [{ debugName: "datesTouched" }] : /* istanbul ignore next */ []);
59798
+ this.saveHintVisible = computed(() => {
59799
+ const hint = this.saveHint();
59800
+ return hint && hint === this.datesError() && !this.datesTouched() ? "" : hint;
59801
+ }, ...ngDevMode ? [{ debugName: "saveHintVisible" }] : /* istanbul ignore next */ []);
59743
59802
  this.normalizedLink = computed(() => {
59744
59803
  const url = this.linkUrl().trim();
59745
59804
  if (!url) return "";
@@ -59827,6 +59886,8 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
59827
59886
  this.blockSpacing.set(this.blocks()[0]?.spacing ?? "");
59828
59887
  this.loadedBody.set(t?.id ? t.body ?? "" : null);
59829
59888
  this.bodyEdited.set(false);
59889
+ this.bodyBlurred.set(false);
59890
+ this.datesTouched.set(false);
59830
59891
  this.submitAttempted.set(false);
59831
59892
  this.nameTouched.set(false);
59832
59893
  this.subjectTouched.set(false);
@@ -59834,6 +59895,16 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
59834
59895
  this.assignmentsTouched.set(false);
59835
59896
  this.savedSnapshot.set(t?.id ? this.snapshot() : null);
59836
59897
  }
59898
+ onBodyFocusOut(event) {
59899
+ const next = event.relatedTarget;
59900
+ if (next && event.currentTarget.contains(next)) return;
59901
+ this.bodyBlurred.set(true);
59902
+ }
59903
+ onAssignmentsFocusOut(event) {
59904
+ const next = event.relatedTarget;
59905
+ if (next && event.currentTarget.contains(next)) return;
59906
+ this.assignmentsTouched.set(true);
59907
+ }
59837
59908
  onSave() {
59838
59909
  if (this.saving() || !this.canWrite()) return;
59839
59910
  if (!this.canSave()) {
@@ -60542,6 +60613,10 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
60542
60613
  <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/><polyline points="7 3 7 8 15 8"/></svg>{{ labels.t('emailTemplateEditor.saveTemplate') }}</ui-button>
60543
60614
  </span>
60544
60615
  </div>
60616
+ @if (saveHintVisible(); as hint) {
60617
+ <!-- A blocked Save explains itself in visible text, not only in the tooltip. -->
60618
+ <p class="save-hint" role="status" data-testid="save-hint">{{ hint }}</p>
60619
+ }
60545
60620
  </div>
60546
60621
  <ui-divider />
60547
60622
 
@@ -60564,12 +60639,12 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
60564
60639
 
60565
60640
  <div class="form-field">
60566
60641
  <ui-text-input [label]="labels.t('common.name')" [required]="true" [(ngModel)]="name" [readonly]="!canWrite()" [maxlength]="maxTextLength()"
60567
- [placeholder]="namePlaceholder()" [error]="nameErrorShown()" [showErrors]="nameTouched() || submitAttempted()" (blurred)="nameTouched.set(true)" />
60642
+ [placeholder]="namePlaceholder()" [error]="nameErrorShown()" [showErrors]="nameTouched()" (blurred)="nameTouched.set(true)" />
60568
60643
  </div>
60569
60644
 
60570
60645
  <div class="form-field">
60571
60646
  <ui-text-input [label]="labels.t('common.subject')" [required]="true" [(ngModel)]="subject" [readonly]="!canWrite()" [maxlength]="maxTextLength()"
60572
- [placeholder]="subjectPlaceholder()" [error]="subjectErrorShown()" [showErrors]="subjectTouched() || submitAttempted()" (blurred)="subjectTouched.set(true)">
60647
+ [placeholder]="subjectPlaceholder()" [error]="subjectErrorShown()" [showErrors]="subjectTouched()" (blurred)="subjectTouched.set(true)">
60573
60648
  </ui-text-input>
60574
60649
  </div>
60575
60650
 
@@ -60580,7 +60655,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
60580
60655
  <ui-checkbox [label]="labels.t('emailTemplateEditor.useThisTemplateAllYear')" [(checked)]="useAllYear" [disabled]="!canWrite()" />
60581
60656
 
60582
60657
  @if (!useAllYear()) {
60583
- <div class="form-row-dates">
60658
+ <div class="form-row-dates" (focusout)="datesTouched.set(true)">
60584
60659
  <ui-date-input [label]="labels.t('emailTemplateEditor.activeFrom')" [(ngModel)]="activeFrom" [disabled]="!canWrite()" />
60585
60660
  <ui-date-input [label]="labels.t('emailTemplateEditor.activeTo')" [(ngModel)]="activeTo" [disabled]="!canWrite()" [min]="activeFrom()" [error]="datesError()" />
60586
60661
  </div>
@@ -60596,7 +60671,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
60596
60671
  @if (filteredAssignments().length === 0) {
60597
60672
  <ui-empty-state iconType="search" [title]="labels.t('emailTemplateEditor.noAssignmentsFound')" [message]="labels.t('emailTemplateEditor.noAssignmentsMatchYourSearch')" />
60598
60673
  }
60599
- <div class="assignment-list" [hidden]="filteredAssignments().length === 0">
60674
+ <div class="assignment-list" [hidden]="filteredAssignments().length === 0" (focusout)="onAssignmentsFocusOut($event)">
60600
60675
  @for (item of filteredAssignments(); track item.key) {
60601
60676
  <div class="assignment-item" [class.assignment-readonly]="!canWrite()" [attr.role]="canWrite() ? 'switch' : null" [attr.tabindex]="canWrite() ? 0 : null"
60602
60677
  [attr.aria-checked]="canWrite() ? item.assigned : null" [attr.aria-label]="canWrite() ? item.name : null"
@@ -60740,7 +60815,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
60740
60815
  <ui-error [errorId]="idPrefix() + '-body-error'" [message]="bodyErrorShown()" />
60741
60816
 
60742
60817
  <!-- Block Canvas with DnD -->
60743
- <div class="blocks-canvas" (dragover)="onCanvasDragOver($event)" (drop)="onDropZoneDrop($event, blocks().length)">
60818
+ <div class="blocks-canvas" (dragover)="onCanvasDragOver($event)" (drop)="onDropZoneDrop($event, blocks().length)" (focusout)="onBodyFocusOut($event)">
60744
60819
  <!-- Initial drop zone (before first block) -->
60745
60820
  <div class="drop-zone" [class.active]="dragOverIndex() === 0" (dragover)="onDropZoneDragOver($event, 0)" (dragleave)="onDropZoneLeave()" (drop)="onDropZoneDrop($event, 0)">
60746
60821
  <span class="drop-zone-label">{{ labels.t('emailTemplateEditor.dropHere') }}</span>
@@ -60970,7 +61045,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
60970
61045
 
60971
61046
  `,
60972
61047
  isInline: true,
60973
- styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0}.required{color:#ef4444;font-weight:400}.editor-page{display:flex;flex-direction:column;flex:1;min-height:0;background:#f8fafc;overflow:hidden}.editor-actions{display:flex;justify-content:space-between;align-items:center;gap:8px 16px;flex-wrap:wrap;padding:0 0 12px;flex-shrink:0}.editor-heading{margin:0;font-size:1.25rem;font-weight:700;color:#1e293b;line-height:1.3;min-width:0}.save-wrap{display:inline-flex}.editor-actions-buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}.readonly-note{margin:0;padding:8px 16px;font-size:.8125rem;color:#92400e;background:#fffbeb;border-bottom:1px solid #fde68a}.readonly-note.system-note{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.editor-body{display:grid;grid-template-columns:340px minmax(0,1fr) 300px;grid-template-rows:minmax(0,1fr);flex:1;min-height:0;overflow:hidden}.panel-left{background:#fff;border-right:1px solid #e2e8f0;padding:24px;overflow-y:auto}.panel-title{font-size:1.0625rem;font-weight:700;color:#1e293b;margin:0 0 20px}.form-field{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}.form-row-dates{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.assignments-section{border-top:1px solid #e2e8f0;padding-top:20px;margin-top:16px}.section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 6px}.section-desc{font-size:.8125rem;color:#64748b;line-height:1.5;margin:0 0 12px}.assignment-list{max-height:340px;overflow-y:auto;margin-top:12px;border:1px solid #e2e8f0;border-radius:8px}.assignment-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;cursor:pointer;border-bottom:1px solid #f1f5f9;transition:background .1s}.assignment-item:last-child{border-bottom:none}.assignment-item:hover{background:#f8fafc}.assignment-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.assignment-item.assignment-readonly{cursor:default}.assignment-item.assignment-readonly:hover{background:transparent}.assignment-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.assignment-text strong{font-size:.8125rem;color:#1e293b}.assignment-text span{font-size:.75rem;color:#64748b}.assignment-channels{display:flex;gap:4px;flex-shrink:0}.channel-badge{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background:#f1f5f9;color:#64748b;transition:all .15s}.channel-badge.active{background:#3b82f6;color:#fff}.channel-badge.disabled{opacity:.4;cursor:not-allowed}.config-desc{font-size:.875rem;color:#64748b;line-height:1.5;margin:0}.config-divider{border:none;border-top:1px solid #e2e8f0;margin:20px 0}.config-section{display:flex;flex-direction:column;gap:12px}.config-section-label{font-size:.6875rem;font-weight:700;color:#3b82f6;text-transform:uppercase;letter-spacing:.04em}.config-field{display:flex;flex-direction:column;gap:6px}.config-field-mt{margin-top:16px}.config-label{font-size:.8125rem;font-weight:600;color:#1e293b}.config-readonly{padding:9px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;font-size:.875rem;color:#1e293b}.config-hint{font-size:.75rem;color:#64748b}.test-save-note{display:flex;align-items:center;gap:8px;padding:10px 14px;background:#fef3c7;border:1px solid #fcd34d;border-radius:8px;font-size:.8125rem;color:#92400e;margin-top:12px}.test-save-note svg{flex-shrink:0}.panel-center{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}.editor-tabs{display:flex;gap:2px;padding:12px 20px 0;background:#fff;border-bottom:1px solid #e2e8f0;overflow-x:auto;-webkit-overflow-scrolling:touch}.editor-tab{display:flex;align-items:center;gap:6px;padding:10px 16px;border:1px solid #e2e8f0;border-bottom:none;border-radius:8px 8px 0 0;background:#f8fafc;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;white-space:nowrap}.editor-tab:hover{background:#fff;color:#1e293b}.editor-tab.active{background:#eff6ff;color:#1d4ed8;border-color:#93c5fd}.editor-tab:focus-visible,.right-tab:focus-visible,.block-group-header:focus-visible,.variable-item:focus-visible,.add-block-btn:focus-visible,.block-item:focus-visible,.video-lib-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.editor-toolbar{display:flex;align-items:center;gap:8px;padding:10px 20px;background:#fff;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.toolbar-row-2{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 20px;background:#fff;border-bottom:1px solid #e2e8f0}.toolbar-group{display:flex;align-items:center;gap:2px;padding-right:8px;border-right:1px solid #e2e8f0}.toolbar-group:last-child{border-right:none;padding-right:0}.toolbar-select{display:block;min-width:96px}.toolbar-label{font-size:.75rem;font-weight:600;color:#64748b;white-space:nowrap;margin-right:6px}.hidden-color-input{position:absolute;width:0;height:0;opacity:0;pointer-events:none;border:none;padding:0}.color-indicator{display:flex;flex-direction:column;align-items:center;gap:2px;color:#475569}.color-bar{display:block;width:16px;height:3px;border-radius:2px;border:1px solid rgba(0,0,0,.1)}.link-dialog{background:#fff;border-bottom:1px solid #e2e8f0;padding:12px 20px}.link-dialog-inner{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.link-dialog-title{font-size:.8125rem;font-weight:700;color:#1e293b;white-space:nowrap;padding-top:10px}.link-dialog-input{display:block;width:240px;max-width:100%}.link-dialog-actions{display:flex;gap:6px}.preview-frame{flex:1;display:flex;justify-content:center;align-items:stretch;padding:24px;overflow-y:auto;background:#f1f5f9}.preview-frame.mobile{align-items:flex-start}.preview-content{display:block;flex:1 1 auto;max-width:600px;width:100%;box-sizing:border-box;min-height:400px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.mobile-shell{width:375px;max-width:100%;box-sizing:border-box;min-height:600px;border:2px solid #1e293b;border-radius:24px;padding:40px 12px 24px;background:#fff;box-shadow:0 8px 32px #0000001f}.mobile-shell .preview-content{border:none;border-radius:0;max-width:100%;height:520px;min-height:0}.blocks-canvas{flex:1 1 0;min-height:0;padding:16px 20px 24px 56px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:#f1f5f9;display:flex;flex-direction:column}.block-wrapper{flex-shrink:0;position:relative;display:flex;align-items:flex-start;background:#fff;border:2px solid transparent;border-radius:8px;transition:border-color .15s,box-shadow .15s}.block-wrapper:hover,.block-wrapper.selected,.block-wrapper:focus-within{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.block-wrapper:hover .block-drag-handle,.block-wrapper.selected .block-drag-handle,.block-wrapper:focus-within .block-drag-handle{opacity:1}.block-wrapper:hover .block-controls,.block-wrapper.selected .block-controls,.block-wrapper:focus-within .block-controls{opacity:1;pointer-events:all}.block-wrapper.dragging{opacity:.4}.block-drag-handle{flex-shrink:0;width:28px;display:flex;align-items:flex-start;justify-content:center;padding-top:14px;opacity:0;transition:opacity .15s;cursor:grab;color:#94a3b8}.block-drag-handle:active{cursor:grabbing}.block-content{flex:1;min-width:0;padding:12px 16px;outline:none;font-size:.9375rem;color:#1e293b;line-height:1.6;min-height:48px;overflow-wrap:anywhere}.block-content:empty:before{content:attr(data-placeholder);color:#64748b;font-style:italic;pointer-events:none}.block-content p{margin:0 0 8px}.block-content p:last-child{margin:0}.block-content h1,.block-content h2,.block-content h3{margin:8px 0 6px;color:#1e293b}.block-content a{color:#3b82f6}.block-content img{max-width:100%;border-radius:6px}.block-content ul,.block-content ol{padding-left:20px;margin:0 0 8px}.block-controls{position:absolute;top:0;left:-48px;flex-direction:column;display:flex;gap:2px;opacity:0;pointer-events:none;transition:opacity .15s;background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:3px;box-shadow:0 2px 6px #00000014}@media(pointer:coarse){.editor-tab,.right-tab,.block-group-header{min-height:44px}}@media(hover:none){.block-wrapper.selected .block-controls{opacity:1;pointer-events:all}}.drop-zone{flex-shrink:0;height:8px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:height .15s,background .15s;position:relative}.drop-zone-label{font-size:.75rem;font-weight:600;color:#1d4ed8;opacity:0;transition:opacity .1s}.drop-zone.active{height:40px;background:#3b82f614;border:2px dashed #3b82f6}.drop-zone.active .drop-zone-label{opacity:1}.add-block-btn{flex-shrink:0;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;padding:12px;margin-top:8px;border:2px dashed #e2e8f0;border-radius:8px;background:none;font-size:.875rem;font-weight:600;color:#475569;cursor:pointer;font-family:inherit;transition:border-color .15s,color .15s,background .15s}.add-block-btn:hover{border-color:#3b82f6;color:#3b82f6;background:#3b82f60a}.panel-right{background:#fff;border-left:1px solid #e2e8f0;display:flex;flex-direction:column;min-height:0;min-width:0}.right-tabs{display:flex;border-bottom:1px solid #e2e8f0}.right-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:12px;min-height:44px;border:none;background:none;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;border-bottom:2px solid transparent}.right-tab:hover{color:#1e293b}.right-tab.active{color:#1d4ed8;background:#eff6ff;border-bottom-color:#3b82f6}.right-panel-body{flex:1;padding:20px;overflow-y:auto}.right-section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 12px}.right-section-desc{font-size:.8125rem;color:#64748b;margin:0 0 16px;line-height:1.5}.right-section-hint{font-size:.8125rem;color:#64748b;margin:0 0 12px;line-height:1.5}.block-group{border-bottom:1px solid #f1f5f9}.block-group-header{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:12px 0;border:none;background:none;font-size:.875rem;font-weight:600;color:#1e293b;cursor:pointer;font-family:inherit;text-align:left}.block-group-header .chevron{transition:transform .2s;color:#94a3b8}.block-group-header .chevron.expanded{transform:rotate(90deg)}.block-group-header span:nth-of-type(1){flex:1}.block-count{font-size:.75rem;font-weight:600;color:#475569;background:#f1f5f9;padding:2px 8px;border-radius:10px;margin-left:auto}.block-list{display:flex;flex-direction:column;gap:2px;padding-bottom:8px}.variable-list{display:flex;flex-direction:column;padding-bottom:8px}.variable-item+.variable-item{border-top:1px solid #f1f5f9;border-radius:0}.block-item{display:flex;align-items:center;gap:6px;box-sizing:border-box;width:100%;min-height:44px;padding:8px 0;font-size:.8125rem;color:#64748b;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit;-webkit-user-select:none;user-select:none}.block-item:hover{background:#f8fafc;color:#1e293b}.block-item-drag{color:#cbd5e1;flex-shrink:0;cursor:grab}.variable-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:44px;padding:8px 0;min-width:0;width:100%;box-sizing:border-box;border:none;background:none;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit}.variable-item:hover{background:#f8fafc}.var-tag{max-width:100%;overflow-wrap:anywhere;font-size:.75rem;font-weight:600;color:#1d4ed8;background:#3b82f614;padding:2px 6px;border-radius:4px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.var-example{font-size:.75rem;color:#64748b;overflow-wrap:anywhere}.var-description{font-size:.75rem;color:#64748b;line-height:1.4;overflow-wrap:anywhere}.video-library-panel{padding:0}.video-library-panel .right-section-title,.video-library-panel .right-section-hint{padding:0 16px}.video-library-panel .right-section-title{padding-top:16px}.video-config-section{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-bottom:1px solid #f1f5f9}.video-config-section:last-of-type{border-bottom:none}.video-lib-list{display:flex;flex-direction:column;gap:2px;padding:8px 8px 16px}.video-lib-item{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;text-align:left;font-family:inherit;transition:background .15s,border-color .15s}.video-lib-item:hover{background:#f8fafc;border-color:#e2e8f0}.video-lib-item.selected{background:#eff6ff;border-color:#93c5fd}.vli-thumb{position:relative;flex-shrink:0;width:56px;height:40px;border-radius:6px;background:linear-gradient(135deg,#f1f5f9,#e2e8f0);display:flex;align-items:center;justify-content:center}.vli-dur{position:absolute;bottom:2px;right:3px;font-size:.625rem;font-weight:600;color:#fff;background:#000000a6;padding:1px 4px;border-radius:3px}.vli-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.vli-title{font-size:.8125rem;font-weight:600;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vli-cat{font-size:.75rem;color:#475569}.vli-check{flex-shrink:0}.video-lib-loading{padding:8px}.video-lib-skeleton{display:flex;align-items:center;gap:10px;padding:8px;margin-bottom:4px}.vls-info{flex:1;display:flex;flex-direction:column;gap:6px}@media(max-width:1200px){.editor-body{grid-template-columns:280px minmax(0,1fr) 260px}}@media(max-width:900px){:host{flex:none}.editor-page{flex:none;min-height:100vh;min-height:100dvh;overflow:visible}.editor-body{display:flex;flex-direction:column;flex:none;overflow:visible}.panel-left{border-right:none;border-bottom:1px solid #e2e8f0;overflow:visible;padding:16px}.panel-center{overflow:visible;min-height:480px}.blocks-canvas{overflow:visible;min-height:320px}.panel-right{border-left:none;border-top:1px solid #e2e8f0}.right-panel-body{overflow:visible}.editor-toolbar,.toolbar-row-2,.link-dialog,.editor-tabs{padding-left:12px;padding-right:12px}.preview-frame{padding:12px}.form-row-dates{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}\n"],
61048
+ styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0}.required{color:#ef4444;font-weight:400}.editor-page{display:flex;flex-direction:column;flex:1;min-height:0;background:#f8fafc;overflow:hidden}.editor-actions{display:flex;justify-content:space-between;align-items:center;gap:8px 16px;flex-wrap:wrap;padding:0 0 12px;flex-shrink:0}.editor-heading{margin:0;font-size:1.25rem;font-weight:700;color:#1e293b;line-height:1.3;min-width:0}.save-wrap{display:inline-flex}.save-hint{margin:0;font-size:12px;color:#475569;flex-basis:100%;text-align:right}.editor-actions-buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}.readonly-note{margin:0;padding:8px 16px;font-size:.8125rem;color:#92400e;background:#fffbeb;border-bottom:1px solid #fde68a}.readonly-note.system-note{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.editor-body{display:grid;grid-template-columns:340px minmax(0,1fr) 300px;grid-template-rows:minmax(0,1fr);flex:1;min-height:0;overflow:hidden}.panel-left{background:#fff;border-right:1px solid #e2e8f0;padding:24px;overflow-y:auto}.panel-title{font-size:1.0625rem;font-weight:700;color:#1e293b;margin:0 0 20px}.form-field{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}.form-row-dates{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.assignments-section{border-top:1px solid #e2e8f0;padding-top:20px;margin-top:16px}.section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 6px}.section-desc{font-size:.8125rem;color:#64748b;line-height:1.5;margin:0 0 12px}.assignment-list{max-height:340px;overflow-y:auto;margin-top:12px;border:1px solid #e2e8f0;border-radius:8px}.assignment-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;cursor:pointer;border-bottom:1px solid #f1f5f9;transition:background .1s}.assignment-item:last-child{border-bottom:none}.assignment-item:hover{background:#f8fafc}.assignment-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.assignment-item.assignment-readonly{cursor:default}.assignment-item.assignment-readonly:hover{background:transparent}.assignment-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.assignment-text strong{font-size:.8125rem;color:#1e293b}.assignment-text span{font-size:.75rem;color:#64748b}.assignment-channels{display:flex;gap:4px;flex-shrink:0}.channel-badge{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background:#f1f5f9;color:#64748b;transition:all .15s}.channel-badge.active{background:#3b82f6;color:#fff}.channel-badge.disabled{opacity:.4;cursor:not-allowed}.config-desc{font-size:.875rem;color:#64748b;line-height:1.5;margin:0}.config-divider{border:none;border-top:1px solid #e2e8f0;margin:20px 0}.config-section{display:flex;flex-direction:column;gap:12px}.config-section-label{font-size:.6875rem;font-weight:700;color:#3b82f6;text-transform:uppercase;letter-spacing:.04em}.config-field{display:flex;flex-direction:column;gap:6px}.config-field-mt{margin-top:16px}.config-label{font-size:.8125rem;font-weight:600;color:#1e293b}.config-readonly{padding:9px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;font-size:.875rem;color:#1e293b}.config-hint{font-size:.75rem;color:#64748b}.test-save-note{display:flex;align-items:center;gap:8px;padding:10px 14px;background:#fef3c7;border:1px solid #fcd34d;border-radius:8px;font-size:.8125rem;color:#92400e;margin-top:12px}.test-save-note svg{flex-shrink:0}.panel-center{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}.editor-tabs{display:flex;gap:2px;padding:12px 20px 0;background:#fff;border-bottom:1px solid #e2e8f0;overflow-x:auto;-webkit-overflow-scrolling:touch}.editor-tab{display:flex;align-items:center;gap:6px;padding:10px 16px;border:1px solid #e2e8f0;border-bottom:none;border-radius:8px 8px 0 0;background:#f8fafc;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;white-space:nowrap}.editor-tab:hover{background:#fff;color:#1e293b}.editor-tab.active{background:#eff6ff;color:#1d4ed8;border-color:#93c5fd}.editor-tab:focus-visible,.right-tab:focus-visible,.block-group-header:focus-visible,.variable-item:focus-visible,.add-block-btn:focus-visible,.block-item:focus-visible,.video-lib-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.editor-toolbar{display:flex;align-items:center;gap:8px;padding:10px 20px;background:#fff;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.toolbar-row-2{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 20px;background:#fff;border-bottom:1px solid #e2e8f0}.toolbar-group{display:flex;align-items:center;gap:2px;padding-right:8px;border-right:1px solid #e2e8f0}.toolbar-group:last-child{border-right:none;padding-right:0}.toolbar-select{display:block;min-width:96px}.toolbar-label{font-size:.75rem;font-weight:600;color:#64748b;white-space:nowrap;margin-right:6px}.hidden-color-input{position:absolute;width:0;height:0;opacity:0;pointer-events:none;border:none;padding:0}.color-indicator{display:flex;flex-direction:column;align-items:center;gap:2px;color:#475569}.color-bar{display:block;width:16px;height:3px;border-radius:2px;border:1px solid rgba(0,0,0,.1)}.link-dialog{background:#fff;border-bottom:1px solid #e2e8f0;padding:12px 20px}.link-dialog-inner{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.link-dialog-title{font-size:.8125rem;font-weight:700;color:#1e293b;white-space:nowrap;padding-top:10px}.link-dialog-input{display:block;width:240px;max-width:100%}.link-dialog-actions{display:flex;gap:6px}.preview-frame{flex:1;display:flex;justify-content:center;align-items:stretch;padding:24px;overflow-y:auto;background:#f1f5f9}.preview-frame.mobile{align-items:flex-start}.preview-content{display:block;flex:1 1 auto;max-width:600px;width:100%;box-sizing:border-box;min-height:400px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.mobile-shell{width:375px;max-width:100%;box-sizing:border-box;min-height:600px;border:2px solid #1e293b;border-radius:24px;padding:40px 12px 24px;background:#fff;box-shadow:0 8px 32px #0000001f}.mobile-shell .preview-content{border:none;border-radius:0;max-width:100%;height:520px;min-height:0}.blocks-canvas{flex:1 1 0;min-height:0;padding:16px 20px 24px 56px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:#f1f5f9;display:flex;flex-direction:column}.block-wrapper{flex-shrink:0;position:relative;display:flex;align-items:flex-start;background:#fff;border:2px solid transparent;border-radius:8px;transition:border-color .15s,box-shadow .15s}.block-wrapper:hover,.block-wrapper.selected,.block-wrapper:focus-within{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.block-wrapper:hover .block-drag-handle,.block-wrapper.selected .block-drag-handle,.block-wrapper:focus-within .block-drag-handle{opacity:1}.block-wrapper:hover .block-controls,.block-wrapper.selected .block-controls,.block-wrapper:focus-within .block-controls{opacity:1;pointer-events:all}.block-wrapper.dragging{opacity:.4}.block-drag-handle{flex-shrink:0;width:28px;display:flex;align-items:flex-start;justify-content:center;padding-top:14px;opacity:0;transition:opacity .15s;cursor:grab;color:#94a3b8}.block-drag-handle:active{cursor:grabbing}.block-content{flex:1;min-width:0;padding:12px 16px;outline:none;font-size:.9375rem;color:#1e293b;line-height:1.6;min-height:48px;overflow-wrap:anywhere}.block-content:empty:before{content:attr(data-placeholder);color:#64748b;font-style:italic;pointer-events:none}.block-content p{margin:0 0 8px}.block-content p:last-child{margin:0}.block-content h1,.block-content h2,.block-content h3{margin:8px 0 6px;color:#1e293b}.block-content a{color:#3b82f6}.block-content img{max-width:100%;border-radius:6px}.block-content ul,.block-content ol{padding-left:20px;margin:0 0 8px}.block-controls{position:absolute;top:0;left:-48px;flex-direction:column;display:flex;gap:2px;opacity:0;pointer-events:none;transition:opacity .15s;background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:3px;box-shadow:0 2px 6px #00000014}@media(pointer:coarse){.editor-tab,.right-tab,.block-group-header{min-height:44px}}@media(hover:none){.block-wrapper.selected .block-controls{opacity:1;pointer-events:all}}.drop-zone{flex-shrink:0;height:8px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:height .15s,background .15s;position:relative}.drop-zone-label{font-size:.75rem;font-weight:600;color:#1d4ed8;opacity:0;transition:opacity .1s}.drop-zone.active{height:40px;background:#3b82f614;border:2px dashed #3b82f6}.drop-zone.active .drop-zone-label{opacity:1}.add-block-btn{flex-shrink:0;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;padding:12px;margin-top:8px;border:2px dashed #e2e8f0;border-radius:8px;background:none;font-size:.875rem;font-weight:600;color:#475569;cursor:pointer;font-family:inherit;transition:border-color .15s,color .15s,background .15s}.add-block-btn:hover{border-color:#3b82f6;color:#3b82f6;background:#3b82f60a}.panel-right{background:#fff;border-left:1px solid #e2e8f0;display:flex;flex-direction:column;min-height:0;min-width:0}.right-tabs{display:flex;border-bottom:1px solid #e2e8f0}.right-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:12px;min-height:44px;border:none;background:none;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;border-bottom:2px solid transparent}.right-tab:hover{color:#1e293b}.right-tab.active{color:#1d4ed8;background:#eff6ff;border-bottom-color:#3b82f6}.right-panel-body{flex:1;padding:20px;overflow-y:auto}.right-section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 12px}.right-section-desc{font-size:.8125rem;color:#64748b;margin:0 0 16px;line-height:1.5}.right-section-hint{font-size:.8125rem;color:#64748b;margin:0 0 12px;line-height:1.5}.block-group{border-bottom:1px solid #f1f5f9}.block-group-header{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:12px 0;border:none;background:none;font-size:.875rem;font-weight:600;color:#1e293b;cursor:pointer;font-family:inherit;text-align:left}.block-group-header .chevron{transition:transform .2s;color:#94a3b8}.block-group-header .chevron.expanded{transform:rotate(90deg)}.block-group-header span:nth-of-type(1){flex:1}.block-count{font-size:.75rem;font-weight:600;color:#475569;background:#f1f5f9;padding:2px 8px;border-radius:10px;margin-left:auto}.block-list{display:flex;flex-direction:column;gap:2px;padding-bottom:8px}.variable-list{display:flex;flex-direction:column;padding-bottom:8px}.variable-item+.variable-item{border-top:1px solid #f1f5f9;border-radius:0}.block-item{display:flex;align-items:center;gap:6px;box-sizing:border-box;width:100%;min-height:44px;padding:8px 0;font-size:.8125rem;color:#64748b;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit;-webkit-user-select:none;user-select:none}.block-item:hover{background:#f8fafc;color:#1e293b}.block-item-drag{color:#cbd5e1;flex-shrink:0;cursor:grab}.variable-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:44px;padding:8px 0;min-width:0;width:100%;box-sizing:border-box;border:none;background:none;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit}.variable-item:hover{background:#f8fafc}.var-tag{max-width:100%;overflow-wrap:anywhere;font-size:.75rem;font-weight:600;color:#1d4ed8;background:#3b82f614;padding:2px 6px;border-radius:4px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.var-example{font-size:.75rem;color:#64748b;overflow-wrap:anywhere}.var-description{font-size:.75rem;color:#64748b;line-height:1.4;overflow-wrap:anywhere}.video-library-panel{padding:0}.video-library-panel .right-section-title,.video-library-panel .right-section-hint{padding:0 16px}.video-library-panel .right-section-title{padding-top:16px}.video-config-section{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-bottom:1px solid #f1f5f9}.video-config-section:last-of-type{border-bottom:none}.video-lib-list{display:flex;flex-direction:column;gap:2px;padding:8px 8px 16px}.video-lib-item{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;text-align:left;font-family:inherit;transition:background .15s,border-color .15s}.video-lib-item:hover{background:#f8fafc;border-color:#e2e8f0}.video-lib-item.selected{background:#eff6ff;border-color:#93c5fd}.vli-thumb{position:relative;flex-shrink:0;width:56px;height:40px;border-radius:6px;background:linear-gradient(135deg,#f1f5f9,#e2e8f0);display:flex;align-items:center;justify-content:center}.vli-dur{position:absolute;bottom:2px;right:3px;font-size:.625rem;font-weight:600;color:#fff;background:#000000a6;padding:1px 4px;border-radius:3px}.vli-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.vli-title{font-size:.8125rem;font-weight:600;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vli-cat{font-size:.75rem;color:#475569}.vli-check{flex-shrink:0}.video-lib-loading{padding:8px}.video-lib-skeleton{display:flex;align-items:center;gap:10px;padding:8px;margin-bottom:4px}.vls-info{flex:1;display:flex;flex-direction:column;gap:6px}@media(max-width:1200px){.editor-body{grid-template-columns:280px minmax(0,1fr) 260px}}@media(max-width:900px){:host{flex:none}.editor-page{flex:none;min-height:100vh;min-height:100dvh;overflow:visible}.editor-body{display:flex;flex-direction:column;flex:none;overflow:visible}.panel-left{border-right:none;border-bottom:1px solid #e2e8f0;overflow:visible;padding:16px}.panel-center{overflow:visible;min-height:480px}.blocks-canvas{overflow:visible;min-height:320px}.panel-right{border-left:none;border-top:1px solid #e2e8f0}.right-panel-body{overflow:visible}.editor-toolbar,.toolbar-row-2,.link-dialog,.editor-tabs{padding-left:12px;padding-right:12px}.preview-frame{padding:12px}.form-row-dates{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}\n"],
60974
61049
  dependencies: [
60975
61050
  {
60976
61051
  kind: "ngmodule",
@@ -61316,6 +61391,10 @@ i0.ɵɵngDeclareClassMetadata({
61316
61391
  <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/><polyline points="7 3 7 8 15 8"/></svg>{{ labels.t('emailTemplateEditor.saveTemplate') }}</ui-button>
61317
61392
  </span>
61318
61393
  </div>
61394
+ @if (saveHintVisible(); as hint) {
61395
+ <!-- A blocked Save explains itself in visible text, not only in the tooltip. -->
61396
+ <p class="save-hint" role="status" data-testid="save-hint">{{ hint }}</p>
61397
+ }
61319
61398
  </div>
61320
61399
  <ui-divider />
61321
61400
 
@@ -61338,12 +61417,12 @@ i0.ɵɵngDeclareClassMetadata({
61338
61417
 
61339
61418
  <div class="form-field">
61340
61419
  <ui-text-input [label]="labels.t('common.name')" [required]="true" [(ngModel)]="name" [readonly]="!canWrite()" [maxlength]="maxTextLength()"
61341
- [placeholder]="namePlaceholder()" [error]="nameErrorShown()" [showErrors]="nameTouched() || submitAttempted()" (blurred)="nameTouched.set(true)" />
61420
+ [placeholder]="namePlaceholder()" [error]="nameErrorShown()" [showErrors]="nameTouched()" (blurred)="nameTouched.set(true)" />
61342
61421
  </div>
61343
61422
 
61344
61423
  <div class="form-field">
61345
61424
  <ui-text-input [label]="labels.t('common.subject')" [required]="true" [(ngModel)]="subject" [readonly]="!canWrite()" [maxlength]="maxTextLength()"
61346
- [placeholder]="subjectPlaceholder()" [error]="subjectErrorShown()" [showErrors]="subjectTouched() || submitAttempted()" (blurred)="subjectTouched.set(true)">
61425
+ [placeholder]="subjectPlaceholder()" [error]="subjectErrorShown()" [showErrors]="subjectTouched()" (blurred)="subjectTouched.set(true)">
61347
61426
  </ui-text-input>
61348
61427
  </div>
61349
61428
 
@@ -61354,7 +61433,7 @@ i0.ɵɵngDeclareClassMetadata({
61354
61433
  <ui-checkbox [label]="labels.t('emailTemplateEditor.useThisTemplateAllYear')" [(checked)]="useAllYear" [disabled]="!canWrite()" />
61355
61434
 
61356
61435
  @if (!useAllYear()) {
61357
- <div class="form-row-dates">
61436
+ <div class="form-row-dates" (focusout)="datesTouched.set(true)">
61358
61437
  <ui-date-input [label]="labels.t('emailTemplateEditor.activeFrom')" [(ngModel)]="activeFrom" [disabled]="!canWrite()" />
61359
61438
  <ui-date-input [label]="labels.t('emailTemplateEditor.activeTo')" [(ngModel)]="activeTo" [disabled]="!canWrite()" [min]="activeFrom()" [error]="datesError()" />
61360
61439
  </div>
@@ -61370,7 +61449,7 @@ i0.ɵɵngDeclareClassMetadata({
61370
61449
  @if (filteredAssignments().length === 0) {
61371
61450
  <ui-empty-state iconType="search" [title]="labels.t('emailTemplateEditor.noAssignmentsFound')" [message]="labels.t('emailTemplateEditor.noAssignmentsMatchYourSearch')" />
61372
61451
  }
61373
- <div class="assignment-list" [hidden]="filteredAssignments().length === 0">
61452
+ <div class="assignment-list" [hidden]="filteredAssignments().length === 0" (focusout)="onAssignmentsFocusOut($event)">
61374
61453
  @for (item of filteredAssignments(); track item.key) {
61375
61454
  <div class="assignment-item" [class.assignment-readonly]="!canWrite()" [attr.role]="canWrite() ? 'switch' : null" [attr.tabindex]="canWrite() ? 0 : null"
61376
61455
  [attr.aria-checked]="canWrite() ? item.assigned : null" [attr.aria-label]="canWrite() ? item.name : null"
@@ -61514,7 +61593,7 @@ i0.ɵɵngDeclareClassMetadata({
61514
61593
  <ui-error [errorId]="idPrefix() + '-body-error'" [message]="bodyErrorShown()" />
61515
61594
 
61516
61595
  <!-- Block Canvas with DnD -->
61517
- <div class="blocks-canvas" (dragover)="onCanvasDragOver($event)" (drop)="onDropZoneDrop($event, blocks().length)">
61596
+ <div class="blocks-canvas" (dragover)="onCanvasDragOver($event)" (drop)="onDropZoneDrop($event, blocks().length)" (focusout)="onBodyFocusOut($event)">
61518
61597
  <!-- Initial drop zone (before first block) -->
61519
61598
  <div class="drop-zone" [class.active]="dragOverIndex() === 0" (dragover)="onDropZoneDragOver($event, 0)" (dragleave)="onDropZoneLeave()" (drop)="onDropZoneDrop($event, 0)">
61520
61599
  <span class="drop-zone-label">{{ labels.t('emailTemplateEditor.dropHere') }}</span>
@@ -61743,7 +61822,7 @@ i0.ɵɵngDeclareClassMetadata({
61743
61822
 
61744
61823
 
61745
61824
  `,
61746
- styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0}.required{color:#ef4444;font-weight:400}.editor-page{display:flex;flex-direction:column;flex:1;min-height:0;background:#f8fafc;overflow:hidden}.editor-actions{display:flex;justify-content:space-between;align-items:center;gap:8px 16px;flex-wrap:wrap;padding:0 0 12px;flex-shrink:0}.editor-heading{margin:0;font-size:1.25rem;font-weight:700;color:#1e293b;line-height:1.3;min-width:0}.save-wrap{display:inline-flex}.editor-actions-buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}.readonly-note{margin:0;padding:8px 16px;font-size:.8125rem;color:#92400e;background:#fffbeb;border-bottom:1px solid #fde68a}.readonly-note.system-note{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.editor-body{display:grid;grid-template-columns:340px minmax(0,1fr) 300px;grid-template-rows:minmax(0,1fr);flex:1;min-height:0;overflow:hidden}.panel-left{background:#fff;border-right:1px solid #e2e8f0;padding:24px;overflow-y:auto}.panel-title{font-size:1.0625rem;font-weight:700;color:#1e293b;margin:0 0 20px}.form-field{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}.form-row-dates{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.assignments-section{border-top:1px solid #e2e8f0;padding-top:20px;margin-top:16px}.section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 6px}.section-desc{font-size:.8125rem;color:#64748b;line-height:1.5;margin:0 0 12px}.assignment-list{max-height:340px;overflow-y:auto;margin-top:12px;border:1px solid #e2e8f0;border-radius:8px}.assignment-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;cursor:pointer;border-bottom:1px solid #f1f5f9;transition:background .1s}.assignment-item:last-child{border-bottom:none}.assignment-item:hover{background:#f8fafc}.assignment-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.assignment-item.assignment-readonly{cursor:default}.assignment-item.assignment-readonly:hover{background:transparent}.assignment-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.assignment-text strong{font-size:.8125rem;color:#1e293b}.assignment-text span{font-size:.75rem;color:#64748b}.assignment-channels{display:flex;gap:4px;flex-shrink:0}.channel-badge{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background:#f1f5f9;color:#64748b;transition:all .15s}.channel-badge.active{background:#3b82f6;color:#fff}.channel-badge.disabled{opacity:.4;cursor:not-allowed}.config-desc{font-size:.875rem;color:#64748b;line-height:1.5;margin:0}.config-divider{border:none;border-top:1px solid #e2e8f0;margin:20px 0}.config-section{display:flex;flex-direction:column;gap:12px}.config-section-label{font-size:.6875rem;font-weight:700;color:#3b82f6;text-transform:uppercase;letter-spacing:.04em}.config-field{display:flex;flex-direction:column;gap:6px}.config-field-mt{margin-top:16px}.config-label{font-size:.8125rem;font-weight:600;color:#1e293b}.config-readonly{padding:9px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;font-size:.875rem;color:#1e293b}.config-hint{font-size:.75rem;color:#64748b}.test-save-note{display:flex;align-items:center;gap:8px;padding:10px 14px;background:#fef3c7;border:1px solid #fcd34d;border-radius:8px;font-size:.8125rem;color:#92400e;margin-top:12px}.test-save-note svg{flex-shrink:0}.panel-center{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}.editor-tabs{display:flex;gap:2px;padding:12px 20px 0;background:#fff;border-bottom:1px solid #e2e8f0;overflow-x:auto;-webkit-overflow-scrolling:touch}.editor-tab{display:flex;align-items:center;gap:6px;padding:10px 16px;border:1px solid #e2e8f0;border-bottom:none;border-radius:8px 8px 0 0;background:#f8fafc;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;white-space:nowrap}.editor-tab:hover{background:#fff;color:#1e293b}.editor-tab.active{background:#eff6ff;color:#1d4ed8;border-color:#93c5fd}.editor-tab:focus-visible,.right-tab:focus-visible,.block-group-header:focus-visible,.variable-item:focus-visible,.add-block-btn:focus-visible,.block-item:focus-visible,.video-lib-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.editor-toolbar{display:flex;align-items:center;gap:8px;padding:10px 20px;background:#fff;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.toolbar-row-2{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 20px;background:#fff;border-bottom:1px solid #e2e8f0}.toolbar-group{display:flex;align-items:center;gap:2px;padding-right:8px;border-right:1px solid #e2e8f0}.toolbar-group:last-child{border-right:none;padding-right:0}.toolbar-select{display:block;min-width:96px}.toolbar-label{font-size:.75rem;font-weight:600;color:#64748b;white-space:nowrap;margin-right:6px}.hidden-color-input{position:absolute;width:0;height:0;opacity:0;pointer-events:none;border:none;padding:0}.color-indicator{display:flex;flex-direction:column;align-items:center;gap:2px;color:#475569}.color-bar{display:block;width:16px;height:3px;border-radius:2px;border:1px solid rgba(0,0,0,.1)}.link-dialog{background:#fff;border-bottom:1px solid #e2e8f0;padding:12px 20px}.link-dialog-inner{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.link-dialog-title{font-size:.8125rem;font-weight:700;color:#1e293b;white-space:nowrap;padding-top:10px}.link-dialog-input{display:block;width:240px;max-width:100%}.link-dialog-actions{display:flex;gap:6px}.preview-frame{flex:1;display:flex;justify-content:center;align-items:stretch;padding:24px;overflow-y:auto;background:#f1f5f9}.preview-frame.mobile{align-items:flex-start}.preview-content{display:block;flex:1 1 auto;max-width:600px;width:100%;box-sizing:border-box;min-height:400px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.mobile-shell{width:375px;max-width:100%;box-sizing:border-box;min-height:600px;border:2px solid #1e293b;border-radius:24px;padding:40px 12px 24px;background:#fff;box-shadow:0 8px 32px #0000001f}.mobile-shell .preview-content{border:none;border-radius:0;max-width:100%;height:520px;min-height:0}.blocks-canvas{flex:1 1 0;min-height:0;padding:16px 20px 24px 56px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:#f1f5f9;display:flex;flex-direction:column}.block-wrapper{flex-shrink:0;position:relative;display:flex;align-items:flex-start;background:#fff;border:2px solid transparent;border-radius:8px;transition:border-color .15s,box-shadow .15s}.block-wrapper:hover,.block-wrapper.selected,.block-wrapper:focus-within{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.block-wrapper:hover .block-drag-handle,.block-wrapper.selected .block-drag-handle,.block-wrapper:focus-within .block-drag-handle{opacity:1}.block-wrapper:hover .block-controls,.block-wrapper.selected .block-controls,.block-wrapper:focus-within .block-controls{opacity:1;pointer-events:all}.block-wrapper.dragging{opacity:.4}.block-drag-handle{flex-shrink:0;width:28px;display:flex;align-items:flex-start;justify-content:center;padding-top:14px;opacity:0;transition:opacity .15s;cursor:grab;color:#94a3b8}.block-drag-handle:active{cursor:grabbing}.block-content{flex:1;min-width:0;padding:12px 16px;outline:none;font-size:.9375rem;color:#1e293b;line-height:1.6;min-height:48px;overflow-wrap:anywhere}.block-content:empty:before{content:attr(data-placeholder);color:#64748b;font-style:italic;pointer-events:none}.block-content p{margin:0 0 8px}.block-content p:last-child{margin:0}.block-content h1,.block-content h2,.block-content h3{margin:8px 0 6px;color:#1e293b}.block-content a{color:#3b82f6}.block-content img{max-width:100%;border-radius:6px}.block-content ul,.block-content ol{padding-left:20px;margin:0 0 8px}.block-controls{position:absolute;top:0;left:-48px;flex-direction:column;display:flex;gap:2px;opacity:0;pointer-events:none;transition:opacity .15s;background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:3px;box-shadow:0 2px 6px #00000014}@media(pointer:coarse){.editor-tab,.right-tab,.block-group-header{min-height:44px}}@media(hover:none){.block-wrapper.selected .block-controls{opacity:1;pointer-events:all}}.drop-zone{flex-shrink:0;height:8px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:height .15s,background .15s;position:relative}.drop-zone-label{font-size:.75rem;font-weight:600;color:#1d4ed8;opacity:0;transition:opacity .1s}.drop-zone.active{height:40px;background:#3b82f614;border:2px dashed #3b82f6}.drop-zone.active .drop-zone-label{opacity:1}.add-block-btn{flex-shrink:0;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;padding:12px;margin-top:8px;border:2px dashed #e2e8f0;border-radius:8px;background:none;font-size:.875rem;font-weight:600;color:#475569;cursor:pointer;font-family:inherit;transition:border-color .15s,color .15s,background .15s}.add-block-btn:hover{border-color:#3b82f6;color:#3b82f6;background:#3b82f60a}.panel-right{background:#fff;border-left:1px solid #e2e8f0;display:flex;flex-direction:column;min-height:0;min-width:0}.right-tabs{display:flex;border-bottom:1px solid #e2e8f0}.right-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:12px;min-height:44px;border:none;background:none;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;border-bottom:2px solid transparent}.right-tab:hover{color:#1e293b}.right-tab.active{color:#1d4ed8;background:#eff6ff;border-bottom-color:#3b82f6}.right-panel-body{flex:1;padding:20px;overflow-y:auto}.right-section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 12px}.right-section-desc{font-size:.8125rem;color:#64748b;margin:0 0 16px;line-height:1.5}.right-section-hint{font-size:.8125rem;color:#64748b;margin:0 0 12px;line-height:1.5}.block-group{border-bottom:1px solid #f1f5f9}.block-group-header{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:12px 0;border:none;background:none;font-size:.875rem;font-weight:600;color:#1e293b;cursor:pointer;font-family:inherit;text-align:left}.block-group-header .chevron{transition:transform .2s;color:#94a3b8}.block-group-header .chevron.expanded{transform:rotate(90deg)}.block-group-header span:nth-of-type(1){flex:1}.block-count{font-size:.75rem;font-weight:600;color:#475569;background:#f1f5f9;padding:2px 8px;border-radius:10px;margin-left:auto}.block-list{display:flex;flex-direction:column;gap:2px;padding-bottom:8px}.variable-list{display:flex;flex-direction:column;padding-bottom:8px}.variable-item+.variable-item{border-top:1px solid #f1f5f9;border-radius:0}.block-item{display:flex;align-items:center;gap:6px;box-sizing:border-box;width:100%;min-height:44px;padding:8px 0;font-size:.8125rem;color:#64748b;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit;-webkit-user-select:none;user-select:none}.block-item:hover{background:#f8fafc;color:#1e293b}.block-item-drag{color:#cbd5e1;flex-shrink:0;cursor:grab}.variable-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:44px;padding:8px 0;min-width:0;width:100%;box-sizing:border-box;border:none;background:none;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit}.variable-item:hover{background:#f8fafc}.var-tag{max-width:100%;overflow-wrap:anywhere;font-size:.75rem;font-weight:600;color:#1d4ed8;background:#3b82f614;padding:2px 6px;border-radius:4px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.var-example{font-size:.75rem;color:#64748b;overflow-wrap:anywhere}.var-description{font-size:.75rem;color:#64748b;line-height:1.4;overflow-wrap:anywhere}.video-library-panel{padding:0}.video-library-panel .right-section-title,.video-library-panel .right-section-hint{padding:0 16px}.video-library-panel .right-section-title{padding-top:16px}.video-config-section{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-bottom:1px solid #f1f5f9}.video-config-section:last-of-type{border-bottom:none}.video-lib-list{display:flex;flex-direction:column;gap:2px;padding:8px 8px 16px}.video-lib-item{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;text-align:left;font-family:inherit;transition:background .15s,border-color .15s}.video-lib-item:hover{background:#f8fafc;border-color:#e2e8f0}.video-lib-item.selected{background:#eff6ff;border-color:#93c5fd}.vli-thumb{position:relative;flex-shrink:0;width:56px;height:40px;border-radius:6px;background:linear-gradient(135deg,#f1f5f9,#e2e8f0);display:flex;align-items:center;justify-content:center}.vli-dur{position:absolute;bottom:2px;right:3px;font-size:.625rem;font-weight:600;color:#fff;background:#000000a6;padding:1px 4px;border-radius:3px}.vli-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.vli-title{font-size:.8125rem;font-weight:600;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vli-cat{font-size:.75rem;color:#475569}.vli-check{flex-shrink:0}.video-lib-loading{padding:8px}.video-lib-skeleton{display:flex;align-items:center;gap:10px;padding:8px;margin-bottom:4px}.vls-info{flex:1;display:flex;flex-direction:column;gap:6px}@media(max-width:1200px){.editor-body{grid-template-columns:280px minmax(0,1fr) 260px}}@media(max-width:900px){:host{flex:none}.editor-page{flex:none;min-height:100vh;min-height:100dvh;overflow:visible}.editor-body{display:flex;flex-direction:column;flex:none;overflow:visible}.panel-left{border-right:none;border-bottom:1px solid #e2e8f0;overflow:visible;padding:16px}.panel-center{overflow:visible;min-height:480px}.blocks-canvas{overflow:visible;min-height:320px}.panel-right{border-left:none;border-top:1px solid #e2e8f0}.right-panel-body{overflow:visible}.editor-toolbar,.toolbar-row-2,.link-dialog,.editor-tabs{padding-left:12px;padding-right:12px}.preview-frame{padding:12px}.form-row-dates{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}\n"]
61825
+ styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0}.required{color:#ef4444;font-weight:400}.editor-page{display:flex;flex-direction:column;flex:1;min-height:0;background:#f8fafc;overflow:hidden}.editor-actions{display:flex;justify-content:space-between;align-items:center;gap:8px 16px;flex-wrap:wrap;padding:0 0 12px;flex-shrink:0}.editor-heading{margin:0;font-size:1.25rem;font-weight:700;color:#1e293b;line-height:1.3;min-width:0}.save-wrap{display:inline-flex}.save-hint{margin:0;font-size:12px;color:#475569;flex-basis:100%;text-align:right}.editor-actions-buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}.readonly-note{margin:0;padding:8px 16px;font-size:.8125rem;color:#92400e;background:#fffbeb;border-bottom:1px solid #fde68a}.readonly-note.system-note{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.editor-body{display:grid;grid-template-columns:340px minmax(0,1fr) 300px;grid-template-rows:minmax(0,1fr);flex:1;min-height:0;overflow:hidden}.panel-left{background:#fff;border-right:1px solid #e2e8f0;padding:24px;overflow-y:auto}.panel-title{font-size:1.0625rem;font-weight:700;color:#1e293b;margin:0 0 20px}.form-field{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}.form-row-dates{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.assignments-section{border-top:1px solid #e2e8f0;padding-top:20px;margin-top:16px}.section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 6px}.section-desc{font-size:.8125rem;color:#64748b;line-height:1.5;margin:0 0 12px}.assignment-list{max-height:340px;overflow-y:auto;margin-top:12px;border:1px solid #e2e8f0;border-radius:8px}.assignment-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;cursor:pointer;border-bottom:1px solid #f1f5f9;transition:background .1s}.assignment-item:last-child{border-bottom:none}.assignment-item:hover{background:#f8fafc}.assignment-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.assignment-item.assignment-readonly{cursor:default}.assignment-item.assignment-readonly:hover{background:transparent}.assignment-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.assignment-text strong{font-size:.8125rem;color:#1e293b}.assignment-text span{font-size:.75rem;color:#64748b}.assignment-channels{display:flex;gap:4px;flex-shrink:0}.channel-badge{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background:#f1f5f9;color:#64748b;transition:all .15s}.channel-badge.active{background:#3b82f6;color:#fff}.channel-badge.disabled{opacity:.4;cursor:not-allowed}.config-desc{font-size:.875rem;color:#64748b;line-height:1.5;margin:0}.config-divider{border:none;border-top:1px solid #e2e8f0;margin:20px 0}.config-section{display:flex;flex-direction:column;gap:12px}.config-section-label{font-size:.6875rem;font-weight:700;color:#3b82f6;text-transform:uppercase;letter-spacing:.04em}.config-field{display:flex;flex-direction:column;gap:6px}.config-field-mt{margin-top:16px}.config-label{font-size:.8125rem;font-weight:600;color:#1e293b}.config-readonly{padding:9px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;font-size:.875rem;color:#1e293b}.config-hint{font-size:.75rem;color:#64748b}.test-save-note{display:flex;align-items:center;gap:8px;padding:10px 14px;background:#fef3c7;border:1px solid #fcd34d;border-radius:8px;font-size:.8125rem;color:#92400e;margin-top:12px}.test-save-note svg{flex-shrink:0}.panel-center{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}.editor-tabs{display:flex;gap:2px;padding:12px 20px 0;background:#fff;border-bottom:1px solid #e2e8f0;overflow-x:auto;-webkit-overflow-scrolling:touch}.editor-tab{display:flex;align-items:center;gap:6px;padding:10px 16px;border:1px solid #e2e8f0;border-bottom:none;border-radius:8px 8px 0 0;background:#f8fafc;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;white-space:nowrap}.editor-tab:hover{background:#fff;color:#1e293b}.editor-tab.active{background:#eff6ff;color:#1d4ed8;border-color:#93c5fd}.editor-tab:focus-visible,.right-tab:focus-visible,.block-group-header:focus-visible,.variable-item:focus-visible,.add-block-btn:focus-visible,.block-item:focus-visible,.video-lib-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.editor-toolbar{display:flex;align-items:center;gap:8px;padding:10px 20px;background:#fff;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.toolbar-row-2{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 20px;background:#fff;border-bottom:1px solid #e2e8f0}.toolbar-group{display:flex;align-items:center;gap:2px;padding-right:8px;border-right:1px solid #e2e8f0}.toolbar-group:last-child{border-right:none;padding-right:0}.toolbar-select{display:block;min-width:96px}.toolbar-label{font-size:.75rem;font-weight:600;color:#64748b;white-space:nowrap;margin-right:6px}.hidden-color-input{position:absolute;width:0;height:0;opacity:0;pointer-events:none;border:none;padding:0}.color-indicator{display:flex;flex-direction:column;align-items:center;gap:2px;color:#475569}.color-bar{display:block;width:16px;height:3px;border-radius:2px;border:1px solid rgba(0,0,0,.1)}.link-dialog{background:#fff;border-bottom:1px solid #e2e8f0;padding:12px 20px}.link-dialog-inner{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.link-dialog-title{font-size:.8125rem;font-weight:700;color:#1e293b;white-space:nowrap;padding-top:10px}.link-dialog-input{display:block;width:240px;max-width:100%}.link-dialog-actions{display:flex;gap:6px}.preview-frame{flex:1;display:flex;justify-content:center;align-items:stretch;padding:24px;overflow-y:auto;background:#f1f5f9}.preview-frame.mobile{align-items:flex-start}.preview-content{display:block;flex:1 1 auto;max-width:600px;width:100%;box-sizing:border-box;min-height:400px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.mobile-shell{width:375px;max-width:100%;box-sizing:border-box;min-height:600px;border:2px solid #1e293b;border-radius:24px;padding:40px 12px 24px;background:#fff;box-shadow:0 8px 32px #0000001f}.mobile-shell .preview-content{border:none;border-radius:0;max-width:100%;height:520px;min-height:0}.blocks-canvas{flex:1 1 0;min-height:0;padding:16px 20px 24px 56px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:#f1f5f9;display:flex;flex-direction:column}.block-wrapper{flex-shrink:0;position:relative;display:flex;align-items:flex-start;background:#fff;border:2px solid transparent;border-radius:8px;transition:border-color .15s,box-shadow .15s}.block-wrapper:hover,.block-wrapper.selected,.block-wrapper:focus-within{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.block-wrapper:hover .block-drag-handle,.block-wrapper.selected .block-drag-handle,.block-wrapper:focus-within .block-drag-handle{opacity:1}.block-wrapper:hover .block-controls,.block-wrapper.selected .block-controls,.block-wrapper:focus-within .block-controls{opacity:1;pointer-events:all}.block-wrapper.dragging{opacity:.4}.block-drag-handle{flex-shrink:0;width:28px;display:flex;align-items:flex-start;justify-content:center;padding-top:14px;opacity:0;transition:opacity .15s;cursor:grab;color:#94a3b8}.block-drag-handle:active{cursor:grabbing}.block-content{flex:1;min-width:0;padding:12px 16px;outline:none;font-size:.9375rem;color:#1e293b;line-height:1.6;min-height:48px;overflow-wrap:anywhere}.block-content:empty:before{content:attr(data-placeholder);color:#64748b;font-style:italic;pointer-events:none}.block-content p{margin:0 0 8px}.block-content p:last-child{margin:0}.block-content h1,.block-content h2,.block-content h3{margin:8px 0 6px;color:#1e293b}.block-content a{color:#3b82f6}.block-content img{max-width:100%;border-radius:6px}.block-content ul,.block-content ol{padding-left:20px;margin:0 0 8px}.block-controls{position:absolute;top:0;left:-48px;flex-direction:column;display:flex;gap:2px;opacity:0;pointer-events:none;transition:opacity .15s;background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:3px;box-shadow:0 2px 6px #00000014}@media(pointer:coarse){.editor-tab,.right-tab,.block-group-header{min-height:44px}}@media(hover:none){.block-wrapper.selected .block-controls{opacity:1;pointer-events:all}}.drop-zone{flex-shrink:0;height:8px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:height .15s,background .15s;position:relative}.drop-zone-label{font-size:.75rem;font-weight:600;color:#1d4ed8;opacity:0;transition:opacity .1s}.drop-zone.active{height:40px;background:#3b82f614;border:2px dashed #3b82f6}.drop-zone.active .drop-zone-label{opacity:1}.add-block-btn{flex-shrink:0;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;padding:12px;margin-top:8px;border:2px dashed #e2e8f0;border-radius:8px;background:none;font-size:.875rem;font-weight:600;color:#475569;cursor:pointer;font-family:inherit;transition:border-color .15s,color .15s,background .15s}.add-block-btn:hover{border-color:#3b82f6;color:#3b82f6;background:#3b82f60a}.panel-right{background:#fff;border-left:1px solid #e2e8f0;display:flex;flex-direction:column;min-height:0;min-width:0}.right-tabs{display:flex;border-bottom:1px solid #e2e8f0}.right-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:12px;min-height:44px;border:none;background:none;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;border-bottom:2px solid transparent}.right-tab:hover{color:#1e293b}.right-tab.active{color:#1d4ed8;background:#eff6ff;border-bottom-color:#3b82f6}.right-panel-body{flex:1;padding:20px;overflow-y:auto}.right-section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 12px}.right-section-desc{font-size:.8125rem;color:#64748b;margin:0 0 16px;line-height:1.5}.right-section-hint{font-size:.8125rem;color:#64748b;margin:0 0 12px;line-height:1.5}.block-group{border-bottom:1px solid #f1f5f9}.block-group-header{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:12px 0;border:none;background:none;font-size:.875rem;font-weight:600;color:#1e293b;cursor:pointer;font-family:inherit;text-align:left}.block-group-header .chevron{transition:transform .2s;color:#94a3b8}.block-group-header .chevron.expanded{transform:rotate(90deg)}.block-group-header span:nth-of-type(1){flex:1}.block-count{font-size:.75rem;font-weight:600;color:#475569;background:#f1f5f9;padding:2px 8px;border-radius:10px;margin-left:auto}.block-list{display:flex;flex-direction:column;gap:2px;padding-bottom:8px}.variable-list{display:flex;flex-direction:column;padding-bottom:8px}.variable-item+.variable-item{border-top:1px solid #f1f5f9;border-radius:0}.block-item{display:flex;align-items:center;gap:6px;box-sizing:border-box;width:100%;min-height:44px;padding:8px 0;font-size:.8125rem;color:#64748b;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit;-webkit-user-select:none;user-select:none}.block-item:hover{background:#f8fafc;color:#1e293b}.block-item-drag{color:#cbd5e1;flex-shrink:0;cursor:grab}.variable-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:44px;padding:8px 0;min-width:0;width:100%;box-sizing:border-box;border:none;background:none;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit}.variable-item:hover{background:#f8fafc}.var-tag{max-width:100%;overflow-wrap:anywhere;font-size:.75rem;font-weight:600;color:#1d4ed8;background:#3b82f614;padding:2px 6px;border-radius:4px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.var-example{font-size:.75rem;color:#64748b;overflow-wrap:anywhere}.var-description{font-size:.75rem;color:#64748b;line-height:1.4;overflow-wrap:anywhere}.video-library-panel{padding:0}.video-library-panel .right-section-title,.video-library-panel .right-section-hint{padding:0 16px}.video-library-panel .right-section-title{padding-top:16px}.video-config-section{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-bottom:1px solid #f1f5f9}.video-config-section:last-of-type{border-bottom:none}.video-lib-list{display:flex;flex-direction:column;gap:2px;padding:8px 8px 16px}.video-lib-item{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;text-align:left;font-family:inherit;transition:background .15s,border-color .15s}.video-lib-item:hover{background:#f8fafc;border-color:#e2e8f0}.video-lib-item.selected{background:#eff6ff;border-color:#93c5fd}.vli-thumb{position:relative;flex-shrink:0;width:56px;height:40px;border-radius:6px;background:linear-gradient(135deg,#f1f5f9,#e2e8f0);display:flex;align-items:center;justify-content:center}.vli-dur{position:absolute;bottom:2px;right:3px;font-size:.625rem;font-weight:600;color:#fff;background:#000000a6;padding:1px 4px;border-radius:3px}.vli-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.vli-title{font-size:.8125rem;font-weight:600;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vli-cat{font-size:.75rem;color:#475569}.vli-check{flex-shrink:0}.video-lib-loading{padding:8px}.video-lib-skeleton{display:flex;align-items:center;gap:10px;padding:8px;margin-bottom:4px}.vls-info{flex:1;display:flex;flex-direction:column;gap:6px}@media(max-width:1200px){.editor-body{grid-template-columns:280px minmax(0,1fr) 260px}}@media(max-width:900px){:host{flex:none}.editor-page{flex:none;min-height:100vh;min-height:100dvh;overflow:visible}.editor-body{display:flex;flex-direction:column;flex:none;overflow:visible}.panel-left{border-right:none;border-bottom:1px solid #e2e8f0;overflow:visible;padding:16px}.panel-center{overflow:visible;min-height:480px}.blocks-canvas{overflow:visible;min-height:320px}.panel-right{border-left:none;border-top:1px solid #e2e8f0}.right-panel-body{overflow:visible}.editor-toolbar,.toolbar-row-2,.link-dialog,.editor-tabs{padding-left:12px;padding-right:12px}.preview-frame{padding:12px}.form-row-dates{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}\n"]
61747
61826
  }]
61748
61827
  }],
61749
61828
  ctorParameters: () => [],
@@ -66611,6 +66690,7 @@ var PaymentSidePanelComponent = class PaymentSidePanelComponent {
66611
66690
  this.allocationMode = signal("oldest", ...ngDevMode ? [{ debugName: "allocationMode" }] : /* istanbul ignore next */ []);
66612
66691
  this.selectedCharges = signal({}, ...ngDevMode ? [{ debugName: "selectedCharges" }] : /* istanbul ignore next */ []);
66613
66692
  this.touched = signal(false, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
66693
+ this.allocationTouched = signal(false, ...ngDevMode ? [{ debugName: "allocationTouched" }] : /* istanbul ignore next */ []);
66614
66694
  this.submitting = signal(false, ...ngDevMode ? [{ debugName: "submitting" }] : /* istanbul ignore next */ []);
66615
66695
  this.submitError = signal("", ...ngDevMode ? [{ debugName: "submitError" }] : /* istanbul ignore next */ []);
66616
66696
  this.announcement = signal("", ...ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []);
@@ -66707,6 +66787,7 @@ var PaymentSidePanelComponent = class PaymentSidePanelComponent {
66707
66787
  if (mode === "custom" && !this.charges().length) mode = this.defaultAllocationMode() === "custom" ? "oldest" : this.defaultAllocationMode();
66708
66788
  return buildAllocation(mode, this.charges(), this.selectedCharges());
66709
66789
  }, ...ngDevMode ? [{ debugName: "allocationPayload" }] : /* istanbul ignore next */ []);
66790
+ this.allocationMessage = computed(() => this.allocationTouched() ? this.allocation().general : "", ...ngDevMode ? [{ debugName: "allocationMessage" }] : /* istanbul ignore next */ []);
66710
66791
  this.hasInvalid = computed(() => this.fields().some((f) => f.invalid()) || !!this.allocation().general || !!this.referenceError(), ...ngDevMode ? [{ debugName: "hasInvalid" }] : /* istanbul ignore next */ []);
66711
66792
  this.canSplit = computed(() => this.kind() === "manual" && !this.busy(), ...ngDevMode ? [{ debugName: "canSplit" }] : /* istanbul ignore next */ []);
66712
66793
  this.readerOptions = computed(() => this.readers().map((r) => ({
@@ -66775,6 +66856,7 @@ var PaymentSidePanelComponent = class PaymentSidePanelComponent {
66775
66856
  this.allocationMode.set(this.defaultAllocationMode());
66776
66857
  this.selectedCharges.set({});
66777
66858
  this.touched.set(false);
66859
+ this.allocationTouched.set(false);
66778
66860
  this.submitting.set(false);
66779
66861
  this.submitError.set("");
66780
66862
  this.announcement.set("");
@@ -66876,6 +66958,7 @@ var PaymentSidePanelComponent = class PaymentSidePanelComponent {
66876
66958
  this.method.set("");
66877
66959
  this.reference.set("");
66878
66960
  this.touched.set(false);
66961
+ this.allocationTouched.set(false);
66879
66962
  this.announcement.set(this.labels.t("paymentSidePanel.addedToSplit", {
66880
66963
  method: this.methodLabel(entry.method),
66881
66964
  amount: this.money(entry.amount),
@@ -66897,6 +66980,7 @@ var PaymentSidePanelComponent = class PaymentSidePanelComponent {
66897
66980
  return id in this.selectedCharges();
66898
66981
  }
66899
66982
  toggleCharge(charge, checked) {
66983
+ this.allocationTouched.set(true);
66900
66984
  this.selectedCharges.update((current) => {
66901
66985
  const next = { ...current };
66902
66986
  if (checked) next[charge.id] = defaultChargeAmount(charge, current, this.totalPayment());
@@ -66905,6 +66989,7 @@ var PaymentSidePanelComponent = class PaymentSidePanelComponent {
66905
66989
  });
66906
66990
  }
66907
66991
  setChargeAmount(id, value) {
66992
+ this.allocationTouched.set(true);
66908
66993
  this.selectedCharges.update((current) => ({
66909
66994
  ...current,
66910
66995
  [id]: typeof value === "number" ? value : null
@@ -67648,9 +67733,9 @@ var PaymentSidePanelComponent = class PaymentSidePanelComponent {
67648
67733
  @if (charges().length > 0) {
67649
67734
  <div class="psp-allocation" data-testid="psp-allocation" role="group" [attr.aria-labelledby]="ids + '-alloc'">
67650
67735
  <span class="psp-saved-label" [id]="ids + '-alloc'">{{ labels.t('paymentSidePanel.applyPaymentTo') }}</span>
67651
- <ui-select [ariaLabel]="labels.t('paymentSidePanel.applyPaymentTo')" [ariaDescribedBy]="allocation().general ? ids + '-alloc-error' : ''" [options]="allocationOptions()" [disabled]="locked()" [ngModel]="allocationMode()" (ngModelChange)="onAllocationMode($event)" data-testid="psp-allocation-mode" />
67736
+ <ui-select [ariaLabel]="labels.t('paymentSidePanel.applyPaymentTo')" [ariaDescribedBy]="allocationMessage() ? ids + '-alloc-error' : ''" [options]="allocationOptions()" [disabled]="locked()" [ngModel]="allocationMode()" (ngModelChange)="onAllocationMode($event)" data-testid="psp-allocation-mode" />
67652
67737
  @if (allocationMode() === customMode) {
67653
- <div class="psp-charges" data-testid="psp-charges">
67738
+ <div class="psp-charges" data-testid="psp-charges" (focusout)="allocationTouched.set(true)">
67654
67739
  @for (charge of charges(); track charge.id) {
67655
67740
  <div class="psp-charge" data-testid="psp-charge">
67656
67741
  <ui-checkbox [label]="charge.chargeType" [description]="chargeDescription(charge)" [disabled]="locked()" [ngModel]="isTicked(charge.id)" (ngModelChange)="toggleCharge(charge, $event)" [testId]="'psp-charge-' + charge.id" />
@@ -67661,7 +67746,7 @@ var PaymentSidePanelComponent = class PaymentSidePanelComponent {
67661
67746
  </div>
67662
67747
  }
67663
67748
  </div>
67664
- <ui-error [errorId]="ids + '-alloc-error'" [message]="allocation().general" data-testid="psp-allocation-error" />
67749
+ <ui-error [errorId]="ids + '-alloc-error'" [message]="allocationMessage()" data-testid="psp-allocation-error" />
67665
67750
  }
67666
67751
  </div>
67667
67752
  }
@@ -68153,9 +68238,9 @@ i0.ɵɵngDeclareClassMetadata({
68153
68238
  @if (charges().length > 0) {
68154
68239
  <div class="psp-allocation" data-testid="psp-allocation" role="group" [attr.aria-labelledby]="ids + '-alloc'">
68155
68240
  <span class="psp-saved-label" [id]="ids + '-alloc'">{{ labels.t('paymentSidePanel.applyPaymentTo') }}</span>
68156
- <ui-select [ariaLabel]="labels.t('paymentSidePanel.applyPaymentTo')" [ariaDescribedBy]="allocation().general ? ids + '-alloc-error' : ''" [options]="allocationOptions()" [disabled]="locked()" [ngModel]="allocationMode()" (ngModelChange)="onAllocationMode($event)" data-testid="psp-allocation-mode" />
68241
+ <ui-select [ariaLabel]="labels.t('paymentSidePanel.applyPaymentTo')" [ariaDescribedBy]="allocationMessage() ? ids + '-alloc-error' : ''" [options]="allocationOptions()" [disabled]="locked()" [ngModel]="allocationMode()" (ngModelChange)="onAllocationMode($event)" data-testid="psp-allocation-mode" />
68157
68242
  @if (allocationMode() === customMode) {
68158
- <div class="psp-charges" data-testid="psp-charges">
68243
+ <div class="psp-charges" data-testid="psp-charges" (focusout)="allocationTouched.set(true)">
68159
68244
  @for (charge of charges(); track charge.id) {
68160
68245
  <div class="psp-charge" data-testid="psp-charge">
68161
68246
  <ui-checkbox [label]="charge.chargeType" [description]="chargeDescription(charge)" [disabled]="locked()" [ngModel]="isTicked(charge.id)" (ngModelChange)="toggleCharge(charge, $event)" [testId]="'psp-charge-' + charge.id" />
@@ -68166,7 +68251,7 @@ i0.ɵɵngDeclareClassMetadata({
68166
68251
  </div>
68167
68252
  }
68168
68253
  </div>
68169
- <ui-error [errorId]="ids + '-alloc-error'" [message]="allocation().general" data-testid="psp-allocation-error" />
68254
+ <ui-error [errorId]="ids + '-alloc-error'" [message]="allocationMessage()" data-testid="psp-allocation-error" />
68170
68255
  }
68171
68256
  </div>
68172
68257
  }