{"version":3,"file":"tableau-ui-angular-utils.mjs","sources":["../../../projects/component-library/utils/src/utils.ts","../../../projects/component-library/utils/src/resize-watcher.directive.ts","../../../projects/component-library/utils/src/tableau-ui-utils.module.ts","../../../projects/component-library/utils/src/tableau-ui-angular-utils.ts"],"sourcesContent":["export function generateRandomString(length: number = 16): string {\n  const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n  let randomName = '';\n\n  for (let i = 0; i < length; i++) {\n    const randomIndex = Math.floor(Math.random() * characters.length);\n    randomName += characters.charAt(randomIndex);\n  }\n\n  return randomName;\n}\n","import type { OnDestroy } from '@angular/core';\nimport { Directive, ElementRef, inject, output } from '@angular/core';\n\n@Directive({\n  selector: '[resizeWatcher]',\n  standalone: false,\n})\nexport class ResizeWatcherDirective implements OnDestroy {\n  readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n  private readonly observer: ResizeObserver;\n\n  readonly resized = output<{ currentElement: ElementRef; entries: ResizeObserverEntry[] }>();\n  constructor() {\n    if (this.element.nativeElement === undefined) {\n      throw new Error('ResizeWatcherDirective: ElementRef is undefined');\n    }\n    this.observer = new ResizeObserver(entries => {\n      this.resized.emit({ currentElement: this.element, entries });\n    });\n    this.observer.observe(this.element.nativeElement);\n  }\n  ngOnDestroy(): void {\n    this.observer?.disconnect();\n  }\n}\n","import { NgModule } from '@angular/core';\nimport { ResizeWatcherDirective } from './resize-watcher.directive';\n\n@NgModule({\n  declarations: [ResizeWatcherDirective],\n  exports: [ResizeWatcherDirective],\n})\nexport class TableauUiUtilsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;AAAgB,SAAA,oBAAoB,CAAC,MAAA,GAAiB,EAAE,EAAA;IACtD,MAAM,UAAU,GAAG,gEAAgE;IACnF,IAAI,UAAU,GAAG,EAAE;AAEnB,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAA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