!function(e){e("[data-antragsgruen-load-class]").each(function(){var n=e(this).data("antragsgruen-load-class");requirejs([n])}),e("[data-antragsgruen-widget]").each(function(){var n=e(this),t=n.data("antragsgruen-widget");requirejs([t],function(e){var a=t.split("/");new e[a[a.length-1]](n)})}),e(".jsProtectionHint").each(function(){var n=e(this);e('<input type="hidden" name="jsprotection">').attr("value",n.data("value")).appendTo(n.parent()),n.remove()}),e(document).on("click",".amendmentAjaxTooltip",function(n){var t=e(n.currentTarget);"0"==t.data("initialized")&&(t.data("initialized","1"),t.popover({html:!0,trigger:"manual",container:"body",template:'<div class="popover popover-amendment-ajax" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>',content:function(){var n="pop_"+(new Date).getTime(),a='<div id="'+n+'">Loading...</div>',o=t.data("url");return e.get(o,function(t){e("#"+n).html(t)}),a}})),e(".amendmentAjaxTooltip").not(t).popover("hide"),t.popover("toggle")}),e(document).on("click",function(n){var t=e(n.target);t.hasClass("amendmentAjaxTooltip")||t.hasClass("popover")||0!=t.parents(".amendmentAjaxTooltip").length||0!=t.parents(".popover").length||e(".amendmentAjaxTooltip").popover("hide")});var n=function(t){var a="0.",o=t.find("> li.agendaItem");o.each(function(){var t=e(this),o=t.data("code"),i="",r=t.find("> ol");if("#"==o){var d=a.split("."),p=d[0].match(/^(.*[^0-9])?([0-9]*)$/),c="undefined"==typeof p[1]?"":p[1],l=parseInt(""==p[2]?"1":p[2]);d[0]=c+ ++l,a=i=d.join(".")}else i=a=o;t.find("> div > h3 .code").text(i),r.length>0&&n(r)})};e("ol.motionListAgenda").on("antragsgruen:agenda-change",function(){n(e(this))}).trigger("antragsgruen:agenda-change"),window.__t=function(e,n){return"undefined"==typeof ANTRAGSGRUEN_STRINGS?"@TRANSLATION STRINGS NOT LOADED":"undefined"==typeof ANTRAGSGRUEN_STRINGS[e]?"@UNKNOWN CATEGORY: "+e:"undefined"==typeof ANTRAGSGRUEN_STRINGS[e][n]?"@UNKNOWN STRING: "+e+" / "+n:ANTRAGSGRUEN_STRINGS[e][n]}}(jQuery);
//# sourceMappingURL=Antragsgruen.js.map
