jQuery(document).ready(function(A){"use strict";function n(){A("body .tpl-dt-select").each(function(){A(this).has(".select2").length<1&&!A(this).hasClass("no-select2")&&!A(this).parents("#tpl_repeater_bank").length&&(A(this).is(".tpl-dt-font_awesome")?A(this).find("select").select2(i):A(this).find("select").select2(e))})}function t(t){return""!=t.id?t.text:t.text.name}function l(){A("body .tpl-field.tpl-dt-tinymce").not(A("body .tpl-field.tpl-dt-tinymce.tpl-admin-hide")).each(function(){var t=A(this).find("textarea").attr("id");tinyMCE.execCommand("mceAddEditor",!1,t)}),A("body .tpl-field.tpl-dt-tinymce.tpl-admin-hide").each(function(){var t=A(this).find("textarea").attr("id");tinyMCE.execCommand("mceRemoveEditor",!1,t)})}function p(){A(".tpl-repeat").each(function(){A(this).parent().addClass("tpl-repeater")}),void 0!==A.ui.sortable&&A(".tpl-repeater").sortable({handle:".tpl-arranger",update:function(t,e){r(A(this))},start:function(t,e){e.placeholder.height(e.item.height()),e.item.closest(".tpl-repeater").find(".tpl-field.tpl-dt-tinymce textarea").each(function(){var t=A(this).attr("id");tinyMCE.execCommand("mceRemoveEditor",!1,t)})},stop:function(t,e){l()}})}function r(t){var r=window.location.href,d=[];d[0]=0;t.find(".tpl-field").each(function(){var t=parseInt(A(this).attr("data-level")),a=A(this).attr("data-name").split("/");if(0parseInt(A(this).closest('[data-name="'+o(l)+'"]').attr("data-instance"))+1&&parseInt(A(s).attr("data-level"))<3&&A(p).is(".tpl-preview-multi")?n.replace(e,d(A(this)))+" / "+e:n.replace(e,d(A(this))))})})}),A.each(t,function(t,e){n=n.replace(e,"")})}else{var i=A(".tpl-field",this).length;A(".tpl-field",this).each(function(t){l=A(this).attr("data-name"),e=a(A(this))+"_preview-template",void 0!==TPL_Admin[e]?(n+=TPL_Admin[e],A("*[class*=tpl-preview-]",this).each(function(t){n=n.replace("[tpl-preview-"+t+"]",d(A(this)))})):A("*[class*=tpl-preview-]",this).each(function(t){n+=d(A(this))}),t":o