jQuery(document).ready((function($){function t(t){var i=t.attr("id"),r=t.attr("class"),n=t.attr("src");n.endsWith("svg")?$.get(n,(function(s){var o=$(s).find("svg"),a=o.attr("id");void 0===i?void 0===a?(i="svg-replaced-"+e,o=o.attr("id",i)):i=a:o=o.attr("id",i),void 0!==r&&(o=o.attr("class",r+" replaced-svg svg-replaced-"+e)),o=o.removeAttr("xmlns:a"),"on"===frontSanitizationEnabled&&""!=o[0].outerHTML&&(console.log("Sanitizing SVG:",n),o=DOMPurify.sanitize(o[0].outerHTML)),t.replaceWith(o),$(document).trigger("svg.loaded",[i]),e++}),"xml").fail((function(){console.error("Failed to load SVG:",n)})):console.log("Not an SVG:",n)}let e=0;(bodhisvgsInlineSupport=function(){var e;console.log("Running bodhisvgsInlineSupport"),"true"===ForceInlineSVGActive&&jQuery("img").each((function(){void 0!==jQuery(this).attr("src")&&!1!==jQuery(this).attr("src")&&jQuery(this).attr("src").match(/\.(svg)/)&&(jQuery(this).hasClass(cssTarget.ForceInlineSVG)||jQuery(this).addClass(cssTarget.ForceInlineSVG))})),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var i=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>i.length)&&(e=i.length),e-=t.length;var r=i.lastIndexOf(t,e);return-1!==r&&r===e}),String.prototype.endsWith=function(t){var e=this.length-t.length;return e>=0&&this.lastIndexOf(t)===e},e="true"===ForceInlineSVGActive?"img."!==cssTarget.Bodhi?cssTarget.Bodhi:"img.style-svg":"img."!==cssTarget?cssTarget.Bodhi:"img.style-svg",console.log("Initial target:",e),"string"==typeof e?(e=e.replace("img",""),console.log("Modified target:",e),$(e).each((function(e){void 0!==$(this).attr("src")&&!1!==$(this).attr("src")?t($(this)):$(this).find("img").each((function(e){void 0!==$(this).attr("src")&&!1!==$(this).attr("src")&&t($(this))}))}))):console.error("Target is not a string:",e)})()}));