forked from matiwinnetou/soyutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsoyutils_usegoog.min.js
1 lines (1 loc) · 21.6 KB
/
soyutils_usegoog.min.js
1
goog.provide("soy");goog.provide("soy.StringBuilder");goog.provide("soy.esc");goog.provide("soydata");goog.provide("soydata.SanitizedHtml");goog.provide("soydata.SanitizedHtmlAttribute");goog.provide("soydata.SanitizedJs");goog.provide("soydata.SanitizedJsStrChars");goog.provide("soydata.SanitizedUri");goog.provide("soydata.VERY_UNSAFE");goog.require("goog.asserts");goog.require("goog.dom.DomHelper");goog.require("goog.format");goog.require("goog.i18n.BidiFormatter");goog.require("goog.i18n.bidi");goog.require("goog.soy");goog.require("goog.soy.data.SanitizedContentKind");goog.require("goog.string");goog.require("goog.string.StringBuffer");soy.StringBuilder=goog.string.StringBuffer;soydata.SanitizedContentKind=goog.soy.data.SanitizedContentKind;soydata.isContentKind=function(a,b){return a!=null&&a.contentKind===b};soydata.getContentDir=function(a){if(a!=null){switch(a.contentDir){case goog.i18n.bidi.Dir.LTR:return goog.i18n.bidi.Dir.LTR;case goog.i18n.bidi.Dir.RTL:return goog.i18n.bidi.Dir.RTL;case goog.i18n.bidi.Dir.NEUTRAL:return goog.i18n.bidi.Dir.NEUTRAL}}return null};soydata.SanitizedHtml=function(){goog.soy.data.SanitizedContent.call(this)};goog.inherits(soydata.SanitizedHtml,goog.soy.data.SanitizedContent);soydata.SanitizedHtml.prototype.contentKind=soydata.SanitizedContentKind.HTML;soydata.SanitizedHtml.from=function(a){if(a!=null&&a.contentKind===soydata.SanitizedContentKind.HTML){goog.asserts.assert(a.constructor===soydata.SanitizedHtml);return(a)}return soydata.VERY_UNSAFE.ordainSanitizedHtml(soy.esc.$$escapeHtmlHelper(String(a)),soydata.getContentDir(a))};soydata.SanitizedJs=function(){goog.soy.data.SanitizedContent.call(this)};goog.inherits(soydata.SanitizedJs,goog.soy.data.SanitizedContent);soydata.SanitizedJs.prototype.contentKind=soydata.SanitizedContentKind.JS;soydata.SanitizedJs.prototype.contentDir=goog.i18n.bidi.Dir.LTR;soydata.SanitizedJsStrChars=function(){goog.soy.data.SanitizedContent.call(this)};goog.inherits(soydata.SanitizedJsStrChars,goog.soy.data.SanitizedContent);soydata.SanitizedJsStrChars.prototype.contentKind=soydata.SanitizedContentKind.JS_STR_CHARS;soydata.SanitizedUri=function(){goog.soy.data.SanitizedContent.call(this)};goog.inherits(soydata.SanitizedUri,goog.soy.data.SanitizedContent);soydata.SanitizedUri.prototype.contentKind=soydata.SanitizedContentKind.URI;soydata.SanitizedUri.prototype.contentDir=goog.i18n.bidi.Dir.LTR;soydata.SanitizedHtmlAttribute=function(){goog.soy.data.SanitizedContent.call(this)};goog.inherits(soydata.SanitizedHtmlAttribute,goog.soy.data.SanitizedContent);soydata.SanitizedHtmlAttribute.prototype.contentKind=soydata.SanitizedContentKind.ATTRIBUTES;soydata.SanitizedHtmlAttribute.prototype.contentDir=goog.i18n.bidi.Dir.LTR;soydata.SanitizedCss=function(){goog.soy.data.SanitizedContent.call(this)};goog.inherits(soydata.SanitizedCss,goog.soy.data.SanitizedContent);soydata.SanitizedCss.prototype.contentKind=soydata.SanitizedContentKind.CSS;soydata.SanitizedCss.prototype.contentDir=goog.i18n.bidi.Dir.LTR;soydata.UnsanitizedText=function(a,b){this.content=String(a);this.contentDir=b!=null?b:null};goog.inherits(soydata.UnsanitizedText,goog.soy.data.SanitizedContent);soydata.UnsanitizedText.prototype.contentKind=soydata.SanitizedContentKind.TEXT;soydata.$$EMPTY_STRING_={VALUE:""};soydata.$$makeSanitizedContentFactory_=function(b){function a(){}a.prototype=b.prototype;function c(e,f){var d=new a();d.content=String(e);if(f!==undefined){d.contentDir=f}return d}return c};soydata.$$makeSanitizedContentFactoryWithDefaultDirOnly_=function(b){function a(){}a.prototype=b.prototype;function c(e){var d=new a();d.content=String(e);return d}return c};soydata.markUnsanitizedText=function(a,b){return new soydata.UnsanitizedText(a,b)};soydata.VERY_UNSAFE.ordainSanitizedHtml=soydata.$$makeSanitizedContentFactory_(soydata.SanitizedHtml);soydata.VERY_UNSAFE.ordainSanitizedJs=soydata.$$makeSanitizedContentFactoryWithDefaultDirOnly_(soydata.SanitizedJs);soydata.VERY_UNSAFE.ordainSanitizedJsStrChars=soydata.$$makeSanitizedContentFactory_(soydata.SanitizedJsStrChars);soydata.VERY_UNSAFE.ordainSanitizedUri=soydata.$$makeSanitizedContentFactoryWithDefaultDirOnly_(soydata.SanitizedUri);soydata.VERY_UNSAFE.ordainSanitizedHtmlAttribute=soydata.$$makeSanitizedContentFactoryWithDefaultDirOnly_(soydata.SanitizedHtmlAttribute);soydata.VERY_UNSAFE.ordainSanitizedCss=soydata.$$makeSanitizedContentFactoryWithDefaultDirOnly_(soydata.SanitizedCss);soy.renderElement=goog.soy.renderElement;soy.renderAsFragment=function(d,b,a,c){return goog.soy.renderAsFragment(d,b,c,new goog.dom.DomHelper(a))};soy.renderAsElement=function(d,b,a,c){return goog.soy.renderAsElement(d,b,c,new goog.dom.DomHelper(a))};soy.$$IS_LOCALE_RTL=goog.i18n.bidi.IS_RTL;soy.$$augmentMap=function(a,d){function e(){}e.prototype=a;var b=new e();for(var c in d){b[c]=d[c]}return b};soy.$$checkMapKey=function(a){if((typeof a)!="string"){throw Error("Map literal's key expression must evaluate to string (encountered type \""+(typeof a)+'").')}return a};soy.$$getMapKeys=function(c){var b=[];for(var a in c){b.push(a)}return b};soy.$$getDelTemplateId=function(a){return a};soy.$$DELEGATE_REGISTRY_PRIORITIES_={};soy.$$DELEGATE_REGISTRY_FUNCTIONS_={};soy.$$registerDelegateFn=function(f,c,d,b){var e="key_"+f+":"+c;var a=soy.$$DELEGATE_REGISTRY_PRIORITIES_[e];if(a===undefined||d>a){soy.$$DELEGATE_REGISTRY_PRIORITIES_[e]=d;soy.$$DELEGATE_REGISTRY_FUNCTIONS_[e]=b}else{if(d==a){throw Error('Encountered two active delegates with the same priority ("'+f+":"+c+'").')}else{}}};soy.$$getDelegateFn=function(c,b,d){var a=soy.$$DELEGATE_REGISTRY_FUNCTIONS_["key_"+c+":"+b];if(!a&&b!=""){a=soy.$$DELEGATE_REGISTRY_FUNCTIONS_["key_"+c+":"]}if(a){return a}else{if(d){return soy.$$EMPTY_TEMPLATE_FN_}else{throw Error('Found no active impl for delegate call to "'+c+":"+b+'" (and not allowemptydefault="true").')}}};soy.$$EMPTY_TEMPLATE_FN_=function(a,c,b){return""};soydata.$$makeSanitizedContentFactoryForInternalBlocks_=function(b){function a(){}a.prototype=b.prototype;function c(e,f){var g=String(e);if(!g){return soydata.$$EMPTY_STRING_.VALUE}var d=new a();d.content=String(e);if(f!==undefined){d.contentDir=f}return d}return c};soydata.$$makeSanitizedContentFactoryWithDefaultDirOnlyForInternalBlocks_=function(b){function a(){}a.prototype=b.prototype;function c(e){var f=String(e);if(!f){return soydata.$$EMPTY_STRING_.VALUE}var d=new a();d.content=String(e);return d}return c};soydata.$$markUnsanitizedTextForInternalBlocks=function(a,b){var c=String(a);if(!c){return soydata.$$EMPTY_STRING_.VALUE}return new soydata.UnsanitizedText(c,b)};soydata.VERY_UNSAFE.$$ordainSanitizedHtmlForInternalBlocks=soydata.$$makeSanitizedContentFactoryForInternalBlocks_(soydata.SanitizedHtml);soydata.VERY_UNSAFE.$$ordainSanitizedJsForInternalBlocks=soydata.$$makeSanitizedContentFactoryWithDefaultDirOnlyForInternalBlocks_(soydata.SanitizedJs);soydata.VERY_UNSAFE.$$ordainSanitizedUriForInternalBlocks=soydata.$$makeSanitizedContentFactoryWithDefaultDirOnlyForInternalBlocks_(soydata.SanitizedUri);soydata.VERY_UNSAFE.$$ordainSanitizedAttributesForInternalBlocks=soydata.$$makeSanitizedContentFactoryWithDefaultDirOnlyForInternalBlocks_(soydata.SanitizedHtmlAttribute);soydata.VERY_UNSAFE.$$ordainSanitizedCssForInternalBlocks=soydata.$$makeSanitizedContentFactoryWithDefaultDirOnlyForInternalBlocks_(soydata.SanitizedCss);soy.$$escapeHtml=function(a){return soydata.SanitizedHtml.from(a)};soy.$$cleanHtml=function(a){if(soydata.isContentKind(a,soydata.SanitizedContentKind.HTML)){goog.asserts.assert(a.constructor===soydata.SanitizedHtml);return(a)}return soydata.VERY_UNSAFE.ordainSanitizedHtml(soy.$$stripHtmlTags(a,soy.esc.$$SAFE_TAG_WHITELIST_),soydata.getContentDir(a))};soy.$$escapeHtmlRcdata=function(a){if(soydata.isContentKind(a,soydata.SanitizedContentKind.HTML)){goog.asserts.assert(a.constructor===soydata.SanitizedHtml);return soy.esc.$$normalizeHtmlHelper(a.content)}return soy.esc.$$escapeHtmlHelper(a)};soy.$$HTML5_VOID_ELEMENTS_=new RegExp("^<(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)\\b");soy.$$stripHtmlTags=function(d,c){if(!c){return String(d).replace(soy.esc.$$HTML_TAG_REGEX_,"").replace(soy.esc.$$LT_REGEX_,"<")}var b=String(d).replace(/\[/g,"[");var a=[];b=b.replace(soy.esc.$$HTML_TAG_REGEX_,function(f,h){if(h){h=h.toLowerCase();if(c.hasOwnProperty(h)&&c[h]){var i=f.charAt(1)==="/"?"</":"<";var g=a.length;a[g]=i+h+">";return"["+g+"]"}}return""});b=soy.esc.$$normalizeHtmlHelper(b);var e=soy.$$balanceTags_(a);b=b.replace(/\[(\d+)\]/g,function(g,f){return a[f]});return b+e};soy.$$balanceTags_=function(c){var b=[];for(var d=0,f=c.length;d<f;++d){var a=c[d];if(a.charAt(1)==="/"){var e=b.length-1;while(e>=0&&b[e]!=a){e--}if(e<0){c[d]=""}else{c[d]=b.slice(e).reverse().join("");b.length=e}}else{if(!soy.$$HTML5_VOID_ELEMENTS_.test(a)){b.push("</"+a.substring(1))}}}return b.reverse().join("")};soy.$$escapeHtmlAttribute=function(a){if(soydata.isContentKind(a,soydata.SanitizedContentKind.HTML)){goog.asserts.assert(a.constructor===soydata.SanitizedHtml);return soy.esc.$$normalizeHtmlHelper(soy.$$stripHtmlTags(a.content))}return soy.esc.$$escapeHtmlHelper(a)};soy.$$escapeHtmlAttributeNospace=function(a){if(soydata.isContentKind(a,soydata.SanitizedContentKind.HTML)){goog.asserts.assert(a.constructor===soydata.SanitizedHtml);return soy.esc.$$normalizeHtmlNospaceHelper(soy.$$stripHtmlTags(a.content))}return soy.esc.$$escapeHtmlNospaceHelper(a)};soy.$$filterHtmlAttributes=function(a){if(soydata.isContentKind(a,soydata.SanitizedContentKind.ATTRIBUTES)){goog.asserts.assert(a.constructor===soydata.SanitizedHtmlAttribute);return a.content.replace(/([^"'\s])$/,"$1 ")}return soy.esc.$$filterHtmlAttributesHelper(a)};soy.$$filterHtmlElementName=function(a){return soy.esc.$$filterHtmlElementNameHelper(a)};soy.$$escapeJs=function(a){return soy.$$escapeJsString(a)};soy.$$escapeJsString=function(a){if(soydata.isContentKind(a,soydata.SanitizedContentKind.JS_STR_CHARS)){goog.asserts.assert(a.constructor===soydata.SanitizedJsStrChars);return a.content}return soy.esc.$$escapeJsStringHelper(a)};soy.$$escapeJsValue=function(a){if(a==null){return" null "}if(soydata.isContentKind(a,soydata.SanitizedContentKind.JS)){goog.asserts.assert(a.constructor===soydata.SanitizedJs);return a.content}switch(typeof a){case"boolean":case"number":return" "+a+" ";default:return"'"+soy.esc.$$escapeJsStringHelper(String(a))+"'"}};soy.$$escapeJsRegex=function(a){return soy.esc.$$escapeJsRegexHelper(a)};soy.$$problematicUriMarks_=/['()]/g;soy.$$pctEncode_=function(a){return"%"+a.charCodeAt(0).toString(16)};soy.$$escapeUri=function(a){if(soydata.isContentKind(a,soydata.SanitizedContentKind.URI)){goog.asserts.assert(a.constructor===soydata.SanitizedUri);return soy.$$normalizeUri(a)}var b=soy.esc.$$escapeUriHelper(a);soy.$$problematicUriMarks_.lastIndex=0;if(soy.$$problematicUriMarks_.test(b)){return b.replace(soy.$$problematicUriMarks_,soy.$$pctEncode_)}return b};soy.$$normalizeUri=function(a){return soy.esc.$$normalizeUriHelper(a)};soy.$$filterNormalizeUri=function(a){if(soydata.isContentKind(a,soydata.SanitizedContentKind.URI)){goog.asserts.assert(a.constructor===soydata.SanitizedUri);return soy.$$normalizeUri(a)}return soy.esc.$$filterNormalizeUriHelper(a)};soy.$$filterImageDataUri=function(a){return soydata.VERY_UNSAFE.ordainSanitizedUri(soy.esc.$$filterImageDataUriHelper(a))};soy.$$escapeCssString=function(a){return soy.esc.$$escapeCssStringHelper(a)};soy.$$filterCssValue=function(a){if(soydata.isContentKind(a,soydata.SanitizedContentKind.CSS)){goog.asserts.assert(a.constructor===soydata.SanitizedCss);return a.content}if(a==null){return""}return soy.esc.$$filterCssValueHelper(a)};soy.$$filterNoAutoescape=function(a){if(soydata.isContentKind(a,soydata.SanitizedContentKind.TEXT)){goog.asserts.fail("Tainted SanitizedContentKind.TEXT for |noAutoescape: `%s`",[a.content]);return"zSoyz"}return a};soy.$$changeNewlineToBr=function(b){var a=goog.string.newLineToBr(String(b),false);if(soydata.isContentKind(b,soydata.SanitizedContentKind.HTML)){return soydata.VERY_UNSAFE.ordainSanitizedHtml(a,soydata.getContentDir(b))}return a};soy.$$insertWordBreaks=function(c,b){var a=goog.format.insertWordBreaks(String(c),b);if(soydata.isContentKind(c,soydata.SanitizedContentKind.HTML)){return soydata.VERY_UNSAFE.ordainSanitizedHtml(a,soydata.getContentDir(c))}return a};soy.$$truncate=function(c,a,b){c=String(c);if(c.length<=a){return c}if(b){if(a>3){a-=3}else{b=false}}if(soy.$$isHighSurrogate_(c.charAt(a-1))&&soy.$$isLowSurrogate_(c.charAt(a))){a-=1}c=c.substring(0,a);if(b){c+="..."}return c};soy.$$isHighSurrogate_=function(a){return 55296<=a&&a<=56319};soy.$$isLowSurrogate_=function(a){return 56320<=a&&a<=57343};soy.$$bidiFormatterCache_={};soy.$$getBidiFormatterInstance_=function(a){return soy.$$bidiFormatterCache_[a]||(soy.$$bidiFormatterCache_[a]=new goog.i18n.BidiFormatter(a))};soy.$$bidiTextDir=function(d,a){var c=soydata.getContentDir(d);if(c!=null){return c}var b=a||soydata.isContentKind(d,soydata.SanitizedContentKind.HTML);return goog.i18n.bidi.estimateDirection(d+"",b)};soy.$$bidiDirAttr=function(b,f,a){var c=soy.$$getBidiFormatterInstance_(b);var e=soydata.getContentDir(f);if(e==null){var d=a||soydata.isContentKind(f,soydata.SanitizedContentKind.HTML);e=goog.i18n.bidi.estimateDirection(f+"",d)}return soydata.VERY_UNSAFE.ordainSanitizedHtmlAttribute(c.knownDirAttr(e))};soy.$$bidiMarkAfter=function(b,e,a){var c=soy.$$getBidiFormatterInstance_(b);var d=a||soydata.isContentKind(e,soydata.SanitizedContentKind.HTML);return c.markAfterKnownDir(soydata.getContentDir(e),e+"",d)};soy.$$bidiSpanWrap=function(a,d){var c=soy.$$getBidiFormatterInstance_(a);var b=c.spanWrapWithKnownDir(soydata.getContentDir(d),d+"",true);return b};soy.$$bidiUnicodeWrap=function(a,f){var c=soy.$$getBidiFormatterInstance_(a);var d=soydata.isContentKind(f,soydata.SanitizedContentKind.HTML);var b=c.unicodeWrapWithKnownDir(soydata.getContentDir(f),f+"",d);var e=c.getContextDir();if(soydata.isContentKind(f,soydata.SanitizedContentKind.TEXT)){return new soydata.UnsanitizedText(b,e)}if(d){return soydata.VERY_UNSAFE.ordainSanitizedHtml(b,e)}if(soydata.isContentKind(f,soydata.SanitizedContentKind.JS_STR_CHARS)){return soydata.VERY_UNSAFE.ordainSanitizedJsStrChars(b,e)}return b};soy.esc.$$escapeUriHelper=function(a){return goog.string.urlEncode(String(a))};soy.esc.$$ESCAPE_MAP_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_={"\x00":"\x26#0;","\x22":"\x26quot;","\x26":"\x26amp;","\x27":"\x26#39;","\x3c":"\x26lt;","\x3e":"\x26gt;","\x09":"\x26#9;","\x0a":"\x26#10;","\x0b":"\x26#11;","\x0c":"\x26#12;","\x0d":"\x26#13;"," ":"\x26#32;","-":"\x26#45;","/":"\x26#47;","\x3d":"\x26#61;","`":"\x26#96;","\x85":"\x26#133;","\xa0":"\x26#160;","\u2028":"\x26#8232;","\u2029":"\x26#8233;"};soy.esc.$$REPLACER_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_=function(a){return soy.esc.$$ESCAPE_MAP_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_[a]};soy.esc.$$ESCAPE_MAP_FOR_ESCAPE_JS_STRING__AND__ESCAPE_JS_REGEX_={"\x00":"\\x00","\x08":"\\x08","\x09":"\\t","\x0a":"\\n","\x0b":"\\x0b","\x0c":"\\f","\x0d":"\\r","\x22":"\\x22","\x26":"\\x26","\x27":"\\x27","/":"\\/","\x3c":"\\x3c","\x3d":"\\x3d","\x3e":"\\x3e","\\":"\\\\","\x85":"\\x85","\u2028":"\\u2028","\u2029":"\\u2029","$":"\\x24","(":"\\x28",")":"\\x29","*":"\\x2a","+":"\\x2b",",":"\\x2c","-":"\\x2d",".":"\\x2e",":":"\\x3a","?":"\\x3f","[":"\\x5b","]":"\\x5d","^":"\\x5e","{":"\\x7b","|":"\\x7c","}":"\\x7d"};soy.esc.$$REPLACER_FOR_ESCAPE_JS_STRING__AND__ESCAPE_JS_REGEX_=function(a){return soy.esc.$$ESCAPE_MAP_FOR_ESCAPE_JS_STRING__AND__ESCAPE_JS_REGEX_[a]};soy.esc.$$ESCAPE_MAP_FOR_ESCAPE_CSS_STRING_={"\x00":"\\0 ","\x08":"\\8 ","\x09":"\\9 ","\x0a":"\\a ","\x0b":"\\b ","\x0c":"\\c ","\x0d":"\\d ","\x22":"\\22 ","\x26":"\\26 ","\x27":"\\27 ","(":"\\28 ",")":"\\29 ","*":"\\2a ","/":"\\2f ",":":"\\3a ",";":"\\3b ","\x3c":"\\3c ","\x3d":"\\3d ","\x3e":"\\3e ","@":"\\40 ","\\":"\\5c ","{":"\\7b ","}":"\\7d ","\x85":"\\85 ","\xa0":"\\a0 ","\u2028":"\\2028 ","\u2029":"\\2029 "};soy.esc.$$REPLACER_FOR_ESCAPE_CSS_STRING_=function(a){return soy.esc.$$ESCAPE_MAP_FOR_ESCAPE_CSS_STRING_[a]};soy.esc.$$ESCAPE_MAP_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_={"\x00":"%00","\x01":"%01","\x02":"%02","\x03":"%03","\x04":"%04","\x05":"%05","\x06":"%06","\x07":"%07","\x08":"%08","\x09":"%09","\x0a":"%0A","\x0b":"%0B","\x0c":"%0C","\x0d":"%0D","\x0e":"%0E","\x0f":"%0F","\x10":"%10","\x11":"%11","\x12":"%12","\x13":"%13","\x14":"%14","\x15":"%15","\x16":"%16","\x17":"%17","\x18":"%18","\x19":"%19","\x1a":"%1A","\x1b":"%1B","\x1c":"%1C","\x1d":"%1D","\x1e":"%1E","\x1f":"%1F"," ":"%20","\x22":"%22","\x27":"%27","(":"%28",")":"%29","\x3c":"%3C","\x3e":"%3E","\\":"%5C","{":"%7B","}":"%7D","\x7f":"%7F","\x85":"%C2%85","\xa0":"%C2%A0","\u2028":"%E2%80%A8","\u2029":"%E2%80%A9","\uff01":"%EF%BC%81","\uff03":"%EF%BC%83","\uff04":"%EF%BC%84","\uff06":"%EF%BC%86","\uff07":"%EF%BC%87","\uff08":"%EF%BC%88","\uff09":"%EF%BC%89","\uff0a":"%EF%BC%8A","\uff0b":"%EF%BC%8B","\uff0c":"%EF%BC%8C","\uff0f":"%EF%BC%8F","\uff1a":"%EF%BC%9A","\uff1b":"%EF%BC%9B","\uff1d":"%EF%BC%9D","\uff1f":"%EF%BC%9F","\uff20":"%EF%BC%A0","\uff3b":"%EF%BC%BB","\uff3d":"%EF%BC%BD"};soy.esc.$$REPLACER_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_=function(a){return soy.esc.$$ESCAPE_MAP_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_[a]};soy.esc.$$MATCHER_FOR_ESCAPE_HTML_=/[\x00\x22\x26\x27\x3c\x3e]/g;soy.esc.$$MATCHER_FOR_NORMALIZE_HTML_=/[\x00\x22\x27\x3c\x3e]/g;soy.esc.$$MATCHER_FOR_ESCAPE_HTML_NOSPACE_=/[\x00\x09-\x0d \x22\x26\x27\x2d\/\x3c-\x3e`\x85\xa0\u2028\u2029]/g;soy.esc.$$MATCHER_FOR_NORMALIZE_HTML_NOSPACE_=/[\x00\x09-\x0d \x22\x27\x2d\/\x3c-\x3e`\x85\xa0\u2028\u2029]/g;soy.esc.$$MATCHER_FOR_ESCAPE_JS_STRING_=/[\x00\x08-\x0d\x22\x26\x27\/\x3c-\x3e\\\x85\u2028\u2029]/g;soy.esc.$$MATCHER_FOR_ESCAPE_JS_REGEX_=/[\x00\x08-\x0d\x22\x24\x26-\/\x3a\x3c-\x3f\x5b-\x5e\x7b-\x7d\x85\u2028\u2029]/g;soy.esc.$$MATCHER_FOR_ESCAPE_CSS_STRING_=/[\x00\x08-\x0d\x22\x26-\x2a\/\x3a-\x3e@\\\x7b\x7d\x85\xa0\u2028\u2029]/g;soy.esc.$$MATCHER_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_=/[\x00- \x22\x27-\x29\x3c\x3e\\\x7b\x7d\x7f\x85\xa0\u2028\u2029\uff01\uff03\uff04\uff06-\uff0c\uff0f\uff1a\uff1b\uff1d\uff1f\uff20\uff3b\uff3d]/g;soy.esc.$$FILTER_FOR_FILTER_CSS_VALUE_=/^(?!-*(?:expression|(?:moz-)?binding))(?:[.#]?-?(?:[_a-z0-9-]+)(?:-[_a-z0-9-]+)*-?|-?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[a-z]{1,2}|%)?|!important|)$/i;soy.esc.$$FILTER_FOR_FILTER_NORMALIZE_URI_=/^(?:(?:https?|mailto):|[^&:\/?#]*(?:[\/?#]|$))/i;soy.esc.$$FILTER_FOR_FILTER_IMAGE_DATA_URI_=/^data:image\/(?:bmp|gif|jpe?g|png|tiff|webp);base64,[a-z0-9+\/]+=*$/i;soy.esc.$$FILTER_FOR_FILTER_HTML_ATTRIBUTES_=/^(?!style|on|action|archive|background|cite|classid|codebase|data|dsync|href|longdesc|src|usemap)(?:[a-z0-9_$:-]*)$/i;soy.esc.$$FILTER_FOR_FILTER_HTML_ELEMENT_NAME_=/^(?!script|style|title|textarea|xmp|no)[a-z0-9_$:-]*$/i;soy.esc.$$escapeHtmlHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_ESCAPE_HTML_,soy.esc.$$REPLACER_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_)};soy.esc.$$normalizeHtmlHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_NORMALIZE_HTML_,soy.esc.$$REPLACER_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_)};soy.esc.$$escapeHtmlNospaceHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_ESCAPE_HTML_NOSPACE_,soy.esc.$$REPLACER_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_)};soy.esc.$$normalizeHtmlNospaceHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_NORMALIZE_HTML_NOSPACE_,soy.esc.$$REPLACER_FOR_ESCAPE_HTML__AND__NORMALIZE_HTML__AND__ESCAPE_HTML_NOSPACE__AND__NORMALIZE_HTML_NOSPACE_)};soy.esc.$$escapeJsStringHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_ESCAPE_JS_STRING_,soy.esc.$$REPLACER_FOR_ESCAPE_JS_STRING__AND__ESCAPE_JS_REGEX_)};soy.esc.$$escapeJsRegexHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_ESCAPE_JS_REGEX_,soy.esc.$$REPLACER_FOR_ESCAPE_JS_STRING__AND__ESCAPE_JS_REGEX_)};soy.esc.$$escapeCssStringHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_ESCAPE_CSS_STRING_,soy.esc.$$REPLACER_FOR_ESCAPE_CSS_STRING_)};soy.esc.$$filterCssValueHelper=function(a){var b=String(a);if(!soy.esc.$$FILTER_FOR_FILTER_CSS_VALUE_.test(b)){goog.asserts.fail("Bad value `%s` for |filterCssValue",[b]);return"zSoyz"}return b};soy.esc.$$normalizeUriHelper=function(a){var b=String(a);return b.replace(soy.esc.$$MATCHER_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_,soy.esc.$$REPLACER_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_)};soy.esc.$$filterNormalizeUriHelper=function(a){var b=String(a);if(!soy.esc.$$FILTER_FOR_FILTER_NORMALIZE_URI_.test(b)){goog.asserts.fail("Bad value `%s` for |filterNormalizeUri",[b]);return"#zSoyz"}return b.replace(soy.esc.$$MATCHER_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_,soy.esc.$$REPLACER_FOR_NORMALIZE_URI__AND__FILTER_NORMALIZE_URI_)};soy.esc.$$filterImageDataUriHelper=function(a){var b=String(a);if(!soy.esc.$$FILTER_FOR_FILTER_IMAGE_DATA_URI_.test(b)){goog.asserts.fail("Bad value `%s` for |filterImageDataUri",[b]);return"data:image/gif;base64,zSoyz"}return b};soy.esc.$$filterHtmlAttributesHelper=function(a){var b=String(a);if(!soy.esc.$$FILTER_FOR_FILTER_HTML_ATTRIBUTES_.test(b)){goog.asserts.fail("Bad value `%s` for |filterHtmlAttributes",[b]);return"zSoyz"}return b};soy.esc.$$filterHtmlElementNameHelper=function(a){var b=String(a);if(!soy.esc.$$FILTER_FOR_FILTER_HTML_ELEMENT_NAME_.test(b)){goog.asserts.fail("Bad value `%s` for |filterHtmlElementName",[b]);return"zSoyz"}return b};soy.esc.$$HTML_TAG_REGEX_=/<(?:!|\/?([a-zA-Z][a-zA-Z0-9:\-]*))(?:[^>'"]|"[^"]*"|'[^']*')*>/g;soy.esc.$$LT_REGEX_=/</g;soy.esc.$$SAFE_TAG_WHITELIST_={b:1,br:1,em:1,i:1,s:1,sub:1,sup:1,u:1};