{"version":3,"names":[],"mappings":"","sources":["default.js"],"sourcesContent":["(function($, Drupal, window, document, drupalSettings) {\n Drupal.behaviors.babysleepcontent = {\n attach: function (context) { \n\n $(once('bind-click-event', '.toggle-download-links', context)).each(function () {\n $(this).on('click', function() { \n console.log('toggle-download-links');\n $('.links-wrapper').fadeToggle();\n return false;\n });\n }); \n \n\n }\n }\n\n})(jQuery, Drupal, this, this.document, drupalSettings);\n\njQuery.fn.extend({\n treed: function (o) {\n \n var openedClass = \"fa-minus\";\n var closedClass = \"fa-plus\";\n var selectedClass = \"selected\"; // Add the selected class\n\n if (o && o.openedClass) openedClass = o.openedClass;\n if (o && o.closedClass) closedClass = o.closedClass;\n\n // initialize each of the top levels\n var tree = jQuery(this).addClass(\"sidebar_acc\");\n tree.find(\"li:has(ul)\").addClass(\"branch\").click(function (e) {\n if (this == e.target) {\n var icon = jQuery(this).children(\"i:first\");\n icon.toggleClass(openedClass + \" \" + closedClass);\n jQuery(this).children().children().slideToggle(200); // Adjust the speed (e.g., 200 milliseconds)\n\n // Add the selected class to the parent branch\n jQuery(this).siblings().removeClass(selectedClass);\n jQuery(this).toggleClass(selectedClass);\n }\n }).children().children().toggle();\n\n // fire event from the dynamically added icon\n tree.find(\".branch .indicator\").click(function () {\n jQuery(this).closest(\"li\").click();\n });\n\n // fire event to open branch if the li contains an anchor or button\n tree.find(\".branch > i\").click(function (e) {\n jQuery(this).closest(\"li\").click();\n e.preventDefault();\n });\n\n // Keep the selected branch open by default\n tree.find(\".branch.selected\").children().children().show();\n\n \n\n }\n});\n\n// Initialization of treeviews\njQuery(\"#tree_map\").treed();\n"],"file":"../default.js"}