{"version":3,"file":"private.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/private/visually-hidden/visually-hidden.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/private/trusted-types.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/private/inner-html.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Component, ViewEncapsulation} from '@angular/core';\n\n/**\n * Component used to load the .cdk-visually-hidden styles.\n * @docs-private\n */\n@Component({\n  styleUrl: 'visually-hidden.css',\n  exportAs: 'cdkVisuallyHidden',\n  encapsulation: ViewEncapsulation.None,\n  template: '',\n})\nexport class _VisuallyHiddenLoader {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n// A module to facilitate use of a Trusted Types policy internally within\n// Angular Material. It lazily constructs the Trusted Types policy, providing\n// helper utilities for promoting strings to Trusted Types. When Trusted Types\n// are not available, strings are used as a fallback.\n// All use of this module is security-sensitive and should go through security review.\n\nexport interface TrustedHTML {\n  __brand__: 'TrustedHTML';\n}\n\ninterface TrustedTypePolicyFactory {\n  createPolicy(\n    policyName: string,\n    policyOptions: {\n      createHTML?: (input: string) => string;\n    },\n  ): TrustedTypePolicy;\n}\n\ninterface TrustedTypePolicy {\n  createHTML(input: string): TrustedHTML;\n}\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy: TrustedTypePolicy | null | undefined;\n\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy(): TrustedTypePolicy | null {\n  if (policy === undefined) {\n    policy = null;\n    if (typeof window !== 'undefined') {\n      const ttWindow = window as unknown as {trustedTypes?: TrustedTypePolicyFactory};\n      if (ttWindow.trustedTypes !== undefined) {\n        try {\n          policy = ttWindow.trustedTypes.createPolicy('angular#components', {\n            createHTML: (s: string) => s,\n          });\n        } catch (error) {\n          // createPolicy can throw if the name is already registered, or if\n          // window.trustedTypes was DOM-clobbered with an HTML element before\n          // Angular bootstrapped. trustedHTMLFromString falls back to plain\n          // strings — sanitization in _setInnerHtml still runs.\n          console.error(error);\n        }\n      }\n    }\n  }\n  return policy;\n}\n\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n *\n * Important!!! This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nexport function trustedHTMLFromString(html: string): TrustedHTML {\n  return getPolicy()?.createHTML(html) || (html as unknown as TrustedHTML);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {SecurityContext} from '@angular/core';\nimport {DomSanitizer, SafeHtml} from '@angular/platform-browser';\nimport {trustedHTMLFromString} from './trusted-types';\n\n// !!!Note!!! this file isn't synced into g3, but is replaced with a version that uses\n// internal-specific APIs. The internal version may have to be updated if the signature of\n// the function changes.\n\n/** Sanitizes and sets the `innerHTML` of an element. */\nexport function _setInnerHtml(element: HTMLElement, html: SafeHtml, sanitizer: DomSanitizer): void {\n  const cleanHtml = sanitizer.sanitize(SecurityContext.HTML, html);\n\n  if (cleanHtml === null && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n    throw new Error(`Could not sanitize HTML: ${html}`);\n  }\n\n  element.innerHTML = trustedHTMLFromString(cleanHtml || '') as unknown as string;\n}\n"],"names":[],"mappings":";;;;MAoBa,qBAAqB,CAAA;;;;;UAArB,qBAAqB;AAAA,IAAA,IAAA,EAAA,EAAA;AAAA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