@p4ulcristian/iris-layout 0.2.0 → 0.2.2

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 (201) hide show
  1. package/dist/cljs-runtime/cljs.core.js +38746 -0
  2. package/dist/cljs-runtime/cljs.core.js.map +1 -0
  3. package/dist/cljs-runtime/cljs.pprint.js +8400 -0
  4. package/dist/cljs-runtime/cljs.pprint.js.map +1 -0
  5. package/dist/cljs-runtime/cljs.stacktrace.js +561 -0
  6. package/dist/cljs-runtime/cljs.stacktrace.js.map +1 -0
  7. package/dist/cljs-runtime/cljs_env.js +1286 -0
  8. package/dist/cljs-runtime/clojure.data.js +295 -0
  9. package/dist/cljs-runtime/clojure.data.js.map +1 -0
  10. package/dist/cljs-runtime/clojure.set.js +382 -0
  11. package/dist/cljs-runtime/clojure.set.js.map +1 -0
  12. package/dist/cljs-runtime/clojure.string.js +480 -0
  13. package/dist/cljs-runtime/clojure.string.js.map +1 -0
  14. package/dist/cljs-runtime/clojure.walk.js +132 -0
  15. package/dist/cljs-runtime/clojure.walk.js.map +1 -0
  16. package/dist/cljs-runtime/devtools.async.js +90 -0
  17. package/dist/cljs-runtime/devtools.async.js.map +1 -0
  18. package/dist/cljs-runtime/devtools.context.js +11 -0
  19. package/dist/cljs-runtime/devtools.context.js.map +1 -0
  20. package/dist/cljs-runtime/devtools.core.js +175 -0
  21. package/dist/cljs-runtime/devtools.core.js.map +1 -0
  22. package/dist/cljs-runtime/devtools.defaults.js +20 -0
  23. package/dist/cljs-runtime/devtools.defaults.js.map +1 -0
  24. package/dist/cljs-runtime/devtools.format.js +631 -0
  25. package/dist/cljs-runtime/devtools.format.js.map +1 -0
  26. package/dist/cljs-runtime/devtools.formatters.budgeting.js +182 -0
  27. package/dist/cljs-runtime/devtools.formatters.budgeting.js.map +1 -0
  28. package/dist/cljs-runtime/devtools.formatters.core.js +220 -0
  29. package/dist/cljs-runtime/devtools.formatters.core.js.map +1 -0
  30. package/dist/cljs-runtime/devtools.formatters.helpers.js +228 -0
  31. package/dist/cljs-runtime/devtools.formatters.helpers.js.map +1 -0
  32. package/dist/cljs-runtime/devtools.formatters.js +261 -0
  33. package/dist/cljs-runtime/devtools.formatters.js.map +1 -0
  34. package/dist/cljs-runtime/devtools.formatters.markup.js +1174 -0
  35. package/dist/cljs-runtime/devtools.formatters.markup.js.map +1 -0
  36. package/dist/cljs-runtime/devtools.formatters.printing.js +313 -0
  37. package/dist/cljs-runtime/devtools.formatters.printing.js.map +1 -0
  38. package/dist/cljs-runtime/devtools.formatters.state.js +325 -0
  39. package/dist/cljs-runtime/devtools.formatters.state.js.map +1 -0
  40. package/dist/cljs-runtime/devtools.formatters.templating.js +666 -0
  41. package/dist/cljs-runtime/devtools.formatters.templating.js.map +1 -0
  42. package/dist/cljs-runtime/devtools.hints.js +193 -0
  43. package/dist/cljs-runtime/devtools.hints.js.map +1 -0
  44. package/dist/cljs-runtime/devtools.munging.js +1058 -0
  45. package/dist/cljs-runtime/devtools.munging.js.map +1 -0
  46. package/dist/cljs-runtime/devtools.prefs.js +87 -0
  47. package/dist/cljs-runtime/devtools.prefs.js.map +1 -0
  48. package/dist/cljs-runtime/devtools.preload.js +11 -0
  49. package/dist/cljs-runtime/devtools.preload.js.map +1 -0
  50. package/dist/cljs-runtime/devtools.protocols.js +98 -0
  51. package/dist/cljs-runtime/devtools.protocols.js.map +1 -0
  52. package/dist/cljs-runtime/devtools.reporter.js +81 -0
  53. package/dist/cljs-runtime/devtools.reporter.js.map +1 -0
  54. package/dist/cljs-runtime/devtools.toolbox.js +141 -0
  55. package/dist/cljs-runtime/devtools.toolbox.js.map +1 -0
  56. package/dist/cljs-runtime/devtools.util.js +517 -0
  57. package/dist/cljs-runtime/devtools.util.js.map +1 -0
  58. package/dist/cljs-runtime/devtools.version.js +9 -0
  59. package/dist/cljs-runtime/devtools.version.js.map +1 -0
  60. package/dist/cljs-runtime/goog.array.array.js +659 -0
  61. package/dist/cljs-runtime/goog.array.array.js.map +9 -0
  62. package/dist/cljs-runtime/goog.asserts.asserts.js +133 -0
  63. package/dist/cljs-runtime/goog.asserts.asserts.js.map +9 -0
  64. package/dist/cljs-runtime/goog.asserts.dom.js +90 -0
  65. package/dist/cljs-runtime/goog.asserts.dom.js.map +9 -0
  66. package/dist/cljs-runtime/goog.async.nexttick.js +93 -0
  67. package/dist/cljs-runtime/goog.async.nexttick.js.map +9 -0
  68. package/dist/cljs-runtime/goog.base.js +1261 -0
  69. package/dist/cljs-runtime/goog.base.js.map +9 -0
  70. package/dist/cljs-runtime/goog.collections.maps.js +82 -0
  71. package/dist/cljs-runtime/goog.collections.maps.js.map +9 -0
  72. package/dist/cljs-runtime/goog.debug.entrypointregistry.js +44 -0
  73. package/dist/cljs-runtime/goog.debug.entrypointregistry.js.map +9 -0
  74. package/dist/cljs-runtime/goog.debug.error.js +30 -0
  75. package/dist/cljs-runtime/goog.debug.error.js.map +9 -0
  76. package/dist/cljs-runtime/goog.dom.asserts.js +40 -0
  77. package/dist/cljs-runtime/goog.dom.asserts.js.map +9 -0
  78. package/dist/cljs-runtime/goog.dom.browserfeature.js +21 -0
  79. package/dist/cljs-runtime/goog.dom.browserfeature.js.map +9 -0
  80. package/dist/cljs-runtime/goog.dom.dom.js +1087 -0
  81. package/dist/cljs-runtime/goog.dom.dom.js.map +9 -0
  82. package/dist/cljs-runtime/goog.dom.element.js +69 -0
  83. package/dist/cljs-runtime/goog.dom.element.js.map +9 -0
  84. package/dist/cljs-runtime/goog.dom.htmlelement.js +7 -0
  85. package/dist/cljs-runtime/goog.dom.htmlelement.js.map +9 -0
  86. package/dist/cljs-runtime/goog.dom.nodetype.js +6 -0
  87. package/dist/cljs-runtime/goog.dom.nodetype.js.map +9 -0
  88. package/dist/cljs-runtime/goog.dom.safe.js +277 -0
  89. package/dist/cljs-runtime/goog.dom.safe.js.map +9 -0
  90. package/dist/cljs-runtime/goog.dom.tagname.js +147 -0
  91. package/dist/cljs-runtime/goog.dom.tagname.js.map +9 -0
  92. package/dist/cljs-runtime/goog.dom.tags.js +10 -0
  93. package/dist/cljs-runtime/goog.dom.tags.js.map +9 -0
  94. package/dist/cljs-runtime/goog.flags.flags.js +12 -0
  95. package/dist/cljs-runtime/goog.flags.flags.js.map +9 -0
  96. package/dist/cljs-runtime/goog.fs.blob.js +38 -0
  97. package/dist/cljs-runtime/goog.fs.blob.js.map +9 -0
  98. package/dist/cljs-runtime/goog.fs.url.js +37 -0
  99. package/dist/cljs-runtime/goog.fs.url.js.map +9 -0
  100. package/dist/cljs-runtime/goog.functions.functions.js +211 -0
  101. package/dist/cljs-runtime/goog.functions.functions.js.map +9 -0
  102. package/dist/cljs-runtime/goog.html.safehtml.js +321 -0
  103. package/dist/cljs-runtime/goog.html.safehtml.js.map +9 -0
  104. package/dist/cljs-runtime/goog.html.safescript.js +65 -0
  105. package/dist/cljs-runtime/goog.html.safescript.js.map +9 -0
  106. package/dist/cljs-runtime/goog.html.safestyle.js +175 -0
  107. package/dist/cljs-runtime/goog.html.safestyle.js.map +9 -0
  108. package/dist/cljs-runtime/goog.html.safestylesheet.js +99 -0
  109. package/dist/cljs-runtime/goog.html.safestylesheet.js.map +9 -0
  110. package/dist/cljs-runtime/goog.html.safeurl.js +231 -0
  111. package/dist/cljs-runtime/goog.html.safeurl.js.map +9 -0
  112. package/dist/cljs-runtime/goog.html.trustedresourceurl.js +123 -0
  113. package/dist/cljs-runtime/goog.html.trustedresourceurl.js.map +9 -0
  114. package/dist/cljs-runtime/goog.html.trustedtypes.js +16 -0
  115. package/dist/cljs-runtime/goog.html.trustedtypes.js.map +9 -0
  116. package/dist/cljs-runtime/goog.html.uncheckedconversions.js +52 -0
  117. package/dist/cljs-runtime/goog.html.uncheckedconversions.js.map +9 -0
  118. package/dist/cljs-runtime/goog.labs.useragent.browser.js +352 -0
  119. package/dist/cljs-runtime/goog.labs.useragent.browser.js.map +9 -0
  120. package/dist/cljs-runtime/goog.labs.useragent.engine.js +73 -0
  121. package/dist/cljs-runtime/goog.labs.useragent.engine.js.map +9 -0
  122. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropydata.js +14 -0
  123. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropydata.js.map +9 -0
  124. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropyvalue.js +74 -0
  125. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropyvalue.js.map +9 -0
  126. package/dist/cljs-runtime/goog.labs.useragent.platform.js +147 -0
  127. package/dist/cljs-runtime/goog.labs.useragent.platform.js.map +9 -0
  128. package/dist/cljs-runtime/goog.labs.useragent.useragent.js +21 -0
  129. package/dist/cljs-runtime/goog.labs.useragent.useragent.js.map +9 -0
  130. package/dist/cljs-runtime/goog.labs.useragent.util.js +81 -0
  131. package/dist/cljs-runtime/goog.labs.useragent.util.js.map +9 -0
  132. package/dist/cljs-runtime/goog.math.coordinate.js +97 -0
  133. package/dist/cljs-runtime/goog.math.coordinate.js.map +9 -0
  134. package/dist/cljs-runtime/goog.math.integer.js +445 -0
  135. package/dist/cljs-runtime/goog.math.integer.js.map +9 -0
  136. package/dist/cljs-runtime/goog.math.long.js +437 -0
  137. package/dist/cljs-runtime/goog.math.long.js.map +9 -0
  138. package/dist/cljs-runtime/goog.math.math.js +158 -0
  139. package/dist/cljs-runtime/goog.math.math.js.map +9 -0
  140. package/dist/cljs-runtime/goog.math.size.js +76 -0
  141. package/dist/cljs-runtime/goog.math.size.js.map +9 -0
  142. package/dist/cljs-runtime/goog.object.object.js +284 -0
  143. package/dist/cljs-runtime/goog.object.object.js.map +9 -0
  144. package/dist/cljs-runtime/goog.reflect.reflect.js +32 -0
  145. package/dist/cljs-runtime/goog.reflect.reflect.js.map +9 -0
  146. package/dist/cljs-runtime/goog.string.const.js +35 -0
  147. package/dist/cljs-runtime/goog.string.const.js.map +9 -0
  148. package/dist/cljs-runtime/goog.string.internal.js +119 -0
  149. package/dist/cljs-runtime/goog.string.internal.js.map +9 -0
  150. package/dist/cljs-runtime/goog.string.string.js +462 -0
  151. package/dist/cljs-runtime/goog.string.string.js.map +9 -0
  152. package/dist/cljs-runtime/goog.string.stringbuffer.js +32 -0
  153. package/dist/cljs-runtime/goog.string.stringbuffer.js.map +9 -0
  154. package/dist/cljs-runtime/goog.string.typedstring.js +9 -0
  155. package/dist/cljs-runtime/goog.string.typedstring.js.map +9 -0
  156. package/dist/cljs-runtime/goog.structs.structs.js +199 -0
  157. package/dist/cljs-runtime/goog.structs.structs.js.map +9 -0
  158. package/dist/cljs-runtime/goog.uri.uri.js +628 -0
  159. package/dist/cljs-runtime/goog.uri.uri.js.map +9 -0
  160. package/dist/cljs-runtime/goog.uri.utils.js +326 -0
  161. package/dist/cljs-runtime/goog.uri.utils.js.map +9 -0
  162. package/dist/cljs-runtime/goog.useragent.useragent.js +139 -0
  163. package/dist/cljs-runtime/goog.useragent.useragent.js.map +9 -0
  164. package/dist/cljs-runtime/iris_layout.components.entity_card_group.js +202 -0
  165. package/dist/cljs-runtime/iris_layout.components.entity_card_group.js.map +1 -0
  166. package/dist/cljs-runtime/iris_layout.components.entity_tile.js +295 -0
  167. package/dist/cljs-runtime/iris_layout.components.entity_tile.js.map +1 -0
  168. package/dist/cljs-runtime/iris_layout.components.entity_tile_group.js +33 -0
  169. package/dist/cljs-runtime/iris_layout.components.entity_tile_group.js.map +1 -0
  170. package/dist/cljs-runtime/iris_layout.components.resizer.js +91 -0
  171. package/dist/cljs-runtime/iris_layout.components.resizer.js.map +1 -0
  172. package/dist/cljs-runtime/iris_layout.components.touch_drag.js +399 -0
  173. package/dist/cljs-runtime/iris_layout.components.touch_drag.js.map +1 -0
  174. package/dist/cljs-runtime/iris_layout.core.js +1372 -0
  175. package/dist/cljs-runtime/iris_layout.core.js.map +1 -0
  176. package/dist/cljs-runtime/iris_layout.layout.js +328 -0
  177. package/dist/cljs-runtime/iris_layout.layout.js.map +1 -0
  178. package/dist/cljs-runtime/reagent.core.js +993 -0
  179. package/dist/cljs-runtime/reagent.core.js.map +1 -0
  180. package/dist/cljs-runtime/reagent.debug.js +75 -0
  181. package/dist/cljs-runtime/reagent.debug.js.map +1 -0
  182. package/dist/cljs-runtime/reagent.impl.batching.js +270 -0
  183. package/dist/cljs-runtime/reagent.impl.batching.js.map +1 -0
  184. package/dist/cljs-runtime/reagent.impl.component.js +758 -0
  185. package/dist/cljs-runtime/reagent.impl.component.js.map +1 -0
  186. package/dist/cljs-runtime/reagent.impl.input.js +175 -0
  187. package/dist/cljs-runtime/reagent.impl.input.js.map +1 -0
  188. package/dist/cljs-runtime/reagent.impl.protocols.js +99 -0
  189. package/dist/cljs-runtime/reagent.impl.protocols.js.map +1 -0
  190. package/dist/cljs-runtime/reagent.impl.template.js +660 -0
  191. package/dist/cljs-runtime/reagent.impl.template.js.map +1 -0
  192. package/dist/cljs-runtime/reagent.impl.util.js +748 -0
  193. package/dist/cljs-runtime/reagent.impl.util.js.map +1 -0
  194. package/dist/cljs-runtime/reagent.ratom.js +1668 -0
  195. package/dist/cljs-runtime/reagent.ratom.js.map +1 -0
  196. package/dist/cljs-runtime/shadow.esm.esm_import$react.js +5 -0
  197. package/dist/cljs-runtime/shadow.module.iris-layout.append.js +2 -0
  198. package/dist/cljs-runtime/shadow.module.iris-layout.prepend.js +2 -0
  199. package/dist/iris-layout.js +375 -355
  200. package/dist/styles.css +287 -9
  201. package/package.json +1 -1
@@ -0,0 +1,9 @@
1
+ {
2
+ "version":3,
3
+ "file":"goog.html.safeurl.js",
4
+ "lineCount":223,
5
+ "mappings":"AAYAA,IAAKC,CAAAA,OAAL,CAAa,mBAAb,CAAA;AAEAD,IAAKE,CAAAA,OAAL,CAAa,cAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,aAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,8BAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,mBAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,yBAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL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AAAA,IAAKC,CAAAA,OAAQqB,CAAAA,6CAAlB,GAAkEuG,QAAQ,CACtExG,GADsE,CACjE;AAEP,SAAO,IAAIxB,IAAKG,CAAAA,IAAKC,CAAAA,OAAd,CACHoB,GADG,EACExB,IAAKG,CAAAA,IAAKC,CAAAA,OAAQK,CAAAA,0BADpB,CAAP;AAFO,CADT;AAYAT,IAAKG,CAAAA,IAAKC,CAAAA,OAAQsD,CAAAA,aAAlB,GACI1D,IAAKG,CAAAA,IAAKC,CAAAA,OAAQqB,CAAAA,6CAAlB,CACIzB,IAAKG,CAAAA,IAAKC,CAAAA,OAAQO,CAAAA,gBADtB,CADJ;AASAX,IAAKG,CAAAA,IAAKC,CAAAA,OAAQ6H,CAAAA,WAAlB,GACIjI,IAAKG,CAAAA,IAAKC,CAAAA,OAAQqB,CAAAA,6CAAlB,CACI,aADJ,CADJ;;",
6
+ "sources":["goog/html/safeurl.js"],
7
+ "sourcesContent":["/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview The SafeUrl type and its builders.\n *\n * TODO(xtof): Link to document stating type contract.\n */\n\ngoog.provide('goog.html.SafeUrl');\n\ngoog.require('goog.asserts');\ngoog.require('goog.fs.url');\ngoog.require('goog.html.TrustedResourceUrl');\ngoog.require('goog.string.Const');\ngoog.require('goog.string.TypedString');\ngoog.require('goog.string.internal');\n\n\n\n/**\n * A string that is safe to use in URL context in DOM APIs and HTML documents.\n *\n * A SafeUrl is a string-like object that carries the security type contract\n * that its value as a string will not cause untrusted script execution\n * when evaluated as a hyperlink URL in a browser.\n *\n * Values of this type are guaranteed to be safe to use in URL/hyperlink\n * contexts, such as assignment to URL-valued DOM properties, in the sense that\n * the use will not result in a Cross-Site-Scripting vulnerability. Similarly,\n * SafeUrls can be interpolated into the URL context of an HTML template (e.g.,\n * inside a href attribute). However, appropriate HTML-escaping must still be\n * applied.\n *\n * Note that, as documented in `goog.html.SafeUrl.unwrap`, this type's\n * contract does not guarantee that instances are safe to interpolate into HTML\n * without appropriate escaping.\n *\n * Note also that this type's contract does not imply any guarantees regarding\n * the resource the URL refers to. In particular, SafeUrls are <b>not</b>\n * safe to use in a context where the referred-to resource is interpreted as\n * trusted code, e.g., as the src of a script tag.\n *\n * Instances of this type must be created via the factory methods\n * (`goog.html.SafeUrl.fromConstant`, `goog.html.SafeUrl.sanitize`),\n * etc and not by invoking its constructor. The constructor intentionally takes\n * an extra parameter that cannot be constructed outside of this file and the\n * type is immutable; hence only a default instance corresponding to the empty\n * string can be obtained via constructor invocation.\n *\n * @see goog.html.SafeUrl#fromConstant\n * @see goog.html.SafeUrl#from\n * @see goog.html.SafeUrl#sanitize\n * @final\n * @struct\n * @implements {goog.string.TypedString}\n */\ngoog.html.SafeUrl = class {\n /**\n * @param {string} value\n * @param {!Object} token package-internal implementation detail.\n */\n constructor(value, token) {\n /**\n * The contained value of this SafeUrl. The field has a purposely ugly\n * name to make (non-compiled) code that attempts to directly access this\n * field stand out.\n * @private {string}\n */\n this.privateDoNotAccessOrElseSafeUrlWrappedValue_ =\n (token === goog.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_) ? value : '';\n }\n\n /**\n * Returns a string-representation of this value.\n *\n * To obtain the actual string value wrapped in a SafeUrl, use\n * `goog.html.SafeUrl.unwrap`.\n *\n * @return {string}\n * @see goog.html.SafeUrl#unwrap\n * @override\n */\n toString() {\n return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString();\n }\n};\n\n\n/**\n * The innocuous string generated by goog.html.SafeUrl.sanitize when passed\n * an unsafe URL.\n *\n * about:invalid is registered in\n * http://www.w3.org/TR/css3-values/#about-invalid.\n * http://tools.ietf.org/html/rfc6694#section-2.2.1 permits about URLs to\n * contain a fragment, which is not to be considered when determining if an\n * about URL is well-known.\n *\n * Using about:invalid seems preferable to using a fixed data URL, since\n * browsers might choose to not report CSP violations on it, as legitimate\n * CSS function calls to attr() can result in this URL being produced. It is\n * also a standard URL which matches exactly the semantics we need:\n * \"The about:invalid URI references a non-existent document with a generic\n * error condition. It can be used when a URI is necessary, but the default\n * value shouldn't be resolveable as any type of document\".\n *\n * @const {string}\n */\ngoog.html.SafeUrl.INNOCUOUS_STRING = 'about:invalid#zClosurez';\n\n\n/**\n * @override\n * @const\n */\ngoog.html.SafeUrl.prototype.implementsGoogStringTypedString = true;\n\n\n/**\n * Returns this SafeUrl's value as a string.\n *\n * IMPORTANT: In code where it is security relevant that an object's type is\n * indeed `SafeUrl`, use `goog.html.SafeUrl.unwrap` instead of this\n * method. If in doubt, assume that it's security relevant. In particular, note\n * that goog.html functions which return a goog.html type do not guarantee that\n * the returned instance is of the right type.\n *\n * IMPORTANT: The guarantees of the SafeUrl type contract only extend to the\n * behavior of browsers when interpreting URLs. Values of SafeUrl objects MUST\n * be appropriately escaped before embedding in a HTML document. Note that the\n * required escaping is context-sensitive (e.g. a different escaping is\n * required for embedding a URL in a style property within a style\n * attribute, as opposed to embedding in a href attribute).\n *\n * @see goog.html.SafeUrl#unwrap\n * @override\n */\ngoog.html.SafeUrl.prototype.getTypedStringValue = function() {\n 'use strict';\n return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString();\n};\n\n/**\n * Performs a runtime check that the provided object is indeed a SafeUrl\n * object, and returns its value.\n *\n * IMPORTANT: The guarantees of the SafeUrl type contract only extend to the\n * behavior of browsers when interpreting URLs. Values of SafeUrl objects MUST\n * be appropriately escaped before embedding in a HTML document. Note that the\n * required escaping is context-sensitive (e.g. a different escaping is\n * required for embedding a URL in a style property within a style\n * attribute, as opposed to embedding in a href attribute).\n *\n * @param {!goog.html.SafeUrl} safeUrl The object to extract from.\n * @return {string} The SafeUrl object's contained string, unless the run-time\n * type check fails. In that case, `unwrap` returns an innocuous\n * string, or, if assertions are enabled, throws\n * `goog.asserts.AssertionError`.\n */\ngoog.html.SafeUrl.unwrap = function(safeUrl) {\n 'use strict';\n // Perform additional Run-time type-checking to ensure that safeUrl is indeed\n // an instance of the expected type. This provides some additional protection\n // against security bugs due to application code that disables type checks.\n // Specifically, the following checks are performed:\n // 1. The object is an instance of the expected type.\n // 2. The object is not an instance of a subclass.\n if (safeUrl instanceof goog.html.SafeUrl &&\n safeUrl.constructor === goog.html.SafeUrl) {\n return safeUrl.privateDoNotAccessOrElseSafeUrlWrappedValue_;\n } else {\n goog.asserts.fail(\n 'expected object of type SafeUrl, got \\'' + safeUrl + '\\' of type ' +\n goog.typeOf(safeUrl));\n return 'type_error:SafeUrl';\n }\n};\n\n\n/**\n * Creates a SafeUrl object from a compile-time constant string.\n *\n * Compile-time constant strings are inherently program-controlled and hence\n * trusted.\n *\n * @param {!goog.string.Const} url A compile-time-constant string from which to\n * create a SafeUrl.\n * @return {!goog.html.SafeUrl} A SafeUrl object initialized to `url`.\n */\ngoog.html.SafeUrl.fromConstant = function(url) {\n 'use strict';\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(\n goog.string.Const.unwrap(url));\n};\n\n\n/**\n * A pattern that matches Blob or data types that can have SafeUrls created\n * from URL.createObjectURL(blob) or via a data: URI.\n *\n * This has some parameter support (most notably, we haven't implemented the\n * more complex parts like %-encoded characters or non-alphanumerical ones for\n * simplicity's sake). The specs are fairly complex, and they don't\n * always match Chrome's behavior: we settled on a subset where we're confident\n * all parties involved agree.\n *\n * The spec is available at https://mimesniff.spec.whatwg.org/ (and see\n * https://tools.ietf.org/html/rfc2397 for data: urls, which override some of\n * it).\n * @const\n * @private\n */\ngoog.html.SAFE_MIME_TYPE_PATTERN_ = new RegExp(\n // Note: Due to content-sniffing concerns, only add MIME types for\n // media formats.\n '^(?:audio/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|' +\n 'font/\\\\w+|' +\n 'image/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon|heic|heif)|' +\n 'video/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))' +\n '(?:;\\\\w+=(?:\\\\w+|\"[\\\\w;,= ]+\"))*$', // MIME type parameters\n 'i');\n\n\n/**\n * @param {string} mimeType The MIME type to check if safe.\n * @return {boolean} True if the MIME type is safe and creating a Blob via\n * `SafeUrl.fromBlob()` with that type will not fail due to the type. False\n * otherwise.\n */\ngoog.html.SafeUrl.isSafeMimeType = function(mimeType) {\n 'use strict';\n return goog.html.SAFE_MIME_TYPE_PATTERN_.test(mimeType);\n};\n\n\n/**\n * Creates a SafeUrl wrapping a blob URL for the given `blob`.\n *\n * The blob URL is created with `URL.createObjectURL`. If the MIME type\n * for `blob` is not of a known safe audio, image or video MIME type,\n * then the SafeUrl will wrap {@link #INNOCUOUS_STRING}.\n *\n * Note: Call {@link revokeObjectUrl} on the URL after it's used\n * to prevent memory leaks.\n *\n * @see http://www.w3.org/TR/FileAPI/#url\n * @param {!Blob} blob\n * @return {!goog.html.SafeUrl} The blob URL, or an innocuous string wrapped\n * as a SafeUrl.\n */\ngoog.html.SafeUrl.fromBlob = function(blob) {\n 'use strict';\n var url = goog.html.SafeUrl.isSafeMimeType(blob.type) ?\n goog.fs.url.createObjectUrl(blob) :\n goog.html.SafeUrl.INNOCUOUS_STRING;\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);\n};\n\n\n/**\n * Revokes an object URL created for a safe URL created {@link fromBlob()}.\n * @param {!goog.html.SafeUrl} safeUrl SafeUrl wrapping a blob object.\n * @return {void}\n */\ngoog.html.SafeUrl.revokeObjectUrl = function(safeUrl) {\n 'use strict';\n var url = safeUrl.getTypedStringValue();\n if (url !== goog.html.SafeUrl.INNOCUOUS_STRING) {\n goog.fs.url.revokeObjectUrl(url);\n }\n};\n\n\n/**\n * Creates a SafeUrl wrapping a blob URL created for a MediaSource.\n * @param {!MediaSource} mediaSource\n * @return {!goog.html.SafeUrl} The blob URL.\n */\ngoog.html.SafeUrl.fromMediaSource = function(mediaSource) {\n 'use strict';\n goog.asserts.assert(\n 'MediaSource' in goog.global, 'No support for MediaSource');\n const url = mediaSource instanceof MediaSource ?\n goog.fs.url.createObjectUrl(mediaSource) :\n goog.html.SafeUrl.INNOCUOUS_STRING;\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);\n};\n\n\n/**\n * Matches a base-64 data URL, with the first match group being the MIME type.\n * @const\n * @private\n */\ngoog.html.DATA_URL_PATTERN_ = /^data:(.*);base64,[a-z0-9+\\/]+=*$/i;\n\n\n/**\n * Attempts to create a SafeUrl wrapping a `data:` URL, after validating it\n * matches a known-safe media MIME type. If it doesn't match, return `null`.\n *\n * @param {string} dataUrl A valid base64 data URL with one of the whitelisted\n * media MIME types.\n * @return {?goog.html.SafeUrl} A matching safe URL, or `null` if it does not\n * pass.\n */\ngoog.html.SafeUrl.tryFromDataUrl = function(dataUrl) {\n 'use strict';\n // For defensive purposes, in case users cast around the parameter type.\n dataUrl = String(dataUrl);\n // RFC4648 suggest to ignore CRLF in base64 encoding.\n // See https://tools.ietf.org/html/rfc4648.\n // Remove the CR (%0D) and LF (%0A) from the dataUrl.\n var filteredDataUrl = dataUrl.replace(/(%0A|%0D)/g, '');\n var match = filteredDataUrl.match(goog.html.DATA_URL_PATTERN_);\n // Note: The only risk of XSS here is if the `data:` URL results in a\n // same-origin document. In which case content-sniffing might cause the\n // browser to interpret the contents as html.\n // All modern browsers consider `data:` URL documents to have unique empty\n // origins. Only Firefox for versions prior to v57 behaves differently:\n // https://blog.mozilla.org/security/2017/10/04/treating-data-urls-unique-origins-firefox-57/\n // Older versions of IE don't understand `data:` urls, so it is not an issue.\n if (match) {\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(\n filteredDataUrl);\n }\n return null;\n};\n\n\n/**\n * Creates a SafeUrl wrapping a `data:` URL, after validating it matches a\n * known-safe media MIME type. If it doesn't match, return\n * `goog.html.SafeUrl.INNOCUOUS_URL`.\n *\n * @param {string} dataUrl A valid base64 data URL with one of the whitelisted\n * media MIME types.\n * @return {!goog.html.SafeUrl} A matching safe URL, or\n * `goog.html.SafeUrl.INNOCUOUS_URL` if it does not pass.\n */\ngoog.html.SafeUrl.fromDataUrl = function(dataUrl) {\n 'use strict';\n return goog.html.SafeUrl.tryFromDataUrl(dataUrl) ||\n goog.html.SafeUrl.INNOCUOUS_URL;\n};\n\n\n/**\n * Creates a SafeUrl wrapping a tel: URL.\n *\n * @param {string} telUrl A tel URL.\n * @return {!goog.html.SafeUrl} A matching safe URL, or {@link INNOCUOUS_STRING}\n * wrapped as a SafeUrl if it does not pass.\n */\ngoog.html.SafeUrl.fromTelUrl = function(telUrl) {\n 'use strict';\n // There's a risk that a tel: URL could immediately place a call once\n // clicked, without requiring user confirmation. For that reason it is\n // handled in this separate function.\n if (!goog.string.internal.caseInsensitiveStartsWith(telUrl, 'tel:')) {\n telUrl = goog.html.SafeUrl.INNOCUOUS_STRING;\n }\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(\n telUrl);\n};\n\n\n/**\n * Matches a sip/sips URL. We only allow urls that consist of an email address.\n * The characters '?' and '#' are not allowed in the local part of the email\n * address.\n * @const\n * @private\n */\ngoog.html.SIP_URL_PATTERN_ = new RegExp(\n '^sip[s]?:[+a-z0-9_.!$%&\\'*\\\\/=^`{|}~-]+@([a-z0-9-]+\\\\.)+[a-z0-9]{2,63}$',\n 'i');\n\n\n/**\n * Creates a SafeUrl wrapping a sip: URL. We only allow urls that consist of an\n * email address. The characters '?' and '#' are not allowed in the local part\n * of the email address.\n *\n * @param {string} sipUrl A sip URL.\n * @return {!goog.html.SafeUrl} A matching safe URL, or {@link INNOCUOUS_STRING}\n * wrapped as a SafeUrl if it does not pass.\n */\ngoog.html.SafeUrl.fromSipUrl = function(sipUrl) {\n 'use strict';\n if (!goog.html.SIP_URL_PATTERN_.test(decodeURIComponent(sipUrl))) {\n sipUrl = goog.html.SafeUrl.INNOCUOUS_STRING;\n }\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(\n sipUrl);\n};\n\n\n/**\n * Creates a SafeUrl wrapping a fb-messenger://share URL.\n *\n * @param {string} facebookMessengerUrl A facebook messenger URL.\n * @return {!goog.html.SafeUrl} A matching safe URL, or {@link INNOCUOUS_STRING}\n * wrapped as a SafeUrl if it does not pass.\n */\ngoog.html.SafeUrl.fromFacebookMessengerUrl = function(facebookMessengerUrl) {\n 'use strict';\n if (!goog.string.internal.caseInsensitiveStartsWith(\n facebookMessengerUrl, 'fb-messenger://share')) {\n facebookMessengerUrl = goog.html.SafeUrl.INNOCUOUS_STRING;\n }\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(\n facebookMessengerUrl);\n};\n\n/**\n * Creates a SafeUrl wrapping a whatsapp://send URL.\n *\n * @param {string} whatsAppUrl A WhatsApp URL.\n * @return {!goog.html.SafeUrl} A matching safe URL, or {@link INNOCUOUS_STRING}\n * wrapped as a SafeUrl if it does not pass.\n */\ngoog.html.SafeUrl.fromWhatsAppUrl = function(whatsAppUrl) {\n 'use strict';\n if (!goog.string.internal.caseInsensitiveStartsWith(\n whatsAppUrl, 'whatsapp://send')) {\n whatsAppUrl = goog.html.SafeUrl.INNOCUOUS_STRING;\n }\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(\n whatsAppUrl);\n};\n\n/**\n * Creates a SafeUrl wrapping a sms: URL.\n *\n * @param {string} smsUrl A sms URL.\n * @return {!goog.html.SafeUrl} A matching safe URL, or {@link INNOCUOUS_STRING}\n * wrapped as a SafeUrl if it does not pass.\n */\ngoog.html.SafeUrl.fromSmsUrl = function(smsUrl) {\n 'use strict';\n if (!goog.string.internal.caseInsensitiveStartsWith(smsUrl, 'sms:') ||\n !goog.html.SafeUrl.isSmsUrlBodyValid_(smsUrl)) {\n smsUrl = goog.html.SafeUrl.INNOCUOUS_STRING;\n }\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(\n smsUrl);\n};\n\n\n/**\n * Validates SMS URL `body` parameter, which is optional and should appear at\n * most once and should be percent-encoded if present. Rejects many malformed\n * bodies, but may spuriously reject some URLs and does not reject all malformed\n * sms: URLs.\n *\n * @param {string} smsUrl A sms URL.\n * @return {boolean} Whether SMS URL has a valid `body` parameter if it exists.\n * @private\n */\ngoog.html.SafeUrl.isSmsUrlBodyValid_ = function(smsUrl) {\n 'use strict';\n var hash = smsUrl.indexOf('#');\n if (hash > 0) {\n smsUrl = smsUrl.substring(0, hash);\n }\n var bodyParams = smsUrl.match(/[?&]body=/gi);\n // \"body\" param is optional\n if (!bodyParams) {\n return true;\n }\n // \"body\" MUST only appear once\n if (bodyParams.length > 1) {\n return false;\n }\n // Get the encoded `body` parameter value.\n var bodyValue = smsUrl.match(/[?&]body=([^&]*)/)[1];\n if (!bodyValue) {\n return true;\n }\n try {\n decodeURIComponent(bodyValue);\n } catch (error) {\n return false;\n }\n return /^(?:[a-z0-9\\-_.~]|%[0-9a-f]{2})+$/i.test(bodyValue);\n};\n\n\n/**\n * Creates a SafeUrl wrapping a ssh: URL.\n *\n * @param {string} sshUrl A ssh URL.\n * @return {!goog.html.SafeUrl} A matching safe URL, or {@link INNOCUOUS_STRING}\n * wrapped as a SafeUrl if it does not pass.\n */\ngoog.html.SafeUrl.fromSshUrl = function(sshUrl) {\n 'use strict';\n if (!goog.string.internal.caseInsensitiveStartsWith(sshUrl, 'ssh://')) {\n sshUrl = goog.html.SafeUrl.INNOCUOUS_STRING;\n }\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(\n sshUrl);\n};\n\n/**\n * Sanitizes a Chrome extension URL to SafeUrl, given a compile-time-constant\n * extension identifier. Can also be restricted to chrome extensions.\n *\n * @param {string} url The url to sanitize. Should start with the extension\n * scheme and the extension identifier.\n * @param {!goog.string.Const|!Array<!goog.string.Const>} extensionId The\n * extension id to accept, as a compile-time constant or an array of those.\n *\n * @return {!goog.html.SafeUrl} Either `url` if it's deemed safe, or\n * `INNOCUOUS_STRING` if it's not.\n */\ngoog.html.SafeUrl.sanitizeChromeExtensionUrl = function(url, extensionId) {\n 'use strict';\n return goog.html.SafeUrl.sanitizeExtensionUrl_(\n /^chrome-extension:\\/\\/([^\\/]+)\\//, url, extensionId);\n};\n\n/**\n * Sanitizes a Firefox extension URL to SafeUrl, given a compile-time-constant\n * extension identifier. Can also be restricted to chrome extensions.\n *\n * @param {string} url The url to sanitize. Should start with the extension\n * scheme and the extension identifier.\n * @param {!goog.string.Const|!Array<!goog.string.Const>} extensionId The\n * extension id to accept, as a compile-time constant or an array of those.\n *\n * @return {!goog.html.SafeUrl} Either `url` if it's deemed safe, or\n * `INNOCUOUS_STRING` if it's not.\n */\ngoog.html.SafeUrl.sanitizeFirefoxExtensionUrl = function(url, extensionId) {\n 'use strict';\n return goog.html.SafeUrl.sanitizeExtensionUrl_(\n /^moz-extension:\\/\\/([^\\/]+)\\//, url, extensionId);\n};\n\n/**\n * Sanitizes a Edge extension URL to SafeUrl, given a compile-time-constant\n * extension identifier. Can also be restricted to chrome extensions.\n *\n * @param {string} url The url to sanitize. Should start with the extension\n * scheme and the extension identifier.\n * @param {!goog.string.Const|!Array<!goog.string.Const>} extensionId The\n * extension id to accept, as a compile-time constant or an array of those.\n *\n * @return {!goog.html.SafeUrl} Either `url` if it's deemed safe, or\n * `INNOCUOUS_STRING` if it's not.\n */\ngoog.html.SafeUrl.sanitizeEdgeExtensionUrl = function(url, extensionId) {\n 'use strict';\n return goog.html.SafeUrl.sanitizeExtensionUrl_(\n /^ms-browser-extension:\\/\\/([^\\/]+)\\//, url, extensionId);\n};\n\n/**\n * Private helper for converting extension URLs to SafeUrl, given the scheme for\n * that particular extension type. Use the sanitizeFirefoxExtensionUrl,\n * sanitizeChromeExtensionUrl or sanitizeEdgeExtensionUrl unless you're building\n * new helpers.\n *\n * @private\n * @param {!RegExp} scheme The scheme to accept as a RegExp extracting the\n * extension identifier.\n * @param {string} url The url to sanitize. Should start with the extension\n * scheme and the extension identifier.\n * @param {!goog.string.Const|!Array<!goog.string.Const>} extensionId The\n * extension id to accept, as a compile-time constant or an array of those.\n *\n * @return {!goog.html.SafeUrl} Either `url` if it's deemed safe, or\n * `INNOCUOUS_STRING` if it's not.\n */\ngoog.html.SafeUrl.sanitizeExtensionUrl_ = function(scheme, url, extensionId) {\n 'use strict';\n var matches = scheme.exec(url);\n if (!matches) {\n url = goog.html.SafeUrl.INNOCUOUS_STRING;\n } else {\n var extractedExtensionId = matches[1];\n var acceptedExtensionIds;\n if (extensionId instanceof goog.string.Const) {\n acceptedExtensionIds = [goog.string.Const.unwrap(extensionId)];\n } else {\n acceptedExtensionIds = extensionId.map(function unwrap(x) {\n 'use strict';\n return goog.string.Const.unwrap(x);\n });\n }\n if (acceptedExtensionIds.indexOf(extractedExtensionId) == -1) {\n url = goog.html.SafeUrl.INNOCUOUS_STRING;\n }\n }\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);\n};\n\n\n/**\n * Creates a SafeUrl from TrustedResourceUrl. This is safe because\n * TrustedResourceUrl is more tightly restricted than SafeUrl.\n *\n * @param {!goog.html.TrustedResourceUrl} trustedResourceUrl\n * @return {!goog.html.SafeUrl}\n */\ngoog.html.SafeUrl.fromTrustedResourceUrl = function(trustedResourceUrl) {\n 'use strict';\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(\n goog.html.TrustedResourceUrl.unwrap(trustedResourceUrl));\n};\n\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that satisfy\n * the SafeUrl contract.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either a protocol in a whitelist (http, https, mailto or ftp).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n *\n * @private\n * @const {!RegExp}\n */\ngoog.html.SAFE_URL_PATTERN_ =\n /^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;\n\n/**\n * Public version of goog.html.SAFE_URL_PATTERN_. Updating\n * goog.html.SAFE_URL_PATTERN_ doesn't seem to be backward compatible.\n * Namespace is also changed to goog.html.SafeUrl so it can be imported using\n * goog.require('goog.dom.SafeUrl').\n *\n * TODO(bangert): Remove SAFE_URL_PATTERN_\n * @const {!RegExp}\n */\ngoog.html.SafeUrl.SAFE_URL_PATTERN = goog.html.SAFE_URL_PATTERN_;\n\n/**\n * Attempts to create a SafeUrl object from `url`. The input string is validated\n * to match a pattern of commonly used safe URLs. If validation fails, `null` is\n * returned.\n *\n * `url` may be a URL with the `http:`, `https:`, `mailto:`, `ftp:` or `data`\n * scheme, or a relative URL (i.e., a URL without a scheme; specifically, a\n * scheme-relative, absolute-path-relative, or path-relative URL).\n *\n * @see http://url.spec.whatwg.org/#concept-relative-url\n * @param {string|!goog.string.TypedString} url The URL to validate.\n * @return {?goog.html.SafeUrl} The validated URL, wrapped as a SafeUrl, or null\n * if validation fails.\n */\ngoog.html.SafeUrl.trySanitize = function(url) {\n 'use strict';\n if (url instanceof goog.html.SafeUrl) {\n return url;\n }\n if (typeof url == 'object' && url.implementsGoogStringTypedString) {\n url = /** @type {!goog.string.TypedString} */ (url).getTypedStringValue();\n } else {\n // For defensive purposes, in case users cast around the parameter type.\n url = String(url);\n }\n if (!goog.html.SAFE_URL_PATTERN_.test(url)) {\n return goog.html.SafeUrl.tryFromDataUrl(url);\n }\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);\n};\n\n/**\n * Creates a SafeUrl object from `url`. If `url` is a\n * `goog.html.SafeUrl` then it is simply returned. Otherwise the input string is\n * validated to match a pattern of commonly used safe URLs. If validation fails,\n * `goog.html.SafeUrl.INNOCUOUS_URL` is returned.\n *\n * `url` may be a URL with the `http:`, `https:`, `mailto:`, `ftp:` or `data`\n * scheme, or a relative URL (i.e., a URL without a scheme; specifically, a\n * scheme-relative, absolute-path-relative, or path-relative URL).\n *\n * @see http://url.spec.whatwg.org/#concept-relative-url\n * @param {string|!goog.string.TypedString} url The URL to validate.\n * @return {!goog.html.SafeUrl} The validated URL, wrapped as a SafeUrl.\n */\ngoog.html.SafeUrl.sanitize = function(url) {\n 'use strict';\n return goog.html.SafeUrl.trySanitize(url) || goog.html.SafeUrl.INNOCUOUS_URL;\n};\n\n/**\n * Creates a SafeUrl object from `url`. If `url` is a\n * `goog.html.SafeUrl` then it is simply returned. Otherwise the input string is\n * validated to match a pattern of commonly used safe URLs.\n *\n * `url` may be a URL with the http, https, mailto or ftp scheme,\n * or a relative URL (i.e., a URL without a scheme; specifically, a\n * scheme-relative, absolute-path-relative, or path-relative URL).\n *\n * This function asserts (using goog.asserts) that the URL matches this pattern.\n * If it does not, in addition to failing the assert, an innocuous URL will be\n * returned.\n *\n * @see http://url.spec.whatwg.org/#concept-relative-url\n * @param {string|!goog.string.TypedString} url The URL to validate.\n * @param {boolean=} opt_allowDataUrl Whether to allow valid data: URLs.\n * @return {!goog.html.SafeUrl} The validated URL, wrapped as a SafeUrl.\n */\ngoog.html.SafeUrl.sanitizeAssertUnchanged = function(url, opt_allowDataUrl) {\n 'use strict';\n if (url instanceof goog.html.SafeUrl) {\n return url;\n } else if (typeof url == 'object' && url.implementsGoogStringTypedString) {\n url = /** @type {!goog.string.TypedString} */ (url).getTypedStringValue();\n } else {\n url = String(url);\n }\n if (opt_allowDataUrl && /^data:/i.test(url)) {\n var safeUrl = goog.html.SafeUrl.fromDataUrl(url);\n if (safeUrl.getTypedStringValue() == url) {\n return safeUrl;\n }\n }\n if (!goog.asserts.assert(\n goog.html.SAFE_URL_PATTERN_.test(url),\n '%s does not match the safe URL pattern', url)) {\n url = goog.html.SafeUrl.INNOCUOUS_STRING;\n }\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);\n};\n\n/**\n * Extracts the scheme from the given URL. If the URL is relative, https: is\n * assumed.\n * @param {string} url The URL to extract the scheme from.\n * @return {string|undefined} the URL scheme.\n */\ngoog.html.SafeUrl.extractScheme = function(url) {\n let parsedUrl;\n try {\n parsedUrl = new URL(url);\n } catch (e) {\n // According to https://url.spec.whatwg.org/#constructors, the URL\n // constructor with one parameter throws if `url` is not absolute. In this\n // case, we are sure that no explicit scheme (javascript: ) is set.\n // This can also be a URL parsing error, but in this case the URL won't be\n // run anyway.\n return 'https:';\n }\n return parsedUrl.protocol;\n};\n\n/**\n * Creates a SafeUrl object from `url`. If `url` is a\n * `goog.html.SafeUrl` then it is simply returned. Otherwise javascript: URLs\n * are rejected.\n *\n * This function asserts (using goog.asserts) that the URL scheme is not\n * javascript. If it is, in addition to failing the assert, an innocuous URL\n * will be returned.\n *\n * @see http://url.spec.whatwg.org/#concept-relative-url\n * @param {string|!goog.string.TypedString} url The URL to validate.\n * @return {!goog.html.SafeUrl} The validated URL, wrapped as a SafeUrl.\n */\ngoog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged = function(url) {\n 'use strict';\n if (url instanceof goog.html.SafeUrl) {\n return url;\n } else if (typeof url == 'object' && url.implementsGoogStringTypedString) {\n url = /** @type {!goog.string.TypedString} */ (url).getTypedStringValue();\n } else {\n url = String(url);\n }\n // We don't rely on goog.url here to prevent a dependency cycle.\n const parsedScheme = goog.html.SafeUrl.extractScheme(url);\n if (!goog.asserts.assert(\n parsedScheme !== 'javascript:', '%s is a javascript: URL', url)) {\n url = goog.html.SafeUrl.INNOCUOUS_STRING;\n }\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);\n};\n\n/**\n * Token used to ensure that object is created only from this file. No code\n * outside of this file can access this token.\n * @private {!Object}\n * @const\n */\ngoog.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_ = {};\n\n/**\n * Package-internal utility method to create SafeUrl instances.\n *\n * @param {string} url The string to initialize the SafeUrl object with.\n * @return {!goog.html.SafeUrl} The initialized SafeUrl object.\n * @package\n */\ngoog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse = function(\n url) {\n 'use strict';\n return new goog.html.SafeUrl(\n url, goog.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_);\n};\n\n\n/**\n * `INNOCUOUS_STRING` wrapped in a `SafeUrl`.\n * @const {!goog.html.SafeUrl}\n */\ngoog.html.SafeUrl.INNOCUOUS_URL =\n goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(\n goog.html.SafeUrl.INNOCUOUS_STRING);\n\n\n/**\n * A SafeUrl corresponding to the special about:blank url.\n * @const {!goog.html.SafeUrl}\n */\ngoog.html.SafeUrl.ABOUT_BLANK =\n goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(\n 'about:blank');\n"],
8
+ "names":["goog","provide","require","html","SafeUrl","constructor","value","token","privateDoNotAccessOrElseSafeUrlWrappedValue_","CONSTRUCTOR_TOKEN_PRIVATE_","toString","INNOCUOUS_STRING","prototype","implementsGoogStringTypedString","getTypedStringValue","goog.html.SafeUrl.prototype.getTypedStringValue","unwrap","goog.html.SafeUrl.unwrap","safeUrl","asserts","fail","typeOf","fromConstant","goog.html.SafeUrl.fromConstant","url","createSafeUrlSecurityPrivateDoNotAccessOrElse","string","Const","SAFE_MIME_TYPE_PATTERN_","RegExp","isSafeMimeType","goog.html.SafeUrl.isSafeMimeType","mimeType","test","fromBlob","goog.html.SafeUrl.fromBlob","blob","type","fs","createObjectUrl","revokeObjectUrl","goog.html.SafeUrl.revokeObjectUrl","fromMediaSource","goog.html.SafeUrl.fromMediaSource","mediaSource","assert","global","MediaSource","DATA_URL_PATTERN_","tryFromDataUrl","goog.html.SafeUrl.tryFromDataUrl","dataUrl","String","filteredDataUrl","replace","match","fromDataUrl","goog.html.SafeUrl.fromDataUrl","INNOCUOUS_URL","fromTelUrl","goog.html.SafeUrl.fromTelUrl","telUrl","internal","caseInsensitiveStartsWith","SIP_URL_PATTERN_","fromSipUrl","goog.html.SafeUrl.fromSipUrl","sipUrl","decodeURIComponent","fromFacebookMessengerUrl","goog.html.SafeUrl.fromFacebookMessengerUrl","facebookMessengerUrl","fromWhatsAppUrl","goog.html.SafeUrl.fromWhatsAppUrl","whatsAppUrl","fromSmsUrl","goog.html.SafeUrl.fromSmsUrl","smsUrl","isSmsUrlBodyValid_","goog.html.SafeUrl.isSmsUrlBodyValid_","hash","indexOf","substring","bodyParams","length","bodyValue","error","fromSshUrl","goog.html.SafeUrl.fromSshUrl","sshUrl","sanitizeChromeExtensionUrl","goog.html.SafeUrl.sanitizeChromeExtensionUrl","extensionId","sanitizeExtensionUrl_","sanitizeFirefoxExtensionUrl","goog.html.SafeUrl.sanitizeFirefoxExtensionUrl","sanitizeEdgeExtensionUrl","goog.html.SafeUrl.sanitizeEdgeExtensionUrl","goog.html.SafeUrl.sanitizeExtensionUrl_","scheme","matches","exec","extractedExtensionId","acceptedExtensionIds","map","x","fromTrustedResourceUrl","goog.html.SafeUrl.fromTrustedResourceUrl","trustedResourceUrl","TrustedResourceUrl","SAFE_URL_PATTERN_","SAFE_URL_PATTERN","trySanitize","goog.html.SafeUrl.trySanitize","sanitize","goog.html.SafeUrl.sanitize","sanitizeAssertUnchanged","goog.html.SafeUrl.sanitizeAssertUnchanged","opt_allowDataUrl","extractScheme","goog.html.SafeUrl.extractScheme","parsedUrl","URL","e","protocol","sanitizeJavascriptUrlAssertUnchanged","goog.html.SafeUrl.sanitizeJavascriptUrlAssertUnchanged","parsedScheme","goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse","ABOUT_BLANK"]
9
+ }
@@ -0,0 +1,123 @@
1
+ import "./cljs_env.js";
2
+ import "./goog.asserts.asserts.js";
3
+ import "./goog.fs.blob.js";
4
+ import "./goog.fs.url.js";
5
+ import "./goog.html.safescript.js";
6
+ import "./goog.html.trustedtypes.js";
7
+ import "./goog.string.const.js";
8
+ import "./goog.string.typedstring.js";
9
+ goog.provide("goog.html.TrustedResourceUrl");
10
+ goog.require("goog.asserts");
11
+ goog.require("goog.fs.blob");
12
+ goog.require("goog.fs.url");
13
+ goog.require("goog.html.SafeScript");
14
+ goog.require("goog.html.trustedtypes");
15
+ goog.require("goog.string.Const");
16
+ goog.require("goog.string.TypedString");
17
+ goog.html.TrustedResourceUrl = class {
18
+ constructor(value, token) {
19
+ this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = token === goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_ ? value : "";
20
+ }
21
+ toString() {
22
+ return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ + "";
23
+ }
24
+ };
25
+ goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString = true;
26
+ goog.html.TrustedResourceUrl.prototype.getTypedStringValue = function() {
27
+ return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString();
28
+ };
29
+ goog.html.TrustedResourceUrl.prototype.cloneWithParams = function(searchParams, opt_hashParams) {
30
+ var url = goog.html.TrustedResourceUrl.unwrap(this);
31
+ var parts = goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(url);
32
+ var urlBase = parts[1];
33
+ var urlSearch = parts[2] || "";
34
+ var urlHash = parts[3] || "";
35
+ return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(urlBase + goog.html.TrustedResourceUrl.stringifyParams_("?", urlSearch, searchParams) + goog.html.TrustedResourceUrl.stringifyParams_("#", urlHash, opt_hashParams));
36
+ };
37
+ goog.html.TrustedResourceUrl.unwrap = function(trustedResourceUrl) {
38
+ return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(trustedResourceUrl).toString();
39
+ };
40
+ goog.html.TrustedResourceUrl.unwrapTrustedScriptURL = function(trustedResourceUrl) {
41
+ if (trustedResourceUrl instanceof goog.html.TrustedResourceUrl && trustedResourceUrl.constructor === goog.html.TrustedResourceUrl) {
42
+ return trustedResourceUrl.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
43
+ } else {
44
+ goog.asserts.fail("expected object of type TrustedResourceUrl, got '" + trustedResourceUrl + "' of type " + goog.typeOf(trustedResourceUrl));
45
+ return "type_error:TrustedResourceUrl";
46
+ }
47
+ };
48
+ goog.html.TrustedResourceUrl.format = function(format, args) {
49
+ var formatStr = goog.string.Const.unwrap(format);
50
+ if (!goog.html.TrustedResourceUrl.BASE_URL_.test(formatStr)) {
51
+ throw new Error("Invalid TrustedResourceUrl format: " + formatStr);
52
+ }
53
+ var result = formatStr.replace(goog.html.TrustedResourceUrl.FORMAT_MARKER_, function(match, id) {
54
+ if (!Object.prototype.hasOwnProperty.call(args, id)) {
55
+ throw new Error('Found marker, "' + id + '", in format string, "' + formatStr + '", but no valid label mapping found ' + "in args: " + JSON.stringify(args));
56
+ }
57
+ var arg = args[id];
58
+ if (arg instanceof goog.string.Const) {
59
+ return goog.string.Const.unwrap(arg);
60
+ } else {
61
+ return encodeURIComponent(String(arg));
62
+ }
63
+ });
64
+ return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(result);
65
+ };
66
+ goog.html.TrustedResourceUrl.FORMAT_MARKER_ = /%{(\w+)}/g;
67
+ goog.html.TrustedResourceUrl.BASE_URL_ = new RegExp("^((https:)?//[0-9a-z.:[\\]-]+/" + "|/[^/\\\\]" + "|[^:/\\\\%]+/" + "|[^:/\\\\%]*[?#]" + "|about:blank#" + ")", "i");
68
+ goog.html.TrustedResourceUrl.URL_PARAM_PARSER_ = /^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/;
69
+ goog.html.TrustedResourceUrl.formatWithParams = function(format, args, searchParams, opt_hashParams) {
70
+ var url = goog.html.TrustedResourceUrl.format(format, args);
71
+ return url.cloneWithParams(searchParams, opt_hashParams);
72
+ };
73
+ goog.html.TrustedResourceUrl.fromConstant = function(url) {
74
+ return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(url));
75
+ };
76
+ goog.html.TrustedResourceUrl.fromConstants = function(parts) {
77
+ var unwrapped = "";
78
+ var i = 0;
79
+ for (; i < parts.length; i++) {
80
+ unwrapped = unwrapped + goog.string.Const.unwrap(parts[i]);
81
+ }
82
+ return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(unwrapped);
83
+ };
84
+ goog.html.TrustedResourceUrl.fromSafeScript = function(safeScript) {
85
+ var blob = goog.fs.blob.getBlobWithProperties([goog.html.SafeScript.unwrap(safeScript)], "text/javascript");
86
+ var url = goog.fs.url.createObjectUrl(blob);
87
+ return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(url);
88
+ };
89
+ goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_ = {};
90
+ goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse = function(url) {
91
+ const noinlineUrl = url;
92
+ const policy = goog.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse();
93
+ const value = policy ? policy.createScriptURL(noinlineUrl) : noinlineUrl;
94
+ return new goog.html.TrustedResourceUrl(value, goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_);
95
+ };
96
+ goog.html.TrustedResourceUrl.stringifyParams_ = function(prefix, currentString, params) {
97
+ if (params == null) {
98
+ return currentString;
99
+ }
100
+ if (typeof params === "string") {
101
+ return params ? prefix + encodeURIComponent(params) : "";
102
+ }
103
+ var key;
104
+ for (key in params) {
105
+ if (Object.prototype.hasOwnProperty.call(params, key)) {
106
+ var value = params[key];
107
+ var outputValues = Array.isArray(value) ? value : [value];
108
+ var i = 0;
109
+ for (; i < outputValues.length; i++) {
110
+ var outputValue = outputValues[i];
111
+ if (outputValue != null) {
112
+ if (!currentString) {
113
+ currentString = prefix;
114
+ }
115
+ currentString = currentString + ((currentString.length > prefix.length ? "\x26" : "") + encodeURIComponent(key) + "\x3d" + encodeURIComponent(String(outputValue)));
116
+ }
117
+ }
118
+ }
119
+ }
120
+ return currentString;
121
+ };
122
+
123
+ //# sourceMappingURL=goog.html.trustedresourceurl.js.map
@@ -0,0 +1,9 @@
1
+ {
2
+ "version":3,
3
+ "file":"goog.html.trustedresourceurl.js",
4
+ "lineCount":114,
5
+ "mappings":"AAYAA,IAAKC,CAAAA,OAAL,CAAa,8BAAb,CAAA;AAEAD,IAAKE,CAAAA,OAAL,CAAa,cAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,cAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,aAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,sBAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,wBAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,mBAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,yBAAb,CAAA;AA8BAF,IAAKG,CAAAA,IAAKC,CAAAA,kBAAV,GAA+B,KAAA;AAK7BC,aAAW,CAACC,KAAD,EAAQC,KAAR,CAAe;AAQxB,QAAKC,CAAAA,uDAAL,GACKD,KAAD,KAAWP,IAAKG,CAAAA,IAAKC,CAAAA,kBAAmBK,CAAAA,0BAAxC,GACAH,KADA,GAEA,EAHJ;AARwB;AAwB1BI,UAAQ,EAAG;AACT,WAAO,IAAKF,CAAAA,uDAAZ,GAAsE,EAAtE;AADS;AA7BkB,CAA/B;AAuCAR,IAAKG,CAAAA,IAAKC,CAAAA,kBAAmBO,CAAAA,SAAUC,CAAAA,+BAAvC,GAAyE,IAAzE;AAyBAZ,IAAKG,CAAAA,IAAKC,CAAAA,kBAAmBO,CAAAA,SAAUE,CAAAA,mBAAvC,GAA6DC,QAAQ,EAAG;AAEtE,SAAO,IAAKN,CAAAA,uDACPE,CAAAA,QADE,EAAP;AAFsE,CAAxE;AAmBAV,IAAKG,CAAAA,IAA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AD9B,GAEI9B,kBAAA,CAAmBC,MAAA,CAAOiC,WAAP,CAAnB,CAFJ;AAJuB;AAFmB;AAHO;AAFzD;AAkBA,SAAON,aAAP;AA7BiC,CADnC;;",
6
+ "sources":["goog/html/trustedresourceurl.js"],
7
+ "sourcesContent":["/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview The TrustedResourceUrl type and its builders.\n *\n * TODO(xtof): Link to document stating type contract.\n */\n\ngoog.provide('goog.html.TrustedResourceUrl');\n\ngoog.require('goog.asserts');\ngoog.require('goog.fs.blob');\ngoog.require('goog.fs.url');\ngoog.require('goog.html.SafeScript');\ngoog.require('goog.html.trustedtypes');\ngoog.require('goog.string.Const');\ngoog.require('goog.string.TypedString');\n\n\n\n/**\n * A URL which is under application control and from which script, CSS, and\n * other resources that represent executable code, can be fetched.\n *\n * Given that the URL can only be constructed from strings under application\n * control and is used to load resources, bugs resulting in a malformed URL\n * should not have a security impact and are likely to be easily detectable\n * during testing. Given the wide number of non-RFC compliant URLs in use,\n * stricter validation could prevent some applications from being able to use\n * this type.\n *\n * Instances of this type must be created via the factory method,\n * (`fromConstant`, `fromConstants`, `format` or `formatWithParams`), and not by\n * invoking its constructor. The constructor intentionally takes an extra\n * parameter that cannot be constructed outside of this file and the type is\n * immutable; hence only a default instance corresponding to the empty string\n * can be obtained via constructor invocation.\n *\n * Creating TrustedResourceUrl objects HAS SIDE-EFFECTS due to calling\n * Trusted Types Web API.\n *\n * @see goog.html.TrustedResourceUrl#fromConstant\n * @final\n * @struct\n * @implements {goog.string.TypedString}\n */\ngoog.html.TrustedResourceUrl = class {\n /**\n * @param {!TrustedScriptURL|string} value\n * @param {!Object} token package-internal implementation detail.\n */\n constructor(value, token) {\n /**\n * The contained value of this TrustedResourceUrl. The field has a\n * purposely ugly name to make (non-compiled) code that attempts to directly\n * access this field stand out.\n * @const\n * @private {!TrustedScriptURL|string}\n */\n this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ =\n (token === goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_) ?\n value :\n '';\n }\n\n /**\n * Returns a string-representation of this value.\n *\n * To obtain the actual string value wrapped in a TrustedResourceUrl, use\n * `goog.html.TrustedResourceUrl.unwrap`.\n *\n * @return {string}\n * @see goog.html.TrustedResourceUrl#unwrap\n * @override\n */\n toString() {\n return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ + '';\n }\n};\n\n\n/**\n * @override\n * @const\n */\ngoog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString = true;\n\n\n/**\n * Returns this TrustedResourceUrl's value as a string.\n *\n * IMPORTANT: In code where it is security relevant that an object's type is\n * indeed `TrustedResourceUrl`, use\n * `goog.html.TrustedResourceUrl.unwrap` instead of this method. If in\n * doubt, assume that it's security relevant. In particular, note that\n * goog.html functions which return a goog.html type do not guarantee that\n * the returned instance is of the right type. For example:\n *\n * <pre>\n * var fakeSafeHtml = new String('fake');\n * fakeSafeHtml.__proto__ = goog.html.SafeHtml.prototype;\n * var newSafeHtml = goog.html.SafeHtml.htmlEscape(fakeSafeHtml);\n * // newSafeHtml is just an alias for fakeSafeHtml, it's passed through by\n * // goog.html.SafeHtml.htmlEscape() as fakeSafeHtml instanceof\n * // goog.html.SafeHtml.\n * </pre>\n *\n * @see goog.html.TrustedResourceUrl#unwrap\n * @override\n */\ngoog.html.TrustedResourceUrl.prototype.getTypedStringValue = function() {\n 'use strict';\n return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_\n .toString();\n};\n\n\n/**\n * Creates a new TrustedResourceUrl with params added to URL. Both search and\n * hash params can be specified.\n *\n * @param {string|?Object<string, *>|undefined} searchParams Search parameters\n * to add to URL. See goog.html.TrustedResourceUrl.stringifyParams_ for\n * exact format definition.\n * @param {(string|?Object<string, *>)=} opt_hashParams Hash parameters to add\n * to URL. See goog.html.TrustedResourceUrl.stringifyParams_ for exact\n * format definition.\n * @return {!goog.html.TrustedResourceUrl} New TrustedResourceUrl with params.\n */\ngoog.html.TrustedResourceUrl.prototype.cloneWithParams = function(\n searchParams, opt_hashParams) {\n 'use strict';\n var url = goog.html.TrustedResourceUrl.unwrap(this);\n var parts = goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(url);\n var urlBase = parts[1];\n var urlSearch = parts[2] || '';\n var urlHash = parts[3] || '';\n\n return goog.html.TrustedResourceUrl\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(\n urlBase +\n goog.html.TrustedResourceUrl.stringifyParams_(\n '?', urlSearch, searchParams) +\n goog.html.TrustedResourceUrl.stringifyParams_(\n '#', urlHash, opt_hashParams));\n};\n\n/**\n * Performs a runtime check that the provided object is indeed a\n * TrustedResourceUrl object, and returns its value.\n *\n * @param {!goog.html.TrustedResourceUrl} trustedResourceUrl The object to\n * extract from.\n * @return {string} The trustedResourceUrl object's contained string, unless\n * the run-time type check fails. In that case, `unwrap` returns an\n * innocuous string, or, if assertions are enabled, throws\n * `goog.asserts.AssertionError`.\n */\ngoog.html.TrustedResourceUrl.unwrap = function(trustedResourceUrl) {\n 'use strict';\n return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(trustedResourceUrl)\n .toString();\n};\n\n\n/**\n * Unwraps value as TrustedScriptURL if supported or as a string if not.\n * @param {!goog.html.TrustedResourceUrl} trustedResourceUrl\n * @return {!TrustedScriptURL|string}\n * @see goog.html.TrustedResourceUrl.unwrap\n */\ngoog.html.TrustedResourceUrl.unwrapTrustedScriptURL = function(\n trustedResourceUrl) {\n 'use strict';\n // Perform additional Run-time type-checking to ensure that\n // trustedResourceUrl is indeed an instance of the expected type. This\n // provides some additional protection against security bugs due to\n // application code that disables type checks.\n // Specifically, the following checks are performed:\n // 1. The object is an instance of the expected type.\n // 2. The object is not an instance of a subclass.\n if (trustedResourceUrl instanceof goog.html.TrustedResourceUrl &&\n trustedResourceUrl.constructor === goog.html.TrustedResourceUrl) {\n return trustedResourceUrl\n .privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;\n } else {\n goog.asserts.fail('expected object of type TrustedResourceUrl, got \\'' +\n trustedResourceUrl + '\\' of type ' + goog.typeOf(trustedResourceUrl));\n return 'type_error:TrustedResourceUrl';\n }\n};\n\n\n/**\n * Creates a TrustedResourceUrl from a format string and arguments.\n *\n * The arguments for interpolation into the format string map labels to values.\n * Values of type `goog.string.Const` are interpolated without modifcation.\n * Values of other types are cast to string and encoded with\n * encodeURIComponent.\n *\n * `%{<label>}` markers are used in the format string to indicate locations\n * to be interpolated with the valued mapped to the given label. `<label>`\n * must contain only alphanumeric and `_` characters.\n *\n * The format string must match goog.html.TrustedResourceUrl.BASE_URL_.\n *\n * Example usage:\n *\n * var url = goog.html.TrustedResourceUrl.format(goog.string.Const.from(\n * 'https://www.google.com/search?q=%{query}'), {'query': searchTerm});\n *\n * var url = goog.html.TrustedResourceUrl.format(goog.string.Const.from(\n * '//www.youtube.com/v/%{videoId}?hl=en&fs=1%{autoplay}'), {\n * 'videoId': videoId,\n * 'autoplay': opt_autoplay ?\n * goog.string.Const.from('&autoplay=1') : goog.string.Const.EMPTY\n * });\n *\n * While this function can be used to create a TrustedResourceUrl from only\n * constants, fromConstant() and fromConstants() are generally preferable for\n * that purpose.\n *\n * @param {!goog.string.Const} format The format string.\n * @param {!Object<string, (string|number|!goog.string.Const)>} args Mapping\n * of labels to values to be interpolated into the format string.\n * goog.string.Const values are interpolated without encoding.\n * @return {!goog.html.TrustedResourceUrl}\n * @throws {!Error} On an invalid format string or if a label used in the\n * the format string is not present in args.\n */\ngoog.html.TrustedResourceUrl.format = function(format, args) {\n 'use strict';\n var formatStr = goog.string.Const.unwrap(format);\n if (!goog.html.TrustedResourceUrl.BASE_URL_.test(formatStr)) {\n throw new Error('Invalid TrustedResourceUrl format: ' + formatStr);\n }\n var result = formatStr.replace(\n goog.html.TrustedResourceUrl.FORMAT_MARKER_, function(match, id) {\n 'use strict';\n if (!Object.prototype.hasOwnProperty.call(args, id)) {\n throw new Error(\n 'Found marker, \"' + id + '\", in format string, \"' + formatStr +\n '\", but no valid label mapping found ' +\n 'in args: ' + JSON.stringify(args));\n }\n var arg = args[id];\n if (arg instanceof goog.string.Const) {\n return goog.string.Const.unwrap(arg);\n } else {\n return encodeURIComponent(String(arg));\n }\n });\n return goog.html.TrustedResourceUrl\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(result);\n};\n\n\n/**\n * @private @const {!RegExp}\n */\ngoog.html.TrustedResourceUrl.FORMAT_MARKER_ = /%{(\\w+)}/g;\n\n\n/**\n * The URL must be absolute, scheme-relative or path-absolute. So it must\n * start with:\n * - https:// followed by allowed origin characters.\n * - // followed by allowed origin characters.\n * - Any absolute or relative path.\n *\n * Based on\n * https://url.spec.whatwg.org/commit-snapshots/56b74ce7cca8883eab62e9a12666e2fac665d03d/#url-parsing\n * an initial / which is not followed by another / or \\ will end up in the \"path\n * state\" and from there it can only go to \"fragment state\" and \"query state\".\n *\n * We don't enforce a well-formed domain name. So '.' or '1.2' are valid.\n * That's ok because the origin comes from a compile-time constant.\n *\n * A regular expression is used instead of goog.uri for several reasons:\n * - Strictness. E.g. we don't want any userinfo component and we don't\n * want '/./, nor \\' in the first path component.\n * - Small trusted base. goog.uri is generic and might need to change,\n * reasoning about all the ways it can parse a URL now and in the future\n * is error-prone.\n * - Code size. We expect many calls to .format(), many of which might\n * not be using goog.uri.\n * - Simplicity. Using goog.uri would likely not result in simpler nor shorter\n * code.\n * @private @const {!RegExp}\n */\ngoog.html.TrustedResourceUrl.BASE_URL_ = new RegExp(\n '^((https:)?//[0-9a-z.:[\\\\]-]+/' // Origin.\n + '|/[^/\\\\\\\\]' // Absolute path.\n + '|[^:/\\\\\\\\%]+/' // Relative path.\n + '|[^:/\\\\\\\\%]*[?#]' // Query string or fragment.\n + '|about:blank#' // about:blank with fragment.\n + ')',\n 'i');\n\n/**\n * RegExp for splitting a URL into the base, search field, and hash field.\n *\n * @private @const {!RegExp}\n */\ngoog.html.TrustedResourceUrl.URL_PARAM_PARSER_ =\n /^([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/;\n\n\n/**\n * Formats the URL same as TrustedResourceUrl.format and then adds extra URL\n * parameters.\n *\n * Example usage:\n *\n * // Creates '//www.youtube.com/v/abc?autoplay=1' for videoId='abc' and\n * // opt_autoplay=1. Creates '//www.youtube.com/v/abc' for videoId='abc'\n * // and opt_autoplay=undefined.\n * var url = goog.html.TrustedResourceUrl.formatWithParams(\n * goog.string.Const.from('//www.youtube.com/v/%{videoId}'),\n * {'videoId': videoId},\n * {'autoplay': opt_autoplay});\n *\n * @param {!goog.string.Const} format The format string.\n * @param {!Object<string, (string|number|!goog.string.Const)>} args Mapping\n * of labels to values to be interpolated into the format string.\n * goog.string.Const values are interpolated without encoding.\n * @param {string|?Object<string, *>|undefined} searchParams Parameters to add\n * to URL. See goog.html.TrustedResourceUrl.stringifyParams_ for exact\n * format definition.\n * @param {(string|?Object<string, *>)=} opt_hashParams Hash parameters to add\n * to URL. See goog.html.TrustedResourceUrl.stringifyParams_ for exact\n * format definition.\n * @return {!goog.html.TrustedResourceUrl}\n * @throws {!Error} On an invalid format string or if a label used in the\n * the format string is not present in args.\n */\ngoog.html.TrustedResourceUrl.formatWithParams = function(\n format, args, searchParams, opt_hashParams) {\n 'use strict';\n var url = goog.html.TrustedResourceUrl.format(format, args);\n return url.cloneWithParams(searchParams, opt_hashParams);\n};\n\n\n/**\n * Creates a TrustedResourceUrl object from a compile-time constant string.\n *\n * Compile-time constant strings are inherently program-controlled and hence\n * trusted.\n *\n * @param {!goog.string.Const} url A compile-time-constant string from which to\n * create a TrustedResourceUrl.\n * @return {!goog.html.TrustedResourceUrl} A TrustedResourceUrl object\n * initialized to `url`.\n */\ngoog.html.TrustedResourceUrl.fromConstant = function(url) {\n 'use strict';\n return goog.html.TrustedResourceUrl\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(\n goog.string.Const.unwrap(url));\n};\n\n\n/**\n * Creates a TrustedResourceUrl object from a compile-time constant strings.\n *\n * Compile-time constant strings are inherently program-controlled and hence\n * trusted.\n *\n * @param {!Array<!goog.string.Const>} parts Compile-time-constant strings from\n * which to create a TrustedResourceUrl.\n * @return {!goog.html.TrustedResourceUrl} A TrustedResourceUrl object\n * initialized to concatenation of `parts`.\n */\ngoog.html.TrustedResourceUrl.fromConstants = function(parts) {\n 'use strict';\n var unwrapped = '';\n for (var i = 0; i < parts.length; i++) {\n unwrapped += goog.string.Const.unwrap(parts[i]);\n }\n return goog.html.TrustedResourceUrl\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(unwrapped);\n};\n\n/**\n * Creates a TrustedResourceUrl object by generating a Blob from a SafeScript\n * object and then calling createObjectURL with that blob.\n *\n * SafeScript objects are trusted to contain executable JavaScript code.\n *\n * Caller must call goog.fs.url.revokeObjectUrl() on the unwrapped url to\n * release the underlying blob.\n *\n * Throws if browser doesn't support blob construction.\n *\n * @param {!goog.html.SafeScript} safeScript A script from which to create a\n * TrustedResourceUrl.\n * @return {!goog.html.TrustedResourceUrl} A TrustedResourceUrl object\n * initialized to a new blob URL.\n */\ngoog.html.TrustedResourceUrl.fromSafeScript = function(safeScript) {\n 'use strict';\n var blob = goog.fs.blob.getBlobWithProperties(\n [goog.html.SafeScript.unwrap(safeScript)], 'text/javascript');\n var url = goog.fs.url.createObjectUrl(blob);\n return goog.html.TrustedResourceUrl\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(url);\n};\n\n\n/**\n * Token used to ensure that object is created only from this file. No code\n * outside of this file can access this token.\n * @private {!Object}\n * @const\n */\ngoog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_ = {};\n\n\n/**\n * Package-internal utility method to create TrustedResourceUrl instances.\n *\n * @param {string} url The string to initialize the TrustedResourceUrl object\n * with.\n * @return {!goog.html.TrustedResourceUrl} The initialized TrustedResourceUrl\n * object.\n * @package\n */\ngoog.html.TrustedResourceUrl\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse = function(url) {\n 'use strict';\n /** @noinline */\n const noinlineUrl = url;\n const policy = goog.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse();\n const value = policy ? policy.createScriptURL(noinlineUrl) : noinlineUrl;\n return new goog.html.TrustedResourceUrl(\n value, goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_);\n};\n\n\n/**\n * Stringifies the passed params to be used as either a search or hash field of\n * a URL.\n *\n * @param {string} prefix The prefix character for the given field ('?' or '#').\n * @param {string} currentString The existing field value (including the prefix\n * character, if the field is present).\n * @param {string|?Object<string, *>|undefined} params The params to set or\n * append to the field.\n * - If `undefined` or `null`, the field remains unchanged.\n * - If a string, then the string will be escaped and the field will be\n * overwritten with that value.\n * - If an Object, that object is treated as a set of key-value pairs to be\n * appended to the current field. Note that JavaScript doesn't guarantee the\n * order of values in an object which might result in non-deterministic order\n * of the parameters. However, browsers currently preserve the order. The\n * rules for each entry:\n * - If an array, it will be processed as if each entry were an additional\n * parameter with exactly the same key, following the same logic below.\n * - If `undefined` or `null`, it will be skipped.\n * - Otherwise, it will be turned into a string, escaped, and appended.\n * @return {string}\n * @private\n */\ngoog.html.TrustedResourceUrl.stringifyParams_ = function(\n prefix, currentString, params) {\n 'use strict';\n if (params == null) {\n // Do not modify the field.\n return currentString;\n }\n if (typeof params === 'string') {\n // Set field to the passed string.\n return params ? prefix + encodeURIComponent(params) : '';\n }\n // Add on parameters to field from key-value object.\n for (var key in params) {\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty#Using_hasOwnProperty_as_a_property_name\n if (Object.prototype.hasOwnProperty.call(params, key)) {\n var value = params[key];\n var outputValues = Array.isArray(value) ? value : [value];\n for (var i = 0; i < outputValues.length; i++) {\n var outputValue = outputValues[i];\n if (outputValue != null) {\n if (!currentString) {\n currentString = prefix;\n }\n currentString += (currentString.length > prefix.length ? '&' : '') +\n encodeURIComponent(key) + '=' +\n encodeURIComponent(String(outputValue));\n }\n }\n }\n }\n return currentString;\n};\n"],
8
+ "names":["goog","provide","require","html","TrustedResourceUrl","constructor","value","token","privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_","CONSTRUCTOR_TOKEN_PRIVATE_","toString","prototype","implementsGoogStringTypedString","getTypedStringValue","goog.html.TrustedResourceUrl.prototype.getTypedStringValue","cloneWithParams","goog.html.TrustedResourceUrl.prototype.cloneWithParams","searchParams","opt_hashParams","url","unwrap","parts","URL_PARAM_PARSER_","exec","urlBase","urlSearch","urlHash","createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse","stringifyParams_","goog.html.TrustedResourceUrl.unwrap","trustedResourceUrl","unwrapTrustedScriptURL","goog.html.TrustedResourceUrl.unwrapTrustedScriptURL","asserts","fail","typeOf","format","goog.html.TrustedResourceUrl.format","args","formatStr","string","Const","BASE_URL_","test","Error","result","replace","FORMAT_MARKER_","match","id","Object","hasOwnProperty","call","JSON","stringify","arg","encodeURIComponent","String","RegExp","formatWithParams","goog.html.TrustedResourceUrl.formatWithParams","fromConstant","goog.html.TrustedResourceUrl.fromConstant","fromConstants","goog.html.TrustedResourceUrl.fromConstants","unwrapped","i","length","fromSafeScript","goog.html.TrustedResourceUrl.fromSafeScript","safeScript","blob","fs","getBlobWithProperties","SafeScript","createObjectUrl","goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse","noinlineUrl","policy","trustedtypes","getPolicyPrivateDoNotAccessOrElse","createScriptURL","goog.html.TrustedResourceUrl.stringifyParams_","prefix","currentString","params","key","outputValues","Array","isArray","outputValue"]
9
+ }
@@ -0,0 +1,16 @@
1
+ import "./cljs_env.js";
2
+
3
+ goog.provide("goog.html.trustedtypes");
4
+ goog.html.trustedtypes.POLICY_NAME = goog.define("goog.html.trustedtypes.POLICY_NAME", goog.TRUSTED_TYPES_POLICY_NAME ? goog.TRUSTED_TYPES_POLICY_NAME + "#html" : "");
5
+ goog.html.trustedtypes.cachedPolicy_;
6
+ goog.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse = function() {
7
+ if (!goog.html.trustedtypes.POLICY_NAME) {
8
+ return null;
9
+ }
10
+ if (goog.html.trustedtypes.cachedPolicy_ === undefined) {
11
+ goog.html.trustedtypes.cachedPolicy_ = goog.createTrustedTypesPolicy(goog.html.trustedtypes.POLICY_NAME);
12
+ }
13
+ return goog.html.trustedtypes.cachedPolicy_;
14
+ };
15
+
16
+ //# sourceMappingURL=goog.html.trustedtypes.js.map
@@ -0,0 +1,9 @@
1
+ {
2
+ "version":3,
3
+ "file":"goog.html.trustedtypes.js",
4
+ "lineCount":13,
5
+ "mappings":"AAWAA,IAAKC,CAAAA,OAAL,CAAa,wBAAb,CAAA;AAWAD,IAAKE,CAAAA,IAAKC,CAAAA,YAAaC,CAAAA,WAAvB,GAAqCJ,IAAKK,CAAAA,MAAL,CACjC,oCADiC,EAEjCL,IAAKM,CAAAA,yBAAL,GAAiCN,IAAKM,CAAAA,yBAAtC,GAAkE,OAAlE,GACiC,EAHA,CAArC;AAWAN,IAAKE,CAAAA,IAAKC,CAAAA,YAAaI,CAAAA,aAAvB;AAQAP,IAAKE,CAAAA,IAAKC,CAAAA,YAAaK,CAAAA,iCAAvB,GAA2DC,QAAQ,EAAG;AAEpE,MAAI,CAACT,IAAKE,CAAAA,IAAKC,CAAAA,YAAaC,CAAAA,WAA5B;AAEE,WAAO,IAAP;AAFF;AAKA,MAAIJ,IAAKE,CAAAA,IAAKC,CAAAA,YAAaI,CAAAA,aAA3B,KAA6CG,SAA7C;AACEV,QAAKE,CAAAA,IAAKC,CAAAA,YAAaI,CAAAA,aAAvB,GACIP,IAAKW,CAAAA,wBAAL,CAA8BX,IAAKE,CAAAA,IAAKC,CAAAA,YAAaC,CAAAA,WAArD,CADJ;AADF;AAKA,SAAOJ,IAAKE,CAAAA,IAAKC,CAAAA,YAAaI,CAAAA,aAA9B;AAZoE,CAAtE;;",
6
+ "sources":["goog/html/trustedtypes.js"],
7
+ "sourcesContent":["/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Policy to convert strings to Trusted Types. See\n * https://github.com/WICG/trusted-types for details.\n */\n\ngoog.provide('goog.html.trustedtypes');\n\n\n/**\n * @define {string} Name for the Trusted Types policy used in Closure Safe\n * Types. Differs from `goog.TRUSTED_TYPES_POLICY_NAME` in that the latter is\n * also used for other purposes like the debug loader. If empty, Closure Safe\n * Types will not use Trusted Types. Default is `goog.TRUSTED_TYPES_POLICY_NAME`\n * plus the suffix `#html`, unless `goog.TRUSTED_TYPES_POLICY_NAME` is empty.\n * @package\n */\ngoog.html.trustedtypes.POLICY_NAME = goog.define(\n 'goog.html.trustedtypes.POLICY_NAME',\n goog.TRUSTED_TYPES_POLICY_NAME ? goog.TRUSTED_TYPES_POLICY_NAME + '#html' :\n '');\n\n\n/**\n * Cached result of goog.createTrustedTypesPolicy.\n * @type {?TrustedTypePolicy|undefined}\n * @private\n */\ngoog.html.trustedtypes.cachedPolicy_;\n\n\n/**\n * Creates a (singleton) Trusted Type Policy for Safe HTML Types.\n * @return {?TrustedTypePolicy}\n * @package\n */\ngoog.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse = function() {\n 'use strict';\n if (!goog.html.trustedtypes.POLICY_NAME) {\n // Binary not configured for Trusted Types.\n return null;\n }\n\n if (goog.html.trustedtypes.cachedPolicy_ === undefined) {\n goog.html.trustedtypes.cachedPolicy_ =\n goog.createTrustedTypesPolicy(goog.html.trustedtypes.POLICY_NAME);\n }\n\n return goog.html.trustedtypes.cachedPolicy_;\n};\n"],
8
+ "names":["goog","provide","html","trustedtypes","POLICY_NAME","define","TRUSTED_TYPES_POLICY_NAME","cachedPolicy_","getPolicyPrivateDoNotAccessOrElse","goog.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse","undefined","createTrustedTypesPolicy"]
9
+ }
@@ -0,0 +1,52 @@
1
+ import "./cljs_env.js";
2
+ import "./goog.asserts.asserts.js";
3
+ import "./goog.html.safehtml.js";
4
+ import "./goog.html.safescript.js";
5
+ import "./goog.html.safestyle.js";
6
+ import "./goog.html.safestylesheet.js";
7
+ import "./goog.html.safeurl.js";
8
+ import "./goog.html.trustedresourceurl.js";
9
+ import "./goog.string.const.js";
10
+ import "./goog.string.internal.js";
11
+ goog.provide("goog.html.uncheckedconversions");
12
+ goog.require("goog.asserts");
13
+ goog.require("goog.html.SafeHtml");
14
+ goog.require("goog.html.SafeScript");
15
+ goog.require("goog.html.SafeStyle");
16
+ goog.require("goog.html.SafeStyleSheet");
17
+ goog.require("goog.html.SafeUrl");
18
+ goog.require("goog.html.TrustedResourceUrl");
19
+ goog.require("goog.string.Const");
20
+ goog.require("goog.string.internal");
21
+ goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract = function(justification, html) {
22
+ goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
23
+ goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
24
+ return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(html);
25
+ };
26
+ goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract = function(justification, script) {
27
+ goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
28
+ goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
29
+ return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(script);
30
+ };
31
+ goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract = function(justification, style) {
32
+ goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
33
+ goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
34
+ return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style);
35
+ };
36
+ goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract = function(justification, styleSheet) {
37
+ goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
38
+ goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
39
+ return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(styleSheet);
40
+ };
41
+ goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract = function(justification, url) {
42
+ goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
43
+ goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
44
+ return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);
45
+ };
46
+ goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract = function(justification, url) {
47
+ goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
48
+ goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
49
+ return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(url);
50
+ };
51
+
52
+ //# sourceMappingURL=goog.html.uncheckedconversions.js.map
@@ -0,0 +1,9 @@
1
+ {
2
+ "version":3,
3
+ "file":"goog.html.uncheckedconversions.js",
4
+ "lineCount":41,
5
+ "mappings":"AAqBAA,IAAKC,CAAAA,OAAL,CAAa,gCAAb,CAAA;AAEAD,IAAKE,CAAAA,OAAL,CAAa,cAAb,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,0BAAb,CAAA;AACAF,IAAKE,CAAAA,OAAL,CAAa,mBAAb,CAAA;AACAF,IAAKE,C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AhB,CAAqB;AAI/BnC,MAAKQ,CAAAA,OAAQC,CAAAA,YAAb,CACIT,IAAKU,CAAAA,MAAOC,CAAAA,KAAMC,CAAAA,MAAlB,CAAyBL,aAAzB,CADJ,EAC6C,4BAD7C,CAAA;AAEAP,MAAKQ,CAAAA,OAAQK,CAAAA,MAAb,CACI,CAACb,IAAKU,CAAAA,MAAOI,CAAAA,QAASC,CAAAA,mBAArB,CACGf,IAAKU,CAAAA,MAAOC,CAAAA,KAAMC,CAAAA,MAAlB,CAAyBL,aAAzB,CADH,CADL,EAGI,sCAHJ,CAAA;AAIA,SAAOP,IAAKG,CAAAA,IAAKiC,CAAAA,OAAQC,CAAAA,6CAAlB,CAAgEF,GAAhE,CAAP;AAV+B,CADjC;AA+BAnC,IAAKG,CAAAA,IAAKC,CAAAA,oBACLkC,CAAAA,sDADL,GAC8DC,QAAQ,CAClEhC,aADkE,EACnD4B,GADmD,CAC9C;AAItBnC,MAAKQ,CAAAA,OAAQC,CAAAA,YAAb,CACIT,IAAKU,CAAAA,MAAOC,CAAAA,KAAMC,CAAAA,MAAlB,CAAyBL,aAAzB,CADJ,EAC6C,4BAD7C,CAAA;AAEAP,MAAKQ,CAAAA,OAAQK,CAAAA,MAAb,CACI,CAACb,IAAKU,CAAAA,MAAOI,CAAAA,QAASC,CAAAA,mBAArB,CACGf,IAAKU,CAAAA,MAAOC,CAAAA,KAAMC,CAAAA,MAAlB,CAAyBL,aAAzB,CADH,CADL,EAGI,sCAHJ,CAAA;AAIA,SAAOP,IAAKG,CAAAA,IAAKqC,CAAAA,kBACZC,CAAAA,wDADE,CACuDN,GADvD,CAAP;AAVsB,CAFxB;;",
6
+ "sources":["goog/html/uncheckedconversions.js"],
7
+ "sourcesContent":["/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Unchecked conversions to create values of goog.html types from\n * plain strings. Use of these functions could potentially result in instances\n * of goog.html types that violate their type contracts, and hence result in\n * security vulnerabilties.\n *\n * Therefore, all uses of the methods herein must be carefully security\n * reviewed. Avoid use of the methods in this file whenever possible; instead\n * prefer to create instances of goog.html types using inherently safe builders\n * or template systems.\n *\n *\n */\n\n\ngoog.provide('goog.html.uncheckedconversions');\n\ngoog.require('goog.asserts');\ngoog.require('goog.html.SafeHtml');\ngoog.require('goog.html.SafeScript');\ngoog.require('goog.html.SafeStyle');\ngoog.require('goog.html.SafeStyleSheet');\ngoog.require('goog.html.SafeUrl');\ngoog.require('goog.html.TrustedResourceUrl');\ngoog.require('goog.string.Const');\ngoog.require('goog.string.internal');\n\n\n/**\n * Performs an \"unchecked conversion\" to SafeHtml from a plain string that is\n * known to satisfy the SafeHtml type contract.\n *\n * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure\n * that the value of `html` satisfies the SafeHtml type contract in all\n * possible program states.\n *\n *\n * @param {!goog.string.Const} justification A constant string explaining why\n * this use of this method is safe. May include a security review ticket\n * number.\n * @param {string} html A string that is claimed to adhere to the SafeHtml\n * contract.\n * @return {!goog.html.SafeHtml} The value of html, wrapped in a SafeHtml\n * object.\n */\ngoog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract =\n function(justification, html) {\n 'use strict';\n // unwrap() called inside an assert so that justification can be optimized\n // away in production code.\n goog.asserts.assertString(\n goog.string.Const.unwrap(justification), 'must provide justification');\n goog.asserts.assert(\n !goog.string.internal.isEmptyOrWhitespace(\n goog.string.Const.unwrap(justification)),\n 'must provide non-empty justification');\n return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(\n html);\n};\n\n\n/**\n * Performs an \"unchecked conversion\" to SafeScript from a plain string that is\n * known to satisfy the SafeScript type contract.\n *\n * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure\n * that the value of `script` satisfies the SafeScript type contract in\n * all possible program states.\n *\n *\n * @param {!goog.string.Const} justification A constant string explaining why\n * this use of this method is safe. May include a security review ticket\n * number.\n * @param {string} script The string to wrap as a SafeScript.\n * @return {!goog.html.SafeScript} The value of `script`, wrapped in a\n * SafeScript object.\n */\ngoog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract =\n function(justification, script) {\n 'use strict';\n // unwrap() called inside an assert so that justification can be optimized\n // away in production code.\n goog.asserts.assertString(\n goog.string.Const.unwrap(justification), 'must provide justification');\n goog.asserts.assert(\n !goog.string.internal.isEmptyOrWhitespace(\n goog.string.Const.unwrap(justification)),\n 'must provide non-empty justification');\n return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(\n script);\n};\n\n\n/**\n * Performs an \"unchecked conversion\" to SafeStyle from a plain string that is\n * known to satisfy the SafeStyle type contract.\n *\n * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure\n * that the value of `style` satisfies the SafeStyle type contract in all\n * possible program states.\n *\n *\n * @param {!goog.string.Const} justification A constant string explaining why\n * this use of this method is safe. May include a security review ticket\n * number.\n * @param {string} style The string to wrap as a SafeStyle.\n * @return {!goog.html.SafeStyle} The value of `style`, wrapped in a\n * SafeStyle object.\n */\ngoog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract =\n function(justification, style) {\n 'use strict';\n // unwrap() called inside an assert so that justification can be optimized\n // away in production code.\n goog.asserts.assertString(\n goog.string.Const.unwrap(justification), 'must provide justification');\n goog.asserts.assert(\n !goog.string.internal.isEmptyOrWhitespace(\n goog.string.Const.unwrap(justification)),\n 'must provide non-empty justification');\n return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(\n style);\n};\n\n\n/**\n * Performs an \"unchecked conversion\" to SafeStyleSheet from a plain string\n * that is known to satisfy the SafeStyleSheet type contract.\n *\n * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure\n * that the value of `styleSheet` satisfies the SafeStyleSheet type\n * contract in all possible program states.\n *\n *\n * @param {!goog.string.Const} justification A constant string explaining why\n * this use of this method is safe. May include a security review ticket\n * number.\n * @param {string} styleSheet The string to wrap as a SafeStyleSheet.\n * @return {!goog.html.SafeStyleSheet} The value of `styleSheet`, wrapped\n * in a SafeStyleSheet object.\n */\ngoog.html.uncheckedconversions\n .safeStyleSheetFromStringKnownToSatisfyTypeContract = function(\n justification, styleSheet) {\n 'use strict';\n // unwrap() called inside an assert so that justification can be optimized\n // away in production code.\n goog.asserts.assertString(\n goog.string.Const.unwrap(justification), 'must provide justification');\n goog.asserts.assert(\n !goog.string.internal.isEmptyOrWhitespace(\n goog.string.Const.unwrap(justification)),\n 'must provide non-empty justification');\n return goog.html.SafeStyleSheet\n .createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(styleSheet);\n};\n\n\n/**\n * Performs an \"unchecked conversion\" to SafeUrl from a plain string that is\n * known to satisfy the SafeUrl type contract.\n *\n * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure\n * that the value of `url` satisfies the SafeUrl type contract in all\n * possible program states.\n *\n *\n * @param {!goog.string.Const} justification A constant string explaining why\n * this use of this method is safe. May include a security review ticket\n * number.\n * @param {string} url The string to wrap as a SafeUrl.\n * @return {!goog.html.SafeUrl} The value of `url`, wrapped in a SafeUrl\n * object.\n */\ngoog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract =\n function(justification, url) {\n 'use strict';\n // unwrap() called inside an assert so that justification can be optimized\n // away in production code.\n goog.asserts.assertString(\n goog.string.Const.unwrap(justification), 'must provide justification');\n goog.asserts.assert(\n !goog.string.internal.isEmptyOrWhitespace(\n goog.string.Const.unwrap(justification)),\n 'must provide non-empty justification');\n return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);\n};\n\n\n/**\n * Performs an \"unchecked conversion\" to TrustedResourceUrl from a plain string\n * that is known to satisfy the TrustedResourceUrl type contract.\n *\n * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure\n * that the value of `url` satisfies the TrustedResourceUrl type contract\n * in all possible program states.\n *\n *\n * @param {!goog.string.Const} justification A constant string explaining why\n * this use of this method is safe. May include a security review ticket\n * number.\n * @param {string} url The string to wrap as a TrustedResourceUrl.\n * @return {!goog.html.TrustedResourceUrl} The value of `url`, wrapped in\n * a TrustedResourceUrl object.\n */\ngoog.html.uncheckedconversions\n .trustedResourceUrlFromStringKnownToSatisfyTypeContract = function(\n justification, url) {\n 'use strict';\n // unwrap() called inside an assert so that justification can be optimized\n // away in production code.\n goog.asserts.assertString(\n goog.string.Const.unwrap(justification), 'must provide justification');\n goog.asserts.assert(\n !goog.string.internal.isEmptyOrWhitespace(\n goog.string.Const.unwrap(justification)),\n 'must provide non-empty justification');\n return goog.html.TrustedResourceUrl\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(url);\n};\n"],
8
+ "names":["goog","provide","require","html","uncheckedconversions","safeHtmlFromStringKnownToSatisfyTypeContract","goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract","justification","asserts","assertString","string","Const","unwrap","assert","internal","isEmptyOrWhitespace","SafeHtml","createSafeHtmlSecurityPrivateDoNotAccessOrElse","safeScriptFromStringKnownToSatisfyTypeContract","goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract","script","SafeScript","createSafeScriptSecurityPrivateDoNotAccessOrElse","safeStyleFromStringKnownToSatisfyTypeContract","goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract","style","SafeStyle","createSafeStyleSecurityPrivateDoNotAccessOrElse","safeStyleSheetFromStringKnownToSatisfyTypeContract","goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract","styleSheet","SafeStyleSheet","createSafeStyleSheetSecurityPrivateDoNotAccessOrElse","safeUrlFromStringKnownToSatisfyTypeContract","goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract","url","SafeUrl","createSafeUrlSecurityPrivateDoNotAccessOrElse","trustedResourceUrlFromStringKnownToSatisfyTypeContract","goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract","TrustedResourceUrl","createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse"]
9
+ }