!function(a){"use strict";var b=function(b){var c,d;d={},d.readOnly=void 0!==a(b).data("readonly")&&a(b).data("readonly"),d.lineNumbers=void 0!==a(b).data("linenumbers")&&a(b).data("linenumbers"),d.lineWrapping=void 0!==a(b).data("linewrapping")&&a(b).data("linewrapping"),d.theme=void 0!==a(b).data("theme")?a(b).data("theme"):"default",d.mode=void 0!==a(b).data("mode")?a(b).data("mode"):"text/html",c=wp.CodeMirror.fromTextArea(b,d),a(b).addClass("code-mirror-initialized"),c.setSize("100%","auto"),a(document).trigger("resize"),a(b).parents(".fusion-syntax-highlighter-container").css("opacity","1")};a(document).ready(function(){var c,d,e,f=a(".fusion-syntax-highlighter-textarea");a.each(f,function(c,f){d=a(f).parents(".fusion-tabs"),e=a(f).parents(".fusion-panel"),d.length?0===d.find(".nav-tabs li.active").index()&&d.find(".nav-tabs li.active .tab-link").attr("href")==="#"+a(f).parents(".tab-pane").attr("id")?b(f):d.find(".tab-link").click(function(){a(this).attr("href")!=="#"+a(f).parents(".tab-pane").attr("id")||a(f).hasClass("code-mirror-initialized")||setTimeout(function(){b(f)},200)}):e.length?(e.find(".panel-title a.active").length&&(f=e.find(e.find(".panel-title a.active").attr("href")).find(".fusion-syntax-highlighter-textarea")[0],b(f)),e.find(".panel-title a").click(function(){a(this).attr("href")!=="#"+a(f).parents(".panel-collapse").attr("id")||a(f).hasClass("code-mirror-initialized")||setTimeout(function(){b(f)},200)})):b(f)}),a(".syntax-highlighter-copy-code-title").click(function(){var b=a(this);c=document.getElementById(a(this).data("id")),b.parent(".syntax-highlighter-copy-code").addClass("syntax-highlighter-copying"),a(c).removeAttr("style").css({position:"absolute",left:"-1000%"}),a(c).select(),document.execCommand("Copy",!1,null),setTimeout(function(){b.parent(".syntax-highlighter-copy-code").removeClass("syntax-highlighter-copying")},200)})})}(jQuery);