@daffodil/design 0.94.1 → 0.95.0

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.
Files changed (170) hide show
  1. package/README.md +1 -2
  2. package/accordion/src/accordion-theme.scss +4 -4
  3. package/article/README.md +4 -27
  4. package/article/src/article-theme.scss +14 -14
  5. package/badge/src/badge-theme.scss +0 -6
  6. package/button/README.md +0 -4
  7. package/button/src/button/basic/button-theme.scss +17 -42
  8. package/button/src/button/button-base.scss +12 -3
  9. package/button/src/button/flat/flat-theme.scss +14 -12
  10. package/button/src/button/icon/icon-theme.scss +19 -40
  11. package/button/src/button/stroked/stroked-theme.scss +22 -36
  12. package/card/src/card/stroked/stroked-theme.scss +1 -1
  13. package/card/src/card-base.scss +0 -1
  14. package/fesm2022/daffodil-design-accordion.mjs +285 -188
  15. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  16. package/fesm2022/daffodil-design-article.mjs +578 -340
  17. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  18. package/fesm2022/daffodil-design-badge.mjs +166 -84
  19. package/fesm2022/daffodil-design-badge.mjs.map +1 -1
  20. package/fesm2022/daffodil-design-beacon.mjs +109 -47
  21. package/fesm2022/daffodil-design-beacon.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-breadcrumb.mjs +384 -277
  23. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  24. package/fesm2022/daffodil-design-button.mjs +541 -408
  25. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  26. package/fesm2022/daffodil-design-callout.mjs +349 -224
  27. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  28. package/fesm2022/daffodil-design-card.mjs +496 -327
  29. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-checkbox.mjs +373 -313
  31. package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-container.mjs +103 -60
  33. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  34. package/fesm2022/daffodil-design-form-field.mjs +441 -352
  35. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  36. package/fesm2022/daffodil-design-form.mjs +155 -57
  37. package/fesm2022/daffodil-design-form.mjs.map +1 -1
  38. package/fesm2022/daffodil-design-hero.mjs +349 -234
  39. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  40. package/fesm2022/daffodil-design-image-lite.mjs +60 -0
  41. package/fesm2022/daffodil-design-image-lite.mjs.map +1 -0
  42. package/fesm2022/daffodil-design-image.mjs +245 -107
  43. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  44. package/fesm2022/daffodil-design-input.mjs +217 -164
  45. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  46. package/fesm2022/daffodil-design-list.mjs +308 -170
  47. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  48. package/fesm2022/daffodil-design-media-gallery.mjs +351 -278
  49. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  50. package/fesm2022/daffodil-design-menu.mjs +525 -417
  51. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  52. package/fesm2022/daffodil-design-modal.mjs +680 -450
  53. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  54. package/fesm2022/daffodil-design-native-select.mjs +175 -166
  55. package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
  56. package/fesm2022/daffodil-design-navbar.mjs +145 -68
  57. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  58. package/fesm2022/daffodil-design-notification.mjs +376 -226
  59. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-paginator.mjs +296 -192
  61. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-progress-bar.mjs +243 -157
  63. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  64. package/fesm2022/daffodil-design-radio.mjs +382 -300
  65. package/fesm2022/daffodil-design-radio.mjs.map +1 -1
  66. package/fesm2022/daffodil-design-select.mjs +424 -364
  67. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  68. package/fesm2022/daffodil-design-sidebar.mjs +874 -887
  69. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  70. package/fesm2022/daffodil-design-spinner.mjs +156 -99
  71. package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
  72. package/fesm2022/daffodil-design-switch.mjs +176 -106
  73. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  74. package/fesm2022/daffodil-design-tabs.mjs +685 -427
  75. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  76. package/fesm2022/daffodil-design-tag.mjs +251 -133
  77. package/fesm2022/daffodil-design-tag.mjs.map +1 -1
  78. package/fesm2022/daffodil-design-testing.mjs +4 -16
  79. package/fesm2022/daffodil-design-testing.mjs.map +1 -1
  80. package/fesm2022/daffodil-design-text-snippet.mjs +140 -54
  81. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  82. package/fesm2022/daffodil-design-textarea.mjs +170 -150
  83. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  84. package/fesm2022/daffodil-design-toast.mjs +658 -481
  85. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  86. package/fesm2022/daffodil-design-tree.mjs +456 -469
  87. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  88. package/fesm2022/daffodil-design-youtube-player.mjs +168 -115
  89. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
  90. package/fesm2022/daffodil-design.mjs +1628 -1650
  91. package/fesm2022/daffodil-design.mjs.map +1 -1
  92. package/form-field/README.md +0 -4
  93. package/form-field/src/form-field-theme.scss +12 -4
  94. package/image/README.md +4 -0
  95. package/image-lite/README.md +58 -0
  96. package/image-lite/src/image-theme.scss +18 -0
  97. package/list/src/list-base.scss +3 -4
  98. package/list/src/list-theme.scss +6 -5
  99. package/media-gallery/README.md +1 -1
  100. package/media-gallery/src/media-gallery-theme.scss +3 -3
  101. package/menu/src/menu-theme.scss +6 -2
  102. package/notification/src/notification-theme.scss +10 -10
  103. package/package.json +1 -1
  104. package/scss/global.scss +17 -11
  105. package/scss/theme.scss +2 -18
  106. package/scss/theming/_get-palette.scss +0 -3
  107. package/scss/theming/_index.scss +0 -1
  108. package/scss/theming/_light-dark.scss +2 -2
  109. package/scss/theming/_theme-css-variables.scss +1 -1
  110. package/scss/theming/create-theme/_create-theme.scss +2 -2
  111. package/scss/theming/get-font-colors/_get-font-colors.scss +7 -25
  112. package/scss/theming/get-font-colors/_get-font-colors.spec.scss +0 -12
  113. package/scss/typography/_classes.scss +0 -6
  114. package/scss/typography/_index.scss +0 -1
  115. package/scss/typography/mixins/_sizes.scss +0 -1
  116. package/scss/typography/utilities/_variables.scss +3 -0
  117. package/select/src/select-theme.scss +10 -14
  118. package/switch/src/switch-theme.scss +2 -2
  119. package/tabs/src/tabs-theme.scss +4 -4
  120. package/types/daffodil-design-accordion.d.ts +92 -67
  121. package/types/daffodil-design-article.d.ts +49 -56
  122. package/types/daffodil-design-badge.d.ts +56 -33
  123. package/types/daffodil-design-beacon.d.ts +35 -14
  124. package/types/daffodil-design-breadcrumb.d.ts +89 -85
  125. package/types/daffodil-design-button.d.ts +128 -146
  126. package/types/daffodil-design-callout.d.ts +55 -39
  127. package/types/daffodil-design-card.d.ts +66 -56
  128. package/types/daffodil-design-checkbox.d.ts +211 -167
  129. package/types/daffodil-design-container.d.ts +17 -16
  130. package/types/daffodil-design-form-field.d.ts +273 -240
  131. package/types/daffodil-design-form.d.ts +21 -21
  132. package/types/daffodil-design-hero.d.ts +55 -39
  133. package/types/daffodil-design-image-lite.d.ts +17 -0
  134. package/types/daffodil-design-image.d.ts +89 -55
  135. package/types/daffodil-design-input.d.ts +86 -72
  136. package/types/daffodil-design-list.d.ts +49 -43
  137. package/types/daffodil-design-media-gallery.d.ts +176 -148
  138. package/types/daffodil-design-menu.d.ts +177 -169
  139. package/types/daffodil-design-modal.d.ts +205 -205
  140. package/types/daffodil-design-native-select.d.ts +94 -84
  141. package/types/daffodil-design-navbar.d.ts +34 -24
  142. package/types/daffodil-design-notification.d.ts +82 -67
  143. package/types/daffodil-design-paginator.d.ts +140 -118
  144. package/types/daffodil-design-progress-bar.d.ts +92 -74
  145. package/types/daffodil-design-radio.d.ts +183 -144
  146. package/types/daffodil-design-select.d.ts +207 -178
  147. package/types/daffodil-design-sidebar.d.ts +270 -253
  148. package/types/daffodil-design-spinner.d.ts +49 -36
  149. package/types/daffodil-design-switch.d.ts +77 -46
  150. package/types/daffodil-design-tabs.d.ts +248 -198
  151. package/types/daffodil-design-tag.d.ts +91 -56
  152. package/types/daffodil-design-testing.d.ts +1 -3
  153. package/types/daffodil-design-text-snippet.d.ts +48 -37
  154. package/types/daffodil-design-textarea.d.ts +88 -79
  155. package/types/daffodil-design-toast.d.ts +175 -183
  156. package/types/daffodil-design-tree.d.ts +186 -169
  157. package/types/daffodil-design-youtube-player.d.ts +56 -52
  158. package/types/daffodil-design.d.ts +614 -695
  159. package/button/src/button/raised/raised-theme.scss +0 -92
  160. package/button/src/button/underline/underline-theme.scss +0 -141
  161. package/fesm2022/daffodil-design-link-set.mjs +0 -160
  162. package/fesm2022/daffodil-design-link-set.mjs.map +0 -1
  163. package/fesm2022/daffodil-design-quantity-field.mjs +0 -364
  164. package/fesm2022/daffodil-design-quantity-field.mjs.map +0 -1
  165. package/link-set/README.md +0 -86
  166. package/quantity-field/README.md +0 -63
  167. package/scss/theming/_configure-theme.scss +0 -120
  168. package/scss/typography/mixins/_font-weight.scss +0 -14
  169. package/types/daffodil-design-link-set.d.ts +0 -72
  170. package/types/daffodil-design-quantity-field.d.ts +0 -171
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-design-tree.mjs","sources":["../../../libs/design/tree/src/tree/tree-notifier.service.ts","../../../libs/design/tree/src/utils/flatten-tree.ts","../../../libs/design/tree/src/utils/traverse-tree.ts","../../../libs/design/tree/src/utils/hydrate-tree.ts","../../../libs/design/tree/src/tree/tree.component.ts","../../../libs/design/tree/src/tree/tree.component.html","../../../libs/design/tree/src/utils/walk-up.ts","../../../libs/design/tree/src/utils/open-ancestors.ts","../../../libs/design/tree/src/tree-item/tree-item.directive.ts","../../../libs/design/tree/src/tree.module.ts","../../../libs/design/tree/src/utils/transform.ts","../../../libs/design/tree/src/tree.ts","../../../libs/design/tree/src/daffodil-design-tree.ts"],"sourcesContent":["import {\n Inject,\n OnDestroy,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n/**\n * This service is used by tree items to notify their parent\n * that the tree has to be recomputed.\n *\n * This service is a multiton associated with each tree instance.\n * It follows the same lifecycle as the tree it is associated with.\n */\n@Inject({})\nexport class DaffTreeNotifierService implements OnDestroy {\n\n /**\n * @docs-private\n */\n private _notice: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);\n\n /**\n * An observable that emits when the tree needs to be re-computed.\n */\n notice$ = this._notice.asObservable();\n\n /**\n * `notify` can be called to trigger a re-computation of the tree\n * if data has changed unexpectedly and a re-render did not occur.\n *\n * This should be used sparingly. Instead, prefer updating `data` on the tree\n * itself for performance reasons.\n */\n notify() {\n this._notice.next(true);\n }\n\n /**\n * Cleanup when the tree is destroyed.\n *\n * @docs-private\n */\n ngOnDestroy(): void {\n this._notice.complete();\n }\n}\n","import { collect } from '@daffodil/core';\n\nimport { DaffTreeUi } from '../interfaces/tree-ui';\n\n/**\n * A flattened node of a tree. This is used when translating the tree data\n * structure into an array.\n */\nexport interface DaffTreeFlatNode {\n id: number | string;\n title: string;\n url: string;\n level: number;\n hasChildren: boolean;\n data: unknown;\n visible: boolean;\n _treeRef: DaffTreeUi<unknown>;\n}\n\n/**\n * Flatten a DaffTreeUi<unknown> into an array, removing elements from the array\n * below nodes in the tree that are not open.\n */\nexport const flattenTree = (daffUiTree: DaffTreeUi<unknown>, removeNodes: boolean = false): DaffTreeFlatNode[] => {\n const tree: DaffTreeFlatNode[] = [];\n if(!daffUiTree) {\n return [];\n }\n\n let items = [\n {\n ...daffUiTree,\n level: 0,\n data: undefined,\n open: true,\n _treeRef: daffUiTree,\n },\n ];\n\n\n while(items) {\n const el = items.pop();\n if(!el) {\n break;\n }\n\n items = [\n ...items,\n ...el.items.map((i) => ({\n ...i,\n level:\n el.level + 1,\n _treeRef: i,\n })).reverse(),\n ];\n\n const hasClosedAncestor = el._treeRef.parent\n ? collect(el._treeRef.parent, (node) => node.parent ? [node.parent] : [], el.level).reduce(\n (acc, parent) => acc || !parent.open,\n false,\n )\n : false;\n\n if(!removeNodes && el._treeRef.parent) {\n tree.push({\n id: el.id,\n title: el.title,\n level: el.level,\n url : el.url,\n visible: !hasClosedAncestor,\n hasChildren: el.items.length > 0,\n data: undefined,\n _treeRef: el._treeRef,\n });\n } else if(removeNodes && el._treeRef.parent?.open) {\n tree.push({\n id: el.id,\n title: el.title,\n level: el.level,\n url : el.url,\n visible: !hasClosedAncestor,\n hasChildren: el.items.length > 0,\n data: undefined,\n _treeRef: el._treeRef,\n });\n }\n }\n\n return tree;\n};\n","import { RecursiveTreeKeyOfType } from '../interfaces/recursive-key';\n\n/**\n * Traverse the tree, pre-order, right-to-left\n */\nexport const traverse = <T extends Record<any, any>, V extends Record<any, any> = T>(\n tree: T,\n visit: (tree: T) => V,\n key: RecursiveTreeKeyOfType<T>,\n): V => {\n let stack = [\n tree,\n ];\n\n while(stack) {\n const el = stack.pop();\n if(!el) {\n break;\n }\n\n visit(el);\n\n stack = [\n ...stack,\n ...<T[]><unknown>el[key],\n ];\n }\n\n return tree;\n};\n","import { traverse } from './traverse-tree';\nimport { DaffTreeData } from '../interfaces/tree-data';\nimport { DaffTreeUi } from '../interfaces/tree-ui';\n\nexport const daffDataTreeToUiTree = <T>(data: DaffTreeData<T>, parent: DaffTreeUi<T>, open: boolean = false): DaffTreeUi<T> => ({\n id: parent ? `${parent.id}.${data.id ?? data.title}` : (data.id ?? data.title),\n title: data.title,\n url: data.url,\n data: data.data,\n open,\n parent,\n items: [],\n});\n\n/**\n * This function translates the original data given to us by the client\n * to the internal representation of the tree used by the {@link DaffTreeComponent}\n */\nexport const hydrateTree = <T>(data: DaffTreeData<T>, treeId?: string): DaffTreeUi<T> => {\n const root: DaffTreeUi<T> = {\n id: treeId ?? (data.id ?? data.title),\n title: data.title,\n url: data.url,\n data: data.data,\n open: true,\n parent: undefined,\n items: [],\n };\n\n let treeStack = [\n root,\n ];\n\n traverse(data, (el) => {\n const treeEl = treeStack.pop();\n treeEl.items = el.items.map((i) => daffDataTreeToUiTree(i, treeEl, false));\n treeStack = [\n ...treeStack,\n ...treeEl.items,\n ];\n return el;\n }, 'items');\n\n return root;\n};\n","/* eslint-disable quote-props */\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n inject,\n input,\n signal,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { DaffArticleEncapsulatedDirective } from '@daffodil/design';\n\nimport { DaffTreeNotifierService } from './tree-notifier.service';\nimport { DaffTreeData } from '../interfaces/tree-data';\nimport { DaffTreeRenderMode } from '../interfaces/tree-render-mode';\nimport { flattenTree } from '../utils/flatten-tree';\nimport { hydrateTree } from '../utils/hydrate-tree';\n\nlet daffTreeId = 0;\n\n/**\n * The `DaffTreeComponent` allows you to render tree structures as interactable UI.\n *\n * @example Basic use of the tree component\n * ```html\n * <ul daff-tree [tree]=\"tree\">\n * <ng-template #daffTreeItemWithChildrenTpl let-node>\n * <button daffTreeItem [node]=\"node\">{{ node.title }} </button>\n * </ng-template>\n *\n * <ng-template #daffTreeItemTpl let-node>\n * <a daffTreeItem [node]=\"node\" [routerLink]=\"node.url\">{{ node.title }}</a>\n * </ng-template>\n * </ul>\n * ```\n *\n * where `tree` is a {@link DaffTreeData}.\n *\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ul[daff-tree]',\n templateUrl: './tree.component.html',\n styleUrls: ['./tree.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n DaffTreeNotifierService,\n ],\n hostDirectives: [{\n directive: DaffArticleEncapsulatedDirective,\n }],\n host: {\n 'class': 'daff-tree',\n },\n imports: [\n NgTemplateOutlet,\n ],\n})\nexport class DaffTreeComponent {\n private notifier = inject(DaffTreeNotifierService);\n\n /**\n * The rendering mode for nodes in the tree.\n *\n * Default value is `in-dom`, which means nodes are present in the DOM.\n *\n * Generally, `not-in-dom` is faster as there are less DOM elements to render,\n * but there may be use-cases (like SEO) where having the tree in the DOM\n * is relevant.\n */\n readonly renderMode = input<DaffTreeRenderMode>('in-dom');\n\n /**\n * A unique identifier for the tree instance.\n * Used as a prefix for all node IDs in the tree.\n * If not provided, an auto-incrementing number is used.\n */\n readonly id = input<string>(`${daffTreeId++}`);\n\n /**\n * The tree data you would like to render.\n */\n readonly tree = input<DaffTreeData<unknown>>();\n\n /**\n * The internal tree element.\n */\n private _tree = computed(() => {\n const tree = this.tree();\n return tree ? hydrateTree(tree, this.id()) : undefined;\n });\n\n /**\n * A revision counter incremented by notifications from tree items.\n * Used to trigger re-flattening when tree item state changes.\n */\n readonly _revision = signal(0);\n\n /**\n * @docs-private\n *\n * The flattened tree data. For debugging purposes, you can iterate through this if you want to inspect\n * the resulting array structure we computed to render the tree.\n */\n readonly flatTree = computed(() => {\n this._revision();\n const tree = this._tree();\n return tree ? flattenTree(tree, this.renderMode() === 'not-in-dom') : [];\n });\n\n /**\n * The template used to render tree-nodes that themselves have children.\n *\n * @docs-private\n */\n readonly withChildrenTemplate = contentChild<TemplateRef<any>>('daffTreeItemWithChildrenTpl');\n\n /**\n * The template used to render tree-nodes that have no children.\n *\n * @docs-private\n */\n readonly treeItemTemplate = contentChild<TemplateRef<any>>('daffTreeItemTpl');\n\n constructor() {\n this.notifier.notice$.subscribe(() => {\n this._revision.update((r) => r + 1);\n });\n }\n}\n","@for (node of flatTree(); track node.id) {\n\t<li [attr.aria-level]=\"node.level\" [class.hidden]=\"!node.visible\">\n\t\t<ng-container\n\t\t\t*ngTemplateOutlet=\"node.hasChildren ? withChildrenTemplate() : treeItemTemplate(); context: { $implicit: node }\">\n\t\t</ng-container>\n\t</li>\n}","import { DaffTreeUi } from '../interfaces/tree-ui';\n\n/**\n * Walk up the tree from a leaf to the root applying the\n * visit function at each node along the way.\n */\nexport const walkUp = <T>(\n tree: DaffTreeUi<T>,\n visit: (tree: DaffTreeUi<T>) => DaffTreeUi<T>,\n): DaffTreeUi<T> => {\n while(tree.parent) {\n visit(tree);\n tree = tree.parent;\n }\n\n return tree;\n};\n","import { walkUp } from './walk-up';\nimport { DaffTreeUi } from '../interfaces/tree-ui';\n\n/**\n * Open all ancestor nodes of the given node so that it becomes visible in the tree.\n */\nexport const daffTreeOpenAncestors = <T>(node: DaffTreeUi<T>): void => {\n walkUp(node, (ancestor) => {\n ancestor.open = true;\n return ancestor;\n });\n};\n","/* eslint-disable quote-props */\n\nimport { DOCUMENT } from '@angular/common';\nimport {\n computed,\n Directive,\n effect,\n inject,\n input,\n untracked,\n} from '@angular/core';\n\nimport { DaffTreeNotifierService } from '../tree/tree-notifier.service';\nimport { DaffTreeFlatNode } from '../utils/flatten-tree';\nimport { daffTreeOpenAncestors } from '../utils/open-ancestors';\n\n/**\n * The `DaffTreeItemDirective` marks elements as tree child nodes that interact with the parent tree structure.\n *\n * @example Using a `[daffTreeItem]`\n *\n * `[tree]` is a {@link DaffTreeData} and `[daff-tree]` is a {@link DaffTreeComponent}.\n *\n * ```html\n * <ul daff-tree [tree]=\"tree\">\n * <ng-template #daffTreeItemWithChildrenTpl let-node>\n * <button daffTreeItem [node]=\"node\">{{ node.title }} </button>\n * </ng-template>\n *\n * <ng-template #daffTreeItemTpl let-node>\n * <a daffTreeItem [node]=\"node\" [routerLink]=\"node.url\">{{ node.title }}</a>\n * </ng-template>\n * </ul>\n * ```\n *\n */\n@Directive({\n selector: '[daffTreeItem]',\n host: {\n 'class': 'daff-tree-item',\n '[class.selected]': 'selected()',\n '[class.parent]': 'isParent()',\n '[class.open]': 'open()',\n '[attr.id]': 'id()',\n '[attr.aria-expanded]': 'ariaExpanded()',\n '[style.--depth]': 'depth()',\n '(keydown.escape)': 'onEscape()',\n '(click)': 'onClick()',\n },\n})\nexport class DaffTreeItemDirective {\n private document = inject(DOCUMENT);\n private treeNotifier = inject(DaffTreeNotifierService);\n\n /**\n * The {@link DaffTreeFlatNode} associated with this specific tree item.\n */\n readonly node = input.required<DaffTreeFlatNode>();\n\n /**\n * Whether or not the tree item is the currently active item.\n * Note that there is no requirement that there only be one active item at a time.\n *\n * When a tree item becomes selected, all of its ancestor nodes\n * will be automatically opened so that the selected item is visible.\n */\n readonly selected = input(false);\n\n /**\n * The html `id` of the tree item. This is derived from the {@link DaffTreeData}.\n */\n protected readonly id = computed(() => 'tree-' + this.node().id);\n\n /**\n * A property indicating the depth of the tree.\n */\n protected readonly depth = computed(() => this.node().level);\n\n /**\n * Whether or not this node has children.\n */\n protected readonly isParent = computed(() => this.node().hasChildren);\n\n /**\n * Indicates whether or not the tree is `open`.\n */\n protected readonly open = computed(() => this.node()._treeRef.open);\n\n /**\n * Accessibility property, notifying users about whether\n * or not the tree item is open.\n *\n * @docs-private\n */\n protected readonly ariaExpanded = computed(() => {\n const node = this.node();\n return node.hasChildren ? (node._treeRef.open ? 'true' : 'false') : undefined;\n });\n\n constructor() {\n effect(() => {\n if(this.selected()) {\n const node = untracked(this.node);\n daffTreeOpenAncestors(node._treeRef);\n this.treeNotifier.notify();\n }\n });\n }\n\n /**\n * @docs-private\n */\n onEscape() {\n this.toggleParent(this.node());\n }\n\n /**\n * @docs-private\n */\n onClick() {\n if(this.node().hasChildren) {\n this.toggleTree(this.node());\n }\n this.treeNotifier.notify();\n }\n\n /**\n * Toggle the open state of the tree's parent.\n */\n toggleParent(node: DaffTreeFlatNode) {\n if(node._treeRef?.parent.parent === undefined) {\n return;\n }\n node._treeRef.parent.open = !node._treeRef.parent.open;\n (<Document>this.document).getElementById('tree-' + node._treeRef.parent.id).focus();\n }\n\n /**\n * Toggle the open state of this specific subtree tree.\n */\n toggleTree(node: DaffTreeFlatNode) {\n if(node._treeRef.open === false) {\n node._treeRef.open = true;\n } else {\n node._treeRef.open = false;\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffTreeComponent } from './tree/tree.component';\nimport { DaffTreeItemDirective } from './tree-item/tree-item.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_TREE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffTreeComponent,\n DaffTreeItemDirective,\n ],\n exports: [\n DaffTreeComponent,\n DaffTreeItemDirective,\n ],\n})\nexport class DaffTreeModule { }\n","import { RecursiveTreeKeyOfType } from '../interfaces/recursive-key';\nimport { DaffTreeData } from '../interfaces/tree-data';\n\n/**\n * Transform a tree-like structure into a {@link DaffTreeData}.\n *\n * @param tree - The data structure representing tree-like data.\n * @param transformFn - A user-supplied function that will transform the user\n * type into a {@link DaffTreeData}\n * @param key - The property of the your tree that indicates which\n * key contains the \"children\" of your tree structure.\n *\n */\nexport const daffTransformTree = <\n\n T extends Record<any,any>,\n V\n>(\n tree: T,\n transformFn: (type: T) => DaffTreeData<V>,\n key: RecursiveTreeKeyOfType<T>,\n): DaffTreeData<V> => {\n\n const transformedTree: DaffTreeData<V> = transformFn(tree);\n\n const queue: { node: T; parent: DaffTreeData<V> }[] = [{ node: tree, parent: transformedTree }];\n\n while (queue.length > 0) {\n const { node, parent } = queue.shift();\n\n const childItems = node[key];\n for (const child of <T[]>childItems) {\n const transformedChild: DaffTreeData<V> = transformFn(child);\n parent.items.push(transformedChild);\n queue.push({ node: child, parent: transformedChild });\n }\n }\n\n return transformedTree;\n};\n","import { DaffTreeComponent } from './tree/tree.component';\nimport { DaffTreeItemDirective } from './tree-item/tree-item.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_TREE_COMPONENTS = <const> [\n DaffTreeComponent,\n DaffTreeItemD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EACP,WAAyC,EACzC,GAA8B,KACX;AAEnB,IAAA,MAAM,eAAe,GAAoB,WAAW,CAAC,IAAI,CAAC;AAE1D,IAAA,MAAM,KAAK,GAA2C,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;AAE/F,IAAA,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE;AAEtC,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC;AAC5B,QAAA,KAAK,MAAM,KAAK,IAAS,UAAU,EAAE;AACnC,YAAA,MAAM,gBAAgB,GAAoB,WAAW,CAAC,KAAK,CAAC;AAC5D,YAAA,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC;AACnC,YAAA,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;QACvD;IACF;AAEA,IAAA,OAAO,eAAe;AACxB;;ACpCA;;AAEG;AACI,MAAM,oBAAoB,GAAW;IAC1C,iBAAiB;IACjB,qBAAqB;;;ACRvB;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-design-tree.mjs","names":[],"sources":["../../../libs/design/tree/src/tree/tree-notifier.service.ts","../../../libs/design/tree/src/utils/flatten-tree.ts","../../../libs/design/tree/src/utils/traverse-tree.ts","../../../libs/design/tree/src/utils/hydrate-tree.ts","../../../libs/design/tree/src/tree/tree.component.ts","../../../libs/design/tree/src/tree/tree.component.html","../../../libs/design/tree/src/utils/walk-up.ts","../../../libs/design/tree/src/utils/open-ancestors.ts","../../../libs/design/tree/src/tree-item/tree-item.directive.ts","../../../libs/design/tree/src/tree.module.ts","../../../libs/design/tree/src/utils/transform.ts","../../../libs/design/tree/src/tree.ts"],"sourcesContent":["import {\n Inject,\n OnDestroy,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n/**\n * This service is used by tree items to notify their parent\n * that the tree has to be recomputed.\n *\n * This service is a multiton associated with each tree instance.\n * It follows the same lifecycle as the tree it is associated with.\n */\n@Inject({})\nexport class DaffTreeNotifierService implements OnDestroy {\n\n /**\n * @docs-private\n */\n private _notice: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);\n\n /**\n * An observable that emits when the tree needs to be re-computed.\n */\n notice$ = this._notice.asObservable();\n\n /**\n * `notify` can be called to trigger a re-computation of the tree\n * if data has changed unexpectedly and a re-render did not occur.\n *\n * This should be used sparingly. Instead, prefer updating `data` on the tree\n * itself for performance reasons.\n */\n notify() {\n this._notice.next(true);\n }\n\n /**\n * Cleanup when the tree is destroyed.\n *\n * @docs-private\n */\n ngOnDestroy(): void {\n this._notice.complete();\n }\n}\n","import { collect } from '@daffodil/core';\n\nimport { DaffTreeUi } from '../interfaces/tree-ui';\n\n/**\n * A flattened node of a tree. This is used when translating the tree data\n * structure into an array.\n */\nexport interface DaffTreeFlatNode {\n id: number | string;\n title: string;\n url: string;\n level: number;\n hasChildren: boolean;\n data: unknown;\n visible: boolean;\n _treeRef: DaffTreeUi<unknown>;\n}\n\n/**\n * Flatten a DaffTreeUi<unknown> into an array, removing elements from the array\n * below nodes in the tree that are not open.\n */\nexport const flattenTree = (daffUiTree: DaffTreeUi<unknown>, removeNodes: boolean = false): DaffTreeFlatNode[] => {\n const tree: DaffTreeFlatNode[] = [];\n if(!daffUiTree) {\n return [];\n }\n\n let items = [\n {\n ...daffUiTree,\n level: 0,\n data: undefined,\n open: true,\n _treeRef: daffUiTree,\n },\n ];\n\n\n while(items) {\n const el = items.pop();\n if(!el) {\n break;\n }\n\n items = [\n ...items,\n ...el.items.map((i) => ({\n ...i,\n level:\n el.level + 1,\n _treeRef: i,\n })).reverse(),\n ];\n\n const hasClosedAncestor = el._treeRef.parent\n ? collect(el._treeRef.parent, (node) => node.parent ? [node.parent] : [], el.level).reduce(\n (acc, parent) => acc || !parent.open,\n false,\n )\n : false;\n\n if(!removeNodes && el._treeRef.parent) {\n tree.push({\n id: el.id,\n title: el.title,\n level: el.level,\n url : el.url,\n visible: !hasClosedAncestor,\n hasChildren: el.items.length > 0,\n data: el.data,\n _treeRef: el._treeRef,\n });\n } else if(removeNodes && el._treeRef.parent?.open) {\n tree.push({\n id: el.id,\n title: el.title,\n level: el.level,\n url : el.url,\n visible: !hasClosedAncestor,\n hasChildren: el.items.length > 0,\n data: el.data,\n _treeRef: el._treeRef,\n });\n }\n }\n\n return tree;\n};\n","import { RecursiveTreeKeyOfType } from '../interfaces/recursive-key';\n\n/**\n * Traverse the tree, pre-order, right-to-left\n */\nexport const traverse = <T extends Record<any, any>, V extends Record<any, any> = T>(\n tree: T,\n visit: (tree: T) => V,\n key: RecursiveTreeKeyOfType<T>,\n): V => {\n let stack = [\n tree,\n ];\n\n while(stack) {\n const el = stack.pop();\n if(!el) {\n break;\n }\n\n visit(el);\n\n stack = [\n ...stack,\n ...<T[]><unknown>el[key],\n ];\n }\n\n return tree;\n};\n","import { traverse } from './traverse-tree';\nimport { DaffTreeData } from '../interfaces/tree-data';\nimport { DaffTreeUi } from '../interfaces/tree-ui';\n\nexport const daffDataTreeToUiTree = <T>(data: DaffTreeData<T>, parent: DaffTreeUi<T>, open: boolean = false): DaffTreeUi<T> => ({\n id: parent ? `${parent.id}.${data.id ?? data.title}` : (data.id ?? data.title),\n title: data.title,\n url: data.url,\n data: data.data,\n open,\n parent,\n items: [],\n});\n\n/**\n * This function translates the original data given to us by the client\n * to the internal representation of the tree used by the {@link DaffTreeComponent}\n */\nexport const hydrateTree = <T>(data: DaffTreeData<T>, treeId?: string): DaffTreeUi<T> => {\n const root: DaffTreeUi<T> = {\n id: treeId ?? (data.id ?? data.title),\n title: data.title,\n url: data.url,\n data: data.data,\n open: true,\n parent: undefined,\n items: [],\n };\n\n let treeStack = [\n root,\n ];\n\n traverse(data, (el) => {\n const treeEl = treeStack.pop();\n treeEl.items = el.items.map((i) => daffDataTreeToUiTree(i, treeEl, false));\n treeStack = [\n ...treeStack,\n ...treeEl.items,\n ];\n return el;\n }, 'items');\n\n return root;\n};\n","/* eslint-disable quote-props */\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n inject,\n input,\n signal,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { DaffArticleEncapsulatedDirective } from '@daffodil/design';\n\nimport { DaffTreeNotifierService } from './tree-notifier.service';\nimport { DaffTreeData } from '../interfaces/tree-data';\nimport { DaffTreeRenderMode } from '../interfaces/tree-render-mode';\nimport { flattenTree } from '../utils/flatten-tree';\nimport { hydrateTree } from '../utils/hydrate-tree';\n\nlet daffTreeId = 0;\n\n/**\n * The `DaffTreeComponent` allows you to render tree structures as interactable UI.\n *\n * @example Basic use of the tree component\n * ```html\n * <ul daff-tree [tree]=\"tree\">\n * <ng-template #daffTreeItemWithChildrenTpl let-node>\n * <button daffTreeItem [node]=\"node\">{{ node.title }} </button>\n * </ng-template>\n *\n * <ng-template #daffTreeItemTpl let-node>\n * <a daffTreeItem [node]=\"node\" [routerLink]=\"node.url\">{{ node.title }}</a>\n * </ng-template>\n * </ul>\n * ```\n *\n * where `tree` is a {@link DaffTreeData}.\n *\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ul[daff-tree]',\n templateUrl: './tree.component.html',\n styleUrls: ['./tree.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n DaffTreeNotifierService,\n ],\n hostDirectives: [{\n directive: DaffArticleEncapsulatedDirective,\n }],\n host: {\n 'class': 'daff-tree',\n },\n imports: [\n NgTemplateOutlet,\n ],\n})\nexport class DaffTreeComponent {\n private notifier = inject(DaffTreeNotifierService);\n\n /**\n * The rendering mode for nodes in the tree.\n *\n * Default value is `in-dom`, which means nodes are present in the DOM.\n *\n * Generally, `not-in-dom` is faster as there are less DOM elements to render,\n * but there may be use-cases (like SEO) where having the tree in the DOM\n * is relevant.\n */\n readonly renderMode = input<DaffTreeRenderMode>('in-dom');\n\n /**\n * A unique identifier for the tree instance.\n * Used as a prefix for all node IDs in the tree.\n * If not provided, an auto-incrementing number is used.\n */\n readonly id = input<string>(`${daffTreeId++}`);\n\n /**\n * The tree data you would like to render.\n */\n readonly tree = input<DaffTreeData<unknown>>();\n\n /**\n * The internal tree element.\n */\n private _tree = computed(() => {\n const tree = this.tree();\n return tree ? hydrateTree(tree, this.id()) : undefined;\n });\n\n /**\n * A revision counter incremented by notifications from tree items.\n * Used to trigger re-flattening when tree item state changes.\n */\n readonly _revision = signal(0);\n\n /**\n * @docs-private\n *\n * The flattened tree data. For debugging purposes, you can iterate through this if you want to inspect\n * the resulting array structure we computed to render the tree.\n */\n readonly flatTree = computed(() => {\n this._revision();\n const tree = this._tree();\n return tree ? flattenTree(tree, this.renderMode() === 'not-in-dom') : [];\n });\n\n /**\n * The template used to render tree-nodes that themselves have children.\n *\n * @docs-private\n */\n readonly withChildrenTemplate = contentChild<TemplateRef<any>>('daffTreeItemWithChildrenTpl');\n\n /**\n * The template used to render tree-nodes that have no children.\n *\n * @docs-private\n */\n readonly treeItemTemplate = contentChild<TemplateRef<any>>('daffTreeItemTpl');\n\n constructor() {\n this.notifier.notice$.subscribe(() => {\n this._revision.update((r) => r + 1);\n });\n }\n}\n","@for (node of flatTree(); track node.id) {\n\t<li [attr.aria-level]=\"node.level\" [class.hidden]=\"!node.visible\">\n\t\t<ng-container\n\t\t\t*ngTemplateOutlet=\"node.hasChildren ? withChildrenTemplate() : treeItemTemplate(); context: { $implicit: node }\">\n\t\t</ng-container>\n\t</li>\n}","import { DaffTreeUi } from '../interfaces/tree-ui';\n\n/**\n * Walk up the tree from a leaf to the root applying the\n * visit function at each node along the way.\n */\nexport const walkUp = <T>(\n tree: DaffTreeUi<T>,\n visit: (tree: DaffTreeUi<T>) => DaffTreeUi<T>,\n): DaffTreeUi<T> => {\n while(tree.parent) {\n visit(tree);\n tree = tree.parent;\n }\n\n return tree;\n};\n","import { walkUp } from './walk-up';\nimport { DaffTreeUi } from '../interfaces/tree-ui';\n\n/**\n * Open all ancestor nodes of the given node so that it becomes visible in the tree.\n */\nexport const daffTreeOpenAncestors = <T>(node: DaffTreeUi<T>): void => {\n walkUp(node, (ancestor) => {\n ancestor.open = true;\n return ancestor;\n });\n};\n","/* eslint-disable quote-props */\n\nimport { DOCUMENT } from '@angular/common';\nimport {\n computed,\n Directive,\n effect,\n inject,\n input,\n untracked,\n} from '@angular/core';\n\nimport { DaffTreeNotifierService } from '../tree/tree-notifier.service';\nimport { DaffTreeFlatNode } from '../utils/flatten-tree';\nimport { daffTreeOpenAncestors } from '../utils/open-ancestors';\n\n/**\n * The `DaffTreeItemDirective` marks elements as tree child nodes that interact with the parent tree structure.\n *\n * @example Using a `[daffTreeItem]`\n *\n * `[tree]` is a {@link DaffTreeData} and `[daff-tree]` is a {@link DaffTreeComponent}.\n *\n * ```html\n * <ul daff-tree [tree]=\"tree\">\n * <ng-template #daffTreeItemWithChildrenTpl let-node>\n * <button daffTreeItem [node]=\"node\">{{ node.title }} </button>\n * </ng-template>\n *\n * <ng-template #daffTreeItemTpl let-node>\n * <a daffTreeItem [node]=\"node\" [routerLink]=\"node.url\">{{ node.title }}</a>\n * </ng-template>\n * </ul>\n * ```\n *\n */\n@Directive({\n selector: '[daffTreeItem]',\n host: {\n 'class': 'daff-tree-item',\n '[class.selected]': 'selected()',\n '[class.parent]': 'isParent()',\n '[class.open]': 'open()',\n '[attr.id]': 'id()',\n '[attr.aria-expanded]': 'ariaExpanded()',\n '[style.--depth]': 'depth()',\n '(keydown.escape)': 'onEscape()',\n '(click)': 'onClick()',\n },\n})\nexport class DaffTreeItemDirective {\n private document = inject(DOCUMENT);\n private treeNotifier = inject(DaffTreeNotifierService);\n\n /**\n * The {@link DaffTreeFlatNode} associated with this specific tree item.\n */\n readonly node = input.required<DaffTreeFlatNode>();\n\n /**\n * Whether or not the tree item is the currently active item.\n * Note that there is no requirement that there only be one active item at a time.\n *\n * When a tree item becomes selected, all of its ancestor nodes\n * will be automatically opened so that the selected item is visible.\n */\n readonly selected = input(false);\n\n /**\n * The html `id` of the tree item. This is derived from the {@link DaffTreeData}.\n */\n protected readonly id = computed(() => 'tree-' + this.node().id);\n\n /**\n * A property indicating the depth of the tree.\n */\n protected readonly depth = computed(() => this.node().level);\n\n /**\n * Whether or not this node has children.\n */\n protected readonly isParent = computed(() => this.node().hasChildren);\n\n /**\n * Indicates whether or not the tree is `open`.\n */\n protected readonly open = computed(() => this.node()._treeRef.open);\n\n /**\n * Accessibility property, notifying users about whether\n * or not the tree item is open.\n *\n * @docs-private\n */\n protected readonly ariaExpanded = computed(() => {\n const node = this.node();\n return node.hasChildren ? (node._treeRef.open ? 'true' : 'false') : undefined;\n });\n\n constructor() {\n effect(() => {\n if(this.selected()) {\n const node = untracked(this.node);\n daffTreeOpenAncestors(node._treeRef);\n this.treeNotifier.notify();\n }\n });\n }\n\n /**\n * @docs-private\n */\n onEscape() {\n this.toggleParent(this.node());\n }\n\n /**\n * @docs-private\n */\n onClick() {\n if(this.node().hasChildren) {\n this.toggleTree(this.node());\n }\n this.treeNotifier.notify();\n }\n\n /**\n * Toggle the open state of the tree's parent.\n */\n toggleParent(node: DaffTreeFlatNode) {\n if(node._treeRef?.parent.parent === undefined) {\n return;\n }\n node._treeRef.parent.open = !node._treeRef.parent.open;\n (<Document>this.document).getElementById('tree-' + node._treeRef.parent.id).focus();\n }\n\n /**\n * Toggle the open state of this specific subtree tree.\n */\n toggleTree(node: DaffTreeFlatNode) {\n if(node._treeRef.open === false) {\n node._treeRef.open = true;\n } else {\n node._treeRef.open = false;\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffTreeComponent } from './tree/tree.component';\nimport { DaffTreeItemDirective } from './tree-item/tree-item.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_TREE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffTreeComponent,\n DaffTreeItemDirective,\n ],\n exports: [\n DaffTreeComponent,\n DaffTreeItemDirective,\n ],\n})\nexport class DaffTreeModule { }\n","import { RecursiveTreeKeyOfType } from '../interfaces/recursive-key';\nimport { DaffTreeData } from '../interfaces/tree-data';\n\n/**\n * Transform a tree-like structure into a {@link DaffTreeData}.\n *\n * @param tree - The data structure representing tree-like data.\n * @param transformFn - A user-supplied function that will transform the user\n * type into a {@link DaffTreeData}\n * @param key - The property of the your tree that indicates which\n * key contains the \"children\" of your tree structure.\n *\n */\nexport const daffTransformTree = <\n\n T extends Record<any,any>,\n V\n>(\n tree: T,\n transformFn: (type: T) => DaffTreeData<V>,\n key: RecursiveTreeKeyOfType<T>,\n): DaffTreeData<V> => {\n\n const transformedTree: DaffTreeData<V> = transformFn(tree);\n\n const queue: { node: T; parent: DaffTreeData<V> }[] = [{ node: tree, parent: transformedTree }];\n\n while (queue.length > 0) {\n const { node, parent } = queue.shift();\n\n const childItems = node[key];\n for (const child of <T[]>childItems) {\n const transformedChild: DaffTreeData<V> = transformFn(child);\n parent.items.push(transformedChild);\n queue.push({ node: child, parent: transformedChild });\n }\n }\n\n return transformedTree;\n};\n","import { DaffTreeComponent } from './tree/tree.component';\nimport { DaffTreeItemDirective } from './tree-item/tree-item.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_TREE_COMPONENTS = <const> [\n DaffTreeComponent,\n DaffTreeItemDirective,\n];\n"],"mappings":";;;;;;;;AAcO,IAAM,0BAAN,MAAM,wBAAuB;CAA7B,cAAA;EAKG,KAAA,UAAoC,IAAI,gBAAyB,IAAI;EAK7E,KAAA,UAAU,KAAK,QAAQ,aAAY;CAqBrC;CAZE,SAAM;EACJ,KAAK,QAAQ,KAAK,IAAI;CACxB;CAOA,cAAW;EACT,KAAK,QAAQ,SAAQ;CACvB;AACD;AA/BY,0BAAuB,WAAA,CADnC,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CAAe,CAAE;CAE9F,OAAO,MAAM,SAAS,GAAG;EACvB,MAAM,EAAE,MAAM,WAAW,MAAM,MAAK;EAEpC,MAAM,aAAa,KAAK;EACxB,KAAK,MAAM,SAAc,YAAY;GACnC,MAAM,mBAAoC,YAAY,KAAK;GAC3D,OAAO,MAAM,KAAK,gBAAgB;GAClC,MAAM,KAAK;IAAE,MAAM;IAAO,QAAQ;GAAgB,CAAE;EACtD;CACF;CAEA,OAAO;AACT;ACjCA,MAAa,uBAA+B,CAC1C,mBACA,qBACD"}
@@ -1,118 +1,171 @@
1
- import * as i0 from '@angular/core';
2
- import { Input, ChangeDetectionStrategy, Component, Pipe } from '@angular/core';
3
- import * as i1 from '@angular/platform-browser';
4
-
5
- const validateProperty = (object, prop) => {
6
- if (object[prop] === null || object[prop] === undefined || object[prop] === '') {
7
- throw new Error(`DaffYoutubePlayerComponent must have a defined ${prop} attribute.`);
8
- }
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Pipe, computed, input } from "@angular/core";
3
+ import * as i1 from "@angular/platform-browser";
4
+ const validateInput = (prop) => (value) => {
5
+ if (value === null || value === void 0 || value === "") throw new Error(`DaffYoutubePlayerComponent must have a defined ${prop} attribute.`);
6
+ return value;
9
7
  };
10
- const validateProperties = (object, props) => {
11
- const invalidProps = props.filter(prop => {
12
- try {
13
- validateProperty(object, prop);
14
- }
15
- catch (e) {
16
- return true;
17
- }
18
- return false;
19
- });
20
- if (invalidProps.length) {
21
- throw new Error(`DaffYoutubePlayerComponent must have the ${invalidProps.join(',')} attributes defined.`);
22
- }
8
+ var DaffYoutubePlayerComponent = class DaffYoutubePlayerComponent {
9
+ constructor(sanitizer) {
10
+ this.sanitizer = sanitizer;
11
+ this.src = input(...ngDevMode ? [void 0, { debugName: "src" }] : /* istanbul ignore next */ []);
12
+ this.title = input("", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
13
+ this.width = input.required({
14
+ ...ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {},
15
+ transform: validateInput("width")
16
+ });
17
+ this.height = input.required({
18
+ ...ngDevMode ? { debugName: "height" } : /* istanbul ignore next */ {},
19
+ transform: validateInput("height")
20
+ });
21
+ this._aspectRatio = computed(() => this.sanitizer.bypassSecurityTrustStyle(this.width() + " / " + this.height()), ...ngDevMode ? [{ debugName: "_aspectRatio" }] : /* istanbul ignore next */ []);
22
+ }
23
+ static {
24
+ this.ɵfac = i0.ɵɵngDeclareFactory({
25
+ minVersion: "12.0.0",
26
+ version: "22.2.4",
27
+ ngImport: i0,
28
+ type: DaffYoutubePlayerComponent,
29
+ deps: [{ token: i1.DomSanitizer }],
30
+ target: i0.ɵɵFactoryTarget.Component
31
+ });
32
+ }
33
+ static {
34
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
35
+ minVersion: "17.0.0",
36
+ version: "22.2.4",
37
+ type: DaffYoutubePlayerComponent,
38
+ isStandalone: true,
39
+ selector: "daff-youtube-player",
40
+ inputs: {
41
+ src: {
42
+ classPropertyName: "src",
43
+ publicName: "src",
44
+ isSignal: true,
45
+ isRequired: false,
46
+ transformFunction: null
47
+ },
48
+ title: {
49
+ classPropertyName: "title",
50
+ publicName: "title",
51
+ isSignal: true,
52
+ isRequired: false,
53
+ transformFunction: null
54
+ },
55
+ width: {
56
+ classPropertyName: "width",
57
+ publicName: "width",
58
+ isSignal: true,
59
+ isRequired: true,
60
+ transformFunction: null
61
+ },
62
+ height: {
63
+ classPropertyName: "height",
64
+ publicName: "height",
65
+ isSignal: true,
66
+ isRequired: true,
67
+ transformFunction: null
68
+ }
69
+ },
70
+ host: { properties: { "style.max-width": "width() + \"px\"" } },
71
+ ngImport: i0,
72
+ template: "@if (src()) {\n <iframe class=\"daff-youtube-player\"\n [style.aspectRatio]=\"_aspectRatio()\"\n [src]=\"src()\"\n [title]=\"title()\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n}",
73
+ styles: [":host{display:block;border-radius:inherit;position:relative;width:100%}:host .daff-youtube-player{display:block;object-fit:cover;max-width:100%;max-height:100%;width:100%}\n"],
74
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
75
+ });
76
+ }
23
77
  };
24
- class DaffYoutubePlayerComponent {
25
- /**
26
- * The width of the player.
27
- */
28
- get width() {
29
- return this._width;
30
- }
31
- set width(value) {
32
- this._width = value;
33
- validateProperty(this, 'width');
34
- }
35
- /**
36
- * The height of the player.
37
- */
38
- get height() {
39
- return this._height;
40
- }
41
- set height(value) {
42
- this._height = value;
43
- validateProperty(this, 'height');
44
- }
45
- constructor(sanitizer) {
46
- this.sanitizer = sanitizer;
47
- /**
48
- * The title of the YouTube video.
49
- */
50
- this.title = '';
51
- }
52
- /**
53
- * @docs-private
54
- */
55
- ngOnInit() {
56
- validateProperties(this, ['width', 'height']);
57
- }
58
- /**
59
- * @docs-private
60
- */
61
- get _aspectRatio() {
62
- return this.sanitizer.bypassSecurityTrustStyle(this.width + ' / ' + this.height);
63
- }
64
- /**
65
- * @docs-private
66
- */
67
- get maxWidth() {
68
- return this.width + 'px';
69
- }
70
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffYoutubePlayerComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
71
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffYoutubePlayerComponent, isStandalone: true, selector: "daff-youtube-player", inputs: { src: "src", title: "title", width: "width", height: "height" }, host: { properties: { "style.max-width": "maxWidth" } }, ngImport: i0, template: "@if (src) {\n <iframe class=\"daff-youtube-player\"\n [style.aspectRatio]=\"_aspectRatio\"\n [src]=\"src\"\n [title]=\"title\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n}", styles: [":host{display:block;border-radius:inherit;position:relative;width:100%}:host .daff-youtube-player{display:block;object-fit:cover;max-width:100%;max-height:100%;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
72
- }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffYoutubePlayerComponent, decorators: [{
74
- type: Component,
75
- args: [{ selector: 'daff-youtube-player', changeDetection: ChangeDetectionStrategy.OnPush, host: {
76
- '[style.max-width]': 'maxWidth',
77
- }, template: "@if (src) {\n <iframe class=\"daff-youtube-player\"\n [style.aspectRatio]=\"_aspectRatio\"\n [src]=\"src\"\n [title]=\"title\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n}", styles: [":host{display:block;border-radius:inherit;position:relative;width:100%}:host .daff-youtube-player{display:block;object-fit:cover;max-width:100%;max-height:100%;width:100%}\n"] }]
78
- }], ctorParameters: () => [{ type: i1.DomSanitizer }], propDecorators: { src: [{
79
- type: Input
80
- }], title: [{
81
- type: Input
82
- }], width: [{
83
- type: Input
84
- }], height: [{
85
- type: Input
86
- }] } });
87
-
88
- class DaffYoutubeSafePipe {
89
- constructor(domSanitizer) {
90
- this.domSanitizer = domSanitizer;
91
- }
92
- transform(url) {
93
- return this.domSanitizer.bypassSecurityTrustResourceUrl(url);
94
- }
95
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffYoutubeSafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
96
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffYoutubeSafePipe, isStandalone: true, name: "daffYoutubeSafe" }); }
97
- }
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffYoutubeSafePipe, decorators: [{
99
- type: Pipe,
100
- args: [{
101
- name: 'daffYoutubeSafe',
102
- }]
103
- }], ctorParameters: () => [{ type: i1.DomSanitizer }] });
104
-
105
- /**
106
- * @docs-private
107
- */
108
- const DAFF_YOUTUBE_PLAYER_COMPONENTS = [
109
- DaffYoutubePlayerComponent,
110
- DaffYoutubeSafePipe,
111
- ];
112
-
113
- /**
114
- * Generated bundle index. Do not edit.
115
- */
116
-
78
+ i0.ɵɵngDeclareClassMetadata({
79
+ minVersion: "12.0.0",
80
+ version: "22.2.4",
81
+ ngImport: i0,
82
+ type: DaffYoutubePlayerComponent,
83
+ decorators: [{
84
+ type: Component,
85
+ args: [{
86
+ selector: "daff-youtube-player",
87
+ changeDetection: ChangeDetectionStrategy.OnPush,
88
+ host: { "[style.max-width]": "width() + \"px\"" },
89
+ template: "@if (src()) {\n <iframe class=\"daff-youtube-player\"\n [style.aspectRatio]=\"_aspectRatio()\"\n [src]=\"src()\"\n [title]=\"title()\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n}",
90
+ styles: [":host{display:block;border-radius:inherit;position:relative;width:100%}:host .daff-youtube-player{display:block;object-fit:cover;max-width:100%;max-height:100%;width:100%}\n"]
91
+ }]
92
+ }],
93
+ ctorParameters: () => [{ type: i1.DomSanitizer }],
94
+ propDecorators: {
95
+ src: [{
96
+ type: i0.Input,
97
+ args: [{
98
+ isSignal: true,
99
+ alias: "src",
100
+ required: false
101
+ }]
102
+ }],
103
+ title: [{
104
+ type: i0.Input,
105
+ args: [{
106
+ isSignal: true,
107
+ alias: "title",
108
+ required: false
109
+ }]
110
+ }],
111
+ width: [{
112
+ type: i0.Input,
113
+ args: [{
114
+ isSignal: true,
115
+ alias: "width",
116
+ required: true
117
+ }]
118
+ }],
119
+ height: [{
120
+ type: i0.Input,
121
+ args: [{
122
+ isSignal: true,
123
+ alias: "height",
124
+ required: true
125
+ }]
126
+ }]
127
+ }
128
+ });
129
+ var DaffYoutubeSafePipe = class DaffYoutubeSafePipe {
130
+ constructor(domSanitizer) {
131
+ this.domSanitizer = domSanitizer;
132
+ }
133
+ transform(url) {
134
+ return this.domSanitizer.bypassSecurityTrustResourceUrl(url);
135
+ }
136
+ static {
137
+ this.ɵfac = i0.ɵɵngDeclareFactory({
138
+ minVersion: "12.0.0",
139
+ version: "22.2.4",
140
+ ngImport: i0,
141
+ type: DaffYoutubeSafePipe,
142
+ deps: [{ token: i1.DomSanitizer }],
143
+ target: i0.ɵɵFactoryTarget.Pipe
144
+ });
145
+ }
146
+ static {
147
+ this.ɵpipe = i0.ɵɵngDeclarePipe({
148
+ minVersion: "14.0.0",
149
+ version: "22.2.4",
150
+ ngImport: i0,
151
+ type: DaffYoutubeSafePipe,
152
+ isStandalone: true,
153
+ name: "daffYoutubeSafe"
154
+ });
155
+ }
156
+ };
157
+ i0.ɵɵngDeclareClassMetadata({
158
+ minVersion: "12.0.0",
159
+ version: "22.2.4",
160
+ ngImport: i0,
161
+ type: DaffYoutubeSafePipe,
162
+ decorators: [{
163
+ type: Pipe,
164
+ args: [{ name: "daffYoutubeSafe" }]
165
+ }],
166
+ ctorParameters: () => [{ type: i1.DomSanitizer }]
167
+ });
168
+ const DAFF_YOUTUBE_PLAYER_COMPONENTS = [DaffYoutubePlayerComponent, DaffYoutubeSafePipe];
117
169
  export { DAFF_YOUTUBE_PLAYER_COMPONENTS, DaffYoutubePlayerComponent, DaffYoutubeSafePipe };
118
- //# sourceMappingURL=daffodil-design-youtube-player.mjs.map
170
+
171
+ //# sourceMappingURL=daffodil-design-youtube-player.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-design-youtube-player.mjs","sources":["../../../libs/design/youtube-player/src/youtube-player.component.ts","../../../libs/design/youtube-player/src/youtube-player.component.html","../../../libs/design/youtube-player/src/safe-url.pipe.ts","../../../libs/design/youtube-player/src/youtube-player.ts","../../../libs/design/youtube-player/src/daffodil-design-youtube-player.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Input,\n OnInit,\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeStyle,\n SafeUrl,\n} from '@angular/platform-browser';\n\nconst validateProperty = (object: Record<string, any>, prop: string) => {\n if (object[prop] === null || object[prop] === undefined || object[prop] === '') {\n throw new Error(`DaffYoutubePlayerComponent must have a defined ${prop} attribute.`);\n }\n};\n\nconst validateProperties = (object: Record<string, any>, props: string[]) => {\n const invalidProps = props.filter(prop => {\n try {\n validateProperty(object, prop);\n } catch(e) {\n return true;\n }\n return false;\n });\n\n if (invalidProps.length) {\n throw new Error(`DaffYoutubePlayerComponent must have the ${invalidProps.join(',')} attributes defined.`);\n }\n};\n\n@Component({\n selector: 'daff-youtube-player',\n templateUrl: './youtube-player.component.html',\n styleUrl: './youtube-player.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.max-width]': 'maxWidth',\n },\n})\nexport class DaffYoutubePlayerComponent implements OnInit {\n /**\n * The URL of the YouTube video.\n */\n @Input() src: SafeUrl;\n\n /**\n * The title of the YouTube video.\n */\n @Input() title = '';\n\n private _width: number;\n\n /**\n * The width of the player.\n */\n @Input()\n get width(): number {\n return this._width;\n }\n set width(value: number) {\n this._width = value;\n validateProperty(this, 'width');\n }\n\n private _height: number;\n\n /**\n * The height of the player.\n */\n @Input()\n get height(): number {\n return this._height;\n }\n set height(value: number) {\n this._height = value;\n validateProperty(this, 'height');\n }\n\n constructor(private sanitizer: DomSanitizer) {}\n\n /**\n * @docs-private\n */\n ngOnInit(): void {\n validateProperties(this, ['width', 'height']);\n }\n\n /**\n * @docs-private\n */\n get _aspectRatio(): SafeStyle {\n return this.sanitizer.bypassSecurityTrustStyle(this.width + ' / ' + this.height);\n }\n\n /**\n * @docs-private\n */\n get maxWidth(): string {\n return this.width + 'px';\n }\n}\n","@if (src) {\n <iframe class=\"daff-youtube-player\"\n [style.aspectRatio]=\"_aspectRatio\"\n [src]=\"src\"\n [title]=\"title\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n}","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeUrl,\n} from '@angular/platform-browser';\n\n@Pipe({\n name: 'daffYoutubeSafe',\n})\nexport class DaffYoutubeSafePipe implements PipeTransform {\n constructor(private domSanitizer: DomSanitizer) {}\n transform(url: string): SafeUrl {\n return this.domSanitizer.bypassSecurityTrustResourceUrl(url);\n }\n}\n","import { DaffYoutubeSafePipe } from './safe-url.pipe';\nimport { DaffYoutubePlayerComponent } from './youtube-player.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_YOUTUBE_PLAYER_COMPONENTS = <const> [\n DaffYoutubePlayerComponent,\n DaffYoutubeSafePipe,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAYA,MAAM,gBAAgB,GAAG,CAAC,MAA2B,EAAE,IAAY,KAAI;IACrE,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE;AAC9E,QAAA,MAAM,IAAI,KAAK,CAAC,kDAAkD,IAAI,CAAA,WAAA,CAAa,CAAC;IACtF;AACF,CAAC;AAED,MAAM,kBAAkB,GAAG,CAAC,MAA2B,EAAE,KAAe,KAAI;IAC1E,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,IAAG;AACvC,QAAA,IA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,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,iBAAiB;AACxB,iBAAA;;;ACRD;;AAEG;AACI,MAAM,8BAA8B,GAAW;IACpD,0BAA0B;IAC1B,mBAAmB;;;ACRrB;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-design-youtube-player.mjs","names":[],"sources":["../../../libs/design/youtube-player/src/youtube-player.component.ts","../../../libs/design/youtube-player/src/youtube-player.component.html","../../../libs/design/youtube-player/src/safe-url.pipe.ts","../../../libs/design/youtube-player/src/youtube-player.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeStyle,\n SafeUrl,\n} from '@angular/platform-browser';\n\nconst validateInput = (prop: string) => <T>(value: T): T => {\n if (value === null || value === undefined || <unknown>value === '') {\n throw new Error(`DaffYoutubePlayerComponent must have a defined ${prop} attribute.`);\n }\n\n return value;\n};\n\n@Component({\n selector: 'daff-youtube-player',\n templateUrl: './youtube-player.component.html',\n styleUrl: './youtube-player.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.max-width]': 'width() + \"px\"',\n },\n})\nexport class DaffYoutubePlayerComponent {\n /**\n * The URL of the YouTube video.\n */\n src = input<SafeUrl>();\n\n /**\n * The title of the YouTube video.\n */\n title = input('');\n\n /**\n * The width of the player.\n */\n width = input.required<number, number>({ transform: validateInput('width') });\n\n /**\n * The height of the player.\n */\n height = input.required<number, number>({ transform: validateInput('height') });\n\n constructor(private sanitizer: DomSanitizer) {}\n\n /**\n * @docs-private\n */\n _aspectRatio = computed<SafeStyle>(\n () => this.sanitizer.bypassSecurityTrustStyle(\n this.width() + ' / ' + this.height(),\n ),\n );\n}\n","@if (src()) {\n <iframe class=\"daff-youtube-player\"\n [style.aspectRatio]=\"_aspectRatio()\"\n [src]=\"src()\"\n [title]=\"title()\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n}","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeUrl,\n} from '@angular/platform-browser';\n\n@Pipe({\n name: 'daffYoutubeSafe',\n})\nexport class DaffYoutubeSafePipe implements PipeTransform {\n constructor(private domSanitizer: DomSanitizer) {}\n transform(url: string): SafeUrl {\n return this.domSanitizer.bypassSecurityTrustResourceUrl(url);\n }\n}\n","import { DaffYoutubeSafePipe } from './safe-url.pipe';\nimport { DaffYoutubePlayerComponent } from './youtube-player.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_YOUTUBE_PLAYER_COMPONENTS = <const> [\n DaffYoutubePlayerComponent,\n DaffYoutubeSafePipe,\n];\n"],"mappings":";;;AAYA,MAAM,iBAAiB,UAAqB,UAAe;CACzD,IAAI,UAAU,QAAQ,UAAU,UAAsB,UAAU,IAC9D,MAAM,IAAI,MAAM,kDAAkD,KAAI,YAAa;CAGrF,OAAO;AACT;AAWA,IAAa,6BAAb,MAAa,2BAA0B;CAqBrC,YAAoB,WAAuB;EAAvB,KAAA,YAAA;EAjBpB,KAAA,MAAM,MAAgB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,MAAA,CAAA,+BAAA,CAAA,CAAA;EAKtB,KAAA,QAAQ,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAKjB,KAAA,QAAQ,MAAM,SAAQ;GAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;GAAmB,WAAW,cAAc,OAAO;EAAC,CAAA;EAK1E,KAAA,SAAS,MAAM,SAAQ;GAAA,GAAA,YAAA,EAAA,WAAA,SAAA,+BAAA,CAAA;GAAmB,WAAW,cAAc,QAAQ;EAAC,CAAA;EAO5E,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