// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
define("dojo/_base/declare dojo/_base/array dijit/_WidgetBase dojo/_base/lang dojo/Evented libs/arcgis-html-sanitizer/arcgis-html-sanitizer".split(" "),function(l,g,m,f,n,p){var h=null,k=l([m,n],{baseClass:"jimu-editor-xss-filter",declaredClass:"jimu.dijit.EditorXssFilter",sanitizer:null,xss:null,whiteList:{},graphicsWhiteList:{},postCreate:function(){this.whiteList=this._getWhiteList();this.sanitizer=new p({whiteList:this.whiteList,safeAttrValue:f.hitch(this,function(a,b,c,e){return"style"===b?this.xss.friendlyAttrValue(c).replace(/"/g,
"'"):"img"===a&&"src"===b?this.xss.escapeAttrValue(c):this.xss.safeAttrValue(a,b,c,e)}),onTag:f.hitch(this,function(a,b,c){if(c.isWhite&&this._isInWhiteList(a,this.graphicsWhiteList))return b}),onIgnoreTagAttr:f.hitch(this,function(a,b,c,e){if("data-"===b.substr(0,5))return b+'\x3d"'+this.xss.escapeAttrValue(c)+'"'}),onIgnoreTag:f.hitch(this,function(a,b,c){if("o:"===a.substr(0,2)||"!--[if"===a||"!--[endif]--"===a)return b})},!0);this.xss=this.sanitizer.xss},sanitize:function(a){return this.sanitizer.sanitize(a)},
_getWhiteList:function(){var a="title height width class style font-family id align text-align".split(" "),b={div:a,h1:a,h2:a,h3:a,h4:a,h5:a,h6:a,span:a,p:a,s:a,strong:a,em:a,u:a,ol:a,ul:a,li:a,a:["href","target"].concat(a),img:["src","alt","border"].concat(a),blockquote:a,font:["face","size","color"].concat(a),pre:a,code:a,b:a,i:a,wbr:a,video:"autoplay controls loop muted poster preload".split(" ").concat(a),audio:["autoplay","controls","loop","muted","preload"].concat(a),source:["media","src","type"].concat(a),
table:["cellpadding","cellspacing","border"].concat(a),tbody:[].concat(a),tr:["valign"].concat(a),td:["valign","colspan","rowspan","nowrap"].concat(a),th:["valign","colspan","rowspan","nowrap"].concat(a),hr:a,html:a,title:a,link:["rel","href"],style:["type"].concat(a),body:a};this.graphicsWhiteList={animate:[],animateMotion:[],animateTransform:[],circle:[],clipPath:[],"color-profile":[],defs:[],desc:[],discard:[],ellipse:[],feBlend:[],feColorMatrix:[],feComponentTransfer:[],feComposite:[],feConvolveMatrix:[],
feDiffuseLighting:[],feDisplacementMap:[],feDistantLight:[],feDropShadow:[],feFlood:[],feFuncA:[],feFuncB:[],feFuncG:[],feFuncR:[],feGaussianBlur:[],feImage:[],feMerge:[],feMergeNode:[],feMorphology:[],feOffset:[],fePointLight:[],feSpecularLighting:[],feSpotLight:[],feTile:[],feTurbulence:[],filter:[],foreignObject:[],g:[],hatch:[],hatchpath:[],line:[],linearGradient:[],marker:[],mask:[],mesh:[],meshgradient:[],meshpatch:[],meshrow:[],metadata:[],mpath:[],path:[],pattern:[],polygon:[],polyline:[],
radialGradient:[],rect:[],set:[],solidcolor:[],stop:[],svg:[],switch:[],symbol:[],text:[],textPath:[],title:[],tspan:[],use:[],view:[],object:[],canvas:a};return this._extendObjectOfArrays([b,{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align",
"valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width",
"rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:"autoplay controls loop preload src height width".split(" ")},this.graphicsWhiteList])},_extendObjectOfArrays:function(a){var b={};g.forEach(a,function(c){var e=Object.keys(c);g.forEach(e,function(d){Array.isArray(c[d])&&Array.isArray(b[d])?b[d]=b[d].concat(c[d]):b[d]=c[d]},this)},this);return b},_isInWhiteList:function(a,b){b=Object.keys(b);var c=!1;g.forEach(b,function(e){a===e&&
(c=!0)},this);return c}});k.getInstance=function(){null===h&&(h=new k);return h};return k});