{"version":3,"file":"3169.0209a779754c7e4a.js","sources":["webpack://storefronts/./node_modules/cssfilter/lib/css.js","webpack://storefronts/./node_modules/cssfilter/lib/default.js","webpack://storefronts/./node_modules/cssfilter/lib/index.js","webpack://storefronts/./node_modules/cssfilter/lib/parser.js","webpack://storefronts/./node_modules/cssfilter/lib/util.js","webpack://storefronts/./node_modules/xss/lib/default.js","webpack://storefronts/./node_modules/xss/lib/index.js","webpack://storefronts/./node_modules/xss/lib/parser.js","webpack://storefronts/./node_modules/xss/lib/util.js","webpack://storefronts/./node_modules/xss/lib/xss.js"],"sourcesContent":["/**\n * cssfilter\n *\n * @author 老雷\n */\n\nvar DEFAULT = require('./default');\nvar parseStyle = require('./parser');\nvar _ = require('./util');\n\n\n/**\n * 返回值是否为空\n *\n * @param {Object} obj\n * @return {Boolean}\n */\nfunction isNull (obj) {\n return (obj === undefined || obj === null);\n}\n\n/**\n * 浅拷贝对象\n *\n * @param {Object} obj\n * @return {Object}\n */\nfunction shallowCopyObject (obj) {\n var ret = {};\n for (var i in obj) {\n ret[i] = obj[i];\n }\n return ret;\n}\n\n/**\n * 创建CSS过滤器\n *\n * @param {Object} options\n * - {Object} whiteList\n * - {Function} onAttr\n * - {Function} onIgnoreAttr\n * - {Function} safeAttrValue\n */\nfunction FilterCSS (options) {\n options = shallowCopyObject(options || {});\n options.whiteList = options.whiteList || DEFAULT.whiteList;\n options.onAttr = options.onAttr || DEFAULT.onAttr;\n options.onIgnoreAttr = options.onIgnoreAttr || DEFAULT.onIgnoreAttr;\n options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;\n this.options = options;\n}\n\nFilterCSS.prototype.process = function (css) {\n // 兼容各种奇葩输入\n css = css || '';\n css = css.toString();\n if (!css) return '';\n\n var me = this;\n var options = me.options;\n var whiteList = options.whiteList;\n var onAttr = options.onAttr;\n var onIgnoreAttr = options.onIgnoreAttr;\n var safeAttrValue = options.safeAttrValue;\n\n var retCSS = parseStyle(css, function (sourcePosition, position, name, value, source) {\n\n var check = whiteList[name];\n var isWhite = false;\n if (check === true) isWhite = check;\n else if (typeof check === 'function') isWhite = check(value);\n else if (check instanceof RegExp) isWhite = check.test(value);\n if (isWhite !== true) isWhite = false;\n\n // 如果过滤后 value 为空则直接忽略\n value = safeAttrValue(name, value);\n if (!value) return;\n\n var opts = {\n position: position,\n sourcePosition: sourcePosition,\n source: source,\n isWhite: isWhite\n };\n\n if (isWhite) {\n\n var ret = onAttr(name, value, opts);\n if (isNull(ret)) {\n return name + ':' + value;\n } else {\n return ret;\n }\n\n } else {\n\n var ret = onIgnoreAttr(name, value, opts);\n if (!isNull(ret)) {\n return ret;\n }\n\n }\n });\n\n return retCSS;\n};\n\n\nmodule.exports = FilterCSS;\n","/**\n * cssfilter\n *\n * @author 老雷\n */\n\nfunction getDefaultWhiteList () {\n // 白名单值说明:\n // true: 允许该属性\n // Function: function (val) { } 返回true表示允许该属性,其他值均表示不允许\n // RegExp: regexp.test(val) 返回true表示允许该属性,其他值均表示不允许\n // 除上面列出的值外均表示不允许\n var whiteList = {};\n\n whiteList['align-content'] = false; // default: auto\n whiteList['align-items'] = false; // default: auto\n whiteList['align-self'] = false; // default: auto\n whiteList['alignment-adjust'] = false; // default: auto\n whiteList['alignment-baseline'] = false; // default: baseline\n whiteList['all'] = false; // default: depending on individual properties\n whiteList['anchor-point'] = false; // default: none\n whiteList['animation'] = false; // default: depending on individual properties\n whiteList['animation-delay'] = false; // default: 0\n whiteList['animation-direction'] = false; // default: normal\n whiteList['animation-duration'] = false; // default: 0\n whiteList['animation-fill-mode'] = false; // default: none\n whiteList['animation-iteration-count'] = false; // default: 1\n whiteList['animation-name'] = false; // default: none\n whiteList['animation-play-state'] = false; // default: running\n whiteList['animation-timing-function'] = false; // default: ease\n whiteList['azimuth'] = false; // default: center\n whiteList['backface-visibility'] = false; // default: visible\n whiteList['background'] = true; // default: depending on individual properties\n whiteList['background-attachment'] = true; // default: scroll\n whiteList['background-clip'] = true; // default: border-box\n whiteList['background-color'] = true; // default: transparent\n whiteList['background-image'] = true; // default: none\n whiteList['background-origin'] = true; // default: padding-box\n whiteList['background-position'] = true; // default: 0% 0%\n whiteList['background-repeat'] = true; // default: repeat\n whiteList['background-size'] = true; // default: auto\n whiteList['baseline-shift'] = false; // default: baseline\n whiteList['binding'] = false; // default: none\n whiteList['bleed'] = false; // default: 6pt\n whiteList['bookmark-label'] = false; // default: content()\n whiteList['bookmark-level'] = false; // default: none\n whiteList['bookmark-state'] = false; // default: open\n whiteList['border'] = true; // default: depending on individual properties\n whiteList['border-bottom'] = true; // default: depending on individual properties\n whiteList['border-bottom-color'] = true; // default: current color\n whiteList['border-bottom-left-radius'] = true; // default: 0\n whiteList['border-bottom-right-radius'] = true; // default: 0\n whiteList['border-bottom-style'] = true; // default: none\n whiteList['border-bottom-width'] = true; // default: medium\n whiteList['border-collapse'] = true; // default: separate\n whiteList['border-color'] = true; // default: depending on individual properties\n whiteList['border-image'] = true; // default: none\n whiteList['border-image-outset'] = true; // default: 0\n whiteList['border-image-repeat'] = true; // default: stretch\n whiteList['border-image-slice'] = true; // default: 100%\n whiteList['border-image-source'] = true; // default: none\n whiteList['border-image-width'] = true; // default: 1\n whiteList['border-left'] = true; // default: depending on individual properties\n whiteList['border-left-color'] = true; // default: current color\n whiteList['border-left-style'] = true; // default: none\n whiteList['border-left-width'] = true; // default: medium\n whiteList['border-radius'] = true; // default: 0\n whiteList['border-right'] = true; // default: depending on individual properties\n whiteList['border-right-color'] = true; // default: current color\n whiteList['border-right-style'] = true; // default: none\n whiteList['border-right-width'] = true; // default: medium\n whiteList['border-spacing'] = true; // default: 0\n whiteList['border-style'] = true; // default: depending on individual properties\n whiteList['border-top'] = true; // default: depending on individual properties\n whiteList['border-top-color'] = true; // default: current color\n whiteList['border-top-left-radius'] = true; // default: 0\n whiteList['border-top-right-radius'] = true; // default: 0\n whiteList['border-top-style'] = true; // default: none\n whiteList['border-top-width'] = true; // default: medium\n whiteList['border-width'] = true; // default: depending on individual properties\n whiteList['bottom'] = false; // default: auto\n whiteList['box-decoration-break'] = true; // default: slice\n whiteList['box-shadow'] = true; // default: none\n whiteList['box-sizing'] = true; // default: content-box\n whiteList['box-snap'] = true; // default: none\n whiteList['box-suppress'] = true; // default: show\n whiteList['break-after'] = true; // default: auto\n whiteList['break-before'] = true; // default: auto\n whiteList['break-inside'] = true; // default: auto\n whiteList['caption-side'] = false; // default: top\n whiteList['chains'] = false; // default: none\n whiteList['clear'] = true; // default: none\n whiteList['clip'] = false; // default: auto\n whiteList['clip-path'] = false; // default: none\n whiteList['clip-rule'] = false; // default: nonzero\n whiteList['color'] = true; // default: implementation dependent\n whiteList['color-interpolation-filters'] = true; // default: auto\n whiteList['column-count'] = false; // default: auto\n whiteList['column-fill'] = false; // default: balance\n whiteList['column-gap'] = false; // default: normal\n whiteList['column-rule'] = false; // default: depending on individual properties\n whiteList['column-rule-color'] = false; // default: current color\n whiteList['column-rule-style'] = false; // default: medium\n whiteList['column-rule-width'] = false; // default: medium\n whiteList['column-span'] = false; // default: none\n whiteList['column-width'] = false; // default: auto\n whiteList['columns'] = false; // default: depending on individual properties\n whiteList['contain'] = false; // default: none\n whiteList['content'] = false; // default: normal\n whiteList['counter-increment'] = false; // default: none\n whiteList['counter-reset'] = false; // default: none\n whiteList['counter-set'] = false; // default: none\n whiteList['crop'] = false; // default: auto\n whiteList['cue'] = false; // default: depending on individual properties\n whiteList['cue-after'] = false; // default: none\n whiteList['cue-before'] = false; // default: none\n whiteList['cursor'] = false; // default: auto\n whiteList['direction'] = false; // default: ltr\n whiteList['display'] = true; // default: depending on individual properties\n whiteList['display-inside'] = true; // default: auto\n whiteList['display-list'] = true; // default: none\n whiteList['display-outside'] = true; // default: inline-level\n whiteList['dominant-baseline'] = false; // default: auto\n whiteList['elevation'] = false; // default: level\n whiteList['empty-cells'] = false; // default: show\n whiteList['filter'] = false; // default: none\n whiteList['flex'] = false; // default: depending on individual properties\n whiteList['flex-basis'] = false; // default: auto\n whiteList['flex-direction'] = false; // default: row\n whiteList['flex-flow'] = false; // default: depending on individual properties\n whiteList['flex-grow'] = false; // default: 0\n whiteList['flex-shrink'] = false; // default: 1\n whiteList['flex-wrap'] = false; // default: nowrap\n whiteList['float'] = false; // default: none\n whiteList['float-offset'] = false; // default: 0 0\n whiteList['flood-color'] = false; // default: black\n whiteList['flood-opacity'] = false; // default: 1\n whiteList['flow-from'] = false; // default: none\n whiteList['flow-into'] = false; // default: none\n whiteList['font'] = true; // default: depending on individual properties\n whiteList['font-family'] = true; // default: implementation dependent\n whiteList['font-feature-settings'] = true; // default: normal\n whiteList['font-kerning'] = true; // default: auto\n whiteList['font-language-override'] = true; // default: normal\n whiteList['font-size'] = true; // default: medium\n whiteList['font-size-adjust'] = true; // default: none\n whiteList['font-stretch'] = true; // default: normal\n whiteList['font-style'] = true; // default: normal\n whiteList['font-synthesis'] = true; // default: weight style\n whiteList['font-variant'] = true; // default: normal\n whiteList['font-variant-alternates'] = true; // default: normal\n whiteList['font-variant-caps'] = true; // default: normal\n whiteList['font-variant-east-asian'] = true; // default: normal\n whiteList['font-variant-ligatures'] = true; // default: normal\n whiteList['font-variant-numeric'] = true; // default: normal\n whiteList['font-variant-position'] = true; // default: normal\n whiteList['font-weight'] = true; // default: normal\n whiteList['grid'] = false; // default: depending on individual properties\n whiteList['grid-area'] = false; // default: depending on individual properties\n whiteList['grid-auto-columns'] = false; // default: auto\n whiteList['grid-auto-flow'] = false; // default: none\n whiteList['grid-auto-rows'] = false; // default: auto\n whiteList['grid-column'] = false; // default: depending on individual properties\n whiteList['grid-column-end'] = false; // default: auto\n whiteList['grid-column-start'] = false; // default: auto\n whiteList['grid-row'] = false; // default: depending on individual properties\n whiteList['grid-row-end'] = false; // default: auto\n whiteList['grid-row-start'] = false; // default: auto\n whiteList['grid-template'] = false; // default: depending on individual properties\n whiteList['grid-template-areas'] = false; // default: none\n whiteList['grid-template-columns'] = false; // default: none\n whiteList['grid-template-rows'] = false; // default: none\n whiteList['hanging-punctuation'] = false; // default: none\n whiteList['height'] = true; // default: auto\n whiteList['hyphens'] = false; // default: manual\n whiteList['icon'] = false; // default: auto\n whiteList['image-orientation'] = false; // default: auto\n whiteList['image-resolution'] = false; // default: normal\n whiteList['ime-mode'] = false; // default: auto\n whiteList['initial-letters'] = false; // default: normal\n whiteList['inline-box-align'] = false; // default: last\n whiteList['justify-content'] = false; // default: auto\n whiteList['justify-items'] = false; // default: auto\n whiteList['justify-self'] = false; // default: auto\n whiteList['left'] = false; // default: auto\n whiteList['letter-spacing'] = true; // default: normal\n whiteList['lighting-color'] = true; // default: white\n whiteList['line-box-contain'] = false; // default: block inline replaced\n whiteList['line-break'] = false; // default: auto\n whiteList['line-grid'] = false; // default: match-parent\n whiteList['line-height'] = false; // default: normal\n whiteList['line-snap'] = false; // default: none\n whiteList['line-stacking'] = false; // default: depending on individual properties\n whiteList['line-stacking-ruby'] = false; // default: exclude-ruby\n whiteList['line-stacking-shift'] = false; // default: consider-shifts\n whiteList['line-stacking-strategy'] = false; // default: inline-line-height\n whiteList['list-style'] = true; // default: depending on individual properties\n whiteList['list-style-image'] = true; // default: none\n whiteList['list-style-position'] = true; // default: outside\n whiteList['list-style-type'] = true; // default: disc\n whiteList['margin'] = true; // default: depending on individual properties\n whiteList['margin-bottom'] = true; // default: 0\n whiteList['margin-left'] = true; // default: 0\n whiteList['margin-right'] = true; // default: 0\n whiteList['margin-top'] = true; // default: 0\n whiteList['marker-offset'] = false; // default: auto\n whiteList['marker-side'] = false; // default: list-item\n whiteList['marks'] = false; // default: none\n whiteList['mask'] = false; // default: border-box\n whiteList['mask-box'] = false; // default: see individual properties\n whiteList['mask-box-outset'] = false; // default: 0\n whiteList['mask-box-repeat'] = false; // default: stretch\n whiteList['mask-box-slice'] = false; // default: 0 fill\n whiteList['mask-box-source'] = false; // default: none\n whiteList['mask-box-width'] = false; // default: auto\n whiteList['mask-clip'] = false; // default: border-box\n whiteList['mask-image'] = false; // default: none\n whiteList['mask-origin'] = false; // default: border-box\n whiteList['mask-position'] = false; // default: center\n whiteList['mask-repeat'] = false; // default: no-repeat\n whiteList['mask-size'] = false; // default: border-box\n whiteList['mask-source-type'] = false; // default: auto\n whiteList['mask-type'] = false; // default: luminance\n whiteList['max-height'] = true; // default: none\n whiteList['max-lines'] = false; // default: none\n whiteList['max-width'] = true; // default: none\n whiteList['min-height'] = true; // default: 0\n whiteList['min-width'] = true; // default: 0\n whiteList['move-to'] = false; // default: normal\n whiteList['nav-down'] = false; // default: auto\n whiteList['nav-index'] = false; // default: auto\n whiteList['nav-left'] = false; // default: auto\n whiteList['nav-right'] = false; // default: auto\n whiteList['nav-up'] = false; // default: auto\n whiteList['object-fit'] = false; // default: fill\n whiteList['object-position'] = false; // default: 50% 50%\n whiteList['opacity'] = false; // default: 1\n whiteList['order'] = false; // default: 0\n whiteList['orphans'] = false; // default: 2\n whiteList['outline'] = false; // default: depending on individual properties\n whiteList['outline-color'] = false; // default: invert\n whiteList['outline-offset'] = false; // default: 0\n whiteList['outline-style'] = false; // default: none\n whiteList['outline-width'] = false; // default: medium\n whiteList['overflow'] = false; // default: depending on individual properties\n whiteList['overflow-wrap'] = false; // default: normal\n whiteList['overflow-x'] = false; // default: visible\n whiteList['overflow-y'] = false; // default: visible\n whiteList['padding'] = true; // default: depending on individual properties\n whiteList['padding-bottom'] = true; // default: 0\n whiteList['padding-left'] = true; // default: 0\n whiteList['padding-right'] = true; // default: 0\n whiteList['padding-top'] = true; // default: 0\n whiteList['page'] = false; // default: auto\n whiteList['page-break-after'] = false; // default: auto\n whiteList['page-break-before'] = false; // default: auto\n whiteList['page-break-inside'] = false; // default: auto\n whiteList['page-policy'] = false; // default: start\n whiteList['pause'] = false; // default: implementation dependent\n whiteList['pause-after'] = false; // default: implementation dependent\n whiteList['pause-before'] = false; // default: implementation dependent\n whiteList['perspective'] = false; // default: none\n whiteList['perspective-origin'] = false; // default: 50% 50%\n whiteList['pitch'] = false; // default: medium\n whiteList['pitch-range'] = false; // default: 50\n whiteList['play-during'] = false; // default: auto\n whiteList['position'] = false; // default: static\n whiteList['presentation-level'] = false; // default: 0\n whiteList['quotes'] = false; // default: text\n whiteList['region-fragment'] = false; // default: auto\n whiteList['resize'] = false; // default: none\n whiteList['rest'] = false; // default: depending on individual properties\n whiteList['rest-after'] = false; // default: none\n whiteList['rest-before'] = false; // default: none\n whiteList['richness'] = false; // default: 50\n whiteList['right'] = false; // default: auto\n whiteList['rotation'] = false; // default: 0\n whiteList['rotation-point'] = false; // default: 50% 50%\n whiteList['ruby-align'] = false; // default: auto\n whiteList['ruby-merge'] = false; // default: separate\n whiteList['ruby-position'] = false; // default: before\n whiteList['shape-image-threshold'] = false; // default: 0.0\n whiteList['shape-outside'] = false; // default: none\n whiteList['shape-margin'] = false; // default: 0\n whiteList['size'] = false; // default: auto\n whiteList['speak'] = false; // default: auto\n whiteList['speak-as'] = false; // default: normal\n whiteList['speak-header'] = false; // default: once\n whiteList['speak-numeral'] = false; // default: continuous\n whiteList['speak-punctuation'] = false; // default: none\n whiteList['speech-rate'] = false; // default: medium\n whiteList['stress'] = false; // default: 50\n whiteList['string-set'] = false; // default: none\n whiteList['tab-size'] = false; // default: 8\n whiteList['table-layout'] = false; // default: auto\n whiteList['text-align'] = true; // default: start\n whiteList['text-align-last'] = true; // default: auto\n whiteList['text-combine-upright'] = true; // default: none\n whiteList['text-decoration'] = true; // default: none\n whiteList['text-decoration-color'] = true; // default: currentColor\n whiteList['text-decoration-line'] = true; // default: none\n whiteList['text-decoration-skip'] = true; // default: objects\n whiteList['text-decoration-style'] = true; // default: solid\n whiteList['text-emphasis'] = true; // default: depending on individual properties\n whiteList['text-emphasis-color'] = true; // default: currentColor\n whiteList['text-emphasis-position'] = true; // default: over right\n whiteList['text-emphasis-style'] = true; // default: none\n whiteList['text-height'] = true; // default: auto\n whiteList['text-indent'] = true; // default: 0\n whiteList['text-justify'] = true; // default: auto\n whiteList['text-orientation'] = true; // default: mixed\n whiteList['text-overflow'] = true; // default: clip\n whiteList['text-shadow'] = true; // default: none\n whiteList['text-space-collapse'] = true; // default: collapse\n whiteList['text-transform'] = true; // default: none\n whiteList['text-underline-position'] = true; // default: auto\n whiteList['text-wrap'] = true; // default: normal\n whiteList['top'] = false; // default: auto\n whiteList['transform'] = false; // default: none\n whiteList['transform-origin'] = false; // default: 50% 50% 0\n whiteList['transform-style'] = false; // default: flat\n whiteList['transition'] = false; // default: depending on individual properties\n whiteList['transition-delay'] = false; // default: 0s\n whiteList['transition-duration'] = false; // default: 0s\n whiteList['transition-property'] = false; // default: all\n whiteList['transition-timing-function'] = false; // default: ease\n whiteList['unicode-bidi'] = false; // default: normal\n whiteList['vertical-align'] = false; // default: baseline\n whiteList['visibility'] = false; // default: visible\n whiteList['voice-balance'] = false; // default: center\n whiteList['voice-duration'] = false; // default: auto\n whiteList['voice-family'] = false; // default: implementation dependent\n whiteList['voice-pitch'] = false; // default: medium\n whiteList['voice-range'] = false; // default: medium\n whiteList['voice-rate'] = false; // default: normal\n whiteList['voice-stress'] = false; // default: normal\n whiteList['voice-volume'] = false; // default: medium\n whiteList['volume'] = false; // default: medium\n whiteList['white-space'] = false; // default: normal\n whiteList['widows'] = false; // default: 2\n whiteList['width'] = true; // default: auto\n whiteList['will-change'] = false; // default: auto\n whiteList['word-break'] = true; // default: normal\n whiteList['word-spacing'] = true; // default: normal\n whiteList['word-wrap'] = true; // default: normal\n whiteList['wrap-flow'] = false; // default: auto\n whiteList['wrap-through'] = false; // default: wrap\n whiteList['writing-mode'] = false; // default: horizontal-tb\n whiteList['z-index'] = false; // default: auto\n\n return whiteList;\n}\n\n\n/**\n * 匹配到白名单上的一个属性时\n *\n * @param {String} name\n * @param {String} value\n * @param {Object} options\n * @return {String}\n */\nfunction onAttr (name, value, options) {\n // do nothing\n}\n\n/**\n * 匹配到不在白名单上的一个属性时\n *\n * @param {String} name\n * @param {String} value\n * @param {Object} options\n * @return {String}\n */\nfunction onIgnoreAttr (name, value, options) {\n // do nothing\n}\n\nvar REGEXP_URL_JAVASCRIPT = /javascript\\s*\\:/img;\n\n/**\n * 过滤属性值\n *\n * @param {String} name\n * @param {String} value\n * @return {String}\n */\nfunction safeAttrValue(name, value) {\n if (REGEXP_URL_JAVASCRIPT.test(value)) return '';\n return value;\n}\n\n\nexports.whiteList = getDefaultWhiteList();\nexports.getDefaultWhiteList = getDefaultWhiteList;\nexports.onAttr = onAttr;\nexports.onIgnoreAttr = onIgnoreAttr;\nexports.safeAttrValue = safeAttrValue;\n","/**\n * cssfilter\n *\n * @author 老雷\n */\n\nvar DEFAULT = require('./default');\nvar FilterCSS = require('./css');\n\n\n/**\n * XSS过滤\n *\n * @param {String} css 要过滤的CSS代码\n * @param {Object} options 选项:whiteList, onAttr, onIgnoreAttr\n * @return {String}\n */\nfunction filterCSS (html, options) {\n var xss = new FilterCSS(options);\n return xss.process(html);\n}\n\n\n// 输出\nexports = module.exports = filterCSS;\nexports.FilterCSS = FilterCSS;\nfor (var i in DEFAULT) exports[i] = DEFAULT[i];\n\n// 在浏览器端使用\nif (typeof window !== 'undefined') {\n window.filterCSS = module.exports;\n}\n","/**\n * cssfilter\n *\n * @author 老雷\n */\n\nvar _ = require('./util');\n\n\n/**\n * 解析style\n *\n * @param {String} css\n * @param {Function} onAttr 处理属性的函数\n * 参数格式: function (sourcePosition, position, name, value, source)\n * @return {String}\n */\nfunction parseStyle (css, onAttr) {\n css = _.trimRight(css);\n if (css[css.length - 1] !== ';') css += ';';\n var cssLength = css.length;\n var isParenthesisOpen = false;\n var lastPos = 0;\n var i = 0;\n var retCSS = '';\n\n function addNewAttr () {\n // 如果没有正常的闭合圆括号,则直接忽略当前属性\n if (!isParenthesisOpen) {\n var source = _.trim(css.slice(lastPos, i));\n var j = source.indexOf(':');\n if (j !== -1) {\n var name = _.trim(source.slice(0, j));\n var value = _.trim(source.slice(j + 1));\n // 必须有属性名称\n if (name) {\n var ret = onAttr(lastPos, retCSS.length, name, value, source);\n if (ret) retCSS += ret + '; ';\n }\n }\n }\n lastPos = i + 1;\n }\n\n for (; i < cssLength; i++) {\n var c = css[i];\n if (c === '/' && css[i + 1] === '*') {\n // 备注开始\n var j = css.indexOf('*/', i + 2);\n // 如果没有正常的备注结束,则后面的部分全部跳过\n if (j === -1) break;\n // 直接将当前位置调到备注结尾,并且初始化状态\n i = j + 1;\n lastPos = i + 1;\n isParenthesisOpen = false;\n } else if (c === '(') {\n isParenthesisOpen = true;\n } else if (c === ')') {\n isParenthesisOpen = false;\n } else if (c === ';') {\n if (isParenthesisOpen) {\n // 在圆括号里面,忽略\n } else {\n addNewAttr();\n }\n } else if (c === '\\n') {\n addNewAttr();\n }\n }\n\n return _.trim(retCSS);\n}\n\nmodule.exports = parseStyle;\n","module.exports = {\n indexOf: function (arr, item) {\n var i, j;\n if (Array.prototype.indexOf) {\n return arr.indexOf(item);\n }\n for (i = 0, j = arr.length; i < j; i++) {\n if (arr[i] === item) {\n return i;\n }\n }\n return -1;\n },\n forEach: function (arr, fn, scope) {\n var i, j;\n if (Array.prototype.forEach) {\n return arr.forEach(fn, scope);\n }\n for (i = 0, j = arr.length; i < j; i++) {\n fn.call(scope, arr[i], i, arr);\n }\n },\n trim: function (str) {\n if (String.prototype.trim) {\n return str.trim();\n }\n return str.replace(/(^\\s*)|(\\s*$)/g, '');\n },\n trimRight: function (str) {\n if (String.prototype.trimRight) {\n return str.trimRight();\n }\n return str.replace(/(\\s*$)/g, '');\n }\n};\n","/**\n * default settings\n *\n * @author Zongmin Lei\n */\n\nvar FilterCSS = require(\"cssfilter\").FilterCSS;\nvar getDefaultCSSWhiteList = require(\"cssfilter\").getDefaultWhiteList;\nvar _ = require(\"./util\");\n\nfunction getDefaultWhiteList() {\n return {\n a: [\"target\", \"href\", \"title\"],\n abbr: [\"title\"],\n address: [],\n area: [\"shape\", \"coords\", \"href\", \"alt\"],\n article: [],\n aside: [],\n audio: [\n \"autoplay\",\n \"controls\",\n \"crossorigin\",\n \"loop\",\n \"muted\",\n \"preload\",\n \"src\",\n ],\n b: [],\n bdi: [\"dir\"],\n bdo: [\"dir\"],\n big: [],\n blockquote: [\"cite\"],\n br: [],\n caption: [],\n center: [],\n cite: [],\n code: [],\n col: [\"align\", \"valign\", \"span\", \"width\"],\n colgroup: [\"align\", \"valign\", \"span\", \"width\"],\n dd: [],\n del: [\"datetime\"],\n details: [\"open\"],\n div: [],\n dl: [],\n dt: [],\n em: [],\n figcaption: [],\n figure: [],\n font: [\"color\", \"size\", \"face\"],\n footer: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n header: [],\n hr: [],\n i: [],\n img: [\"src\", \"alt\", \"title\", \"width\", \"height\", \"loading\"],\n ins: [\"datetime\"],\n kbd: [],\n li: [],\n mark: [],\n nav: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n section: [],\n small: [],\n span: [],\n sub: [],\n summary: [],\n sup: [],\n strong: [],\n strike: [],\n table: [\"width\", \"border\", \"align\", \"valign\"],\n tbody: [\"align\", \"valign\"],\n td: [\"width\", \"rowspan\", \"colspan\", \"align\", \"valign\"],\n tfoot: [\"align\", \"valign\"],\n th: [\"width\", \"rowspan\", \"colspan\", \"align\", \"valign\"],\n thead: [\"align\", \"valign\"],\n tr: [\"rowspan\", \"align\", \"valign\"],\n tt: [],\n u: [],\n ul: [],\n video: [\n \"autoplay\",\n \"controls\",\n \"crossorigin\",\n \"loop\",\n \"muted\",\n \"playsinline\",\n \"poster\",\n \"preload\",\n \"src\",\n \"height\",\n \"width\",\n ],\n };\n}\n\nvar defaultCSSFilter = new FilterCSS();\n\n/**\n * default onTag function\n *\n * @param {String} tag\n * @param {String} html\n * @param {Object} options\n * @return {String}\n */\nfunction onTag(tag, html, options) {\n // do nothing\n}\n\n/**\n * default onIgnoreTag function\n *\n * @param {String} tag\n * @param {String} html\n * @param {Object} options\n * @return {String}\n */\nfunction onIgnoreTag(tag, html, options) {\n // do nothing\n}\n\n/**\n * default onTagAttr function\n *\n * @param {String} tag\n * @param {String} name\n * @param {String} value\n * @return {String}\n */\nfunction onTagAttr(tag, name, value) {\n // do nothing\n}\n\n/**\n * default onIgnoreTagAttr function\n *\n * @param {String} tag\n * @param {String} name\n * @param {String} value\n * @return {String}\n */\nfunction onIgnoreTagAttr(tag, name, value) {\n // do nothing\n}\n\n/**\n * default escapeHtml function\n *\n * @param {String} html\n */\nfunction escapeHtml(html) {\n return html.replace(REGEXP_LT, \"<\").replace(REGEXP_GT, \">\");\n}\n\n/**\n * default safeAttrValue function\n *\n * @param {String} tag\n * @param {String} name\n * @param {String} value\n * @param {Object} cssFilter\n * @return {String}\n */\nfunction safeAttrValue(tag, name, value, cssFilter) {\n // unescape attribute value firstly\n value = friendlyAttrValue(value);\n\n if (name === \"href\" || name === \"src\") {\n // filter `href` and `src` attribute\n // only allow the value that starts with `http://` | `https://` | `mailto:` | `/` | `#`\n value = _.trim(value);\n if (value === \"#\") return \"#\";\n if (\n !(\n value.substr(0, 7) === \"http://\" ||\n value.substr(0, 8) === \"https://\" ||\n value.substr(0, 7) === \"mailto:\" ||\n value.substr(0, 4) === \"tel:\" ||\n value.substr(0, 11) === \"data:image/\" ||\n value.substr(0, 6) === \"ftp://\" ||\n value.substr(0, 2) === \"./\" ||\n value.substr(0, 3) === \"../\" ||\n value[0] === \"#\" ||\n value[0] === \"/\"\n )\n ) {\n return \"\";\n }\n } else if (name === \"background\") {\n // filter `background` attribute (maybe no use)\n // `javascript:`\n REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;\n if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {\n return \"\";\n }\n } else if (name === \"style\") {\n // `expression()`\n REGEXP_DEFAULT_ON_TAG_ATTR_7.lastIndex = 0;\n if (REGEXP_DEFAULT_ON_TAG_ATTR_7.test(value)) {\n return \"\";\n }\n // `url()`\n REGEXP_DEFAULT_ON_TAG_ATTR_8.lastIndex = 0;\n if (REGEXP_DEFAULT_ON_TAG_ATTR_8.test(value)) {\n REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;\n if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {\n return \"\";\n }\n }\n if (cssFilter !== false) {\n cssFilter = cssFilter || defaultCSSFilter;\n value = cssFilter.process(value);\n }\n }\n\n // escape `<>\"` before returns\n value = escapeAttrValue(value);\n return value;\n}\n\n// RegExp list\nvar REGEXP_LT = //g;\nvar REGEXP_QUOTE = /\"/g;\nvar REGEXP_QUOTE_2 = /"/g;\nvar REGEXP_ATTR_VALUE_1 = /&#([a-zA-Z0-9]*);?/gim;\nvar REGEXP_ATTR_VALUE_COLON = /:?/gim;\nvar REGEXP_ATTR_VALUE_NEWLINE = /&newline;?/gim;\n// var REGEXP_DEFAULT_ON_TAG_ATTR_3 = /\\/\\*|\\*\\//gm;\nvar REGEXP_DEFAULT_ON_TAG_ATTR_4 =\n /((j\\s*a\\s*v\\s*a|v\\s*b|l\\s*i\\s*v\\s*e)\\s*s\\s*c\\s*r\\s*i\\s*p\\s*t\\s*|m\\s*o\\s*c\\s*h\\s*a):/gi;\n// var REGEXP_DEFAULT_ON_TAG_ATTR_5 = /^[\\s\"'`]*(d\\s*a\\s*t\\s*a\\s*)\\:/gi;\n// var REGEXP_DEFAULT_ON_TAG_ATTR_6 = /^[\\s\"'`]*(d\\s*a\\s*t\\s*a\\s*)\\:\\s*image\\//gi;\nvar REGEXP_DEFAULT_ON_TAG_ATTR_7 =\n /e\\s*x\\s*p\\s*r\\s*e\\s*s\\s*s\\s*i\\s*o\\s*n\\s*\\(.*/gi;\nvar REGEXP_DEFAULT_ON_TAG_ATTR_8 = /u\\s*r\\s*l\\s*\\(.*/gi;\n\n/**\n * escape double quote\n *\n * @param {String} str\n * @return {String} str\n */\nfunction escapeQuote(str) {\n return str.replace(REGEXP_QUOTE, \""\");\n}\n\n/**\n * unescape double quote\n *\n * @param {String} str\n * @return {String} str\n */\nfunction unescapeQuote(str) {\n return str.replace(REGEXP_QUOTE_2, '\"');\n}\n\n/**\n * escape html entities\n *\n * @param {String} str\n * @return {String}\n */\nfunction escapeHtmlEntities(str) {\n return str.replace(REGEXP_ATTR_VALUE_1, function replaceUnicode(str, code) {\n return code[0] === \"x\" || code[0] === \"X\"\n ? String.fromCharCode(parseInt(code.substr(1), 16))\n : String.fromCharCode(parseInt(code, 10));\n });\n}\n\n/**\n * escape html5 new danger entities\n *\n * @param {String} str\n * @return {String}\n */\nfunction escapeDangerHtml5Entities(str) {\n return str\n .replace(REGEXP_ATTR_VALUE_COLON, \":\")\n .replace(REGEXP_ATTR_VALUE_NEWLINE, \" \");\n}\n\n/**\n * clear nonprintable characters\n *\n * @param {String} str\n * @return {String}\n */\nfunction clearNonPrintableCharacter(str) {\n var str2 = \"\";\n for (var i = 0, len = str.length; i < len; i++) {\n str2 += str.charCodeAt(i) < 32 ? \" \" : str.charAt(i);\n }\n return _.trim(str2);\n}\n\n/**\n * get friendly attribute value\n *\n * @param {String} str\n * @return {String}\n */\nfunction friendlyAttrValue(str) {\n str = unescapeQuote(str);\n str = escapeHtmlEntities(str);\n str = escapeDangerHtml5Entities(str);\n str = clearNonPrintableCharacter(str);\n return str;\n}\n\n/**\n * unescape attribute value\n *\n * @param {String} str\n * @return {String}\n */\nfunction escapeAttrValue(str) {\n str = escapeQuote(str);\n str = escapeHtml(str);\n return str;\n}\n\n/**\n * `onIgnoreTag` function for removing all the tags that are not in whitelist\n */\nfunction onIgnoreTagStripAll() {\n return \"\";\n}\n\n/**\n * remove tag body\n * specify a `tags` list, if the tag is not in the `tags` list then process by the specify function (optional)\n *\n * @param {array} tags\n * @param {function} next\n */\nfunction StripTagBody(tags, next) {\n if (typeof next !== \"function\") {\n next = function () {};\n }\n\n var isRemoveAllTag = !Array.isArray(tags);\n function isRemoveTag(tag) {\n if (isRemoveAllTag) return true;\n return _.indexOf(tags, tag) !== -1;\n }\n\n var removeList = [];\n var posStart = false;\n\n return {\n onIgnoreTag: function (tag, html, options) {\n if (isRemoveTag(tag)) {\n if (options.isClosing) {\n var ret = \"[/removed]\";\n var end = options.position + ret.length;\n removeList.push([\n posStart !== false ? posStart : options.position,\n end,\n ]);\n posStart = false;\n return ret;\n } else {\n if (!posStart) {\n posStart = options.position;\n }\n return \"[removed]\";\n }\n } else {\n return next(tag, html, options);\n }\n },\n remove: function (html) {\n var rethtml = \"\";\n var lastPos = 0;\n _.forEach(removeList, function (pos) {\n rethtml += html.slice(lastPos, pos[0]);\n lastPos = pos[1];\n });\n rethtml += html.slice(lastPos);\n return rethtml;\n },\n };\n}\n\n/**\n * remove html comments\n *\n * @param {String} html\n * @return {String}\n */\nfunction stripCommentTag(html) {\n var retHtml = \"\";\n var lastPos = 0;\n while (lastPos < html.length) {\n var i = html.indexOf(\"\", i);\n if (j === -1) {\n break;\n }\n lastPos = j + 3;\n }\n return retHtml;\n}\n\n/**\n * remove invisible characters\n *\n * @param {String} html\n * @return {String}\n */\nfunction stripBlankChar(html) {\n var chars = html.split(\"\");\n chars = chars.filter(function (char) {\n var c = char.charCodeAt(0);\n if (c === 127) return false;\n if (c <= 31) {\n if (c === 10 || c === 13) return true;\n return false;\n }\n return true;\n });\n return chars.join(\"\");\n}\n\nexports.whiteList = getDefaultWhiteList();\nexports.getDefaultWhiteList = getDefaultWhiteList;\nexports.onTag = onTag;\nexports.onIgnoreTag = onIgnoreTag;\nexports.onTagAttr = onTagAttr;\nexports.onIgnoreTagAttr = onIgnoreTagAttr;\nexports.safeAttrValue = safeAttrValue;\nexports.escapeHtml = escapeHtml;\nexports.escapeQuote = escapeQuote;\nexports.unescapeQuote = unescapeQuote;\nexports.escapeHtmlEntities = escapeHtmlEntities;\nexports.escapeDangerHtml5Entities = escapeDangerHtml5Entities;\nexports.clearNonPrintableCharacter = clearNonPrintableCharacter;\nexports.friendlyAttrValue = friendlyAttrValue;\nexports.escapeAttrValue = escapeAttrValue;\nexports.onIgnoreTagStripAll = onIgnoreTagStripAll;\nexports.StripTagBody = StripTagBody;\nexports.stripCommentTag = stripCommentTag;\nexports.stripBlankChar = stripBlankChar;\nexports.attributeWrapSign = '\"';\nexports.cssFilter = defaultCSSFilter;\nexports.getDefaultCSSWhiteList = getDefaultCSSWhiteList;\n","/**\n * xss\n *\n * @author Zongmin Lei\n */\n\nvar DEFAULT = require(\"./default\");\nvar parser = require(\"./parser\");\nvar FilterXSS = require(\"./xss\");\n\n/**\n * filter xss function\n *\n * @param {String} html\n * @param {Object} options { whiteList, onTag, onTagAttr, onIgnoreTag, onIgnoreTagAttr, safeAttrValue, escapeHtml }\n * @return {String}\n */\nfunction filterXSS(html, options) {\n var xss = new FilterXSS(options);\n return xss.process(html);\n}\n\nexports = module.exports = filterXSS;\nexports.filterXSS = filterXSS;\nexports.FilterXSS = FilterXSS;\n\n(function () {\n for (var i in DEFAULT) {\n exports[i] = DEFAULT[i];\n }\n for (var j in parser) {\n exports[j] = parser[j];\n }\n})();\n\n// using `xss` on the browser, output `filterXSS` to the globals\nif (typeof window !== \"undefined\") {\n window.filterXSS = module.exports;\n}\n\n// using `xss` on the WebWorker, output `filterXSS` to the globals\nfunction isWorkerEnv() {\n return (\n typeof self !== \"undefined\" &&\n typeof DedicatedWorkerGlobalScope !== \"undefined\" &&\n self instanceof DedicatedWorkerGlobalScope\n );\n}\nif (isWorkerEnv()) {\n self.filterXSS = module.exports;\n}\n","/**\n * Simple HTML Parser\n *\n * @author Zongmin Lei\n */\n\nvar _ = require(\"./util\");\n\n/**\n * get tag name\n *\n * @param {String} html e.g. ''\n * @return {String}\n */\nfunction getTagName(html) {\n var i = _.spaceIndex(html);\n var tagName;\n if (i === -1) {\n tagName = html.slice(1, -1);\n } else {\n tagName = html.slice(1, i + 1);\n }\n tagName = _.trim(tagName).toLowerCase();\n if (tagName.slice(0, 1) === \"/\") tagName = tagName.slice(1);\n if (tagName.slice(-1) === \"/\") tagName = tagName.slice(0, -1);\n return tagName;\n}\n\n/**\n * is close tag?\n *\n * @param {String} html 如:''\n * @return {Boolean}\n */\nfunction isClosing(html) {\n return html.slice(0, 2) === \"\" || currentPos === len - 1) {\n rethtml += escapeHtml(html.slice(lastPos, tagStart));\n currentHtml = html.slice(tagStart, currentPos + 1);\n currentTagName = getTagName(currentHtml);\n rethtml += onTag(\n tagStart,\n rethtml.length,\n currentTagName,\n currentHtml,\n isClosing(currentHtml)\n );\n lastPos = currentPos + 1;\n tagStart = false;\n continue;\n }\n if (c === '\"' || c === \"'\") {\n var i = 1;\n var ic = html.charAt(currentPos - i);\n\n while (ic.trim() === \"\" || ic === \"=\") {\n if (ic === \"=\") {\n quoteStart = c;\n continue chariterator;\n }\n ic = html.charAt(currentPos - ++i);\n }\n }\n } else {\n if (c === quoteStart) {\n quoteStart = false;\n continue;\n }\n }\n }\n }\n if (lastPos < len) {\n rethtml += escapeHtml(html.substr(lastPos));\n }\n\n return rethtml;\n}\n\nvar REGEXP_ILLEGAL_ATTR_NAME = /[^a-zA-Z0-9\\\\_:.-]/gim;\n\n/**\n * parse input attributes and returns processed attributes\n *\n * @param {String} html e.g. `href=\"#\" target=\"_blank\"`\n * @param {Function} onAttr e.g. `function (name, value)`\n * @return {String}\n */\nfunction parseAttr(html, onAttr) {\n \"use strict\";\n\n var lastPos = 0;\n var lastMarkPos = 0;\n var retAttrs = [];\n var tmpName = false;\n var len = html.length;\n\n function addAttr(name, value) {\n name = _.trim(name);\n name = name.replace(REGEXP_ILLEGAL_ATTR_NAME, \"\").toLowerCase();\n if (name.length < 1) return;\n var ret = onAttr(name, value || \"\");\n if (ret) retAttrs.push(ret);\n }\n\n // 逐个分析字符\n for (var i = 0; i < len; i++) {\n var c = html.charAt(i);\n var v, j;\n if (tmpName === false && c === \"=\") {\n tmpName = html.slice(lastPos, i);\n lastPos = i + 1;\n lastMarkPos = html.charAt(lastPos) === '\"' || html.charAt(lastPos) === \"'\" ? lastPos : findNextQuotationMark(html, i + 1);\n continue;\n }\n if (tmpName !== false) {\n if (\n i === lastMarkPos\n ) {\n j = html.indexOf(c, i + 1);\n if (j === -1) {\n break;\n } else {\n v = _.trim(html.slice(lastMarkPos + 1, j));\n addAttr(tmpName, v);\n tmpName = false;\n i = j;\n lastPos = i + 1;\n continue;\n }\n }\n }\n if (/\\s|\\n|\\t/.test(c)) {\n html = html.replace(/\\s|\\n|\\t/g, \" \");\n if (tmpName === false) {\n j = findNextEqual(html, i);\n if (j === -1) {\n v = _.trim(html.slice(lastPos, i));\n addAttr(v);\n tmpName = false;\n lastPos = i + 1;\n continue;\n } else {\n i = j - 1;\n continue;\n }\n } else {\n j = findBeforeEqual(html, i - 1);\n if (j === -1) {\n v = _.trim(html.slice(lastPos, i));\n v = stripQuoteWrap(v);\n addAttr(tmpName, v);\n tmpName = false;\n lastPos = i + 1;\n continue;\n } else {\n continue;\n }\n }\n }\n }\n\n if (lastPos < html.length) {\n if (tmpName === false) {\n addAttr(html.slice(lastPos));\n } else {\n addAttr(tmpName, stripQuoteWrap(_.trim(html.slice(lastPos))));\n }\n }\n\n return _.trim(retAttrs.join(\" \"));\n}\n\nfunction findNextEqual(str, i) {\n for (; i < str.length; i++) {\n var c = str[i];\n if (c === \" \") continue;\n if (c === \"=\") return i;\n return -1;\n }\n}\n\nfunction findNextQuotationMark(str, i) {\n for (; i < str.length; i++) {\n var c = str[i];\n if (c === \" \") continue;\n if (c === \"'\" || c === '\"') return i;\n return -1;\n }\n}\n\nfunction findBeforeEqual(str, i) {\n for (; i > 0; i--) {\n var c = str[i];\n if (c === \" \") continue;\n if (c === \"=\") return i;\n return -1;\n }\n}\n\nfunction isQuoteWrapString(text) {\n if (\n (text[0] === '\"' && text[text.length - 1] === '\"') ||\n (text[0] === \"'\" && text[text.length - 1] === \"'\")\n ) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction stripQuoteWrap(text) {\n if (isQuoteWrapString(text)) {\n return text.substr(1, text.length - 2);\n } else {\n return text;\n }\n}\n\nexports.parseTag = parseTag;\nexports.parseAttr = parseAttr;\n","module.exports = {\n indexOf: function (arr, item) {\n var i, j;\n if (Array.prototype.indexOf) {\n return arr.indexOf(item);\n }\n for (i = 0, j = arr.length; i < j; i++) {\n if (arr[i] === item) {\n return i;\n }\n }\n return -1;\n },\n forEach: function (arr, fn, scope) {\n var i, j;\n if (Array.prototype.forEach) {\n return arr.forEach(fn, scope);\n }\n for (i = 0, j = arr.length; i < j; i++) {\n fn.call(scope, arr[i], i, arr);\n }\n },\n trim: function (str) {\n if (String.prototype.trim) {\n return str.trim();\n }\n return str.replace(/(^\\s*)|(\\s*$)/g, \"\");\n },\n spaceIndex: function (str) {\n var reg = /\\s|\\n|\\t/;\n var match = reg.exec(str);\n return match ? match.index : -1;\n },\n};\n","/**\n * filter xss\n *\n * @author Zongmin Lei\n */\n\nvar FilterCSS = require(\"cssfilter\").FilterCSS;\nvar DEFAULT = require(\"./default\");\nvar parser = require(\"./parser\");\nvar parseTag = parser.parseTag;\nvar parseAttr = parser.parseAttr;\nvar _ = require(\"./util\");\n\n/**\n * returns `true` if the input value is `undefined` or `null`\n *\n * @param {Object} obj\n * @return {Boolean}\n */\nfunction isNull(obj) {\n return obj === undefined || obj === null;\n}\n\n/**\n * get attributes for a tag\n *\n * @param {String} html\n * @return {Object}\n * - {String} html\n * - {Boolean} closing\n */\nfunction getAttrs(html) {\n var i = _.spaceIndex(html);\n if (i === -1) {\n return {\n html: \"\",\n closing: html[html.length - 2] === \"/\",\n };\n }\n html = _.trim(html.slice(i + 1, -1));\n var isClosing = html[html.length - 1] === \"/\";\n if (isClosing) html = _.trim(html.slice(0, -1));\n return {\n html: html,\n closing: isClosing,\n };\n}\n\n/**\n * shallow copy\n *\n * @param {Object} obj\n * @return {Object}\n */\nfunction shallowCopyObject(obj) {\n var ret = {};\n for (var i in obj) {\n ret[i] = obj[i];\n }\n return ret;\n}\n\nfunction keysToLowerCase(obj) {\n var ret = {};\n for (var i in obj) {\n if (Array.isArray(obj[i])) {\n ret[i.toLowerCase()] = obj[i].map(function (item) {\n return item.toLowerCase();\n });\n } else {\n ret[i.toLowerCase()] = obj[i];\n }\n }\n return ret;\n}\n\n/**\n * FilterXSS class\n *\n * @param {Object} options\n * whiteList (or allowList), onTag, onTagAttr, onIgnoreTag,\n * onIgnoreTagAttr, safeAttrValue, escapeHtml\n * stripIgnoreTagBody, allowCommentTag, stripBlankChar\n * css{whiteList, onAttr, onIgnoreAttr} `css=false` means don't use `cssfilter`\n */\nfunction FilterXSS(options) {\n options = shallowCopyObject(options || {});\n\n if (options.stripIgnoreTag) {\n if (options.onIgnoreTag) {\n console.error(\n 'Notes: cannot use these two options \"stripIgnoreTag\" and \"onIgnoreTag\" at the same time'\n );\n }\n options.onIgnoreTag = DEFAULT.onIgnoreTagStripAll;\n }\n if (options.whiteList || options.allowList) {\n options.whiteList = keysToLowerCase(options.whiteList || options.allowList);\n } else {\n options.whiteList = DEFAULT.whiteList;\n }\n\n this.attributeWrapSign = options.singleQuotedAttributeValue === true ? \"'\" : DEFAULT.attributeWrapSign;\n\n options.onTag = options.onTag || DEFAULT.onTag;\n options.onTagAttr = options.onTagAttr || DEFAULT.onTagAttr;\n options.onIgnoreTag = options.onIgnoreTag || DEFAULT.onIgnoreTag;\n options.onIgnoreTagAttr = options.onIgnoreTagAttr || DEFAULT.onIgnoreTagAttr;\n options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;\n options.escapeHtml = options.escapeHtml || DEFAULT.escapeHtml;\n this.options = options;\n\n if (options.css === false) {\n this.cssFilter = false;\n } else {\n options.css = options.css || {};\n this.cssFilter = new FilterCSS(options.css);\n }\n}\n\n/**\n * start process and returns result\n *\n * @param {String} html\n * @return {String}\n */\nFilterXSS.prototype.process = function (html) {\n // compatible with the input\n html = html || \"\";\n html = html.toString();\n if (!html) return \"\";\n\n var me = this;\n var options = me.options;\n var whiteList = options.whiteList;\n var onTag = options.onTag;\n var onIgnoreTag = options.onIgnoreTag;\n var onTagAttr = options.onTagAttr;\n var onIgnoreTagAttr = options.onIgnoreTagAttr;\n var safeAttrValue = options.safeAttrValue;\n var escapeHtml = options.escapeHtml;\n var attributeWrapSign = me.attributeWrapSign;\n var cssFilter = me.cssFilter;\n\n // remove invisible characters\n if (options.stripBlankChar) {\n html = DEFAULT.stripBlankChar(html);\n }\n\n // remove html comments\n if (!options.allowCommentTag) {\n html = DEFAULT.stripCommentTag(html);\n }\n\n // if enable stripIgnoreTagBody\n var stripIgnoreTagBody = false;\n if (options.stripIgnoreTagBody) {\n stripIgnoreTagBody = DEFAULT.StripTagBody(\n options.stripIgnoreTagBody,\n onIgnoreTag\n );\n onIgnoreTag = stripIgnoreTagBody.onIgnoreTag;\n }\n\n var retHtml = parseTag(\n html,\n function (sourcePosition, position, tag, html, isClosing) {\n var info = {\n sourcePosition: sourcePosition,\n position: position,\n isClosing: isClosing,\n isWhite: Object.prototype.hasOwnProperty.call(whiteList, tag),\n };\n\n // call `onTag()`\n var ret = onTag(tag, html, info);\n if (!isNull(ret)) return ret;\n\n if (info.isWhite) {\n if (info.isClosing) {\n return \"\";\n }\n\n var attrs = getAttrs(html);\n var whiteAttrList = whiteList[tag];\n var attrsHtml = parseAttr(attrs.html, function (name, value) {\n // call `onTagAttr()`\n var isWhiteAttr = _.indexOf(whiteAttrList, name) !== -1;\n var ret = onTagAttr(tag, name, value, isWhiteAttr);\n if (!isNull(ret)) return ret;\n\n if (isWhiteAttr) {\n // call `safeAttrValue()`\n value = safeAttrValue(tag, name, value, cssFilter);\n if (value) {\n return name + '=' + attributeWrapSign + value + attributeWrapSign;\n } else {\n return name;\n }\n } else {\n // call `onIgnoreTagAttr()`\n ret = onIgnoreTagAttr(tag, name, value, isWhiteAttr);\n if (!isNull(ret)) return ret;\n return;\n }\n });\n\n // build new tag html\n html = \"<\" + tag;\n if (attrsHtml) html += \" \" + attrsHtml;\n if (attrs.closing) html += \" /\";\n html += \">\";\n return html;\n } else {\n // call `onIgnoreTag()`\n ret = onIgnoreTag(tag, html, info);\n if (!isNull(ret)) return ret;\n return escapeHtml(html);\n }\n },\n escapeHtml\n );\n\n // if enable stripIgnoreTagBody\n if (stripIgnoreTagBody) {\n retHtml = stripIgnoreTagBody.remove(retHtml);\n }\n\n return retHtml;\n};\n\nmodule.exports = FilterXSS;\n"],"names":["DEFAULT","parseStyle","FilterCSS","options","shallowCopyObject","obj","ret","i","css","me","whiteList","onAttr","onIgnoreAttr","safeAttrValue","sourcePosition","position","name","value","source","check","isWhite","RegExp","opts","module","getDefaultWhiteList","REGEXP_URL_JAVASCRIPT","exports","html","xss","window","_","cssLength","isParenthesisOpen","lastPos","retCSS","addNewAttr","j","c","arr","item","Array","fn","scope","str","String","getDefaultCSSWhiteList","defaultCSSFilter","escapeHtml","REGEXP_LT","REGEXP_GT","REGEXP_QUOTE","REGEXP_QUOTE_2","REGEXP_ATTR_VALUE_1","REGEXP_ATTR_VALUE_COLON","REGEXP_ATTR_VALUE_NEWLINE","REGEXP_DEFAULT_ON_TAG_ATTR_4","REGEXP_DEFAULT_ON_TAG_ATTR_7","REGEXP_DEFAULT_ON_TAG_ATTR_8","escapeQuote","unescapeQuote","escapeHtmlEntities","code","parseInt","escapeDangerHtml5Entities","clearNonPrintableCharacter","str2","len","friendlyAttrValue","escapeAttrValue","tag","cssFilter","tags","next","isRemoveAllTag","removeList","posStart","end","rethtml","pos","retHtml","chars","char","parser","FilterXSS","filterXSS","self","DedicatedWorkerGlobalScope","REGEXP_ILLEGAL_ATTR_NAME","stripQuoteWrap","text","onTag","tagStart","quoteStart","currentPos","currentTagName","currentHtml","chariterator","getTagName","tagName","ic","lastMarkPos","retAttrs","tmpName","addAttr","v","findNextQuotationMark","findNextEqual","findBeforeEqual","match","reg","parseTag","parseAttr","console","keysToLowerCase","onIgnoreTag","onTagAttr","onIgnoreTagAttr","attributeWrapSign","stripIgnoreTagBody","isClosing","info","Object","attrs","getAttrs","whiteAttrList","attrsHtml","isWhiteAttr"],"mappings":"sGAMA,IAAIA,EAAU,EAAQ,MAClBC,EAAa,EAAQ,OAqCzB,SAASC,EAAWC,CAAO,EAEzBA,AADAA,CAAAA,EAAUC,AAlBZ,SAA4BC,CAAG,EAC7B,IAAIC,EAAM,CAAC,EACX,IAAK,IAAIC,KAAKF,E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