{"version":3,"file":"rui.min.js","sources":["https:\/\/lms.pes.edu\/theme\/alpha\/amd\/src\/rui.js"],"sourcesContent":["\/\/\n\/\/ This file is part of space theme for moodle\n\/\/\n\/\/ Moodle is free software: you can redistribute it and\/or modify\n\/\/ it under the terms of the GNU General Public License as published by\n\/\/ the Free Software Foundation, either version 3 of the License, or\n\/\/ (at your option) any later version.\n\/\/\n\/\/ Moodle is distributed in the hope that it will be useful,\n\/\/ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\/\/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\/\/ GNU General Public License for more details.\n\/\/\n\/\/ You should have received a copy of the GNU General Public License\n\/\/ along with Moodle. If not, see .\n\/\/\n\/\/\n\/\/ space main JS file\n\/\/\n\/\/ @package theme_alpha\n\/\/ @copyright Copyright \u00a9 2021 onwards Marcin Czaja Rosea Themes\n\/\/\n\/\/ @license Commercial\n\n\/* jshint ignore:start *\/\ndefine(['jquery', 'core\/log', 'core\/aria'], function($, log) {\n \"use strict\"; \/\/ ...jshint ;_; !!!\n\n log.debug('space AMD opt in functions');\n\n return {\n init: function() {\n $(document).ready(function($) {\n var trigger = $(document.getElementById(\"darkModeBtn\"));\n var preference = trigger.attr('data-preference');\n\n $('#darkModeBtn').click(function() {\n if ($('body').hasClass('theme-dark') ) {\n $('body').removeClass('theme-dark');\n $('html').removeClass('dark-mode');\n trigger.attr('aria-checked', 'false');\n M.util.set_user_preference(preference, 'false');\n } else {\n $('body').addClass('theme-dark');\n $('html').addClass('dark-mode');\n trigger.attr('aria-checked', 'true');\n M.util.set_user_preference(preference, 'true');\n }\n });\n\n $('.btn-close-drawer--left').click(function() {\n $('body').removeClass('drawer-courseindex--open');\n $('body').removeClass('drawer-open-index--open');\n });\n\n $('.btn-drawer--left').click(function() {\n $('body').addClass('drawer-courseindex--open');\n $('body').addClass('drawer-open-index--open');\n });\n\n $('#mobileNav, .rui-mobile-nav-btn-close').click(function() {\n $('#topBar').toggleClass('opened');\n });\n\n \/\/ Remove unnecessary string \"...\" from default moodle blocks\n $('.block .footer').each(function() {\n var text = $(this).html();\n $(this).html(text.replace('...', ''));\n }); \n\n $('.rui-nav--admin .nav-link').each(function() {\n var text = $(this).html();\n $(this).html(text.replace('(', ''));\n }); \n $('.rui-nav--admin .nav-link').each(function() {\n var text = $(this).html();\n $(this).html(text.replace(')', '<\/span>'));\n }); \n });\n\n }\n };\n});\n\/* jshint ignore:end *\/\n"],"names":["define","$","log","debug","init","document","ready","trigger","getElementById","preference","attr","click","hasClass","removeClass","M","util","set_user_preference","addClass","toggleClass","each","text","this","html","replace"],"mappings":";AAyBAA,yBAAO,CAAC,SAAU,WAAY,cAAc,SAASC,EAAGC,KAKpD,OAFAA,IAAIC,MAAM,8BAEH,CACHC,KAAM,WACFH,EAAEI,UAAUC,OAAM,SAASL,GACvB,IAAIM,QAAUN,EAAEI,SAASG,eAAe,gBACpCC,WAAaF,QAAQG,KAAK,mBAE9BT,EAAE,gBAAgBU,OAAM,WAChBV,EAAE,QAAQW,SAAS,eACnBX,EAAE,QAAQY,YAAY,cACtBZ,EAAE,QAAQY,YAAY,aACtBN,QAAQG,KAAK,eAAgB,SAC7BI,EAAEC,KAAKC,oBAAoBP,WAAY,WAEvCR,EAAE,QAAQgB,SAAS,cACnBhB,EAAE,QAAQgB,SAAS,aACnBV,QAAQG,KAAK,eAAgB,QAC7BI,EAAEC,KAAKC,oBAAoBP,WAAY,YAI\/CR,EAAE,2BAA2BU,OAAM,WAC\/BV,EAAE,QAAQY,YAAY,4BACtBZ,EAAE,QAAQY,YAAY,8BAG1BZ,EAAE,qBAAqBU,OAAM,WACzBV,EAAE,QAAQgB,SAAS,4BACnBhB,EAAE,QAAQgB,SAAS,8BAGvBhB,EAAE,yCAAyCU,OAAM,WAC9CV,EAAE,WAAWiB,YAAY,aAI5BjB,EAAE,kBAAkBkB,MAAK,WACrB,IAAIC,KAAOnB,EAAEoB,MAAMC,OACnBrB,EAAEoB,MAAMC,KAAKF,KAAKG,QAAQ,MAAO,QAGrCtB,EAAE,6BAA6BkB,MAAK,WAChC,IAAIC,KAAOnB,EAAEoB,MAAMC,OACnBrB,EAAEoB,MAAMC,KAAKF,KAAKG,QAAQ,IAAK,oDAEnCtB,EAAE,6BAA6BkB,MAAK,WAChC,IAAIC,KAAOnB,EAAEoB,MAAMC,OACnBrB,EAAEoB,MAAMC,KAAKF,KAAKG,QAAQ,IAAK,mBAMnD"}