tfcconnection/.shadow-cljs/builds/app/dev/goog-js/goog.dom.safe.js

1 line
93 KiB
JavaScript

["^ ","~:resource-id",["~:shadow.build.classpath/resource","goog/dom/safe.js"],"~:js","goog.provide(\"goog.dom.safe\");\ngoog.provide(\"goog.dom.safe.InsertAdjacentHtmlPosition\");\ngoog.require(\"goog.asserts\");\ngoog.require(\"goog.asserts.dom\");\ngoog.require(\"goog.dom.asserts\");\ngoog.require(\"goog.functions\");\ngoog.require(\"goog.html.SafeHtml\");\ngoog.require(\"goog.html.SafeScript\");\ngoog.require(\"goog.html.SafeStyle\");\ngoog.require(\"goog.html.SafeUrl\");\ngoog.require(\"goog.html.TrustedResourceUrl\");\ngoog.require(\"goog.html.uncheckedconversions\");\ngoog.require(\"goog.string.Const\");\ngoog.require(\"goog.string.internal\");\ngoog.dom.safe.InsertAdjacentHtmlPosition = {AFTERBEGIN:\"afterbegin\", AFTEREND:\"afterend\", BEFOREBEGIN:\"beforebegin\", BEFOREEND:\"beforeend\"};\ngoog.dom.safe.insertAdjacentHtml = function(node, position, html) {\n node.insertAdjacentHTML(position, goog.html.SafeHtml.unwrapTrustedHTML(html));\n};\ngoog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_ = {\"MATH\":true, \"SCRIPT\":true, \"STYLE\":true, \"SVG\":true, \"TEMPLATE\":true};\ngoog.dom.safe.isInnerHtmlCleanupRecursive_ = goog.functions.cacheReturnValue(function() {\n if (goog.DEBUG && typeof document === \"undefined\") {\n return false;\n }\n var div = document.createElement(\"div\");\n var childDiv = document.createElement(\"div\");\n childDiv.appendChild(document.createElement(\"div\"));\n div.appendChild(childDiv);\n if (goog.DEBUG && !div.firstChild) {\n return false;\n }\n var innerChild = div.firstChild.firstChild;\n div.innerHTML = goog.html.SafeHtml.unwrapTrustedHTML(goog.html.SafeHtml.EMPTY);\n return !innerChild.parentElement;\n});\ngoog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse = function(elem, html) {\n if (goog.dom.safe.isInnerHtmlCleanupRecursive_()) {\n while (elem.lastChild) {\n elem.removeChild(elem.lastChild);\n }\n }\n elem.innerHTML = goog.html.SafeHtml.unwrapTrustedHTML(html);\n};\ngoog.dom.safe.setInnerHtml = function(elem, html) {\n if (goog.asserts.ENABLE_ASSERTS && elem.tagName) {\n var tagName = elem.tagName.toUpperCase();\n if (goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[tagName]) {\n throw new Error(\"goog.dom.safe.setInnerHtml cannot be used to set content of \" + elem.tagName + \".\");\n }\n }\n goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(elem, html);\n};\ngoog.dom.safe.setInnerHtmlFromConstant = function(element, constHtml) {\n goog.dom.safe.setInnerHtml(element, goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from(\"Constant HTML to be immediatelly used.\"), goog.string.Const.unwrap(constHtml)));\n};\ngoog.dom.safe.setOuterHtml = function(elem, html) {\n elem.outerHTML = goog.html.SafeHtml.unwrapTrustedHTML(html);\n};\ngoog.dom.safe.setFormElementAction = function(form, url) {\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n goog.asserts.dom.assertIsHtmlFormElement(form).action = goog.html.SafeUrl.unwrap(safeUrl);\n};\ngoog.dom.safe.setButtonFormAction = function(button, url) {\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n goog.asserts.dom.assertIsHtmlButtonElement(button).formAction = goog.html.SafeUrl.unwrap(safeUrl);\n};\ngoog.dom.safe.setInputFormAction = function(input, url) {\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n goog.asserts.dom.assertIsHtmlInputElement(input).formAction = goog.html.SafeUrl.unwrap(safeUrl);\n};\ngoog.dom.safe.setStyle = function(elem, style) {\n elem.style.cssText = goog.html.SafeStyle.unwrap(style);\n};\ngoog.dom.safe.documentWrite = function(doc, html) {\n doc.write(goog.html.SafeHtml.unwrapTrustedHTML(html));\n};\ngoog.dom.safe.setAnchorHref = function(anchor, url) {\n goog.asserts.dom.assertIsHtmlAnchorElement(anchor);\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n anchor.href = goog.html.SafeUrl.unwrap(safeUrl);\n};\ngoog.dom.safe.setAudioSrc = function(audioElement, url) {\n goog.asserts.dom.assertIsHtmlAudioElement(audioElement);\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n audioElement.src = goog.html.SafeUrl.unwrap(safeUrl);\n};\ngoog.dom.safe.setVideoSrc = function(videoElement, url) {\n goog.asserts.dom.assertIsHtmlVideoElement(videoElement);\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n videoElement.src = goog.html.SafeUrl.unwrap(safeUrl);\n};\ngoog.dom.safe.setEmbedSrc = function(embed, url) {\n goog.asserts.dom.assertIsHtmlEmbedElement(embed);\n embed.src = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(url);\n};\ngoog.dom.safe.setFrameSrc = function(frame, url) {\n goog.asserts.dom.assertIsHtmlFrameElement(frame);\n frame.src = goog.html.TrustedResourceUrl.unwrap(url);\n};\ngoog.dom.safe.setIframeSrc = function(iframe, url) {\n goog.asserts.dom.assertIsHtmlIFrameElement(iframe);\n iframe.src = goog.html.TrustedResourceUrl.unwrap(url);\n};\ngoog.dom.safe.setIframeSrcdoc = function(iframe, html) {\n goog.asserts.dom.assertIsHtmlIFrameElement(iframe);\n iframe.srcdoc = goog.html.SafeHtml.unwrapTrustedHTML(html);\n};\ngoog.dom.safe.setLinkHrefAndRel = function(link, url, rel) {\n goog.asserts.dom.assertIsHtmlLinkElement(link);\n link.rel = rel;\n if (goog.string.internal.caseInsensitiveContains(rel, \"stylesheet\")) {\n goog.asserts.assert(url instanceof goog.html.TrustedResourceUrl, 'URL must be TrustedResourceUrl because \"rel\" contains \"stylesheet\"');\n link.href = goog.html.TrustedResourceUrl.unwrap(url);\n const win = link.ownerDocument && link.ownerDocument.defaultView;\n const nonce = goog.dom.safe.getStyleNonce(win);\n if (nonce) {\n link.setAttribute(\"nonce\", nonce);\n }\n } else if (url instanceof goog.html.TrustedResourceUrl) {\n link.href = goog.html.TrustedResourceUrl.unwrap(url);\n } else if (url instanceof goog.html.SafeUrl) {\n link.href = goog.html.SafeUrl.unwrap(url);\n } else {\n link.href = goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url));\n }\n};\ngoog.dom.safe.setObjectData = function(object, url) {\n goog.asserts.dom.assertIsHtmlObjectElement(object);\n object.data = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(url);\n};\ngoog.dom.safe.setScriptSrc = function(script, url) {\n goog.asserts.dom.assertIsHtmlScriptElement(script);\n goog.dom.safe.setNonceForScriptElement_(script);\n script.src = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(url);\n};\ngoog.dom.safe.setScriptContent = function(script, content) {\n goog.asserts.dom.assertIsHtmlScriptElement(script);\n goog.dom.safe.setNonceForScriptElement_(script);\n script.textContent = goog.html.SafeScript.unwrapTrustedScript(content);\n};\ngoog.dom.safe.setNonceForScriptElement_ = function(script) {\n var win = script.ownerDocument && script.ownerDocument.defaultView;\n const nonce = goog.dom.safe.getScriptNonce(win);\n if (nonce) {\n script.setAttribute(\"nonce\", nonce);\n }\n};\ngoog.dom.safe.setLocationHref = function(loc, url) {\n goog.dom.asserts.assertIsLocation(loc);\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n loc.href = goog.html.SafeUrl.unwrap(safeUrl);\n};\ngoog.dom.safe.assignLocation = function(loc, url) {\n goog.dom.asserts.assertIsLocation(loc);\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n loc.assign(goog.html.SafeUrl.unwrap(safeUrl));\n};\ngoog.dom.safe.replaceLocation = function(loc, url) {\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n loc.replace(goog.html.SafeUrl.unwrap(safeUrl));\n};\ngoog.dom.safe.openInWindow = function(url, opt_openerWin, opt_name, opt_specs) {\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n var win = opt_openerWin || goog.global;\n var name = opt_name instanceof goog.string.Const ? goog.string.Const.unwrap(opt_name) : opt_name || \"\";\n if (opt_specs !== undefined) {\n return win.open(goog.html.SafeUrl.unwrap(safeUrl), name, opt_specs);\n } else {\n return win.open(goog.html.SafeUrl.unwrap(safeUrl), name);\n }\n};\ngoog.dom.safe.parseFromStringHtml = function(parser, html) {\n return goog.dom.safe.parseFromString(parser, html, \"text/html\");\n};\ngoog.dom.safe.parseFromString = function(parser, content, type) {\n return parser.parseFromString(goog.html.SafeHtml.unwrapTrustedHTML(content), type);\n};\ngoog.dom.safe.createImageFromBlob = function(blob) {\n if (!/^image\\/.*/g.test(blob.type)) {\n throw new Error(\"goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.\");\n }\n var objectUrl = goog.global.URL.createObjectURL(blob);\n var image = new goog.global.Image();\n image.onload = function() {\n goog.global.URL.revokeObjectURL(objectUrl);\n };\n image.src = objectUrl;\n return image;\n};\ngoog.dom.safe.createContextualFragment = function(range, html) {\n return range.createContextualFragment(goog.html.SafeHtml.unwrapTrustedHTML(html));\n};\ngoog.dom.safe.getScriptNonce = function(opt_window) {\n return goog.dom.safe.getNonce_(\"script[nonce]\", opt_window);\n};\ngoog.dom.safe.getStyleNonce = function(opt_window) {\n return goog.dom.safe.getNonce_('style[nonce],link[rel\\x3d\"stylesheet\"][nonce]', opt_window);\n};\ngoog.dom.safe.NONCE_PATTERN_ = /^[\\w+/_-]+[=]{0,2}$/;\ngoog.dom.safe.getNonce_ = function(selector, win) {\n const doc = (win || goog.global).document;\n if (!doc.querySelector) {\n return \"\";\n }\n let el = doc.querySelector(selector);\n if (el) {\n const nonce = el[\"nonce\"] || el.getAttribute(\"nonce\");\n if (nonce && goog.dom.safe.NONCE_PATTERN_.test(nonce)) {\n return nonce;\n }\n }\n return \"\";\n};\n","~:source","/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Type-safe wrappers for unsafe DOM APIs.\n *\n * This file provides type-safe wrappers for DOM APIs that can result in\n * cross-site scripting (XSS) vulnerabilities, if the API is supplied with\n * untrusted (attacker-controlled) input. Instead of plain strings, the type\n * safe wrappers consume values of types from the goog.html package whose\n * contract promises that values are safe to use in the corresponding context.\n *\n * Hence, a program that exclusively uses the wrappers in this file (i.e., whose\n * only reference to security-sensitive raw DOM APIs are in this file) is\n * guaranteed to be free of XSS due to incorrect use of such DOM APIs (modulo\n * correctness of code that produces values of the respective goog.html types,\n * and absent code that violates type safety).\n *\n * For example, assigning to an element's .innerHTML property a string that is\n * derived (even partially) from untrusted input typically results in an XSS\n * vulnerability. The type-safe wrapper goog.dom.safe.setInnerHtml consumes a\n * value of type goog.html.SafeHtml, whose contract states that using its values\n * in a HTML context will not result in XSS. Hence a program that is free of\n * direct assignments to any element's innerHTML property (with the exception of\n * the assignment to .innerHTML in this file) is guaranteed to be free of XSS\n * due to assignment of untrusted strings to the innerHTML property.\n */\n\ngoog.provide('goog.dom.safe');\ngoog.provide('goog.dom.safe.InsertAdjacentHtmlPosition');\n\ngoog.require('goog.asserts');\ngoog.require('goog.asserts.dom');\ngoog.require('goog.dom.asserts');\ngoog.require('goog.functions');\ngoog.require('goog.html.SafeHtml');\ngoog.require('goog.html.SafeScript');\ngoog.require('goog.html.SafeStyle');\ngoog.require('goog.html.SafeUrl');\ngoog.require('goog.html.TrustedResourceUrl');\ngoog.require('goog.html.uncheckedconversions');\ngoog.require('goog.string.Const');\ngoog.require('goog.string.internal');\n\n\n/** @enum {string} */\ngoog.dom.safe.InsertAdjacentHtmlPosition = {\n AFTERBEGIN: 'afterbegin',\n AFTEREND: 'afterend',\n BEFOREBEGIN: 'beforebegin',\n BEFOREEND: 'beforeend'\n};\n\n\n/**\n * Inserts known-safe HTML into a Node, at the specified position.\n * @param {!Node} node The node on which to call insertAdjacentHTML.\n * @param {!goog.dom.safe.InsertAdjacentHtmlPosition} position Position where\n * to insert the HTML.\n * @param {!goog.html.SafeHtml} html The known-safe HTML to insert.\n */\ngoog.dom.safe.insertAdjacentHtml = function(node, position, html) {\n 'use strict';\n node.insertAdjacentHTML(position, goog.html.SafeHtml.unwrapTrustedHTML(html));\n};\n\n\n/**\n * Tags not allowed in goog.dom.safe.setInnerHtml.\n * @private @const {!Object<string, boolean>}\n */\ngoog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_ = {\n 'MATH': true,\n 'SCRIPT': true,\n 'STYLE': true,\n 'SVG': true,\n 'TEMPLATE': true\n};\n\n\n/**\n * Whether assigning to innerHTML results in a non-spec-compliant clean-up. Used\n * to define goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse.\n *\n * <p>As mentioned in https://stackoverflow.com/questions/28741528, re-rendering\n * an element in IE by setting innerHTML causes IE to recursively disconnect all\n * parent/children connections that were in the previous contents of the\n * element. Unfortunately, this can unexpectedly result in confusing cases where\n * a function is run (typically asynchronously) on element that has since\n * disconnected from the DOM but assumes the presence of its children. A simple\n * workaround is to remove all children first. Testing on IE11 via\n * https://jsperf.com/innerhtml-vs-removechild/239, removeChild seems to be\n * ~10x faster than innerHTML='' for a large number of children (perhaps due\n * to the latter's recursive behavior), implying that this workaround would\n * not hurt performance and might actually improve it.\n * @return {boolean}\n * @private\n */\ngoog.dom.safe.isInnerHtmlCleanupRecursive_ =\n goog.functions.cacheReturnValue(function() {\n 'use strict';\n // `document` missing in some test frameworks.\n if (goog.DEBUG && typeof document === 'undefined') {\n return false;\n }\n // Create 3 nested <div>s without using innerHTML.\n // We're not chaining the appendChilds in one call, as this breaks\n // in a DocumentFragment.\n var div = document.createElement('div');\n var childDiv = document.createElement('div');\n childDiv.appendChild(document.createElement('div'));\n div.appendChild(childDiv);\n // `firstChild` is null in Google Js Test.\n if (goog.DEBUG && !div.firstChild) {\n return false;\n }\n var innerChild = div.firstChild.firstChild;\n div.innerHTML =\n goog.html.SafeHtml.unwrapTrustedHTML(goog.html.SafeHtml.EMPTY);\n return !innerChild.parentElement;\n });\n\n\n/**\n * Assigns HTML to an element's innerHTML property. Helper to use only here and\n * in soy.js.\n * @param {?Element|?ShadowRoot} elem The element whose innerHTML is to be\n * assigned to.\n * @param {!goog.html.SafeHtml} html\n */\ngoog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse = function(elem, html) {\n 'use strict';\n // See comment above goog.dom.safe.isInnerHtmlCleanupRecursive_.\n if (goog.dom.safe.isInnerHtmlCleanupRecursive_()) {\n while (elem.lastChild) {\n elem.removeChild(elem.lastChild);\n }\n }\n elem.innerHTML = goog.html.SafeHtml.unwrapTrustedHTML(html);\n};\n\n\n/**\n * Assigns known-safe HTML to an element's innerHTML property.\n * @param {!Element|!ShadowRoot} elem The element whose innerHTML is to be\n * assigned to.\n * @param {!goog.html.SafeHtml} html The known-safe HTML to assign.\n * @throws {Error} If called with one of these tags: math, script, style, svg,\n * template.\n */\ngoog.dom.safe.setInnerHtml = function(elem, html) {\n 'use strict';\n if (goog.asserts.ENABLE_ASSERTS && /** @type {?} */ (elem).tagName) {\n var tagName = /** @type {!Element} */ (elem).tagName.toUpperCase();\n if (goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[tagName]) {\n throw new Error(\n 'goog.dom.safe.setInnerHtml cannot be used to set content of ' +\n /** @type {!Element} */ (elem).tagName + '.');\n }\n }\n\n goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(elem, html);\n};\n\n\n/**\n * Assigns constant HTML to an element's innerHTML property.\n * @param {!Element} element The element whose innerHTML is to be assigned to.\n * @param {!goog.string.Const} constHtml The known-safe HTML to assign.\n * @throws {!Error} If called with one of these tags: math, script, style, svg,\n * template.\n */\ngoog.dom.safe.setInnerHtmlFromConstant = function(element, constHtml) {\n 'use strict';\n goog.dom.safe.setInnerHtml(\n element,\n goog.html.uncheckedconversions\n .safeHtmlFromStringKnownToSatisfyTypeContract(\n goog.string.Const.from('Constant HTML to be immediatelly used.'),\n goog.string.Const.unwrap(constHtml)));\n};\n\n\n/**\n * Assigns known-safe HTML to an element's outerHTML property.\n * @param {!Element} elem The element whose outerHTML is to be assigned to.\n * @param {!goog.html.SafeHtml} html The known-safe HTML to assign.\n */\ngoog.dom.safe.setOuterHtml = function(elem, html) {\n 'use strict';\n elem.outerHTML = goog.html.SafeHtml.unwrapTrustedHTML(html);\n};\n\n\n/**\n * Safely assigns a URL a form element's action property.\n *\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\n * form's action property. If url is of type string however, it is first\n * sanitized using goog.html.SafeUrl.sanitize.\n *\n * Example usage:\n * goog.dom.safe.setFormElementAction(formEl, url);\n * which is a safe alternative to\n * formEl.action = url;\n * The latter can result in XSS vulnerabilities if url is a\n * user-/attacker-controlled value.\n *\n * @param {!Element} form The form element whose action property\n * is to be assigned to.\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\n * @return {void}\n * @see goog.html.SafeUrl#sanitize\n */\ngoog.dom.safe.setFormElementAction = function(form, url) {\n 'use strict';\n /** @type {!goog.html.SafeUrl} */\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n goog.asserts.dom.assertIsHtmlFormElement(form).action =\n goog.html.SafeUrl.unwrap(safeUrl);\n};\n\n/**\n * Safely assigns a URL to a button element's formaction property.\n *\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\n * button's formaction property. If url is of type string however, it is first\n * sanitized using goog.html.SafeUrl.sanitize.\n *\n * Example usage:\n * goog.dom.safe.setButtonFormAction(buttonEl, url);\n * which is a safe alternative to\n * buttonEl.action = url;\n * The latter can result in XSS vulnerabilities if url is a\n * user-/attacker-controlled value.\n *\n * @param {!Element} button The button element whose action property\n * is to be assigned to.\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\n * @return {void}\n * @see goog.html.SafeUrl#sanitize\n */\ngoog.dom.safe.setButtonFormAction = function(button, url) {\n 'use strict';\n /** @type {!goog.html.SafeUrl} */\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n goog.asserts.dom.assertIsHtmlButtonElement(button).formAction =\n goog.html.SafeUrl.unwrap(safeUrl);\n};\n/**\n * Safely assigns a URL to an input element's formaction property.\n *\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\n * input's formaction property. If url is of type string however, it is first\n * sanitized using goog.html.SafeUrl.sanitize.\n *\n * Example usage:\n * goog.dom.safe.setInputFormAction(inputEl, url);\n * which is a safe alternative to\n * inputEl.action = url;\n * The latter can result in XSS vulnerabilities if url is a\n * user-/attacker-controlled value.\n *\n * @param {!Element} input The input element whose action property\n * is to be assigned to.\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\n * @return {void}\n * @see goog.html.SafeUrl#sanitize\n */\ngoog.dom.safe.setInputFormAction = function(input, url) {\n 'use strict';\n /** @type {!goog.html.SafeUrl} */\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n goog.asserts.dom.assertIsHtmlInputElement(input).formAction =\n goog.html.SafeUrl.unwrap(safeUrl);\n};\n\n/**\n * Sets the given element's style property to the contents of the provided\n * SafeStyle object.\n * @param {!Element} elem\n * @param {!goog.html.SafeStyle} style\n * @return {void}\n */\ngoog.dom.safe.setStyle = function(elem, style) {\n 'use strict';\n elem.style.cssText = goog.html.SafeStyle.unwrap(style);\n};\n\n\n/**\n * Writes known-safe HTML to a document.\n * @param {!Document} doc The document to be written to.\n * @param {!goog.html.SafeHtml} html The known-safe HTML to assign.\n * @return {void}\n */\ngoog.dom.safe.documentWrite = function(doc, html) {\n 'use strict';\n doc.write(goog.html.SafeHtml.unwrapTrustedHTML(html));\n};\n\n\n/**\n * Safely assigns a URL to an anchor element's href property.\n *\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\n * anchor's href property. If url is of type string however, it is first\n * sanitized using goog.html.SafeUrl.sanitize.\n *\n * Example usage:\n * goog.dom.safe.setAnchorHref(anchorEl, url);\n * which is a safe alternative to\n * anchorEl.href = url;\n * The latter can result in XSS vulnerabilities if url is a\n * user-/attacker-controlled value.\n *\n * @param {!HTMLAnchorElement} anchor The anchor element whose href property\n * is to be assigned to.\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\n * @return {void}\n * @see goog.html.SafeUrl#sanitize\n */\ngoog.dom.safe.setAnchorHref = function(anchor, url) {\n 'use strict';\n goog.asserts.dom.assertIsHtmlAnchorElement(anchor);\n /** @type {!goog.html.SafeUrl} */\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n anchor.href = goog.html.SafeUrl.unwrap(safeUrl);\n};\n\n\n/**\n * Safely assigns a URL to a audio element's src property.\n *\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\n * audio's src property. If url is of type string however, it is first\n * sanitized using goog.html.SafeUrl.sanitize.\n *\n * @param {!HTMLAudioElement} audioElement The audio element whose src property\n * is to be assigned to.\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\n * @return {void}\n * @see goog.html.SafeUrl#sanitize\n */\ngoog.dom.safe.setAudioSrc = function(audioElement, url) {\n 'use strict';\n goog.asserts.dom.assertIsHtmlAudioElement(audioElement);\n /** @type {!goog.html.SafeUrl} */\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n audioElement.src = goog.html.SafeUrl.unwrap(safeUrl);\n};\n\n/**\n * Safely assigns a URL to a video element's src property.\n *\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\n * video's src property. If url is of type string however, it is first\n * sanitized using goog.html.SafeUrl.sanitize.\n *\n * @param {!HTMLVideoElement} videoElement The video element whose src property\n * is to be assigned to.\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\n * @return {void}\n * @see goog.html.SafeUrl#sanitize\n */\ngoog.dom.safe.setVideoSrc = function(videoElement, url) {\n 'use strict';\n goog.asserts.dom.assertIsHtmlVideoElement(videoElement);\n /** @type {!goog.html.SafeUrl} */\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n videoElement.src = goog.html.SafeUrl.unwrap(safeUrl);\n};\n\n/**\n * Safely assigns a URL to an embed element's src property.\n *\n * Example usage:\n * goog.dom.safe.setEmbedSrc(embedEl, url);\n * which is a safe alternative to\n * embedEl.src = url;\n * The latter can result in loading untrusted code unless it is ensured that\n * the URL refers to a trustworthy resource.\n *\n * @param {!HTMLEmbedElement} embed The embed element whose src property\n * is to be assigned to.\n * @param {!goog.html.TrustedResourceUrl} url The URL to assign.\n */\ngoog.dom.safe.setEmbedSrc = function(embed, url) {\n 'use strict';\n goog.asserts.dom.assertIsHtmlEmbedElement(embed);\n embed.src = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(url);\n};\n\n\n/**\n * Safely assigns a URL to a frame element's src property.\n *\n * Example usage:\n * goog.dom.safe.setFrameSrc(frameEl, url);\n * which is a safe alternative to\n * frameEl.src = url;\n * The latter can result in loading untrusted code unless it is ensured that\n * the URL refers to a trustworthy resource.\n *\n * @param {!HTMLFrameElement} frame The frame element whose src property\n * is to be assigned to.\n * @param {!goog.html.TrustedResourceUrl} url The URL to assign.\n * @return {void}\n */\ngoog.dom.safe.setFrameSrc = function(frame, url) {\n 'use strict';\n goog.asserts.dom.assertIsHtmlFrameElement(frame);\n frame.src = goog.html.TrustedResourceUrl.unwrap(url);\n};\n\n\n/**\n * Safely assigns a URL to an iframe element's src property.\n *\n * Example usage:\n * goog.dom.safe.setIframeSrc(iframeEl, url);\n * which is a safe alternative to\n * iframeEl.src = url;\n * The latter can result in loading untrusted code unless it is ensured that\n * the URL refers to a trustworthy resource.\n *\n * @param {!HTMLIFrameElement} iframe The iframe element whose src property\n * is to be assigned to.\n * @param {!goog.html.TrustedResourceUrl} url The URL to assign.\n * @return {void}\n */\ngoog.dom.safe.setIframeSrc = function(iframe, url) {\n 'use strict';\n goog.asserts.dom.assertIsHtmlIFrameElement(iframe);\n iframe.src = goog.html.TrustedResourceUrl.unwrap(url);\n};\n\n\n/**\n * Safely assigns HTML to an iframe element's srcdoc property.\n *\n * Example usage:\n * goog.dom.safe.setIframeSrcdoc(iframeEl, safeHtml);\n * which is a safe alternative to\n * iframeEl.srcdoc = html;\n * The latter can result in loading untrusted code.\n *\n * @param {!HTMLIFrameElement} iframe The iframe element whose srcdoc property\n * is to be assigned to.\n * @param {!goog.html.SafeHtml} html The HTML to assign.\n * @return {void}\n */\ngoog.dom.safe.setIframeSrcdoc = function(iframe, html) {\n 'use strict';\n goog.asserts.dom.assertIsHtmlIFrameElement(iframe);\n iframe.srcdoc = goog.html.SafeHtml.unwrapTrustedHTML(html);\n};\n\n\n/**\n * Safely sets a link element's href and rel properties. Whether or not\n * the URL assigned to href has to be a goog.html.TrustedResourceUrl\n * depends on the value of the rel property. If rel contains \"stylesheet\"\n * then a TrustedResourceUrl is required.\n *\n * Example usage:\n * goog.dom.safe.setLinkHrefAndRel(linkEl, url, 'stylesheet');\n * which is a safe alternative to\n * linkEl.rel = 'stylesheet';\n * linkEl.href = url;\n * The latter can result in loading untrusted code unless it is ensured that\n * the URL refers to a trustworthy resource.\n *\n * @param {!HTMLLinkElement} link The link element whose href property\n * is to be assigned to.\n * @param {string|!goog.html.SafeUrl|!goog.html.TrustedResourceUrl} url The URL\n * to assign to the href property. Must be a TrustedResourceUrl if the\n * value assigned to rel contains \"stylesheet\". A string value is\n * sanitized with goog.html.SafeUrl.sanitize.\n * @param {string} rel The value to assign to the rel property.\n * @return {void}\n * @throws {Error} if rel contains \"stylesheet\" and url is not a\n * TrustedResourceUrl\n * @see goog.html.SafeUrl#sanitize\n */\ngoog.dom.safe.setLinkHrefAndRel = function(link, url, rel) {\n 'use strict';\n goog.asserts.dom.assertIsHtmlLinkElement(link);\n link.rel = rel;\n if (goog.string.internal.caseInsensitiveContains(rel, 'stylesheet')) {\n goog.asserts.assert(\n url instanceof goog.html.TrustedResourceUrl,\n 'URL must be TrustedResourceUrl because \"rel\" contains \"stylesheet\"');\n link.href = goog.html.TrustedResourceUrl.unwrap(url);\n const win = link.ownerDocument && link.ownerDocument.defaultView;\n const nonce = goog.dom.safe.getStyleNonce(win);\n if (nonce) {\n link.setAttribute('nonce', nonce);\n }\n } else if (url instanceof goog.html.TrustedResourceUrl) {\n link.href = goog.html.TrustedResourceUrl.unwrap(url);\n } else if (url instanceof goog.html.SafeUrl) {\n link.href = goog.html.SafeUrl.unwrap(url);\n } else { // string\n // SafeUrl.sanitize must return legitimate SafeUrl when passed a string.\n link.href = goog.html.SafeUrl.unwrap(\n goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url));\n }\n};\n\n\n/**\n * Safely assigns a URL to an object element's data property.\n *\n * Example usage:\n * goog.dom.safe.setObjectData(objectEl, url);\n * which is a safe alternative to\n * objectEl.data = url;\n * The latter can result in loading untrusted code unless setit is ensured that\n * the URL refers to a trustworthy resource.\n *\n * @param {!HTMLObjectElement} object The object element whose data property\n * is to be assigned to.\n * @param {!goog.html.TrustedResourceUrl} url The URL to assign.\n * @return {void}\n */\ngoog.dom.safe.setObjectData = function(object, url) {\n 'use strict';\n goog.asserts.dom.assertIsHtmlObjectElement(object);\n object.data = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(url);\n};\n\n\n/**\n * Safely assigns a URL to a script element's src property.\n *\n * Example usage:\n * goog.dom.safe.setScriptSrc(scriptEl, url);\n * which is a safe alternative to\n * scriptEl.src = url;\n * The latter can result in loading untrusted code unless it is ensured that\n * the URL refers to a trustworthy resource.\n *\n * @param {!HTMLScriptElement} script The script element whose src property\n * is to be assigned to.\n * @param {!goog.html.TrustedResourceUrl} url The URL to assign.\n * @return {void}\n */\ngoog.dom.safe.setScriptSrc = function(script, url) {\n 'use strict';\n goog.asserts.dom.assertIsHtmlScriptElement(script);\n goog.dom.safe.setNonceForScriptElement_(script);\n script.src = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(url);\n};\n\n\n/**\n * Safely assigns a value to a script element's content.\n *\n * Example usage:\n * goog.dom.safe.setScriptContent(scriptEl, content);\n * which is a safe alternative to\n * scriptEl.text = content;\n * The latter can result in executing untrusted code unless it is ensured that\n * the code is loaded from a trustworthy resource.\n *\n * @param {!HTMLScriptElement} script The script element whose content is being\n * set.\n * @param {!goog.html.SafeScript} content The content to assign.\n * @return {void}\n */\ngoog.dom.safe.setScriptContent = function(script, content) {\n 'use strict';\n goog.asserts.dom.assertIsHtmlScriptElement(script);\n goog.dom.safe.setNonceForScriptElement_(script);\n script.textContent = goog.html.SafeScript.unwrapTrustedScript(content);\n};\n\n\n/**\n * Set nonce-based CSPs to dynamically created scripts.\n * @param {!HTMLScriptElement} script The script element whose nonce value\n * is to be calculated\n * @private\n */\ngoog.dom.safe.setNonceForScriptElement_ = function(script) {\n 'use strict';\n var win = script.ownerDocument && script.ownerDocument.defaultView;\n const nonce = goog.dom.safe.getScriptNonce(win);\n if (nonce) {\n script.setAttribute('nonce', nonce);\n }\n};\n\n\n/**\n * Safely assigns a URL to a Location object's href property.\n *\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\n * loc's href property. If url is of type string however, it is first sanitized\n * using goog.html.SafeUrl.sanitize.\n *\n * Example usage:\n * goog.dom.safe.setLocationHref(document.location, redirectUrl);\n * which is a safe alternative to\n * document.location.href = redirectUrl;\n * The latter can result in XSS vulnerabilities if redirectUrl is a\n * user-/attacker-controlled value.\n *\n * @param {!Location} loc The Location object whose href property is to be\n * assigned to.\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\n * @return {void}\n * @see goog.html.SafeUrl#sanitize\n\n */\ngoog.dom.safe.setLocationHref = function(loc, url) {\n 'use strict';\n goog.dom.asserts.assertIsLocation(loc);\n /** @type {!goog.html.SafeUrl} */\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n loc.href = goog.html.SafeUrl.unwrap(safeUrl);\n};\n\n/**\n * Safely assigns the URL of a Location object.\n *\n * If url is of type goog.html.SafeUrl, its value is unwrapped and\n * passed to Location#assign. If url is of type string however, it is\n * first sanitized using goog.html.SafeUrl.sanitize.\n *\n * Example usage:\n * goog.dom.safe.assignLocation(document.location, newUrl);\n * which is a safe alternative to\n * document.location.assign(newUrl);\n * The latter can result in XSS vulnerabilities if newUrl is a\n * user-/attacker-controlled value.\n *\n * This has the same behaviour as setLocationHref, however some test\n * mock Location.assign instead of a property assignment.\n *\n * @param {!Location} loc The Location object which is to be assigned.\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\n * @return {void}\n * @see goog.html.SafeUrl#sanitize\n */\ngoog.dom.safe.assignLocation = function(loc, url) {\n 'use strict';\n goog.dom.asserts.assertIsLocation(loc);\n /** @type {!goog.html.SafeUrl} */\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n loc.assign(goog.html.SafeUrl.unwrap(safeUrl));\n};\n\n\n/**\n * Safely replaces the URL of a Location object.\n *\n * If url is of type goog.html.SafeUrl, its value is unwrapped and\n * passed to Location#replace. If url is of type string however, it is\n * first sanitized using goog.html.SafeUrl.sanitize.\n *\n * Example usage:\n * goog.dom.safe.replaceLocation(document.location, newUrl);\n * which is a safe alternative to\n * document.location.replace(newUrl);\n * The latter can result in XSS vulnerabilities if newUrl is a\n * user-/attacker-controlled value.\n *\n * @param {!Location} loc The Location object which is to be replaced.\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\n * @return {void}\n * @see goog.html.SafeUrl#sanitize\n */\ngoog.dom.safe.replaceLocation = function(loc, url) {\n 'use strict';\n /** @type {!goog.html.SafeUrl} */\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n loc.replace(goog.html.SafeUrl.unwrap(safeUrl));\n};\n\n\n/**\n * Safely opens a URL in a new window (via window.open).\n *\n * If url is of type goog.html.SafeUrl, its value is unwrapped and passed in to\n * window.open. If url is of type string however, it is first sanitized\n * using goog.html.SafeUrl.sanitize.\n *\n * Note that this function does not prevent leakages via the referer that is\n * sent by window.open. It is advised to only use this to open 1st party URLs.\n *\n * Example usage:\n * goog.dom.safe.openInWindow(url);\n * which is a safe alternative to\n * window.open(url);\n * The latter can result in XSS vulnerabilities if url is a\n * user-/attacker-controlled value.\n *\n * @param {string|!goog.html.SafeUrl} url The URL to open.\n * @param {Window=} opt_openerWin Window of which to call the .open() method.\n * Defaults to the global window.\n * @param {!goog.string.Const|string=} opt_name Name of the window to open in.\n * Can be _top, etc as allowed by window.open(). This accepts string for\n * legacy reasons. Pass goog.string.Const if possible.\n * @param {string=} opt_specs Comma-separated list of specifications, same as\n * in window.open().\n * @return {Window} Window the url was opened in.\n */\ngoog.dom.safe.openInWindow = function(url, opt_openerWin, opt_name, opt_specs) {\n 'use strict';\n /** @type {!goog.html.SafeUrl} */\n var safeUrl;\n if (url instanceof goog.html.SafeUrl) {\n safeUrl = url;\n } else {\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\n }\n var win = opt_openerWin || goog.global;\n // If opt_name is undefined, simply passing that in to open() causes IE to\n // reuse the current window instead of opening a new one. Thus we pass '' in\n // instead, which according to spec opens a new window. See\n // https://html.spec.whatwg.org/multipage/browsers.html#dom-open .\n var name = opt_name instanceof goog.string.Const ?\n goog.string.Const.unwrap(opt_name) :\n opt_name || '';\n // Do not pass opt_specs to window.open unless it was provided by the caller.\n // IE11 will use it as a signal to open a new window rather than a new tab\n // (even if it is undefined).\n if (opt_specs !== undefined) {\n return win.open(goog.html.SafeUrl.unwrap(safeUrl), name, opt_specs);\n } else {\n return win.open(goog.html.SafeUrl.unwrap(safeUrl), name);\n }\n};\n\n\n/**\n * Parses the HTML as 'text/html'.\n * @param {!DOMParser} parser\n * @param {!goog.html.SafeHtml} html The HTML to be parsed.\n * @return {!Document}\n */\ngoog.dom.safe.parseFromStringHtml = function(parser, html) {\n 'use strict';\n return goog.dom.safe.parseFromString(parser, html, 'text/html');\n};\n\n\n/**\n * Parses the string.\n * @param {!DOMParser} parser\n * @param {!goog.html.SafeHtml} content Note: We don't have a special type for\n * XML or SVG supported by this function so we use SafeHtml.\n * @param {string} type\n * @return {!Document}\n */\ngoog.dom.safe.parseFromString = function(parser, content, type) {\n 'use strict';\n return parser.parseFromString(\n goog.html.SafeHtml.unwrapTrustedHTML(content), type);\n};\n\n\n/**\n * Safely creates an HTMLImageElement from a Blob.\n *\n * Example usage:\n * goog.dom.safe.createImageFromBlob(blob);\n * which is a safe alternative to\n * image.src = createObjectUrl(blob)\n * The latter can result in executing malicious same-origin scripts from a bad\n * Blob.\n * @param {!Blob} blob The blob to create the image from.\n * @return {!HTMLImageElement} The image element created from the blob.\n * @throws {!Error} If called with a Blob with a MIME type other than image/.*.\n */\ngoog.dom.safe.createImageFromBlob = function(blob) {\n 'use strict';\n // Any image/* MIME type is accepted as safe.\n if (!/^image\\/.*/g.test(blob.type)) {\n throw new Error(\n 'goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.');\n }\n var objectUrl = goog.global.URL.createObjectURL(blob);\n var image = new goog.global.Image();\n image.onload = function() {\n 'use strict';\n goog.global.URL.revokeObjectURL(objectUrl);\n };\n image.src = objectUrl;\n return image;\n};\n\n/**\n * Creates a DocumentFragment by parsing html in the context of a Range.\n * @param {!Range} range The Range object starting from the context node to\n * create a fragment in.\n * @param {!goog.html.SafeHtml} html HTML to create a fragment from.\n * @return {?DocumentFragment}\n */\ngoog.dom.safe.createContextualFragment = function(range, html) {\n 'use strict';\n return range.createContextualFragment(\n goog.html.SafeHtml.unwrapTrustedHTML(html));\n};\n\n/**\n * Returns CSP script nonce, if set for any <script> tag.\n * @param {?Window=} opt_window The window context used to retrieve the nonce.\n * Defaults to global context.\n * @return {string} CSP nonce or empty string if no nonce is present.\n */\ngoog.dom.safe.getScriptNonce = function(opt_window) {\n return goog.dom.safe.getNonce_('script[nonce]', opt_window);\n};\n\n/**\n * Returns CSP style nonce, if set for any <style> or <link rel=\"stylesheet\">\n * tag.\n * @param {?Window=} opt_window The window context used to retrieve the nonce.\n * Defaults to global context.\n * @return {string} CSP nonce or empty string if no nonce is present.\n */\ngoog.dom.safe.getStyleNonce = function(opt_window) {\n return goog.dom.safe.getNonce_(\n 'style[nonce],link[rel=\"stylesheet\"][nonce]', opt_window);\n};\n\n/**\n * According to the CSP3 spec a nonce must be a valid base64 string.\n * @see https://www.w3.org/TR/CSP3/#grammardef-base64-value\n * @private @const\n */\ngoog.dom.safe.NONCE_PATTERN_ = /^[\\w+/_-]+[=]{0,2}$/;\n\n/**\n * Returns CSP nonce, if set for any tag of given type.\n * @param {string} selector Selector for locating the element with nonce.\n * @param {?Window=} win The window context used to retrieve the nonce.\n * @return {string} CSP nonce or empty string if no nonce is present.\n * @private\n */\ngoog.dom.safe.getNonce_ = function(selector, win) {\n const doc = (win || goog.global).document;\n if (!doc.querySelector) {\n return '';\n }\n let el = doc.querySelector(selector);\n if (el) {\n // Try to get the nonce from the IDL property first, because browsers that\n // implement additional nonce protection features (currently only Chrome) to\n // prevent nonce stealing via CSS do not expose the nonce via attributes.\n // See https://github.com/whatwg/html/issues/2369\n const nonce = el['nonce'] || el.getAttribute('nonce');\n if (nonce && goog.dom.safe.NONCE_PATTERN_.test(nonce)) {\n return nonce;\n }\n }\n return '';\n};\n","~:compiled-at",1684858197918,"~:source-map-json","{\n\"version\":3,\n\"file\":\"goog.dom.safe.js\",\n\"lineCount\":263,\n\"mappings\":\"AA+BAA,IAAKC,CAAAA,OAAL,CAAa,eAAb,CAAA;AACAD,IAAKC,CAAAA,OAAL,CAAa,0CAAb,CAAA;AAEAD,IAAKE,CAAAA,OAAL,CAAa,cAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,kBAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,kBAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,gBAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,oBAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,sBAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,qBAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,mBAAb,CA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,CAAAA,IAAK4L,CAAAA,cAAehB,CAAAA,IAA7B,CAAkCjD,KAAlC,CAAb;AACE,aAAOA,KAAP;AADF;AANM;AAUR,SAAO,EAAP;AAhBgD,CAAlD;;\",\n\"sources\":[\"goog/dom/safe.js\"],\n\"sourcesContent\":[\"/**\\n * @license\\n * Copyright The Closure Library Authors.\\n * SPDX-License-Identifier: Apache-2.0\\n */\\n\\n/**\\n * @fileoverview Type-safe wrappers for unsafe DOM APIs.\\n *\\n * This file provides type-safe wrappers for DOM APIs that can result in\\n * cross-site scripting (XSS) vulnerabilities, if the API is supplied with\\n * untrusted (attacker-controlled) input. Instead of plain strings, the type\\n * safe wrappers consume values of types from the goog.html package whose\\n * contract promises that values are safe to use in the corresponding context.\\n *\\n * Hence, a program that exclusively uses the wrappers in this file (i.e., whose\\n * only reference to security-sensitive raw DOM APIs are in this file) is\\n * guaranteed to be free of XSS due to incorrect use of such DOM APIs (modulo\\n * correctness of code that produces values of the respective goog.html types,\\n * and absent code that violates type safety).\\n *\\n * For example, assigning to an element's .innerHTML property a string that is\\n * derived (even partially) from untrusted input typically results in an XSS\\n * vulnerability. The type-safe wrapper goog.dom.safe.setInnerHtml consumes a\\n * value of type goog.html.SafeHtml, whose contract states that using its values\\n * in a HTML context will not result in XSS. Hence a program that is free of\\n * direct assignments to any element's innerHTML property (with the exception of\\n * the assignment to .innerHTML in this file) is guaranteed to be free of XSS\\n * due to assignment of untrusted strings to the innerHTML property.\\n */\\n\\ngoog.provide('goog.dom.safe');\\ngoog.provide('goog.dom.safe.InsertAdjacentHtmlPosition');\\n\\ngoog.require('goog.asserts');\\ngoog.require('goog.asserts.dom');\\ngoog.require('goog.dom.asserts');\\ngoog.require('goog.functions');\\ngoog.require('goog.html.SafeHtml');\\ngoog.require('goog.html.SafeScript');\\ngoog.require('goog.html.SafeStyle');\\ngoog.require('goog.html.SafeUrl');\\ngoog.require('goog.html.TrustedResourceUrl');\\ngoog.require('goog.html.uncheckedconversions');\\ngoog.require('goog.string.Const');\\ngoog.require('goog.string.internal');\\n\\n\\n/** @enum {string} */\\ngoog.dom.safe.InsertAdjacentHtmlPosition = {\\n AFTERBEGIN: 'afterbegin',\\n AFTEREND: 'afterend',\\n BEFOREBEGIN: 'beforebegin',\\n BEFOREEND: 'beforeend'\\n};\\n\\n\\n/**\\n * Inserts known-safe HTML into a Node, at the specified position.\\n * @param {!Node} node The node on which to call insertAdjacentHTML.\\n * @param {!goog.dom.safe.InsertAdjacentHtmlPosition} position Position where\\n * to insert the HTML.\\n * @param {!goog.html.SafeHtml} html The known-safe HTML to insert.\\n */\\ngoog.dom.safe.insertAdjacentHtml = function(node, position, html) {\\n 'use strict';\\n node.insertAdjacentHTML(position, goog.html.SafeHtml.unwrapTrustedHTML(html));\\n};\\n\\n\\n/**\\n * Tags not allowed in goog.dom.safe.setInnerHtml.\\n * @private @const {!Object<string, boolean>}\\n */\\ngoog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_ = {\\n 'MATH': true,\\n 'SCRIPT': true,\\n 'STYLE': true,\\n 'SVG': true,\\n 'TEMPLATE': true\\n};\\n\\n\\n/**\\n * Whether assigning to innerHTML results in a non-spec-compliant clean-up. Used\\n * to define goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse.\\n *\\n * <p>As mentioned in https://stackoverflow.com/questions/28741528, re-rendering\\n * an element in IE by setting innerHTML causes IE to recursively disconnect all\\n * parent/children connections that were in the previous contents of the\\n * element. Unfortunately, this can unexpectedly result in confusing cases where\\n * a function is run (typically asynchronously) on element that has since\\n * disconnected from the DOM but assumes the presence of its children. A simple\\n * workaround is to remove all children first. Testing on IE11 via\\n * https://jsperf.com/innerhtml-vs-removechild/239, removeChild seems to be\\n * ~10x faster than innerHTML='' for a large number of children (perhaps due\\n * to the latter's recursive behavior), implying that this workaround would\\n * not hurt performance and might actually improve it.\\n * @return {boolean}\\n * @private\\n */\\ngoog.dom.safe.isInnerHtmlCleanupRecursive_ =\\n goog.functions.cacheReturnValue(function() {\\n 'use strict';\\n // `document` missing in some test frameworks.\\n if (goog.DEBUG && typeof document === 'undefined') {\\n return false;\\n }\\n // Create 3 nested <div>s without using innerHTML.\\n // We're not chaining the appendChilds in one call, as this breaks\\n // in a DocumentFragment.\\n var div = document.createElement('div');\\n var childDiv = document.createElement('div');\\n childDiv.appendChild(document.createElement('div'));\\n div.appendChild(childDiv);\\n // `firstChild` is null in Google Js Test.\\n if (goog.DEBUG && !div.firstChild) {\\n return false;\\n }\\n var innerChild = div.firstChild.firstChild;\\n div.innerHTML =\\n goog.html.SafeHtml.unwrapTrustedHTML(goog.html.SafeHtml.EMPTY);\\n return !innerChild.parentElement;\\n });\\n\\n\\n/**\\n * Assigns HTML to an element's innerHTML property. Helper to use only here and\\n * in soy.js.\\n * @param {?Element|?ShadowRoot} elem The element whose innerHTML is to be\\n * assigned to.\\n * @param {!goog.html.SafeHtml} html\\n */\\ngoog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse = function(elem, html) {\\n 'use strict';\\n // See comment above goog.dom.safe.isInnerHtmlCleanupRecursive_.\\n if (goog.dom.safe.isInnerHtmlCleanupRecursive_()) {\\n while (elem.lastChild) {\\n elem.removeChild(elem.lastChild);\\n }\\n }\\n elem.innerHTML = goog.html.SafeHtml.unwrapTrustedHTML(html);\\n};\\n\\n\\n/**\\n * Assigns known-safe HTML to an element's innerHTML property.\\n * @param {!Element|!ShadowRoot} elem The element whose innerHTML is to be\\n * assigned to.\\n * @param {!goog.html.SafeHtml} html The known-safe HTML to assign.\\n * @throws {Error} If called with one of these tags: math, script, style, svg,\\n * template.\\n */\\ngoog.dom.safe.setInnerHtml = function(elem, html) {\\n 'use strict';\\n if (goog.asserts.ENABLE_ASSERTS && /** @type {?} */ (elem).tagName) {\\n var tagName = /** @type {!Element} */ (elem).tagName.toUpperCase();\\n if (goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[tagName]) {\\n throw new Error(\\n 'goog.dom.safe.setInnerHtml cannot be used to set content of ' +\\n /** @type {!Element} */ (elem).tagName + '.');\\n }\\n }\\n\\n goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(elem, html);\\n};\\n\\n\\n/**\\n * Assigns constant HTML to an element's innerHTML property.\\n * @param {!Element} element The element whose innerHTML is to be assigned to.\\n * @param {!goog.string.Const} constHtml The known-safe HTML to assign.\\n * @throws {!Error} If called with one of these tags: math, script, style, svg,\\n * template.\\n */\\ngoog.dom.safe.setInnerHtmlFromConstant = function(element, constHtml) {\\n 'use strict';\\n goog.dom.safe.setInnerHtml(\\n element,\\n goog.html.uncheckedconversions\\n .safeHtmlFromStringKnownToSatisfyTypeContract(\\n goog.string.Const.from('Constant HTML to be immediatelly used.'),\\n goog.string.Const.unwrap(constHtml)));\\n};\\n\\n\\n/**\\n * Assigns known-safe HTML to an element's outerHTML property.\\n * @param {!Element} elem The element whose outerHTML is to be assigned to.\\n * @param {!goog.html.SafeHtml} html The known-safe HTML to assign.\\n */\\ngoog.dom.safe.setOuterHtml = function(elem, html) {\\n 'use strict';\\n elem.outerHTML = goog.html.SafeHtml.unwrapTrustedHTML(html);\\n};\\n\\n\\n/**\\n * Safely assigns a URL a form element's action property.\\n *\\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\\n * form's action property. If url is of type string however, it is first\\n * sanitized using goog.html.SafeUrl.sanitize.\\n *\\n * Example usage:\\n * goog.dom.safe.setFormElementAction(formEl, url);\\n * which is a safe alternative to\\n * formEl.action = url;\\n * The latter can result in XSS vulnerabilities if url is a\\n * user-/attacker-controlled value.\\n *\\n * @param {!Element} form The form element whose action property\\n * is to be assigned to.\\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\\n * @return {void}\\n * @see goog.html.SafeUrl#sanitize\\n */\\ngoog.dom.safe.setFormElementAction = function(form, url) {\\n 'use strict';\\n /** @type {!goog.html.SafeUrl} */\\n var safeUrl;\\n if (url instanceof goog.html.SafeUrl) {\\n safeUrl = url;\\n } else {\\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\\n }\\n goog.asserts.dom.assertIsHtmlFormElement(form).action =\\n goog.html.SafeUrl.unwrap(safeUrl);\\n};\\n\\n/**\\n * Safely assigns a URL to a button element's formaction property.\\n *\\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\\n * button's formaction property. If url is of type string however, it is first\\n * sanitized using goog.html.SafeUrl.sanitize.\\n *\\n * Example usage:\\n * goog.dom.safe.setButtonFormAction(buttonEl, url);\\n * which is a safe alternative to\\n * buttonEl.action = url;\\n * The latter can result in XSS vulnerabilities if url is a\\n * user-/attacker-controlled value.\\n *\\n * @param {!Element} button The button element whose action property\\n * is to be assigned to.\\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\\n * @return {void}\\n * @see goog.html.SafeUrl#sanitize\\n */\\ngoog.dom.safe.setButtonFormAction = function(button, url) {\\n 'use strict';\\n /** @type {!goog.html.SafeUrl} */\\n var safeUrl;\\n if (url instanceof goog.html.SafeUrl) {\\n safeUrl = url;\\n } else {\\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\\n }\\n goog.asserts.dom.assertIsHtmlButtonElement(button).formAction =\\n goog.html.SafeUrl.unwrap(safeUrl);\\n};\\n/**\\n * Safely assigns a URL to an input element's formaction property.\\n *\\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\\n * input's formaction property. If url is of type string however, it is first\\n * sanitized using goog.html.SafeUrl.sanitize.\\n *\\n * Example usage:\\n * goog.dom.safe.setInputFormAction(inputEl, url);\\n * which is a safe alternative to\\n * inputEl.action = url;\\n * The latter can result in XSS vulnerabilities if url is a\\n * user-/attacker-controlled value.\\n *\\n * @param {!Element} input The input element whose action property\\n * is to be assigned to.\\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\\n * @return {void}\\n * @see goog.html.SafeUrl#sanitize\\n */\\ngoog.dom.safe.setInputFormAction = function(input, url) {\\n 'use strict';\\n /** @type {!goog.html.SafeUrl} */\\n var safeUrl;\\n if (url instanceof goog.html.SafeUrl) {\\n safeUrl = url;\\n } else {\\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\\n }\\n goog.asserts.dom.assertIsHtmlInputElement(input).formAction =\\n goog.html.SafeUrl.unwrap(safeUrl);\\n};\\n\\n/**\\n * Sets the given element's style property to the contents of the provided\\n * SafeStyle object.\\n * @param {!Element} elem\\n * @param {!goog.html.SafeStyle} style\\n * @return {void}\\n */\\ngoog.dom.safe.setStyle = function(elem, style) {\\n 'use strict';\\n elem.style.cssText = goog.html.SafeStyle.unwrap(style);\\n};\\n\\n\\n/**\\n * Writes known-safe HTML to a document.\\n * @param {!Document} doc The document to be written to.\\n * @param {!goog.html.SafeHtml} html The known-safe HTML to assign.\\n * @return {void}\\n */\\ngoog.dom.safe.documentWrite = function(doc, html) {\\n 'use strict';\\n doc.write(goog.html.SafeHtml.unwrapTrustedHTML(html));\\n};\\n\\n\\n/**\\n * Safely assigns a URL to an anchor element's href property.\\n *\\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\\n * anchor's href property. If url is of type string however, it is first\\n * sanitized using goog.html.SafeUrl.sanitize.\\n *\\n * Example usage:\\n * goog.dom.safe.setAnchorHref(anchorEl, url);\\n * which is a safe alternative to\\n * anchorEl.href = url;\\n * The latter can result in XSS vulnerabilities if url is a\\n * user-/attacker-controlled value.\\n *\\n * @param {!HTMLAnchorElement} anchor The anchor element whose href property\\n * is to be assigned to.\\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\\n * @return {void}\\n * @see goog.html.SafeUrl#sanitize\\n */\\ngoog.dom.safe.setAnchorHref = function(anchor, url) {\\n 'use strict';\\n goog.asserts.dom.assertIsHtmlAnchorElement(anchor);\\n /** @type {!goog.html.SafeUrl} */\\n var safeUrl;\\n if (url instanceof goog.html.SafeUrl) {\\n safeUrl = url;\\n } else {\\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\\n }\\n anchor.href = goog.html.SafeUrl.unwrap(safeUrl);\\n};\\n\\n\\n/**\\n * Safely assigns a URL to a audio element's src property.\\n *\\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\\n * audio's src property. If url is of type string however, it is first\\n * sanitized using goog.html.SafeUrl.sanitize.\\n *\\n * @param {!HTMLAudioElement} audioElement The audio element whose src property\\n * is to be assigned to.\\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\\n * @return {void}\\n * @see goog.html.SafeUrl#sanitize\\n */\\ngoog.dom.safe.setAudioSrc = function(audioElement, url) {\\n 'use strict';\\n goog.asserts.dom.assertIsHtmlAudioElement(audioElement);\\n /** @type {!goog.html.SafeUrl} */\\n var safeUrl;\\n if (url instanceof goog.html.SafeUrl) {\\n safeUrl = url;\\n } else {\\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\\n }\\n audioElement.src = goog.html.SafeUrl.unwrap(safeUrl);\\n};\\n\\n/**\\n * Safely assigns a URL to a video element's src property.\\n *\\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\\n * video's src property. If url is of type string however, it is first\\n * sanitized using goog.html.SafeUrl.sanitize.\\n *\\n * @param {!HTMLVideoElement} videoElement The video element whose src property\\n * is to be assigned to.\\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\\n * @return {void}\\n * @see goog.html.SafeUrl#sanitize\\n */\\ngoog.dom.safe.setVideoSrc = function(videoElement, url) {\\n 'use strict';\\n goog.asserts.dom.assertIsHtmlVideoElement(videoElement);\\n /** @type {!goog.html.SafeUrl} */\\n var safeUrl;\\n if (url instanceof goog.html.SafeUrl) {\\n safeUrl = url;\\n } else {\\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\\n }\\n videoElement.src = goog.html.SafeUrl.unwrap(safeUrl);\\n};\\n\\n/**\\n * Safely assigns a URL to an embed element's src property.\\n *\\n * Example usage:\\n * goog.dom.safe.setEmbedSrc(embedEl, url);\\n * which is a safe alternative to\\n * embedEl.src = url;\\n * The latter can result in loading untrusted code unless it is ensured that\\n * the URL refers to a trustworthy resource.\\n *\\n * @param {!HTMLEmbedElement} embed The embed element whose src property\\n * is to be assigned to.\\n * @param {!goog.html.TrustedResourceUrl} url The URL to assign.\\n */\\ngoog.dom.safe.setEmbedSrc = function(embed, url) {\\n 'use strict';\\n goog.asserts.dom.assertIsHtmlEmbedElement(embed);\\n embed.src = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(url);\\n};\\n\\n\\n/**\\n * Safely assigns a URL to a frame element's src property.\\n *\\n * Example usage:\\n * goog.dom.safe.setFrameSrc(frameEl, url);\\n * which is a safe alternative to\\n * frameEl.src = url;\\n * The latter can result in loading untrusted code unless it is ensured that\\n * the URL refers to a trustworthy resource.\\n *\\n * @param {!HTMLFrameElement} frame The frame element whose src property\\n * is to be assigned to.\\n * @param {!goog.html.TrustedResourceUrl} url The URL to assign.\\n * @return {void}\\n */\\ngoog.dom.safe.setFrameSrc = function(frame, url) {\\n 'use strict';\\n goog.asserts.dom.assertIsHtmlFrameElement(frame);\\n frame.src = goog.html.TrustedResourceUrl.unwrap(url);\\n};\\n\\n\\n/**\\n * Safely assigns a URL to an iframe element's src property.\\n *\\n * Example usage:\\n * goog.dom.safe.setIframeSrc(iframeEl, url);\\n * which is a safe alternative to\\n * iframeEl.src = url;\\n * The latter can result in loading untrusted code unless it is ensured that\\n * the URL refers to a trustworthy resource.\\n *\\n * @param {!HTMLIFrameElement} iframe The iframe element whose src property\\n * is to be assigned to.\\n * @param {!goog.html.TrustedResourceUrl} url The URL to assign.\\n * @return {void}\\n */\\ngoog.dom.safe.setIframeSrc = function(iframe, url) {\\n 'use strict';\\n goog.asserts.dom.assertIsHtmlIFrameElement(iframe);\\n iframe.src = goog.html.TrustedResourceUrl.unwrap(url);\\n};\\n\\n\\n/**\\n * Safely assigns HTML to an iframe element's srcdoc property.\\n *\\n * Example usage:\\n * goog.dom.safe.setIframeSrcdoc(iframeEl, safeHtml);\\n * which is a safe alternative to\\n * iframeEl.srcdoc = html;\\n * The latter can result in loading untrusted code.\\n *\\n * @param {!HTMLIFrameElement} iframe The iframe element whose srcdoc property\\n * is to be assigned to.\\n * @param {!goog.html.SafeHtml} html The HTML to assign.\\n * @return {void}\\n */\\ngoog.dom.safe.setIframeSrcdoc = function(iframe, html) {\\n 'use strict';\\n goog.asserts.dom.assertIsHtmlIFrameElement(iframe);\\n iframe.srcdoc = goog.html.SafeHtml.unwrapTrustedHTML(html);\\n};\\n\\n\\n/**\\n * Safely sets a link element's href and rel properties. Whether or not\\n * the URL assigned to href has to be a goog.html.TrustedResourceUrl\\n * depends on the value of the rel property. If rel contains \\\"stylesheet\\\"\\n * then a TrustedResourceUrl is required.\\n *\\n * Example usage:\\n * goog.dom.safe.setLinkHrefAndRel(linkEl, url, 'stylesheet');\\n * which is a safe alternative to\\n * linkEl.rel = 'stylesheet';\\n * linkEl.href = url;\\n * The latter can result in loading untrusted code unless it is ensured that\\n * the URL refers to a trustworthy resource.\\n *\\n * @param {!HTMLLinkElement} link The link element whose href property\\n * is to be assigned to.\\n * @param {string|!goog.html.SafeUrl|!goog.html.TrustedResourceUrl} url The URL\\n * to assign to the href property. Must be a TrustedResourceUrl if the\\n * value assigned to rel contains \\\"stylesheet\\\". A string value is\\n * sanitized with goog.html.SafeUrl.sanitize.\\n * @param {string} rel The value to assign to the rel property.\\n * @return {void}\\n * @throws {Error} if rel contains \\\"stylesheet\\\" and url is not a\\n * TrustedResourceUrl\\n * @see goog.html.SafeUrl#sanitize\\n */\\ngoog.dom.safe.setLinkHrefAndRel = function(link, url, rel) {\\n 'use strict';\\n goog.asserts.dom.assertIsHtmlLinkElement(link);\\n link.rel = rel;\\n if (goog.string.internal.caseInsensitiveContains(rel, 'stylesheet')) {\\n goog.asserts.assert(\\n url instanceof goog.html.TrustedResourceUrl,\\n 'URL must be TrustedResourceUrl because \\\"rel\\\" contains \\\"stylesheet\\\"');\\n link.href = goog.html.TrustedResourceUrl.unwrap(url);\\n const win = link.ownerDocument && link.ownerDocument.defaultView;\\n const nonce = goog.dom.safe.getStyleNonce(win);\\n if (nonce) {\\n link.setAttribute('nonce', nonce);\\n }\\n } else if (url instanceof goog.html.TrustedResourceUrl) {\\n link.href = goog.html.TrustedResourceUrl.unwrap(url);\\n } else if (url instanceof goog.html.SafeUrl) {\\n link.href = goog.html.SafeUrl.unwrap(url);\\n } else { // string\\n // SafeUrl.sanitize must return legitimate SafeUrl when passed a string.\\n link.href = goog.html.SafeUrl.unwrap(\\n goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url));\\n }\\n};\\n\\n\\n/**\\n * Safely assigns a URL to an object element's data property.\\n *\\n * Example usage:\\n * goog.dom.safe.setObjectData(objectEl, url);\\n * which is a safe alternative to\\n * objectEl.data = url;\\n * The latter can result in loading untrusted code unless setit is ensured that\\n * the URL refers to a trustworthy resource.\\n *\\n * @param {!HTMLObjectElement} object The object element whose data property\\n * is to be assigned to.\\n * @param {!goog.html.TrustedResourceUrl} url The URL to assign.\\n * @return {void}\\n */\\ngoog.dom.safe.setObjectData = function(object, url) {\\n 'use strict';\\n goog.asserts.dom.assertIsHtmlObjectElement(object);\\n object.data = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(url);\\n};\\n\\n\\n/**\\n * Safely assigns a URL to a script element's src property.\\n *\\n * Example usage:\\n * goog.dom.safe.setScriptSrc(scriptEl, url);\\n * which is a safe alternative to\\n * scriptEl.src = url;\\n * The latter can result in loading untrusted code unless it is ensured that\\n * the URL refers to a trustworthy resource.\\n *\\n * @param {!HTMLScriptElement} script The script element whose src property\\n * is to be assigned to.\\n * @param {!goog.html.TrustedResourceUrl} url The URL to assign.\\n * @return {void}\\n */\\ngoog.dom.safe.setScriptSrc = function(script, url) {\\n 'use strict';\\n goog.asserts.dom.assertIsHtmlScriptElement(script);\\n goog.dom.safe.setNonceForScriptElement_(script);\\n script.src = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(url);\\n};\\n\\n\\n/**\\n * Safely assigns a value to a script element's content.\\n *\\n * Example usage:\\n * goog.dom.safe.setScriptContent(scriptEl, content);\\n * which is a safe alternative to\\n * scriptEl.text = content;\\n * The latter can result in executing untrusted code unless it is ensured that\\n * the code is loaded from a trustworthy resource.\\n *\\n * @param {!HTMLScriptElement} script The script element whose content is being\\n * set.\\n * @param {!goog.html.SafeScript} content The content to assign.\\n * @return {void}\\n */\\ngoog.dom.safe.setScriptContent = function(script, content) {\\n 'use strict';\\n goog.asserts.dom.assertIsHtmlScriptElement(script);\\n goog.dom.safe.setNonceForScriptElement_(script);\\n script.textContent = goog.html.SafeScript.unwrapTrustedScript(content);\\n};\\n\\n\\n/**\\n * Set nonce-based CSPs to dynamically created scripts.\\n * @param {!HTMLScriptElement} script The script element whose nonce value\\n * is to be calculated\\n * @private\\n */\\ngoog.dom.safe.setNonceForScriptElement_ = function(script) {\\n 'use strict';\\n var win = script.ownerDocument && script.ownerDocument.defaultView;\\n const nonce = goog.dom.safe.getScriptNonce(win);\\n if (nonce) {\\n script.setAttribute('nonce', nonce);\\n }\\n};\\n\\n\\n/**\\n * Safely assigns a URL to a Location object's href property.\\n *\\n * If url is of type goog.html.SafeUrl, its value is unwrapped and assigned to\\n * loc's href property. If url is of type string however, it is first sanitized\\n * using goog.html.SafeUrl.sanitize.\\n *\\n * Example usage:\\n * goog.dom.safe.setLocationHref(document.location, redirectUrl);\\n * which is a safe alternative to\\n * document.location.href = redirectUrl;\\n * The latter can result in XSS vulnerabilities if redirectUrl is a\\n * user-/attacker-controlled value.\\n *\\n * @param {!Location} loc The Location object whose href property is to be\\n * assigned to.\\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\\n * @return {void}\\n * @see goog.html.SafeUrl#sanitize\\n\\n */\\ngoog.dom.safe.setLocationHref = function(loc, url) {\\n 'use strict';\\n goog.dom.asserts.assertIsLocation(loc);\\n /** @type {!goog.html.SafeUrl} */\\n var safeUrl;\\n if (url instanceof goog.html.SafeUrl) {\\n safeUrl = url;\\n } else {\\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\\n }\\n loc.href = goog.html.SafeUrl.unwrap(safeUrl);\\n};\\n\\n/**\\n * Safely assigns the URL of a Location object.\\n *\\n * If url is of type goog.html.SafeUrl, its value is unwrapped and\\n * passed to Location#assign. If url is of type string however, it is\\n * first sanitized using goog.html.SafeUrl.sanitize.\\n *\\n * Example usage:\\n * goog.dom.safe.assignLocation(document.location, newUrl);\\n * which is a safe alternative to\\n * document.location.assign(newUrl);\\n * The latter can result in XSS vulnerabilities if newUrl is a\\n * user-/attacker-controlled value.\\n *\\n * This has the same behaviour as setLocationHref, however some test\\n * mock Location.assign instead of a property assignment.\\n *\\n * @param {!Location} loc The Location object which is to be assigned.\\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\\n * @return {void}\\n * @see goog.html.SafeUrl#sanitize\\n */\\ngoog.dom.safe.assignLocation = function(loc, url) {\\n 'use strict';\\n goog.dom.asserts.assertIsLocation(loc);\\n /** @type {!goog.html.SafeUrl} */\\n var safeUrl;\\n if (url instanceof goog.html.SafeUrl) {\\n safeUrl = url;\\n } else {\\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\\n }\\n loc.assign(goog.html.SafeUrl.unwrap(safeUrl));\\n};\\n\\n\\n/**\\n * Safely replaces the URL of a Location object.\\n *\\n * If url is of type goog.html.SafeUrl, its value is unwrapped and\\n * passed to Location#replace. If url is of type string however, it is\\n * first sanitized using goog.html.SafeUrl.sanitize.\\n *\\n * Example usage:\\n * goog.dom.safe.replaceLocation(document.location, newUrl);\\n * which is a safe alternative to\\n * document.location.replace(newUrl);\\n * The latter can result in XSS vulnerabilities if newUrl is a\\n * user-/attacker-controlled value.\\n *\\n * @param {!Location} loc The Location object which is to be replaced.\\n * @param {string|!goog.html.SafeUrl} url The URL to assign.\\n * @return {void}\\n * @see goog.html.SafeUrl#sanitize\\n */\\ngoog.dom.safe.replaceLocation = function(loc, url) {\\n 'use strict';\\n /** @type {!goog.html.SafeUrl} */\\n var safeUrl;\\n if (url instanceof goog.html.SafeUrl) {\\n safeUrl = url;\\n } else {\\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\\n }\\n loc.replace(goog.html.SafeUrl.unwrap(safeUrl));\\n};\\n\\n\\n/**\\n * Safely opens a URL in a new window (via window.open).\\n *\\n * If url is of type goog.html.SafeUrl, its value is unwrapped and passed in to\\n * window.open. If url is of type string however, it is first sanitized\\n * using goog.html.SafeUrl.sanitize.\\n *\\n * Note that this function does not prevent leakages via the referer that is\\n * sent by window.open. It is advised to only use this to open 1st party URLs.\\n *\\n * Example usage:\\n * goog.dom.safe.openInWindow(url);\\n * which is a safe alternative to\\n * window.open(url);\\n * The latter can result in XSS vulnerabilities if url is a\\n * user-/attacker-controlled value.\\n *\\n * @param {string|!goog.html.SafeUrl} url The URL to open.\\n * @param {Window=} opt_openerWin Window of which to call the .open() method.\\n * Defaults to the global window.\\n * @param {!goog.string.Const|string=} opt_name Name of the window to open in.\\n * Can be _top, etc as allowed by window.open(). This accepts string for\\n * legacy reasons. Pass goog.string.Const if possible.\\n * @param {string=} opt_specs Comma-separated list of specifications, same as\\n * in window.open().\\n * @return {Window} Window the url was opened in.\\n */\\ngoog.dom.safe.openInWindow = function(url, opt_openerWin, opt_name, opt_specs) {\\n 'use strict';\\n /** @type {!goog.html.SafeUrl} */\\n var safeUrl;\\n if (url instanceof goog.html.SafeUrl) {\\n safeUrl = url;\\n } else {\\n safeUrl = goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged(url);\\n }\\n var win = opt_openerWin || goog.global;\\n // If opt_name is undefined, simply passing that in to open() causes IE to\\n // reuse the current window instead of opening a new one. Thus we pass '' in\\n // instead, which according to spec opens a new window. See\\n // https://html.spec.whatwg.org/multipage/browsers.html#dom-open .\\n var name = opt_name instanceof goog.string.Const ?\\n goog.string.Const.unwrap(opt_name) :\\n opt_name || '';\\n // Do not pass opt_specs to window.open unless it was provided by the caller.\\n // IE11 will use it as a signal to open a new window rather than a new tab\\n // (even if it is undefined).\\n if (opt_specs !== undefined) {\\n return win.open(goog.html.SafeUrl.unwrap(safeUrl), name, opt_specs);\\n } else {\\n return win.open(goog.html.SafeUrl.unwrap(safeUrl), name);\\n }\\n};\\n\\n\\n/**\\n * Parses the HTML as 'text/html'.\\n * @param {!DOMParser} parser\\n * @param {!goog.html.SafeHtml} html The HTML to be parsed.\\n * @return {!Document}\\n */\\ngoog.dom.safe.parseFromStringHtml = function(parser, html) {\\n 'use strict';\\n return goog.dom.safe.parseFromString(parser, html, 'text/html');\\n};\\n\\n\\n/**\\n * Parses the string.\\n * @param {!DOMParser} parser\\n * @param {!goog.html.SafeHtml} content Note: We don't have a special type for\\n * XML or SVG supported by this function so we use SafeHtml.\\n * @param {string} type\\n * @return {!Document}\\n */\\ngoog.dom.safe.parseFromString = function(parser, content, type) {\\n 'use strict';\\n return parser.parseFromString(\\n goog.html.SafeHtml.unwrapTrustedHTML(content), type);\\n};\\n\\n\\n/**\\n * Safely creates an HTMLImageElement from a Blob.\\n *\\n * Example usage:\\n * goog.dom.safe.createImageFromBlob(blob);\\n * which is a safe alternative to\\n * image.src = createObjectUrl(blob)\\n * The latter can result in executing malicious same-origin scripts from a bad\\n * Blob.\\n * @param {!Blob} blob The blob to create the image from.\\n * @return {!HTMLImageElement} The image element created from the blob.\\n * @throws {!Error} If called with a Blob with a MIME type other than image/.*.\\n */\\ngoog.dom.safe.createImageFromBlob = function(blob) {\\n 'use strict';\\n // Any image/* MIME type is accepted as safe.\\n if (!/^image\\\\/.*/g.test(blob.type)) {\\n throw new Error(\\n 'goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.');\\n }\\n var objectUrl = goog.global.URL.createObjectURL(blob);\\n var image = new goog.global.Image();\\n image.onload = function() {\\n 'use strict';\\n goog.global.URL.revokeObjectURL(objectUrl);\\n };\\n image.src = objectUrl;\\n return image;\\n};\\n\\n/**\\n * Creates a DocumentFragment by parsing html in the context of a Range.\\n * @param {!Range} range The Range object starting from the context node to\\n * create a fragment in.\\n * @param {!goog.html.SafeHtml} html HTML to create a fragment from.\\n * @return {?DocumentFragment}\\n */\\ngoog.dom.safe.createContextualFragment = function(range, html) {\\n 'use strict';\\n return range.createContextualFragment(\\n goog.html.SafeHtml.unwrapTrustedHTML(html));\\n};\\n\\n/**\\n * Returns CSP script nonce, if set for any <script> tag.\\n * @param {?Window=} opt_window The window context used to retrieve the nonce.\\n * Defaults to global context.\\n * @return {string} CSP nonce or empty string if no nonce is present.\\n */\\ngoog.dom.safe.getScriptNonce = function(opt_window) {\\n return goog.dom.safe.getNonce_('script[nonce]', opt_window);\\n};\\n\\n/**\\n * Returns CSP style nonce, if set for any <style> or <link rel=\\\"stylesheet\\\">\\n * tag.\\n * @param {?Window=} opt_window The window context used to retrieve the nonce.\\n * Defaults to global context.\\n * @return {string} CSP nonce or empty string if no nonce is present.\\n */\\ngoog.dom.safe.getStyleNonce = function(opt_window) {\\n return goog.dom.safe.getNonce_(\\n 'style[nonce],link[rel=\\\"stylesheet\\\"][nonce]', opt_window);\\n};\\n\\n/**\\n * According to the CSP3 spec a nonce must be a valid base64 string.\\n * @see https://www.w3.org/TR/CSP3/#grammardef-base64-value\\n * @private @const\\n */\\ngoog.dom.safe.NONCE_PATTERN_ = /^[\\\\w+/_-]+[=]{0,2}$/;\\n\\n/**\\n * Returns CSP nonce, if set for any tag of given type.\\n * @param {string} selector Selector for locating the element with nonce.\\n * @param {?Window=} win The window context used to retrieve the nonce.\\n * @return {string} CSP nonce or empty string if no nonce is present.\\n * @private\\n */\\ngoog.dom.safe.getNonce_ = function(selector, win) {\\n const doc = (win || goog.global).document;\\n if (!doc.querySelector) {\\n return '';\\n }\\n let el = doc.querySelector(selector);\\n if (el) {\\n // Try to get the nonce from the IDL property first, because browsers that\\n // implement additional nonce protection features (currently only Chrome) to\\n // prevent nonce stealing via CSS do not expose the nonce via attributes.\\n // See https://github.com/whatwg/html/issues/2369\\n const nonce = el['nonce'] || el.getAttribute('nonce');\\n if (nonce && goog.dom.safe.NONCE_PATTERN_.test(nonce)) {\\n return nonce;\\n }\\n }\\n return '';\\n};\\n\"],\n\"names\":[\"goog\",\"provide\",\"require\",\"dom\",\"safe\",\"InsertAdjacentHtmlPosition\",\"AFTERBEGIN\",\"AFTEREND\",\"BEFOREBEGIN\",\"BEFOREEND\",\"insertAdjacentHtml\",\"goog.dom.safe.insertAdjacentHtml\",\"node\",\"position\",\"html\",\"insertAdjacentHTML\",\"SafeHtml\",\"unwrapTrustedHTML\",\"SET_INNER_HTML_DISALLOWED_TAGS_\",\"isInnerHtmlCleanupRecursive_\",\"functions\",\"cacheReturnValue\",\"DEBUG\",\"document\",\"div\",\"createElement\",\"childDiv\",\"appendChild\",\"firstChild\",\"innerChild\",\"innerHTML\",\"EMPTY\",\"parentElement\",\"unsafeSetInnerHtmlDoNotUseOrElse\",\"goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse\",\"elem\",\"lastChild\",\"removeChild\",\"setInnerHtml\",\"goog.dom.safe.setInnerHtml\",\"asserts\",\"ENABLE_ASSERTS\",\"tagName\",\"toUpperCase\",\"Error\",\"setInnerHtmlFromConstant\",\"goog.dom.safe.setInnerHtmlFromConstant\",\"element\",\"constHtml\",\"uncheckedconversions\",\"safeHtmlFromStringKnownToSatisfyTypeContract\",\"string\",\"Const\",\"from\",\"unwrap\",\"setOuterHtml\",\"goog.dom.safe.setOuterHtml\",\"outerHTML\",\"setFormElementAction\",\"goog.dom.safe.setFormElementAction\",\"form\",\"url\",\"safeUrl\",\"SafeUrl\",\"sanitizeJavascriptUrlAssertUnchanged\",\"assertIsHtmlFormElement\",\"action\",\"setButtonFormAction\",\"goog.dom.safe.setButtonFormAction\",\"button\",\"assertIsHtmlButtonElement\",\"formAction\",\"setInputFormAction\",\"goog.dom.safe.setInputFormAction\",\"input\",\"assertIsHtmlInputElement\",\"setStyle\",\"goog.dom.safe.setStyle\",\"style\",\"cssText\",\"SafeStyle\",\"documentWrite\",\"goog.dom.safe.documentWrite\",\"doc\",\"write\",\"setAnchorHref\",\"goog.dom.safe.setAnchorHref\",\"anchor\",\"assertIsHtmlAnchorElement\",\"href\",\"setAudioSrc\",\"goog.dom.safe.setAudioSrc\",\"audioElement\",\"assertIsHtmlAudioElement\",\"src\",\"setVideoSrc\",\"goog.dom.safe.setVideoSrc\",\"videoElement\",\"assertIsHtmlVideoElement\",\"setEmbedSrc\",\"goog.dom.safe.setEmbedSrc\",\"embed\",\"assertIsHtmlEmbedElement\",\"TrustedResourceUrl\",\"unwrapTrustedScriptURL\",\"setFrameSrc\",\"goog.dom.safe.setFrameSrc\",\"frame\",\"assertIsHtmlFrameElement\",\"setIframeSrc\",\"goog.dom.safe.setIframeSrc\",\"iframe\",\"assertIsHtmlIFrameElement\",\"setIframeSrcdoc\",\"goog.dom.safe.setIframeSrcdoc\",\"srcdoc\",\"setLinkHrefAndRel\",\"goog.dom.safe.setLinkHrefAndRel\",\"link\",\"rel\",\"assertIsHtmlLinkElement\",\"internal\",\"caseInsensitiveContains\",\"assert\",\"win\",\"ownerDocument\",\"defaultView\",\"nonce\",\"getStyleNonce\",\"setAttribute\",\"setObjectData\",\"goog.dom.safe.setObjectData\",\"object\",\"assertIsHtmlObjectElement\",\"data\",\"setScriptSrc\",\"goog.dom.safe.setScriptSrc\",\"script\",\"assertIsHtmlScriptElement\",\"setNonceForScriptElement_\",\"setScriptContent\",\"goog.dom.safe.setScriptContent\",\"content\",\"textContent\",\"SafeScript\",\"unwrapTrustedScript\",\"goog.dom.safe.setNonceForScriptElement_\",\"getScriptNonce\",\"setLocationHref\",\"goog.dom.safe.setLocationHref\",\"loc\",\"assertIsLocation\",\"assignLocation\",\"goog.dom.safe.assignLocation\",\"assign\",\"replaceLocation\",\"goog.dom.safe.replaceLocation\",\"replace\",\"openInWindow\",\"goog.dom.safe.openInWindow\",\"opt_openerWin\",\"opt_name\",\"opt_specs\",\"global\",\"name\",\"undefined\",\"open\",\"parseFromStringHtml\",\"goog.dom.safe.parseFromStringHtml\",\"parser\",\"parseFromString\",\"goog.dom.safe.parseFromString\",\"type\",\"createImageFromBlob\",\"goog.dom.safe.createImageFromBlob\",\"blob\",\"test\",\"objectUrl\",\"URL\",\"createObjectURL\",\"image\",\"Image\",\"onload\",\"image.onload\",\"revokeObjectURL\",\"createContextualFragment\",\"goog.dom.safe.createContextualFragment\",\"range\",\"goog.dom.safe.getScriptNonce\",\"opt_window\",\"getNonce_\",\"goog.dom.safe.getStyleNonce\",\"NONCE_PATTERN_\",\"goog.dom.safe.getNonce_\",\"selector\",\"querySelector\",\"el\",\"getAttribute\"]\n}\n"]