diff --git a/javascript/build/ee_api_js.js b/javascript/build/ee_api_js.js index 0dbe555e2..80b4a0aec 100644 --- a/javascript/build/ee_api_js.js +++ b/javascript/build/ee_api_js.js @@ -75,12 +75,12 @@ function $c(a){if(null==a)throw Error("Cannot deserialize, target constructor wa function Xc(a,b,c,d,e){e=d(e);for(var g=ad(a,e),f=g.P||{},l=g.s||{},m=g.Ma||{},p=n(g.keys||[]),v=p.next(),A={};!v.done;A={Vd:void 0},v=p.next()){v=v.value;var C=b(v,a);if(null!=C){var J=void 0;if(f.hasOwnProperty(v)){if(g.sh&&0===C.length)continue;J=bd(C,b,c,d,!0,!0,f[v])}else if(l.hasOwnProperty(v))J=bd(C,b,c,d,!1,!0,l[v]);else if(m.hasOwnProperty(v))A.Vd=m[v],J=A.Vd.pa?C.map(function(fa){return function(X){return cd(X,fa.Vd,b,c,d)}}(A)):cd(C,A.Vd,b,c,d);else if(Array.isArray(C)){if(g.sh&&0===C.length)continue; J=bd(C,b,c,d,!0,!1)}else J=C instanceof Qc?null:C;c(v,e,J)}}return e}function cd(a,b,c,d,e){for(var g={},f=n(Object.keys(a)),l=f.next();!l.done;l=f.next()){l=l.value;var m=a[l];null!=m&&(g[l]=bd(m,c,d,e,b.ra,b.qa,b.ka))}return g} function bd(a,b,c,d,e,g,f){if(g&&null==f)throw Error("Cannot deserialize a reference object without a constructor.");return null==a?a:e&&g?a.map(function(l){return Xc(l,b,c,d,f)}):e&&!g?a.map(function(l){return l}):!e&&g?Xc(a,b,c,d,f):a instanceof Qc?null:"object"===typeof a?JSON.parse(JSON.stringify(a)):a}function ad(a,b){if(b instanceof E)a=Sc(b.i());else if(a instanceof E)a=Sc(a.i());else throw Error("Cannot find ClassMetadata.");return a};var dd;var fd=function(a,b){if(b!==ed)throw Error("TrustedResourceUrl is not meant to be built directly");this.li=a};fd.prototype.toString=function(){return this.li+""}; -var gd=function(a){if(a instanceof fd&&a.constructor===fd)return a.li;Na("expected object of type TrustedResourceUrl, got '%s' of type %s",a,xa(a));return"type_error:TrustedResourceUrl"},ed={},hd=function(a){if(void 0===dd){var b=null;var c=r.trustedTypes;if(c&&c.createPolicy)try{b=c.createPolicy("goog#html",{createHTML:Ga,createScript:Ga,createScriptURL:Ga})}catch(d){r.console&&r.console.error(d.message)}dd=b}a=(b=dd)?b.createScriptURL(a):a;return new fd(a,ed)};var jd=function(a,b){if(b!==id)throw Error("SafeUrl is not meant to be built directly");this.ki=a};jd.prototype.toString=function(){return this.ki.toString()};var kd=function(a){if(a instanceof jd&&a.constructor===jd)return a.ki;Na("expected object of type SafeUrl, got '"+a+"' of type "+xa(a));return"type_error:SafeUrl"},id={},ld=function(a){return new jd(a,id)};ld("about:invalid#zClosurez");ld("about:blank");var md={},nd=function(){if(md!==md)throw Error("SafeStyle is not meant to be built directly");this.ql=""};nd.prototype.toString=function(){return this.ql.toString()};new nd;var od={},pd=function(){if(od!==od)throw Error("SafeStyleSheet is not meant to be built directly");this.pl=""};pd.prototype.toString=function(){return this.pl.toString()};new pd;var qd={},rd=function(){var a=r.trustedTypes&&r.trustedTypes.emptyHTML||"";if(qd!==qd)throw Error("SafeHtml is not meant to be built directly");this.ol=a};rd.prototype.toString=function(){return this.ol.toString()};new rd;/* +var gd=function(a){if(a instanceof fd&&a.constructor===fd)return a.li;Na("expected object of type TrustedResourceUrl, got '%s' of type %s",a,xa(a));return"type_error:TrustedResourceUrl"},ed={},hd=function(a){if(void 0===dd){var b=null;var c=r.trustedTypes;if(c&&c.createPolicy)try{b=c.createPolicy("goog#html",{createHTML:Ga,createScript:Ga,createScriptURL:Ga})}catch(d){r.console&&r.console.error(d.message)}dd=b}a=(b=dd)?b.createScriptURL(a):a;return new fd(a,ed)};/* SPDX-License-Identifier: Apache-2.0 */ -var sd=ia([""]),td=ja(["\x00"],["\\0"]),ud=ja(["\n"],["\\n"]),vd=ja(["\x00"],["\\u0000"]),wd=ia([""]),xd=ja(["\x00"],["\\0"]),yd=ja(["\n"],["\\n"]),zd=ja(["\x00"],["\\u0000"]);function Ad(a){return Object.isFrozen(a)&&Object.isFrozen(a.raw)}function Bd(a){return-1===a.toString().indexOf("`")}var Cd=Bd(function(a){return a(sd)})||Bd(function(a){return a(td)})||Bd(function(a){return a(ud)})||Bd(function(a){return a(vd)}),Dd=Ad(wd)&&Ad(xd)&&Ad(yd)&&Ad(zd);ld("about:blank");var Ed=ld("about:invalid#zClosurez");function Fd(a){if("undefined"!==typeof MediaSource&&a instanceof MediaSource)return ld(URL.createObjectURL(a));var b=a.type.match(/^([^;]+)(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i);if(2!==(null==b?void 0:b.length)||!(/^image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon|heic|heif|avif|x-ms-bmp)$/i.test(b[1])||/^video\/(?:mpeg|mp4|ogg|webm|x-matroska|quicktime|x-ms-wmv)$/i.test(b[1])||/^audio\/(?:3gpp2|3gpp|aac|amr|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)$/i.test(b[1])||/^font\/\w+/i.test(b[1])))throw Error("unsafe blob MIME type: "+ -a.type);return ld(URL.createObjectURL(a))}var Gd=[],Hd=function(a){console.warn("A URL with content '"+a+"' was sanitized away.")};-1===Gd.indexOf(Hd)&&Gd.push(Hd);var Id=function(a,b){this.name=a;this.value=b};Id.prototype.toString=function(){return this.name};var Jd=new Id("OFF",Infinity),Kd=new Id("SEVERE",1E3),Ld=new Id("CONFIG",700),Md=new Id("FINE",500),Nd=function(){this.Bd=0;this.clear()},Od;Nd.prototype.clear=function(){this.yd=Array(this.Bd);this.kh=-1;this.Kh=!1};var Pd=function(a,b,c){this.reset(a||Jd,b,c,void 0,void 0)};Pd.prototype.reset=function(){}; +var id=ia([""]),jd=ja(["\x00"],["\\0"]),kd=ja(["\n"],["\\n"]),ld=ja(["\x00"],["\\u0000"]),md=ia([""]),nd=ja(["\x00"],["\\0"]),od=ja(["\n"],["\\n"]),pd=ja(["\x00"],["\\u0000"]);function qd(a){return Object.isFrozen(a)&&Object.isFrozen(a.raw)}function rd(a){return-1===a.toString().indexOf("`")}var sd=rd(function(a){return a(id)})||rd(function(a){return a(jd)})||rd(function(a){return a(kd)})||rd(function(a){return a(ld)}),td=qd(md)&&qd(nd)&&qd(od)&&qd(pd);var vd=function(a,b){if(b!==ud)throw Error("SafeUrl is not meant to be built directly");this.ki=a};vd.prototype.toString=function(){return this.ki.toString()};var wd=function(a){if(a instanceof vd&&a.constructor===vd)return a.ki;Na("expected object of type SafeUrl, got '"+a+"' of type "+xa(a));return"type_error:SafeUrl"},ud={},xd=function(a){return new vd(a,ud)};xd("about:invalid#zClosurez");xd("about:blank");xd("about:blank");var yd=xd("about:invalid#zClosurez");function zd(a){if("undefined"!==typeof MediaSource&&a instanceof MediaSource)return xd(URL.createObjectURL(a));var b=a.type.match(/^([^;]+)(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i);if(2!==(null==b?void 0:b.length)||!(/^image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon|heic|heif|avif|x-ms-bmp)$/i.test(b[1])||/^video\/(?:mpeg|mp4|ogg|webm|x-matroska|quicktime|x-ms-wmv)$/i.test(b[1])||/^audio\/(?:3gpp2|3gpp|aac|amr|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)$/i.test(b[1])||/^font\/\w+/i.test(b[1])))throw Error("unsafe blob MIME type: "+ +a.type);return xd(URL.createObjectURL(a))}var Ad=[],Bd=function(a){console.warn("A URL with content '"+a+"' was sanitized away.")};-1===Ad.indexOf(Bd)&&Ad.push(Bd);var Cd={},Dd=function(){if(Cd!==Cd)throw Error("SafeStyle is not meant to be built directly");this.ql=""};Dd.prototype.toString=function(){return this.ql.toString()};new Dd;var Ed={},Fd=function(){if(Ed!==Ed)throw Error("SafeStyleSheet is not meant to be built directly");this.pl=""};Fd.prototype.toString=function(){return this.pl.toString()};new Fd;var Gd={},Hd=function(){var a=r.trustedTypes&&r.trustedTypes.emptyHTML||"";if(Gd!==Gd)throw Error("SafeHtml is not meant to be built directly");this.ol=a};Hd.prototype.toString=function(){return this.ol.toString()};new Hd;var Id=function(a,b){this.name=a;this.value=b};Id.prototype.toString=function(){return this.name};var Jd=new Id("OFF",Infinity),Kd=new Id("SEVERE",1E3),Ld=new Id("CONFIG",700),Md=new Id("FINE",500),Nd=function(){this.Bd=0;this.clear()},Od;Nd.prototype.clear=function(){this.yd=Array(this.Bd);this.kh=-1;this.Kh=!1};var Pd=function(a,b,c){this.reset(a||Jd,b,c,void 0,void 0)};Pd.prototype.reset=function(){}; var Qd=function(a,b){this.level=null;this.Zk=[];this.parent=(void 0===b?null:b)||null;this.children=[];this.gl={wf:function(){return a}}},Rd=function(a){if(a.level)return a.level;if(a.parent)return Rd(a.parent);Na("Root logger has no level set.");return Jd},Sd=function(a,b){for(;a;)a.Zk.forEach(function(c){c(b)}),a=a.parent},Td=function(){this.entries={};var a=new Qd("");a.level=Ld;this.entries[""]=a},Ud,Vd=function(a,b){var c=a.entries[b];if(c)return c;c=Vd(a,b.slice(0,Math.max(b.lastIndexOf("."), 0)));var d=new Qd(b,c);a.entries[b]=d;c.children.push(d);return d},Wd=function(){Ud||(Ud=new Td);return Ud},Xd=function(a,b,c){var d;if(d=a)if(d=a&&b){d=b.value;var e=a?Rd(Vd(Wd(),a.wf())):Jd;d=d>=e.value}if(d){b=b||Jd;d=Vd(Wd(),a.wf());"function"===typeof c&&(c=c());Od||(Od=new Nd);e=Od;a=a.wf();if(0"}else d=void 0===a?"undefined":null===a?"null":typeof a;Na("Argument is not an HTML Element with tag name "+(c+d))}a:{c=(a.ownerDocument&&a.ownerDocument.defaultView|| @@ -455,7 +455,7 @@ Wc(p,f[m]))});return b?b(l):l};return this.callback?(Jj(d,null,function(f,l){ret Kj.prototype.send=function(a,b){var c=[a.B+" "+a.path+" HTTP/1.1"];c.push("Content-Type: application/json; charset=utf-8");var d=Mj();null!=d&&c.push("Authorization: "+d);a=a.body?JSON.stringify(a.body):"";return[c.join("\r\n")+"\r\n\r\n"+a,b]}; var Nj=function(a,b,c){a=n(b.split("--"+a.split("; boundary=")[1]));for(b=a.next();!b.done;b=a.next())if(b=b.value.split("\r\n\r\n"),!(3>b.length)){var d=b[0].match(/\r\nContent-ID: ]*)>/)[1],e=Number(b[1].match(/^HTTP\S*\s(\d+)\s/)[1]);c(d,e,b.slice(2).join("\r\n\r\n"))}},Hj=function(){var a=Oj.replace(/\/api$/,"");return"window"in r&&!a.match(/^https?:\/\/content-/)?a.replace(/^(https?:\/\/)(.*\.googleapis\.com)$/,"$1content-$2"):a},Qj=function(a,b,c){var d=[];a&&(d=d.concat(Pj)); b&&d.push("https://www.googleapis.com/auth/devstorage.read_write");a=d=d.concat(c);c=b=0;for(var e={};cg)break;A++}return lk(C.status,function(J){try{return C.getResponseHeader(J)}catch(fa){return null}},C.responseText,l,void 0,e,d,f)},jk=function(a,b,c,d,e,g,f){var l=0,m={url:a,method:c,content:d,headers:e},p=dk,v=null!=g?g:10; m.callback=function(A){A=A.target;if(429==A.getStatus()&&lthis.kl)return!1;this.Kg++;Bq(this.ga,this.fa);setTimeout(u(this.Bl,this),0);return!0}; -h.Bl=function(){if(!this.kc){var a=u(function(d){this.kc||(Aq(this.ga,this.fa,d),ac(this.ga,Zq,u(this.Yk,this)),this.ga.start())},this),b=this.getUrl();if(re(b).Ba.Pb("profiling")){var c=new pj;c.xc="blob";c.Xa("complete",u(function(){this.mi=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;if(200<=c.getStatus()&&300>c.getStatus())try{var d=kd(Fd(Bj(c)));var e=d!==Ed.toString()}catch(g){}a(e?d:b)},this));c.Vc("ready",u(c.Ra,c));c.send(b,"GET")}else a(b)}};h.Kg=0;h.kc=!1;h.ga=null; +h.Bl=function(){if(!this.kc){var a=u(function(d){this.kc||(Aq(this.ga,this.fa,d),ac(this.ga,Zq,u(this.Yk,this)),this.ga.start())},this),b=this.getUrl();if(re(b).Ba.Pb("profiling")){var c=new pj;c.xc="blob";c.Xa("complete",u(function(){this.mi=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;if(200<=c.getStatus()&&300>c.getStatus())try{var d=wd(zd(Bj(c)));var e=d!==yd.toString()}catch(g){}a(e?d:b)},this));c.Vc("ready",u(c.Ra,c));c.send(b,"GET")}else a(b)}};h.Kg=0;h.kc=!1;h.ga=null; h.Ni=null;h.Ja=null;h.mi=null;var Zq=["load","abort","error"],$q=function(){y.call(this);this.Ea=!1};q($q,y);$q.prototype.setActive=function(a){this.Ea=a};$q.prototype.isActive=function(){return this.Ea};var Vq=function(a,b){Qq.call(this,a,b)};q(Vq,Qq);Vq.prototype.bf=function(){return new $q};Vq.prototype.Cd=function(a){a.Ra()};Vq.prototype.Sf=function(a){return!a.Sa&&!a.isActive()};var ar=function(a,b,c,d,e){Nc.call(this,a,b,c,d,e);this.minZoom=d.minZoom||0;this.maxZoom=d.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=d.tileSize||new google.maps.Size(256,256);this.name=d.name;this.wg=new Ic;this.Tf=1;this.ua=e||null};q(ar,Nc);h=ar.prototype;h.Oe=function(a){return bc(this,"tileevent",a)};h.bg=function(a){jc(a)}; h.getTile=function(a,b,c){if(ba.y||a.y>=1< markerIdx) { + return isWholeUrl; } - var selectorToCheck = selector.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g, ""); - if (!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=\\^$|]+$/.test(selectorToCheck)) { - throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=\\^$|] and strings, got: " + selector); + if (":" !== prefix.charAt(markerIdx)) { + return !0; } - if (!module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.hasBalancedBrackets_(selectorToCheck)) { - throw Error("() and [] in selector must be balanced, got: " + selector); + var scheme = prefix.substring(0, markerIdx).toLowerCase(); + return /^[a-z][a-z\d+.-]*$/.test(scheme) && "javascript" !== scheme; +} +function module$contents$safevalues$builders$url_builders_safeUrl(templateObj) { + var rest = $jscomp.getRestArguments.apply(1, arguments); + goog.DEBUG && module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, rest.length); + var prefix = templateObj[0]; + if (goog.DEBUG && !module$contents$safevalues$builders$url_builders_isSafeUrlPrefix(prefix, 0 === rest.length)) { + throw Error("Trying to interpolate with unsupported prefix: " + prefix); } - style instanceof module$contents$goog$html$SafeStyle_SafeStyle || (style = module$contents$goog$html$SafeStyle_SafeStyle.create(style)); - var styleSheet = selector + "{" + module$contents$goog$html$SafeStyle_SafeStyle.unwrap(style).replace(/." : ""); - } - if (tagName.toUpperCase() in module$contents$goog$html$SafeHtml_NOT_ALLOWED_TAG_NAMES) { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? "Tag name <" + tagName + "> is not allowed for SafeHtml." : ""); - } +var module$exports$safevalues$dom$elements$base = {}, module$contents$safevalues$dom$elements$base_module = module$contents$safevalues$dom$elements$base_module || {id:"third_party/javascript/safevalues/dom/elements/base.closure.js"}; +module$exports$safevalues$dom$elements$base.setHref = function(baseEl, url) { + baseEl.href = module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(url); }; -module$contents$goog$html$SafeHtml_SafeHtml.createIframe = function(src, srcdoc, attributes, content) { - src && goog.html.TrustedResourceUrl.unwrap(src); - var fixedAttributes = {}; - fixedAttributes.src = src || null; - fixedAttributes.srcdoc = srcdoc && module$contents$goog$html$SafeHtml_SafeHtml.unwrap(srcdoc); - var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes(fixedAttributes, {sandbox:""}, attributes); - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", combinedAttrs, content); +var module$exports$safevalues$dom$elements$button = {}, module$contents$safevalues$dom$elements$button_module = module$contents$safevalues$dom$elements$button_module || {id:"third_party/javascript/safevalues/dom/elements/button.closure.js"}; +module$exports$safevalues$dom$elements$button.setFormaction = function(button, url) { + var sanitizedUrl = module$contents$safevalues$builders$url_builders_unwrapUrlOrSanitize(url); + void 0 !== sanitizedUrl && (button.formAction = sanitizedUrl); }; -module$contents$goog$html$SafeHtml_SafeHtml.createSandboxIframe = function(src, srcdoc, attributes, content) { - if (!module$contents$goog$html$SafeHtml_SafeHtml.canUseSandboxIframe()) { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? "The browser does not support sandboxed iframes." : ""); +var module$exports$safevalues$internals$secrets = {}, module$contents$safevalues$internals$secrets_module = module$contents$safevalues$internals$secrets_module || {id:"third_party/javascript/safevalues/internals/secrets.closure.js"}; +module$exports$safevalues$internals$secrets.secretToken = {}; +function module$contents$safevalues$internals$secrets_ensureTokenIsValid(token) { + if (goog.DEBUG && token !== module$exports$safevalues$internals$secrets.secretToken) { + throw Error("Bad secret"); } - var fixedAttributes = {}; - fixedAttributes.src = src ? goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(src)) : null; - fixedAttributes.srcdoc = srcdoc || null; - fixedAttributes.sandbox = ""; - var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes(fixedAttributes, {}, attributes); - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", combinedAttrs, content); +} +module$exports$safevalues$internals$secrets.ensureTokenIsValid = module$contents$safevalues$internals$secrets_ensureTokenIsValid; +var module$exports$safevalues$internals$attribute_impl = {}, module$contents$safevalues$internals$attribute_impl_module = module$contents$safevalues$internals$attribute_impl_module || {id:"third_party/javascript/safevalues/internals/attribute_impl.closure.js"}; +module$exports$safevalues$internals$attribute_impl.SafeAttributePrefix = function() { }; -module$contents$goog$html$SafeHtml_SafeHtml.canUseSandboxIframe = function() { - return goog.global.HTMLIFrameElement && "sandbox" in goog.global.HTMLIFrameElement.prototype; +var module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl = function(attrPrefix, token) { + module$contents$safevalues$internals$secrets_ensureTokenIsValid(token); + this.privateDoNotAccessOrElseWrappedAttrPrefix = attrPrefix; }; -module$contents$goog$html$SafeHtml_SafeHtml.createScriptSrc = function(src, attributes) { - goog.html.TrustedResourceUrl.unwrap(src); - var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes({src:src}, {}, attributes); - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script", combinedAttrs); +$jscomp.inherits(module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl, module$exports$safevalues$internals$attribute_impl.SafeAttributePrefix); +module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl.prototype.toString = function() { + return this.privateDoNotAccessOrElseWrappedAttrPrefix; }; -module$contents$goog$html$SafeHtml_SafeHtml.createStyle = function(styleSheet, attributes) { - var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes({type:"text/css"}, {}, attributes), content = ""; - styleSheet = module$contents$goog$array_concat(styleSheet); - for (var i = 0; i < styleSheet.length; i++) { - content += module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.unwrap(styleSheet[i]); +function module$contents$safevalues$internals$attribute_impl_createAttributePrefixInternal(attrPrefix) { + return new module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl(attrPrefix, module$exports$safevalues$internals$secrets.secretToken); +} +module$exports$safevalues$internals$attribute_impl.createAttributePrefixInternal = module$contents$safevalues$internals$attribute_impl_createAttributePrefixInternal; +function module$contents$safevalues$internals$attribute_impl_unwrapAttributePrefix(value) { + if (value instanceof module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl) { + return value.privateDoNotAccessOrElseWrappedAttrPrefix; } - var htmlContent = module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(content); - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style", combinedAttrs, htmlContent); + var message = ""; + goog.DEBUG && (message = "Unexpected type when unwrapping SafeAttributePrefix"); + throw Error(message); +} +module$exports$safevalues$internals$attribute_impl.unwrapAttributePrefix = module$contents$safevalues$internals$attribute_impl_unwrapAttributePrefix; +goog.dom.HtmlElement = function() { }; -module$contents$goog$html$SafeHtml_SafeHtml.createMetaRefresh = function(url, secs) { - var unwrappedUrl = goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(url)); - (module$contents$goog$labs$userAgent$browser_matchIE() || module$contents$goog$labs$userAgent$browser_matchEdgeHtml()) && goog.string.internal.contains(unwrappedUrl, ";") && (unwrappedUrl = "'" + unwrappedUrl.replace(/'/g, "%27") + "'"); - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta", {"http-equiv":"refresh", content:(secs || 0) + "; url=" + unwrappedUrl}); +goog.dom.TagName = function() { }; -module$contents$goog$html$SafeHtml_SafeHtml.join = function(separator, parts) { - var separatorHtml = module$contents$goog$html$SafeHtml_SafeHtml.htmlEscape(separator), content = [], addArgument = function(argument) { - if (Array.isArray(argument)) { - argument.forEach(addArgument); - } else { - var html = module$contents$goog$html$SafeHtml_SafeHtml.htmlEscape(argument); - content.push(module$contents$goog$html$SafeHtml_SafeHtml.unwrap(html)); - } - }; - parts.forEach(addArgument); - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(content.join(module$contents$goog$html$SafeHtml_SafeHtml.unwrap(separatorHtml))); +goog.dom.TagName.cast = function(name, type) { + return name; }; -module$contents$goog$html$SafeHtml_SafeHtml.concat = function(var_args) { - return module$contents$goog$html$SafeHtml_SafeHtml.join(module$contents$goog$html$SafeHtml_SafeHtml.EMPTY, Array.prototype.slice.call(arguments)); +goog.dom.TagName.prototype.toString = function() { }; -module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse = function(html) { - var noinlineHtml = html, policy = goog.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse(), trustedHtml = policy ? policy.createHTML(noinlineHtml) : noinlineHtml; - return new module$contents$goog$html$SafeHtml_SafeHtml(trustedHtml, module$contents$goog$html$SafeHtml_CONSTRUCTOR_TOKEN_PRIVATE); +goog.dom.TagName.A = "A"; +goog.dom.TagName.ABBR = "ABBR"; +goog.dom.TagName.ACRONYM = "ACRONYM"; +goog.dom.TagName.ADDRESS = "ADDRESS"; +goog.dom.TagName.APPLET = "APPLET"; +goog.dom.TagName.AREA = "AREA"; +goog.dom.TagName.ARTICLE = "ARTICLE"; +goog.dom.TagName.ASIDE = "ASIDE"; +goog.dom.TagName.AUDIO = "AUDIO"; +goog.dom.TagName.B = "B"; +goog.dom.TagName.BASE = "BASE"; +goog.dom.TagName.BASEFONT = "BASEFONT"; +goog.dom.TagName.BDI = "BDI"; +goog.dom.TagName.BDO = "BDO"; +goog.dom.TagName.BIG = "BIG"; +goog.dom.TagName.BLOCKQUOTE = "BLOCKQUOTE"; +goog.dom.TagName.BODY = "BODY"; +goog.dom.TagName.BR = "BR"; +goog.dom.TagName.BUTTON = "BUTTON"; +goog.dom.TagName.CANVAS = "CANVAS"; +goog.dom.TagName.CAPTION = "CAPTION"; +goog.dom.TagName.CENTER = "CENTER"; +goog.dom.TagName.CITE = "CITE"; +goog.dom.TagName.CODE = "CODE"; +goog.dom.TagName.COL = "COL"; +goog.dom.TagName.COLGROUP = "COLGROUP"; +goog.dom.TagName.COMMAND = "COMMAND"; +goog.dom.TagName.DATA = "DATA"; +goog.dom.TagName.DATALIST = "DATALIST"; +goog.dom.TagName.DD = "DD"; +goog.dom.TagName.DEL = "DEL"; +goog.dom.TagName.DETAILS = "DETAILS"; +goog.dom.TagName.DFN = "DFN"; +goog.dom.TagName.DIALOG = "DIALOG"; +goog.dom.TagName.DIR = "DIR"; +goog.dom.TagName.DIV = "DIV"; +goog.dom.TagName.DL = "DL"; +goog.dom.TagName.DT = "DT"; +goog.dom.TagName.EM = "EM"; +goog.dom.TagName.EMBED = "EMBED"; +goog.dom.TagName.FIELDSET = "FIELDSET"; +goog.dom.TagName.FIGCAPTION = "FIGCAPTION"; +goog.dom.TagName.FIGURE = "FIGURE"; +goog.dom.TagName.FONT = "FONT"; +goog.dom.TagName.FOOTER = "FOOTER"; +goog.dom.TagName.FORM = "FORM"; +goog.dom.TagName.FRAME = "FRAME"; +goog.dom.TagName.FRAMESET = "FRAMESET"; +goog.dom.TagName.H1 = "H1"; +goog.dom.TagName.H2 = "H2"; +goog.dom.TagName.H3 = "H3"; +goog.dom.TagName.H4 = "H4"; +goog.dom.TagName.H5 = "H5"; +goog.dom.TagName.H6 = "H6"; +goog.dom.TagName.HEAD = "HEAD"; +goog.dom.TagName.HEADER = "HEADER"; +goog.dom.TagName.HGROUP = "HGROUP"; +goog.dom.TagName.HR = "HR"; +goog.dom.TagName.HTML = "HTML"; +goog.dom.TagName.I = "I"; +goog.dom.TagName.IFRAME = "IFRAME"; +goog.dom.TagName.IMG = "IMG"; +goog.dom.TagName.INPUT = "INPUT"; +goog.dom.TagName.INS = "INS"; +goog.dom.TagName.ISINDEX = "ISINDEX"; +goog.dom.TagName.KBD = "KBD"; +goog.dom.TagName.KEYGEN = "KEYGEN"; +goog.dom.TagName.LABEL = "LABEL"; +goog.dom.TagName.LEGEND = "LEGEND"; +goog.dom.TagName.LI = "LI"; +goog.dom.TagName.LINK = "LINK"; +goog.dom.TagName.MAIN = "MAIN"; +goog.dom.TagName.MAP = "MAP"; +goog.dom.TagName.MARK = "MARK"; +goog.dom.TagName.MATH = "MATH"; +goog.dom.TagName.MENU = "MENU"; +goog.dom.TagName.MENUITEM = "MENUITEM"; +goog.dom.TagName.META = "META"; +goog.dom.TagName.METER = "METER"; +goog.dom.TagName.NAV = "NAV"; +goog.dom.TagName.NOFRAMES = "NOFRAMES"; +goog.dom.TagName.NOSCRIPT = "NOSCRIPT"; +goog.dom.TagName.OBJECT = "OBJECT"; +goog.dom.TagName.OL = "OL"; +goog.dom.TagName.OPTGROUP = "OPTGROUP"; +goog.dom.TagName.OPTION = "OPTION"; +goog.dom.TagName.OUTPUT = "OUTPUT"; +goog.dom.TagName.P = "P"; +goog.dom.TagName.PARAM = "PARAM"; +goog.dom.TagName.PICTURE = "PICTURE"; +goog.dom.TagName.PRE = "PRE"; +goog.dom.TagName.PROGRESS = "PROGRESS"; +goog.dom.TagName.Q = "Q"; +goog.dom.TagName.RP = "RP"; +goog.dom.TagName.RT = "RT"; +goog.dom.TagName.RTC = "RTC"; +goog.dom.TagName.RUBY = "RUBY"; +goog.dom.TagName.S = "S"; +goog.dom.TagName.SAMP = "SAMP"; +goog.dom.TagName.SCRIPT = "SCRIPT"; +goog.dom.TagName.SECTION = "SECTION"; +goog.dom.TagName.SELECT = "SELECT"; +goog.dom.TagName.SMALL = "SMALL"; +goog.dom.TagName.SOURCE = "SOURCE"; +goog.dom.TagName.SPAN = "SPAN"; +goog.dom.TagName.STRIKE = "STRIKE"; +goog.dom.TagName.STRONG = "STRONG"; +goog.dom.TagName.STYLE = "STYLE"; +goog.dom.TagName.SUB = "SUB"; +goog.dom.TagName.SUMMARY = "SUMMARY"; +goog.dom.TagName.SUP = "SUP"; +goog.dom.TagName.SVG = "SVG"; +goog.dom.TagName.TABLE = "TABLE"; +goog.dom.TagName.TBODY = "TBODY"; +goog.dom.TagName.TD = "TD"; +goog.dom.TagName.TEMPLATE = "TEMPLATE"; +goog.dom.TagName.TEXTAREA = "TEXTAREA"; +goog.dom.TagName.TFOOT = "TFOOT"; +goog.dom.TagName.TH = "TH"; +goog.dom.TagName.THEAD = "THEAD"; +goog.dom.TagName.TIME = "TIME"; +goog.dom.TagName.TITLE = "TITLE"; +goog.dom.TagName.TR = "TR"; +goog.dom.TagName.TRACK = "TRACK"; +goog.dom.TagName.TT = "TT"; +goog.dom.TagName.U = "U"; +goog.dom.TagName.UL = "UL"; +goog.dom.TagName.VAR = "VAR"; +goog.dom.TagName.VIDEO = "VIDEO"; +goog.dom.TagName.WBR = "WBR"; +goog.dom.tags = {}; +goog.dom.tags.VOID_TAGS_ = {area:!0, base:!0, br:!0, col:!0, command:!0, embed:!0, hr:!0, img:!0, input:!0, keygen:!0, link:!0, meta:!0, param:!0, source:!0, track:!0, wbr:!0}; +goog.dom.tags.isVoidTag = function(tagName) { + return !0 === goog.dom.tags.VOID_TAGS_[tagName]; }; -module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse = function(tagName, attributes, content) { - var result = "<" + tagName + module$contents$goog$html$SafeHtml_SafeHtml.stringifyAttributes(tagName, attributes); - null == content ? content = [] : Array.isArray(content) || (content = [content]); - if (goog.dom.tags.isVoidTag(tagName.toLowerCase())) { - goog.asserts.assert(!content.length, "Void tag <" + tagName + "> does not allow content."), result += ">"; - } else { - var html = module$contents$goog$html$SafeHtml_SafeHtml.concat(content); - result += ">" + module$contents$goog$html$SafeHtml_SafeHtml.unwrap(html) + ""; +var module$contents$goog$html$SafeStyle_CONSTRUCTOR_TOKEN_PRIVATE = {}, module$contents$goog$html$SafeStyle_SafeStyle = function(value, token) { + if (goog.DEBUG && token !== module$contents$goog$html$SafeStyle_CONSTRUCTOR_TOKEN_PRIVATE) { + throw Error("SafeStyle is not meant to be built directly"); } - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(result); + this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = value; }; -module$contents$goog$html$SafeHtml_SafeHtml.stringifyAttributes = function(tagName, attributes) { - var result = ""; - if (attributes) { - for (var name in attributes) { - if (Object.prototype.hasOwnProperty.call(attributes, name)) { - if (!module$contents$goog$html$SafeHtml_VALID_NAMES_IN_TAG.test(name)) { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Invalid attribute name "' + name + '".' : ""); - } - var value = attributes[name]; - null != value && (result += " " + module$contents$goog$html$SafeHtml_getAttrNameAndValue(tagName, name, value)); - } - } +module$contents$goog$html$SafeStyle_SafeStyle.fromConstant = function(style) { + var styleString = goog.string.Const.unwrap(style); + if (0 === styleString.length) { + return module$contents$goog$html$SafeStyle_SafeStyle.EMPTY; } - return result; + (0,goog.asserts.assert)((0,goog.string.internal.endsWith)(styleString, ";"), "Last character of style string is not ';': " + styleString); + (0,goog.asserts.assert)((0,goog.string.internal.contains)(styleString, ":"), "Style string must contain at least one ':', to specify a \"name: value\" pair: " + styleString); + return module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(styleString); }; -module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes = function(fixedAttributes, defaultAttributes, attributes) { - var combinedAttributes = {}, name; - for (name in fixedAttributes) { - Object.prototype.hasOwnProperty.call(fixedAttributes, name) && (goog.asserts.assert(name.toLowerCase() == name, "Must be lower case"), combinedAttributes[name] = fixedAttributes[name]); - } - for (var name$jscomp$0 in defaultAttributes) { - Object.prototype.hasOwnProperty.call(defaultAttributes, name$jscomp$0) && (goog.asserts.assert(name$jscomp$0.toLowerCase() == name$jscomp$0, "Must be lower case"), combinedAttributes[name$jscomp$0] = defaultAttributes[name$jscomp$0]); - } - if (attributes) { - for (var name$jscomp$1 in attributes) { - if (Object.prototype.hasOwnProperty.call(attributes, name$jscomp$1)) { - var nameLower = name$jscomp$1.toLowerCase(); - if (nameLower in fixedAttributes) { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Cannot override "' + nameLower + '" attribute, got "' + name$jscomp$1 + '" with value "' + attributes[name$jscomp$1] + '"' : ""); - } - nameLower in defaultAttributes && delete combinedAttributes[nameLower]; - combinedAttributes[name$jscomp$1] = attributes[name$jscomp$1]; - } - } - } - return combinedAttributes; +module$contents$goog$html$SafeStyle_SafeStyle.prototype.toString = function() { + return this.privateDoNotAccessOrElseSafeStyleWrappedValue_.toString(); }; -module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES = goog.DEBUG; -module$contents$goog$html$SafeHtml_SafeHtml.SUPPORT_STYLE_ATTRIBUTE = !0; -module$contents$goog$html$SafeHtml_SafeHtml.from = module$contents$goog$html$SafeHtml_SafeHtml.htmlEscape; -var module$contents$goog$html$SafeHtml_VALID_NAMES_IN_TAG = /^[a-zA-Z0-9-]+$/, module$contents$goog$html$SafeHtml_URL_ATTRIBUTES = {action:!0, cite:!0, data:!0, formaction:!0, href:!0, manifest:!0, poster:!0, src:!0}, module$contents$goog$html$SafeHtml_NOT_ALLOWED_TAG_NAMES = module$contents$goog$object_createSet(goog.dom.TagName.APPLET, goog.dom.TagName.BASE, goog.dom.TagName.EMBED, goog.dom.TagName.IFRAME, goog.dom.TagName.LINK, goog.dom.TagName.MATH, goog.dom.TagName.META, goog.dom.TagName.OBJECT, -goog.dom.TagName.SCRIPT, goog.dom.TagName.STYLE, goog.dom.TagName.SVG, goog.dom.TagName.TEMPLATE); -function module$contents$goog$html$SafeHtml_getAttrNameAndValue(tagName, name, value) { - if (value instanceof goog.string.Const) { - value = goog.string.Const.unwrap(value); - } else if ("style" == name.toLowerCase()) { - if (module$contents$goog$html$SafeHtml_SafeHtml.SUPPORT_STYLE_ATTRIBUTE) { - value = module$contents$goog$html$SafeHtml_getStyleValue(value); - } else { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "style" not supported.' : ""); - } - } else { - if (/^on/i.test(name)) { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "' + name + '" requires goog.string.Const value, "' + value + '" given.' : ""); - } - if (name.toLowerCase() in module$contents$goog$html$SafeHtml_URL_ATTRIBUTES) { - if (value instanceof goog.html.TrustedResourceUrl) { - value = goog.html.TrustedResourceUrl.unwrap(value); - } else if (value instanceof goog.html.SafeUrl) { - value = goog.html.SafeUrl.unwrap(value); - } else if ("string" === typeof value) { - value = goog.html.SafeUrl.sanitize(value).toString(); - } else { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "' + name + '" on tag "' + tagName + '" requires goog.html.SafeUrl, goog.string.Const, or string, value "' + value + '" given.' : ""); - } - } - } - goog.asserts.assert(value instanceof goog.html.SafeUrl || value instanceof goog.html.TrustedResourceUrl || value instanceof module$contents$goog$html$SafeStyle_SafeStyle || value instanceof module$contents$goog$html$SafeHtml_SafeHtml || "string" === typeof value || "number" === typeof value, "String or number value expected, got " + typeof value + " with value: " + value); - return name + '="' + goog.string.internal.htmlEscape(String(value)) + '"'; -} -function module$contents$goog$html$SafeHtml_getStyleValue(value) { - if (!goog.isObject(value)) { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'The "style" attribute requires goog.html.SafeStyle or map of style properties, ' + typeof value + " given: " + value : ""); - } - value instanceof module$contents$goog$html$SafeStyle_SafeStyle || (value = module$contents$goog$html$SafeStyle_SafeStyle.create(value)); - return module$contents$goog$html$SafeStyle_SafeStyle.unwrap(value); -} -module$contents$goog$html$SafeHtml_SafeHtml.DOCTYPE_HTML = function() { - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(""); -}(); -module$contents$goog$html$SafeHtml_SafeHtml.EMPTY = new module$contents$goog$html$SafeHtml_SafeHtml(goog.global.trustedTypes && goog.global.trustedTypes.emptyHTML || "", module$contents$goog$html$SafeHtml_CONSTRUCTOR_TOKEN_PRIVATE); -module$contents$goog$html$SafeHtml_SafeHtml.BR = function() { - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("
"); -}(); -goog.html.SafeHtml = module$contents$goog$html$SafeHtml_SafeHtml; -var module$exports$goog$html$internals = {}; -module$exports$goog$html$internals.createSafeHtml = module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse; -module$exports$goog$html$internals.createSafeStyle = module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse; -module$exports$goog$html$internals.createSafeStyleSheet = module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse; -module$exports$goog$html$internals.createSafeUrl = goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse; -module$exports$goog$html$internals.createTrustedResourceUrl = goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse; -var module$exports$safevalues$internals$resource_url_impl = {}, module$contents$safevalues$internals$resource_url_impl_module = module$contents$safevalues$internals$resource_url_impl_module || {id:"third_party/javascript/safevalues/internals/resource_url_impl.closure.js"}; -module$exports$safevalues$internals$resource_url_impl.TrustedResourceUrl = goog.html.TrustedResourceUrl; -function module$contents$safevalues$internals$resource_url_impl_createResourceUrlInternal(url) { - return (0,goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse)(url); -} -module$exports$safevalues$internals$resource_url_impl.createResourceUrlInternal = module$contents$safevalues$internals$resource_url_impl_createResourceUrlInternal; -function module$contents$safevalues$internals$resource_url_impl_isResourceUrl(value) { - return value instanceof goog.html.TrustedResourceUrl; -} -module$exports$safevalues$internals$resource_url_impl.isResourceUrl = module$contents$safevalues$internals$resource_url_impl_isResourceUrl; -function module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(value) { - return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(value); -} -module$exports$safevalues$internals$resource_url_impl.unwrapResourceUrl = module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl; -var $jscomp$templatelit$m425881384$5 = $jscomp.createTemplateTagFirstArg([""]), $jscomp$templatelit$m425881384$6 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\0"]), $jscomp$templatelit$m425881384$7 = $jscomp.createTemplateTagFirstArgWithRaw(["\n"], ["\\n"]), $jscomp$templatelit$m425881384$8 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\u0000"]), $jscomp$templatelit$m425881384$9 = $jscomp.createTemplateTagFirstArg([""]), $jscomp$templatelit$m425881384$10 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], -["\\0"]), $jscomp$templatelit$m425881384$11 = $jscomp.createTemplateTagFirstArgWithRaw(["\n"], ["\\n"]), $jscomp$templatelit$m425881384$12 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\u0000"]), module$contents$safevalues$internals$string_literal_module = module$contents$safevalues$internals$string_literal_module || {id:"third_party/javascript/safevalues/internals/string_literal.closure.js"}; -function module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, numExprs) { - if (!module$contents$safevalues$internals$string_literal_isTemplateObject(templateObj) || numExprs + 1 !== templateObj.length) { - throw new TypeError("\n ############################## ERROR ##############################\n\n It looks like you are trying to call a template tag function (fn`...`)\n using the normal function syntax (fn(...)), which is not supported.\n\n The functions in the safevalues library are not designed to be called\n like normal functions, and doing so invalidates the security guarantees\n that safevalues provides.\n\n If you are stuck and not sure how to proceed, please reach out to us\n instead through:\n - go/ise-hardening-yaqs (preferred) // LINE-INTERNAL\n - g/ise-hardening // LINE-INTERNAL\n - https://github.com/google/safevalues/issues\n\n ############################## ERROR ##############################"); - } -} -function module$contents$safevalues$internals$string_literal_checkFrozen(templateObj) { - return Object.isFrozen(templateObj) && Object.isFrozen(templateObj.raw); -} -var module$contents$safevalues$internals$string_literal_TagFn; -function module$contents$safevalues$internals$string_literal_checkTranspiled(fn) { - return -1 === fn.toString().indexOf("`"); -} -var module$contents$safevalues$internals$string_literal_isTranspiled = module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) { - return tag($jscomp$templatelit$m425881384$5); -}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) { - return tag($jscomp$templatelit$m425881384$6); -}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) { - return tag($jscomp$templatelit$m425881384$7); -}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) { - return tag($jscomp$templatelit$m425881384$8); -}), module$contents$safevalues$internals$string_literal_frozenTSA = module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$m425881384$9) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$m425881384$10) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$m425881384$11) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$m425881384$12); -function module$contents$safevalues$internals$string_literal_isTemplateObject(templateObj) { - return Array.isArray(templateObj) && Array.isArray(templateObj.raw) && templateObj.length === templateObj.raw.length && (module$contents$safevalues$internals$string_literal_isTranspiled || templateObj !== templateObj.raw) && (module$contents$safevalues$internals$string_literal_isTranspiled && !module$contents$safevalues$internals$string_literal_frozenTSA || module$contents$safevalues$internals$string_literal_checkFrozen(templateObj)) ? - !0 : !1; -} -;var module$exports$safevalues$internals$url_impl = {}, module$contents$safevalues$internals$url_impl_module = module$contents$safevalues$internals$url_impl_module || {id:"third_party/javascript/safevalues/internals/url_impl.closure.js"}; -module$exports$safevalues$internals$url_impl.SafeUrl = goog.html.SafeUrl; -function module$contents$safevalues$internals$url_impl_createUrlInternal(url) { - return (0,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse)(url); -} -module$exports$safevalues$internals$url_impl.createUrlInternal = module$contents$safevalues$internals$url_impl_createUrlInternal; -module$exports$safevalues$internals$url_impl.ABOUT_BLANK = module$contents$safevalues$internals$url_impl_createUrlInternal("about:blank"); -module$exports$safevalues$internals$url_impl.INNOCUOUS_URL = module$contents$safevalues$internals$url_impl_createUrlInternal("about:invalid#zClosurez"); -function module$contents$safevalues$internals$url_impl_isUrl(value) { - return value instanceof goog.html.SafeUrl; -} -module$exports$safevalues$internals$url_impl.isUrl = module$contents$safevalues$internals$url_impl_isUrl; -function module$contents$safevalues$internals$url_impl_unwrapUrl(value) { - return goog.html.SafeUrl.unwrap(value); -} -module$exports$safevalues$internals$url_impl.unwrapUrl = module$contents$safevalues$internals$url_impl_unwrapUrl; -var module$exports$safevalues$builders$url_builders = {}, module$contents$safevalues$builders$url_builders_module = module$contents$safevalues$builders$url_builders_module || {id:"third_party/javascript/safevalues/builders/url_builders.closure.js"}; -function module$contents$safevalues$builders$url_builders_isSafeMimeType(mimeType) { - var match = mimeType.match(/^([^;]+)(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i); - return 2 === (null == match ? void 0 : match.length) && (module$contents$safevalues$builders$url_builders_isSafeImageMimeType(match[1]) || module$contents$safevalues$builders$url_builders_isSafeVideoMimeType(match[1]) || module$contents$safevalues$builders$url_builders_isSafeAudioMimeType(match[1]) || module$contents$safevalues$builders$url_builders_isSafeFontMimeType(match[1])); -} -function module$contents$safevalues$builders$url_builders_isSafeImageMimeType(mimeType) { - return /^image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon|heic|heif|avif|x-ms-bmp)$/i.test(mimeType); -} -function module$contents$safevalues$builders$url_builders_isSafeVideoMimeType(mimeType) { - return /^video\/(?:mpeg|mp4|ogg|webm|x-matroska|quicktime|x-ms-wmv)$/i.test(mimeType); -} -function module$contents$safevalues$builders$url_builders_isSafeAudioMimeType(mimeType) { - return /^audio\/(?:3gpp2|3gpp|aac|amr|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)$/i.test(mimeType); -} -function module$contents$safevalues$builders$url_builders_isSafeFontMimeType(mimeType) { - return /^font\/\w+/i.test(mimeType); -} -module$exports$safevalues$builders$url_builders.Scheme = function() { +module$contents$goog$html$SafeStyle_SafeStyle.unwrap = function(safeStyle) { + if (safeStyle instanceof module$contents$goog$html$SafeStyle_SafeStyle && safeStyle.constructor === module$contents$goog$html$SafeStyle_SafeStyle) { + return safeStyle.privateDoNotAccessOrElseSafeStyleWrappedValue_; + } + (0,goog.asserts.fail)("expected object of type SafeStyle, got '" + safeStyle + "' of type " + goog.typeOf(safeStyle)); + return "type_error:SafeStyle"; }; -var module$contents$safevalues$builders$url_builders_SchemeImpl = function(isValid) { - this.isValid = isValid; +module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse = function(style) { + return new module$contents$goog$html$SafeStyle_SafeStyle(style, module$contents$goog$html$SafeStyle_CONSTRUCTOR_TOKEN_PRIVATE); }; -function module$contents$safevalues$builders$url_builders_isValidScheme(scheme) { - return scheme instanceof module$contents$safevalues$builders$url_builders_SchemeImpl; +module$contents$goog$html$SafeStyle_SafeStyle.create = function(map) { + var style = "", name; + for (name in map) { + if (Object.prototype.hasOwnProperty.call(map, name)) { + if (!/^[-_a-zA-Z0-9]+$/.test(name)) { + throw Error("Name allows only [-_a-zA-Z0-9], got: " + name); + } + var value = map[name]; + null != value && (value = Array.isArray(value) ? value.map(module$contents$goog$html$SafeStyle_sanitizePropertyValue).join(" ") : module$contents$goog$html$SafeStyle_sanitizePropertyValue(value), style += name + ":" + value + ";"); + } + } + return style ? module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style) : module$contents$goog$html$SafeStyle_SafeStyle.EMPTY; +}; +module$contents$goog$html$SafeStyle_SafeStyle.concat = function(var_args) { + var style = "", addArgument = function(argument) { + Array.isArray(argument) ? argument.forEach(addArgument) : style += module$contents$goog$html$SafeStyle_SafeStyle.unwrap(argument); + }; + Array.prototype.forEach.call(arguments, addArgument); + return style ? module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style) : module$contents$goog$html$SafeStyle_SafeStyle.EMPTY; +}; +module$contents$goog$html$SafeStyle_SafeStyle.EMPTY = module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(""); +module$contents$goog$html$SafeStyle_SafeStyle.INNOCUOUS_STRING = "zClosurez"; +function module$contents$goog$html$SafeStyle_sanitizePropertyValue(value) { + if (value instanceof goog.html.SafeUrl) { + return 'url("' + goog.html.SafeUrl.unwrap(value).replace(/+~[\]()=\\^$|]+$/.test(selectorToCheck)) { + throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=\\^$|] and strings, got: " + selector); } - var message = ""; - goog.DEBUG && (message = "fromMediaSource only accepts MediaSource instances, but was called with " + media + "."); - throw Error(message); -} -module$exports$safevalues$builders$url_builders.fromMediaSource = module$contents$safevalues$builders$url_builders_fromMediaSource; -function module$contents$safevalues$builders$url_builders_fromTrustedResourceUrl(url) { - return module$contents$safevalues$internals$url_impl_createUrlInternal(module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(url).toString()); -} -module$exports$safevalues$builders$url_builders.fromTrustedResourceUrl = module$contents$safevalues$builders$url_builders_fromTrustedResourceUrl; -function module$contents$safevalues$builders$url_builders_isSafeUrlPrefix(prefix, isWholeUrl) { - var markerIdx = prefix.search(/[:/?#]/); - if (0 > markerIdx) { - return isWholeUrl; + if (!module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.hasBalancedBrackets_(selectorToCheck)) { + throw Error("() and [] in selector must be balanced, got: " + selector); } - if (":" !== prefix.charAt(markerIdx)) { - return !0; + style instanceof module$contents$goog$html$SafeStyle_SafeStyle || (style = module$contents$goog$html$SafeStyle_SafeStyle.create(style)); + var styleSheet = selector + "{" + module$contents$goog$html$SafeStyle_SafeStyle.unwrap(style).replace(/." : ""); } - return parsedUrl.protocol; -} -module$exports$safevalues$builders$url_builders.extractScheme = module$contents$safevalues$builders$url_builders_extractScheme; -var module$contents$safevalues$builders$url_builders_ALLOWED_SCHEMES = ["data:", "http:", "https:", "mailto:", "ftp:"]; -module$exports$safevalues$builders$url_builders.IS_NOT_JAVASCRIPT_URL_PATTERN = /^\s*(?!javascript:)(?:[a-z0-9+.-]+:|[^:\/?#]*(?:[\/?#]|$))/i; -function module$contents$safevalues$builders$url_builders_hasJavascriptUrlScheme(url) { - return !module$exports$safevalues$builders$url_builders.IS_NOT_JAVASCRIPT_URL_PATTERN.test(url); -} -function module$contents$safevalues$builders$url_builders_sanitizeJavaScriptUrl(url) { - if (module$contents$safevalues$builders$url_builders_hasJavascriptUrlScheme(url)) { - module$contents$safevalues$builders$url_builders_triggerCallbacks(url); - } else { - return url; + if (tagName.toUpperCase() in module$contents$goog$html$SafeHtml_NOT_ALLOWED_TAG_NAMES) { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? "Tag name <" + tagName + "> is not allowed for SafeHtml." : ""); } -} -module$exports$safevalues$builders$url_builders.sanitizeJavaScriptUrl = module$contents$safevalues$builders$url_builders_sanitizeJavaScriptUrl; -function module$contents$safevalues$builders$url_builders_unwrapUrlOrSanitize(url) { - return url instanceof goog.html.SafeUrl ? module$contents$safevalues$internals$url_impl_unwrapUrl(url) : module$contents$safevalues$builders$url_builders_sanitizeJavaScriptUrl(url); -} -module$exports$safevalues$builders$url_builders.unwrapUrlOrSanitize = module$contents$safevalues$builders$url_builders_unwrapUrlOrSanitize; -function module$contents$safevalues$builders$url_builders_restrictivelySanitizeUrl(url) { - var parsedScheme = module$contents$safevalues$builders$url_builders_extractScheme(url); - return void 0 !== parsedScheme && -1 !== module$contents$safevalues$builders$url_builders_ALLOWED_SCHEMES.indexOf(parsedScheme.toLowerCase()) ? url : "about:invalid#zClosurez"; -} -module$exports$safevalues$builders$url_builders.restrictivelySanitizeUrl = module$contents$safevalues$builders$url_builders_restrictivelySanitizeUrl; -var module$contents$safevalues$builders$url_builders_sanitizationCallbacks = [], module$contents$safevalues$builders$url_builders_triggerCallbacks = function(url) { }; -goog.DEBUG && module$contents$safevalues$builders$url_builders_addJavaScriptUrlSanitizationCallback(function(url) { - console.warn("A URL with content '" + url + "' was sanitized away."); -}); -function module$contents$safevalues$builders$url_builders_addJavaScriptUrlSanitizationCallback(callback) { - -1 === module$contents$safevalues$builders$url_builders_sanitizationCallbacks.indexOf(callback) && module$contents$safevalues$builders$url_builders_sanitizationCallbacks.push(callback); - module$contents$safevalues$builders$url_builders_triggerCallbacks = function(url) { - module$contents$safevalues$builders$url_builders_sanitizationCallbacks.forEach(function(callback) { - callback(url); - }); - }; -} -module$exports$safevalues$builders$url_builders.addJavaScriptUrlSanitizationCallback = module$contents$safevalues$builders$url_builders_addJavaScriptUrlSanitizationCallback; -function module$contents$safevalues$builders$url_builders_removeJavaScriptUrlSanitizationCallback(callback) { - var callbackIndex = module$contents$safevalues$builders$url_builders_sanitizationCallbacks.indexOf(callback); - -1 !== callbackIndex && module$contents$safevalues$builders$url_builders_sanitizationCallbacks.splice(callbackIndex, 1); -} -module$exports$safevalues$builders$url_builders.removeJavaScriptUrlSanitizationCallback = module$contents$safevalues$builders$url_builders_removeJavaScriptUrlSanitizationCallback; -var module$exports$safevalues$dom$elements$anchor = {}, module$contents$safevalues$dom$elements$anchor_module = module$contents$safevalues$dom$elements$anchor_module || {id:"third_party/javascript/safevalues/dom/elements/anchor.closure.js"}; -module$exports$safevalues$dom$elements$anchor.setHref = function(anchor, url) { - var sanitizedUrl = module$contents$safevalues$builders$url_builders_unwrapUrlOrSanitize(url); - void 0 !== sanitizedUrl && (anchor.href = sanitizedUrl); +module$contents$goog$html$SafeHtml_SafeHtml.createIframe = function(src, srcdoc, attributes, content) { + src && goog.html.TrustedResourceUrl.unwrap(src); + var fixedAttributes = {}; + fixedAttributes.src = src || null; + fixedAttributes.srcdoc = srcdoc && module$contents$goog$html$SafeHtml_SafeHtml.unwrap(srcdoc); + var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes(fixedAttributes, {sandbox:""}, attributes); + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", combinedAttrs, content); }; -var module$exports$safevalues$dom$elements$area = {}, module$contents$safevalues$dom$elements$area_module = module$contents$safevalues$dom$elements$area_module || {id:"third_party/javascript/safevalues/dom/elements/area.closure.js"}; -module$exports$safevalues$dom$elements$area.setHref = function(area, url) { - var sanitizedUrl = module$contents$safevalues$builders$url_builders_unwrapUrlOrSanitize(url); - void 0 !== sanitizedUrl && (area.href = sanitizedUrl); +module$contents$goog$html$SafeHtml_SafeHtml.createSandboxIframe = function(src, srcdoc, attributes, content) { + if (!module$contents$goog$html$SafeHtml_SafeHtml.canUseSandboxIframe()) { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? "The browser does not support sandboxed iframes." : ""); + } + var fixedAttributes = {}; + fixedAttributes.src = src ? goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(src)) : null; + fixedAttributes.srcdoc = srcdoc || null; + fixedAttributes.sandbox = ""; + var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes(fixedAttributes, {}, attributes); + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", combinedAttrs, content); }; -var module$exports$safevalues$dom$elements$base = {}, module$contents$safevalues$dom$elements$base_module = module$contents$safevalues$dom$elements$base_module || {id:"third_party/javascript/safevalues/dom/elements/base.closure.js"}; -module$exports$safevalues$dom$elements$base.setHref = function(baseEl, url) { - baseEl.href = module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(url); +module$contents$goog$html$SafeHtml_SafeHtml.canUseSandboxIframe = function() { + return goog.global.HTMLIFrameElement && "sandbox" in goog.global.HTMLIFrameElement.prototype; }; -var module$exports$safevalues$dom$elements$button = {}, module$contents$safevalues$dom$elements$button_module = module$contents$safevalues$dom$elements$button_module || {id:"third_party/javascript/safevalues/dom/elements/button.closure.js"}; -module$exports$safevalues$dom$elements$button.setFormaction = function(button, url) { - var sanitizedUrl = module$contents$safevalues$builders$url_builders_unwrapUrlOrSanitize(url); - void 0 !== sanitizedUrl && (button.formAction = sanitizedUrl); +module$contents$goog$html$SafeHtml_SafeHtml.createScriptSrc = function(src, attributes) { + goog.html.TrustedResourceUrl.unwrap(src); + var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes({src:src}, {}, attributes); + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script", combinedAttrs); }; -var module$exports$safevalues$internals$secrets = {}, module$contents$safevalues$internals$secrets_module = module$contents$safevalues$internals$secrets_module || {id:"third_party/javascript/safevalues/internals/secrets.closure.js"}; -module$exports$safevalues$internals$secrets.secretToken = {}; -function module$contents$safevalues$internals$secrets_ensureTokenIsValid(token) { - if (goog.DEBUG && token !== module$exports$safevalues$internals$secrets.secretToken) { - throw Error("Bad secret"); +module$contents$goog$html$SafeHtml_SafeHtml.createStyle = function(styleSheet, attributes) { + var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes({type:"text/css"}, {}, attributes), content = ""; + styleSheet = module$contents$goog$array_concat(styleSheet); + for (var i = 0; i < styleSheet.length; i++) { + content += module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.unwrap(styleSheet[i]); } -} -module$exports$safevalues$internals$secrets.ensureTokenIsValid = module$contents$safevalues$internals$secrets_ensureTokenIsValid; -var module$exports$safevalues$internals$attribute_impl = {}, module$contents$safevalues$internals$attribute_impl_module = module$contents$safevalues$internals$attribute_impl_module || {id:"third_party/javascript/safevalues/internals/attribute_impl.closure.js"}; -module$exports$safevalues$internals$attribute_impl.SafeAttributePrefix = function() { + var htmlContent = module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(content); + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style", combinedAttrs, htmlContent); }; -var module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl = function(attrPrefix, token) { - module$contents$safevalues$internals$secrets_ensureTokenIsValid(token); - this.privateDoNotAccessOrElseWrappedAttrPrefix = attrPrefix; +module$contents$goog$html$SafeHtml_SafeHtml.createMetaRefresh = function(url, secs) { + var unwrappedUrl = goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(url)); + (module$contents$goog$labs$userAgent$browser_matchIE() || module$contents$goog$labs$userAgent$browser_matchEdgeHtml()) && goog.string.internal.contains(unwrappedUrl, ";") && (unwrappedUrl = "'" + unwrappedUrl.replace(/'/g, "%27") + "'"); + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta", {"http-equiv":"refresh", content:(secs || 0) + "; url=" + unwrappedUrl}); }; -$jscomp.inherits(module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl, module$exports$safevalues$internals$attribute_impl.SafeAttributePrefix); -module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl.prototype.toString = function() { - return this.privateDoNotAccessOrElseWrappedAttrPrefix; +module$contents$goog$html$SafeHtml_SafeHtml.join = function(separator, parts) { + var separatorHtml = module$contents$goog$html$SafeHtml_SafeHtml.htmlEscape(separator), content = [], addArgument = function(argument) { + if (Array.isArray(argument)) { + argument.forEach(addArgument); + } else { + var html = module$contents$goog$html$SafeHtml_SafeHtml.htmlEscape(argument); + content.push(module$contents$goog$html$SafeHtml_SafeHtml.unwrap(html)); + } + }; + parts.forEach(addArgument); + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(content.join(module$contents$goog$html$SafeHtml_SafeHtml.unwrap(separatorHtml))); }; -function module$contents$safevalues$internals$attribute_impl_createAttributePrefixInternal(attrPrefix) { - return new module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl(attrPrefix, module$exports$safevalues$internals$secrets.secretToken); +module$contents$goog$html$SafeHtml_SafeHtml.concat = function(var_args) { + return module$contents$goog$html$SafeHtml_SafeHtml.join(module$contents$goog$html$SafeHtml_SafeHtml.EMPTY, Array.prototype.slice.call(arguments)); +}; +module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse = function(html) { + var noinlineHtml = html, policy = goog.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse(), trustedHtml = policy ? policy.createHTML(noinlineHtml) : noinlineHtml; + return new module$contents$goog$html$SafeHtml_SafeHtml(trustedHtml, module$contents$goog$html$SafeHtml_CONSTRUCTOR_TOKEN_PRIVATE); +}; +module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse = function(tagName, attributes, content) { + var result = "<" + tagName + module$contents$goog$html$SafeHtml_SafeHtml.stringifyAttributes(tagName, attributes); + null == content ? content = [] : Array.isArray(content) || (content = [content]); + if (goog.dom.tags.isVoidTag(tagName.toLowerCase())) { + goog.asserts.assert(!content.length, "Void tag <" + tagName + "> does not allow content."), result += ">"; + } else { + var html = module$contents$goog$html$SafeHtml_SafeHtml.concat(content); + result += ">" + module$contents$goog$html$SafeHtml_SafeHtml.unwrap(html) + ""; + } + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(result); +}; +module$contents$goog$html$SafeHtml_SafeHtml.stringifyAttributes = function(tagName, attributes) { + var result = ""; + if (attributes) { + for (var name in attributes) { + if (Object.prototype.hasOwnProperty.call(attributes, name)) { + if (!module$contents$goog$html$SafeHtml_VALID_NAMES_IN_TAG.test(name)) { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Invalid attribute name "' + name + '".' : ""); + } + var value = attributes[name]; + null != value && (result += " " + module$contents$goog$html$SafeHtml_getAttrNameAndValue(tagName, name, value)); + } + } + } + return result; +}; +module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes = function(fixedAttributes, defaultAttributes, attributes) { + var combinedAttributes = {}, name; + for (name in fixedAttributes) { + Object.prototype.hasOwnProperty.call(fixedAttributes, name) && (goog.asserts.assert(name.toLowerCase() == name, "Must be lower case"), combinedAttributes[name] = fixedAttributes[name]); + } + for (var name$jscomp$0 in defaultAttributes) { + Object.prototype.hasOwnProperty.call(defaultAttributes, name$jscomp$0) && (goog.asserts.assert(name$jscomp$0.toLowerCase() == name$jscomp$0, "Must be lower case"), combinedAttributes[name$jscomp$0] = defaultAttributes[name$jscomp$0]); + } + if (attributes) { + for (var name$jscomp$1 in attributes) { + if (Object.prototype.hasOwnProperty.call(attributes, name$jscomp$1)) { + var nameLower = name$jscomp$1.toLowerCase(); + if (nameLower in fixedAttributes) { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Cannot override "' + nameLower + '" attribute, got "' + name$jscomp$1 + '" with value "' + attributes[name$jscomp$1] + '"' : ""); + } + nameLower in defaultAttributes && delete combinedAttributes[nameLower]; + combinedAttributes[name$jscomp$1] = attributes[name$jscomp$1]; + } + } + } + return combinedAttributes; +}; +module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES = goog.DEBUG; +module$contents$goog$html$SafeHtml_SafeHtml.SUPPORT_STYLE_ATTRIBUTE = !0; +module$contents$goog$html$SafeHtml_SafeHtml.from = module$contents$goog$html$SafeHtml_SafeHtml.htmlEscape; +var module$contents$goog$html$SafeHtml_VALID_NAMES_IN_TAG = /^[a-zA-Z0-9-]+$/, module$contents$goog$html$SafeHtml_URL_ATTRIBUTES = {action:!0, cite:!0, data:!0, formaction:!0, href:!0, manifest:!0, poster:!0, src:!0}, module$contents$goog$html$SafeHtml_NOT_ALLOWED_TAG_NAMES = module$contents$goog$object_createSet(goog.dom.TagName.APPLET, goog.dom.TagName.BASE, goog.dom.TagName.EMBED, goog.dom.TagName.IFRAME, goog.dom.TagName.LINK, goog.dom.TagName.MATH, goog.dom.TagName.META, goog.dom.TagName.OBJECT, +goog.dom.TagName.SCRIPT, goog.dom.TagName.STYLE, goog.dom.TagName.SVG, goog.dom.TagName.TEMPLATE); +function module$contents$goog$html$SafeHtml_getAttrNameAndValue(tagName, name, value) { + if (value instanceof goog.string.Const) { + value = goog.string.Const.unwrap(value); + } else if ("style" == name.toLowerCase()) { + if (module$contents$goog$html$SafeHtml_SafeHtml.SUPPORT_STYLE_ATTRIBUTE) { + value = module$contents$goog$html$SafeHtml_getStyleValue(value); + } else { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "style" not supported.' : ""); + } + } else { + if (/^on/i.test(name)) { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "' + name + '" requires goog.string.Const value, "' + value + '" given.' : ""); + } + if (name.toLowerCase() in module$contents$goog$html$SafeHtml_URL_ATTRIBUTES) { + if (value instanceof goog.html.TrustedResourceUrl) { + value = goog.html.TrustedResourceUrl.unwrap(value); + } else if (value instanceof goog.html.SafeUrl) { + value = goog.html.SafeUrl.unwrap(value); + } else if ("string" === typeof value) { + value = goog.html.SafeUrl.sanitize(value).toString(); + } else { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "' + name + '" on tag "' + tagName + '" requires goog.html.SafeUrl, goog.string.Const, or string, value "' + value + '" given.' : ""); + } + } + } + goog.asserts.assert(value instanceof goog.html.SafeUrl || value instanceof goog.html.TrustedResourceUrl || value instanceof module$contents$goog$html$SafeStyle_SafeStyle || value instanceof module$contents$goog$html$SafeHtml_SafeHtml || "string" === typeof value || "number" === typeof value, "String or number value expected, got " + typeof value + " with value: " + value); + return name + '="' + goog.string.internal.htmlEscape(String(value)) + '"'; } -module$exports$safevalues$internals$attribute_impl.createAttributePrefixInternal = module$contents$safevalues$internals$attribute_impl_createAttributePrefixInternal; -function module$contents$safevalues$internals$attribute_impl_unwrapAttributePrefix(value) { - if (value instanceof module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl) { - return value.privateDoNotAccessOrElseWrappedAttrPrefix; +function module$contents$goog$html$SafeHtml_getStyleValue(value) { + if (!goog.isObject(value)) { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'The "style" attribute requires goog.html.SafeStyle or map of style properties, ' + typeof value + " given: " + value : ""); } - var message = ""; - goog.DEBUG && (message = "Unexpected type when unwrapping SafeAttributePrefix"); - throw Error(message); + value instanceof module$contents$goog$html$SafeStyle_SafeStyle || (value = module$contents$goog$html$SafeStyle_SafeStyle.create(value)); + return module$contents$goog$html$SafeStyle_SafeStyle.unwrap(value); } -module$exports$safevalues$internals$attribute_impl.unwrapAttributePrefix = module$contents$safevalues$internals$attribute_impl_unwrapAttributePrefix; +module$contents$goog$html$SafeHtml_SafeHtml.DOCTYPE_HTML = function() { + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(""); +}(); +module$contents$goog$html$SafeHtml_SafeHtml.EMPTY = new module$contents$goog$html$SafeHtml_SafeHtml(goog.global.trustedTypes && goog.global.trustedTypes.emptyHTML || "", module$contents$goog$html$SafeHtml_CONSTRUCTOR_TOKEN_PRIVATE); +module$contents$goog$html$SafeHtml_SafeHtml.BR = function() { + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("
"); +}(); +goog.html.SafeHtml = module$contents$goog$html$SafeHtml_SafeHtml; +var module$exports$goog$html$safehtml_internals_for_safevalues = {}; +module$exports$goog$html$safehtml_internals_for_safevalues.createSafeHtml = module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse; var module$exports$safevalues$internals$html_impl = {}, module$contents$safevalues$internals$html_impl_module = module$contents$safevalues$internals$html_impl_module || {id:"third_party/javascript/safevalues/internals/html_impl.closure.js"}; module$exports$safevalues$internals$html_impl.SafeHtml = module$contents$goog$html$SafeHtml_SafeHtml; module$exports$safevalues$internals$html_impl.createHtmlInternal = function(html) { - return (0,module$exports$goog$html$internals.createSafeHtml)(html); + return (0,module$exports$goog$html$safehtml_internals_for_safevalues.createSafeHtml)(html); }; module$exports$safevalues$internals$html_impl.EMPTY_HTML = module$contents$goog$html$SafeHtml_SafeHtml.EMPTY; module$exports$safevalues$internals$html_impl.isHtml = function(value) { @@ -7324,10 +7320,12 @@ module$exports$safevalues$internals$html_impl.isHtml = function(value) { module$exports$safevalues$internals$html_impl.unwrapHtml = function(value) { return module$contents$goog$html$SafeHtml_SafeHtml.unwrapTrustedHTML(value); }; +var module$exports$goog$html$safestyle_internals_for_safevalues = {}; +module$exports$goog$html$safestyle_internals_for_safevalues.createSafeStyle = module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse; var module$exports$safevalues$internals$style_impl = {}, module$contents$safevalues$internals$style_impl_module = module$contents$safevalues$internals$style_impl_module || {id:"third_party/javascript/safevalues/internals/style_impl.closure.js"}; module$exports$safevalues$internals$style_impl.SafeStyle = module$contents$goog$html$SafeStyle_SafeStyle; function module$contents$safevalues$internals$style_impl_createStyleInternal(style) { - return (0,module$exports$goog$html$internals.createSafeStyle)(style); + return (0,module$exports$goog$html$safestyle_internals_for_safevalues.createSafeStyle)(style); } module$exports$safevalues$internals$style_impl.createStyleInternal = module$contents$safevalues$internals$style_impl_createStyleInternal; function module$contents$safevalues$internals$style_impl_isStyle(value) { @@ -7562,7 +7560,7 @@ module$exports$safevalues$dom$globals$window.getStyleNonce = function(win) { return module$contents$safevalues$dom$globals$window_getNonceFor("style", win); }; function module$contents$safevalues$dom$globals$window_getNonceFor(elementName, win) { - var $jscomp$optchain$tmpm1987982378$0, $jscomp$optchain$tmpm1987982378$1, el = null == ($jscomp$optchain$tmpm1987982378$1 = ($jscomp$optchain$tmpm1987982378$0 = win.document).querySelector) ? void 0 : $jscomp$optchain$tmpm1987982378$1.call($jscomp$optchain$tmpm1987982378$0, elementName + "[nonce]"); + var $jscomp$optchain$tmp220578679$0, $jscomp$optchain$tmp220578679$1, el = null == ($jscomp$optchain$tmp220578679$1 = ($jscomp$optchain$tmp220578679$0 = win.document).querySelector) ? void 0 : $jscomp$optchain$tmp220578679$1.call($jscomp$optchain$tmp220578679$0, elementName + "[nonce]"); return el ? el.nonce || el.getAttribute("nonce") || "" : ""; } ;var module$exports$safevalues$internals$script_impl = {}, module$contents$safevalues$internals$script_impl_module = module$contents$safevalues$internals$script_impl_module || {id:"third_party/javascript/safevalues/internals/script_impl.closure.js"}, module$contents$safevalues$internals$script_impl_trustedTypes = goog.global.trustedTypes; @@ -7612,10 +7610,12 @@ module$exports$safevalues$dom$elements$script.setSrc = function(script, v, optio script.src = module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(v); (null == options ? 0 : options.omitNonce) || module$contents$safevalues$dom$elements$script_setNonceForScriptElement(script); }; +var module$exports$goog$html$safestylesheet_internals_for_safevalues = {}; +module$exports$goog$html$safestylesheet_internals_for_safevalues.createSafeStyleSheet = module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse; var module$exports$safevalues$internals$style_sheet_impl = {}, module$contents$safevalues$internals$style_sheet_impl_module = module$contents$safevalues$internals$style_sheet_impl_module || {id:"third_party/javascript/safevalues/internals/style_sheet_impl.closure.js"}; module$exports$safevalues$internals$style_sheet_impl.SafeStyleSheet = module$contents$goog$html$SafeStyleSheet_SafeStyleSheet; function module$contents$safevalues$internals$style_sheet_impl_createStyleSheetInternal(styleSheet) { - return (0,module$exports$goog$html$internals.createSafeStyleSheet)(styleSheet); + return (0,module$exports$goog$html$safestylesheet_internals_for_safevalues.createSafeStyleSheet)(styleSheet); } module$exports$safevalues$internals$style_sheet_impl.createStyleSheetInternal = module$contents$safevalues$internals$style_sheet_impl_createStyleSheetInternal; function module$contents$safevalues$internals$style_sheet_impl_isStyleSheet(value) { @@ -7963,48 +7963,48 @@ function module$contents$safevalues$dom$globals$fetch_privatecreateHtmlInternal( return (0,module$exports$safevalues$internals$html_impl.createHtmlInternal)(html); } function module$contents$safevalues$dom$globals$fetch_fetchResourceUrl(u, init) { - var response, $jscomp$optchain$tmp1153895636$0, $jscomp$optchain$tmp1153895636$1, $jscomp$optchain$tmp1153895636$2, mimeType; - return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$1153895636$6) { - if (1 == $jscomp$generator$context$1153895636$6.nextAddress) { - return $jscomp$generator$context$1153895636$6.yield(fetch(module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(u).toString(), init), 2); - } - response = $jscomp$generator$context$1153895636$6.yieldResult; - mimeType = null == ($jscomp$optchain$tmp1153895636$0 = response.headers.get("Content-Type")) ? void 0 : null == ($jscomp$optchain$tmp1153895636$1 = $jscomp$optchain$tmp1153895636$0.split(";", 2)) ? void 0 : null == ($jscomp$optchain$tmp1153895636$2 = $jscomp$optchain$tmp1153895636$1[0]) ? void 0 : $jscomp$optchain$tmp1153895636$2.toLowerCase(); - return $jscomp$generator$context$1153895636$6.return({html:function() { + var response, $jscomp$optchain$tmpm991617773$0, $jscomp$optchain$tmpm991617773$1, $jscomp$optchain$tmpm991617773$2, mimeType; + return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$m991617773$6) { + if (1 == $jscomp$generator$context$m991617773$6.nextAddress) { + return $jscomp$generator$context$m991617773$6.yield(fetch(module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(u).toString(), init), 2); + } + response = $jscomp$generator$context$m991617773$6.yieldResult; + mimeType = null == ($jscomp$optchain$tmpm991617773$0 = response.headers.get("Content-Type")) ? void 0 : null == ($jscomp$optchain$tmpm991617773$1 = $jscomp$optchain$tmpm991617773$0.split(";", 2)) ? void 0 : null == ($jscomp$optchain$tmpm991617773$2 = $jscomp$optchain$tmpm991617773$1[0]) ? void 0 : $jscomp$optchain$tmpm991617773$2.toLowerCase(); + return $jscomp$generator$context$m991617773$6.return({html:function() { var text; - return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$1153895636$3) { - if (1 == $jscomp$generator$context$1153895636$3.nextAddress) { + return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$m991617773$3) { + if (1 == $jscomp$generator$context$m991617773$3.nextAddress) { if ("text/html" !== mimeType) { throw new module$exports$safevalues$dom$globals$fetch.IncorrectContentTypeError(response.url, "SafeHtml", "text/html"); } - return $jscomp$generator$context$1153895636$3.yield(response.text(), 2); + return $jscomp$generator$context$m991617773$3.yield(response.text(), 2); } - text = $jscomp$generator$context$1153895636$3.yieldResult; - return $jscomp$generator$context$1153895636$3.return(module$contents$safevalues$dom$globals$fetch_privatecreateHtmlInternal(text)); + text = $jscomp$generator$context$m991617773$3.yieldResult; + return $jscomp$generator$context$m991617773$3.return(module$contents$safevalues$dom$globals$fetch_privatecreateHtmlInternal(text)); }); }, script:function() { var text; - return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$1153895636$4) { - if (1 == $jscomp$generator$context$1153895636$4.nextAddress) { + return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$m991617773$4) { + if (1 == $jscomp$generator$context$m991617773$4.nextAddress) { if ("text/javascript" !== mimeType && "application/javascript" !== mimeType) { throw new module$exports$safevalues$dom$globals$fetch.IncorrectContentTypeError(response.url, "SafeScript", "text/javascript"); } - return $jscomp$generator$context$1153895636$4.yield(response.text(), 2); + return $jscomp$generator$context$m991617773$4.yield(response.text(), 2); } - text = $jscomp$generator$context$1153895636$4.yieldResult; - return $jscomp$generator$context$1153895636$4.return(module$contents$safevalues$internals$script_impl_createScriptInternal(text)); + text = $jscomp$generator$context$m991617773$4.yieldResult; + return $jscomp$generator$context$m991617773$4.return(module$contents$safevalues$internals$script_impl_createScriptInternal(text)); }); }, styleSheet:function() { var text; - return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$1153895636$5) { - if (1 == $jscomp$generator$context$1153895636$5.nextAddress) { + return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$m991617773$5) { + if (1 == $jscomp$generator$context$m991617773$5.nextAddress) { if ("text/css" !== mimeType) { throw new module$exports$safevalues$dom$globals$fetch.IncorrectContentTypeError(response.url, "SafeStyleSheet", "text/css"); } - return $jscomp$generator$context$1153895636$5.yield(response.text(), 2); + return $jscomp$generator$context$m991617773$5.yield(response.text(), 2); } - text = $jscomp$generator$context$1153895636$5.yieldResult; - return $jscomp$generator$context$1153895636$5.return(module$contents$safevalues$internals$style_sheet_impl_createStyleSheetInternal(text)); + text = $jscomp$generator$context$m991617773$5.yieldResult; + return $jscomp$generator$context$m991617773$5.return(module$contents$safevalues$internals$style_sheet_impl_createStyleSheetInternal(text)); }); }}); }); @@ -9296,8 +9296,8 @@ function module$contents$eeapiclient$request_params_processParams(params) { } module$exports$eeapiclient$request_params.processParams = module$contents$eeapiclient$request_params_processParams; function module$contents$eeapiclient$request_params_buildQueryParams(params, mapping, passthroughParams) { - for (var urlQueryParams = passthroughParams = void 0 === passthroughParams ? {} : passthroughParams, $jscomp$iter$28 = $jscomp.makeIterator(Object.entries(mapping)), $jscomp$key$m125199259$0$ = $jscomp$iter$28.next(); !$jscomp$key$m125199259$0$.done; $jscomp$key$m125199259$0$ = $jscomp$iter$28.next()) { - var $jscomp$destructuring$var27 = $jscomp.makeIterator($jscomp$key$m125199259$0$.value), jsName__tsickle_destructured_1 = $jscomp$destructuring$var27.next().value, urlQueryParamName__tsickle_destructured_2 = $jscomp$destructuring$var27.next().value, jsName = jsName__tsickle_destructured_1, urlQueryParamName = urlQueryParamName__tsickle_destructured_2; + for (var urlQueryParams = passthroughParams = void 0 === passthroughParams ? {} : passthroughParams, $jscomp$iter$28 = $jscomp.makeIterator(Object.entries(mapping)), $jscomp$key$1047461284$0$ = $jscomp$iter$28.next(); !$jscomp$key$1047461284$0$.done; $jscomp$key$1047461284$0$ = $jscomp$iter$28.next()) { + var $jscomp$destructuring$var27 = $jscomp.makeIterator($jscomp$key$1047461284$0$.value), jsName__tsickle_destructured_1 = $jscomp$destructuring$var27.next().value, urlQueryParamName__tsickle_destructured_2 = $jscomp$destructuring$var27.next().value, jsName = jsName__tsickle_destructured_1, urlQueryParamName = urlQueryParamName__tsickle_destructured_2; jsName in params && (urlQueryParams[urlQueryParamName] = params[jsName]); } return urlQueryParams; @@ -9308,8 +9308,8 @@ module$exports$eeapiclient$request_params.bypassCorsPreflight = function(params) var safeHeaders = {}, unsafeHeaders = {}, hasUnsafeHeaders = !1, hasContentType = !1; if (params.headers) { hasContentType = null != params.headers["Content-Type"]; - for (var $jscomp$iter$29 = $jscomp.makeIterator(Object.entries(params.headers)), $jscomp$key$m125199259$1$ = $jscomp$iter$29.next(); !$jscomp$key$m125199259$1$.done; $jscomp$key$m125199259$1$ = $jscomp$iter$29.next()) { - var $jscomp$destructuring$var29 = $jscomp.makeIterator($jscomp$key$m125199259$1$.value), key__tsickle_destructured_3 = $jscomp$destructuring$var29.next().value, value__tsickle_destructured_4 = $jscomp$destructuring$var29.next().value, key = key__tsickle_destructured_3, value = value__tsickle_destructured_4; + for (var $jscomp$iter$29 = $jscomp.makeIterator(Object.entries(params.headers)), $jscomp$key$1047461284$1$ = $jscomp$iter$29.next(); !$jscomp$key$1047461284$1$.done; $jscomp$key$1047461284$1$ = $jscomp$iter$29.next()) { + var $jscomp$destructuring$var29 = $jscomp.makeIterator($jscomp$key$1047461284$1$.value), key__tsickle_destructured_3 = $jscomp$destructuring$var29.next().value, value__tsickle_destructured_4 = $jscomp$destructuring$var29.next().value, key = key__tsickle_destructured_3, value = value__tsickle_destructured_4; module$contents$eeapiclient$request_params_simpleCorsAllowedHeaders.includes(key) ? safeHeaders[key] = value : (unsafeHeaders[key] = value, hasUnsafeHeaders = !0); } } @@ -9354,15 +9354,15 @@ module$exports$eeapiclient$multipart_request.MultipartRequest.prototype.addMetad this._metadataPayload += "Content-Type: application/json; charset=utf-8\r\n\r\n" + JSON.stringify(json) + ("\r\n--" + this._boundary + "\r\n"); }; module$exports$eeapiclient$multipart_request.MultipartRequest.prototype.build = function() { - var $jscomp$this$m133342051$6 = this, payload = "--" + this._boundary + "\r\n"; + var $jscomp$this$m667091202$6 = this, payload = "--" + this._boundary + "\r\n"; payload += this._metadataPayload; return Promise.all(this.files.map(function(f) { - return $jscomp$this$m133342051$6.encodeFile(f); + return $jscomp$this$m667091202$6.encodeFile(f); })).then(function(filePayloads) { - for (var $jscomp$iter$30 = $jscomp.makeIterator(filePayloads), $jscomp$key$m133342051$9$filePayload = $jscomp$iter$30.next(); !$jscomp$key$m133342051$9$filePayload.done; $jscomp$key$m133342051$9$filePayload = $jscomp$iter$30.next()) { - payload += $jscomp$key$m133342051$9$filePayload.value; + for (var $jscomp$iter$30 = $jscomp.makeIterator(filePayloads), $jscomp$key$m667091202$9$filePayload = $jscomp$iter$30.next(); !$jscomp$key$m667091202$9$filePayload.done; $jscomp$key$m667091202$9$filePayload = $jscomp$iter$30.next()) { + payload += $jscomp$key$m667091202$9$filePayload.value; } - return payload += "\r\n--" + $jscomp$this$m133342051$6._boundary + "--"; + return payload += "\r\n--" + $jscomp$this$m667091202$6._boundary + "--"; }); }; module$exports$eeapiclient$multipart_request.MultipartRequest.prototype.encodeFile = function(file) { @@ -9450,9 +9450,9 @@ module$exports$eeapiclient$promise_api_client.PromiseApiClient.prototype.$reques return this.$addHooksToRequest(requestParams, this.requestService.send(module$contents$eeapiclient$api_client_toMakeRequestParams(requestParams), responseCtor)); }; module$exports$eeapiclient$promise_api_client.PromiseApiClient.prototype.$uploadRequest = function(requestParams) { - var $jscomp$this$m296226325$4 = this, responseCtor = requestParams.responseCtor || void 0; + var $jscomp$this$1237977804$4 = this, responseCtor = requestParams.responseCtor || void 0; return this.$addHooksToRequest(requestParams, module$contents$eeapiclient$api_client_toMultipartMakeRequestParams(requestParams).then(function(params) { - return $jscomp$this$m296226325$4.requestService.send(params, responseCtor); + return $jscomp$this$1237977804$4.requestService.send(params, responseCtor); })); }; var module$exports$eeapiclient$ee_api_client = {}, module$contents$eeapiclient$ee_api_client_module = module$contents$eeapiclient$ee_api_client_module || {id:"geo/gestalt/client/javascript/v1/ee_api_client.closure.js"}; @@ -15565,8 +15565,8 @@ module$exports$safevalues$builders$html_formatter.HtmlFormatter = function() { this.replacements = new Map(); }; module$exports$safevalues$builders$html_formatter.HtmlFormatter.prototype.format = function(format) { - var $jscomp$this$1018007701$5 = this, openedTags = [], marker = (0,module$exports$safevalues$builders$html_builders.htmlEscape)("_safevalues_format_marker_:").toString(), html = (0,module$exports$safevalues$builders$html_builders.htmlEscape)(format).toString().replace(new RegExp("\\{" + marker + "[\\w&#;]+\\}", "g"), function(match) { - return $jscomp$this$1018007701$5.replaceFormattingString(openedTags, match); + var $jscomp$this$380122516$5 = this, openedTags = [], marker = (0,module$exports$safevalues$builders$html_builders.htmlEscape)("_safevalues_format_marker_:").toString(), html = (0,module$exports$safevalues$builders$html_builders.htmlEscape)(format).toString().replace(new RegExp("\\{" + marker + "[\\w&#;]+\\}", "g"), function(match) { + return $jscomp$this$380122516$5.replaceFormattingString(openedTags, match); }); if (0 !== openedTags.length) { if (goog.DEBUG) { @@ -15708,7 +15708,7 @@ module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanit })}]]; module$exports$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table.defaultSanitizerTable = new module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.SanitizerTable(new Set(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ALLOWED_ELEMENTS), new Map(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ELEMENT_POLICIES), new Set(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ALLOWED_GLOBAL_ATTRIBUTES), new Map(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_GLOBAL_ATTRIBUTE_POLICIES)); -module$exports$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table.lenientSanitizerTable = new module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.SanitizerTable(new Set(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ALLOWED_ELEMENTS.concat(["BUTTON"])), new Map(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ELEMENT_POLICIES), +module$exports$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table.lenientSanitizerTable = new module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.SanitizerTable(new Set(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ALLOWED_ELEMENTS.concat(["BUTTON", "INPUT"])), new Map(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ELEMENT_POLICIES), new Set(module$contents$safevalues$internals$pure_pure(function() { return module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ALLOWED_GLOBAL_ATTRIBUTES.concat(["class", "id", "name"]); })), new Map(module$contents$safevalues$internals$pure_pure(function() { @@ -15746,8 +15746,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerIm return this.sanitizeToFragmentInternal(html, inertDocument); }; module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerImpl.prototype.sanitizeToFragmentInternal = function(html, inertDocument) { - for (var $jscomp$this$m1085474118$10 = this, dirtyFragment = module$contents$safevalues$builders$html_sanitizer$inert_fragment_createInertFragment(html, inertDocument), treeWalker = document.createTreeWalker(dirtyFragment, 5, function(n) { - return $jscomp$this$m1085474118$10.nodeFilter(n); + for (var $jscomp$this$m1803429925$10 = this, dirtyFragment = module$contents$safevalues$builders$html_sanitizer$inert_fragment_createInertFragment(html, inertDocument), treeWalker = document.createTreeWalker(dirtyFragment, 5, function(n) { + return $jscomp$this$m1803429925$10.nodeFilter(n); }, !1), currentNode = treeWalker.nextNode(), sanitizedFragment = inertDocument.createDocumentFragment(), sanitizedParent = sanitizedFragment; null !== currentNode;) { var sanitizedNode = void 0; if (module$contents$safevalues$builders$html_sanitizer$no_clobber_isText(currentNode)) { @@ -15774,8 +15774,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerIm return document.createTextNode(textNode.data); }; module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerImpl.prototype.sanitizeElementNode = function(elementNode, inertDocument) { - for (var elementName = module$contents$safevalues$builders$html_sanitizer$no_clobber_getNodeName(elementNode), newNode = inertDocument.createElement(elementName), dirtyAttributes = elementNode.attributes, $jscomp$iter$31 = $jscomp.makeIterator(dirtyAttributes), $jscomp$key$m1085474118$25$ = $jscomp$iter$31.next(); !$jscomp$key$m1085474118$25$.done; $jscomp$key$m1085474118$25$ = $jscomp$iter$31.next()) { - var $jscomp$destructuring$var31 = $jscomp$key$m1085474118$25$.value, name = $jscomp$destructuring$var31.name, value = $jscomp$destructuring$var31.value, policy = this.sanitizerTable.getAttributePolicy(name, elementName); + for (var elementName = module$contents$safevalues$builders$html_sanitizer$no_clobber_getNodeName(elementNode), newNode = inertDocument.createElement(elementName), dirtyAttributes = elementNode.attributes, $jscomp$iter$31 = $jscomp.makeIterator(dirtyAttributes), $jscomp$key$m1803429925$25$ = $jscomp$iter$31.next(); !$jscomp$key$m1803429925$25$.done; $jscomp$key$m1803429925$25$ = $jscomp$iter$31.next()) { + var $jscomp$destructuring$var31 = $jscomp$key$m1803429925$25$.value, name = $jscomp$destructuring$var31.name, value = $jscomp$destructuring$var31.value, policy = this.sanitizerTable.getAttributePolicy(name, elementName); if (this.satisfiesAllConditions(policy.conditions, dirtyAttributes)) { switch(policy.policyAction) { case module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP: @@ -15828,8 +15828,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerIm if (!conditions) { return !0; } - for (var $jscomp$iter$32 = $jscomp.makeIterator(conditions), $jscomp$key$m1085474118$26$ = $jscomp$iter$32.next(); !$jscomp$key$m1085474118$26$.done; $jscomp$key$m1085474118$26$ = $jscomp$iter$32.next()) { - var $jscomp$destructuring$var33 = $jscomp.makeIterator($jscomp$key$m1085474118$26$.value), attrName__tsickle_destructured_1 = $jscomp$destructuring$var33.next().value, expectedValues = $jscomp$destructuring$var33.next().value, $jscomp$optchain$tmpm1085474118$0 = void 0, value = null == ($jscomp$optchain$tmpm1085474118$0 = attrs.getNamedItem(attrName__tsickle_destructured_1)) ? void 0 : $jscomp$optchain$tmpm1085474118$0.value; + for (var $jscomp$iter$32 = $jscomp.makeIterator(conditions), $jscomp$key$m1803429925$26$ = $jscomp$iter$32.next(); !$jscomp$key$m1803429925$26$.done; $jscomp$key$m1803429925$26$ = $jscomp$iter$32.next()) { + var $jscomp$destructuring$var33 = $jscomp.makeIterator($jscomp$key$m1803429925$26$.value), attrName__tsickle_destructured_1 = $jscomp$destructuring$var33.next().value, expectedValues = $jscomp$destructuring$var33.next().value, $jscomp$optchain$tmpm1803429925$0 = void 0, value = null == ($jscomp$optchain$tmpm1803429925$0 = attrs.getNamedItem(attrName__tsickle_destructured_1)) ? void 0 : $jscomp$optchain$tmpm1803429925$0.value; if (value && !expectedValues.has(value)) { return !1; } @@ -15883,8 +15883,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSan this.sanitizerTable = module$exports$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table.defaultSanitizerTable; }; module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSanitizerBuilder.prototype.onlyAllowElements = function(elementSet) { - for (var allowedElements = new Set(), allowedElementPolicies = new Map(), $jscomp$iter$33 = $jscomp.makeIterator(elementSet), $jscomp$key$435282654$0$element = $jscomp$iter$33.next(); !$jscomp$key$435282654$0$element.done; $jscomp$key$435282654$0$element = $jscomp$iter$33.next()) { - var element = $jscomp$key$435282654$0$element.value; + for (var allowedElements = new Set(), allowedElementPolicies = new Map(), $jscomp$iter$33 = $jscomp.makeIterator(elementSet), $jscomp$key$m1412690177$0$element = $jscomp$iter$33.next(); !$jscomp$key$m1412690177$0$element.done; $jscomp$key$m1412690177$0$element = $jscomp$iter$33.next()) { + var element = $jscomp$key$m1412690177$0$element.value; element = element.toUpperCase(); if (!this.sanitizerTable.isAllowedElement(element)) { throw Error("Element: " + element + ", is not allowed by html5_contract.textpb"); @@ -15902,8 +15902,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSan throw Error("Element: " + element + " is not a custom element"); } if (allowedAttributes) { - for (var elementPolicy = new Map(), $jscomp$iter$34 = $jscomp.makeIterator(allowedAttributes), $jscomp$key$435282654$1$attribute = $jscomp$iter$34.next(); !$jscomp$key$435282654$1$attribute.done; $jscomp$key$435282654$1$attribute = $jscomp$iter$34.next()) { - elementPolicy.set($jscomp$key$435282654$1$attribute.value, {policyAction:module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP}); + for (var elementPolicy = new Map(), $jscomp$iter$34 = $jscomp.makeIterator(allowedAttributes), $jscomp$key$m1412690177$1$attribute = $jscomp$iter$34.next(); !$jscomp$key$m1412690177$1$attribute.done; $jscomp$key$m1412690177$1$attribute = $jscomp$iter$34.next()) { + elementPolicy.set($jscomp$key$m1412690177$1$attribute.value, {policyAction:module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP}); } allowedElementPolicies.set(element, elementPolicy); } else { @@ -15913,15 +15913,15 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSan return this; }; module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSanitizerBuilder.prototype.onlyAllowAttributes = function(attributeSet) { - for (var allowedGlobalAttributes = new Set(), globalAttributePolicies = new Map(), elementPolicies = new Map(), $jscomp$iter$35 = $jscomp.makeIterator(attributeSet), $jscomp$key$435282654$2$attribute = $jscomp$iter$35.next(); !$jscomp$key$435282654$2$attribute.done; $jscomp$key$435282654$2$attribute = $jscomp$iter$35.next()) { - var attribute = $jscomp$key$435282654$2$attribute.value; + for (var allowedGlobalAttributes = new Set(), globalAttributePolicies = new Map(), elementPolicies = new Map(), $jscomp$iter$35 = $jscomp.makeIterator(attributeSet), $jscomp$key$m1412690177$2$attribute = $jscomp$iter$35.next(); !$jscomp$key$m1412690177$2$attribute.done; $jscomp$key$m1412690177$2$attribute = $jscomp$iter$35.next()) { + var attribute = $jscomp$key$m1412690177$2$attribute.value; this.sanitizerTable.allowedGlobalAttributes.has(attribute) && allowedGlobalAttributes.add(attribute); this.sanitizerTable.globalAttributePolicies.has(attribute) && globalAttributePolicies.set(attribute, this.sanitizerTable.globalAttributePolicies.get(attribute)); } - for (var $jscomp$iter$37 = $jscomp.makeIterator(this.sanitizerTable.elementPolicies.entries()), $jscomp$key$435282654$4$ = $jscomp$iter$37.next(); !$jscomp$key$435282654$4$.done; $jscomp$key$435282654$4$ = $jscomp$iter$37.next()) { - for (var $jscomp$destructuring$var35 = $jscomp.makeIterator($jscomp$key$435282654$4$.value), elementName__tsickle_destructured_1 = $jscomp$destructuring$var35.next().value, originalElementPolicy__tsickle_destructured_2 = $jscomp$destructuring$var35.next().value, elementName = elementName__tsickle_destructured_1, newElementPolicy = new Map(), $jscomp$iter$36 = $jscomp.makeIterator(originalElementPolicy__tsickle_destructured_2.entries()), $jscomp$key$435282654$3$ = $jscomp$iter$36.next(); !$jscomp$key$435282654$3$.done; $jscomp$key$435282654$3$ = + for (var $jscomp$iter$37 = $jscomp.makeIterator(this.sanitizerTable.elementPolicies.entries()), $jscomp$key$m1412690177$4$ = $jscomp$iter$37.next(); !$jscomp$key$m1412690177$4$.done; $jscomp$key$m1412690177$4$ = $jscomp$iter$37.next()) { + for (var $jscomp$destructuring$var35 = $jscomp.makeIterator($jscomp$key$m1412690177$4$.value), elementName__tsickle_destructured_1 = $jscomp$destructuring$var35.next().value, originalElementPolicy__tsickle_destructured_2 = $jscomp$destructuring$var35.next().value, elementName = elementName__tsickle_destructured_1, newElementPolicy = new Map(), $jscomp$iter$36 = $jscomp.makeIterator(originalElementPolicy__tsickle_destructured_2.entries()), $jscomp$key$m1412690177$3$ = $jscomp$iter$36.next(); !$jscomp$key$m1412690177$3$.done; $jscomp$key$m1412690177$3$ = $jscomp$iter$36.next()) { - var $jscomp$destructuring$var37 = $jscomp.makeIterator($jscomp$key$435282654$3$.value), attribute__tsickle_destructured_3 = $jscomp$destructuring$var37.next().value, attributePolicy__tsickle_destructured_4 = $jscomp$destructuring$var37.next().value, attribute$jscomp$0 = attribute__tsickle_destructured_3, attributePolicy = attributePolicy__tsickle_destructured_4; + var $jscomp$destructuring$var37 = $jscomp.makeIterator($jscomp$key$m1412690177$3$.value), attribute__tsickle_destructured_3 = $jscomp$destructuring$var37.next().value, attributePolicy__tsickle_destructured_4 = $jscomp$destructuring$var37.next().value, attribute$jscomp$0 = attribute__tsickle_destructured_3, attributePolicy = attributePolicy__tsickle_destructured_4; attributeSet.has(attribute$jscomp$0) && newElementPolicy.set(attribute$jscomp$0, attributePolicy); } elementPolicies.set(elementName, newElementPolicy); @@ -15930,8 +15930,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSan return this; }; module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSanitizerBuilder.prototype.allowDataAttributes = function(attributes) { - for (var allowedGlobalAttributes = new Set(this.sanitizerTable.allowedGlobalAttributes), $jscomp$iter$38 = $jscomp.makeIterator(attributes), $jscomp$key$435282654$5$attribute = $jscomp$iter$38.next(); !$jscomp$key$435282654$5$attribute.done; $jscomp$key$435282654$5$attribute = $jscomp$iter$38.next()) { - var attribute = $jscomp$key$435282654$5$attribute.value; + for (var allowedGlobalAttributes = new Set(this.sanitizerTable.allowedGlobalAttributes), $jscomp$iter$38 = $jscomp.makeIterator(attributes), $jscomp$key$m1412690177$5$attribute = $jscomp$iter$38.next(); !$jscomp$key$m1412690177$5$attribute.done; $jscomp$key$m1412690177$5$attribute = $jscomp$iter$38.next()) { + var attribute = $jscomp$key$m1412690177$5$attribute.value; if (0 !== attribute.indexOf("data-")) { throw Error("data attribute: " + attribute + ' does not begin with the prefix "data-"'); } @@ -16182,12 +16182,12 @@ function module$contents$safevalues$reporting$reporting_isChangedBySanitizing(s, } try { module$contents$safevalues$builders$html_sanitizer$html_sanitizer_lenientlySanitizeHtmlAssertUnchanged(s); - } catch ($jscomp$unused$catch$696273141$0) { + } catch ($jscomp$unused$catch$442189172$0) { return module$contents$safevalues$reporting$reporting_reportLegacyConversion(options, module$contents$safevalues$reporting$reporting_ReportingType.HTML_CHANGED_BY_RELAXED_SANITIZING), !0; } try { module$contents$safevalues$builders$html_sanitizer$html_sanitizer_sanitizeHtmlAssertUnchanged(s); - } catch ($jscomp$unused$catch$696273141$1) { + } catch ($jscomp$unused$catch$442189172$1) { return module$contents$safevalues$reporting$reporting_reportLegacyConversion(options, module$contents$safevalues$reporting$reporting_ReportingType.HTML_CHANGED_BY_SANITIZING), !0; } return !1; @@ -19089,7 +19089,7 @@ var $jscomp$templatelit$294235699$96 = $jscomp.createTemplateTagFirstArg(["https ee.apiclient = {}; var module$contents$ee$apiclient_apiclient = {}; ee.apiclient.VERSION = module$exports$ee$apiVersion.V1; -ee.apiclient.API_CLIENT_VERSION = "0.1.394"; +ee.apiclient.API_CLIENT_VERSION = "0.1.395"; ee.apiclient.NULL_VALUE = module$exports$eeapiclient$domain_object.NULL_VALUE; ee.apiclient.PromiseRequestService = module$exports$eeapiclient$promise_request_service.PromiseRequestService; ee.apiclient.MakeRequestParams = module$contents$eeapiclient$request_params_MakeRequestParams; @@ -19379,8 +19379,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded"; body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST")); method = method || "POST"; - var headers = {"Content-Type":contentType}, version = "0.1.394"; - "0.1.394" === version && (version = "latest"); + var headers = {"Content-Type":contentType}, version = "0.1.395"; + "0.1.395" === version && (version = "latest"); headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version; var authToken = module$contents$ee$apiclient_apiclient.getAuthToken(); if (null != authToken) { diff --git a/javascript/build/ee_api_js_npm.js b/javascript/build/ee_api_js_npm.js index 56ae23dca..ef0571760 100644 --- a/javascript/build/ee_api_js_npm.js +++ b/javascript/build/ee_api_js_npm.js @@ -6059,9 +6059,9 @@ module$exports$eeapiclient$domain_object.strictDeserialize = function(type, raw) }; var module$contents$eeapiclient$domain_object_CopyValueGetter, module$contents$eeapiclient$domain_object_CopyValueSetter, module$contents$eeapiclient$domain_object_CopyConstructor, module$contents$eeapiclient$domain_object_CopyInstanciator; function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter, valueSetter, copyInstanciator, targetConstructor) { - for (var target = copyInstanciator(targetConstructor), metadata = module$contents$eeapiclient$domain_object_deepCopyMetadata(source, target), arrays = metadata.arrays || {}, objects = metadata.objects || {}, objectMaps = metadata.objectMaps || {}, $jscomp$iter$19 = $jscomp.makeIterator(metadata.keys || []), $jscomp$key$m1892927425$40$key = $jscomp$iter$19.next(), $jscomp$loop$m1892927425$44 = {}; !$jscomp$key$m1892927425$40$key.done; $jscomp$loop$m1892927425$44 = - {mapMetadata:void 0}, $jscomp$key$m1892927425$40$key = $jscomp$iter$19.next()) { - var key = $jscomp$key$m1892927425$40$key.value, value = valueGetter(key, source); + for (var target = copyInstanciator(targetConstructor), metadata = module$contents$eeapiclient$domain_object_deepCopyMetadata(source, target), arrays = metadata.arrays || {}, objects = metadata.objects || {}, objectMaps = metadata.objectMaps || {}, $jscomp$iter$19 = $jscomp.makeIterator(metadata.keys || []), $jscomp$key$m192531680$40$key = $jscomp$iter$19.next(), $jscomp$loop$m192531680$44 = {}; !$jscomp$key$m192531680$40$key.done; $jscomp$loop$m192531680$44 = + {mapMetadata:void 0}, $jscomp$key$m192531680$40$key = $jscomp$iter$19.next()) { + var key = $jscomp$key$m192531680$40$key.value, value = valueGetter(key, source); if (null != value) { var copy = void 0; if (arrays.hasOwnProperty(key)) { @@ -6072,11 +6072,11 @@ function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter, } else if (objects.hasOwnProperty(key)) { copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !1, !0, objects[key]); } else if (objectMaps.hasOwnProperty(key)) { - $jscomp$loop$m1892927425$44.mapMetadata = objectMaps[key], copy = $jscomp$loop$m1892927425$44.mapMetadata.isPropertyArray ? value.map(function($jscomp$loop$m1892927425$44) { + $jscomp$loop$m192531680$44.mapMetadata = objectMaps[key], copy = $jscomp$loop$m192531680$44.mapMetadata.isPropertyArray ? value.map(function($jscomp$loop$m192531680$44) { return function(v) { - return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$m1892927425$44.mapMetadata, valueGetter, valueSetter, copyInstanciator); + return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$m192531680$44.mapMetadata, valueGetter, valueSetter, copyInstanciator); }; - }($jscomp$loop$m1892927425$44)) : module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, $jscomp$loop$m1892927425$44.mapMetadata, valueGetter, valueSetter, copyInstanciator); + }($jscomp$loop$m192531680$44)) : module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, $jscomp$loop$m192531680$44.mapMetadata, valueGetter, valueSetter, copyInstanciator); } else if (Array.isArray(value)) { if (metadata.emptyArrayIsUnset && 0 === value.length) { continue; @@ -6091,8 +6091,8 @@ function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter, return target; } function module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, mapMetadata, valueGetter, valueSetter, copyInstanciator) { - for (var objMap = {}, $jscomp$iter$20 = $jscomp.makeIterator(Object.keys(value)), $jscomp$key$m1892927425$41$mapKey = $jscomp$iter$20.next(); !$jscomp$key$m1892927425$41$mapKey.done; $jscomp$key$m1892927425$41$mapKey = $jscomp$iter$20.next()) { - var mapKey = $jscomp$key$m1892927425$41$mapKey.value, mapValue = value[mapKey]; + for (var objMap = {}, $jscomp$iter$20 = $jscomp.makeIterator(Object.keys(value)), $jscomp$key$m192531680$41$mapKey = $jscomp$iter$20.next(); !$jscomp$key$m192531680$41$mapKey.done; $jscomp$key$m192531680$41$mapKey = $jscomp$iter$20.next()) { + var mapKey = $jscomp$key$m192531680$41$mapKey.value, mapValue = value[mapKey]; null != mapValue && (objMap[mapKey] = module$contents$eeapiclient$domain_object_deepCopyValue(mapValue, valueGetter, valueSetter, copyInstanciator, mapMetadata.isValueArray, mapMetadata.isSerializable, mapMetadata.ctor)); } return objMap; @@ -6122,39 +6122,39 @@ function module$contents$eeapiclient$domain_object_deepEquals(serializable1, ser if (!(module$contents$eeapiclient$domain_object_sameKeys(keys1, metadata2.keys || []) && module$contents$eeapiclient$domain_object_sameKeys(arrays1, arrays2) && module$contents$eeapiclient$domain_object_sameKeys(objects1, objects2) && module$contents$eeapiclient$domain_object_sameKeys(objectMaps1, objectMaps2))) { return !1; } - for (var $jscomp$iter$21 = $jscomp.makeIterator(keys1), $jscomp$key$m1892927425$42$key = $jscomp$iter$21.next(), $jscomp$loop$m1892927425$45 = {}; !$jscomp$key$m1892927425$42$key.done; $jscomp$loop$m1892927425$45 = {value2$jscomp$7:void 0, mapMetadata$jscomp$2:void 0}, $jscomp$key$m1892927425$42$key = $jscomp$iter$21.next()) { - var key = $jscomp$key$m1892927425$42$key.value, has1 = module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable1, key, metadata1), has2 = module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable2, key, metadata2); + for (var $jscomp$iter$21 = $jscomp.makeIterator(keys1), $jscomp$key$m192531680$42$key = $jscomp$iter$21.next(), $jscomp$loop$m192531680$45 = {}; !$jscomp$key$m192531680$42$key.done; $jscomp$loop$m192531680$45 = {value2$jscomp$7:void 0, mapMetadata$jscomp$2:void 0}, $jscomp$key$m192531680$42$key = $jscomp$iter$21.next()) { + var key = $jscomp$key$m192531680$42$key.value, has1 = module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable1, key, metadata1), has2 = module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable2, key, metadata2); if (has1 !== has2) { return !1; } if (has1) { var value1 = serializable1.Serializable$get(key); - $jscomp$loop$m1892927425$45.value2$jscomp$7 = serializable2.Serializable$get(key); + $jscomp$loop$m192531680$45.value2$jscomp$7 = serializable2.Serializable$get(key); if (arrays1.hasOwnProperty(key)) { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m1892927425$45.value2$jscomp$7, !0, !0)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$45.value2$jscomp$7, !0, !0)) { return !1; } } else if (objects1.hasOwnProperty(key)) { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m1892927425$45.value2$jscomp$7, !1, !0)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$45.value2$jscomp$7, !1, !0)) { return !1; } } else if (objectMaps1.hasOwnProperty(key)) { - if ($jscomp$loop$m1892927425$45.mapMetadata$jscomp$2 = objectMaps1[key], $jscomp$loop$m1892927425$45.mapMetadata$jscomp$2.isPropertyArray) { - if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$m1892927425$45.value2$jscomp$7) || value1.some(function($jscomp$loop$m1892927425$45) { + if ($jscomp$loop$m192531680$45.mapMetadata$jscomp$2 = objectMaps1[key], $jscomp$loop$m192531680$45.mapMetadata$jscomp$2.isPropertyArray) { + if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$m192531680$45.value2$jscomp$7) || value1.some(function($jscomp$loop$m192531680$45) { return function(v1, i) { - return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$m1892927425$45.value2$jscomp$7[i], $jscomp$loop$m1892927425$45.mapMetadata$jscomp$2); + return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$m192531680$45.value2$jscomp$7[i], $jscomp$loop$m192531680$45.mapMetadata$jscomp$2); }; - }($jscomp$loop$m1892927425$45))) { + }($jscomp$loop$m192531680$45))) { return !1; } - } else if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$m1892927425$45.value2$jscomp$7, $jscomp$loop$m1892927425$45.mapMetadata$jscomp$2)) { + } else if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$m192531680$45.value2$jscomp$7, $jscomp$loop$m192531680$45.mapMetadata$jscomp$2)) { return !1; } } else if (Array.isArray(value1)) { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m1892927425$45.value2$jscomp$7, !0, !1)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$45.value2$jscomp$7, !0, !1)) { return !1; } - } else if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m1892927425$45.value2$jscomp$7, !1, !1)) { + } else if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$45.value2$jscomp$7, !1, !1)) { return !1; } } @@ -6176,8 +6176,8 @@ function module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, v if (!module$contents$eeapiclient$domain_object_sameKeys(value1, value2)) { return !1; } - for (var $jscomp$iter$22 = $jscomp.makeIterator(Object.keys(value1)), $jscomp$key$m1892927425$43$mapKey = $jscomp$iter$22.next(); !$jscomp$key$m1892927425$43$mapKey.done; $jscomp$key$m1892927425$43$mapKey = $jscomp$iter$22.next()) { - var mapKey = $jscomp$key$m1892927425$43$mapKey.value; + for (var $jscomp$iter$22 = $jscomp.makeIterator(Object.keys(value1)), $jscomp$key$m192531680$43$mapKey = $jscomp$iter$22.next(); !$jscomp$key$m192531680$43$mapKey.done; $jscomp$key$m192531680$43$mapKey = $jscomp$iter$22.next()) { + var mapKey = $jscomp$key$m192531680$43$mapKey.value; if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1[mapKey], value2[mapKey], mapMetadata.isValueArray, mapMetadata.isSerializable)) { return !1; } @@ -6244,178 +6244,7 @@ var module$contents$safevalues$internals$pure_module = module$contents$safevalue function module$contents$safevalues$internals$pure_pure(valueOf) { return {valueOf:valueOf}.valueOf(); } -;goog.dom.HtmlElement = function() { -}; -goog.dom.TagName = function() { -}; -goog.dom.TagName.cast = function(name, type) { - return name; -}; -goog.dom.TagName.prototype.toString = function() { -}; -goog.dom.TagName.A = "A"; -goog.dom.TagName.ABBR = "ABBR"; -goog.dom.TagName.ACRONYM = "ACRONYM"; -goog.dom.TagName.ADDRESS = "ADDRESS"; -goog.dom.TagName.APPLET = "APPLET"; -goog.dom.TagName.AREA = "AREA"; -goog.dom.TagName.ARTICLE = "ARTICLE"; -goog.dom.TagName.ASIDE = "ASIDE"; -goog.dom.TagName.AUDIO = "AUDIO"; -goog.dom.TagName.B = "B"; -goog.dom.TagName.BASE = "BASE"; -goog.dom.TagName.BASEFONT = "BASEFONT"; -goog.dom.TagName.BDI = "BDI"; -goog.dom.TagName.BDO = "BDO"; -goog.dom.TagName.BIG = "BIG"; -goog.dom.TagName.BLOCKQUOTE = "BLOCKQUOTE"; -goog.dom.TagName.BODY = "BODY"; -goog.dom.TagName.BR = "BR"; -goog.dom.TagName.BUTTON = "BUTTON"; -goog.dom.TagName.CANVAS = "CANVAS"; -goog.dom.TagName.CAPTION = "CAPTION"; -goog.dom.TagName.CENTER = "CENTER"; -goog.dom.TagName.CITE = "CITE"; -goog.dom.TagName.CODE = "CODE"; -goog.dom.TagName.COL = "COL"; -goog.dom.TagName.COLGROUP = "COLGROUP"; -goog.dom.TagName.COMMAND = "COMMAND"; -goog.dom.TagName.DATA = "DATA"; -goog.dom.TagName.DATALIST = "DATALIST"; -goog.dom.TagName.DD = "DD"; -goog.dom.TagName.DEL = "DEL"; -goog.dom.TagName.DETAILS = "DETAILS"; -goog.dom.TagName.DFN = "DFN"; -goog.dom.TagName.DIALOG = "DIALOG"; -goog.dom.TagName.DIR = "DIR"; -goog.dom.TagName.DIV = "DIV"; -goog.dom.TagName.DL = "DL"; -goog.dom.TagName.DT = "DT"; -goog.dom.TagName.EM = "EM"; -goog.dom.TagName.EMBED = "EMBED"; -goog.dom.TagName.FIELDSET = "FIELDSET"; -goog.dom.TagName.FIGCAPTION = "FIGCAPTION"; -goog.dom.TagName.FIGURE = "FIGURE"; -goog.dom.TagName.FONT = "FONT"; -goog.dom.TagName.FOOTER = "FOOTER"; -goog.dom.TagName.FORM = "FORM"; -goog.dom.TagName.FRAME = "FRAME"; -goog.dom.TagName.FRAMESET = "FRAMESET"; -goog.dom.TagName.H1 = "H1"; -goog.dom.TagName.H2 = "H2"; -goog.dom.TagName.H3 = "H3"; -goog.dom.TagName.H4 = "H4"; -goog.dom.TagName.H5 = "H5"; -goog.dom.TagName.H6 = "H6"; -goog.dom.TagName.HEAD = "HEAD"; -goog.dom.TagName.HEADER = "HEADER"; -goog.dom.TagName.HGROUP = "HGROUP"; -goog.dom.TagName.HR = "HR"; -goog.dom.TagName.HTML = "HTML"; -goog.dom.TagName.I = "I"; -goog.dom.TagName.IFRAME = "IFRAME"; -goog.dom.TagName.IMG = "IMG"; -goog.dom.TagName.INPUT = "INPUT"; -goog.dom.TagName.INS = "INS"; -goog.dom.TagName.ISINDEX = "ISINDEX"; -goog.dom.TagName.KBD = "KBD"; -goog.dom.TagName.KEYGEN = "KEYGEN"; -goog.dom.TagName.LABEL = "LABEL"; -goog.dom.TagName.LEGEND = "LEGEND"; -goog.dom.TagName.LI = "LI"; -goog.dom.TagName.LINK = "LINK"; -goog.dom.TagName.MAIN = "MAIN"; -goog.dom.TagName.MAP = "MAP"; -goog.dom.TagName.MARK = "MARK"; -goog.dom.TagName.MATH = "MATH"; -goog.dom.TagName.MENU = "MENU"; -goog.dom.TagName.MENUITEM = "MENUITEM"; -goog.dom.TagName.META = "META"; -goog.dom.TagName.METER = "METER"; -goog.dom.TagName.NAV = "NAV"; -goog.dom.TagName.NOFRAMES = "NOFRAMES"; -goog.dom.TagName.NOSCRIPT = "NOSCRIPT"; -goog.dom.TagName.OBJECT = "OBJECT"; -goog.dom.TagName.OL = "OL"; -goog.dom.TagName.OPTGROUP = "OPTGROUP"; -goog.dom.TagName.OPTION = "OPTION"; -goog.dom.TagName.OUTPUT = "OUTPUT"; -goog.dom.TagName.P = "P"; -goog.dom.TagName.PARAM = "PARAM"; -goog.dom.TagName.PICTURE = "PICTURE"; -goog.dom.TagName.PRE = "PRE"; -goog.dom.TagName.PROGRESS = "PROGRESS"; -goog.dom.TagName.Q = "Q"; -goog.dom.TagName.RP = "RP"; -goog.dom.TagName.RT = "RT"; -goog.dom.TagName.RTC = "RTC"; -goog.dom.TagName.RUBY = "RUBY"; -goog.dom.TagName.S = "S"; -goog.dom.TagName.SAMP = "SAMP"; -goog.dom.TagName.SCRIPT = "SCRIPT"; -goog.dom.TagName.SECTION = "SECTION"; -goog.dom.TagName.SELECT = "SELECT"; -goog.dom.TagName.SMALL = "SMALL"; -goog.dom.TagName.SOURCE = "SOURCE"; -goog.dom.TagName.SPAN = "SPAN"; -goog.dom.TagName.STRIKE = "STRIKE"; -goog.dom.TagName.STRONG = "STRONG"; -goog.dom.TagName.STYLE = "STYLE"; -goog.dom.TagName.SUB = "SUB"; -goog.dom.TagName.SUMMARY = "SUMMARY"; -goog.dom.TagName.SUP = "SUP"; -goog.dom.TagName.SVG = "SVG"; -goog.dom.TagName.TABLE = "TABLE"; -goog.dom.TagName.TBODY = "TBODY"; -goog.dom.TagName.TD = "TD"; -goog.dom.TagName.TEMPLATE = "TEMPLATE"; -goog.dom.TagName.TEXTAREA = "TEXTAREA"; -goog.dom.TagName.TFOOT = "TFOOT"; -goog.dom.TagName.TH = "TH"; -goog.dom.TagName.THEAD = "THEAD"; -goog.dom.TagName.TIME = "TIME"; -goog.dom.TagName.TITLE = "TITLE"; -goog.dom.TagName.TR = "TR"; -goog.dom.TagName.TRACK = "TRACK"; -goog.dom.TagName.TT = "TT"; -goog.dom.TagName.U = "U"; -goog.dom.TagName.UL = "UL"; -goog.dom.TagName.VAR = "VAR"; -goog.dom.TagName.VIDEO = "VIDEO"; -goog.dom.TagName.WBR = "WBR"; -goog.dom.tags = {}; -goog.dom.tags.VOID_TAGS_ = {area:!0, base:!0, br:!0, col:!0, command:!0, embed:!0, hr:!0, img:!0, input:!0, keygen:!0, link:!0, meta:!0, param:!0, source:!0, track:!0, wbr:!0}; -goog.dom.tags.isVoidTag = function(tagName) { - return !0 === goog.dom.tags.VOID_TAGS_[tagName]; -}; -goog.fs = {}; -goog.fs.url = {}; -goog.fs.url.createObjectUrl = function(obj) { - return goog.fs.url.getUrlObject_().createObjectURL(obj); -}; -goog.fs.url.revokeObjectUrl = function(url) { - goog.fs.url.getUrlObject_().revokeObjectURL(url); -}; -goog.fs.url.UrlObject_ = function() { -}; -goog.fs.url.UrlObject_.prototype.createObjectURL = function(arg) { -}; -goog.fs.url.UrlObject_.prototype.revokeObjectURL = function(s) { -}; -goog.fs.url.getUrlObject_ = function() { - var urlObject = goog.fs.url.findUrlObject_(); - if (null != urlObject) { - return urlObject; - } - throw Error("This browser doesn't seem to support blob URLs"); -}; -goog.fs.url.findUrlObject_ = function() { - return void 0 !== goog.global.URL && void 0 !== goog.global.URL.createObjectURL ? goog.global.URL : void 0 !== goog.global.createObjectURL ? goog.global : null; -}; -goog.fs.url.browserSupportsObjectUrls = function() { - return null != goog.fs.url.findUrlObject_(); -}; -goog.html = {}; +;goog.html = {}; goog.html.trustedtypes = {}; goog.html.trustedtypes.POLICY_NAME = goog.TRUSTED_TYPES_POLICY_NAME ? goog.TRUSTED_TYPES_POLICY_NAME + "#html" : ""; goog.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse = function() { @@ -6519,6 +6348,74 @@ goog.html.TrustedResourceUrl.stringifyParams_ = function(prefix, currentString, } return currentString; }; +var module$exports$safevalues$internals$resource_url_impl = {}, module$contents$safevalues$internals$resource_url_impl_module = module$contents$safevalues$internals$resource_url_impl_module || {id:"third_party/javascript/safevalues/internals/resource_url_impl.closure.js"}; +module$exports$safevalues$internals$resource_url_impl.TrustedResourceUrl = goog.html.TrustedResourceUrl; +function module$contents$safevalues$internals$resource_url_impl_createResourceUrlInternal(url) { + return (0,goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse)(url); +} +module$exports$safevalues$internals$resource_url_impl.createResourceUrlInternal = module$contents$safevalues$internals$resource_url_impl_createResourceUrlInternal; +function module$contents$safevalues$internals$resource_url_impl_isResourceUrl(value) { + return value instanceof goog.html.TrustedResourceUrl; +} +module$exports$safevalues$internals$resource_url_impl.isResourceUrl = module$contents$safevalues$internals$resource_url_impl_isResourceUrl; +function module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(value) { + return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(value); +} +module$exports$safevalues$internals$resource_url_impl.unwrapResourceUrl = module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl; +var $jscomp$templatelit$1274514361$5 = $jscomp.createTemplateTagFirstArg([""]), $jscomp$templatelit$1274514361$6 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\0"]), $jscomp$templatelit$1274514361$7 = $jscomp.createTemplateTagFirstArgWithRaw(["\n"], ["\\n"]), $jscomp$templatelit$1274514361$8 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\u0000"]), $jscomp$templatelit$1274514361$9 = $jscomp.createTemplateTagFirstArg([""]), $jscomp$templatelit$1274514361$10 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], +["\\0"]), $jscomp$templatelit$1274514361$11 = $jscomp.createTemplateTagFirstArgWithRaw(["\n"], ["\\n"]), $jscomp$templatelit$1274514361$12 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\u0000"]), module$contents$safevalues$internals$string_literal_module = module$contents$safevalues$internals$string_literal_module || {id:"third_party/javascript/safevalues/internals/string_literal.closure.js"}; +function module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, numExprs) { + if (!module$contents$safevalues$internals$string_literal_isTemplateObject(templateObj) || numExprs + 1 !== templateObj.length) { + throw new TypeError("\n ############################## ERROR ##############################\n\n It looks like you are trying to call a template tag function (fn`...`)\n using the normal function syntax (fn(...)), which is not supported.\n\n The functions in the safevalues library are not designed to be called\n like normal functions, and doing so invalidates the security guarantees\n that safevalues provides.\n\n If you are stuck and not sure how to proceed, please reach out to us\n instead through:\n - go/ise-hardening-yaqs (preferred) // LINE-INTERNAL\n - g/ise-hardening // LINE-INTERNAL\n - https://github.com/google/safevalues/issues\n\n ############################## ERROR ##############################"); + } +} +function module$contents$safevalues$internals$string_literal_checkFrozen(templateObj) { + return Object.isFrozen(templateObj) && Object.isFrozen(templateObj.raw); +} +var module$contents$safevalues$internals$string_literal_TagFn; +function module$contents$safevalues$internals$string_literal_checkTranspiled(fn) { + return -1 === fn.toString().indexOf("`"); +} +var module$contents$safevalues$internals$string_literal_isTranspiled = module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) { + return tag($jscomp$templatelit$1274514361$5); +}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) { + return tag($jscomp$templatelit$1274514361$6); +}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) { + return tag($jscomp$templatelit$1274514361$7); +}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) { + return tag($jscomp$templatelit$1274514361$8); +}), module$contents$safevalues$internals$string_literal_frozenTSA = module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$1274514361$9) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$1274514361$10) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$1274514361$11) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$1274514361$12); +function module$contents$safevalues$internals$string_literal_isTemplateObject(templateObj) { + return Array.isArray(templateObj) && Array.isArray(templateObj.raw) && templateObj.length === templateObj.raw.length && (module$contents$safevalues$internals$string_literal_isTranspiled || templateObj !== templateObj.raw) && (module$contents$safevalues$internals$string_literal_isTranspiled && !module$contents$safevalues$internals$string_literal_frozenTSA || module$contents$safevalues$internals$string_literal_checkFrozen(templateObj)) ? + !0 : !1; +} +;goog.fs = {}; +goog.fs.url = {}; +goog.fs.url.createObjectUrl = function(obj) { + return goog.fs.url.getUrlObject_().createObjectURL(obj); +}; +goog.fs.url.revokeObjectUrl = function(url) { + goog.fs.url.getUrlObject_().revokeObjectURL(url); +}; +goog.fs.url.UrlObject_ = function() { +}; +goog.fs.url.UrlObject_.prototype.createObjectURL = function(arg) { +}; +goog.fs.url.UrlObject_.prototype.revokeObjectURL = function(s) { +}; +goog.fs.url.getUrlObject_ = function() { + var urlObject = goog.fs.url.findUrlObject_(); + if (null != urlObject) { + return urlObject; + } + throw Error("This browser doesn't seem to support blob URLs"); +}; +goog.fs.url.findUrlObject_ = function() { + return void 0 !== goog.global.URL && void 0 !== goog.global.URL.createObjectURL ? goog.global.URL : void 0 !== goog.global.createObjectURL ? goog.global : null; +}; +goog.fs.url.browserSupportsObjectUrls = function() { + return null != goog.fs.url.findUrlObject_(); +}; goog.html.SafeUrl = function(value, token) { if (goog.DEBUG && token !== goog.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_) { throw Error("SafeUrl is not meant to be built directly"); @@ -6635,687 +6532,786 @@ goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse = function(url) }; goog.html.SafeUrl.INNOCUOUS_URL = goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.html.SafeUrl.INNOCUOUS_STRING); goog.html.SafeUrl.ABOUT_BLANK = goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank"); -var module$contents$goog$html$SafeStyle_CONSTRUCTOR_TOKEN_PRIVATE = {}, module$contents$goog$html$SafeStyle_SafeStyle = function(value, token) { - if (goog.DEBUG && token !== module$contents$goog$html$SafeStyle_CONSTRUCTOR_TOKEN_PRIVATE) { - throw Error("SafeStyle is not meant to be built directly"); - } - this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = value; -}; -module$contents$goog$html$SafeStyle_SafeStyle.fromConstant = function(style) { - var styleString = goog.string.Const.unwrap(style); - if (0 === styleString.length) { - return module$contents$goog$html$SafeStyle_SafeStyle.EMPTY; - } - (0,goog.asserts.assert)((0,goog.string.internal.endsWith)(styleString, ";"), "Last character of style string is not ';': " + styleString); - (0,goog.asserts.assert)((0,goog.string.internal.contains)(styleString, ":"), "Style string must contain at least one ':', to specify a \"name: value\" pair: " + styleString); - return module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(styleString); -}; -module$contents$goog$html$SafeStyle_SafeStyle.prototype.toString = function() { - return this.privateDoNotAccessOrElseSafeStyleWrappedValue_.toString(); -}; -module$contents$goog$html$SafeStyle_SafeStyle.unwrap = function(safeStyle) { - if (safeStyle instanceof module$contents$goog$html$SafeStyle_SafeStyle && safeStyle.constructor === module$contents$goog$html$SafeStyle_SafeStyle) { - return safeStyle.privateDoNotAccessOrElseSafeStyleWrappedValue_; - } - (0,goog.asserts.fail)("expected object of type SafeStyle, got '" + safeStyle + "' of type " + goog.typeOf(safeStyle)); - return "type_error:SafeStyle"; -}; -module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse = function(style) { - return new module$contents$goog$html$SafeStyle_SafeStyle(style, module$contents$goog$html$SafeStyle_CONSTRUCTOR_TOKEN_PRIVATE); -}; -module$contents$goog$html$SafeStyle_SafeStyle.create = function(map) { - var style = "", name; - for (name in map) { - if (Object.prototype.hasOwnProperty.call(map, name)) { - if (!/^[-_a-zA-Z0-9]+$/.test(name)) { - throw Error("Name allows only [-_a-zA-Z0-9], got: " + name); - } - var value = map[name]; - null != value && (value = Array.isArray(value) ? value.map(module$contents$goog$html$SafeStyle_sanitizePropertyValue).join(" ") : module$contents$goog$html$SafeStyle_sanitizePropertyValue(value), style += name + ":" + value + ";"); - } - } - return style ? module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style) : module$contents$goog$html$SafeStyle_SafeStyle.EMPTY; +var module$exports$safevalues$internals$url_impl = {}, module$contents$safevalues$internals$url_impl_module = module$contents$safevalues$internals$url_impl_module || {id:"third_party/javascript/safevalues/internals/url_impl.closure.js"}; +module$exports$safevalues$internals$url_impl.SafeUrl = goog.html.SafeUrl; +function module$contents$safevalues$internals$url_impl_createUrlInternal(url) { + return (0,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse)(url); +} +module$exports$safevalues$internals$url_impl.createUrlInternal = module$contents$safevalues$internals$url_impl_createUrlInternal; +module$exports$safevalues$internals$url_impl.ABOUT_BLANK = module$contents$safevalues$internals$url_impl_createUrlInternal("about:blank"); +module$exports$safevalues$internals$url_impl.INNOCUOUS_URL = module$contents$safevalues$internals$url_impl_createUrlInternal("about:invalid#zClosurez"); +function module$contents$safevalues$internals$url_impl_isUrl(value) { + return value instanceof goog.html.SafeUrl; +} +module$exports$safevalues$internals$url_impl.isUrl = module$contents$safevalues$internals$url_impl_isUrl; +function module$contents$safevalues$internals$url_impl_unwrapUrl(value) { + return goog.html.SafeUrl.unwrap(value); +} +module$exports$safevalues$internals$url_impl.unwrapUrl = module$contents$safevalues$internals$url_impl_unwrapUrl; +var module$exports$safevalues$builders$url_builders = {}, module$contents$safevalues$builders$url_builders_module = module$contents$safevalues$builders$url_builders_module || {id:"third_party/javascript/safevalues/builders/url_builders.closure.js"}; +function module$contents$safevalues$builders$url_builders_isSafeMimeType(mimeType) { + var match = mimeType.match(/^([^;]+)(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i); + return 2 === (null == match ? void 0 : match.length) && (module$contents$safevalues$builders$url_builders_isSafeImageMimeType(match[1]) || module$contents$safevalues$builders$url_builders_isSafeVideoMimeType(match[1]) || module$contents$safevalues$builders$url_builders_isSafeAudioMimeType(match[1]) || module$contents$safevalues$builders$url_builders_isSafeFontMimeType(match[1])); +} +function module$contents$safevalues$builders$url_builders_isSafeImageMimeType(mimeType) { + return /^image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon|heic|heif|avif|x-ms-bmp)$/i.test(mimeType); +} +function module$contents$safevalues$builders$url_builders_isSafeVideoMimeType(mimeType) { + return /^video\/(?:mpeg|mp4|ogg|webm|x-matroska|quicktime|x-ms-wmv)$/i.test(mimeType); +} +function module$contents$safevalues$builders$url_builders_isSafeAudioMimeType(mimeType) { + return /^audio\/(?:3gpp2|3gpp|aac|amr|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)$/i.test(mimeType); +} +function module$contents$safevalues$builders$url_builders_isSafeFontMimeType(mimeType) { + return /^font\/\w+/i.test(mimeType); +} +module$exports$safevalues$builders$url_builders.Scheme = function() { }; -module$contents$goog$html$SafeStyle_SafeStyle.concat = function(var_args) { - var style = "", addArgument = function(argument) { - Array.isArray(argument) ? argument.forEach(addArgument) : style += module$contents$goog$html$SafeStyle_SafeStyle.unwrap(argument); - }; - Array.prototype.forEach.call(arguments, addArgument); - return style ? module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style) : module$contents$goog$html$SafeStyle_SafeStyle.EMPTY; +var module$contents$safevalues$builders$url_builders_SchemeImpl = function(isValid) { + this.isValid = isValid; }; -module$contents$goog$html$SafeStyle_SafeStyle.EMPTY = module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(""); -module$contents$goog$html$SafeStyle_SafeStyle.INNOCUOUS_STRING = "zClosurez"; -function module$contents$goog$html$SafeStyle_sanitizePropertyValue(value) { - if (value instanceof goog.html.SafeUrl) { - return 'url("' + goog.html.SafeUrl.unwrap(value).replace(/ markerIdx) { + return isWholeUrl; } - var selectorToCheck = selector.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g, ""); - if (!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=\\^$|]+$/.test(selectorToCheck)) { - throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=\\^$|] and strings, got: " + selector); + if (":" !== prefix.charAt(markerIdx)) { + return !0; } - if (!module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.hasBalancedBrackets_(selectorToCheck)) { - throw Error("() and [] in selector must be balanced, got: " + selector); + var scheme = prefix.substring(0, markerIdx).toLowerCase(); + return /^[a-z][a-z\d+.-]*$/.test(scheme) && "javascript" !== scheme; +} +function module$contents$safevalues$builders$url_builders_safeUrl(templateObj) { + var rest = $jscomp.getRestArguments.apply(1, arguments); + goog.DEBUG && module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, rest.length); + var prefix = templateObj[0]; + if (goog.DEBUG && !module$contents$safevalues$builders$url_builders_isSafeUrlPrefix(prefix, 0 === rest.length)) { + throw Error("Trying to interpolate with unsupported prefix: " + prefix); } - style instanceof module$contents$goog$html$SafeStyle_SafeStyle || (style = module$contents$goog$html$SafeStyle_SafeStyle.create(style)); - var styleSheet = selector + "{" + module$contents$goog$html$SafeStyle_SafeStyle.unwrap(style).replace(/." : ""); - } - if (tagName.toUpperCase() in module$contents$goog$html$SafeHtml_NOT_ALLOWED_TAG_NAMES) { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? "Tag name <" + tagName + "> is not allowed for SafeHtml." : ""); - } +var module$exports$safevalues$dom$elements$base = {}, module$contents$safevalues$dom$elements$base_module = module$contents$safevalues$dom$elements$base_module || {id:"third_party/javascript/safevalues/dom/elements/base.closure.js"}; +module$exports$safevalues$dom$elements$base.setHref = function(baseEl, url) { + baseEl.href = module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(url); }; -module$contents$goog$html$SafeHtml_SafeHtml.createIframe = function(src, srcdoc, attributes, content) { - src && goog.html.TrustedResourceUrl.unwrap(src); - var fixedAttributes = {}; - fixedAttributes.src = src || null; - fixedAttributes.srcdoc = srcdoc && module$contents$goog$html$SafeHtml_SafeHtml.unwrap(srcdoc); - var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes(fixedAttributes, {sandbox:""}, attributes); - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", combinedAttrs, content); +var module$exports$safevalues$dom$elements$button = {}, module$contents$safevalues$dom$elements$button_module = module$contents$safevalues$dom$elements$button_module || {id:"third_party/javascript/safevalues/dom/elements/button.closure.js"}; +module$exports$safevalues$dom$elements$button.setFormaction = function(button, url) { + var sanitizedUrl = module$contents$safevalues$builders$url_builders_unwrapUrlOrSanitize(url); + void 0 !== sanitizedUrl && (button.formAction = sanitizedUrl); }; -module$contents$goog$html$SafeHtml_SafeHtml.createSandboxIframe = function(src, srcdoc, attributes, content) { - if (!module$contents$goog$html$SafeHtml_SafeHtml.canUseSandboxIframe()) { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? "The browser does not support sandboxed iframes." : ""); +var module$exports$safevalues$internals$secrets = {}, module$contents$safevalues$internals$secrets_module = module$contents$safevalues$internals$secrets_module || {id:"third_party/javascript/safevalues/internals/secrets.closure.js"}; +module$exports$safevalues$internals$secrets.secretToken = {}; +function module$contents$safevalues$internals$secrets_ensureTokenIsValid(token) { + if (goog.DEBUG && token !== module$exports$safevalues$internals$secrets.secretToken) { + throw Error("Bad secret"); } - var fixedAttributes = {}; - fixedAttributes.src = src ? goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(src)) : null; - fixedAttributes.srcdoc = srcdoc || null; - fixedAttributes.sandbox = ""; - var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes(fixedAttributes, {}, attributes); - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", combinedAttrs, content); +} +module$exports$safevalues$internals$secrets.ensureTokenIsValid = module$contents$safevalues$internals$secrets_ensureTokenIsValid; +var module$exports$safevalues$internals$attribute_impl = {}, module$contents$safevalues$internals$attribute_impl_module = module$contents$safevalues$internals$attribute_impl_module || {id:"third_party/javascript/safevalues/internals/attribute_impl.closure.js"}; +module$exports$safevalues$internals$attribute_impl.SafeAttributePrefix = function() { }; -module$contents$goog$html$SafeHtml_SafeHtml.canUseSandboxIframe = function() { - return goog.global.HTMLIFrameElement && "sandbox" in goog.global.HTMLIFrameElement.prototype; +var module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl = function(attrPrefix, token) { + module$contents$safevalues$internals$secrets_ensureTokenIsValid(token); + this.privateDoNotAccessOrElseWrappedAttrPrefix = attrPrefix; }; -module$contents$goog$html$SafeHtml_SafeHtml.createScriptSrc = function(src, attributes) { - goog.html.TrustedResourceUrl.unwrap(src); - var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes({src:src}, {}, attributes); - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script", combinedAttrs); +$jscomp.inherits(module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl, module$exports$safevalues$internals$attribute_impl.SafeAttributePrefix); +module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl.prototype.toString = function() { + return this.privateDoNotAccessOrElseWrappedAttrPrefix; }; -module$contents$goog$html$SafeHtml_SafeHtml.createStyle = function(styleSheet, attributes) { - var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes({type:"text/css"}, {}, attributes), content = ""; - styleSheet = module$contents$goog$array_concat(styleSheet); - for (var i = 0; i < styleSheet.length; i++) { - content += module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.unwrap(styleSheet[i]); +function module$contents$safevalues$internals$attribute_impl_createAttributePrefixInternal(attrPrefix) { + return new module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl(attrPrefix, module$exports$safevalues$internals$secrets.secretToken); +} +module$exports$safevalues$internals$attribute_impl.createAttributePrefixInternal = module$contents$safevalues$internals$attribute_impl_createAttributePrefixInternal; +function module$contents$safevalues$internals$attribute_impl_unwrapAttributePrefix(value) { + if (value instanceof module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl) { + return value.privateDoNotAccessOrElseWrappedAttrPrefix; } - var htmlContent = module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(content); - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style", combinedAttrs, htmlContent); + var message = ""; + goog.DEBUG && (message = "Unexpected type when unwrapping SafeAttributePrefix"); + throw Error(message); +} +module$exports$safevalues$internals$attribute_impl.unwrapAttributePrefix = module$contents$safevalues$internals$attribute_impl_unwrapAttributePrefix; +goog.dom.HtmlElement = function() { }; -module$contents$goog$html$SafeHtml_SafeHtml.createMetaRefresh = function(url, secs) { - var unwrappedUrl = goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(url)); - (module$contents$goog$labs$userAgent$browser_matchIE() || module$contents$goog$labs$userAgent$browser_matchEdgeHtml()) && goog.string.internal.contains(unwrappedUrl, ";") && (unwrappedUrl = "'" + unwrappedUrl.replace(/'/g, "%27") + "'"); - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta", {"http-equiv":"refresh", content:(secs || 0) + "; url=" + unwrappedUrl}); +goog.dom.TagName = function() { }; -module$contents$goog$html$SafeHtml_SafeHtml.join = function(separator, parts) { - var separatorHtml = module$contents$goog$html$SafeHtml_SafeHtml.htmlEscape(separator), content = [], addArgument = function(argument) { - if (Array.isArray(argument)) { - argument.forEach(addArgument); - } else { - var html = module$contents$goog$html$SafeHtml_SafeHtml.htmlEscape(argument); - content.push(module$contents$goog$html$SafeHtml_SafeHtml.unwrap(html)); - } - }; - parts.forEach(addArgument); - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(content.join(module$contents$goog$html$SafeHtml_SafeHtml.unwrap(separatorHtml))); +goog.dom.TagName.cast = function(name, type) { + return name; }; -module$contents$goog$html$SafeHtml_SafeHtml.concat = function(var_args) { - return module$contents$goog$html$SafeHtml_SafeHtml.join(module$contents$goog$html$SafeHtml_SafeHtml.EMPTY, Array.prototype.slice.call(arguments)); +goog.dom.TagName.prototype.toString = function() { }; -module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse = function(html) { - var noinlineHtml = html, policy = goog.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse(), trustedHtml = policy ? policy.createHTML(noinlineHtml) : noinlineHtml; - return new module$contents$goog$html$SafeHtml_SafeHtml(trustedHtml, module$contents$goog$html$SafeHtml_CONSTRUCTOR_TOKEN_PRIVATE); +goog.dom.TagName.A = "A"; +goog.dom.TagName.ABBR = "ABBR"; +goog.dom.TagName.ACRONYM = "ACRONYM"; +goog.dom.TagName.ADDRESS = "ADDRESS"; +goog.dom.TagName.APPLET = "APPLET"; +goog.dom.TagName.AREA = "AREA"; +goog.dom.TagName.ARTICLE = "ARTICLE"; +goog.dom.TagName.ASIDE = "ASIDE"; +goog.dom.TagName.AUDIO = "AUDIO"; +goog.dom.TagName.B = "B"; +goog.dom.TagName.BASE = "BASE"; +goog.dom.TagName.BASEFONT = "BASEFONT"; +goog.dom.TagName.BDI = "BDI"; +goog.dom.TagName.BDO = "BDO"; +goog.dom.TagName.BIG = "BIG"; +goog.dom.TagName.BLOCKQUOTE = "BLOCKQUOTE"; +goog.dom.TagName.BODY = "BODY"; +goog.dom.TagName.BR = "BR"; +goog.dom.TagName.BUTTON = "BUTTON"; +goog.dom.TagName.CANVAS = "CANVAS"; +goog.dom.TagName.CAPTION = "CAPTION"; +goog.dom.TagName.CENTER = "CENTER"; +goog.dom.TagName.CITE = "CITE"; +goog.dom.TagName.CODE = "CODE"; +goog.dom.TagName.COL = "COL"; +goog.dom.TagName.COLGROUP = "COLGROUP"; +goog.dom.TagName.COMMAND = "COMMAND"; +goog.dom.TagName.DATA = "DATA"; +goog.dom.TagName.DATALIST = "DATALIST"; +goog.dom.TagName.DD = "DD"; +goog.dom.TagName.DEL = "DEL"; +goog.dom.TagName.DETAILS = "DETAILS"; +goog.dom.TagName.DFN = "DFN"; +goog.dom.TagName.DIALOG = "DIALOG"; +goog.dom.TagName.DIR = "DIR"; +goog.dom.TagName.DIV = "DIV"; +goog.dom.TagName.DL = "DL"; +goog.dom.TagName.DT = "DT"; +goog.dom.TagName.EM = "EM"; +goog.dom.TagName.EMBED = "EMBED"; +goog.dom.TagName.FIELDSET = "FIELDSET"; +goog.dom.TagName.FIGCAPTION = "FIGCAPTION"; +goog.dom.TagName.FIGURE = "FIGURE"; +goog.dom.TagName.FONT = "FONT"; +goog.dom.TagName.FOOTER = "FOOTER"; +goog.dom.TagName.FORM = "FORM"; +goog.dom.TagName.FRAME = "FRAME"; +goog.dom.TagName.FRAMESET = "FRAMESET"; +goog.dom.TagName.H1 = "H1"; +goog.dom.TagName.H2 = "H2"; +goog.dom.TagName.H3 = "H3"; +goog.dom.TagName.H4 = "H4"; +goog.dom.TagName.H5 = "H5"; +goog.dom.TagName.H6 = "H6"; +goog.dom.TagName.HEAD = "HEAD"; +goog.dom.TagName.HEADER = "HEADER"; +goog.dom.TagName.HGROUP = "HGROUP"; +goog.dom.TagName.HR = "HR"; +goog.dom.TagName.HTML = "HTML"; +goog.dom.TagName.I = "I"; +goog.dom.TagName.IFRAME = "IFRAME"; +goog.dom.TagName.IMG = "IMG"; +goog.dom.TagName.INPUT = "INPUT"; +goog.dom.TagName.INS = "INS"; +goog.dom.TagName.ISINDEX = "ISINDEX"; +goog.dom.TagName.KBD = "KBD"; +goog.dom.TagName.KEYGEN = "KEYGEN"; +goog.dom.TagName.LABEL = "LABEL"; +goog.dom.TagName.LEGEND = "LEGEND"; +goog.dom.TagName.LI = "LI"; +goog.dom.TagName.LINK = "LINK"; +goog.dom.TagName.MAIN = "MAIN"; +goog.dom.TagName.MAP = "MAP"; +goog.dom.TagName.MARK = "MARK"; +goog.dom.TagName.MATH = "MATH"; +goog.dom.TagName.MENU = "MENU"; +goog.dom.TagName.MENUITEM = "MENUITEM"; +goog.dom.TagName.META = "META"; +goog.dom.TagName.METER = "METER"; +goog.dom.TagName.NAV = "NAV"; +goog.dom.TagName.NOFRAMES = "NOFRAMES"; +goog.dom.TagName.NOSCRIPT = "NOSCRIPT"; +goog.dom.TagName.OBJECT = "OBJECT"; +goog.dom.TagName.OL = "OL"; +goog.dom.TagName.OPTGROUP = "OPTGROUP"; +goog.dom.TagName.OPTION = "OPTION"; +goog.dom.TagName.OUTPUT = "OUTPUT"; +goog.dom.TagName.P = "P"; +goog.dom.TagName.PARAM = "PARAM"; +goog.dom.TagName.PICTURE = "PICTURE"; +goog.dom.TagName.PRE = "PRE"; +goog.dom.TagName.PROGRESS = "PROGRESS"; +goog.dom.TagName.Q = "Q"; +goog.dom.TagName.RP = "RP"; +goog.dom.TagName.RT = "RT"; +goog.dom.TagName.RTC = "RTC"; +goog.dom.TagName.RUBY = "RUBY"; +goog.dom.TagName.S = "S"; +goog.dom.TagName.SAMP = "SAMP"; +goog.dom.TagName.SCRIPT = "SCRIPT"; +goog.dom.TagName.SECTION = "SECTION"; +goog.dom.TagName.SELECT = "SELECT"; +goog.dom.TagName.SMALL = "SMALL"; +goog.dom.TagName.SOURCE = "SOURCE"; +goog.dom.TagName.SPAN = "SPAN"; +goog.dom.TagName.STRIKE = "STRIKE"; +goog.dom.TagName.STRONG = "STRONG"; +goog.dom.TagName.STYLE = "STYLE"; +goog.dom.TagName.SUB = "SUB"; +goog.dom.TagName.SUMMARY = "SUMMARY"; +goog.dom.TagName.SUP = "SUP"; +goog.dom.TagName.SVG = "SVG"; +goog.dom.TagName.TABLE = "TABLE"; +goog.dom.TagName.TBODY = "TBODY"; +goog.dom.TagName.TD = "TD"; +goog.dom.TagName.TEMPLATE = "TEMPLATE"; +goog.dom.TagName.TEXTAREA = "TEXTAREA"; +goog.dom.TagName.TFOOT = "TFOOT"; +goog.dom.TagName.TH = "TH"; +goog.dom.TagName.THEAD = "THEAD"; +goog.dom.TagName.TIME = "TIME"; +goog.dom.TagName.TITLE = "TITLE"; +goog.dom.TagName.TR = "TR"; +goog.dom.TagName.TRACK = "TRACK"; +goog.dom.TagName.TT = "TT"; +goog.dom.TagName.U = "U"; +goog.dom.TagName.UL = "UL"; +goog.dom.TagName.VAR = "VAR"; +goog.dom.TagName.VIDEO = "VIDEO"; +goog.dom.TagName.WBR = "WBR"; +goog.dom.tags = {}; +goog.dom.tags.VOID_TAGS_ = {area:!0, base:!0, br:!0, col:!0, command:!0, embed:!0, hr:!0, img:!0, input:!0, keygen:!0, link:!0, meta:!0, param:!0, source:!0, track:!0, wbr:!0}; +goog.dom.tags.isVoidTag = function(tagName) { + return !0 === goog.dom.tags.VOID_TAGS_[tagName]; }; -module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse = function(tagName, attributes, content) { - var result = "<" + tagName + module$contents$goog$html$SafeHtml_SafeHtml.stringifyAttributes(tagName, attributes); - null == content ? content = [] : Array.isArray(content) || (content = [content]); - if (goog.dom.tags.isVoidTag(tagName.toLowerCase())) { - goog.asserts.assert(!content.length, "Void tag <" + tagName + "> does not allow content."), result += ">"; - } else { - var html = module$contents$goog$html$SafeHtml_SafeHtml.concat(content); - result += ">" + module$contents$goog$html$SafeHtml_SafeHtml.unwrap(html) + ""; +var module$contents$goog$html$SafeStyle_CONSTRUCTOR_TOKEN_PRIVATE = {}, module$contents$goog$html$SafeStyle_SafeStyle = function(value, token) { + if (goog.DEBUG && token !== module$contents$goog$html$SafeStyle_CONSTRUCTOR_TOKEN_PRIVATE) { + throw Error("SafeStyle is not meant to be built directly"); } - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(result); + this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = value; }; -module$contents$goog$html$SafeHtml_SafeHtml.stringifyAttributes = function(tagName, attributes) { - var result = ""; - if (attributes) { - for (var name in attributes) { - if (Object.prototype.hasOwnProperty.call(attributes, name)) { - if (!module$contents$goog$html$SafeHtml_VALID_NAMES_IN_TAG.test(name)) { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Invalid attribute name "' + name + '".' : ""); - } - var value = attributes[name]; - null != value && (result += " " + module$contents$goog$html$SafeHtml_getAttrNameAndValue(tagName, name, value)); - } - } +module$contents$goog$html$SafeStyle_SafeStyle.fromConstant = function(style) { + var styleString = goog.string.Const.unwrap(style); + if (0 === styleString.length) { + return module$contents$goog$html$SafeStyle_SafeStyle.EMPTY; } - return result; + (0,goog.asserts.assert)((0,goog.string.internal.endsWith)(styleString, ";"), "Last character of style string is not ';': " + styleString); + (0,goog.asserts.assert)((0,goog.string.internal.contains)(styleString, ":"), "Style string must contain at least one ':', to specify a \"name: value\" pair: " + styleString); + return module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(styleString); }; -module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes = function(fixedAttributes, defaultAttributes, attributes) { - var combinedAttributes = {}, name; - for (name in fixedAttributes) { - Object.prototype.hasOwnProperty.call(fixedAttributes, name) && (goog.asserts.assert(name.toLowerCase() == name, "Must be lower case"), combinedAttributes[name] = fixedAttributes[name]); - } - for (var name$jscomp$0 in defaultAttributes) { - Object.prototype.hasOwnProperty.call(defaultAttributes, name$jscomp$0) && (goog.asserts.assert(name$jscomp$0.toLowerCase() == name$jscomp$0, "Must be lower case"), combinedAttributes[name$jscomp$0] = defaultAttributes[name$jscomp$0]); - } - if (attributes) { - for (var name$jscomp$1 in attributes) { - if (Object.prototype.hasOwnProperty.call(attributes, name$jscomp$1)) { - var nameLower = name$jscomp$1.toLowerCase(); - if (nameLower in fixedAttributes) { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Cannot override "' + nameLower + '" attribute, got "' + name$jscomp$1 + '" with value "' + attributes[name$jscomp$1] + '"' : ""); - } - nameLower in defaultAttributes && delete combinedAttributes[nameLower]; - combinedAttributes[name$jscomp$1] = attributes[name$jscomp$1]; - } - } - } - return combinedAttributes; +module$contents$goog$html$SafeStyle_SafeStyle.prototype.toString = function() { + return this.privateDoNotAccessOrElseSafeStyleWrappedValue_.toString(); }; -module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES = goog.DEBUG; -module$contents$goog$html$SafeHtml_SafeHtml.SUPPORT_STYLE_ATTRIBUTE = !0; -module$contents$goog$html$SafeHtml_SafeHtml.from = module$contents$goog$html$SafeHtml_SafeHtml.htmlEscape; -var module$contents$goog$html$SafeHtml_VALID_NAMES_IN_TAG = /^[a-zA-Z0-9-]+$/, module$contents$goog$html$SafeHtml_URL_ATTRIBUTES = {action:!0, cite:!0, data:!0, formaction:!0, href:!0, manifest:!0, poster:!0, src:!0}, module$contents$goog$html$SafeHtml_NOT_ALLOWED_TAG_NAMES = module$contents$goog$object_createSet(goog.dom.TagName.APPLET, goog.dom.TagName.BASE, goog.dom.TagName.EMBED, goog.dom.TagName.IFRAME, goog.dom.TagName.LINK, goog.dom.TagName.MATH, goog.dom.TagName.META, goog.dom.TagName.OBJECT, -goog.dom.TagName.SCRIPT, goog.dom.TagName.STYLE, goog.dom.TagName.SVG, goog.dom.TagName.TEMPLATE); -function module$contents$goog$html$SafeHtml_getAttrNameAndValue(tagName, name, value) { - if (value instanceof goog.string.Const) { - value = goog.string.Const.unwrap(value); - } else if ("style" == name.toLowerCase()) { - if (module$contents$goog$html$SafeHtml_SafeHtml.SUPPORT_STYLE_ATTRIBUTE) { - value = module$contents$goog$html$SafeHtml_getStyleValue(value); - } else { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "style" not supported.' : ""); - } - } else { - if (/^on/i.test(name)) { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "' + name + '" requires goog.string.Const value, "' + value + '" given.' : ""); - } - if (name.toLowerCase() in module$contents$goog$html$SafeHtml_URL_ATTRIBUTES) { - if (value instanceof goog.html.TrustedResourceUrl) { - value = goog.html.TrustedResourceUrl.unwrap(value); - } else if (value instanceof goog.html.SafeUrl) { - value = goog.html.SafeUrl.unwrap(value); - } else if ("string" === typeof value) { - value = goog.html.SafeUrl.sanitize(value).toString(); - } else { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "' + name + '" on tag "' + tagName + '" requires goog.html.SafeUrl, goog.string.Const, or string, value "' + value + '" given.' : ""); - } - } - } - goog.asserts.assert(value instanceof goog.html.SafeUrl || value instanceof goog.html.TrustedResourceUrl || value instanceof module$contents$goog$html$SafeStyle_SafeStyle || value instanceof module$contents$goog$html$SafeHtml_SafeHtml || "string" === typeof value || "number" === typeof value, "String or number value expected, got " + typeof value + " with value: " + value); - return name + '="' + goog.string.internal.htmlEscape(String(value)) + '"'; -} -function module$contents$goog$html$SafeHtml_getStyleValue(value) { - if (!goog.isObject(value)) { - throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'The "style" attribute requires goog.html.SafeStyle or map of style properties, ' + typeof value + " given: " + value : ""); - } - value instanceof module$contents$goog$html$SafeStyle_SafeStyle || (value = module$contents$goog$html$SafeStyle_SafeStyle.create(value)); - return module$contents$goog$html$SafeStyle_SafeStyle.unwrap(value); -} -module$contents$goog$html$SafeHtml_SafeHtml.DOCTYPE_HTML = function() { - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(""); -}(); -module$contents$goog$html$SafeHtml_SafeHtml.EMPTY = new module$contents$goog$html$SafeHtml_SafeHtml(goog.global.trustedTypes && goog.global.trustedTypes.emptyHTML || "", module$contents$goog$html$SafeHtml_CONSTRUCTOR_TOKEN_PRIVATE); -module$contents$goog$html$SafeHtml_SafeHtml.BR = function() { - return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("
"); -}(); -goog.html.SafeHtml = module$contents$goog$html$SafeHtml_SafeHtml; -var module$exports$goog$html$internals = {}; -module$exports$goog$html$internals.createSafeHtml = module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse; -module$exports$goog$html$internals.createSafeStyle = module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse; -module$exports$goog$html$internals.createSafeStyleSheet = module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse; -module$exports$goog$html$internals.createSafeUrl = goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse; -module$exports$goog$html$internals.createTrustedResourceUrl = goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse; -var module$exports$safevalues$internals$resource_url_impl = {}, module$contents$safevalues$internals$resource_url_impl_module = module$contents$safevalues$internals$resource_url_impl_module || {id:"third_party/javascript/safevalues/internals/resource_url_impl.closure.js"}; -module$exports$safevalues$internals$resource_url_impl.TrustedResourceUrl = goog.html.TrustedResourceUrl; -function module$contents$safevalues$internals$resource_url_impl_createResourceUrlInternal(url) { - return (0,goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse)(url); -} -module$exports$safevalues$internals$resource_url_impl.createResourceUrlInternal = module$contents$safevalues$internals$resource_url_impl_createResourceUrlInternal; -function module$contents$safevalues$internals$resource_url_impl_isResourceUrl(value) { - return value instanceof goog.html.TrustedResourceUrl; -} -module$exports$safevalues$internals$resource_url_impl.isResourceUrl = module$contents$safevalues$internals$resource_url_impl_isResourceUrl; -function module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(value) { - return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(value); -} -module$exports$safevalues$internals$resource_url_impl.unwrapResourceUrl = module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl; -var $jscomp$templatelit$m425881384$5 = $jscomp.createTemplateTagFirstArg([""]), $jscomp$templatelit$m425881384$6 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\0"]), $jscomp$templatelit$m425881384$7 = $jscomp.createTemplateTagFirstArgWithRaw(["\n"], ["\\n"]), $jscomp$templatelit$m425881384$8 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\u0000"]), $jscomp$templatelit$m425881384$9 = $jscomp.createTemplateTagFirstArg([""]), $jscomp$templatelit$m425881384$10 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], -["\\0"]), $jscomp$templatelit$m425881384$11 = $jscomp.createTemplateTagFirstArgWithRaw(["\n"], ["\\n"]), $jscomp$templatelit$m425881384$12 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\u0000"]), module$contents$safevalues$internals$string_literal_module = module$contents$safevalues$internals$string_literal_module || {id:"third_party/javascript/safevalues/internals/string_literal.closure.js"}; -function module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, numExprs) { - if (!module$contents$safevalues$internals$string_literal_isTemplateObject(templateObj) || numExprs + 1 !== templateObj.length) { - throw new TypeError("\n ############################## ERROR ##############################\n\n It looks like you are trying to call a template tag function (fn`...`)\n using the normal function syntax (fn(...)), which is not supported.\n\n The functions in the safevalues library are not designed to be called\n like normal functions, and doing so invalidates the security guarantees\n that safevalues provides.\n\n If you are stuck and not sure how to proceed, please reach out to us\n instead through:\n - go/ise-hardening-yaqs (preferred) // LINE-INTERNAL\n - g/ise-hardening // LINE-INTERNAL\n - https://github.com/google/safevalues/issues\n\n ############################## ERROR ##############################"); - } -} -function module$contents$safevalues$internals$string_literal_checkFrozen(templateObj) { - return Object.isFrozen(templateObj) && Object.isFrozen(templateObj.raw); -} -var module$contents$safevalues$internals$string_literal_TagFn; -function module$contents$safevalues$internals$string_literal_checkTranspiled(fn) { - return -1 === fn.toString().indexOf("`"); -} -var module$contents$safevalues$internals$string_literal_isTranspiled = module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) { - return tag($jscomp$templatelit$m425881384$5); -}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) { - return tag($jscomp$templatelit$m425881384$6); -}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) { - return tag($jscomp$templatelit$m425881384$7); -}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) { - return tag($jscomp$templatelit$m425881384$8); -}), module$contents$safevalues$internals$string_literal_frozenTSA = module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$m425881384$9) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$m425881384$10) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$m425881384$11) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$m425881384$12); -function module$contents$safevalues$internals$string_literal_isTemplateObject(templateObj) { - return Array.isArray(templateObj) && Array.isArray(templateObj.raw) && templateObj.length === templateObj.raw.length && (module$contents$safevalues$internals$string_literal_isTranspiled || templateObj !== templateObj.raw) && (module$contents$safevalues$internals$string_literal_isTranspiled && !module$contents$safevalues$internals$string_literal_frozenTSA || module$contents$safevalues$internals$string_literal_checkFrozen(templateObj)) ? - !0 : !1; -} -;var module$exports$safevalues$internals$url_impl = {}, module$contents$safevalues$internals$url_impl_module = module$contents$safevalues$internals$url_impl_module || {id:"third_party/javascript/safevalues/internals/url_impl.closure.js"}; -module$exports$safevalues$internals$url_impl.SafeUrl = goog.html.SafeUrl; -function module$contents$safevalues$internals$url_impl_createUrlInternal(url) { - return (0,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse)(url); -} -module$exports$safevalues$internals$url_impl.createUrlInternal = module$contents$safevalues$internals$url_impl_createUrlInternal; -module$exports$safevalues$internals$url_impl.ABOUT_BLANK = module$contents$safevalues$internals$url_impl_createUrlInternal("about:blank"); -module$exports$safevalues$internals$url_impl.INNOCUOUS_URL = module$contents$safevalues$internals$url_impl_createUrlInternal("about:invalid#zClosurez"); -function module$contents$safevalues$internals$url_impl_isUrl(value) { - return value instanceof goog.html.SafeUrl; -} -module$exports$safevalues$internals$url_impl.isUrl = module$contents$safevalues$internals$url_impl_isUrl; -function module$contents$safevalues$internals$url_impl_unwrapUrl(value) { - return goog.html.SafeUrl.unwrap(value); -} -module$exports$safevalues$internals$url_impl.unwrapUrl = module$contents$safevalues$internals$url_impl_unwrapUrl; -var module$exports$safevalues$builders$url_builders = {}, module$contents$safevalues$builders$url_builders_module = module$contents$safevalues$builders$url_builders_module || {id:"third_party/javascript/safevalues/builders/url_builders.closure.js"}; -function module$contents$safevalues$builders$url_builders_isSafeMimeType(mimeType) { - var match = mimeType.match(/^([^;]+)(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i); - return 2 === (null == match ? void 0 : match.length) && (module$contents$safevalues$builders$url_builders_isSafeImageMimeType(match[1]) || module$contents$safevalues$builders$url_builders_isSafeVideoMimeType(match[1]) || module$contents$safevalues$builders$url_builders_isSafeAudioMimeType(match[1]) || module$contents$safevalues$builders$url_builders_isSafeFontMimeType(match[1])); -} -function module$contents$safevalues$builders$url_builders_isSafeImageMimeType(mimeType) { - return /^image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon|heic|heif|avif|x-ms-bmp)$/i.test(mimeType); -} -function module$contents$safevalues$builders$url_builders_isSafeVideoMimeType(mimeType) { - return /^video\/(?:mpeg|mp4|ogg|webm|x-matroska|quicktime|x-ms-wmv)$/i.test(mimeType); -} -function module$contents$safevalues$builders$url_builders_isSafeAudioMimeType(mimeType) { - return /^audio\/(?:3gpp2|3gpp|aac|amr|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)$/i.test(mimeType); -} -function module$contents$safevalues$builders$url_builders_isSafeFontMimeType(mimeType) { - return /^font\/\w+/i.test(mimeType); -} -module$exports$safevalues$builders$url_builders.Scheme = function() { +module$contents$goog$html$SafeStyle_SafeStyle.unwrap = function(safeStyle) { + if (safeStyle instanceof module$contents$goog$html$SafeStyle_SafeStyle && safeStyle.constructor === module$contents$goog$html$SafeStyle_SafeStyle) { + return safeStyle.privateDoNotAccessOrElseSafeStyleWrappedValue_; + } + (0,goog.asserts.fail)("expected object of type SafeStyle, got '" + safeStyle + "' of type " + goog.typeOf(safeStyle)); + return "type_error:SafeStyle"; }; -var module$contents$safevalues$builders$url_builders_SchemeImpl = function(isValid) { - this.isValid = isValid; +module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse = function(style) { + return new module$contents$goog$html$SafeStyle_SafeStyle(style, module$contents$goog$html$SafeStyle_CONSTRUCTOR_TOKEN_PRIVATE); }; -function module$contents$safevalues$builders$url_builders_isValidScheme(scheme) { - return scheme instanceof module$contents$safevalues$builders$url_builders_SchemeImpl; +module$contents$goog$html$SafeStyle_SafeStyle.create = function(map) { + var style = "", name; + for (name in map) { + if (Object.prototype.hasOwnProperty.call(map, name)) { + if (!/^[-_a-zA-Z0-9]+$/.test(name)) { + throw Error("Name allows only [-_a-zA-Z0-9], got: " + name); + } + var value = map[name]; + null != value && (value = Array.isArray(value) ? value.map(module$contents$goog$html$SafeStyle_sanitizePropertyValue).join(" ") : module$contents$goog$html$SafeStyle_sanitizePropertyValue(value), style += name + ":" + value + ";"); + } + } + return style ? module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style) : module$contents$goog$html$SafeStyle_SafeStyle.EMPTY; +}; +module$contents$goog$html$SafeStyle_SafeStyle.concat = function(var_args) { + var style = "", addArgument = function(argument) { + Array.isArray(argument) ? argument.forEach(addArgument) : style += module$contents$goog$html$SafeStyle_SafeStyle.unwrap(argument); + }; + Array.prototype.forEach.call(arguments, addArgument); + return style ? module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style) : module$contents$goog$html$SafeStyle_SafeStyle.EMPTY; +}; +module$contents$goog$html$SafeStyle_SafeStyle.EMPTY = module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(""); +module$contents$goog$html$SafeStyle_SafeStyle.INNOCUOUS_STRING = "zClosurez"; +function module$contents$goog$html$SafeStyle_sanitizePropertyValue(value) { + if (value instanceof goog.html.SafeUrl) { + return 'url("' + goog.html.SafeUrl.unwrap(value).replace(/+~[\]()=\\^$|]+$/.test(selectorToCheck)) { + throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=\\^$|] and strings, got: " + selector); } - var message = ""; - goog.DEBUG && (message = "fromMediaSource only accepts MediaSource instances, but was called with " + media + "."); - throw Error(message); -} -module$exports$safevalues$builders$url_builders.fromMediaSource = module$contents$safevalues$builders$url_builders_fromMediaSource; -function module$contents$safevalues$builders$url_builders_fromTrustedResourceUrl(url) { - return module$contents$safevalues$internals$url_impl_createUrlInternal(module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(url).toString()); -} -module$exports$safevalues$builders$url_builders.fromTrustedResourceUrl = module$contents$safevalues$builders$url_builders_fromTrustedResourceUrl; -function module$contents$safevalues$builders$url_builders_isSafeUrlPrefix(prefix, isWholeUrl) { - var markerIdx = prefix.search(/[:/?#]/); - if (0 > markerIdx) { - return isWholeUrl; + if (!module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.hasBalancedBrackets_(selectorToCheck)) { + throw Error("() and [] in selector must be balanced, got: " + selector); } - if (":" !== prefix.charAt(markerIdx)) { - return !0; + style instanceof module$contents$goog$html$SafeStyle_SafeStyle || (style = module$contents$goog$html$SafeStyle_SafeStyle.create(style)); + var styleSheet = selector + "{" + module$contents$goog$html$SafeStyle_SafeStyle.unwrap(style).replace(/." : ""); } - return parsedUrl.protocol; -} -module$exports$safevalues$builders$url_builders.extractScheme = module$contents$safevalues$builders$url_builders_extractScheme; -var module$contents$safevalues$builders$url_builders_ALLOWED_SCHEMES = ["data:", "http:", "https:", "mailto:", "ftp:"]; -module$exports$safevalues$builders$url_builders.IS_NOT_JAVASCRIPT_URL_PATTERN = /^\s*(?!javascript:)(?:[a-z0-9+.-]+:|[^:\/?#]*(?:[\/?#]|$))/i; -function module$contents$safevalues$builders$url_builders_hasJavascriptUrlScheme(url) { - return !module$exports$safevalues$builders$url_builders.IS_NOT_JAVASCRIPT_URL_PATTERN.test(url); -} -function module$contents$safevalues$builders$url_builders_sanitizeJavaScriptUrl(url) { - if (module$contents$safevalues$builders$url_builders_hasJavascriptUrlScheme(url)) { - module$contents$safevalues$builders$url_builders_triggerCallbacks(url); - } else { - return url; + if (tagName.toUpperCase() in module$contents$goog$html$SafeHtml_NOT_ALLOWED_TAG_NAMES) { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? "Tag name <" + tagName + "> is not allowed for SafeHtml." : ""); } -} -module$exports$safevalues$builders$url_builders.sanitizeJavaScriptUrl = module$contents$safevalues$builders$url_builders_sanitizeJavaScriptUrl; -function module$contents$safevalues$builders$url_builders_unwrapUrlOrSanitize(url) { - return url instanceof goog.html.SafeUrl ? module$contents$safevalues$internals$url_impl_unwrapUrl(url) : module$contents$safevalues$builders$url_builders_sanitizeJavaScriptUrl(url); -} -module$exports$safevalues$builders$url_builders.unwrapUrlOrSanitize = module$contents$safevalues$builders$url_builders_unwrapUrlOrSanitize; -function module$contents$safevalues$builders$url_builders_restrictivelySanitizeUrl(url) { - var parsedScheme = module$contents$safevalues$builders$url_builders_extractScheme(url); - return void 0 !== parsedScheme && -1 !== module$contents$safevalues$builders$url_builders_ALLOWED_SCHEMES.indexOf(parsedScheme.toLowerCase()) ? url : "about:invalid#zClosurez"; -} -module$exports$safevalues$builders$url_builders.restrictivelySanitizeUrl = module$contents$safevalues$builders$url_builders_restrictivelySanitizeUrl; -var module$contents$safevalues$builders$url_builders_sanitizationCallbacks = [], module$contents$safevalues$builders$url_builders_triggerCallbacks = function(url) { }; -goog.DEBUG && module$contents$safevalues$builders$url_builders_addJavaScriptUrlSanitizationCallback(function(url) { - console.warn("A URL with content '" + url + "' was sanitized away."); -}); -function module$contents$safevalues$builders$url_builders_addJavaScriptUrlSanitizationCallback(callback) { - -1 === module$contents$safevalues$builders$url_builders_sanitizationCallbacks.indexOf(callback) && module$contents$safevalues$builders$url_builders_sanitizationCallbacks.push(callback); - module$contents$safevalues$builders$url_builders_triggerCallbacks = function(url) { - module$contents$safevalues$builders$url_builders_sanitizationCallbacks.forEach(function(callback) { - callback(url); - }); - }; -} -module$exports$safevalues$builders$url_builders.addJavaScriptUrlSanitizationCallback = module$contents$safevalues$builders$url_builders_addJavaScriptUrlSanitizationCallback; -function module$contents$safevalues$builders$url_builders_removeJavaScriptUrlSanitizationCallback(callback) { - var callbackIndex = module$contents$safevalues$builders$url_builders_sanitizationCallbacks.indexOf(callback); - -1 !== callbackIndex && module$contents$safevalues$builders$url_builders_sanitizationCallbacks.splice(callbackIndex, 1); -} -module$exports$safevalues$builders$url_builders.removeJavaScriptUrlSanitizationCallback = module$contents$safevalues$builders$url_builders_removeJavaScriptUrlSanitizationCallback; -var module$exports$safevalues$dom$elements$anchor = {}, module$contents$safevalues$dom$elements$anchor_module = module$contents$safevalues$dom$elements$anchor_module || {id:"third_party/javascript/safevalues/dom/elements/anchor.closure.js"}; -module$exports$safevalues$dom$elements$anchor.setHref = function(anchor, url) { - var sanitizedUrl = module$contents$safevalues$builders$url_builders_unwrapUrlOrSanitize(url); - void 0 !== sanitizedUrl && (anchor.href = sanitizedUrl); +module$contents$goog$html$SafeHtml_SafeHtml.createIframe = function(src, srcdoc, attributes, content) { + src && goog.html.TrustedResourceUrl.unwrap(src); + var fixedAttributes = {}; + fixedAttributes.src = src || null; + fixedAttributes.srcdoc = srcdoc && module$contents$goog$html$SafeHtml_SafeHtml.unwrap(srcdoc); + var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes(fixedAttributes, {sandbox:""}, attributes); + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", combinedAttrs, content); }; -var module$exports$safevalues$dom$elements$area = {}, module$contents$safevalues$dom$elements$area_module = module$contents$safevalues$dom$elements$area_module || {id:"third_party/javascript/safevalues/dom/elements/area.closure.js"}; -module$exports$safevalues$dom$elements$area.setHref = function(area, url) { - var sanitizedUrl = module$contents$safevalues$builders$url_builders_unwrapUrlOrSanitize(url); - void 0 !== sanitizedUrl && (area.href = sanitizedUrl); +module$contents$goog$html$SafeHtml_SafeHtml.createSandboxIframe = function(src, srcdoc, attributes, content) { + if (!module$contents$goog$html$SafeHtml_SafeHtml.canUseSandboxIframe()) { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? "The browser does not support sandboxed iframes." : ""); + } + var fixedAttributes = {}; + fixedAttributes.src = src ? goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(src)) : null; + fixedAttributes.srcdoc = srcdoc || null; + fixedAttributes.sandbox = ""; + var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes(fixedAttributes, {}, attributes); + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", combinedAttrs, content); }; -var module$exports$safevalues$dom$elements$base = {}, module$contents$safevalues$dom$elements$base_module = module$contents$safevalues$dom$elements$base_module || {id:"third_party/javascript/safevalues/dom/elements/base.closure.js"}; -module$exports$safevalues$dom$elements$base.setHref = function(baseEl, url) { - baseEl.href = module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(url); +module$contents$goog$html$SafeHtml_SafeHtml.canUseSandboxIframe = function() { + return goog.global.HTMLIFrameElement && "sandbox" in goog.global.HTMLIFrameElement.prototype; }; -var module$exports$safevalues$dom$elements$button = {}, module$contents$safevalues$dom$elements$button_module = module$contents$safevalues$dom$elements$button_module || {id:"third_party/javascript/safevalues/dom/elements/button.closure.js"}; -module$exports$safevalues$dom$elements$button.setFormaction = function(button, url) { - var sanitizedUrl = module$contents$safevalues$builders$url_builders_unwrapUrlOrSanitize(url); - void 0 !== sanitizedUrl && (button.formAction = sanitizedUrl); +module$contents$goog$html$SafeHtml_SafeHtml.createScriptSrc = function(src, attributes) { + goog.html.TrustedResourceUrl.unwrap(src); + var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes({src:src}, {}, attributes); + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script", combinedAttrs); }; -var module$exports$safevalues$internals$secrets = {}, module$contents$safevalues$internals$secrets_module = module$contents$safevalues$internals$secrets_module || {id:"third_party/javascript/safevalues/internals/secrets.closure.js"}; -module$exports$safevalues$internals$secrets.secretToken = {}; -function module$contents$safevalues$internals$secrets_ensureTokenIsValid(token) { - if (goog.DEBUG && token !== module$exports$safevalues$internals$secrets.secretToken) { - throw Error("Bad secret"); +module$contents$goog$html$SafeHtml_SafeHtml.createStyle = function(styleSheet, attributes) { + var combinedAttrs = module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes({type:"text/css"}, {}, attributes), content = ""; + styleSheet = module$contents$goog$array_concat(styleSheet); + for (var i = 0; i < styleSheet.length; i++) { + content += module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.unwrap(styleSheet[i]); } -} -module$exports$safevalues$internals$secrets.ensureTokenIsValid = module$contents$safevalues$internals$secrets_ensureTokenIsValid; -var module$exports$safevalues$internals$attribute_impl = {}, module$contents$safevalues$internals$attribute_impl_module = module$contents$safevalues$internals$attribute_impl_module || {id:"third_party/javascript/safevalues/internals/attribute_impl.closure.js"}; -module$exports$safevalues$internals$attribute_impl.SafeAttributePrefix = function() { + var htmlContent = module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(content); + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style", combinedAttrs, htmlContent); }; -var module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl = function(attrPrefix, token) { - module$contents$safevalues$internals$secrets_ensureTokenIsValid(token); - this.privateDoNotAccessOrElseWrappedAttrPrefix = attrPrefix; +module$contents$goog$html$SafeHtml_SafeHtml.createMetaRefresh = function(url, secs) { + var unwrappedUrl = goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(url)); + (module$contents$goog$labs$userAgent$browser_matchIE() || module$contents$goog$labs$userAgent$browser_matchEdgeHtml()) && goog.string.internal.contains(unwrappedUrl, ";") && (unwrappedUrl = "'" + unwrappedUrl.replace(/'/g, "%27") + "'"); + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta", {"http-equiv":"refresh", content:(secs || 0) + "; url=" + unwrappedUrl}); }; -$jscomp.inherits(module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl, module$exports$safevalues$internals$attribute_impl.SafeAttributePrefix); -module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl.prototype.toString = function() { - return this.privateDoNotAccessOrElseWrappedAttrPrefix; +module$contents$goog$html$SafeHtml_SafeHtml.join = function(separator, parts) { + var separatorHtml = module$contents$goog$html$SafeHtml_SafeHtml.htmlEscape(separator), content = [], addArgument = function(argument) { + if (Array.isArray(argument)) { + argument.forEach(addArgument); + } else { + var html = module$contents$goog$html$SafeHtml_SafeHtml.htmlEscape(argument); + content.push(module$contents$goog$html$SafeHtml_SafeHtml.unwrap(html)); + } + }; + parts.forEach(addArgument); + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(content.join(module$contents$goog$html$SafeHtml_SafeHtml.unwrap(separatorHtml))); }; -function module$contents$safevalues$internals$attribute_impl_createAttributePrefixInternal(attrPrefix) { - return new module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl(attrPrefix, module$exports$safevalues$internals$secrets.secretToken); +module$contents$goog$html$SafeHtml_SafeHtml.concat = function(var_args) { + return module$contents$goog$html$SafeHtml_SafeHtml.join(module$contents$goog$html$SafeHtml_SafeHtml.EMPTY, Array.prototype.slice.call(arguments)); +}; +module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse = function(html) { + var noinlineHtml = html, policy = goog.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse(), trustedHtml = policy ? policy.createHTML(noinlineHtml) : noinlineHtml; + return new module$contents$goog$html$SafeHtml_SafeHtml(trustedHtml, module$contents$goog$html$SafeHtml_CONSTRUCTOR_TOKEN_PRIVATE); +}; +module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse = function(tagName, attributes, content) { + var result = "<" + tagName + module$contents$goog$html$SafeHtml_SafeHtml.stringifyAttributes(tagName, attributes); + null == content ? content = [] : Array.isArray(content) || (content = [content]); + if (goog.dom.tags.isVoidTag(tagName.toLowerCase())) { + goog.asserts.assert(!content.length, "Void tag <" + tagName + "> does not allow content."), result += ">"; + } else { + var html = module$contents$goog$html$SafeHtml_SafeHtml.concat(content); + result += ">" + module$contents$goog$html$SafeHtml_SafeHtml.unwrap(html) + ""; + } + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(result); +}; +module$contents$goog$html$SafeHtml_SafeHtml.stringifyAttributes = function(tagName, attributes) { + var result = ""; + if (attributes) { + for (var name in attributes) { + if (Object.prototype.hasOwnProperty.call(attributes, name)) { + if (!module$contents$goog$html$SafeHtml_VALID_NAMES_IN_TAG.test(name)) { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Invalid attribute name "' + name + '".' : ""); + } + var value = attributes[name]; + null != value && (result += " " + module$contents$goog$html$SafeHtml_getAttrNameAndValue(tagName, name, value)); + } + } + } + return result; +}; +module$contents$goog$html$SafeHtml_SafeHtml.combineAttributes = function(fixedAttributes, defaultAttributes, attributes) { + var combinedAttributes = {}, name; + for (name in fixedAttributes) { + Object.prototype.hasOwnProperty.call(fixedAttributes, name) && (goog.asserts.assert(name.toLowerCase() == name, "Must be lower case"), combinedAttributes[name] = fixedAttributes[name]); + } + for (var name$jscomp$0 in defaultAttributes) { + Object.prototype.hasOwnProperty.call(defaultAttributes, name$jscomp$0) && (goog.asserts.assert(name$jscomp$0.toLowerCase() == name$jscomp$0, "Must be lower case"), combinedAttributes[name$jscomp$0] = defaultAttributes[name$jscomp$0]); + } + if (attributes) { + for (var name$jscomp$1 in attributes) { + if (Object.prototype.hasOwnProperty.call(attributes, name$jscomp$1)) { + var nameLower = name$jscomp$1.toLowerCase(); + if (nameLower in fixedAttributes) { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Cannot override "' + nameLower + '" attribute, got "' + name$jscomp$1 + '" with value "' + attributes[name$jscomp$1] + '"' : ""); + } + nameLower in defaultAttributes && delete combinedAttributes[nameLower]; + combinedAttributes[name$jscomp$1] = attributes[name$jscomp$1]; + } + } + } + return combinedAttributes; +}; +module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES = goog.DEBUG; +module$contents$goog$html$SafeHtml_SafeHtml.SUPPORT_STYLE_ATTRIBUTE = !0; +module$contents$goog$html$SafeHtml_SafeHtml.from = module$contents$goog$html$SafeHtml_SafeHtml.htmlEscape; +var module$contents$goog$html$SafeHtml_VALID_NAMES_IN_TAG = /^[a-zA-Z0-9-]+$/, module$contents$goog$html$SafeHtml_URL_ATTRIBUTES = {action:!0, cite:!0, data:!0, formaction:!0, href:!0, manifest:!0, poster:!0, src:!0}, module$contents$goog$html$SafeHtml_NOT_ALLOWED_TAG_NAMES = module$contents$goog$object_createSet(goog.dom.TagName.APPLET, goog.dom.TagName.BASE, goog.dom.TagName.EMBED, goog.dom.TagName.IFRAME, goog.dom.TagName.LINK, goog.dom.TagName.MATH, goog.dom.TagName.META, goog.dom.TagName.OBJECT, +goog.dom.TagName.SCRIPT, goog.dom.TagName.STYLE, goog.dom.TagName.SVG, goog.dom.TagName.TEMPLATE); +function module$contents$goog$html$SafeHtml_getAttrNameAndValue(tagName, name, value) { + if (value instanceof goog.string.Const) { + value = goog.string.Const.unwrap(value); + } else if ("style" == name.toLowerCase()) { + if (module$contents$goog$html$SafeHtml_SafeHtml.SUPPORT_STYLE_ATTRIBUTE) { + value = module$contents$goog$html$SafeHtml_getStyleValue(value); + } else { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "style" not supported.' : ""); + } + } else { + if (/^on/i.test(name)) { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "' + name + '" requires goog.string.Const value, "' + value + '" given.' : ""); + } + if (name.toLowerCase() in module$contents$goog$html$SafeHtml_URL_ATTRIBUTES) { + if (value instanceof goog.html.TrustedResourceUrl) { + value = goog.html.TrustedResourceUrl.unwrap(value); + } else if (value instanceof goog.html.SafeUrl) { + value = goog.html.SafeUrl.unwrap(value); + } else if ("string" === typeof value) { + value = goog.html.SafeUrl.sanitize(value).toString(); + } else { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "' + name + '" on tag "' + tagName + '" requires goog.html.SafeUrl, goog.string.Const, or string, value "' + value + '" given.' : ""); + } + } + } + goog.asserts.assert(value instanceof goog.html.SafeUrl || value instanceof goog.html.TrustedResourceUrl || value instanceof module$contents$goog$html$SafeStyle_SafeStyle || value instanceof module$contents$goog$html$SafeHtml_SafeHtml || "string" === typeof value || "number" === typeof value, "String or number value expected, got " + typeof value + " with value: " + value); + return name + '="' + goog.string.internal.htmlEscape(String(value)) + '"'; } -module$exports$safevalues$internals$attribute_impl.createAttributePrefixInternal = module$contents$safevalues$internals$attribute_impl_createAttributePrefixInternal; -function module$contents$safevalues$internals$attribute_impl_unwrapAttributePrefix(value) { - if (value instanceof module$contents$safevalues$internals$attribute_impl_AttributePrefixImpl) { - return value.privateDoNotAccessOrElseWrappedAttrPrefix; +function module$contents$goog$html$SafeHtml_getStyleValue(value) { + if (!goog.isObject(value)) { + throw Error(module$contents$goog$html$SafeHtml_SafeHtml.ENABLE_ERROR_MESSAGES ? 'The "style" attribute requires goog.html.SafeStyle or map of style properties, ' + typeof value + " given: " + value : ""); } - var message = ""; - goog.DEBUG && (message = "Unexpected type when unwrapping SafeAttributePrefix"); - throw Error(message); + value instanceof module$contents$goog$html$SafeStyle_SafeStyle || (value = module$contents$goog$html$SafeStyle_SafeStyle.create(value)); + return module$contents$goog$html$SafeStyle_SafeStyle.unwrap(value); } -module$exports$safevalues$internals$attribute_impl.unwrapAttributePrefix = module$contents$safevalues$internals$attribute_impl_unwrapAttributePrefix; +module$contents$goog$html$SafeHtml_SafeHtml.DOCTYPE_HTML = function() { + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(""); +}(); +module$contents$goog$html$SafeHtml_SafeHtml.EMPTY = new module$contents$goog$html$SafeHtml_SafeHtml(goog.global.trustedTypes && goog.global.trustedTypes.emptyHTML || "", module$contents$goog$html$SafeHtml_CONSTRUCTOR_TOKEN_PRIVATE); +module$contents$goog$html$SafeHtml_SafeHtml.BR = function() { + return module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("
"); +}(); +goog.html.SafeHtml = module$contents$goog$html$SafeHtml_SafeHtml; +var module$exports$goog$html$safehtml_internals_for_safevalues = {}; +module$exports$goog$html$safehtml_internals_for_safevalues.createSafeHtml = module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse; var module$exports$safevalues$internals$html_impl = {}, module$contents$safevalues$internals$html_impl_module = module$contents$safevalues$internals$html_impl_module || {id:"third_party/javascript/safevalues/internals/html_impl.closure.js"}; module$exports$safevalues$internals$html_impl.SafeHtml = module$contents$goog$html$SafeHtml_SafeHtml; module$exports$safevalues$internals$html_impl.createHtmlInternal = function(html) { - return (0,module$exports$goog$html$internals.createSafeHtml)(html); + return (0,module$exports$goog$html$safehtml_internals_for_safevalues.createSafeHtml)(html); }; module$exports$safevalues$internals$html_impl.EMPTY_HTML = module$contents$goog$html$SafeHtml_SafeHtml.EMPTY; module$exports$safevalues$internals$html_impl.isHtml = function(value) { @@ -7324,10 +7320,12 @@ module$exports$safevalues$internals$html_impl.isHtml = function(value) { module$exports$safevalues$internals$html_impl.unwrapHtml = function(value) { return module$contents$goog$html$SafeHtml_SafeHtml.unwrapTrustedHTML(value); }; +var module$exports$goog$html$safestyle_internals_for_safevalues = {}; +module$exports$goog$html$safestyle_internals_for_safevalues.createSafeStyle = module$contents$goog$html$SafeStyle_SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse; var module$exports$safevalues$internals$style_impl = {}, module$contents$safevalues$internals$style_impl_module = module$contents$safevalues$internals$style_impl_module || {id:"third_party/javascript/safevalues/internals/style_impl.closure.js"}; module$exports$safevalues$internals$style_impl.SafeStyle = module$contents$goog$html$SafeStyle_SafeStyle; function module$contents$safevalues$internals$style_impl_createStyleInternal(style) { - return (0,module$exports$goog$html$internals.createSafeStyle)(style); + return (0,module$exports$goog$html$safestyle_internals_for_safevalues.createSafeStyle)(style); } module$exports$safevalues$internals$style_impl.createStyleInternal = module$contents$safevalues$internals$style_impl_createStyleInternal; function module$contents$safevalues$internals$style_impl_isStyle(value) { @@ -7562,7 +7560,7 @@ module$exports$safevalues$dom$globals$window.getStyleNonce = function(win) { return module$contents$safevalues$dom$globals$window_getNonceFor("style", win); }; function module$contents$safevalues$dom$globals$window_getNonceFor(elementName, win) { - var $jscomp$optchain$tmpm1987982378$0, $jscomp$optchain$tmpm1987982378$1, el = null == ($jscomp$optchain$tmpm1987982378$1 = ($jscomp$optchain$tmpm1987982378$0 = win.document).querySelector) ? void 0 : $jscomp$optchain$tmpm1987982378$1.call($jscomp$optchain$tmpm1987982378$0, elementName + "[nonce]"); + var $jscomp$optchain$tmp220578679$0, $jscomp$optchain$tmp220578679$1, el = null == ($jscomp$optchain$tmp220578679$1 = ($jscomp$optchain$tmp220578679$0 = win.document).querySelector) ? void 0 : $jscomp$optchain$tmp220578679$1.call($jscomp$optchain$tmp220578679$0, elementName + "[nonce]"); return el ? el.nonce || el.getAttribute("nonce") || "" : ""; } ;var module$exports$safevalues$internals$script_impl = {}, module$contents$safevalues$internals$script_impl_module = module$contents$safevalues$internals$script_impl_module || {id:"third_party/javascript/safevalues/internals/script_impl.closure.js"}, module$contents$safevalues$internals$script_impl_trustedTypes = goog.global.trustedTypes; @@ -7612,10 +7610,12 @@ module$exports$safevalues$dom$elements$script.setSrc = function(script, v, optio script.src = module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(v); (null == options ? 0 : options.omitNonce) || module$contents$safevalues$dom$elements$script_setNonceForScriptElement(script); }; +var module$exports$goog$html$safestylesheet_internals_for_safevalues = {}; +module$exports$goog$html$safestylesheet_internals_for_safevalues.createSafeStyleSheet = module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse; var module$exports$safevalues$internals$style_sheet_impl = {}, module$contents$safevalues$internals$style_sheet_impl_module = module$contents$safevalues$internals$style_sheet_impl_module || {id:"third_party/javascript/safevalues/internals/style_sheet_impl.closure.js"}; module$exports$safevalues$internals$style_sheet_impl.SafeStyleSheet = module$contents$goog$html$SafeStyleSheet_SafeStyleSheet; function module$contents$safevalues$internals$style_sheet_impl_createStyleSheetInternal(styleSheet) { - return (0,module$exports$goog$html$internals.createSafeStyleSheet)(styleSheet); + return (0,module$exports$goog$html$safestylesheet_internals_for_safevalues.createSafeStyleSheet)(styleSheet); } module$exports$safevalues$internals$style_sheet_impl.createStyleSheetInternal = module$contents$safevalues$internals$style_sheet_impl_createStyleSheetInternal; function module$contents$safevalues$internals$style_sheet_impl_isStyleSheet(value) { @@ -7963,48 +7963,48 @@ function module$contents$safevalues$dom$globals$fetch_privatecreateHtmlInternal( return (0,module$exports$safevalues$internals$html_impl.createHtmlInternal)(html); } function module$contents$safevalues$dom$globals$fetch_fetchResourceUrl(u, init) { - var response, $jscomp$optchain$tmp1153895636$0, $jscomp$optchain$tmp1153895636$1, $jscomp$optchain$tmp1153895636$2, mimeType; - return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$1153895636$6) { - if (1 == $jscomp$generator$context$1153895636$6.nextAddress) { - return $jscomp$generator$context$1153895636$6.yield(fetch(module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(u).toString(), init), 2); - } - response = $jscomp$generator$context$1153895636$6.yieldResult; - mimeType = null == ($jscomp$optchain$tmp1153895636$0 = response.headers.get("Content-Type")) ? void 0 : null == ($jscomp$optchain$tmp1153895636$1 = $jscomp$optchain$tmp1153895636$0.split(";", 2)) ? void 0 : null == ($jscomp$optchain$tmp1153895636$2 = $jscomp$optchain$tmp1153895636$1[0]) ? void 0 : $jscomp$optchain$tmp1153895636$2.toLowerCase(); - return $jscomp$generator$context$1153895636$6.return({html:function() { + var response, $jscomp$optchain$tmpm991617773$0, $jscomp$optchain$tmpm991617773$1, $jscomp$optchain$tmpm991617773$2, mimeType; + return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$m991617773$6) { + if (1 == $jscomp$generator$context$m991617773$6.nextAddress) { + return $jscomp$generator$context$m991617773$6.yield(fetch(module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(u).toString(), init), 2); + } + response = $jscomp$generator$context$m991617773$6.yieldResult; + mimeType = null == ($jscomp$optchain$tmpm991617773$0 = response.headers.get("Content-Type")) ? void 0 : null == ($jscomp$optchain$tmpm991617773$1 = $jscomp$optchain$tmpm991617773$0.split(";", 2)) ? void 0 : null == ($jscomp$optchain$tmpm991617773$2 = $jscomp$optchain$tmpm991617773$1[0]) ? void 0 : $jscomp$optchain$tmpm991617773$2.toLowerCase(); + return $jscomp$generator$context$m991617773$6.return({html:function() { var text; - return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$1153895636$3) { - if (1 == $jscomp$generator$context$1153895636$3.nextAddress) { + return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$m991617773$3) { + if (1 == $jscomp$generator$context$m991617773$3.nextAddress) { if ("text/html" !== mimeType) { throw new module$exports$safevalues$dom$globals$fetch.IncorrectContentTypeError(response.url, "SafeHtml", "text/html"); } - return $jscomp$generator$context$1153895636$3.yield(response.text(), 2); + return $jscomp$generator$context$m991617773$3.yield(response.text(), 2); } - text = $jscomp$generator$context$1153895636$3.yieldResult; - return $jscomp$generator$context$1153895636$3.return(module$contents$safevalues$dom$globals$fetch_privatecreateHtmlInternal(text)); + text = $jscomp$generator$context$m991617773$3.yieldResult; + return $jscomp$generator$context$m991617773$3.return(module$contents$safevalues$dom$globals$fetch_privatecreateHtmlInternal(text)); }); }, script:function() { var text; - return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$1153895636$4) { - if (1 == $jscomp$generator$context$1153895636$4.nextAddress) { + return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$m991617773$4) { + if (1 == $jscomp$generator$context$m991617773$4.nextAddress) { if ("text/javascript" !== mimeType && "application/javascript" !== mimeType) { throw new module$exports$safevalues$dom$globals$fetch.IncorrectContentTypeError(response.url, "SafeScript", "text/javascript"); } - return $jscomp$generator$context$1153895636$4.yield(response.text(), 2); + return $jscomp$generator$context$m991617773$4.yield(response.text(), 2); } - text = $jscomp$generator$context$1153895636$4.yieldResult; - return $jscomp$generator$context$1153895636$4.return(module$contents$safevalues$internals$script_impl_createScriptInternal(text)); + text = $jscomp$generator$context$m991617773$4.yieldResult; + return $jscomp$generator$context$m991617773$4.return(module$contents$safevalues$internals$script_impl_createScriptInternal(text)); }); }, styleSheet:function() { var text; - return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$1153895636$5) { - if (1 == $jscomp$generator$context$1153895636$5.nextAddress) { + return $jscomp.asyncExecutePromiseGeneratorProgram(function($jscomp$generator$context$m991617773$5) { + if (1 == $jscomp$generator$context$m991617773$5.nextAddress) { if ("text/css" !== mimeType) { throw new module$exports$safevalues$dom$globals$fetch.IncorrectContentTypeError(response.url, "SafeStyleSheet", "text/css"); } - return $jscomp$generator$context$1153895636$5.yield(response.text(), 2); + return $jscomp$generator$context$m991617773$5.yield(response.text(), 2); } - text = $jscomp$generator$context$1153895636$5.yieldResult; - return $jscomp$generator$context$1153895636$5.return(module$contents$safevalues$internals$style_sheet_impl_createStyleSheetInternal(text)); + text = $jscomp$generator$context$m991617773$5.yieldResult; + return $jscomp$generator$context$m991617773$5.return(module$contents$safevalues$internals$style_sheet_impl_createStyleSheetInternal(text)); }); }}); }); @@ -9296,8 +9296,8 @@ function module$contents$eeapiclient$request_params_processParams(params) { } module$exports$eeapiclient$request_params.processParams = module$contents$eeapiclient$request_params_processParams; function module$contents$eeapiclient$request_params_buildQueryParams(params, mapping, passthroughParams) { - for (var urlQueryParams = passthroughParams = void 0 === passthroughParams ? {} : passthroughParams, $jscomp$iter$28 = $jscomp.makeIterator(Object.entries(mapping)), $jscomp$key$m125199259$0$ = $jscomp$iter$28.next(); !$jscomp$key$m125199259$0$.done; $jscomp$key$m125199259$0$ = $jscomp$iter$28.next()) { - var $jscomp$destructuring$var27 = $jscomp.makeIterator($jscomp$key$m125199259$0$.value), jsName__tsickle_destructured_1 = $jscomp$destructuring$var27.next().value, urlQueryParamName__tsickle_destructured_2 = $jscomp$destructuring$var27.next().value, jsName = jsName__tsickle_destructured_1, urlQueryParamName = urlQueryParamName__tsickle_destructured_2; + for (var urlQueryParams = passthroughParams = void 0 === passthroughParams ? {} : passthroughParams, $jscomp$iter$28 = $jscomp.makeIterator(Object.entries(mapping)), $jscomp$key$1047461284$0$ = $jscomp$iter$28.next(); !$jscomp$key$1047461284$0$.done; $jscomp$key$1047461284$0$ = $jscomp$iter$28.next()) { + var $jscomp$destructuring$var27 = $jscomp.makeIterator($jscomp$key$1047461284$0$.value), jsName__tsickle_destructured_1 = $jscomp$destructuring$var27.next().value, urlQueryParamName__tsickle_destructured_2 = $jscomp$destructuring$var27.next().value, jsName = jsName__tsickle_destructured_1, urlQueryParamName = urlQueryParamName__tsickle_destructured_2; jsName in params && (urlQueryParams[urlQueryParamName] = params[jsName]); } return urlQueryParams; @@ -9308,8 +9308,8 @@ module$exports$eeapiclient$request_params.bypassCorsPreflight = function(params) var safeHeaders = {}, unsafeHeaders = {}, hasUnsafeHeaders = !1, hasContentType = !1; if (params.headers) { hasContentType = null != params.headers["Content-Type"]; - for (var $jscomp$iter$29 = $jscomp.makeIterator(Object.entries(params.headers)), $jscomp$key$m125199259$1$ = $jscomp$iter$29.next(); !$jscomp$key$m125199259$1$.done; $jscomp$key$m125199259$1$ = $jscomp$iter$29.next()) { - var $jscomp$destructuring$var29 = $jscomp.makeIterator($jscomp$key$m125199259$1$.value), key__tsickle_destructured_3 = $jscomp$destructuring$var29.next().value, value__tsickle_destructured_4 = $jscomp$destructuring$var29.next().value, key = key__tsickle_destructured_3, value = value__tsickle_destructured_4; + for (var $jscomp$iter$29 = $jscomp.makeIterator(Object.entries(params.headers)), $jscomp$key$1047461284$1$ = $jscomp$iter$29.next(); !$jscomp$key$1047461284$1$.done; $jscomp$key$1047461284$1$ = $jscomp$iter$29.next()) { + var $jscomp$destructuring$var29 = $jscomp.makeIterator($jscomp$key$1047461284$1$.value), key__tsickle_destructured_3 = $jscomp$destructuring$var29.next().value, value__tsickle_destructured_4 = $jscomp$destructuring$var29.next().value, key = key__tsickle_destructured_3, value = value__tsickle_destructured_4; module$contents$eeapiclient$request_params_simpleCorsAllowedHeaders.includes(key) ? safeHeaders[key] = value : (unsafeHeaders[key] = value, hasUnsafeHeaders = !0); } } @@ -9354,15 +9354,15 @@ module$exports$eeapiclient$multipart_request.MultipartRequest.prototype.addMetad this._metadataPayload += "Content-Type: application/json; charset=utf-8\r\n\r\n" + JSON.stringify(json) + ("\r\n--" + this._boundary + "\r\n"); }; module$exports$eeapiclient$multipart_request.MultipartRequest.prototype.build = function() { - var $jscomp$this$m133342051$6 = this, payload = "--" + this._boundary + "\r\n"; + var $jscomp$this$m667091202$6 = this, payload = "--" + this._boundary + "\r\n"; payload += this._metadataPayload; return Promise.all(this.files.map(function(f) { - return $jscomp$this$m133342051$6.encodeFile(f); + return $jscomp$this$m667091202$6.encodeFile(f); })).then(function(filePayloads) { - for (var $jscomp$iter$30 = $jscomp.makeIterator(filePayloads), $jscomp$key$m133342051$9$filePayload = $jscomp$iter$30.next(); !$jscomp$key$m133342051$9$filePayload.done; $jscomp$key$m133342051$9$filePayload = $jscomp$iter$30.next()) { - payload += $jscomp$key$m133342051$9$filePayload.value; + for (var $jscomp$iter$30 = $jscomp.makeIterator(filePayloads), $jscomp$key$m667091202$9$filePayload = $jscomp$iter$30.next(); !$jscomp$key$m667091202$9$filePayload.done; $jscomp$key$m667091202$9$filePayload = $jscomp$iter$30.next()) { + payload += $jscomp$key$m667091202$9$filePayload.value; } - return payload += "\r\n--" + $jscomp$this$m133342051$6._boundary + "--"; + return payload += "\r\n--" + $jscomp$this$m667091202$6._boundary + "--"; }); }; module$exports$eeapiclient$multipart_request.MultipartRequest.prototype.encodeFile = function(file) { @@ -9450,9 +9450,9 @@ module$exports$eeapiclient$promise_api_client.PromiseApiClient.prototype.$reques return this.$addHooksToRequest(requestParams, this.requestService.send(module$contents$eeapiclient$api_client_toMakeRequestParams(requestParams), responseCtor)); }; module$exports$eeapiclient$promise_api_client.PromiseApiClient.prototype.$uploadRequest = function(requestParams) { - var $jscomp$this$m296226325$4 = this, responseCtor = requestParams.responseCtor || void 0; + var $jscomp$this$1237977804$4 = this, responseCtor = requestParams.responseCtor || void 0; return this.$addHooksToRequest(requestParams, module$contents$eeapiclient$api_client_toMultipartMakeRequestParams(requestParams).then(function(params) { - return $jscomp$this$m296226325$4.requestService.send(params, responseCtor); + return $jscomp$this$1237977804$4.requestService.send(params, responseCtor); })); }; var module$exports$eeapiclient$ee_api_client = {}, module$contents$eeapiclient$ee_api_client_module = module$contents$eeapiclient$ee_api_client_module || {id:"geo/gestalt/client/javascript/v1/ee_api_client.closure.js"}; @@ -15565,8 +15565,8 @@ module$exports$safevalues$builders$html_formatter.HtmlFormatter = function() { this.replacements = new Map(); }; module$exports$safevalues$builders$html_formatter.HtmlFormatter.prototype.format = function(format) { - var $jscomp$this$1018007701$5 = this, openedTags = [], marker = (0,module$exports$safevalues$builders$html_builders.htmlEscape)("_safevalues_format_marker_:").toString(), html = (0,module$exports$safevalues$builders$html_builders.htmlEscape)(format).toString().replace(new RegExp("\\{" + marker + "[\\w&#;]+\\}", "g"), function(match) { - return $jscomp$this$1018007701$5.replaceFormattingString(openedTags, match); + var $jscomp$this$380122516$5 = this, openedTags = [], marker = (0,module$exports$safevalues$builders$html_builders.htmlEscape)("_safevalues_format_marker_:").toString(), html = (0,module$exports$safevalues$builders$html_builders.htmlEscape)(format).toString().replace(new RegExp("\\{" + marker + "[\\w&#;]+\\}", "g"), function(match) { + return $jscomp$this$380122516$5.replaceFormattingString(openedTags, match); }); if (0 !== openedTags.length) { if (goog.DEBUG) { @@ -15708,7 +15708,7 @@ module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanit })}]]; module$exports$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table.defaultSanitizerTable = new module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.SanitizerTable(new Set(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ALLOWED_ELEMENTS), new Map(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ELEMENT_POLICIES), new Set(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ALLOWED_GLOBAL_ATTRIBUTES), new Map(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_GLOBAL_ATTRIBUTE_POLICIES)); -module$exports$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table.lenientSanitizerTable = new module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.SanitizerTable(new Set(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ALLOWED_ELEMENTS.concat(["BUTTON"])), new Map(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ELEMENT_POLICIES), +module$exports$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table.lenientSanitizerTable = new module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.SanitizerTable(new Set(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ALLOWED_ELEMENTS.concat(["BUTTON", "INPUT"])), new Map(module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ELEMENT_POLICIES), new Set(module$contents$safevalues$internals$pure_pure(function() { return module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ALLOWED_GLOBAL_ATTRIBUTES.concat(["class", "id", "name"]); })), new Map(module$contents$safevalues$internals$pure_pure(function() { @@ -15746,8 +15746,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerIm return this.sanitizeToFragmentInternal(html, inertDocument); }; module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerImpl.prototype.sanitizeToFragmentInternal = function(html, inertDocument) { - for (var $jscomp$this$m1085474118$10 = this, dirtyFragment = module$contents$safevalues$builders$html_sanitizer$inert_fragment_createInertFragment(html, inertDocument), treeWalker = document.createTreeWalker(dirtyFragment, 5, function(n) { - return $jscomp$this$m1085474118$10.nodeFilter(n); + for (var $jscomp$this$m1803429925$10 = this, dirtyFragment = module$contents$safevalues$builders$html_sanitizer$inert_fragment_createInertFragment(html, inertDocument), treeWalker = document.createTreeWalker(dirtyFragment, 5, function(n) { + return $jscomp$this$m1803429925$10.nodeFilter(n); }, !1), currentNode = treeWalker.nextNode(), sanitizedFragment = inertDocument.createDocumentFragment(), sanitizedParent = sanitizedFragment; null !== currentNode;) { var sanitizedNode = void 0; if (module$contents$safevalues$builders$html_sanitizer$no_clobber_isText(currentNode)) { @@ -15774,8 +15774,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerIm return document.createTextNode(textNode.data); }; module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerImpl.prototype.sanitizeElementNode = function(elementNode, inertDocument) { - for (var elementName = module$contents$safevalues$builders$html_sanitizer$no_clobber_getNodeName(elementNode), newNode = inertDocument.createElement(elementName), dirtyAttributes = elementNode.attributes, $jscomp$iter$31 = $jscomp.makeIterator(dirtyAttributes), $jscomp$key$m1085474118$25$ = $jscomp$iter$31.next(); !$jscomp$key$m1085474118$25$.done; $jscomp$key$m1085474118$25$ = $jscomp$iter$31.next()) { - var $jscomp$destructuring$var31 = $jscomp$key$m1085474118$25$.value, name = $jscomp$destructuring$var31.name, value = $jscomp$destructuring$var31.value, policy = this.sanitizerTable.getAttributePolicy(name, elementName); + for (var elementName = module$contents$safevalues$builders$html_sanitizer$no_clobber_getNodeName(elementNode), newNode = inertDocument.createElement(elementName), dirtyAttributes = elementNode.attributes, $jscomp$iter$31 = $jscomp.makeIterator(dirtyAttributes), $jscomp$key$m1803429925$25$ = $jscomp$iter$31.next(); !$jscomp$key$m1803429925$25$.done; $jscomp$key$m1803429925$25$ = $jscomp$iter$31.next()) { + var $jscomp$destructuring$var31 = $jscomp$key$m1803429925$25$.value, name = $jscomp$destructuring$var31.name, value = $jscomp$destructuring$var31.value, policy = this.sanitizerTable.getAttributePolicy(name, elementName); if (this.satisfiesAllConditions(policy.conditions, dirtyAttributes)) { switch(policy.policyAction) { case module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP: @@ -15828,8 +15828,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerIm if (!conditions) { return !0; } - for (var $jscomp$iter$32 = $jscomp.makeIterator(conditions), $jscomp$key$m1085474118$26$ = $jscomp$iter$32.next(); !$jscomp$key$m1085474118$26$.done; $jscomp$key$m1085474118$26$ = $jscomp$iter$32.next()) { - var $jscomp$destructuring$var33 = $jscomp.makeIterator($jscomp$key$m1085474118$26$.value), attrName__tsickle_destructured_1 = $jscomp$destructuring$var33.next().value, expectedValues = $jscomp$destructuring$var33.next().value, $jscomp$optchain$tmpm1085474118$0 = void 0, value = null == ($jscomp$optchain$tmpm1085474118$0 = attrs.getNamedItem(attrName__tsickle_destructured_1)) ? void 0 : $jscomp$optchain$tmpm1085474118$0.value; + for (var $jscomp$iter$32 = $jscomp.makeIterator(conditions), $jscomp$key$m1803429925$26$ = $jscomp$iter$32.next(); !$jscomp$key$m1803429925$26$.done; $jscomp$key$m1803429925$26$ = $jscomp$iter$32.next()) { + var $jscomp$destructuring$var33 = $jscomp.makeIterator($jscomp$key$m1803429925$26$.value), attrName__tsickle_destructured_1 = $jscomp$destructuring$var33.next().value, expectedValues = $jscomp$destructuring$var33.next().value, $jscomp$optchain$tmpm1803429925$0 = void 0, value = null == ($jscomp$optchain$tmpm1803429925$0 = attrs.getNamedItem(attrName__tsickle_destructured_1)) ? void 0 : $jscomp$optchain$tmpm1803429925$0.value; if (value && !expectedValues.has(value)) { return !1; } @@ -15883,8 +15883,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSan this.sanitizerTable = module$exports$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table.defaultSanitizerTable; }; module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSanitizerBuilder.prototype.onlyAllowElements = function(elementSet) { - for (var allowedElements = new Set(), allowedElementPolicies = new Map(), $jscomp$iter$33 = $jscomp.makeIterator(elementSet), $jscomp$key$435282654$0$element = $jscomp$iter$33.next(); !$jscomp$key$435282654$0$element.done; $jscomp$key$435282654$0$element = $jscomp$iter$33.next()) { - var element = $jscomp$key$435282654$0$element.value; + for (var allowedElements = new Set(), allowedElementPolicies = new Map(), $jscomp$iter$33 = $jscomp.makeIterator(elementSet), $jscomp$key$m1412690177$0$element = $jscomp$iter$33.next(); !$jscomp$key$m1412690177$0$element.done; $jscomp$key$m1412690177$0$element = $jscomp$iter$33.next()) { + var element = $jscomp$key$m1412690177$0$element.value; element = element.toUpperCase(); if (!this.sanitizerTable.isAllowedElement(element)) { throw Error("Element: " + element + ", is not allowed by html5_contract.textpb"); @@ -15902,8 +15902,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSan throw Error("Element: " + element + " is not a custom element"); } if (allowedAttributes) { - for (var elementPolicy = new Map(), $jscomp$iter$34 = $jscomp.makeIterator(allowedAttributes), $jscomp$key$435282654$1$attribute = $jscomp$iter$34.next(); !$jscomp$key$435282654$1$attribute.done; $jscomp$key$435282654$1$attribute = $jscomp$iter$34.next()) { - elementPolicy.set($jscomp$key$435282654$1$attribute.value, {policyAction:module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP}); + for (var elementPolicy = new Map(), $jscomp$iter$34 = $jscomp.makeIterator(allowedAttributes), $jscomp$key$m1412690177$1$attribute = $jscomp$iter$34.next(); !$jscomp$key$m1412690177$1$attribute.done; $jscomp$key$m1412690177$1$attribute = $jscomp$iter$34.next()) { + elementPolicy.set($jscomp$key$m1412690177$1$attribute.value, {policyAction:module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP}); } allowedElementPolicies.set(element, elementPolicy); } else { @@ -15913,15 +15913,15 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSan return this; }; module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSanitizerBuilder.prototype.onlyAllowAttributes = function(attributeSet) { - for (var allowedGlobalAttributes = new Set(), globalAttributePolicies = new Map(), elementPolicies = new Map(), $jscomp$iter$35 = $jscomp.makeIterator(attributeSet), $jscomp$key$435282654$2$attribute = $jscomp$iter$35.next(); !$jscomp$key$435282654$2$attribute.done; $jscomp$key$435282654$2$attribute = $jscomp$iter$35.next()) { - var attribute = $jscomp$key$435282654$2$attribute.value; + for (var allowedGlobalAttributes = new Set(), globalAttributePolicies = new Map(), elementPolicies = new Map(), $jscomp$iter$35 = $jscomp.makeIterator(attributeSet), $jscomp$key$m1412690177$2$attribute = $jscomp$iter$35.next(); !$jscomp$key$m1412690177$2$attribute.done; $jscomp$key$m1412690177$2$attribute = $jscomp$iter$35.next()) { + var attribute = $jscomp$key$m1412690177$2$attribute.value; this.sanitizerTable.allowedGlobalAttributes.has(attribute) && allowedGlobalAttributes.add(attribute); this.sanitizerTable.globalAttributePolicies.has(attribute) && globalAttributePolicies.set(attribute, this.sanitizerTable.globalAttributePolicies.get(attribute)); } - for (var $jscomp$iter$37 = $jscomp.makeIterator(this.sanitizerTable.elementPolicies.entries()), $jscomp$key$435282654$4$ = $jscomp$iter$37.next(); !$jscomp$key$435282654$4$.done; $jscomp$key$435282654$4$ = $jscomp$iter$37.next()) { - for (var $jscomp$destructuring$var35 = $jscomp.makeIterator($jscomp$key$435282654$4$.value), elementName__tsickle_destructured_1 = $jscomp$destructuring$var35.next().value, originalElementPolicy__tsickle_destructured_2 = $jscomp$destructuring$var35.next().value, elementName = elementName__tsickle_destructured_1, newElementPolicy = new Map(), $jscomp$iter$36 = $jscomp.makeIterator(originalElementPolicy__tsickle_destructured_2.entries()), $jscomp$key$435282654$3$ = $jscomp$iter$36.next(); !$jscomp$key$435282654$3$.done; $jscomp$key$435282654$3$ = + for (var $jscomp$iter$37 = $jscomp.makeIterator(this.sanitizerTable.elementPolicies.entries()), $jscomp$key$m1412690177$4$ = $jscomp$iter$37.next(); !$jscomp$key$m1412690177$4$.done; $jscomp$key$m1412690177$4$ = $jscomp$iter$37.next()) { + for (var $jscomp$destructuring$var35 = $jscomp.makeIterator($jscomp$key$m1412690177$4$.value), elementName__tsickle_destructured_1 = $jscomp$destructuring$var35.next().value, originalElementPolicy__tsickle_destructured_2 = $jscomp$destructuring$var35.next().value, elementName = elementName__tsickle_destructured_1, newElementPolicy = new Map(), $jscomp$iter$36 = $jscomp.makeIterator(originalElementPolicy__tsickle_destructured_2.entries()), $jscomp$key$m1412690177$3$ = $jscomp$iter$36.next(); !$jscomp$key$m1412690177$3$.done; $jscomp$key$m1412690177$3$ = $jscomp$iter$36.next()) { - var $jscomp$destructuring$var37 = $jscomp.makeIterator($jscomp$key$435282654$3$.value), attribute__tsickle_destructured_3 = $jscomp$destructuring$var37.next().value, attributePolicy__tsickle_destructured_4 = $jscomp$destructuring$var37.next().value, attribute$jscomp$0 = attribute__tsickle_destructured_3, attributePolicy = attributePolicy__tsickle_destructured_4; + var $jscomp$destructuring$var37 = $jscomp.makeIterator($jscomp$key$m1412690177$3$.value), attribute__tsickle_destructured_3 = $jscomp$destructuring$var37.next().value, attributePolicy__tsickle_destructured_4 = $jscomp$destructuring$var37.next().value, attribute$jscomp$0 = attribute__tsickle_destructured_3, attributePolicy = attributePolicy__tsickle_destructured_4; attributeSet.has(attribute$jscomp$0) && newElementPolicy.set(attribute$jscomp$0, attributePolicy); } elementPolicies.set(elementName, newElementPolicy); @@ -15930,8 +15930,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSan return this; }; module$exports$safevalues$builders$html_sanitizer$html_sanitizer_builder.HtmlSanitizerBuilder.prototype.allowDataAttributes = function(attributes) { - for (var allowedGlobalAttributes = new Set(this.sanitizerTable.allowedGlobalAttributes), $jscomp$iter$38 = $jscomp.makeIterator(attributes), $jscomp$key$435282654$5$attribute = $jscomp$iter$38.next(); !$jscomp$key$435282654$5$attribute.done; $jscomp$key$435282654$5$attribute = $jscomp$iter$38.next()) { - var attribute = $jscomp$key$435282654$5$attribute.value; + for (var allowedGlobalAttributes = new Set(this.sanitizerTable.allowedGlobalAttributes), $jscomp$iter$38 = $jscomp.makeIterator(attributes), $jscomp$key$m1412690177$5$attribute = $jscomp$iter$38.next(); !$jscomp$key$m1412690177$5$attribute.done; $jscomp$key$m1412690177$5$attribute = $jscomp$iter$38.next()) { + var attribute = $jscomp$key$m1412690177$5$attribute.value; if (0 !== attribute.indexOf("data-")) { throw Error("data attribute: " + attribute + ' does not begin with the prefix "data-"'); } @@ -16182,12 +16182,12 @@ function module$contents$safevalues$reporting$reporting_isChangedBySanitizing(s, } try { module$contents$safevalues$builders$html_sanitizer$html_sanitizer_lenientlySanitizeHtmlAssertUnchanged(s); - } catch ($jscomp$unused$catch$696273141$0) { + } catch ($jscomp$unused$catch$442189172$0) { return module$contents$safevalues$reporting$reporting_reportLegacyConversion(options, module$contents$safevalues$reporting$reporting_ReportingType.HTML_CHANGED_BY_RELAXED_SANITIZING), !0; } try { module$contents$safevalues$builders$html_sanitizer$html_sanitizer_sanitizeHtmlAssertUnchanged(s); - } catch ($jscomp$unused$catch$696273141$1) { + } catch ($jscomp$unused$catch$442189172$1) { return module$contents$safevalues$reporting$reporting_reportLegacyConversion(options, module$contents$safevalues$reporting$reporting_ReportingType.HTML_CHANGED_BY_SANITIZING), !0; } return !1; @@ -19089,7 +19089,7 @@ var $jscomp$templatelit$294235699$96 = $jscomp.createTemplateTagFirstArg(["https ee.apiclient = {}; var module$contents$ee$apiclient_apiclient = {}; ee.apiclient.VERSION = module$exports$ee$apiVersion.V1; -ee.apiclient.API_CLIENT_VERSION = "0.1.394"; +ee.apiclient.API_CLIENT_VERSION = "0.1.395"; ee.apiclient.NULL_VALUE = module$exports$eeapiclient$domain_object.NULL_VALUE; ee.apiclient.PromiseRequestService = module$exports$eeapiclient$promise_request_service.PromiseRequestService; ee.apiclient.MakeRequestParams = module$contents$eeapiclient$request_params_MakeRequestParams; @@ -19379,8 +19379,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded"; body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST")); method = method || "POST"; - var headers = {"Content-Type":contentType}, version = "0.1.394"; - "0.1.394" === version && (version = "latest"); + var headers = {"Content-Type":contentType}, version = "0.1.395"; + "0.1.395" === version && (version = "latest"); headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version; var authToken = module$contents$ee$apiclient_apiclient.getAuthToken(); if (null != authToken) { @@ -26932,29 +26932,28 @@ ee.data.Profiler.Format.prototype.toString = function() { ee.data.Profiler.Format.TEXT = new ee.data.Profiler.Format("text"); ee.data.Profiler.Format.JSON = new ee.data.Profiler.Format("json"); (function() { - var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction._call ee.ApiFunction._apply ee.ApiFunction.lookup ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.table.toBigQuery ee.batch.Export.image.toCloudStorage ee.batch.Export.video.toCloudStorage ee.batch.Export.table.toFeatureView ee.batch.Export.video.toDrive ee.batch.Export.table.toDrive ee.batch.Export.image.toDrive ee.batch.Export.table.toAsset ee.batch.Export.table.toCloudStorage ee.batch.Export.classifier.toAsset ee.batch.Export.image.toAsset ee.batch.Export.map.toCloudStorage ee.Collection.prototype.limit ee.Collection.prototype.sort ee.Collection.prototype.iterate ee.Collection.prototype.filterMetadata ee.Collection.prototype.filterBounds ee.Collection.prototype.filter ee.Collection.prototype.filterDate ee.Collection.prototype.map ee.ComputedObject.prototype.aside ee.ComputedObject.prototype.evaluate ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.serialize ee.data.startTableIngestion ee.data.getWorkloadTag ee.data.getTaskList ee.data.getTableDownloadId ee.data.getMapId ee.data.authenticate ee.data.makeTableDownloadUrl ee.data.getAssetAcl ee.data.getTileUrl ee.data.listImages ee.data.getTaskListWithLimit ee.data.listOperations ee.data.getAssetRoots ee.data.getAsset ee.data.getDownloadId ee.data.setWorkloadTag ee.data.cancelOperation ee.data.createAssetHome ee.data.makeDownloadUrl ee.data.getFeatureViewTilesKey ee.data.listFeatures ee.data.createAsset ee.data.authenticateViaPopup ee.data.getInfo ee.data.setDefaultWorkloadTag ee.data.getOperation ee.data.resetWorkloadTag ee.data.authenticateViaPrivateKey ee.data.updateAsset ee.data.newTaskId ee.data.computeValue ee.data.cancelTask ee.data.startIngestion ee.data.createFolder ee.data.getThumbId ee.data.setAssetAcl ee.data.getList ee.data.updateTask ee.data.getVideoThumbId ee.data.renameAsset ee.data.getTaskStatus ee.data.listAssets ee.data.startProcessing ee.data.getFilmstripThumbId ee.data.setAssetProperties ee.data.copyAsset ee.data.makeThumbUrl ee.data.authenticateViaOauth ee.data.listBuckets ee.data.getAssetRootQuota ee.data.deleteAsset ee.Date ee.Deserializer.fromCloudApiJSON ee.Deserializer.decodeCloudApi ee.Deserializer.decode ee.Deserializer.fromJSON ee.Dictionary ee.reset ee.call ee.Algorithms ee.InitState ee.initialize ee.apply ee.TILE_SIZE ee.Element.prototype.set ee.Encodable.SourceFrame ee.Feature ee.Feature.prototype.getInfo ee.Feature.prototype.getMapId ee.Feature.prototype.getMap ee.FeatureCollection.prototype.getInfo ee.FeatureCollection ee.FeatureCollection.prototype.getMapId ee.FeatureCollection.prototype.select ee.FeatureCollection.prototype.getDownloadURL ee.FeatureCollection.prototype.getMap ee.Filter.and ee.Filter.inList ee.Filter.gt ee.Filter.lt ee.Filter.neq ee.Filter.or ee.Filter.lte ee.Filter.gte ee.Filter.prototype.not ee.Filter ee.Filter.metadata ee.Filter.date ee.Filter.eq ee.Filter.bounds ee.Function.prototype.apply ee.Function.prototype.call ee.Geometry.Polygon ee.Geometry.prototype.serialize ee.Geometry.Point ee.Geometry.MultiPolygon ee.Geometry ee.Geometry.MultiLineString ee.Geometry.LinearRing ee.Geometry.prototype.toGeoJSON ee.Geometry.MultiPoint ee.Geometry.Rectangle ee.Geometry.BBox ee.Geometry.LineString ee.Geometry.prototype.toGeoJSONString ee.Image.prototype.getDownloadURL ee.Image.prototype.rename ee.Image.prototype.getInfo ee.Image.prototype.getMapId ee.Image.prototype.getMap ee.Image.prototype.getThumbId ee.Image.prototype.select ee.Image.prototype.expression ee.Image.prototype.clip ee.Image ee.Image.rgb ee.Image.cat ee.Image.prototype.getThumbURL ee.ImageCollection.prototype.getInfo ee.ImageCollection.prototype.select ee.ImageCollection.prototype.first ee.ImageCollection.prototype.getMapId ee.ImageCollection.prototype.linkCollection ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.getFilmstripThumbURL ee.ImageCollection ee.List ee.Number ee.Serializer.toReadableJSON ee.Serializer.encodeCloudApiPretty ee.Serializer.encode ee.Serializer.toCloudApiJSON ee.Serializer.encodeCloudApi ee.Serializer.toJSON ee.Serializer.toReadableCloudApiJSON ee.String ee.Terrain".split(" "), - orderedParamLists = [["name", "var_args"], ["name", "namedArgs"], ["name"], "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris opt_priority".split(" "), "collection opt_description opt_table opt_overwrite opt_append opt_selectors opt_maxVertices opt_priority".split(" "), - "image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions opt_priority".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames opt_priority".split(" "), "collection opt_description opt_assetId opt_maxFeaturesPerTile opt_thinningStrategy opt_thinningRanking opt_zOrderRanking opt_priority".split(" "), - "collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames opt_priority".split(" "), "collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices opt_priority".split(" "), "image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions opt_priority".split(" "), - ["collection", "opt_description", "opt_assetId", "opt_maxVertices", "opt_priority"], "collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices opt_priority".split(" "), ["classifier", "opt_description", "opt_assetId", "opt_priority"], "image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_priority".split(" "), "image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris opt_priority".split(" "), - ["max", "opt_property", "opt_ascending"], ["property", "opt_ascending"], ["algorithm", "opt_first"], ["name", "operator", "value"], ["geometry"], ["filter"], ["start", "opt_end"], ["algorithm", "opt_dropNulls"], ["func", "var_args"], ["callback"], ["opt_callback"], ["legacy"], ["taskId", "request", "opt_callback"], [], ["opt_callback"], ["params", "opt_callback"], ["params", "opt_callback"], ["clientId", "success", "opt_error", "opt_extraScopes", "opt_onImmediateFailed"], ["id"], ["assetId", "opt_callback"], - ["id", "x", "y", "z"], ["parent", "opt_params", "opt_callback"], ["opt_limit", "opt_callback"], ["opt_limit", "opt_callback"], ["opt_callback"], ["id", "opt_callback"], ["params", "opt_callback"], ["tag"], ["operationName", "opt_callback"], ["requestedId", "opt_callback"], ["id"], ["params", "opt_callback"], ["asset", "params", "opt_callback"], ["value", "opt_path", "opt_force", "opt_properties", "opt_callback"], ["opt_success", "opt_error"], ["id", "opt_callback"], ["tag"], ["operationName", "opt_callback"], - ["opt_resetDefault"], ["privateKey", "opt_success", "opt_error", "opt_extraScopes", "opt_suppressDefaultScopes"], ["assetId", "asset", "updateFields", "opt_callback"], ["opt_count", "opt_callback"], ["obj", "opt_callback"], ["taskId", "opt_callback"], ["taskId", "request", "opt_callback"], ["path", "opt_force", "opt_callback"], ["params", "opt_callback"], ["assetId", "aclUpdate", "opt_callback"], ["params", "opt_callback"], ["taskId", "action", "opt_callback"], ["params", "opt_callback"], ["sourceId", - "destinationId", "opt_callback"], ["taskId", "opt_callback"], ["parent", "opt_params", "opt_callback"], ["taskId", "params", "opt_callback"], ["params", "opt_callback"], ["assetId", "properties", "opt_callback"], ["sourceId", "destinationId", "opt_overwrite", "opt_callback"], ["id"], "clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "), ["project", "opt_callback"], ["rootId", "opt_callback"], ["assetId", "opt_callback"], ["date", "opt_tz"], ["json"], - ["json"], ["json"], ["json"], ["opt_dict"], [], ["func", "var_args"], [], [], "opt_baseurl opt_tileurl opt_successCallback opt_errorCallback opt_xsrfToken opt_project".split(" "), ["func", "namedArgs"], [], ["var_args"], [], ["geometry", "opt_properties"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["opt_visParams", "opt_callback"], ["opt_callback"], ["args", "opt_column"], ["opt_visParams", "opt_callback"], ["propertySelectors", "opt_newProperties", "opt_retainGeometry"], ["opt_format", - "opt_selectors", "opt_filename", "opt_callback"], ["opt_visParams", "opt_callback"], ["var_args"], ["opt_leftField", "opt_rightValue", "opt_rightField", "opt_leftValue"], ["name", "value"], ["name", "value"], ["name", "value"], ["var_args"], ["name", "value"], ["name", "value"], [], ["opt_filter"], ["name", "operator", "value"], ["start", "opt_end"], ["name", "value"], ["geometry", "opt_errorMargin"], ["namedArgs"], ["var_args"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], - ["legacy"], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["geoJson", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], [], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["west", "south", "east", "north"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], [], ["params", "opt_callback"], ["var_args"], ["opt_callback"], - ["opt_visParams", "opt_callback"], ["opt_visParams", "opt_callback"], ["params", "opt_callback"], ["var_args"], ["expression", "opt_map"], ["geometry"], ["opt_args"], ["r", "g", "b"], ["var_args"], ["params", "opt_callback"], ["opt_callback"], ["selectors", "opt_names"], [], ["opt_visParams", "opt_callback"], ["imageCollection", "opt_linkedBands", "opt_linkedProperties", "opt_matchPropertyName"], ["opt_visParams", "opt_callback"], ["params", "opt_callback"], ["params", "opt_callback"], ["args"], - ["list"], ["number"], ["obj"], ["obj"], ["obj", "opt_isCompound"], ["obj"], ["obj"], ["obj"], ["obj"], ["string"], []]; - [ee.ApiFunction._call, ee.ApiFunction._apply, ee.ApiFunction.lookup, module$contents$ee$batch_Export.videoMap.toCloudStorage, module$contents$ee$batch_Export.table.toBigQuery, module$contents$ee$batch_Export.image.toCloudStorage, module$contents$ee$batch_Export.video.toCloudStorage, module$contents$ee$batch_Export.table.toFeatureView, module$contents$ee$batch_Export.video.toDrive, module$contents$ee$batch_Export.table.toDrive, module$contents$ee$batch_Export.image.toDrive, module$contents$ee$batch_Export.table.toAsset, - module$contents$ee$batch_Export.table.toCloudStorage, module$contents$ee$batch_Export.classifier.toAsset, module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.map.toCloudStorage, ee.Collection.prototype.limit, ee.Collection.prototype.sort, ee.Collection.prototype.iterate, ee.Collection.prototype.filterMetadata, ee.Collection.prototype.filterBounds, ee.Collection.prototype.filter, ee.Collection.prototype.filterDate, ee.Collection.prototype.map, ee.ComputedObject.prototype.aside, - ee.ComputedObject.prototype.evaluate, ee.ComputedObject.prototype.getInfo, ee.ComputedObject.prototype.serialize, ee.data.startTableIngestion, ee.data.getWorkloadTag, ee.data.getTaskList, ee.data.getTableDownloadId, ee.data.getMapId, ee.data.authenticate, ee.data.makeTableDownloadUrl, ee.data.getAssetAcl, ee.data.getTileUrl, ee.data.listImages, ee.data.getTaskListWithLimit, ee.data.listOperations, ee.data.getAssetRoots, ee.data.getAsset, ee.data.getDownloadId, ee.data.setWorkloadTag, ee.data.cancelOperation, - ee.data.createAssetHome, ee.data.makeDownloadUrl, ee.data.getFeatureViewTilesKey, ee.data.listFeatures, ee.data.createAsset, ee.data.authenticateViaPopup, ee.data.getInfo, ee.data.setDefaultWorkloadTag, ee.data.getOperation, ee.data.resetWorkloadTag, ee.data.authenticateViaPrivateKey, ee.data.updateAsset, ee.data.newTaskId, ee.data.computeValue, ee.data.cancelTask, ee.data.startIngestion, ee.data.createFolder, ee.data.getThumbId, ee.data.setAssetAcl, ee.data.getList, ee.data.updateTask, ee.data.getVideoThumbId, - ee.data.renameAsset, ee.data.getTaskStatus, ee.data.listAssets, ee.data.startProcessing, ee.data.getFilmstripThumbId, ee.data.setAssetProperties, ee.data.copyAsset, ee.data.makeThumbUrl, ee.data.authenticateViaOauth, ee.data.listBuckets, ee.data.getAssetRootQuota, ee.data.deleteAsset, ee.Date, ee.Deserializer.fromCloudApiJSON, ee.Deserializer.decodeCloudApi, ee.Deserializer.decode, ee.Deserializer.fromJSON, ee.Dictionary, ee.reset, ee.call, ee.Algorithms, ee.InitState, ee.initialize, ee.apply, - ee.TILE_SIZE, ee.Element.prototype.set, ee.Encodable.SourceFrame, ee.Feature, ee.Feature.prototype.getInfo, ee.Feature.prototype.getMapId, ee.Feature.prototype.getMap, ee.FeatureCollection.prototype.getInfo, ee.FeatureCollection, ee.FeatureCollection.prototype.getMapId, ee.FeatureCollection.prototype.select, ee.FeatureCollection.prototype.getDownloadURL, ee.FeatureCollection.prototype.getMap, ee.Filter.and, ee.Filter.inList, ee.Filter.gt, ee.Filter.lt, ee.Filter.neq, ee.Filter.or, ee.Filter.lte, - ee.Filter.gte, ee.Filter.prototype.not, ee.Filter, ee.Filter.metadata, ee.Filter.date, ee.Filter.eq, ee.Filter.bounds, ee.Function.prototype.apply, ee.Function.prototype.call, ee.Geometry.Polygon, ee.Geometry.prototype.serialize, ee.Geometry.Point, ee.Geometry.MultiPolygon, ee.Geometry, ee.Geometry.MultiLineString, ee.Geometry.LinearRing, ee.Geometry.prototype.toGeoJSON, ee.Geometry.MultiPoint, ee.Geometry.Rectangle, ee.Geometry.BBox, ee.Geometry.LineString, ee.Geometry.prototype.toGeoJSONString, - ee.Image.prototype.getDownloadURL, ee.Image.prototype.rename, ee.Image.prototype.getInfo, ee.Image.prototype.getMapId, ee.Image.prototype.getMap, ee.Image.prototype.getThumbId, ee.Image.prototype.select, ee.Image.prototype.expression, ee.Image.prototype.clip, ee.Image, ee.Image.rgb, ee.Image.cat, ee.Image.prototype.getThumbURL, ee.ImageCollection.prototype.getInfo, ee.ImageCollection.prototype.select, ee.ImageCollection.prototype.first, ee.ImageCollection.prototype.getMapId, ee.ImageCollection.prototype.linkCollection, - ee.ImageCollection.prototype.getMap, ee.ImageCollection.prototype.getVideoThumbURL, ee.ImageCollection.prototype.getFilmstripThumbURL, ee.ImageCollection, ee.List, ee.Number, ee.Serializer.toReadableJSON, ee.Serializer.encodeCloudApiPretty, ee.Serializer.encode, ee.Serializer.toCloudApiJSON, ee.Serializer.encodeCloudApi, ee.Serializer.toJSON, ee.Serializer.toReadableCloudApiJSON, ee.String, ee.Terrain].forEach(function(fn, i) { + var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction._apply ee.ApiFunction.lookup ee.ApiFunction._call ee.batch.Export.map.toCloudStorage ee.batch.Export.image.toAsset ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.table.toBigQuery ee.batch.Export.image.toCloudStorage ee.batch.Export.video.toCloudStorage ee.batch.Export.table.toFeatureView ee.batch.Export.video.toDrive ee.batch.Export.table.toDrive ee.batch.Export.image.toDrive ee.batch.Export.table.toCloudStorage ee.batch.Export.table.toAsset ee.batch.Export.classifier.toAsset ee.Collection.prototype.filter ee.Collection.prototype.sort ee.Collection.prototype.filterMetadata ee.Collection.prototype.filterBounds ee.Collection.prototype.filterDate ee.Collection.prototype.map ee.Collection.prototype.iterate ee.Collection.prototype.limit ee.ComputedObject.prototype.aside ee.ComputedObject.prototype.evaluate ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.serialize ee.data.getVideoThumbId ee.data.renameAsset ee.data.getTaskStatus ee.data.startProcessing ee.data.listAssets ee.data.setAssetProperties ee.data.makeThumbUrl ee.data.getFilmstripThumbId ee.data.copyAsset ee.data.listBuckets ee.data.authenticateViaOauth ee.data.getAssetRootQuota ee.data.getMapId ee.data.deleteAsset ee.data.startTableIngestion ee.data.getTaskList ee.data.getWorkloadTag ee.data.getTableDownloadId ee.data.listImages ee.data.getAssetAcl ee.data.getTileUrl ee.data.authenticate ee.data.makeTableDownloadUrl ee.data.getTaskListWithLimit ee.data.listOperations ee.data.setWorkloadTag ee.data.getAssetRoots ee.data.getAsset ee.data.getDownloadId ee.data.cancelOperation ee.data.createAssetHome ee.data.authenticateViaPopup ee.data.makeDownloadUrl ee.data.getFeatureViewTilesKey ee.data.listFeatures ee.data.setDefaultWorkloadTag ee.data.getInfo ee.data.resetWorkloadTag ee.data.createAsset ee.data.getOperation ee.data.updateAsset ee.data.authenticateViaPrivateKey ee.data.newTaskId ee.data.cancelTask ee.data.computeValue ee.data.startIngestion ee.data.createFolder ee.data.setAssetAcl ee.data.getThumbId ee.data.getList ee.data.updateTask ee.Date ee.Deserializer.decodeCloudApi ee.Deserializer.fromCloudApiJSON ee.Deserializer.decode ee.Deserializer.fromJSON ee.Dictionary ee.reset ee.Algorithms ee.InitState ee.apply ee.TILE_SIZE ee.initialize ee.call ee.Element.prototype.set ee.Encodable.SourceFrame ee.Feature ee.Feature.prototype.getInfo ee.Feature.prototype.getMapId ee.Feature.prototype.getMap ee.FeatureCollection.prototype.getMap ee.FeatureCollection.prototype.getInfo ee.FeatureCollection.prototype.select ee.FeatureCollection ee.FeatureCollection.prototype.getMapId ee.FeatureCollection.prototype.getDownloadURL ee.Filter.and ee.Filter.prototype.not ee.Filter.inList ee.Filter.neq ee.Filter.lt ee.Filter.gt ee.Filter.or ee.Filter ee.Filter.gte ee.Filter.lte ee.Filter.eq ee.Filter.metadata ee.Filter.date ee.Filter.bounds ee.Function.prototype.apply ee.Function.prototype.call ee.Geometry ee.Geometry.BBox ee.Geometry.MultiPoint ee.Geometry.Rectangle ee.Geometry.prototype.toGeoJSONString ee.Geometry.MultiPolygon ee.Geometry.prototype.serialize ee.Geometry.LineString ee.Geometry.Point ee.Geometry.Polygon ee.Geometry.MultiLineString ee.Geometry.prototype.toGeoJSON ee.Geometry.LinearRing ee.Image.rgb ee.Image.prototype.getDownloadURL ee.Image.prototype.getInfo ee.Image.prototype.getMapId ee.Image.prototype.getMap ee.Image.prototype.getThumbId ee.Image.prototype.getThumbURL ee.Image.cat ee.Image.prototype.select ee.Image.prototype.rename ee.Image.prototype.expression ee.Image.prototype.clip ee.Image ee.ImageCollection.prototype.getInfo ee.ImageCollection.prototype.select ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.linkCollection ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.getMapId ee.ImageCollection ee.ImageCollection.prototype.first ee.ImageCollection.prototype.getFilmstripThumbURL ee.List ee.Number ee.Serializer.encodeCloudApi ee.Serializer.toJSON ee.Serializer.toReadableCloudApiJSON ee.Serializer.toReadableJSON ee.Serializer.encodeCloudApiPretty ee.Serializer.encode ee.Serializer.toCloudApiJSON ee.String ee.Terrain".split(" "), + orderedParamLists = [["name", "namedArgs"], ["name"], ["name", "var_args"], "image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris opt_priority".split(" "), "image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_priority".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris opt_priority".split(" "), + "collection opt_description opt_table opt_overwrite opt_append opt_selectors opt_maxVertices opt_priority".split(" "), "image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions opt_priority".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames opt_priority".split(" "), + "collection opt_description opt_assetId opt_maxFeaturesPerTile opt_thinningStrategy opt_thinningRanking opt_zOrderRanking opt_priority".split(" "), "collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames opt_priority".split(" "), "collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices opt_priority".split(" "), "image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions opt_priority".split(" "), + "collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices opt_priority".split(" "), ["collection", "opt_description", "opt_assetId", "opt_maxVertices", "opt_priority"], ["classifier", "opt_description", "opt_assetId", "opt_priority"], ["filter"], ["property", "opt_ascending"], ["name", "operator", "value"], ["geometry"], ["start", "opt_end"], ["algorithm", "opt_dropNulls"], ["algorithm", "opt_first"], ["max", "opt_property", "opt_ascending"], ["func", + "var_args"], ["callback"], ["opt_callback"], ["legacy"], ["params", "opt_callback"], ["sourceId", "destinationId", "opt_callback"], ["taskId", "opt_callback"], ["taskId", "params", "opt_callback"], ["parent", "opt_params", "opt_callback"], ["assetId", "properties", "opt_callback"], ["id"], ["params", "opt_callback"], ["sourceId", "destinationId", "opt_overwrite", "opt_callback"], ["project", "opt_callback"], "clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "), + ["rootId", "opt_callback"], ["params", "opt_callback"], ["assetId", "opt_callback"], ["taskId", "request", "opt_callback"], ["opt_callback"], [], ["params", "opt_callback"], ["parent", "opt_params", "opt_callback"], ["assetId", "opt_callback"], ["id", "x", "y", "z"], ["clientId", "success", "opt_error", "opt_extraScopes", "opt_onImmediateFailed"], ["id"], ["opt_limit", "opt_callback"], ["opt_limit", "opt_callback"], ["tag"], ["opt_callback"], ["id", "opt_callback"], ["params", "opt_callback"], + ["operationName", "opt_callback"], ["requestedId", "opt_callback"], ["opt_success", "opt_error"], ["id"], ["params", "opt_callback"], ["asset", "params", "opt_callback"], ["tag"], ["id", "opt_callback"], ["opt_resetDefault"], ["value", "opt_path", "opt_force", "opt_properties", "opt_callback"], ["operationName", "opt_callback"], ["assetId", "asset", "updateFields", "opt_callback"], ["privateKey", "opt_success", "opt_error", "opt_extraScopes", "opt_suppressDefaultScopes"], ["opt_count", "opt_callback"], + ["taskId", "opt_callback"], ["obj", "opt_callback"], ["taskId", "request", "opt_callback"], ["path", "opt_force", "opt_callback"], ["assetId", "aclUpdate", "opt_callback"], ["params", "opt_callback"], ["params", "opt_callback"], ["taskId", "action", "opt_callback"], ["date", "opt_tz"], ["json"], ["json"], ["json"], ["json"], ["opt_dict"], [], [], [], ["func", "namedArgs"], [], "opt_baseurl opt_tileurl opt_successCallback opt_errorCallback opt_xsrfToken opt_project".split(" "), ["func", "var_args"], + ["var_args"], [], ["geometry", "opt_properties"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["opt_visParams", "opt_callback"], ["opt_visParams", "opt_callback"], ["opt_callback"], ["propertySelectors", "opt_newProperties", "opt_retainGeometry"], ["args", "opt_column"], ["opt_visParams", "opt_callback"], ["opt_format", "opt_selectors", "opt_filename", "opt_callback"], ["var_args"], [], ["opt_leftField", "opt_rightValue", "opt_rightField", "opt_leftValue"], ["name", "value"], ["name", + "value"], ["name", "value"], ["var_args"], ["opt_filter"], ["name", "value"], ["name", "value"], ["name", "value"], ["name", "operator", "value"], ["start", "opt_end"], ["geometry", "opt_errorMargin"], ["namedArgs"], ["var_args"], ["geoJson", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["west", "south", "east", "north"], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_evenOdd"], [], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["legacy"], ["coords", + "opt_proj", "opt_geodesic", "opt_maxError"], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], [], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["r", "g", "b"], ["params", "opt_callback"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["opt_visParams", "opt_callback"], ["params", "opt_callback"], ["params", "opt_callback"], ["var_args"], ["var_args"], ["var_args"], ["expression", + "opt_map"], ["geometry"], ["opt_args"], ["opt_callback"], ["selectors", "opt_names"], ["opt_visParams", "opt_callback"], ["imageCollection", "opt_linkedBands", "opt_linkedProperties", "opt_matchPropertyName"], ["params", "opt_callback"], ["opt_visParams", "opt_callback"], ["args"], [], ["params", "opt_callback"], ["list"], ["number"], ["obj"], ["obj"], ["obj"], ["obj"], ["obj"], ["obj", "opt_isCompound"], ["obj"], ["string"], []]; + [ee.ApiFunction._apply, ee.ApiFunction.lookup, ee.ApiFunction._call, module$contents$ee$batch_Export.map.toCloudStorage, module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.videoMap.toCloudStorage, module$contents$ee$batch_Export.table.toBigQuery, module$contents$ee$batch_Export.image.toCloudStorage, module$contents$ee$batch_Export.video.toCloudStorage, module$contents$ee$batch_Export.table.toFeatureView, module$contents$ee$batch_Export.video.toDrive, module$contents$ee$batch_Export.table.toDrive, + module$contents$ee$batch_Export.image.toDrive, module$contents$ee$batch_Export.table.toCloudStorage, module$contents$ee$batch_Export.table.toAsset, module$contents$ee$batch_Export.classifier.toAsset, ee.Collection.prototype.filter, ee.Collection.prototype.sort, ee.Collection.prototype.filterMetadata, ee.Collection.prototype.filterBounds, ee.Collection.prototype.filterDate, ee.Collection.prototype.map, ee.Collection.prototype.iterate, ee.Collection.prototype.limit, ee.ComputedObject.prototype.aside, + ee.ComputedObject.prototype.evaluate, ee.ComputedObject.prototype.getInfo, ee.ComputedObject.prototype.serialize, ee.data.getVideoThumbId, ee.data.renameAsset, ee.data.getTaskStatus, ee.data.startProcessing, ee.data.listAssets, ee.data.setAssetProperties, ee.data.makeThumbUrl, ee.data.getFilmstripThumbId, ee.data.copyAsset, ee.data.listBuckets, ee.data.authenticateViaOauth, ee.data.getAssetRootQuota, ee.data.getMapId, ee.data.deleteAsset, ee.data.startTableIngestion, ee.data.getTaskList, ee.data.getWorkloadTag, + ee.data.getTableDownloadId, ee.data.listImages, ee.data.getAssetAcl, ee.data.getTileUrl, ee.data.authenticate, ee.data.makeTableDownloadUrl, ee.data.getTaskListWithLimit, ee.data.listOperations, ee.data.setWorkloadTag, ee.data.getAssetRoots, ee.data.getAsset, ee.data.getDownloadId, ee.data.cancelOperation, ee.data.createAssetHome, ee.data.authenticateViaPopup, ee.data.makeDownloadUrl, ee.data.getFeatureViewTilesKey, ee.data.listFeatures, ee.data.setDefaultWorkloadTag, ee.data.getInfo, ee.data.resetWorkloadTag, + ee.data.createAsset, ee.data.getOperation, ee.data.updateAsset, ee.data.authenticateViaPrivateKey, ee.data.newTaskId, ee.data.cancelTask, ee.data.computeValue, ee.data.startIngestion, ee.data.createFolder, ee.data.setAssetAcl, ee.data.getThumbId, ee.data.getList, ee.data.updateTask, ee.Date, ee.Deserializer.decodeCloudApi, ee.Deserializer.fromCloudApiJSON, ee.Deserializer.decode, ee.Deserializer.fromJSON, ee.Dictionary, ee.reset, ee.Algorithms, ee.InitState, ee.apply, ee.TILE_SIZE, ee.initialize, + ee.call, ee.Element.prototype.set, ee.Encodable.SourceFrame, ee.Feature, ee.Feature.prototype.getInfo, ee.Feature.prototype.getMapId, ee.Feature.prototype.getMap, ee.FeatureCollection.prototype.getMap, ee.FeatureCollection.prototype.getInfo, ee.FeatureCollection.prototype.select, ee.FeatureCollection, ee.FeatureCollection.prototype.getMapId, ee.FeatureCollection.prototype.getDownloadURL, ee.Filter.and, ee.Filter.prototype.not, ee.Filter.inList, ee.Filter.neq, ee.Filter.lt, ee.Filter.gt, ee.Filter.or, + ee.Filter, ee.Filter.gte, ee.Filter.lte, ee.Filter.eq, ee.Filter.metadata, ee.Filter.date, ee.Filter.bounds, ee.Function.prototype.apply, ee.Function.prototype.call, ee.Geometry, ee.Geometry.BBox, ee.Geometry.MultiPoint, ee.Geometry.Rectangle, ee.Geometry.prototype.toGeoJSONString, ee.Geometry.MultiPolygon, ee.Geometry.prototype.serialize, ee.Geometry.LineString, ee.Geometry.Point, ee.Geometry.Polygon, ee.Geometry.MultiLineString, ee.Geometry.prototype.toGeoJSON, ee.Geometry.LinearRing, ee.Image.rgb, + ee.Image.prototype.getDownloadURL, ee.Image.prototype.getInfo, ee.Image.prototype.getMapId, ee.Image.prototype.getMap, ee.Image.prototype.getThumbId, ee.Image.prototype.getThumbURL, ee.Image.cat, ee.Image.prototype.select, ee.Image.prototype.rename, ee.Image.prototype.expression, ee.Image.prototype.clip, ee.Image, ee.ImageCollection.prototype.getInfo, ee.ImageCollection.prototype.select, ee.ImageCollection.prototype.getMap, ee.ImageCollection.prototype.linkCollection, ee.ImageCollection.prototype.getVideoThumbURL, + ee.ImageCollection.prototype.getMapId, ee.ImageCollection, ee.ImageCollection.prototype.first, ee.ImageCollection.prototype.getFilmstripThumbURL, ee.List, ee.Number, ee.Serializer.encodeCloudApi, ee.Serializer.toJSON, ee.Serializer.toReadableCloudApiJSON, ee.Serializer.toReadableJSON, ee.Serializer.encodeCloudApiPretty, ee.Serializer.encode, ee.Serializer.toCloudApiJSON, ee.String, ee.Terrain].forEach(function(fn, i) { fn && (exportedFnInfo[fn.toString()] = {name:orderedFnNames[i], paramNames:orderedParamLists[i]}); }); goog.global.EXPORTED_FN_INFO = exportedFnInfo; diff --git a/javascript/package.json b/javascript/package.json index 3a0a72da0..1add0dee7 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@google/earthengine", - "version": "0.1.394", + "version": "0.1.395", "description": "JavaScript client for Google Earth Engine API.", "author": "Google LLC", "license": "Apache-2.0", diff --git a/javascript/src/apiclient.js b/javascript/src/apiclient.js index 389c93e29..1a5da0ff8 100644 --- a/javascript/src/apiclient.js +++ b/javascript/src/apiclient.js @@ -24,7 +24,7 @@ const {trustedResourceUrl} = goog.require('safevalues'); /** @namespace */ const apiclient = {}; -const API_CLIENT_VERSION = '0.1.394'; +const API_CLIENT_VERSION = '0.1.395'; exports.VERSION = apiVersion.VERSION; exports.API_CLIENT_VERSION = API_CLIENT_VERSION; diff --git a/python/ee/__init__.py b/python/ee/__init__.py index 9839fcd37..38c1d2f98 100644 --- a/python/ee/__init__.py +++ b/python/ee/__init__.py @@ -1,6 +1,6 @@ """The EE Python library.""" -__version__ = '0.1.394' +__version__ = '0.1.395' # Using lowercase function naming to match the JavaScript names. # pylint: disable=g-bad-name diff --git a/python/ee/blob.py b/python/ee/blob.py index 6fcbbe613..e99171d8a 100644 --- a/python/ee/blob.py +++ b/python/ee/blob.py @@ -1,9 +1,13 @@ """A wrapper for Blobs.""" +from __future__ import annotations from typing import Any, Dict, Union from ee import apifunction from ee import computedobject +from ee import ee_string + +_StringType = Union[str, ee_string.String, computedobject.ComputedObject] class Blob(computedobject.ComputedObject): @@ -28,7 +32,7 @@ class Blob(computedobject.ComputedObject): # Tell pytype to not complain about dynamic attributes. _HAS_DYNAMIC_ATTRIBUTES = True - def __init__(self, url: Union[str, computedobject.ComputedObject]): + def __init__(self, url: _StringType): """Creates a Blob wrapper. Args: diff --git a/python/ee/confusionmatrix.py b/python/ee/confusionmatrix.py index 986c8723b..545e4ce28 100644 --- a/python/ee/confusionmatrix.py +++ b/python/ee/confusionmatrix.py @@ -1,9 +1,15 @@ """A wrapper for ConfusionMatrices.""" +from __future__ import annotations from typing import Any, Dict, List, Optional, Union from ee import apifunction from ee import computedobject +from ee import ee_array + +_ArrayType = Union[ee_array.Array, computedobject.ComputedObject] +_ConfusionMatrixType = Union['ConfusionMatrix', computedobject.ComputedObject] +_ListType = Union[List[Any], computedobject.ComputedObject] class ConfusionMatrix(computedobject.ComputedObject): @@ -25,8 +31,8 @@ class ConfusionMatrix(computedobject.ComputedObject): def __init__( self, - array: Optional[computedobject.ComputedObject], - order: Optional[Union[List[Any], computedobject.ComputedObject]] = None, + array: Optional[Union[_ArrayType, _ConfusionMatrixType]], + order: Optional[_ListType] = None, ): """Creates a ConfusionMatrix wrapper. diff --git a/python/ee/daterange.py b/python/ee/daterange.py index 41b84ab6c..729ad67ee 100644 --- a/python/ee/daterange.py +++ b/python/ee/daterange.py @@ -1,9 +1,16 @@ """A wrapper for DateRanges.""" +from __future__ import annotations from typing import Any, Dict, Optional, Union from ee import apifunction from ee import computedobject +from ee import ee_date +from ee import ee_string + +_DateRangeType = Union['DateRange', computedobject.ComputedObject] +_DateType = Union[float, str, ee_date.Date, computedobject.ComputedObject] +_StringType = Union[str, ee_string.String, computedobject.ComputedObject] class DateRange(computedobject.ComputedObject): @@ -26,10 +33,10 @@ class DateRange(computedobject.ComputedObject): def __init__( self, - start: Union[float, str, computedobject.ComputedObject], - end: Optional[Union[float, str, computedobject.ComputedObject]] = None, + start: Union[_DateType, _DateRangeType], + end: Optional[_DateType] = None, # pylint: disable-next=invalid-name - timeZone: Optional[Union[str, computedobject.ComputedObject]] = None, + timeZone: Optional[_StringType] = None, ): """Creates a DateRange wrapper. diff --git a/python/ee/deprecation.py b/python/ee/deprecation.py index fd7415352..00851954b 100644 --- a/python/ee/deprecation.py +++ b/python/ee/deprecation.py @@ -1,8 +1,22 @@ """Decorators to handle various deprecations.""" +from __future__ import annotations + +import dataclasses +import datetime import functools +import inspect +import json +from typing import Any, Callable, Dict, Optional +import urllib import warnings +_DEPRECATED_OBJECT = 'earthengine-stac/catalog/catalog_deprecated.json' +_DEPRECATED_ASSETS_URL = f'https://storage.googleapis.com/{_DEPRECATED_OBJECT}' + +# Deprecation warnings are per-asset, per-initialization. +deprecated_assets: Dict[str, _DeprecatedAsset] = None + def Deprecated(message: str): """Returns a decorator with a given warning message.""" @@ -25,11 +39,14 @@ def Wrapper(*args, **kwargs): '%s() is deprecated: %s' % (func.__name__, message), category=DeprecationWarning, filename=func.__code__.co_filename, - lineno=func.__code__.co_firstlineno + 1) + lineno=func.__code__.co_firstlineno + 1, + ) return func(*args, **kwargs) + deprecation_message = '\nDEPRECATED: ' + message Wrapper.__doc__ += deprecation_message return Wrapper + return Decorator @@ -41,4 +58,130 @@ def Wrapper(*args, **kwargs): with warnings.catch_warnings(): warnings.filterwarnings('ignore', category=DeprecationWarning) return func(*args, **kwargs) + return Wrapper + + +@dataclasses.dataclass +class _DeprecatedAsset: + """Class for keeping track of a single deprecated asset.""" + + id: str + replacement_id: Optional[str] + removal_date: Optional[datetime.datetime] + learn_more_url: str + + has_warning_been_issued: bool = False + + @classmethod + def _ParseDateString(cls, date_str: str) -> datetime.datetime: + return datetime.datetime.fromisoformat(date_str) + + @classmethod + def FromStacLink(cls, stac_link: Dict[str, Any]) -> _DeprecatedAsset: + removal_date = stac_link.get('gee:removal_date') + if removal_date: + removal_date = cls._ParseDateString(removal_date) + return _DeprecatedAsset( + id=stac_link['title'], + replacement_id=stac_link.get('gee:replacement_id'), + removal_date=removal_date, + learn_more_url=stac_link.get('gee:learn_more_url'), + ) + + +def WarnForDeprecatedAsset(arg_name: str) -> Callable[..., Any]: + """Decorator to warn on usage of deprecated assets. + + Args: + arg_name: The name of the argument to check for asset deprecation. + + Returns: + The decorated function which checks for asset deprecation. + """ + + def Decorator(func: Callable[..., Any]): + @functools.wraps(func) + def Wrapper(*args, **kwargs) -> Callable[..., Any]: + argspec = inspect.getfullargspec(func) + index = argspec.args.index(arg_name) + if kwargs.get(arg_name): + asset_name_object = kwargs[arg_name] + elif index < len(args): + asset_name_object = args[index] + else: + asset_name_object = None + asset_name = _GetStringFromObject(asset_name_object) + if asset_name: + asset = (deprecated_assets or {}).get(asset_name) + if asset: + _IssueAssetDeprecationWarning(asset) + return func(*args, **kwargs) + + return Wrapper + + return Decorator + + +def InitializeDeprecatedAssets() -> None: + global deprecated_assets + if deprecated_assets is not None: + return + _UnfilterDeprecationWarnings() + + deprecated_assets = {} + stac = _FetchDataCatalogStac() + for stac_link in stac.get('links', []): + if stac_link.get('deprecated', False): + asset = _DeprecatedAsset.FromStacLink(stac_link) + deprecated_assets[asset.id] = asset + + +def Reset() -> None: + global deprecated_assets + deprecated_assets = None + + +def _FetchDataCatalogStac() -> Dict[str, Any]: + try: + response = urllib.request.urlopen(_DEPRECATED_ASSETS_URL).read() + except (urllib.error.HTTPError, urllib.error.URLError): + return {} + return json.loads(response) + + +def _GetStringFromObject(obj: Any) -> Optional[str]: + if isinstance(obj, str): + return obj + return None + + +def _UnfilterDeprecationWarnings() -> None: + """Unfilters deprecation warnings for this module.""" + warnings.filterwarnings( + 'default', category=DeprecationWarning, module=__name__ + ) + + +def _IssueAssetDeprecationWarning(asset: _DeprecatedAsset) -> None: + """Issues a warning for a deprecated asset if one hasn't already been issued. + + Args: + asset: The asset. + """ + if asset.has_warning_been_issued: + return + asset.has_warning_been_issued = True + + warning = ( + f'\n\nAttention required for {asset.id}! You are using a deprecated' + ' asset.\nTo ensure continued functionality, please update it' + ) + if removal_date := asset.removal_date: + formatted_date = removal_date.strftime('%B %-d, %Y') + warning = warning + f' by {formatted_date}.' + else: + warning = warning + '.' + if asset.learn_more_url: + warning = warning + f'\nLearn more: {asset.learn_more_url}\n' + warnings.warn(warning, category=DeprecationWarning) diff --git a/python/ee/dictionary.py b/python/ee/dictionary.py index 2514e645f..3d95b1094 100644 --- a/python/ee/dictionary.py +++ b/python/ee/dictionary.py @@ -1,5 +1,5 @@ """A wrapper for dictionaries.""" - +from __future__ import annotations from typing import Any, Dict, Optional, Sequence, Union @@ -7,6 +7,10 @@ from ee import apifunction from ee import computedobject +_DictType = Union[ + Dict[Any, Any], Sequence[Any], 'Dictionary', computedobject.ComputedObject +] + class Dictionary(computedobject.ComputedObject): """An object to represent dictionaries.""" @@ -18,12 +22,7 @@ class Dictionary(computedobject.ComputedObject): # Tell pytype to not complain about dynamic attributes. _HAS_DYNAMIC_ATTRIBUTES = True - def __init__( - self, - arg: Optional[ - Union[Dict[Any, Any], Sequence[Any], computedobject.ComputedObject] - ] = None, - ): + def __init__(self, arg: Optional[_DictType] = None): """Construct a dictionary. Args: diff --git a/python/ee/ee_array.py b/python/ee/ee_array.py index 9007d49f6..93a532740 100644 --- a/python/ee/ee_array.py +++ b/python/ee/ee_array.py @@ -1,9 +1,17 @@ """A wrapper for Arrays.""" +from __future__ import annotations -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union from ee import apifunction from ee import computedobject +from ee import ee_list +from ee import ee_string + +_ArrayType = Union[ + Any, List[Any], 'Array', ee_list.List, computedobject.ComputedObject +] +_StringType = Union[str, ee_string.String, computedobject.ComputedObject] class Array(computedobject.ComputedObject): @@ -30,11 +38,9 @@ class Array(computedobject.ComputedObject): def __init__( self, - values: Optional[ - Union[Any, computedobject.ComputedObject] - ], + values: Optional[_ArrayType], # pylint: disable-next=invalid-name - pixelType: Optional[Union[str, computedobject.ComputedObject]] = None, + pixelType: Optional[_StringType] = None, ): """Creates an Array wrapper. diff --git a/python/ee/ee_date.py b/python/ee/ee_date.py index 3639f2c80..eea6441ad 100644 --- a/python/ee/ee_date.py +++ b/python/ee/ee_date.py @@ -1,4 +1,5 @@ """A wrapper for dates.""" +from __future__ import annotations import datetime import math @@ -7,9 +8,16 @@ from ee import _utils from ee import apifunction from ee import computedobject +from ee import ee_string from ee import ee_types as types from ee import serializer +# TODO: b/291072742 - Have a separate type when datetime.Datetime unavailable. +_DateType = Union[ + datetime.datetime, float, str, 'Date', computedobject.ComputedObject +] +_StringType = Union[str, ee_string.String, computedobject.ComputedObject] + class Date(computedobject.ComputedObject): """An object to represent dates.""" @@ -20,11 +28,7 @@ class Date(computedobject.ComputedObject): _HAS_DYNAMIC_ATTRIBUTES = True @_utils.accept_opt_prefix('opt_tz') - def __init__( - self, - date: Union[datetime.datetime, float, str, computedobject.ComputedObject], - tz: Optional[Union[str, computedobject.ComputedObject]] = None, - ): + def __init__(self, date: Union[_DateType], tz: Optional[_StringType] = None): """Construct a date. This sends all inputs (except another Date) through the Date function. diff --git a/python/ee/ee_list.py b/python/ee/ee_list.py index a8ef791ab..9a615d3fa 100644 --- a/python/ee/ee_list.py +++ b/python/ee/ee_list.py @@ -8,11 +8,15 @@ from ee import computedobject from ee import ee_exception +_EeListType = Union[ + ListType[Any], Tuple[Any, Any], computedobject.ComputedObject +] + class List(computedobject.ComputedObject): """An object to represent lists.""" _list: Optional[ - Union[ListType[Any], Tuple[Any, Any], computedobject.ComputedObject] + Union[ListType[Any], Tuple[Any, Any]] ] _initialized = False @@ -20,12 +24,7 @@ class List(computedobject.ComputedObject): # Tell pytype to not complain about dynamic attributes. _HAS_DYNAMIC_ATTRIBUTES = True - def __init__( - self, - arg: Optional[ - Union[ListType[Any], Tuple[Any, Any], computedobject.ComputedObject] - ], - ): + def __init__(self, arg: Optional[_EeListType]): """Construct a list wrapper. This constructor accepts the following args: diff --git a/python/ee/ee_number.py b/python/ee/ee_number.py index 9e98c3143..648ded25a 100644 --- a/python/ee/ee_number.py +++ b/python/ee/ee_number.py @@ -1,4 +1,5 @@ """A wrapper for numbers.""" +from __future__ import annotations from typing import Any, Optional, Union @@ -8,20 +9,20 @@ from ee import computedobject from ee import ee_exception +_NumberType = Union[float, 'Number', computedobject.ComputedObject] + class Number(computedobject.ComputedObject): """An object to represent numbers.""" - _number: Optional[Union[float, computedobject.ComputedObject]] + _number: Optional[float] _initialized = False # Tell pytype to not complain about dynamic attributes. _HAS_DYNAMIC_ATTRIBUTES = True - def __init__( - self, number: Union[float, computedobject.ComputedObject] - ): + def __init__(self, number: _NumberType): """Construct a number wrapper. This constructor accepts the following args: diff --git a/python/ee/ee_string.py b/python/ee/ee_string.py index ce4f4412b..6c970b7de 100644 --- a/python/ee/ee_string.py +++ b/python/ee/ee_string.py @@ -1,26 +1,30 @@ """A wrapper for strings.""" +from __future__ import annotations -from typing import Any, Union +from typing import Any, Optional, Union from ee import _utils from ee import apifunction from ee import computedobject from ee import ee_exception +from ee import ee_list +from ee import ee_number + +_IntegerType = Union[int, ee_number.Number, computedobject.ComputedObject] +_StringType = Union[str, 'String', computedobject.ComputedObject] class String(computedobject.ComputedObject): """An object to represent strings.""" - _string: Union[str, computedobject.ComputedObject] + _string: Optional[str] _initialized = False # Tell pytype to not complain about dynamic attributes. _HAS_DYNAMIC_ATTRIBUTES = True - def __init__( - self, string: Union[str, computedobject.ComputedObject] - ): + def __init__(self, string: _StringType): """Construct a string wrapper. This constructor accepts the following args: @@ -34,6 +38,8 @@ def __init__( if isinstance(string, str): super().__init__(None, None) + self._string = string + elif isinstance(string, computedobject.ComputedObject): if self.is_func_returning_same(string): # If it's a call that's already returning a String, just cast. @@ -42,10 +48,10 @@ def __init__( super().__init__( apifunction.ApiFunction(self.name()), {'input': string} ) + self._string = None else: raise ee_exception.EEException( 'Invalid argument specified for ee.String(): %s' % string) - self._string = string @classmethod def initialize(cls) -> None: @@ -69,11 +75,183 @@ def encode(self, encoder: Any = None) -> Any: if isinstance(self._string, str): return self._string else: - return self._string.encode(encoder) + return super().encode(encoder) @_utils.accept_opt_prefix('opt_encoder') def encode_cloud_value(self, encoder: Any = None) -> Any: if isinstance(self._string, str): return {'constantValue': self._string} else: - return self._string.encode_cloud_value(encoder) + return super().encode_cloud_value(encoder) + + def cat(self, string2: _StringType) -> 'String': + """Concatenates two strings. + + Args: + string2: The second string. + + Returns: + Returns the result of joining self and string2. + """ + + return apifunction.ApiFunction.call_(self.name() + '.cat', self, string2) + + def compareTo(self, string2: _StringType) -> ee_number.Number: + """Compares two strings lexicographically. + + Args: + string2: The string to be compared. + + Returns: + 0 if the two strings are lexicographically equal; + -1 if string1 is less than string2; and + 1 if string1 is greater than string2. + """ + + return apifunction.ApiFunction.call_( + self.name() + '.compareTo', self, string2 + ) + + def decodeJSON(self) -> computedobject.ComputedObject: + """Decodes self as a JSON string.""" + + return apifunction.ApiFunction.call_(self.name() + '.decodeJSON', self) + + def equals( + self, target: _StringType + ) -> computedobject.ComputedObject: + """Checks for string equality with a given object. + + Args: + target: The second object to check for equality. + + Returns: + True if the target is a string and is lexicographically equal to the + reference, or false otherwise. + """ + + return apifunction.ApiFunction.call_(self.name() + '.equals', self, target) + + def index(self, pattern: _StringType) -> ee_number.Number: + """Searches a string for the first occurrence of a substring. + + Args: + pattern: The string to find. + + Returns: + The index of the first match, or -1. + """ + + return apifunction.ApiFunction.call_(self.name() + '.index', self, pattern) + + def length(self) -> ee_number.Number: + """Returns the length of a string.""" + + return apifunction.ApiFunction.call_(self.name() + '.length', self) + + def match( + self, regex: _StringType, flags: Optional[_StringType] = None + ) -> ee_list.List: + """Matches a string against a regular expression. + + Args: + regex: The regular expression to match. + flags: A string specifying a combination of regular expression flags, + specifically one or more of: 'g' (global match) or 'i' (ignore case) + + Returns: + A list of matching strings. + """ + + return apifunction.ApiFunction.call_( + self.name() + '.match', self, regex, flags + ) + + def replace( + self, + regex: _StringType, + replacement: _StringType, + flags: Optional[_StringType] = None, + ) -> 'String': + """Returns a string with some or all matches of a pattern replaced. + + Args: + regex: The regular expression to match. + replacement: The string that replaces the matched substring. + flags: A string specifying a combination of regular expression flags, + specifically one or more of: 'g' (global match) or 'i' (ignore case). + + Returns: + A string with the replacements. + """ + + return apifunction.ApiFunction.call_( + self.name() + '.replace', self, regex, replacement, flags + ) + + def rindex(self, pattern: _StringType) -> ee_number.Number: + """Searches a string for the last occurrence of a substring. + + Args: + pattern: The string to find. + + Returns: + The index of the first match or -1 if no match. + """ + + return apifunction.ApiFunction.call_(self.name() + '.rindex', self, pattern) + + def slice( + self, start: _IntegerType, end: Optional[_IntegerType] = None + ) -> 'String': + """Returns a substring of the given string. + + If the specified range exceeds the length of the string, returns a shorter + substring. + + Args: + start: The beginning index, inclusive. Negative numbers count backwards + from the end of the string. + end: The ending index, exclusive. Defaults to the length of the string. + Negative numbers count backwards from the end of the string. + + Returns: + The requested portion of the string. + """ + + return apifunction.ApiFunction.call_( + self.name() + '.slice', self, start, end + ) + + def split( + self, regex: _StringType, flags: Optional[_StringType] = None + ) -> ee_list.List: + """Splits a string on a regular expression into a list of strings. + + Args: + regex: A regular expression to split on. If regex is the empty string, + then the input string is split into individual characters. + flags: A string specifying the regular expression flag: 'i' (ignore case) + + Returns: + A list of strings. + """ + + return apifunction.ApiFunction.call_( + self.name() + '.split', self, regex, flags + ) + + def toLowerCase(self) -> 'String': + """Converts all of the characters in a string to lower case.""" + + return apifunction.ApiFunction.call_(self.name() + '.toLowerCase', self) + + def toUpperCase(self) -> 'String': + """Converts all of the characters in a string to upper case.""" + + return apifunction.ApiFunction.call_(self.name() + '.toUpperCase', self) + + def trim(self) -> 'String': + """Returns a string with any leading and trailing whitespace removed.""" + + return apifunction.ApiFunction.call_(self.name() + '.trim', self) diff --git a/python/ee/errormargin.py b/python/ee/errormargin.py index aa3408445..f30ac8f03 100644 --- a/python/ee/errormargin.py +++ b/python/ee/errormargin.py @@ -4,6 +4,11 @@ from ee import apifunction from ee import computedobject +from ee import ee_number +from ee import ee_string + +_NumberType = Union[float, ee_number.Number, computedobject.ComputedObject] +_StringType = Union[str, ee_string.String, computedobject.ComputedObject] class ErrorMargin(computedobject.ComputedObject): @@ -34,8 +39,8 @@ class ErrorMargin(computedobject.ComputedObject): def __init__( self, - value: Optional[Union[float, computedobject.ComputedObject]] = None, - unit: Optional[Union[str, computedobject.ComputedObject]] = None, + value: Optional[_NumberType] = None, + unit: Optional[_StringType] = None, ): """Creates a ErrorMargin wrapper. diff --git a/python/ee/pixeltype.py b/python/ee/pixeltype.py index 6319bcc13..d797d12ee 100644 --- a/python/ee/pixeltype.py +++ b/python/ee/pixeltype.py @@ -4,6 +4,12 @@ from ee import apifunction from ee import computedobject +from ee import ee_number +from ee import ee_string + +_IntegerType = Union[int, ee_number.Number, computedobject.ComputedObject] +_NumberType = Union[float, ee_number.Number, computedobject.ComputedObject] +_StringType = Union[str, ee_string.String, computedobject.ComputedObject] class PixelType(computedobject.ComputedObject): @@ -48,12 +54,12 @@ class PixelType(computedobject.ComputedObject): def __init__( self, - precision: Union[str, computedobject.ComputedObject], + precision: Union[_StringType], # pylint: disable=invalid-name - minValue: Optional[Union[float, computedobject.ComputedObject]] = None, - maxValue: Optional[Union[float, computedobject.ComputedObject]] = None, + minValue: Optional[_NumberType] = None, + maxValue: Optional[_NumberType] = None, # pylint: enable=invalid-name - dimensions: Optional[Union[int, computedobject.ComputedObject]] = None, + dimensions: Optional[_IntegerType] = None, ): """Creates a PixelType wrapper. diff --git a/python/ee/projection.py b/python/ee/projection.py index 867d1300c..fbe01f3c7 100644 --- a/python/ee/projection.py +++ b/python/ee/projection.py @@ -4,6 +4,12 @@ from ee import apifunction from ee import computedobject +from ee import ee_number +from ee import ee_string + +_NumberType = Union[float, ee_number.Number, computedobject.ComputedObject] +_NumberSequenceType = Union[Sequence[_NumberType]] +_StringType = Union[str, ee_string.String, computedobject.ComputedObject] class Projection(computedobject.ComputedObject): @@ -38,12 +44,10 @@ class Projection(computedobject.ComputedObject): def __init__( self, - crs: Union[str, computedobject.ComputedObject], - transform: Optional[ - Union[Sequence[float], computedobject.ComputedObject] - ] = None, + crs: _StringType, + transform: Optional[_NumberSequenceType] = None, # pylint: disable-next=invalid-name - transformWkt: Optional[Union[str, computedobject.ComputedObject]] = None, + transformWkt: Optional[_StringType] = None, ): """Creates a Projection wrapper. diff --git a/python/ee/tests/algorithms.json b/python/ee/tests/algorithms.json index 0b2ba68a4..50f2a99fa 100644 --- a/python/ee/tests/algorithms.json +++ b/python/ee/tests/algorithms.json @@ -3597,6 +3597,33 @@ "argumentName": "clusterer", "type": "Clusterer" }] + }, { + "name": "algorithms/Geometry.fromS2CellId", + "description": "Constructs the Polygon corresponding to an S2 cell id.", + "returnType": "Geometry", + "arguments": [{ + "argumentName": "cellId", + "type": "Long", + "description": "The S2 cell id as 64 bit integer. From Javascript, which does not support integers larger than 53 bits, use fromS2CellToken instead." + }] + }, { + "name": "algorithms/Geometry.s2Cell", + "description": "Constructs the Polygon corresponding to an S2 cell id.", + "returnType": "Geometry", + "arguments": [{ + "argumentName": "cellId", + "type": "Long", + "description": "The S2 cell id as 64 bit integer. From Javascript, which does not support integers larger than 53 bits, use fromS2CellToken instead." + }] + }, { + "name": "algorithms/Geometry.fromS2CellToken", + "description": "Constructs the Polygon corresponding to an S2 cell id as a hex string.", + "returnType": "Geometry", + "arguments": [{ + "argumentName": "cellToken", + "type": "String", + "description": "The S2 cell id as a hex string. Trailing zeros are required, e.g. the top level face containing Antarctica is 0xb000000000000000." + }] }, { "name": "algorithms/Geometry.coveringGrid", "description": "Returns a collection of features that cover this geometry, where each feature is a rectangle in the grid defined by the given projection.", @@ -5823,7 +5850,7 @@ }] }, { "name": "algorithms/Collection.randomColumn", - "description": "Adds a column of deterministic pseudorandom numbers to a collection. The outputs are double-precision floating point numbers. When using the \u0027uniform\u0027 distribution (default), outputs are in the range of [0, 1). Using the \u0027normal\u0027 distribution, outputs have μ\u003d0, 𝛔\u003d1, but have no explicit limits.", + "description": "Adds a column of deterministic pseudorandom numbers to a collection. The outputs are double-precision floating point numbers. When using the \u0027uniform\u0027 distribution (default), outputs are in the range of [0, 1). Using the \u0027normal\u0027 distribution, outputs have μ\u003d0, σ\u003d1, but have no explicit limits.", "returnType": "FeatureCollection", "arguments": [{ "argumentName": "collection", @@ -9407,7 +9434,7 @@ }] }, { "name": "algorithms/Image.random", - "description": "Generates a random number at each pixel location. When using the \u0027uniform\u0027 distribution, outputs are in the range of [0 to 1). Using the \u0027normal\u0027 distribution, the outputs have μ\u003d0, 𝛔\u003d1, but no explicit limits.", + "description": "Generates a random number at each pixel location. When using the \u0027uniform\u0027 distribution, outputs are in the range of [0 to 1). Using the \u0027normal\u0027 distribution, the outputs have μ\u003d0, σ\u003d1, but no explicit limits.", "returnType": "Image\u003cunknown bands\u003e", "arguments": [{ "argumentName": "seed", @@ -11834,7 +11861,7 @@ }] }, { "name": "algorithms/String.compareTo", - "description": "Compares two strings lexicographically. Returns: the value 0 if the two strings are lexicographically equal; a value less than 0 if string1 is less than string2; and a value greater than 0 if string1 is lexicographically greater than string2. ", + "description": "Compares two strings lexicographically. Returns: the value 0 if the two strings are lexicographically equal; -1 if string1 is less than string2; and 1 if string1 is lexicographically greater than string2.", "returnType": "Integer", "arguments": [{ "argumentName": "string1", diff --git a/python/ee/tests/ee_string_test.py b/python/ee/tests/ee_string_test.py index 7701818db..99f5b2f46 100644 --- a/python/ee/tests/ee_string_test.py +++ b/python/ee/tests/ee_string_test.py @@ -1,14 +1,25 @@ #!/usr/bin/env python3 """Test for the ee.string module.""" +import json +from typing import Any, Dict import ee from ee import apitestcase import unittest +def make_expression_graph( + function_invocation_value: Dict[str, Any] +) -> Dict[str, Any]: + return { + 'result': '0', + 'values': {'0': {'functionInvocationValue': function_invocation_value}}, + } + + class StringTest(apitestcase.ApiTestCase): - def testString(self): + def test_string(self): """Verifies basic behavior of ee.String.""" bare_string = ee.String('foo') self.assertEqual('foo', bare_string.encode()) @@ -28,7 +39,7 @@ def testString(self): self.assertEqual(ee.ApiFunction.lookup('String'), s.func) self.assertEqual({'input': obj}, s.args) - def testInternals(self): + def test_internals(self): """Test eq(), ne() and hash().""" a = ee.String('one') b = ee.String('two') @@ -40,6 +51,218 @@ def testInternals(self): self.assertNotEqual(b, c) self.assertNotEqual(hash(a), hash(b)) + def test_bad_arg(self): + message = r'Invalid argument specified for ee\.String\(\): 123' + with self.assertRaisesRegex(ee.EEException, message): + ee.String(123) # pytype: disable=wrong-arg-types + + def test_cat(self): + expect = make_expression_graph({ + 'arguments': { + 'string1': {'constantValue': 'foo'}, + 'string2': {'constantValue': 'bar'}, + }, + 'functionName': 'String.cat', + }) + expression = ee.String('foo').cat('bar') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + expression = ee.String('foo').cat(string2='bar') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_compare_to(self): + expect = make_expression_graph({ + 'arguments': { + 'string1': {'constantValue': 'a'}, + 'string2': {'constantValue': 'b'}, + }, + 'functionName': 'String.compareTo', + }) + expression = ee.String('a').compareTo('b') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + expression = ee.String('a').compareTo(string2='b') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_decode_json(self): + expect = make_expression_graph({ + 'arguments': {'string': {'constantValue': 'a'}}, + 'functionName': 'String.decodeJSON', + }) + expression = ee.String('a').decodeJSON() + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_equals(self): + expect = make_expression_graph({ + 'arguments': { + 'reference': {'constantValue': 'a'}, + 'target': {'constantValue': 'b'}, + }, + 'functionName': 'String.equals', + }) + expression = ee.String('a').equals('b') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + expression = ee.String('a').equals(target='b') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_index(self): + expect = make_expression_graph({ + 'functionName': 'String.index', + 'arguments': { + 'target': {'constantValue': 'abc'}, + 'pattern': {'constantValue': 'b'}, + }, + }) + expression = ee.String('abc').index('b') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + expression = ee.String('abc').index(pattern='b') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_length(self): + expect = make_expression_graph({ + 'functionName': 'String.length', + 'arguments': {'string': {'constantValue': 'abc'}}, + }) + expression = ee.String('abc').length() + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_match(self): + expect = make_expression_graph({ + 'functionName': 'String.match', + 'arguments': { + 'input': {'constantValue': 'abc'}, + 'regex': {'constantValue': 'bc'}, + }, + }) + expression = ee.String('abc').match('bc') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + expression = ee.String('abc').match(regex='bc') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_replace(self): + expect = make_expression_graph({ + 'functionName': 'String.replace', + 'arguments': { + 'input': {'constantValue': 'abc'}, + 'regex': {'constantValue': 'bc'}, + 'replacement': {'constantValue': '123'}, + }, + }) + expression = ee.String('abc').replace('bc', '123') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + expression = ee.String('abc').replace(regex='bc', replacement='123') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_rindex(self): + expect = make_expression_graph({ + 'functionName': 'String.rindex', + 'arguments': { + 'target': {'constantValue': 'abc'}, + 'pattern': {'constantValue': 'b'}, + }, + }) + expression = ee.String('abc').rindex('b') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + expression = ee.String('abc').rindex(pattern='b') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_slice(self): + expect = make_expression_graph({ + 'functionName': 'String.slice', + 'arguments': { + 'start': {'constantValue': -3}, + 'string': {'constantValue': 'abc'}, + }, + }) + expression = ee.String('abc').slice(-3) + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + expression = ee.String('abc').slice(start=-3) + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_slice2(self): + expect = make_expression_graph({ + 'functionName': 'String.slice', + 'arguments': { + 'string': {'constantValue': 'abc'}, + 'start': {'constantValue': 1}, + 'end': {'constantValue': 2}, + }, + }) + expression = ee.String('abc').slice(1, 2) + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + expression = ee.String('abc').slice(start=1, end=2) + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_split(self): + expect = make_expression_graph({ + 'functionName': 'String.split', + 'arguments': { + 'regex': {'constantValue': 'b'}, + 'string': {'constantValue': 'abc'}, + }, + }) + expression = ee.String('abc').split('b') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + expression = ee.String('abc').split(regex='b') + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_to_lower_case(self): + expect = make_expression_graph({ + 'functionName': 'String.toLowerCase', + 'arguments': {'string': {'constantValue': 'Abc'}}, + }) + expression = ee.String('Abc').toLowerCase() + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_to_upper_case(self): + expect = make_expression_graph({ + 'functionName': 'String.toUpperCase', + 'arguments': {'string': {'constantValue': 'Abc'}}, + }) + expression = ee.String('Abc').toUpperCase() + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + + def test_trim(self): + expect = make_expression_graph({ + 'functionName': 'String.trim', + 'arguments': {'string': {'constantValue': 'abc'}}, + }) + expression = ee.String('abc').trim() + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + if __name__ == '__main__': unittest.main() diff --git a/python/pyproject.toml b/python/pyproject.toml index 8eac61126..dc5e12593 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "earthengine-api" -version = "0.1.394" +version = "0.1.395" description = "Earth Engine Python API" requires-python = ">=3.7" keywords = [