Responsive Menu - Version 4.1.8

Version Description

(8th Feb 2022) = * Bug: Fixed security vulnerabilities * Bug: Fixed w3 validator CSS errors * Bug: Fixed unnecessary HTTP requests to theme config files

Download this release

Release Info

Developer expresstech
Plugin Icon 128x128 Responsive Menu
Version 4.1.8
Comparing to
See all releases

Code changes from version 4.1.7 to 4.1.8

readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: expresstech, responsivemenu, imvarunkmr, surajkumarsingh, infosatech
3
  Tags: responsive, mega menu, navigation, mobile, hamburger
4
  Requires at least: 3.6
5
- Tested up to: 5.8.2
6
- Stable tag: 4.1.7
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -117,6 +117,11 @@ To view our FAQ, please go to [https://responsive.menu/faq/](https://responsive.
117
 
118
  == Changelog ==
119
 
 
 
 
 
 
120
  = 4.1.7 (4 Jan 2022) =
121
  * Hotfix: Fixed issues where menu got disappeared after updating to 4.1.6.
122
  * Hotfix: Fixed issue where users were seeing a shortcode instead of actual menu after updating to 4.1.6
2
  Contributors: expresstech, responsivemenu, imvarunkmr, surajkumarsingh, infosatech
3
  Tags: responsive, mega menu, navigation, mobile, hamburger
4
  Requires at least: 3.6
5
+ Tested up to: 5.9
6
+ Stable tag: 4.1.8
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
117
 
118
  == Changelog ==
119
 
120
+ = 4.1.8 (8th Feb 2022) =
121
+ * Bug: Fixed security vulnerabilities
122
+ * Bug: Fixed w3 validator CSS errors
123
+ * Bug: Fixed unnecessary HTTP requests to theme config files
124
+
125
  = 4.1.7 (4 Jan 2022) =
126
  * Hotfix: Fixed issues where menu got disappeared after updating to 4.1.6.
127
  * Hotfix: Fixed issue where users were seeing a shortcode instead of actual menu after updating to 4.1.6
responsive-menu.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Responsive Menu
5
  Plugin URI: https://expresstech.io
6
  Description: Highly Customisable Responsive Menu Plugin for WordPress
7
- Version: 4.1.7
8
  Author: ExpressTech
9
  Text Domain: responsive-menu
10
  Author URI: https://responsive.menu
@@ -16,7 +16,7 @@ Tags: responsive, menu, responsive menu, mega menu, max mega menu, max menu
16
  * Constant as plugin version.
17
  */
18
  if ( ! defined( 'RMP_PLUGIN_VERSION' ) ) {
19
- define( 'RMP_PLUGIN_VERSION', '4.1.7' );
20
  }
21
 
22
  define( 'RESPONSIVE_MENU_URL', plugin_dir_url( __FILE__ ) );
4
  Plugin Name: Responsive Menu
5
  Plugin URI: https://expresstech.io
6
  Description: Highly Customisable Responsive Menu Plugin for WordPress
7
+ Version: 4.1.8
8
  Author: ExpressTech
9
  Text Domain: responsive-menu
10
  Author URI: https://responsive.menu
16
  * Constant as plugin version.
17
  */
18
  if ( ! defined( 'RMP_PLUGIN_VERSION' ) ) {
19
+ define( 'RMP_PLUGIN_VERSION', '4.1.8' );
20
  }
21
 
22
  define( 'RESPONSIVE_MENU_URL', plugin_dir_url( __FILE__ ) );
v4.0.0/assets/admin/build/js/rmpMain.js CHANGED
@@ -1,2 +1,2 @@
1
  /*! For license information please see rmpMain.js.LICENSE.txt */
2
- (function(){var __webpack_modules__={"./assets/admin/js/rmp-admin.js":function(){eval("/**\n * This is admin scripts file which contain the admin actions.\n *\n * @version 4.0.0\n *\n * @author Expresstech System\n *\n */\njQuery(document).ready(function (jQuery) {\n /**\n * Rollback the plugin version.\n *\n * @version 4.0.0\n *\n * @fires Click\n */\n jQuery('#rmp-rollback-version').on('click', function (e) {\n e.preventDefault();\n var version = jQuery('#rmp-versions').val();\n\n if ('3.1.30' === version) {\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n action: 'rmp_rollback_version'\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error) {\n jQuery(this).prop('disabled', false);\n },\n success: function success(response) {\n if (response.data.redirect) {\n location.href = response.data.redirect;\n }\n }\n });\n }\n });\n /**\n * Iframe loader and contents show/hide.\n */\n\n jQuery('#rmp-preview-iframe').on('load', function () {\n jQuery('#rmp-preview-iframe-loader').hide();\n jQuery('#rmp-menu-update-notification').remove();\n jQuery('#rmp-preview-iframe').show();\n jQuery('#rmp-preview-iframe').contents().find('a').on('click', function (e) {\n e.stopPropagation();\n e.preventDefault();\n var url = jQuery(this).attr('href'); // Prevent to load the customizer page on preview aria.\n\n if ('#' == url) {\n return;\n }\n\n if (url.indexOf('?') >= 0) {\n url = url + '&rmp_preview_mode=true';\n } else {\n url = url + '?rmp_preview_mode=true';\n }\n\n jQuery('#rmp-preview-iframe').attr('src', url);\n });\n });\n /**\n * Save the theme as template.\n *\n * @since 4.0.0\n *\n * @fires Click\n */\n\n jQuery('button#rmp-save-theme').on('click', function (e) {\n e.stopPropagation();\n e.preventDefault();\n var themeName = jQuery('#rmp-save-theme-name').val();\n\n if (3 > themeName.length) {\n alert('Please give meaning full name to this theme');\n return;\n }\n\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_save_theme',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'theme_name': themeName,\n 'menu_id': jQuery('#menu_id').val(),\n 'form': jQuery('#rmp-editor-form').serialize()\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error2) {\n console.log(_error2.statusText);\n },\n success: function success(response) {\n jQuery(e.target).parents('.rmp-dialog-contents').append('<div class=\"notice notice-success settings-error is-dismissible\"><p>' + response.data.message + '</p></div>');\n }\n });\n });\n /**\n * Ajax call to save the menu settings when click on update.\n *\n * @version 4.0.0\n *\n * @fires click\n */\n\n jQuery(document).on('click', 'button#rmp-save-menu-options,#rmp-menu-quick-update-button', function (e) {\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_save_menu_action',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'form': jQuery('#rmp-editor-form').serialize()\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery('#rmp-preview-iframe-loader').show();\n },\n error: function error(_error3) {\n console.log(_error3.statusText);\n jQuery('#rmp-preview-iframe-loader').hide();\n },\n success: function success(response) {\n // If options is updated successfully then reload the iframe.\n if (response.success) {\n var url = jQuery('#rmp-preview-iframe').attr('src');\n jQuery('#rmp-preview-iframe').attr('src', url);\n }\n }\n });\n }); // Initiate the color picker instances.\n\n jQuery('.rmp-color-input').wpColorPicker(); // Fix events glitch on color textbox.\n\n jQuery('.rmp-color-input').removeAttr('style');\n jQuery(document).find('.rmp-color-input').off('focus'); // Initiate the tab elements.\n\n jQuery('.tabs,#rmp-setting-tabs').tabs({\n hide: {\n effect: 'explode',\n duration: 1000\n },\n show: {\n effect: 'explode',\n duration: 800\n },\n active: 0\n }); // Active tabs under ordering elements.\n\n jQuery('.nav-tab-wrapper').on('click', '.nav-tab', function (e) {\n jQuery('.nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');\n jQuery(this).addClass('nav-tab-active');\n });\n /**\n * Hamburger element selector option hide and show.\n */\n\n hideShowSelect('#rmp-menu-button-position-type', '.rmp-menu-hamburger-selector-div', 'show', 'inside-element');\n jQuery('#rmp-menu-button-position-type').on('change', function () {\n hideShowSelect(this, '.rmp-menu-hamburger-selector-div', 'show', 'inside-element');\n });\n /**\n * select hide show function\n * @para string select, string show/hide Element, string show/hide\n */\n\n function hideShowSelect(checkElement, targetElement, condition, value) {\n if (jQuery(checkElement).val() == value) {\n if (condition == 'show') {\n jQuery(targetElement).show();\n } else {\n jQuery(targetElement).hide();\n }\n } else {\n if (condition == 'show') {\n jQuery(targetElement).hide();\n } else {\n jQuery(targetElement).show();\n }\n }\n }\n /**\n * Check open/close of device options switcher.\n *\n * @version 4.0.0\n *\n * @fires click\n */\n\n\n jQuery('.rmp-device-switcher').on('click', function () {\n var isOpen = jQuery(this).hasClass('open');\n\n if (isOpen) {\n jQuery(this).removeClass('open');\n } else {\n jQuery('.rmp-device-switcher').removeClass('open');\n jQuery(this).addClass('open');\n }\n });\n /**\n * Change the option when select a device.\n *\n * @version 4.0.0\n *\n * @fires click\n */\n\n jQuery('.rmp-device-switcher li').on('click', function () {\n var selectedDevice = jQuery(this).attr('data-device');\n var firstDevice = jQuery('.rmp-device-switcher li:first-child').attr('data-device');\n\n if (selectedDevice != firstDevice) {\n activeDeviceOptions(selectedDevice);\n\n if ('desktop' == selectedDevice) {\n jQuery('#rmp-preview-desktop').trigger('click');\n } else if ('tablet' == selectedDevice) {\n jQuery('#rmp-preview-tablet').trigger('click');\n } else {\n jQuery('#rmp-preview-mobile').trigger('click');\n }\n }\n });\n /**\n * Active all the device options in editor.\n *\n * @version 4.0.0;\n * @param {string} selectedDevice This device name which is active.\n */\n\n function activeDeviceOptions(selectedDevice) {\n var firstDevice = jQuery('.rmp-device-switcher li:first-child').attr('data-device');\n var selectedIcon = jQuery('.rmp-device-switcher li[data-device=' + selectedDevice + ']').html();\n var firstIcon = jQuery('.rmp-device-switcher li:first-child').html();\n jQuery('.rmp-device-switcher li').each(function () {\n if (jQuery(this).attr('data-device') === selectedDevice) {\n jQuery(this).html(firstIcon);\n jQuery(this).attr('data-device', firstDevice);\n } else if (jQuery(this).attr('data-device') === firstDevice) {\n jQuery(this).html(selectedIcon);\n jQuery(this).attr('data-device', selectedDevice);\n }\n });\n }\n /**\n * Close the device switcher when mouseup other places.\n *\n * @version 4.0.0\n *\n * @fires mouseup\n */\n\n\n jQuery(document).on('mouseup', function (event) {\n var target = event.target;\n var deviceSwitcher = jQuery('.rmp-device-switcher');\n\n if (!deviceSwitcher.is(target) && 0 === deviceSwitcher.has(target).length) {\n deviceSwitcher.removeClass('open');\n }\n });\n /**\n * Active preview as per clicked device.\n *\n * @version 4.0.0\n *\n * @fires Click\n */\n\n jQuery('#rmp-editor-footer .rmp-preview-device-wrapper').on('click', 'button', function (e) {\n jQuery('#rmp-editor-footer').find('.rmp-preview-device-wrapper button').removeClass('active');\n jQuery('#rmp-editor-footer').find('.rmp-preview-device-wrapper button').attr('aria-pressed', 'false');\n jQuery(this).addClass('active');\n jQuery(this).attr('aria-pressed', 'true');\n var device = jQuery(this).data('device');\n var deviceEditor = jQuery('#rmp-editor-wrapper');\n var allClasses = deviceEditor.attr('class').split(' ');\n allClasses.forEach(function (value) {\n if (value.includes('rmp-preview-')) {\n deviceEditor.removeClass(value);\n }\n });\n deviceEditor.addClass('rmp-preview-' + device);\n activeDeviceOptions(device);\n });\n /**\n * Instantiate the accordion elements.\n * @version 4.0.0\n */\n\n jQuery('.rmp-accordion-container,.rmp-sub-accordion-container').accordion({\n collapsible: true,\n heightStyle: 'content',\n animate: 200,\n active: 0\n });\n /**\n * Instantiate the draggable and sortable menu item order elements.\n * \t@version 4.0.0\n */\n\n jQuery('#rmp-menu-ordering-items').accordion().sortable({\n placeholder: 'sortable-placeholder',\n opacity: 0.9,\n cursor: 'move',\n delay: 150,\n forcePlaceholderSize: true,\n active: false\n });\n /**\n * Stop propagating when click on item control element.\n */\n\n jQuery('#tab-container .item-controls, #tab-header-bar .item-controls').on('click', function (event) {\n event.stopPropagation();\n });\n /**\n * Show/Hide tooltip for option description.\n *\n * @version 4.0.0\n *\n * @fires click,mouseleave\n */\n\n jQuery('.rmp-tooltip-icon').on('click', function (e) {\n if (jQuery(this).hasClass('show-tooltip')) {\n return;\n } else {\n jQuery(this).addClass('show-tooltip');\n }\n\n var toolTipContents = jQuery(this).find('.rmp-tooltip-content');\n toolTipContents.css({\n 'left': e.pageX - toolTipContents.width() / 100 * 60,\n 'position': 'fixed',\n 'top': e.pageY - toolTipContents.height() - 10,\n 'bottom': 'unset'\n });\n toolTipContents.fadeIn();\n }).on('mouseleave', function () {\n jQuery(this).removeClass('show-tooltip');\n jQuery(this).find('.rmp-tooltip-content').fadeOut();\n });\n /**\n * Remove image from image picker\n *\n * @version 4.0.0\n *\n * @fires Click\n */\n\n jQuery('.rmp-image-picker ').on('click', '.rmp-image-picker-trash', function (e) {\n e.stopPropagation();\n e.preventDefault();\n jQuery(this).parent('.rmp-image-picker').siblings('input.rmp-image-url-input').val('');\n jQuery(this).parent('.rmp-image-picker').removeAttr('style');\n jQuery(this).remove();\n\n if (!jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length) {\n addUpdateNotification();\n }\n });\n /**\n * Show/Hide the theme uploader section in theme page.\n */\n\n jQuery('#rmp-upload-new-theme').on('click', function () {\n jQuery('#rmp-menu-library-import').toggleClass('hide');\n });\n /**\n * Hide theme uploader section when click on cancel.\n */\n\n jQuery('#rmp-menu-library-import-form').on('click', '.cancel', function (e) {\n jQuery('#rmp-menu-library-import').addClass('hide');\n });\n /**\n * Upload the theme file using dropzone.\n *\n * @version 4.0.0\n */\n\n jQuery('#rmp-menu-library-import-form').dropzone({\n clickable: true,\n acceptedFiles: '.zip',\n uploadMultiple: false,\n success: function success(file, response) {\n location.reload();\n },\n totaluploadprogress: function totaluploadprogress() {\n jQuery('.rmp-page-loader').css('display', 'flex');\n }\n });\n /**\n * Open theme options in editor footer.\n */\n\n jQuery('#rmp-theme-action').on('click', function (e) {\n jQuery('#rmp-footer-theme-options').toggleClass('open');\n });\n /**\n * Show/Hide the save theme wizard.\n */\n\n jQuery('.rmp-theme-save-button, #rmp-menu-save-theme-wizard .rmp-dialog-wrap .close').on('click', function (e) {\n jQuery('#rmp-menu-save-theme-wizard').toggle();\n });\n /**\n * Delete the theme from theme page.\n */\n\n jQuery('.rmp-theme-delete').on('click', function (e) {\n e.preventDefault();\n /** Ask for delete confirmation */\n\n var isConfirm = confirm('Are you sure, You want to delete this theme ?');\n\n if (!isConfirm) {\n return;\n } //Show the loader on deleting theme.\n\n\n var current_theme = jQuery(this);\n current_theme.append('<span class=\"spinner is-active\"></span>');\n var themeName = jQuery(this).attr('data-theme');\n var themeType = jQuery(this).attr('data-theme-type').toLowerCase();\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_theme_delete',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'theme_name': themeName,\n 'theme_type': themeType\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error4) {\n console.log(_error4.statusText);\n },\n success: function success(response) {\n current_theme.find('.spinner').removeClass('is-active');\n\n if (response.success) {\n location.reload();\n } else {\n alert(response.data.message);\n }\n }\n });\n });\n /**\n * Apply the selected theme in current active menu in editor.\n *\n * @version 4.0.0\n *\n * @fires click\n */\n\n jQuery(document).on('click', '.rmp-theme-apply', function (e) {\n //Show the overlay with loader.\n jQuery('.rmp-page-loader').css('display', 'flex');\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_theme_apply',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'theme_name': jQuery(this).attr('theme-name'),\n 'theme_type': jQuery(this).attr('theme-type').toLowerCase(),\n 'menu_id': jQuery('#menu_id').val(),\n 'menu_to_use': jQuery('#rmp-menu-to-use').val()\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error5) {\n console.log(_error5.statusText);\n jQuery('.rmp-page-loader').hide();\n },\n success: function success(response) {\n if (response.success) {\n location.reload();\n } else {\n jQuery('.rmp-page-loader').hide();\n alert(response.data.message);\n }\n }\n });\n });\n /**\n * Save the global settings on click.\n *\n * @version 4.0.0\n *\n * @fires click\n */\n\n jQuery('.rmp-save-global-settings-button').on('click', function (e) {\n e.preventDefault();\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_save_global_settings',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'form': jQuery('#rmp-global-settings').serialize()\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery(this).prop('disabled', true);\n jQuery('.spinner').addClass('is-active');\n },\n error: function error(_error6) {\n console.log('Internal Error !' + _error6);\n },\n success: function success(response) {\n jQuery('.spinner').removeClass('is-active');\n jQuery(this).prop('disabled', false);\n }\n });\n });\n /**\n * Initiate multiple selectize option of editor.\n */\n\n jQuery('#rmp-keyboard-shortcut-close-menu,#rmp-keyboard-shortcut-open-menu').selectize({\n maxItems: 2,\n plugins: ['remove_button']\n });\n /**\n * Event to linked the group inputs.\n *\n * @fires Click\n */\n\n jQuery(document).on('click', 'button.rmp-group-input-linked', function () {\n jQuery(this).toggleClass('is-linked');\n });\n /**\n * Event to type on all sibblings input if linked.\n *\n * @fires keyup\n */\n\n jQuery(document).on('keyup', 'input.rmp-group-input', function (event) {\n var pressedKeys = this.value.toLocaleLowerCase();\n var parent = jQuery(this).parents('.rmp-input-group-control');\n var isLinked = parent.find('.is-linked');\n\n if (isLinked.length) {\n parent.find('input.rmp-group-input').val(pressedKeys);\n } else {\n jQuery(this).val(pressedKeys);\n }\n });\n /**\n * Function to add the notification and update button.\n */\n\n function addUpdateNotification() {\n if (!jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length) {\n jQuery('#rmp-editor-main').prepend('<div id=\"rmp-menu-update-notification\" class=\"rmp-order-item rmp-order-item-description\">' + '<span> <span class=\"rmp-font-icon dashicons dashicons-warning \"></span> Update Required </span>' + '<a href=\"javascript:void(0)\" id=\"rmp-menu-quick-update-button\">UPDATE</a>' + '</div>');\n }\n }\n\n jQuery('form#rmp-editor-form').on('keyup change paste', 'input, select, textarea, radio, checkbox', function () {\n if (!jQuery(this).hasClass('no-updates')) {\n addUpdateNotification();\n }\n });\n jQuery(document).on('click', '#rmp-icon-dialog-select,.media-button-select,.rmp-icon-picker,.rmp-image-picker', function () {\n if (!jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length) {\n addUpdateNotification();\n }\n });\n /**\n * Event to download exported menu settings as json file.\n *\n * @version 4.0.0\n */\n\n jQuery('#rmp-export-menu-button').on('click', function (e) {\n e.preventDefault();\n var menu_id = jQuery('#rmp_export_menu_list').val();\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_export_menu',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'menu_id': menu_id\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery('#rmp-export-menu-button').prop('disabled', true);\n },\n error: function error(_error7) {\n console.log(_error7.statusText);\n jQuery('#rmp-export-menu-button').prop('disabled', false);\n },\n success: function success(response) {\n jQuery('#rmp-export-menu-button').prop('disabled', false);\n\n if (response.data) {\n var menu_name = jQuery('#rmp_export_menu_list').children(\":selected\").text().trim().toLocaleLowerCase().split(' ').join('-');\n download_file(response.data, menu_name + '.json', 'application/json');\n }\n }\n });\n });\n /**\n * Function to download the content as file.\n *\n * @since 4.0.0\n *\n * @param {String} content Contents for file\n * @param {String} name Name of the file.\n * @param {String} type File type\n */\n\n function download_file(content, name, type) {\n var link = document.body.appendChild(document.createElement('a'));\n var file = new Blob([content], {\n type: type\n });\n link.href = URL.createObjectURL(file);\n link.download = name;\n link.click();\n }\n /**\n * Event to download exported menu settings as json file.\n *\n * @version 4.0.0\n */\n\n\n jQuery('#rmp-import-menu-button').on('click', function (e) {\n e.preventDefault();\n var menu_id = jQuery('#rmp_import_menu_list').val();\n\n if (!menu_id) {\n alert('Please create menu first ! ');\n return;\n }\n\n var file_data = jQuery('#rmp_input_import_file')[0].files[0];\n\n if (!file_data) {\n alert('Choose export file ! ');\n return;\n }\n\n var form_data = new FormData();\n form_data.append('file', file_data);\n form_data.append('ajax_nonce', rmpObject.ajax_nonce);\n form_data.append('menu_id', menu_id);\n form_data.append('action', 'rmp_import_menu');\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: form_data,\n type: 'POST',\n cache: false,\n contentType: false,\n processData: false,\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery('#rmp-import-menu-button').prop('disabled', true);\n },\n error: function error(_error8) {\n console.log(_error8.statusText);\n jQuery('#rmp-import-menu-button').prop('disabled', false);\n },\n success: function success(response) {\n jQuery('#rmp-import-menu-button').prop('disabled', false);\n noticeClass = 'notice-error';\n\n if (response.success) {\n noticeClass = 'notice-success';\n jQuery('#rmp_input_import_file').val('');\n }\n\n jQuery('#rmp-global-settings').before('<div class=\"notice ' + noticeClass + ' settings-error is-dismissible\"> <p>' + response.data.message + '</p></div>');\n setTimeout(function () {\n jQuery('#rmp-global-settings').parent().find('.notice').remove();\n }, 3000);\n }\n });\n });\n /**\n * Function to manage menu container animation options.\n *\n * @param {String} optionValue\n */\n\n function updateMenuContainerAnimationOptions(optionValue) {\n if ('push' === optionValue) {\n jQuery('#rmp-page-wrapper').parents('.rmp-input-control-wrapper').fadeIn();\n } else {\n jQuery('#rmp-page-wrapper').parents('.rmp-input-control-wrapper').fadeOut();\n }\n\n if ('fade' === optionValue) {\n jQuery('#rmp-menu-appear-from option[value=\"top\"]').hide();\n jQuery('#rmp-menu-appear-from option[value=\"bottom\"]').hide();\n } else {\n jQuery('#rmp-menu-appear-from option[value=\"top\"]').show();\n jQuery('#rmp-menu-appear-from option[value=\"bottom\"]').show();\n }\n } // Menu container animation type and their options.\n\n\n updateMenuContainerAnimationOptions(jQuery('#rmp-animation-type').val());\n jQuery('#rmp-editor-wrapper').on('change', '#rmp-animation-type', function (e) {\n var optionValue = jQuery(this).val();\n updateMenuContainerAnimationOptions(optionValue);\n });\n /**\n * Event to back on home page under preview screen.\n *\n * @since 4.1.0\n *\n * @fires click\n *\n * @return void\n */\n\n jQuery('#rmp-preview-wrapper').on('click', function () {\n var url = window.location.href;\n url = url.substring(0, url.indexOf('wp-admin')) + '?rmp_preview_mode=true';\n jQuery('#rmp-preview-iframe-loader').show();\n jQuery('#rmp-preview-iframe').attr('src', url);\n });\n /** Call ajax to hide admin notice permanent. */\n\n jQuery('.notice-responsive-menu').on('click', '.notice-dismiss', function (event) {\n event.preventDefault();\n jQuery.ajax({\n type: \"POST\",\n url: rmpObject.ajaxURL,\n data: 'action=rmp_upgrade_admin_notice_dismiss'\n });\n });\n});\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/js/rmp-admin.js?")},"./assets/admin/js/rmp-editor.js":function(){eval("/**\n * This file container the editor multi level features.\n *\n * @version 4.0.0\n *\n * @type {Object}\n */\nvar rmpEditor = {\n editorSidebar: '#rmp-editor-wrapper',\n sidebarDrawer: 'button.collapse-sidebar',\n mainForm: '#rmp-editor-form',\n editorContainer: '#rmp-editor-main',\n topParentNav: '#rmp-editor-nav',\n topParentTab: '#rmp-editor-pane',\n childTabs: '.rmp-accordions',\n parentTabItem: '.rmp-editor-pane-parent li.rmp-tab-item',\n tabItem: 'li.rmp-tab-item',\n quickItem: '.rmp-quick-edit-link',\n tabItemTitle: '.rmp-tab-item-title',\n titleLogo: '.rmp-editor-header-logo',\n closeButton: '.rmp-editor-header-close',\n searchButton: '.rmp-search-settings-btn',\n searchForm: '.rmp-search-settings',\n titleText: '.rmp-editor-header-title',\n backButton: '.rmp-editor-header-back',\n accordionItem: 'li.rmp-accordion-item',\n tabId: null,\n level: 0,\n triggerBack: function triggerBack() {\n this.level--;\n parentId = jQuery('#' + this.tabId).attr('aria-parent');\n jQuery('#' + parentId).show();\n var title = jQuery('#' + parentId).attr('aria-label');\n this.updateHeader(title);\n jQuery('#' + this.tabId).hide();\n this.tabId = parentId;\n },\n updatePanel: function updatePanel(current) {\n this.tabId = current.attr('aria-owns');\n jQuery('#' + this.tabId).show();\n parentId = current.parent('ul').parent('div').attr('id');\n jQuery('#' + this.tabId).attr('aria-parent', parentId);\n jQuery('#' + parentId).hide();\n },\n updateQuickPanel: function updateQuickPanel(current) {\n this.tabId = current.attr('aria-owns');\n var accordionId = current.attr('accordion-id');\n var subAccordionId = current.attr('sub-accordion-id');\n var subTabId = current.attr('sub-tab-id');\n parentId = jQuery(\".rmp-accordions:visible\").attr('id');\n jQuery('#' + this.tabId).attr('aria-parent', parentId);\n jQuery('#' + parentId).hide();\n jQuery('#' + this.tabId).show();\n\n if (accordionId != '') {\n if (!jQuery('#' + accordionId).hasClass(\"ui-state-active\")) {\n jQuery('#' + accordionId).click();\n }\n\n if (subAccordionId != '') {\n if (!jQuery('#' + subAccordionId).hasClass(\"ui-state-active\")) {\n jQuery('#' + subAccordionId).click();\n }\n\n accordionId = subAccordionId;\n }\n\n setTimeout(function () {\n var topPos = document.getElementById(accordionId).offsetTop;\n jQuery('#rmp-editor-main').animate({\n scrollTop: topPos - 60 + 'px'\n }, 500);\n }, 400);\n }\n\n if (subTabId != '') {\n jQuery('#' + subTabId).click();\n }\n },\n updateHeader: function updateHeader(title) {\n if (0 == this.level) {\n jQuery(this.titleLogo).find('img').show();\n jQuery(this.closeButton).show();\n jQuery(this.backButton).hide();\n jQuery(this.searchForm).css('width', '200');\n } else if (1 == this.level) {\n jQuery(this.backButton).css('display', 'flex');\n jQuery(this.titleLogo).find('img').hide();\n jQuery(this.closeButton).hide();\n jQuery(this.searchForm).css('width', '255');\n }\n\n jQuery(this.titleText).text(title);\n },\n init: function init() {\n var self = this; // Move on next panel when click on item.\n\n jQuery(self.editorContainer).on('click', self.tabItem, function (e) {\n e.stopPropagation();\n e.preventDefault();\n current = jQuery(this);\n self.level++;\n self.updateHeader(current.text());\n self.updatePanel(current);\n }); // Move on next panel when click on item.\n\n jQuery(self.editorContainer).on('click', self.quickItem, function (e) {\n e.stopPropagation();\n e.preventDefault();\n current = jQuery(this);\n var tabId = current.attr('aria-owns');\n var title = jQuery('.rmp-tab-item[aria-owns=\"' + tabId + '\"]').find('.rmp-tab-item-title').html();\n self.level++;\n self.updateHeader(title);\n self.updateQuickPanel(current);\n }); // Back from inner panel when click on back button.\n\n jQuery(self.backButton).on('click', function (e) {\n e.stopPropagation();\n self.triggerBack();\n }); // Open/Close the editor setting sidebar.\n\n jQuery(self.sidebarDrawer).on('click', function (e) {\n jQuery(self.editorSidebar).toggleClass('expanded collapsed');\n }); // Open/Close the search form.\n\n jQuery(self.searchButton).on('click', function (e) {\n jQuery(self.searchForm).toggle();\n }); //Search settings\n\n jQuery.expr[':'].containsIgnoreCase = function (n, i, m) {\n return jQuery(n).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0;\n };\n\n jQuery.fn.highlight = function (pat) {\n function innerHighlight(node, pat) {\n var skip = 0;\n\n if (jQuery(node).is(\"select,input,textarea, .rmp-tooltip-content \")) {\n return skip;\n }\n\n if (node.nodeType == 3) {\n var pos = node.data.toUpperCase().indexOf(pat);\n\n if (pos >= 0) {\n var spannode = document.createElement('i');\n spannode.className = 'rmp-highlight';\n var middlebit = node.splitText(pos);\n middlebit.splitText(pat.length);\n var middleclone = middlebit.cloneNode(true);\n spannode.appendChild(middleclone);\n middlebit.parentNode.replaceChild(spannode, middlebit);\n skip = 1;\n }\n } else if (node.nodeType == 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {\n for (var i = 0; i < node.childNodes.length; ++i) {\n i += innerHighlight(node.childNodes[i], pat);\n }\n }\n\n return skip;\n }\n\n return this.each(function () {\n innerHighlight(this, pat.toUpperCase());\n });\n };\n\n jQuery.fn.removeHighlight = function () {\n function newNormalize(node) {\n for (var i = 0, children = node.childNodes, nodeCount = children.length; i < nodeCount; i++) {\n var child = children[i];\n\n if (child.nodeType == 1) {\n newNormalize(child);\n continue;\n }\n\n if (child.nodeType != 3) {\n continue;\n }\n\n var next = child.nextSibling;\n\n if (next == null || next.nodeType != 3) {\n continue;\n }\n\n var combined_text = child.nodeValue + next.nodeValue;\n var new_node = node.ownerDocument.createTextNode(combined_text);\n node.insertBefore(new_node, child);\n node.removeChild(child);\n node.removeChild(next);\n i--;\n nodeCount--;\n }\n }\n\n return this.find(\"i.rmp-highlight\").each(function () {\n var thisParent = this.parentNode;\n thisParent.replaceChild(this.firstChild, this);\n newNormalize(thisParent);\n }).end();\n };\n\n jQuery(document).on('keyup change search', self.searchForm, function () {\n var searchTerm = jQuery(this).val();\n jQuery('#rmp-editor-main').removeHighlight();\n jQuery('.rmp-search-results-found').remove();\n if (searchTerm == '') return false;\n jQuery('#rmp-editor-main').highlight(searchTerm);\n jQuery(self.parentTabItem).each(function () {\n var target = \"#\" + jQuery(this).attr(\"aria-owns\");\n var count = jQuery(target).find(\"i.rmp-highlight:containsIgnoreCase(\" + searchTerm + \")\").length;\n jQuery(target).find(self.tabItem).each(function () {\n var childTarget = \"#\" + jQuery(this).attr(\"aria-owns\");\n var childCount = jQuery(childTarget).find(\"i.rmp-highlight:containsIgnoreCase(\" + searchTerm + \")\").length;\n\n if (childCount > 0) {\n jQuery(this).append('<span class=\"rmp-search-results-found\">' + childCount + ' Results</span>');\n count = Number(count) + Number(childCount);\n }\n });\n\n if (count > 0) {\n jQuery(target).find(self.accordionItem).each(function () {\n var accordionItemCount = jQuery(this).find(\":not(.accordion-item-title, .item-title) > i.rmp-highlight:containsIgnoreCase(\" + searchTerm + \")\").length;\n\n if (accordionItemCount > 0) {\n jQuery(this).find('.rmp-accordion-title:first > .accordion-item-title, .rmp-accordion-title:first > .item-title').append('<span class=\"rmp-search-results-found\">' + accordionItemCount + ' Results</span>');\n }\n });\n jQuery(this).append('<span class=\"rmp-search-results-found\">' + count + ' Results</span>');\n }\n });\n });\n }\n};\nrmpEditor.init();\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/js/rmp-editor.js?")},"./assets/admin/js/rmp-icon.js":function(){eval("/**\n * This file contain the script to handle the icon wizard and it's operation.\n *\n * @version 4.0.0\n */\njQuery(document).ready(function () {\n var RMP_Icon = {\n iconSelect: '#rmp-icon-dialog-select',\n iconContainer: '.rmp-menu-icons-dialog',\n clearSelector: '#rmp-icon-dialog-clear',\n closeSelector: '.rmp-menu-icons-dialog .rmp-dialog-header button.close',\n clear: function clear() {\n var self = this;\n jQuery(self.clearSelector).on('click', function () {\n jQuery(self.iconContainer).find('input').prop('checked', false);\n });\n },\n closeDialog: function closeDialog() {\n var self = this;\n jQuery(self.closeSelector).on('click', function () {\n jQuery(self.iconContainer).hide();\n });\n },\n openDialog: function openDialog(iconChooser) {\n var self = this;\n jQuery(iconChooser).on('click', function (e) {\n e.stopPropagation();\n jQuery(self.iconContainer).show();\n jQuery(self.iconSelect).attr('data-click', jQuery(e.target).attr('id'));\n });\n },\n getIconElementWrap: function getIconElementWrap(icon_class) {\n if (icon_class.includes('material-icons')) {\n icon_class = icon_class.replace('material-icons', '');\n return '<span class=\"rmp-font-icon material-icons\">' + icon_class + '</span>';\n }\n\n return '<span class=\"rmp-font-icon ' + icon_class + ' \"></span>';\n },\n removeIcon: function removeIcon(iconChooser) {\n jQuery(iconChooser).on('click', '.rmp-icon-picker-trash', function (e) {\n e.preventDefault();\n e.stopPropagation();\n jQuery(this).parent('.rmp-icon-picker').siblings('input.rmp-icon-hidden-input').val('');\n jQuery(this).siblings('.rmp-font-icon').remove();\n jQuery(this).parent('.rmp-icon-picker').removeAttr('data-icon');\n jQuery(this).remove();\n\n if (!jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length) {\n jQuery('#rmp-editor-main').prepend('<div id=\"rmp-menu-update-notification\" class=\"rmp-order-item rmp-order-item-description\">' + '<span> <span class=\"rmp-font-icon dashicons dashicons-warning \"></span> Update Required </span>' + '<a href=\"javascript:void(0)\" id=\"rmp-menu-quick-update-button\">UPDATE</a>' + '</div>');\n }\n });\n },\n getIcon: function getIcon() {\n var self = this;\n jQuery(document).on('click', this.iconSelect, function () {\n icon_class = jQuery(self.iconContainer).find('input:checked').val();\n clicker = '#' + jQuery(self.iconSelect).attr('data-click');\n icon_wrap = self.getIconElementWrap(icon_class);\n jQuery(clicker).find('.rmp-font-icon').remove();\n jQuery(clicker).prev('input.rmp-icon-hidden-input').val(icon_wrap);\n jQuery(clicker).append(icon_wrap);\n jQuery(clicker).attr('data-icon', true);\n jQuery(clicker).find('.rmp-icon-picker-trash').remove();\n jQuery(clicker).append('<i class=\"rmp-icon-picker-trash dashicons dashicons-trash\" aria-hidden=\"true\"></i>');\n jQuery(self.iconSelect).removeAttr('data-click');\n jQuery(self.closeSelector).click();\n jQuery(clicker).prev('input').first().focus();\n });\n },\n init: function init(iconChooser) {\n this.openDialog(iconChooser);\n this.removeIcon(iconChooser);\n this.getIcon();\n this.clear();\n this.closeDialog();\n jQuery('#rmp-icon-search').on('keyup', _.debounce(this.searchIcon, 500));\n jQuery('#rmp-icon-search').on('keyup', function () {\n var query_string = this.value.toLocaleLowerCase();\n\n if (query_string.length) {\n if (!jQuery('#rmp-icon-search-typing-message').length) {\n jQuery(this).after('<span id=\"rmp-icon-search-typing-message\"> Waiting for more keystrokes... </span>');\n } else {\n jQuery('#rmp-icon-search-typing-message').html('Waiting for more keystrokes...');\n }\n }\n });\n /**\n * Create menu item icon selector.\n */\n\n jQuery(document).on('click', '.delete-menu-item-icon', function () {\n jQuery(this).closest('.rmp-menu-item-icon-container').remove();\n });\n },\n searchIcon: function searchIcon(e) {\n jQuery('#rmp-icon-search-typing-message').html('Please wait moment..');\n var query_string = this.value.toLocaleLowerCase();\n var activeTab = jQuery('.rmp-menu-icons-dialog').find('.nav-tab-active');\n\n if (!activeTab.length) {\n activeTab = jQuery('.rmp-menu-icons-dialog').find('.nav-tab').first();\n }\n\n icon_container = activeTab.attr('href');\n var icon_selector = jQuery(icon_container + ' .font-icon');\n var is_exist = false;\n icon_selector.each(function () {\n var icon_label = jQuery(this).children('input').val().toLocaleLowerCase();\n\n if (icon_label.includes(query_string)) {\n jQuery(this).show();\n is_exist = true;\n } else {\n jQuery(this).hide();\n }\n });\n\n if (is_exist) {\n jQuery('#rmp-icon-search-typing-message').html('Done, Check results..');\n } else {\n jQuery('#rmp-icon-search-typing-message').html('Sorry, Not found..');\n }\n }\n };\n RMP_Icon.init('.rmp-icon-picker');\n});\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/js/rmp-icon.js?")},"./assets/admin/js/rmp-menu-wizard.js":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/**\n * This is js hook scripts file for responsive menu.\n *\n * @file This files defines the rmpNewMenuWizard object.\n * @author ExpressTech System.\n *\n * @since 4.1.0\n *\n * @package responsive-menu\n */\n\n/**\n * Hooks class.\n *\n * @type {Object}\n *\n * @since 4.1.0\n */\n\nvar rmpMenuWizard = {\n /**\n * Initialize.\n *\n * @return {void}\n */\n init: function init() {\n this.setProps();\n },\n\n /**\n * Set properties and selectors.\n *\n * @return {void}\n */\n setProps: function setProps() {\n var _this = this;\n\n //Assign wizard container element id.\n var menuWizardContainer = jQuery('#rmp-new-menu-wizard'); //Open new create menu wizard on click event.\n\n jQuery(document).on('click', 'a.page-title-action', function (e) {\n e.preventDefault();\n menuWizardContainer.show();\n }); //Close the new menu wizard.\n\n jQuery('#rmp-new-menu-wizard .rmp-dialog-header button.close').on('click', function () {\n menuWizardContainer.hide();\n }); //Show/Hide the page selection input control.\n\n menuWizardContainer.on('change', '.rmp-menu-display-option', function (e) {\n var optionValue = jQuery(this).val();\n\n if ('exclude-pages' === optionValue || 'include-pages' === optionValue) {\n jQuery('#rmp-menu-page-selector').show();\n return;\n }\n\n jQuery('#rmp-menu-page-selector').hide();\n }); //Show/Hide change theme wizard in customizer page.\n\n jQuery('.rmp-theme-change-button').on('click', function (e) {\n menuWizardContainer.toggle();\n }); //Multi step form event for next button.\n\n jQuery('#rmp-menu-next-step').on('click', function () {\n _this.nextSection();\n }); //Multi step form event for top item label.\n\n jQuery('li.rmp-new-menu-step').on('click', function (e) {\n var index = jQuery(e.currentTarget).index();\n\n _this.goToSection(index);\n }); //Call ajax to save the new create menu.\n\n jQuery('#rmp-create-new-menu').on('click', function (e) {\n e.preventDefault();\n var menuName = jQuery('#rmp-menu-name');\n var themeName = jQuery('.rmp-theme-option:checked').val();\n\n if (themeName == undefined) {\n themeName = '';\n }\n\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_create_new_menu',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'menu_name': menuName.val(),\n 'menu_to_hide': jQuery('#rmp-hide-menu').val(),\n 'menu_to_use': jQuery('#rmp-menu-to-use').val(),\n 'menu_show_on_pages': jQuery('#rmp-menu-display-on-pages').val(),\n 'menu_show_on': jQuery('.rmp-menu-display-option').val(),\n 'menu_theme': themeName,\n 'theme_type': jQuery('.rmp-theme-option:checked').attr('theme-type')\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery(e.currentTarget).prop('disabled', true);\n jQuery('.spinner').addClass('is-active');\n },\n error: function error(_error) {\n console.log('Internal Error !');\n jQuery('#rmp-create-new-menu').prop('disabled', false);\n jQuery('.spinner').removeClass('is-active');\n },\n success: function success(response) {\n jQuery('.spinner').removeClass('is-active');\n jQuery('#rmp-create-new-menu').prop('disabled', false);\n\n if (response.success) {\n window.location.href = response.data.customize_url;\n } else {\n alert(response.data.message);\n }\n }\n });\n }); //Ajax call to upload the theme.\n\n jQuery('#rmp-theme-upload').on('click', function (e) {\n e.preventDefault();\n var formData = new FormData();\n var file = jQuery('#rmp_menu_theme_zip').prop('files')[0];\n formData.append('file', file);\n formData.append('action', 'rmp_menu_theme_upload');\n formData.append('ajax_nonce', rmpObject.ajax_nonce);\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: formData,\n type: 'POST',\n processData: false,\n contentType: false,\n dataType: 'json',\n success: function success(response) {\n jQuery('#rmp_menu_theme_zip').val('');\n alert(response.data.message);\n\n if (response.data.html) {\n jQuery('#rmp-new-menu-wizard').find('#tabs-1').html(response.data.html);\n jQuery('#rmp-menu-library-import').addClass('hide');\n }\n }\n });\n }); //Ajax call to check the recent changes the theme api.\n\n jQuery('.rmp-call-theme-api-button').on('click', function (e) {\n if (!jQuery(e.currentTarget).hasClass('rmp-call-theme-api-button')) {\n return;\n }\n\n jQuery('#rmp-new-menu-wizard').find('.rmp-page-loader').css('display', 'flex');\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_call_theme_api',\n 'ajax_nonce': rmpObject.ajax_nonce\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error2) {\n jQuery('#rmp-new-menu-wizard').find('.rmp-page-loader').hide();\n jQuery('#rmp-new-menu-wizard').find('#tabs-2 .rmp_theme_grids').html('Internal Error !');\n },\n success: function success(response) {\n if (response.data.html) {\n jQuery('#rmp-new-menu-wizard').find('#tabs-2 .rmp_theme_grids').html(response.data.html);\n jQuery(e.currentTarget).removeClass('rmp-call-theme-api-button');\n }\n }\n });\n });\n },\n\n /**\n * Jump to the next section of wizard.\n *\n * @return {void}\n */\n nextSection: function nextSection() {\n var currectSectionIndex = jQuery('div.rmp-menu-section.current').index();\n this.goToSection(currectSectionIndex + 1);\n },\n\n /**\n * Show the indexed section in wizard.\n *\n * @return {void}\n */\n goToSection: function goToSection(currectSectionIndex) {\n if (1 <= currectSectionIndex) {\n jQuery('#rmp-create-new-menu').show();\n jQuery('#rmp-menu-next-step').hide();\n } else {\n jQuery('#rmp-create-new-menu').hide();\n jQuery('#rmp-menu-next-step').show();\n }\n\n jQuery('div.rmp-menu-section').eq(currectSectionIndex).addClass('current').siblings().removeClass('current');\n jQuery('li.rmp-new-menu-step').eq(currectSectionIndex).addClass('current').siblings().removeClass('current');\n }\n};\nrmpMenuWizard.init();\n/* harmony default export */ __webpack_exports__[\"default\"] = (rmpMenuWizard);\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/js/rmp-menu-wizard.js?")},"./assets/admin/js/rmp-preview.js":function(){eval("/**\n * This is preview scripts file for responsive menu customizer.\n *\n * @file This files defines the rmpHook object.\n * @author ExpressTech System.\n * @type {Object}\n *\n * @since 4.0.0\n *\n * @package responsive-menu\n */\n\n/**\n * Hooks class.\n *\n * @type {Object}\n *\n * @since 4.0.0\n */\nvar rmpHook = {\n hooks: [],\n isBreak: false,\n\n /**\n * Function to register the hook.\n *\n * @since 4.0.0\n *\n * @param String name Hook Name.\n * @param function callback Associated function.\n */\n register: function register(name, callback) {\n if ('undefined' == typeof rmpHook.hooks[name]) {\n rmpHook.hooks[name] = [];\n }\n\n rmpHook.hooks[name].push(callback);\n },\n\n /**\n * Function to call the hook.\n *\n * @since 4.0.0\n *\n * @param String name Hook Name.\n * @param function params Paramter list.\n */\n call: function call(name, params) {\n if ('undefined' != typeof rmpHook.hooks[name]) {\n for (var i = 0; i < rmpHook.hooks[name].length; ++i) {\n var output = rmpHook.hooks[name][i](params);\n\n if (false == output) {\n rmpHook.isBreak = true;\n return false;\n }\n\n return output;\n }\n }\n\n return true;\n }\n};\n/**\n * Register function to color the menu elements.\n *\n * @since 4.0.0\n *\n * @param {Object} args List of inputs.\n * @return {String}\n */\n\nrmpHook.register('rmp_color_style', function (args) {\n if (!args) {\n return false;\n } // Set the state/pseudo class.\n\n\n if ('hover' == args.state) {\n args.outputSelector = args.outputSelector + ':hover';\n } else if ('placeholder' == args.state) {\n args.outputSelector = args.outputSelector + '::placeholder';\n } else if ('before' == args.state) {\n args.outputSelector = args.outputSelector + '::before';\n } else if ('after' == args.state) {\n args.outputSelector = args.outputSelector + '::after';\n } //Prepare css string and return.\n\n\n return args.outputSelector + '{ ' + args.attr + ' : ' + args.value + ';}';\n});\n/**\n * rmpPreview class\n *\n * @since 4.0.0\n *\n * @type {Object}\n */\n\nwindow.RMP_Preview = {\n iframe: '#rmp-preview-iframe',\n menuId: jQuery('#menu_id').val(),\n mobile_breakpoint: jQuery('#rmp-menu-mobile-breakpoint').val() + 'px',\n tablet_breakpoint: jQuery('#rmp-menu-tablet-breakpoint').val() + 'px',\n active_device: jQuery('#rmp_device_mode'),\n menuContainer: '#rmp-container-' + self.menuId,\n onTyping: function onTyping(inputSelector, outputSelector, type) {\n var meta = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n var self = this;\n var iframe = jQuery(self.iframe);\n jQuery(inputSelector).on('keyup change paste', function () {\n switch (type) {\n case 'border-radius':\n var value = jQuery(this).val();\n css = outputSelector + '{ border-radius : ' + value + 'px;}';\n self.inlineCssInjector(css);\n break;\n\n case 'section-padding':\n var value = jQuery(this).val();\n var is_linked = jQuery(this).parents('.rmp-input-group-control').find('.rmp-group-input-linked').hasClass('is-linked');\n var attr = 'padding';\n\n if (!is_linked) {\n pos = jQuery(this).attr('data-input');\n attr = attr + '-' + pos;\n }\n\n css = outputSelector + '{ ' + attr + ' : ' + value + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-text':\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).html(this.value);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').before('<div class=\"rmp-trigger-label rmp-trigger-label-top\"><span class=\"rmp-trigger-text\">\"' + this.value + '\"</span></div>');\n }\n\n break;\n\n case 'trigger-text-open':\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).html(this.value);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').before('<div class=\"rmp-trigger-label rmp-trigger-label-top\"><span class=\"rmp-trigger-text-open\">\"' + this.value + '\"</span></div>');\n }\n\n break;\n\n case 'text':\n iframe.contents().find(outputSelector).html(this.value);\n break;\n\n case 'placeholder':\n iframe.contents().find(outputSelector).attr('placeholder', this.value);\n break;\n\n case 'href':\n iframe.contents().find(outputSelector).attr('href', this.value);\n break;\n\n case 'font-size':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n var value = jQuery(this).val();\n css = outputSelector + '{ font-size : ' + (value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'width':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit) {\n unit = 'px';\n }\n\n css = outputSelector + '{ width : ' + (this.value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'height':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n css = outputSelector + '{ height : ' + (this.value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'line-height':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n css = outputSelector + '{ line-height : ' + (this.value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'min-width':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n css = outputSelector + '{ min-width : ' + (this.value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'max-width':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n css = outputSelector + '{ max-width : ' + (this.value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-side-position':\n side = jQuery('#rmp-menu-button-left-or-right').val();\n unit = jQuery('#rmp-menu-button-distance-from-side-unit').val();\n value = jQuery('#rmp-menu-button-distance-from-side').val();\n css = outputSelector + '{ ' + side + ' :' + (value + unit) + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'top':\n value = jQuery(this).val();\n unit = jQuery('#rmp-menu-button-top-unit').val();\n css = outputSelector + '{ top :' + (value + unit) + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'border-width':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit) {\n unit = 'px';\n }\n\n css = outputSelector + '{ border-width : ' + (this.value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'padding':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit) {\n unit = 'px';\n }\n\n if (meta == 'lr') {\n css = outputSelector + '{ padding : 0 ' + (this.value + unit) + ';}';\n }\n\n self.inlineCssInjector(css);\n break;\n }\n });\n },\n bindImage: function bindImage(inputSelector, outputSelector, type) {\n var self = this;\n var iframe = jQuery(self.iframe);\n jQuery(document).on('click', inputSelector, function (e) {\n e.preventDefault();\n var button = jQuery(this),\n custom_uploader = wp.media({\n title: 'Select image',\n library: {\n type: 'image'\n },\n button: {\n text: 'Use this image'\n },\n multiple: false\n }).on('select', function () {\n var attachment = custom_uploader.state().get('selection').first().toJSON();\n jQuery(e.target).prev('input.rmp-image-url-input').val(attachment.url);\n jQuery(e.target).css('background-image', 'url(' + attachment.url + ')');\n jQuery(e.target).append('<i class=\"rmp-image-picker-trash dashicons dashicons-trash\" aria-hidden=\"true\"></i>');\n\n if (type == 'img-src') {\n iframe.contents().find(outputSelector).attr('src', attachment.url);\n } else if (type == 'background') {\n css = outputSelector + '{ background-image : url(' + attachment.url + ');}';\n self.inlineCssInjector(css);\n } else if (type == 'trigger-icon') {\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).attr('src', attachment.url);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').append('<img class=\"rmp-trigger-icon rmp-trigger-icon-inactive\" src=\"' + attachment.url + '\"/>');\n }\n } else if (type == 'trigger-icon-open') {\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).attr('src', attachment.url);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').append('<img class=\"rmp-trigger-icon rmp-trigger-icon-active\" src=\"' + attachment.url + '\"/>');\n }\n }\n }).open();\n });\n },\n toggleElements: function toggleElements(inputSelector, outputSelector) {\n var self = this;\n jQuery(inputSelector).on('change', function (e) {\n e.preventDefault();\n e.stopPropagation();\n var iframe = jQuery(self.iframe);\n\n if (iframe.contents().find(outputSelector).length) {\n if (jQuery(this).is(':checked')) {\n iframe.contents().find(outputSelector).fadeIn(500);\n } else {\n iframe.contents().find(outputSelector).fadeOut(500);\n }\n } else {\n e.preventDefault();\n var menuId = jQuery('#menu_id').val(),\n toggle_on = jQuery(this).data('toggle');\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_enable_menu_item',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'menu_id': menuId,\n 'menu_element': toggle_on\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery(this).prop('disabled', true);\n jQuery('#iframe-spinner').show();\n },\n error: function error(_error) {\n console.log('Internal Error !');\n jQuery(this).prop('disabled', false);\n jQuery('#iframe-spinner').hide();\n },\n success: function success(response) {\n if (response.data.markup) {\n iframe.contents().find('#rmp-container-' + self.menuId).append(response.data.markup);\n self.orderMenuElements();\n }\n\n jQuery(this).prop('disabled', false);\n jQuery('#iframe-spinner').hide();\n }\n });\n }\n });\n },\n orderMenuElements: function orderMenuElements() {\n var list = [];\n var self = this;\n var iframeContents = jQuery(self.iframe).contents();\n jQuery('#tab-container .item-title').each(function () {\n var val = jQuery(this).text().toLocaleLowerCase().trim();\n\n if (val == 'title') {\n list.push(iframeContents.find(self.menuTitle));\n iframeContents.find(self.menuTitle).remove();\n } else if (val == 'search') {\n list.push(iframeContents.find(self.menuSearch));\n iframeContents.find(self.menuSearch).remove();\n } else if (val == 'menu') {\n list.push(iframeContents.find(self.menuWrap));\n iframeContents.find(self.menuWrap).remove();\n } else {\n list.push(iframeContents.find(self.menuContents));\n iframeContents.find(self.menuContents).remove();\n }\n });\n list.forEach(function (menuElement) {\n iframeContents.find(self.menuContainer).append(menuElement);\n });\n },\n\n /**\n * Function to bind the color input with option and elements.\n *\n * @version 4.0.0\n *\n * @param {String} inputSelector\n * @param {String} outputSelector\n * @param {String} attr\n * @param {String} state\n */\n bindColor: function bindColor(inputSelector, outputSelector, attr, state) {\n var self = this;\n jQuery(inputSelector).wpColorPicker({\n change: function change(event, ui) {\n var value = ui.color.toString();\n var css = rmpHook.call('rmp_color_style', {\n 'outputSelector': outputSelector,\n 'attr': attr,\n 'value': value,\n 'state': state\n });\n\n if (jQuery(inputSelector).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n }\n });\n },\n mediaQuery: function mediaQuery(css) {\n var self = this;\n self.tablet_breakpoint = jQuery('#rmp-menu-tablet-breakpoint').val() + 'px';\n css = '@media screen and (max-width: ' + self.tablet_breakpoint + ' ) {' + css + '}';\n return css;\n },\n inlineCssInjector: function inlineCssInjector(css) {\n var self = this;\n var iframe = jQuery(self.iframe);\n var styleElement = iframe.contents().find('#rmp-inline-css-' + self.menuId);\n\n if (styleElement.length) {\n styleElement.append(css);\n } else {\n style = '<style id=\"rmp-inline-css-' + self.menuId + '\">' + css + '</style>';\n iframe.contents().find('head').append(style);\n }\n },\n changeInput: function changeInput(inputSelector, outputSelector, attr) {\n var meta = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n var self = this;\n var iframe = jQuery(self.iframe);\n jQuery(inputSelector).on('change', function (e) {\n switch (attr) {\n case 'height-unit':\n value = jQuery(this).prev('input').val();\n unit = jQuery(this).val();\n css = outputSelector + '{ height : ' + (value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'line-height-unit':\n value = jQuery(this).prev('input').val();\n unit = jQuery(this).val();\n css = outputSelector + '{ line-height : ' + (value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'width-unit':\n var value = jQuery(this).prev('input').val();\n var unit = jQuery(this).val();\n css = outputSelector + '{ width : ' + (value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'font-size':\n value = jQuery(this).prev('input').val();\n unit = jQuery(this).val();\n css = outputSelector + '{ font-size :' + value + unit + ' !important;}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'font-family':\n value = jQuery(this).val();\n css = outputSelector + '{ font-family :' + value + ' !important;}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'font-weight':\n value = jQuery(this).val();\n css = outputSelector + '{ font-weight :' + value + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'padding-unit':\n var unit = jQuery(this).val();\n var value = jQuery(this).prev('input').val();\n\n if (!unit) {\n unit = 'px';\n }\n\n if (meta == 'lr') {\n css = outputSelector + '{ padding : 0 ' + (value + unit) + ';}';\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'letter-spacing':\n value = jQuery(this).val();\n css = outputSelector + '{ letter-spacing :' + value + 'px; }';\n self.inlineCssInjector(css);\n break;\n\n case 'position-alignment':\n if (iframe.contents().find(outputSelector).length) {\n position = jQuery(this).val();\n var rmpTriggerBox = iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box');\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').remove();\n\n if (position == 'top' || position == 'left') {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId).append(rmpTriggerBox);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId).prepend(rmpTriggerBox);\n }\n }\n\n break;\n\n case 'trigger-animation':\n value = jQuery(this).val();\n var new_class = 'rmp-menu-trigger-' + value;\n all_class = iframe.contents().find(outputSelector).attr('class').split(\" \");\n all_class.forEach(function (value) {\n if (value.includes('rmp-menu-trigger-')) {\n iframe.contents().find(outputSelector).removeClass(value);\n iframe.contents().find(outputSelector).addClass(new_class);\n }\n });\n break;\n\n case 'top':\n var unit = jQuery(this).val();\n value = jQuery(this).prev('input').val();\n css = outputSelector + '{ top :' + (value + unit) + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-side-position':\n side = jQuery('#rmp-menu-button-left-or-right').val();\n unit = jQuery('#rmp-menu-button-distance-from-side-unit').val();\n value = jQuery('#rmp-menu-button-distance-from-side').val();\n css = outputSelector + '{ ' + side + ' :' + (value + unit) + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-side':\n side = jQuery(this).val();\n value = jQuery('#rmp-menu-button-distance-from-side').val();\n unit = jQuery('#rmp-menu-button-distance-from-side-unit').val();\n\n if (side == 'left') {\n css = outputSelector + '{' + side + ':' + (value + unit) + ' !important;right:unset !important}';\n } else {\n css = outputSelector + '{' + side + ':' + (value + unit) + ' !important;left:unset !important}';\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'position':\n value = jQuery(this).val();\n css = outputSelector + '{ position :' + value + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-background':\n if (jQuery(this).is(':checked')) {\n iframe.contents().find(outputSelector).attr('style', 'background:unset !important;');\n } else {\n iframe.contents().find(outputSelector).removeAttr('style');\n }\n\n break;\n\n case 'target':\n var value = jQuery(this).val();\n\n if (!value.length) {\n value = '_self';\n }\n\n iframe.contents().find(outputSelector).attr('target', value);\n break;\n\n case 'text-align':\n var value = jQuery(this).val();\n iframe.contents().find(outputSelector).css({\n 'text-align': value\n });\n break;\n }\n });\n },\n init: function init() {\n var self = this; //Mobile menu elements.\n\n self.menuContainer = '#rmp-container-' + self.menuId;\n self.menuTitle = '#rmp-menu-title-' + self.menuId;\n self.menuSearch = '#rmp-search-box-' + self.menuId;\n self.menuWrap = '#rmp-menu-wrap-' + self.menuId;\n self.menuContents = '#rmp-menu-additional-content-' + self.menuId; //Menu container background color.\n\n self.bindColor('#rmp-container-background-colour', '#rmp-container-' + self.menuId, 'background', ''); //Menu background.\n\n self.bindColor('#rmp-menu-background-colour', '#rmp-menu-wrap-' + self.menuId, 'background'); //Menu title section background color.\n\n self.bindColor('#rmp-menu-title-background-colour', '#rmp-menu-title-' + self.menuId, 'background'); //Menu title section background hover color.\n\n self.bindColor('#rmp-menu-title-background-hover-colour', '#rmp-menu-title-' + self.menuId, 'background', 'hover'); // Menu item trigger\n\n self.bindColor('#rmp-menu-sub-arrow-shape-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'color');\n self.bindColor('#rmp-menu-sub-arrow-shape-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'color', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-shape-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active', 'color');\n self.bindColor('#rmp-menu-sub-arrow-shape-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active', 'color', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-border-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'border-color');\n self.bindColor('#rmp-menu-sub-arrow-border-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'border-color', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-border-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow-active', 'border-color');\n self.bindColor('#rmp-menu-sub-arrow-border-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow-active', 'border-color', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-background-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'background');\n self.bindColor('#rmp-menu-sub-arrow-background-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'background', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-background-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active', 'background');\n self.bindColor('#rmp-menu-sub-arrow-background-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active', 'background', 'hover'); //Legacy options\n\n self.bindColor('#rmp-submenu-sub-arrow-shape-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'color');\n self.bindColor('#rmp-submenu-sub-arrow-shape-colour-hover', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'color', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-shape-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'color');\n self.bindColor('#rmp-submenu-sub-arrow-shape-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'color', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-border-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'border-color');\n self.bindColor('#rmp-submenu-sub-arrow-border-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'border-color', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-border-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow.rmp-menu-subarrow-active', 'border-color');\n self.bindColor('#rmp-submenu-sub-arrow-border-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'border-color', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-background-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'background');\n self.bindColor('#rmp-submenu-sub-arrow-background-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'background', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-background-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'background');\n self.bindColor('#rmp-submenu-sub-arrow-background-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'background', 'hover');\n self.bindColor('#rmp-menu-title-colour', '#rmp-menu-title-' + self.menuId + ' > a', 'color');\n self.bindColor('#rmp-menu-title-hover-colour', '#rmp-menu-title-' + self.menuId + ' > a', 'color', 'hover');\n self.bindColor('#rmp-menu-additional-content-color', '#rmp-container-' + self.menuId + ' #rmp-menu-additional-content-' + self.menuId, 'color');\n self.bindColor('#rmp-menu-search-box-text-colour', '#rmp-container-' + self.menuId + ' #rmp-search-box-' + self.menuId + ' .rmp-search-box', 'color');\n self.bindColor('#rmp-menu-search-box-background-colour', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'background');\n self.bindColor('#rmp-menu-search-box-border-colour', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'border-color');\n self.bindColor('#rmp-menu-search-box-placeholder-colour', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'color', 'placeholder');\n self.changeInput('#rmp-menu-title-font-weight', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link', 'font-weight');\n self.changeInput('#rmp-menu-title-font-family', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link', 'font-family'); //Menu Trigger\n\n self.bindColor('#rmp-menu-button-background-colour', '#rmp_menu_trigger-' + self.menuId, 'background', '');\n self.bindColor('#rmp-menu-button-background-colour-hover', '#rmp_menu_trigger-' + self.menuId, 'background-color', 'hover');\n self.bindColor('#rmp-menu-button-background-colour-active', '#rmp_menu_trigger-' + self.menuId + '.is-active', 'background', '');\n self.bindColor('#rmp-menu-button-line-colour', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner,#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:after,#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:before', 'background', '');\n self.bindColor('#rmp-menu-button-line-colour-active', '.is-active#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner,.is-active#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:after,.is-active#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:before', 'background', '');\n self.bindColor('#rmp-menu-button-line-colour-hover', '#rmp_menu_trigger-' + self.menuId + ':hover .responsive-menu-pro-inner,#rmp_menu_trigger-' + self.menuId + ':hover .responsive-menu-pro-inner:after,#rmp_menu_trigger-' + self.menuId + ':hover .responsive-menu-pro-inner:before', 'background', '');\n self.bindColor('#rmp-menu-button-text-colour', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'color');\n self.onTyping('#rmp-menu-toggle-border-radius', '#rmp_menu_trigger-' + self.menuId, 'border-radius');\n self.onTyping('.rmp-menu-container-padding', '#rmp-container-' + self.menuId, 'section-padding');\n self.onTyping('.rmp-menu-title-section-padding', '#rmp-menu-title-' + self.menuId, 'section-padding');\n self.onTyping('.rmp-menu-section-padding', '#rmp-menu-wrap-' + self.menuId, 'section-padding');\n self.onTyping('.rmp-menu-search-section-padding', '#rmp-search-box-' + self.menuId, 'section-padding');\n self.onTyping('.rmp-menu-additional-section-padding', '#rmp-menu-additional-content-' + self.menuId, 'section-padding'); // CONTENT BASED ELEMENTS.\n\n self.onTyping('#rmp-menu-search-box-height', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'height');\n self.onTyping('#rmp-menu-search-box-border-radius', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'border-radius');\n self.onTyping('#rmp-menu-menu-title', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link span', 'text');\n self.onTyping('#rmp-menu-additional-content', '#rmp-menu-additional-content-' + self.menuId, 'text');\n self.onTyping('#rmp-menu-search-box-text', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'placeholder');\n self.onTyping('#rmp-menu-title-link', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link', 'href');\n self.onTyping('#rmp-menu-title-image-alt', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'alt');\n self.onTyping('#rmp-menu-title-font-size', '#rmp-menu-title-' + self.menuId + ' > a', 'font-size');\n self.onTyping('#rmp-menu-title-image-width', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'width');\n self.onTyping('#rmp-menu-title-image-height', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'height');\n self.bindImage('#rmp-menu-title-image-selector', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'img-src');\n self.onTyping('#rmp-menu-additional-content-font-size', '#rmp-menu-additional-content-' + self.menuId, 'font-size');\n self.onTyping('#rmp-menu-container-width', '#rmp-container-' + self.menuId, 'width');\n self.onTyping('#rmp-menu-container-min-width', '#rmp-container-' + self.menuId, 'min-width');\n self.onTyping('#rmp-menu-container-max-width', '#rmp-container-' + self.menuId, 'max-width');\n self.onTyping('#rmp-menu-button-image-alt-when-clicked', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-icon-active', 'alt');\n self.onTyping('#rmp-menu-button-image-alt', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-icon-inactive', 'alt');\n self.onTyping('#rmp-menu-button-title-open', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-text-open', 'trigger-text-open');\n self.onTyping('#rmp-menu-button-title', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-text', 'trigger-text');\n self.onTyping('#rmp-menu-button-font-size', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'font-size');\n self.onTyping('#rmp-menu-button-title-line-height', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'line-height'); //Menu Trigger\n\n self.onTyping('#rmp-menu-button-width', '#rmp_menu_trigger-' + self.menuId, 'width');\n self.onTyping('#rmp-menu-button-height', '#rmp_menu_trigger-' + self.menuId, 'height');\n self.onTyping('#rmp-menu-button-line-width', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner', 'width');\n self.onTyping('#rmp-menu-button-line-width', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:after', 'width');\n self.onTyping('#rmp-menu-button-line-width', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:before', 'width');\n self.onTyping('#rmp-menu-button-line-height', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner', 'height');\n self.onTyping('#rmp-menu-button-line-height', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:after', 'height');\n self.onTyping('#rmp-menu-button-line-height', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:before', 'height');\n self.bindImage('#rmp-button-title-image', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'img-src');\n self.bindImage('#rmp-menu-background-image-selector', '#rmp-container-' + self.menuId, 'background');\n self.bindImage('#rmp-menu-button-image-when-clicked-selector', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-icon-active', 'trigger-icon-open');\n self.bindImage('#rmp-menu-button-image-selector', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-icon-inactive', 'trigger-icon');\n self.changeInput('#rmp-menu-title-link-location', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link', 'target');\n self.changeInput('.rmp-menu-title-alignment', '#rmp-menu-title-' + self.menuId, 'text-align');\n self.changeInput('.rmp-menu-additional-content-alignment', '#rmp-menu-additional-content-' + self.menuId, 'text-align'); //Top menu item links\n\n self.onTyping('#rmp-menu-links-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'height');\n self.onTyping('#rmp-menu-links-line-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'line-height');\n self.onTyping('#rmp-menu-font-size', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'font-size');\n self.changeInput('#rmp-menu-font', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-item-link', 'font-family');\n self.changeInput('#rmp-menu-font-weight', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-item-link', 'font-weight');\n self.changeInput('.rmp-menu-text-alignment', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-item-link', 'text-align');\n self.changeInput('#rmp-menu-text-letter-spacing', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'letter-spacing');\n self.onTyping('#rmp-menu-depth-level-0', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'padding', 'lr');\n self.onTyping('#rmp-menu-border-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'border-width');\n self.onTyping('#rmp-menu-sub-arrow-border-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'border-width');\n self.onTyping('#rmp-submenu-sub-arrow-border-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'border-width');\n self.bindColor('#rmp-menu-link-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'color');\n self.bindColor('#rmp-menu-link-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'color', 'hover');\n self.bindColor('#rmp-menu-current-link-active-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'color');\n self.bindColor('#rmp-menu-current-link-active-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'color', 'hover');\n self.bindColor('#rmp-menu-item-background-colour', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'background');\n self.bindColor('#rmp-menu-item-background-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'background', 'hover');\n self.bindColor('#rmp-menu-current-item-background-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'background');\n self.bindColor('#rmp-menu-current-item-background-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'background', 'hover');\n self.bindColor('#rmp-menu-item-border-colour', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'border-color');\n self.bindColor('#rmp-menu-item-border-colour-hover', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'border-color', 'hover');\n self.bindColor('#rmp-menu-current-item-border-hover-colour', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'border-color', 'hover');\n self.bindColor('#rmp-menu-item-border-colour-active', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'border-color'); // Trigger of top level\n\n self.bindImage('#rmp-menu-inactive-arrow-image-selector', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow', 'background');\n self.bindImage('#rmp-menu-active-arrow-image-selector', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow-active', 'background');\n self.onTyping('#rmp-submenu-arrow-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'height');\n self.onTyping('#rmp-submenu-arrow-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'width');\n self.onTyping('#rmp-submenu-child-arrow-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'height');\n self.onTyping('#rmp-submenu-child-arrow-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'width');\n self.changeInput('#rmp-submenu-child-arrow-width-unit', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'width-unit');\n self.changeInput('#rmp-submenu-child-arrow-height-unit', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'height-unit');\n self.bindColor('#rmp-menu-sub-arrow-background-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow', 'background');\n self.bindColor('#rmp-menu-sub-arrow-background-hover-colour', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow', 'background', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-background-colour-active', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow-active', 'background');\n self.bindColor('#rmp-menu-sub-arrow-background-hover-colour-active', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow-active', 'background', 'hover'); //sub menu item links\n\n self.onTyping('#rmp-submenu-links-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'height');\n self.changeInput('#rmp-submenu-links-height-unit', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'height-unit');\n self.onTyping('#rmp-submenu-links-line-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'line-height');\n self.changeInput('#rmp-submenu-links-line-height-unit', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'line-height-unit');\n self.onTyping('#rmp-submenu-font-size', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'font-size');\n self.changeInput('#rmp-submenu-font', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'font-family');\n self.changeInput('#rmp-submenu-font-weight', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'font-weight');\n self.changeInput('.rmp-submenu-text-alignment', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'text-align');\n self.changeInput('#rmp-submenu-text-letter-spacing', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'letter-spacing');\n self.onTyping('#rmp-submenu-border-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'border-width');\n self.bindColor('#rmp-submenu-item-border-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'border-color');\n self.bindColor('#rmp-submenu-item-border-colour-hover', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'border-color', 'hover');\n self.bindColor('#rmp-submenu-item-border-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'border-color');\n self.bindColor('#rmp-submenu-current-item-border-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'border-color', 'hover');\n self.bindColor('#rmp-submenu-link-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'color');\n self.bindColor('#rmp-submenu-link-hover-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'color', 'hover');\n self.bindColor('#rmp-submenu-link-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'color');\n self.bindColor('#rmp-submenu-link-active-hover-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'color', 'hover');\n self.bindColor('#rmp-submenu-item-background-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'background');\n self.bindColor('#rmp-submenu-item-background-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'background', 'hover');\n self.bindColor('#rmp-submenu-current-item-background-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'background');\n self.bindColor('#rmp-submenu-current-item-background-hover-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'background', 'hover'); //Menu Trigger\n\n self.changeInput('.rmp-menu-button-transparent-background', '#rmp_menu_trigger-' + self.menuId, 'background', '');\n self.changeInput('#rmp-menu-button-position-type', '#rmp_menu_trigger-' + self.menuId, 'position');\n self.changeInput('.rmp-menu-button-left-or-right', '#rmp_menu_trigger-' + self.menuId, 'trigger-side');\n self.onTyping('#rmp-menu-button-distance-from-side', '#rmp_menu_trigger-' + self.menuId, 'trigger-side-position');\n self.onTyping('#rmp-menu-button-top', '#rmp_menu_trigger-' + self.menuId, 'top');\n self.changeInput('#rmp-menu-button-click-animation', '#rmp_menu_trigger-' + self.menuId, 'trigger-animation');\n self.changeInput('#rmp-menu-button-font', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'font-family');\n self.changeInput('.rmp-menu-button-title-position', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'position-alignment');\n jQuery(\"#rmp-menu-button-font-icon\").focus(function () {\n var outputSelector = '#rmp_menu_trigger-' + self.menuId + ' span.rmp-trigger-icon-inactive';\n value = jQuery(this).val();\n var iframe = jQuery(self.iframe);\n\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).addClass(value);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box img.rmp-trigger-icon').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').append('<span class=\"rmp-trigger-icon rmp-trigger-icon-inactive ' + value + '\"></span>');\n }\n });\n jQuery(\"#rmp-menu-button-font-icon-when-clicked\").focus(function () {\n var outputSelector = '#rmp_menu_trigger-' + self.menuId + ' span.rmp-trigger-icon-active';\n value = jQuery(this).val();\n var iframe = jQuery(self.iframe);\n\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).addClass(value);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box img.rmp-trigger-icon').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').append('<span class=\"rmp-trigger-icon rmp-trigger-icon-active ' + value + '\"></span>');\n }\n }); // Ordering elements\n\n self.toggleElements('#rmp-item-order-title', '#rmp-menu-title-' + self.menuId);\n self.toggleElements('#rmp-item-order-additional-content', '#rmp-menu-additional-content-' + self.menuId);\n self.toggleElements('#rmp-item-order-search', '#rmp-search-box-' + self.menuId);\n self.toggleElements('#rmp-item-order-menu', '#rmp-menu-wrap-' + self.menuId);\n jQuery('#rmp-menu-ordering-items').sortable({\n update: function update(event, ui) {\n self.orderMenuElements();\n }\n });\n }\n};\nRMP_Preview.init();\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/js/rmp-preview.js?")},"./assets/admin/js/wp-color-alpha.js":function(){eval("/**!\n * wp-color-picker-alpha\n *\n * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker\n * Only run in input and is defined data alpha in true\n *\n * Version: 2.1.4\n * https://github.com/kallookoo/wp-color-picker-alpha\n * Licensed under the GPLv2 license or later.\n */\n(function ($) {\n // Prevent double-init.\n if ($.wp.wpColorPicker.prototype._hasAlpha) {\n return;\n } // Variable for some backgrounds ( grid )\n\n\n var image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==',\n //Dtml stuff for wpColorPicker copy of the original color-picker.js\n _after = '<div class=\"wp-picker-holder\" />',\n _wrap = '<div class=\"wp-picker-container\" />',\n _before = '<button type=\"button\" class=\"button wp-color-result\" aria-expanded=\"false\"></button>',\n _wrappingLabel = '<label></label>',\n _wrappingLabelText = '<span class=\"screen-reader-text\"></span>';\n /**\n * Overwrite Color\n * for enable support rbga\n */\n\n Color.fn.toString = function () {\n if (this._alpha < 1) return this.toCSS('rgba', this._alpha).replace(/\\s+/g, '');\n var hex = parseInt(this._color, 10).toString(16);\n if (this.error) return '';\n if (hex.length < 6) hex = ('00000' + hex).substr(-6);\n return '#' + hex;\n };\n /**\n * Overwrite wpColorPicker\n */\n\n\n $.widget('wp.wpColorPicker', $.wp.wpColorPicker, {\n _hasAlpha: true,\n\n /**\n * @summary Creates the color picker.\n *\n * Creates the color picker, sets default values, css classes and wraps it all in HTML.\n *\n * @since 3.5.0\n *\n * @access private\n *\n * @returns {void}\n */\n _create: function _create() {\n // Return early if Iris support is missing.\n if (!$.support.iris) {\n return;\n }\n\n var self = this,\n el = self.element; // Override default options with options bound to the element.\n\n $.extend(self.options, el.data()); // Create a color picker which only allows adjustments to the hue.\n\n if (self.options.type === 'hue') {\n return self._createHueOnly();\n } // Bind the close event.\n\n\n self.close = $.proxy(self.close, self);\n self.initialValue = el.val(); // Add a CSS class to the input field.\n\n el.addClass('wp-color-picker');\n /*\n \t* Check if there's already a wrapping label, e.g. in the Customizer.\n \t* If there's no label, add a default one to match the Customizer template.\n \t*/\n\n if (!el.parent('label').length) {\n // Wrap the input field in the default label.\n el.wrap(_wrappingLabel); // Insert the default label text.\n\n self.wrappingLabelText = $(_wrappingLabelText).insertBefore(el).text('Color Picker');\n }\n /*\n \t* At this point, either it's the standalone version or the Customizer\n \t* one, we have a wrapping label to use as hook in the DOM, let's store it.\n \t*/\n\n\n self.wrappingLabel = el.parent(); // Wrap the label in the main wrapper.\n\n self.wrappingLabel.wrap(_wrap); // Store a reference to the main wrapper.\n\n self.wrap = self.wrappingLabel.parent(); // Set up the toggle button and insert it before the wrapping label.\n\n self.toggler = $(_before).insertBefore(self.wrappingLabel).css({\n backgroundColor: self.initialValue\n }); // Set up the Iris container and insert it after the wrapping label.\n\n self.pickerContainer = $(_after).insertAfter(self.wrappingLabel); // Wrap the wrapping label in its wrapper and append the Clear/Default button.\n\n self.wrappingLabel.wrap('<span class=\"wp-picker-input-wrap hidden rmp-color-input-wrap\" />');\n /*\n * The input wrapper now contains the label+input+Clear/Default button.\n * Store a reference to the input wrapper: we'll use this to toggle\n * the controls visibility.\n */\n\n self.inputWrapper = el.closest('.wp-picker-input-wrap');\n el.iris({\n target: self.pickerContainer,\n hide: self.options.hide,\n width: 240,\n mode: self.options.mode,\n palettes: self.options.palettes,\n\n /**\n * @summary Handles the onChange event if one has been defined in the options.\n *\n * Handles the onChange event if one has been defined in the options and additionally\n * sets the background color for the toggler element.\n *\n * @since 3.5.0\n *\n * @param {Event} event The event that's being called.\n * @param {HTMLElement} ui The HTMLElement containing the color picker.\n *\n * @returns {void}\n */\n change: function change(event, ui) {\n if (self.options.alpha) {\n self.toggler.css({\n 'background-image': 'url(' + image + ')'\n });\n self.toggler.css({\n 'position': 'relative'\n });\n\n if (self.toggler.find('span.color-alpha').length == 0) {\n self.toggler.append('<span class=\"color-alpha\" />');\n }\n\n self.toggler.find('span.color-alpha').css({\n 'width': '38px',\n 'height': '100%',\n 'position': 'absolute',\n 'top': 0,\n 'left': 0,\n 'background': ui.color.toString()\n });\n } else {\n self.toggler.css({\n backgroundColor: ui.color.toString()\n });\n }\n\n if ($.isFunction(self.options.change)) {\n self.options.change.call(this, event, ui);\n }\n }\n });\n el.val(self.initialValue);\n\n self._addListeners(); // Force the color picker to always be closed on initial load.\n\n\n if (!self.options.hide) {\n self.toggler.click();\n }\n },\n\n /**\n * @summary Binds event listeners to the color picker.\n *\n * @since 3.5.0\n *\n * @access private\n *\n * @returns {void}\n */\n _addListeners: function _addListeners() {\n var self = this;\n /**\n * @summary Prevent any clicks inside this widget from leaking to the top and closing it.\n *\n * @since 3.5.0\n *\n * @param {Event} event The event that's being called.\n *\n * @returs {void}\n */\n\n self.wrap.on('click.wpcolorpicker', function (event) {\n event.stopPropagation();\n });\n /**\n * @summary Open or close the color picker depending on the class.\n *\n * @since 3.5\n */\n\n self.toggler.click(function () {\n if (self.toggler.hasClass('wp-picker-open')) {\n self.close();\n } else {\n self.open();\n }\n });\n /**\n * @summary Checks if value is empty when changing the color in the color picker.\n *\n * Checks if value is empty when changing the color in the color picker.\n * If so, the background color is cleared.\n *\n * @since 3.5.0\n *\n * @param {Event} event The event that's being called.\n *\n * @returns {void}\n */\n\n self.element.on('change', function (event) {\n // Empty or Error = clear\n if ($(this).val() === '' || self.element.hasClass('iris-error')) {\n if (self.options.alpha) {\n self.toggler.find('span.color-alpha').css('backgroundColor', '');\n } else {\n self.toggler.css('backgroundColor', '');\n } // fire clear callback if we have one\n\n\n if ($.isFunction(self.options.clear)) self.options.clear.call(this, event);\n }\n });\n }\n });\n /**\n * Overwrite iris\n */\n\n $.widget('a8c.iris', $.a8c.iris, {\n _create: function _create() {\n this._super(); // Global option for check is mode rbga is enabled\n\n\n this.options.alpha = this.element.data('alpha') || false; // Is not input disabled\n\n if (!this.element.is(':input')) this.options.alpha = false;\n\n if (typeof this.options.alpha !== 'undefined' && this.options.alpha) {\n var self = this,\n el = self.element,\n _html = '<div class=\"iris-strip iris-slider iris-alpha-slider\"><div class=\"iris-slider-offset iris-slider-offset-alpha\"></div></div>',\n aContainer = $(_html).appendTo(self.picker.find('.iris-picker-inner')),\n aSlider = aContainer.find('.iris-slider-offset-alpha'),\n controls = {\n aContainer: aContainer,\n aSlider: aSlider\n };\n\n if (typeof el.data('custom-width') !== 'undefined') {\n self.options.customWidth = parseInt(el.data('custom-width')) || 0;\n } else {\n self.options.customWidth = 100;\n } // Set default width for input reset\n\n\n self.options.defaultWidth = el.width(); // Update width for input\n\n if (self._color._alpha < 1 || self._color.toString().indexOf('rgb') != -1) el.width(parseInt(self.options.defaultWidth + self.options.customWidth)); // Push new controls\n\n $.each(controls, function (k, v) {\n self.controls[k] = v;\n }); // Change size strip and add margin for sliders\n\n self.controls.square.css({\n 'margin-right': '0'\n });\n var emptyWidth = self.picker.width() - self.controls.square.width() - 20,\n stripsMargin = emptyWidth / 6,\n stripsWidth = emptyWidth / 2 - stripsMargin;\n $.each(['aContainer', 'strip'], function (k, v) {\n self.controls[v].width(stripsWidth).css({\n 'margin-left': stripsMargin + 'px'\n });\n }); // Add new slider\n\n self._initControls(); // For updated widget\n\n\n self._change();\n }\n },\n _initControls: function _initControls() {\n this._super();\n\n if (this.options.alpha) {\n var self = this,\n controls = self.controls;\n controls.aSlider.slider({\n orientation: 'vertical',\n min: 0,\n max: 100,\n step: 1,\n value: parseInt(self._color._alpha * 100),\n slide: function slide(event, ui) {\n // Update alpha value\n self._color._alpha = parseFloat(ui.value / 100);\n\n self._change.apply(self, arguments);\n }\n });\n }\n },\n _change: function _change() {\n this._super();\n\n var self = this,\n el = self.element;\n\n if (this.options.alpha) {\n var controls = self.controls,\n alpha = parseInt(self._color._alpha * 100),\n color = self._color.toRgb(),\n gradient = ['rgb(' + color.r + ',' + color.g + ',' + color.b + ') 0%', 'rgba(' + color.r + ',' + color.g + ',' + color.b + ', 0) 100%'],\n defaultWidth = self.options.defaultWidth,\n customWidth = self.options.customWidth,\n target = self.picker.closest('.wp-picker-container').find('.wp-color-result'); // Generate background slider alpha, only for CSS3 old browser fuck!! :)\n\n\n controls.aContainer.css({\n 'background': 'linear-gradient(to bottom, ' + gradient.join(', ') + '), url(' + image + ')'\n });\n\n if (target.hasClass('wp-picker-open')) {\n // Update alpha value\n controls.aSlider.slider('value', alpha);\n /**\n * Disabled change opacity in default slider Saturation ( only is alpha enabled )\n * and change input width for view all value\n */\n // if ( self._color._alpha < 1 ) {\n // \tcontrols.strip.attr( 'style', controls.strip.attr( 'style' ).replace( /rgba\\(([0-9]+,)(\\s+)?([0-9]+,)(\\s+)?([0-9]+)(,(\\s+)?[0-9\\.]+)\\)/g, 'rgb($1$3$5)' ) );\n // \tel.width( parseInt( defaultWidth + customWidth ) );\n // } else {\n // \tel.width( defaultWidth );\n // }\n }\n }\n\n var reset = el.data('reset-alpha') || false;\n\n if (reset) {\n self.picker.find('.iris-palette-container').on('click.palette', '.iris-palette', function () {\n self._color._alpha = 1;\n self.active = 'external';\n\n self._change();\n });\n }\n\n el.trigger('change');\n },\n _addInputListeners: function _addInputListeners(input) {\n var self = this,\n debounceTimeout = 100,\n callback = function callback(event) {\n var color = new Color(input.val()),\n val = input.val();\n input.removeClass('iris-error'); // we gave a bad color\n\n if (color.error) {\n // don't error on an empty input\n if (val !== '') input.addClass('iris-error');\n } else {\n if (color.toString() !== self._color.toString()) {\n // let's not do this on keyup for hex shortcodes\n if (!(event.type === 'keyup' && val.match(/^[0-9a-fA-F]{3}$/))) self._setOption('color', color.toString());\n }\n }\n };\n\n input.on('change', callback).on('keyup', self._debounce(callback, debounceTimeout)); // If we initialized hidden, show on first focus. The rest is up to you.\n\n if (self.options.hide) {\n input.on('focus', function () {\n self.show();\n });\n }\n }\n });\n})(jQuery);\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/js/wp-color-alpha.js?")},"./assets/admin/rmp-main.js":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _scss_wizard_ui_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scss/wizard-ui.scss */ "./assets/admin/scss/wizard-ui.scss");\n/* harmony import */ var _scss_wizard_ui_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_scss_wizard_ui_scss__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _scss_dark_mode_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scss/dark-mode.scss */ "./assets/admin/scss/dark-mode.scss");\n/* harmony import */ var _scss_dark_mode_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_scss_dark_mode_scss__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _js_rmp_admin_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./js/rmp-admin.js */ "./assets/admin/js/rmp-admin.js");\n/* harmony import */ var _js_rmp_admin_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_js_rmp_admin_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _js_wp_color_alpha_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./js/wp-color-alpha.js */ "./assets/admin/js/wp-color-alpha.js");\n/* harmony import */ var _js_wp_color_alpha_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_js_wp_color_alpha_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _js_rmp_editor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./js/rmp-editor.js */ "./assets/admin/js/rmp-editor.js");\n/* harmony import */ var _js_rmp_editor_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_js_rmp_editor_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _js_rmp_icon_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./js/rmp-icon.js */ "./assets/admin/js/rmp-icon.js");\n/* harmony import */ var _js_rmp_icon_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_js_rmp_icon_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _js_rmp_preview_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./js/rmp-preview.js */ "./assets/admin/js/rmp-preview.js");\n/* harmony import */ var _js_rmp_preview_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_js_rmp_preview_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _js_rmp_menu_wizard_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./js/rmp-menu-wizard.js */ "./assets/admin/js/rmp-menu-wizard.js");\n/**\n * Main scripts file.\n *\n * @package responsive-menu\n */\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/rmp-main.js?')},"./assets/admin/scss/dark-mode.scss":function(){eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/scss/dark-mode.scss?")},"./assets/admin/scss/wizard-ui.scss":function(){eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/scss/wizard-ui.scss?")}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(n,{a:n}),n},__webpack_require__.d=function(e,n){for(var r in n)__webpack_require__.o(n,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},__webpack_require__.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__("./assets/admin/rmp-main.js")})();
1
  /*! For license information please see rmpMain.js.LICENSE.txt */
2
+ (function(){var __webpack_modules__={"./assets/admin/js/rmp-admin.js":function(){eval("/**\n * This is admin scripts file which contain the admin actions.\n *\n * @version 4.0.0\n *\n * @author Expresstech System\n *\n */\njQuery(document).ready(function (jQuery) {\n /**\n * Iframe loader and contents show/hide.\n */\n jQuery('#rmp-preview-iframe').on('load', function () {\n jQuery('#rmp-preview-iframe-loader').hide();\n jQuery('#rmp-menu-update-notification').remove();\n jQuery('#rmp-preview-iframe').show();\n jQuery('#rmp-preview-iframe').contents().find('a').on('click', function (e) {\n e.stopPropagation();\n e.preventDefault();\n var url = jQuery(this).attr('href'); // Prevent to load the customizer page on preview aria.\n\n if ('#' == url) {\n return;\n }\n\n if (url.indexOf('?') >= 0) {\n url = url + '&rmp_preview_mode=true';\n } else {\n url = url + '?rmp_preview_mode=true';\n }\n\n jQuery('#rmp-preview-iframe').attr('src', url);\n });\n });\n /**\n * Save the theme as template.\n *\n * @since 4.0.0\n *\n * @fires Click\n */\n\n jQuery('button#rmp-save-theme').on('click', function (e) {\n e.stopPropagation();\n e.preventDefault();\n var themeName = jQuery('#rmp-save-theme-name').val();\n\n if (3 > themeName.length) {\n alert('Please give meaning full name to this theme');\n return;\n }\n\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_save_theme',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'theme_name': themeName,\n 'menu_id': jQuery('#menu_id').val(),\n 'form': jQuery('#rmp-editor-form').serialize()\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error) {\n console.log(_error.statusText);\n },\n success: function success(response) {\n jQuery(e.target).parents('.rmp-dialog-contents').append('<div class=\"notice notice-success settings-error is-dismissible\"><p>' + response.data.message + '</p></div>');\n }\n });\n });\n /**\n * Ajax call to save the menu settings when click on update.\n *\n * @version 4.0.0\n *\n * @fires click\n */\n\n jQuery(document).on('click', 'button#rmp-save-menu-options,#rmp-menu-quick-update-button', function (e) {\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_save_menu_action',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'form': jQuery('#rmp-editor-form').serialize()\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery('#rmp-preview-iframe-loader').show();\n },\n error: function error(_error2) {\n console.log(_error2.statusText);\n jQuery('#rmp-preview-iframe-loader').hide();\n },\n success: function success(response) {\n // If options is updated successfully then reload the iframe.\n if (response.success) {\n var url = jQuery('#rmp-preview-iframe').attr('src');\n jQuery('#rmp-preview-iframe').attr('src', url);\n }\n }\n });\n }); // Initiate the color picker instances.\n\n jQuery('.rmp-color-input').wpColorPicker(); // Fix events glitch on color textbox.\n\n jQuery('.rmp-color-input').removeAttr('style');\n jQuery(document).find('.rmp-color-input').off('focus'); // Initiate the tab elements.\n\n jQuery('.tabs,#rmp-setting-tabs').tabs({\n hide: {\n effect: 'explode',\n duration: 1000\n },\n show: {\n effect: 'explode',\n duration: 800\n },\n active: 0\n }); // Active tabs under ordering elements.\n\n jQuery('.nav-tab-wrapper').on('click', '.nav-tab', function (e) {\n jQuery('.nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');\n jQuery(this).addClass('nav-tab-active');\n });\n /**\n * Hamburger element selector option hide and show.\n */\n\n hideShowSelect('#rmp-menu-button-position-type', '.rmp-menu-hamburger-selector-div', 'show', 'inside-element');\n jQuery('#rmp-menu-button-position-type').on('change', function () {\n hideShowSelect(this, '.rmp-menu-hamburger-selector-div', 'show', 'inside-element');\n });\n /**\n * select hide show function\n * @para string select, string show/hide Element, string show/hide\n */\n\n function hideShowSelect(checkElement, targetElement, condition, value) {\n if (jQuery(checkElement).val() == value) {\n if (condition == 'show') {\n jQuery(targetElement).show();\n } else {\n jQuery(targetElement).hide();\n }\n } else {\n if (condition == 'show') {\n jQuery(targetElement).hide();\n } else {\n jQuery(targetElement).show();\n }\n }\n }\n /**\n * Check open/close of device options switcher.\n *\n * @version 4.0.0\n *\n * @fires click\n */\n\n\n jQuery('.rmp-device-switcher').on('click', function () {\n var isOpen = jQuery(this).hasClass('open');\n\n if (isOpen) {\n jQuery(this).removeClass('open');\n } else {\n jQuery('.rmp-device-switcher').removeClass('open');\n jQuery(this).addClass('open');\n }\n });\n /**\n * Change the option when select a device.\n *\n * @version 4.0.0\n *\n * @fires click\n */\n\n jQuery('.rmp-device-switcher li').on('click', function () {\n var selectedDevice = jQuery(this).attr('data-device');\n var firstDevice = jQuery('.rmp-device-switcher li:first-child').attr('data-device');\n\n if (selectedDevice != firstDevice) {\n activeDeviceOptions(selectedDevice);\n\n if ('desktop' == selectedDevice) {\n jQuery('#rmp-preview-desktop').trigger('click');\n } else if ('tablet' == selectedDevice) {\n jQuery('#rmp-preview-tablet').trigger('click');\n } else {\n jQuery('#rmp-preview-mobile').trigger('click');\n }\n }\n });\n /**\n * Active all the device options in editor.\n *\n * @version 4.0.0;\n * @param {string} selectedDevice This device name which is active.\n */\n\n function activeDeviceOptions(selectedDevice) {\n var firstDevice = jQuery('.rmp-device-switcher li:first-child').attr('data-device');\n var selectedIcon = jQuery('.rmp-device-switcher li[data-device=' + selectedDevice + ']').html();\n var firstIcon = jQuery('.rmp-device-switcher li:first-child').html();\n jQuery('.rmp-device-switcher li').each(function () {\n if (jQuery(this).attr('data-device') === selectedDevice) {\n jQuery(this).html(firstIcon);\n jQuery(this).attr('data-device', firstDevice);\n } else if (jQuery(this).attr('data-device') === firstDevice) {\n jQuery(this).html(selectedIcon);\n jQuery(this).attr('data-device', selectedDevice);\n }\n });\n }\n /**\n * Close the device switcher when mouseup other places.\n *\n * @version 4.0.0\n *\n * @fires mouseup\n */\n\n\n jQuery(document).on('mouseup', function (event) {\n var target = event.target;\n var deviceSwitcher = jQuery('.rmp-device-switcher');\n\n if (!deviceSwitcher.is(target) && 0 === deviceSwitcher.has(target).length) {\n deviceSwitcher.removeClass('open');\n }\n });\n /**\n * Active preview as per clicked device.\n *\n * @version 4.0.0\n *\n * @fires Click\n */\n\n jQuery('#rmp-editor-footer .rmp-preview-device-wrapper').on('click', 'button', function (e) {\n jQuery('#rmp-editor-footer').find('.rmp-preview-device-wrapper button').removeClass('active');\n jQuery('#rmp-editor-footer').find('.rmp-preview-device-wrapper button').attr('aria-pressed', 'false');\n jQuery(this).addClass('active');\n jQuery(this).attr('aria-pressed', 'true');\n var device = jQuery(this).data('device');\n var deviceEditor = jQuery('#rmp-editor-wrapper');\n var allClasses = deviceEditor.attr('class').split(' ');\n allClasses.forEach(function (value) {\n if (value.includes('rmp-preview-')) {\n deviceEditor.removeClass(value);\n }\n });\n deviceEditor.addClass('rmp-preview-' + device);\n activeDeviceOptions(device);\n });\n /**\n * Instantiate the accordion elements.\n * @version 4.0.0\n */\n\n jQuery('.rmp-accordion-container,.rmp-sub-accordion-container').accordion({\n collapsible: true,\n heightStyle: 'content',\n animate: 200,\n active: 0\n });\n /**\n * Instantiate the draggable and sortable menu item order elements.\n * \t@version 4.0.0\n */\n\n jQuery('#rmp-menu-ordering-items').accordion().sortable({\n placeholder: 'sortable-placeholder',\n opacity: 0.9,\n cursor: 'move',\n delay: 150,\n forcePlaceholderSize: true,\n active: false\n });\n /**\n * Stop propagating when click on item control element.\n */\n\n jQuery('#tab-container .item-controls, #tab-header-bar .item-controls').on('click', function (event) {\n event.stopPropagation();\n });\n /**\n * Show/Hide tooltip for option description.\n *\n * @version 4.0.0\n *\n * @fires click,mouseleave\n */\n\n jQuery('.rmp-tooltip-icon').on('click', function (e) {\n if (jQuery(this).hasClass('show-tooltip')) {\n return;\n } else {\n jQuery(this).addClass('show-tooltip');\n }\n\n var toolTipContents = jQuery(this).find('.rmp-tooltip-content');\n toolTipContents.css({\n 'left': e.pageX - toolTipContents.width() / 100 * 60,\n 'position': 'fixed',\n 'top': e.pageY - toolTipContents.height() - 10,\n 'bottom': 'unset'\n });\n toolTipContents.fadeIn();\n }).on('mouseleave', function () {\n jQuery(this).removeClass('show-tooltip');\n jQuery(this).find('.rmp-tooltip-content').fadeOut();\n });\n /**\n * Remove image from image picker\n *\n * @version 4.0.0\n *\n * @fires Click\n */\n\n jQuery('.rmp-image-picker ').on('click', '.rmp-image-picker-trash', function (e) {\n e.stopPropagation();\n e.preventDefault();\n jQuery(this).parent('.rmp-image-picker').siblings('input.rmp-image-url-input').val('');\n jQuery(this).parent('.rmp-image-picker').removeAttr('style');\n jQuery(this).remove();\n\n if (!jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length) {\n addUpdateNotification();\n }\n });\n /**\n * Show/Hide the theme uploader section in theme page.\n */\n\n jQuery('#rmp-upload-new-theme').on('click', function () {\n jQuery('#rmp-menu-library-import').toggleClass('hide');\n });\n /**\n * Hide theme uploader section when click on cancel.\n */\n\n jQuery('#rmp-menu-library-import-form').on('click', '.cancel', function (e) {\n jQuery('#rmp-menu-library-import').addClass('hide');\n });\n /**\n * Upload the theme file using dropzone.\n *\n * @version 4.0.0\n */\n\n jQuery('#rmp-menu-library-import-form').dropzone({\n clickable: true,\n acceptedFiles: '.zip',\n uploadMultiple: false,\n success: function success(file, response) {\n location.reload();\n },\n totaluploadprogress: function totaluploadprogress() {\n jQuery('.rmp-page-loader').css('display', 'flex');\n }\n });\n /**\n * Open theme options in editor footer.\n */\n\n jQuery('#rmp-theme-action').on('click', function (e) {\n jQuery('#rmp-footer-theme-options').toggleClass('open');\n });\n /**\n * Show/Hide the save theme wizard.\n */\n\n jQuery('.rmp-theme-save-button, #rmp-menu-save-theme-wizard .rmp-dialog-wrap .close').on('click', function (e) {\n jQuery('#rmp-menu-save-theme-wizard').toggle();\n });\n /**\n * Delete the theme from theme page.\n */\n\n jQuery('.rmp-theme-delete').on('click', function (e) {\n e.preventDefault();\n /** Ask for delete confirmation */\n\n var isConfirm = confirm('Are you sure, You want to delete this theme ?');\n\n if (!isConfirm) {\n return;\n } //Show the loader on deleting theme.\n\n\n var current_theme = jQuery(this);\n current_theme.append('<span class=\"spinner is-active\"></span>');\n var themeName = jQuery(this).attr('data-theme');\n var themeType = jQuery(this).attr('data-theme-type').toLowerCase();\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_theme_delete',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'theme_name': themeName,\n 'theme_type': themeType\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error3) {\n console.log(_error3.statusText);\n },\n success: function success(response) {\n current_theme.find('.spinner').removeClass('is-active');\n\n if (response.success) {\n location.reload();\n } else {\n alert(response.data.message);\n }\n }\n });\n });\n /**\n * Apply the selected theme in current active menu in editor.\n *\n * @version 4.0.0\n *\n * @fires click\n */\n\n jQuery(document).on('click', '.rmp-theme-apply', function (e) {\n //Show the overlay with loader.\n jQuery('.rmp-page-loader').css('display', 'flex');\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_theme_apply',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'theme_name': jQuery(this).attr('theme-name'),\n 'theme_type': jQuery(this).attr('theme-type').toLowerCase(),\n 'menu_id': jQuery('#menu_id').val(),\n 'menu_to_use': jQuery('#rmp-menu-to-use').val()\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error4) {\n console.log(_error4.statusText);\n jQuery('.rmp-page-loader').hide();\n },\n success: function success(response) {\n if (response.success) {\n location.reload();\n } else {\n jQuery('.rmp-page-loader').hide();\n alert(response.data.message);\n }\n }\n });\n });\n /**\n * Save the global settings on click.\n *\n * @version 4.0.0\n *\n * @fires click\n */\n\n jQuery('.rmp-save-global-settings-button').on('click', function (e) {\n e.preventDefault();\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_save_global_settings',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'form': jQuery('#rmp-global-settings').serialize()\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery(this).prop('disabled', true);\n jQuery('.spinner').addClass('is-active');\n },\n error: function error(_error5) {\n console.log('Internal Error !' + _error5);\n },\n success: function success(response) {\n jQuery('.spinner').removeClass('is-active');\n jQuery(this).prop('disabled', false);\n }\n });\n });\n /**\n * Initiate multiple selectize option of editor.\n */\n\n jQuery('#rmp-keyboard-shortcut-close-menu,#rmp-keyboard-shortcut-open-menu').selectize({\n maxItems: 2,\n plugins: ['remove_button']\n });\n /**\n * Event to linked the group inputs.\n *\n * @fires Click\n */\n\n jQuery(document).on('click', 'button.rmp-group-input-linked', function () {\n jQuery(this).toggleClass('is-linked');\n });\n /**\n * Event to type on all sibblings input if linked.\n *\n * @fires keyup\n */\n\n jQuery(document).on('keyup', 'input.rmp-group-input', function (event) {\n var pressedKeys = this.value.toLocaleLowerCase();\n var parent = jQuery(this).parents('.rmp-input-group-control');\n var isLinked = parent.find('.is-linked');\n\n if (isLinked.length) {\n parent.find('input.rmp-group-input').val(pressedKeys);\n } else {\n jQuery(this).val(pressedKeys);\n }\n });\n /**\n * Function to add the notification and update button.\n */\n\n function addUpdateNotification() {\n if (!jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length) {\n jQuery('#rmp-editor-main').prepend('<div id=\"rmp-menu-update-notification\" class=\"rmp-order-item rmp-order-item-description\">' + '<span> <span class=\"rmp-font-icon dashicons dashicons-warning \"></span> Update Required </span>' + '<a href=\"javascript:void(0)\" id=\"rmp-menu-quick-update-button\">UPDATE</a>' + '</div>');\n }\n }\n\n jQuery('form#rmp-editor-form').on('keyup change paste', 'input, select, textarea, radio, checkbox', function () {\n if (!jQuery(this).hasClass('no-updates')) {\n addUpdateNotification();\n }\n });\n jQuery(document).on('click', '#rmp-icon-dialog-select,.media-button-select,.rmp-icon-picker,.rmp-image-picker', function () {\n if (!jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length) {\n addUpdateNotification();\n }\n });\n /**\n * Event to download exported menu settings as json file.\n *\n * @version 4.0.0\n */\n\n jQuery('#rmp-export-menu-button').on('click', function (e) {\n e.preventDefault();\n var menu_id = jQuery('#rmp_export_menu_list').val();\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_export_menu',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'menu_id': menu_id\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery('#rmp-export-menu-button').prop('disabled', true);\n },\n error: function error(_error6) {\n console.log(_error6.statusText);\n jQuery('#rmp-export-menu-button').prop('disabled', false);\n },\n success: function success(response) {\n jQuery('#rmp-export-menu-button').prop('disabled', false);\n\n if (response.success) {\n var menu_name = jQuery('#rmp_export_menu_list').children(\":selected\").text().trim().toLocaleLowerCase().split(' ').join('-');\n download_file(response.data, menu_name + '.json', 'application/json');\n } else {\n jQuery('#rmp-global-settings').before('<div class=\"notice notice-error settings-error is-dismissible\"> <p>' + response.data.message + '</p></div>');\n setTimeout(function () {\n jQuery('#rmp-global-settings').parent().find('.notice').remove();\n }, 3000);\n }\n }\n });\n });\n /**\n * Function to download the content as file.\n *\n * @since 4.0.0\n *\n * @param {String} content Contents for file\n * @param {String} name Name of the file.\n * @param {String} type File type\n */\n\n function download_file(content, name, type) {\n var link = document.body.appendChild(document.createElement('a'));\n var file = new Blob([content], {\n type: type\n });\n link.href = URL.createObjectURL(file);\n link.download = name;\n link.click();\n }\n /**\n * Event to download exported menu settings as json file.\n *\n * @version 4.0.0\n */\n\n\n jQuery('#rmp-import-menu-button').on('click', function (e) {\n e.preventDefault();\n var menu_id = jQuery('#rmp_import_menu_list').val();\n\n if (!menu_id) {\n alert('Please create menu first ! ');\n return;\n }\n\n var file_data = jQuery('#rmp_input_import_file')[0].files[0];\n\n if (!file_data) {\n alert('Choose export file ! ');\n return;\n }\n\n var form_data = new FormData();\n form_data.append('file', file_data);\n form_data.append('ajax_nonce', rmpObject.ajax_nonce);\n form_data.append('menu_id', menu_id);\n form_data.append('action', 'rmp_import_menu');\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: form_data,\n type: 'POST',\n cache: false,\n contentType: false,\n processData: false,\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery('#rmp-import-menu-button').prop('disabled', true);\n },\n error: function error(_error7) {\n console.log(_error7.statusText);\n jQuery('#rmp-import-menu-button').prop('disabled', false);\n },\n success: function success(response) {\n jQuery('#rmp-import-menu-button').prop('disabled', false);\n noticeClass = 'notice-error';\n\n if (response.success) {\n noticeClass = 'notice-success';\n jQuery('#rmp_input_import_file').val('');\n }\n\n jQuery('#rmp-global-settings').before('<div class=\"notice ' + noticeClass + ' settings-error is-dismissible\"> <p>' + response.data.message + '</p></div>');\n setTimeout(function () {\n jQuery('#rmp-global-settings').parent().find('.notice').remove();\n }, 3000);\n }\n });\n });\n /**\n * Function to manage menu container animation options.\n *\n * @param {String} optionValue\n */\n\n function updateMenuContainerAnimationOptions(optionValue) {\n if ('push' === optionValue) {\n jQuery('#rmp-page-wrapper').parents('.rmp-input-control-wrapper').fadeIn();\n } else {\n jQuery('#rmp-page-wrapper').parents('.rmp-input-control-wrapper').fadeOut();\n }\n\n if ('fade' === optionValue) {\n jQuery('#rmp-menu-appear-from option[value=\"top\"]').hide();\n jQuery('#rmp-menu-appear-from option[value=\"bottom\"]').hide();\n } else {\n jQuery('#rmp-menu-appear-from option[value=\"top\"]').show();\n jQuery('#rmp-menu-appear-from option[value=\"bottom\"]').show();\n }\n } // Menu container animation type and their options.\n\n\n updateMenuContainerAnimationOptions(jQuery('#rmp-animation-type').val());\n jQuery('#rmp-editor-wrapper').on('change', '#rmp-animation-type', function (e) {\n var optionValue = jQuery(this).val();\n updateMenuContainerAnimationOptions(optionValue);\n });\n /**\n * Event to back on home page under preview screen.\n *\n * @since 4.1.0\n *\n * @fires click\n *\n * @return void\n */\n\n jQuery('#rmp-preview-wrapper').on('click', function () {\n var url = window.location.href;\n url = url.substring(0, url.indexOf('wp-admin')) + '?rmp_preview_mode=true';\n jQuery('#rmp-preview-iframe-loader').show();\n jQuery('#rmp-preview-iframe').attr('src', url);\n });\n /** Call ajax to hide admin notice permanent. */\n\n jQuery('.notice-responsive-menu').on('click', '.notice-dismiss', function (event) {\n event.preventDefault();\n jQuery.ajax({\n type: \"POST\",\n url: rmpObject.ajaxURL,\n data: 'action=rmp_upgrade_admin_notice_dismiss'\n });\n });\n});\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/js/rmp-admin.js?")},"./assets/admin/js/rmp-editor.js":function(){eval("/**\n * This file container the editor multi level features.\n *\n * @version 4.0.0\n *\n * @type {Object}\n */\nvar rmpEditor = {\n editorSidebar: '#rmp-editor-wrapper',\n sidebarDrawer: 'button.collapse-sidebar',\n mainForm: '#rmp-editor-form',\n editorContainer: '#rmp-editor-main',\n topParentNav: '#rmp-editor-nav',\n topParentTab: '#rmp-editor-pane',\n childTabs: '.rmp-accordions',\n parentTabItem: '.rmp-editor-pane-parent li.rmp-tab-item',\n tabItem: 'li.rmp-tab-item',\n quickItem: '.rmp-quick-edit-link',\n tabItemTitle: '.rmp-tab-item-title',\n titleLogo: '.rmp-editor-header-logo',\n closeButton: '.rmp-editor-header-close',\n searchButton: '.rmp-search-settings-btn',\n searchForm: '.rmp-search-settings',\n titleText: '.rmp-editor-header-title',\n backButton: '.rmp-editor-header-back',\n accordionItem: 'li.rmp-accordion-item',\n tabId: null,\n level: 0,\n triggerBack: function triggerBack() {\n this.level--;\n parentId = jQuery('#' + this.tabId).attr('aria-parent');\n jQuery('#' + parentId).show();\n var title = jQuery('#' + parentId).attr('aria-label');\n this.updateHeader(title);\n jQuery('#' + this.tabId).hide();\n this.tabId = parentId;\n },\n updatePanel: function updatePanel(current) {\n this.tabId = current.attr('aria-owns');\n jQuery('#' + this.tabId).show();\n parentId = current.parent('ul').parent('div').attr('id');\n jQuery('#' + this.tabId).attr('aria-parent', parentId);\n jQuery('#' + parentId).hide();\n },\n updateQuickPanel: function updateQuickPanel(current) {\n this.tabId = current.attr('aria-owns');\n var accordionId = current.attr('accordion-id');\n var subAccordionId = current.attr('sub-accordion-id');\n var subTabId = current.attr('sub-tab-id');\n parentId = jQuery(\".rmp-accordions:visible\").attr('id');\n jQuery('#' + this.tabId).attr('aria-parent', parentId);\n jQuery('#' + parentId).hide();\n jQuery('#' + this.tabId).show();\n\n if (accordionId != '') {\n if (!jQuery('#' + accordionId).hasClass(\"ui-state-active\")) {\n jQuery('#' + accordionId).click();\n }\n\n if (subAccordionId != '') {\n if (!jQuery('#' + subAccordionId).hasClass(\"ui-state-active\")) {\n jQuery('#' + subAccordionId).click();\n }\n\n accordionId = subAccordionId;\n }\n\n setTimeout(function () {\n var topPos = document.getElementById(accordionId).offsetTop;\n jQuery('#rmp-editor-main').animate({\n scrollTop: topPos - 60 + 'px'\n }, 500);\n }, 400);\n }\n\n if (subTabId != '') {\n jQuery('#' + subTabId).click();\n }\n },\n updateHeader: function updateHeader(title) {\n if (0 == this.level) {\n jQuery(this.titleLogo).find('img').show();\n jQuery(this.closeButton).show();\n jQuery(this.backButton).hide();\n jQuery(this.searchForm).css('width', '200');\n } else if (1 == this.level) {\n jQuery(this.backButton).css('display', 'flex');\n jQuery(this.titleLogo).find('img').hide();\n jQuery(this.closeButton).hide();\n jQuery(this.searchForm).css('width', '255');\n }\n\n jQuery(this.titleText).text(title);\n },\n init: function init() {\n var self = this; // Move on next panel when click on item.\n\n jQuery(self.editorContainer).on('click', self.tabItem, function (e) {\n e.stopPropagation();\n e.preventDefault();\n current = jQuery(this);\n self.level++;\n self.updateHeader(current.text());\n self.updatePanel(current);\n }); // Move on next panel when click on item.\n\n jQuery(self.editorContainer).on('click', self.quickItem, function (e) {\n e.stopPropagation();\n e.preventDefault();\n current = jQuery(this);\n var tabId = current.attr('aria-owns');\n var title = jQuery('.rmp-tab-item[aria-owns=\"' + tabId + '\"]').find('.rmp-tab-item-title').html();\n self.level++;\n self.updateHeader(title);\n self.updateQuickPanel(current);\n }); // Back from inner panel when click on back button.\n\n jQuery(self.backButton).on('click', function (e) {\n e.stopPropagation();\n self.triggerBack();\n }); // Open/Close the editor setting sidebar.\n\n jQuery(self.sidebarDrawer).on('click', function (e) {\n jQuery(self.editorSidebar).toggleClass('expanded collapsed');\n }); // Open/Close the search form.\n\n jQuery(self.searchButton).on('click', function (e) {\n jQuery(self.searchForm).toggle();\n }); //Search settings\n\n jQuery.expr[':'].containsIgnoreCase = function (n, i, m) {\n return jQuery(n).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0;\n };\n\n jQuery.fn.highlight = function (pat) {\n function innerHighlight(node, pat) {\n var skip = 0;\n\n if (jQuery(node).is(\"select,input,textarea, .rmp-tooltip-content \")) {\n return skip;\n }\n\n if (node.nodeType == 3) {\n var pos = node.data.toUpperCase().indexOf(pat);\n\n if (pos >= 0) {\n var spannode = document.createElement('i');\n spannode.className = 'rmp-highlight';\n var middlebit = node.splitText(pos);\n middlebit.splitText(pat.length);\n var middleclone = middlebit.cloneNode(true);\n spannode.appendChild(middleclone);\n middlebit.parentNode.replaceChild(spannode, middlebit);\n skip = 1;\n }\n } else if (node.nodeType == 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {\n for (var i = 0; i < node.childNodes.length; ++i) {\n i += innerHighlight(node.childNodes[i], pat);\n }\n }\n\n return skip;\n }\n\n return this.each(function () {\n innerHighlight(this, pat.toUpperCase());\n });\n };\n\n jQuery.fn.removeHighlight = function () {\n function newNormalize(node) {\n for (var i = 0, children = node.childNodes, nodeCount = children.length; i < nodeCount; i++) {\n var child = children[i];\n\n if (child.nodeType == 1) {\n newNormalize(child);\n continue;\n }\n\n if (child.nodeType != 3) {\n continue;\n }\n\n var next = child.nextSibling;\n\n if (next == null || next.nodeType != 3) {\n continue;\n }\n\n var combined_text = child.nodeValue + next.nodeValue;\n var new_node = node.ownerDocument.createTextNode(combined_text);\n node.insertBefore(new_node, child);\n node.removeChild(child);\n node.removeChild(next);\n i--;\n nodeCount--;\n }\n }\n\n return this.find(\"i.rmp-highlight\").each(function () {\n var thisParent = this.parentNode;\n thisParent.replaceChild(this.firstChild, this);\n newNormalize(thisParent);\n }).end();\n };\n\n jQuery(document).on('keyup change search', self.searchForm, function () {\n var searchTerm = jQuery(this).val();\n jQuery('#rmp-editor-main').removeHighlight();\n jQuery('.rmp-search-results-found').remove();\n if (searchTerm == '') return false;\n jQuery('#rmp-editor-main').highlight(searchTerm);\n jQuery(self.parentTabItem).each(function () {\n var target = \"#\" + jQuery(this).attr(\"aria-owns\");\n var count = jQuery(target).find(\"i.rmp-highlight:containsIgnoreCase(\" + searchTerm + \")\").length;\n jQuery(target).find(self.tabItem).each(function () {\n var childTarget = \"#\" + jQuery(this).attr(\"aria-owns\");\n var childCount = jQuery(childTarget).find(\"i.rmp-highlight:containsIgnoreCase(\" + searchTerm + \")\").length;\n\n if (childCount > 0) {\n jQuery(this).append('<span class=\"rmp-search-results-found\">' + childCount + ' Results</span>');\n count = Number(count) + Number(childCount);\n }\n });\n\n if (count > 0) {\n jQuery(target).find(self.accordionItem).each(function () {\n var accordionItemCount = jQuery(this).find(\":not(.accordion-item-title, .item-title) > i.rmp-highlight:containsIgnoreCase(\" + searchTerm + \")\").length;\n\n if (accordionItemCount > 0) {\n jQuery(this).find('.rmp-accordion-title:first > .accordion-item-title, .rmp-accordion-title:first > .item-title').append('<span class=\"rmp-search-results-found\">' + accordionItemCount + ' Results</span>');\n }\n });\n jQuery(this).append('<span class=\"rmp-search-results-found\">' + count + ' Results</span>');\n }\n });\n });\n }\n};\nrmpEditor.init();\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/js/rmp-editor.js?")},"./assets/admin/js/rmp-icon.js":function(){eval("/**\n * This file contain the script to handle the icon wizard and it's operation.\n *\n * @version 4.0.0\n */\njQuery(document).ready(function () {\n var RMP_Icon = {\n iconSelect: '#rmp-icon-dialog-select',\n iconContainer: '.rmp-menu-icons-dialog',\n clearSelector: '#rmp-icon-dialog-clear',\n closeSelector: '.rmp-menu-icons-dialog .rmp-dialog-header button.close',\n clear: function clear() {\n var self = this;\n jQuery(self.clearSelector).on('click', function () {\n jQuery(self.iconContainer).find('input').prop('checked', false);\n });\n },\n closeDialog: function closeDialog() {\n var self = this;\n jQuery(self.closeSelector).on('click', function () {\n jQuery(self.iconContainer).hide();\n });\n },\n openDialog: function openDialog(iconChooser) {\n var self = this;\n jQuery(iconChooser).on('click', function (e) {\n e.stopPropagation();\n jQuery(self.iconContainer).show();\n jQuery(self.iconSelect).attr('data-click', jQuery(e.target).attr('id'));\n });\n },\n getIconElementWrap: function getIconElementWrap(icon_class) {\n if (icon_class.includes('material-icons')) {\n icon_class = icon_class.replace('material-icons', '');\n return '<span class=\"rmp-font-icon material-icons\">' + icon_class + '</span>';\n }\n\n return '<span class=\"rmp-font-icon ' + icon_class + ' \"></span>';\n },\n removeIcon: function removeIcon(iconChooser) {\n jQuery(iconChooser).on('click', '.rmp-icon-picker-trash', function (e) {\n e.preventDefault();\n e.stopPropagation();\n jQuery(this).parent('.rmp-icon-picker').siblings('input.rmp-icon-hidden-input').val('');\n jQuery(this).siblings('.rmp-font-icon').remove();\n jQuery(this).parent('.rmp-icon-picker').removeAttr('data-icon');\n jQuery(this).remove();\n\n if (!jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length) {\n jQuery('#rmp-editor-main').prepend('<div id=\"rmp-menu-update-notification\" class=\"rmp-order-item rmp-order-item-description\">' + '<span> <span class=\"rmp-font-icon dashicons dashicons-warning \"></span> Update Required </span>' + '<a href=\"javascript:void(0)\" id=\"rmp-menu-quick-update-button\">UPDATE</a>' + '</div>');\n }\n });\n },\n getIcon: function getIcon() {\n var self = this;\n jQuery(document).on('click', this.iconSelect, function () {\n icon_class = jQuery(self.iconContainer).find('input:checked').val();\n clicker = '#' + jQuery(self.iconSelect).attr('data-click');\n icon_wrap = self.getIconElementWrap(icon_class);\n jQuery(clicker).find('.rmp-font-icon').remove();\n jQuery(clicker).prev('input.rmp-icon-hidden-input').val(icon_wrap);\n jQuery(clicker).append(icon_wrap);\n jQuery(clicker).attr('data-icon', true);\n jQuery(clicker).find('.rmp-icon-picker-trash').remove();\n jQuery(clicker).append('<i class=\"rmp-icon-picker-trash dashicons dashicons-trash\" aria-hidden=\"true\"></i>');\n jQuery(self.iconSelect).removeAttr('data-click');\n jQuery(self.closeSelector).click();\n jQuery(clicker).prev('input').first().focus();\n });\n },\n init: function init(iconChooser) {\n this.openDialog(iconChooser);\n this.removeIcon(iconChooser);\n this.getIcon();\n this.clear();\n this.closeDialog();\n jQuery('#rmp-icon-search').on('keyup', _.debounce(this.searchIcon, 500));\n jQuery('#rmp-icon-search').on('keyup', function () {\n var query_string = this.value.toLocaleLowerCase();\n\n if (query_string.length) {\n if (!jQuery('#rmp-icon-search-typing-message').length) {\n jQuery(this).after('<span id=\"rmp-icon-search-typing-message\"> Waiting for more keystrokes... </span>');\n } else {\n jQuery('#rmp-icon-search-typing-message').html('Waiting for more keystrokes...');\n }\n }\n });\n /**\n * Create menu item icon selector.\n */\n\n jQuery(document).on('click', '.delete-menu-item-icon', function () {\n jQuery(this).closest('.rmp-menu-item-icon-container').remove();\n });\n },\n searchIcon: function searchIcon(e) {\n jQuery('#rmp-icon-search-typing-message').html('Please wait moment..');\n var query_string = this.value.toLocaleLowerCase();\n var activeTab = jQuery('.rmp-menu-icons-dialog').find('.nav-tab-active');\n\n if (!activeTab.length) {\n activeTab = jQuery('.rmp-menu-icons-dialog').find('.nav-tab').first();\n }\n\n icon_container = activeTab.attr('href');\n var icon_selector = jQuery(icon_container + ' .font-icon');\n var is_exist = false;\n icon_selector.each(function () {\n var icon_label = jQuery(this).children('input').val().toLocaleLowerCase();\n\n if (icon_label.includes(query_string)) {\n jQuery(this).show();\n is_exist = true;\n } else {\n jQuery(this).hide();\n }\n });\n\n if (is_exist) {\n jQuery('#rmp-icon-search-typing-message').html('Done, Check results..');\n } else {\n jQuery('#rmp-icon-search-typing-message').html('Sorry, Not found..');\n }\n }\n };\n RMP_Icon.init('.rmp-icon-picker');\n});\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/js/rmp-icon.js?")},"./assets/admin/js/rmp-menu-wizard.js":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/**\n * This is js hook scripts file for responsive menu.\n *\n * @file This files defines the rmpNewMenuWizard object.\n * @author ExpressTech System.\n *\n * @since 4.1.0\n *\n * @package responsive-menu\n */\n\n/**\n * Hooks class.\n *\n * @type {Object}\n *\n * @since 4.1.0\n */\n\nvar rmpMenuWizard = {\n /**\n * Initialize.\n *\n * @return {void}\n */\n init: function init() {\n this.setProps();\n },\n\n /**\n * Set properties and selectors.\n *\n * @return {void}\n */\n setProps: function setProps() {\n var _this = this;\n\n //Assign wizard container element id.\n var menuWizardContainer = jQuery('#rmp-new-menu-wizard'); //Open new create menu wizard on click event.\n\n jQuery(document).on('click', 'a.page-title-action', function (e) {\n e.preventDefault();\n menuWizardContainer.show();\n }); //Close the new menu wizard.\n\n jQuery('#rmp-new-menu-wizard .rmp-dialog-header button.close').on('click', function () {\n menuWizardContainer.hide();\n }); //Show/Hide the page selection input control.\n\n menuWizardContainer.on('change', '.rmp-menu-display-option', function (e) {\n var optionValue = jQuery(this).val();\n\n if ('exclude-pages' === optionValue || 'include-pages' === optionValue) {\n jQuery('#rmp-menu-page-selector').show();\n return;\n }\n\n jQuery('#rmp-menu-page-selector').hide();\n }); //Show/Hide change theme wizard in customizer page.\n\n jQuery('.rmp-theme-change-button').on('click', function (e) {\n menuWizardContainer.toggle();\n }); //Multi step form event for next button.\n\n jQuery('#rmp-menu-next-step').on('click', function () {\n _this.nextSection();\n }); //Multi step form event for top item label.\n\n jQuery('li.rmp-new-menu-step').on('click', function (e) {\n var index = jQuery(e.currentTarget).index();\n\n _this.goToSection(index);\n }); //Call ajax to save the new create menu.\n\n jQuery('#rmp-create-new-menu').on('click', function (e) {\n e.preventDefault();\n var menuName = jQuery('#rmp-menu-name');\n var themeName = jQuery('.rmp-theme-option:checked').val();\n\n if (themeName == undefined) {\n themeName = '';\n }\n\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_create_new_menu',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'menu_name': menuName.val(),\n 'menu_to_hide': jQuery('#rmp-hide-menu').val(),\n 'menu_to_use': jQuery('#rmp-menu-to-use').val(),\n 'menu_show_on_pages': jQuery('#rmp-menu-display-on-pages').val(),\n 'menu_show_on': jQuery('.rmp-menu-display-option').val(),\n 'menu_theme': themeName,\n 'theme_type': jQuery('.rmp-theme-option:checked').attr('theme-type')\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery(e.currentTarget).prop('disabled', true);\n jQuery('.spinner').addClass('is-active');\n },\n error: function error(_error) {\n console.log('Internal Error !');\n jQuery('#rmp-create-new-menu').prop('disabled', false);\n jQuery('.spinner').removeClass('is-active');\n },\n success: function success(response) {\n jQuery('.spinner').removeClass('is-active');\n jQuery('#rmp-create-new-menu').prop('disabled', false);\n\n if (response.success) {\n window.location.href = response.data.customize_url;\n } else {\n alert(response.data.message);\n }\n }\n });\n }); //Ajax call to upload the theme.\n\n jQuery('#rmp-theme-upload').on('click', function (e) {\n e.preventDefault();\n var formData = new FormData();\n var file = jQuery('#rmp_menu_theme_zip').prop('files')[0];\n formData.append('file', file);\n formData.append('action', 'rmp_menu_theme_upload');\n formData.append('ajax_nonce', rmpObject.ajax_nonce);\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: formData,\n type: 'POST',\n processData: false,\n contentType: false,\n dataType: 'json',\n success: function success(response) {\n jQuery('#rmp_menu_theme_zip').val('');\n alert(response.data.message);\n\n if (response.data.html) {\n jQuery('#rmp-new-menu-wizard').find('#tabs-1').html(response.data.html);\n jQuery('#rmp-menu-library-import').addClass('hide');\n }\n }\n });\n }); //Ajax call to check the recent changes the theme api.\n\n jQuery('.rmp-call-theme-api-button').on('click', function (e) {\n if (!jQuery(e.currentTarget).hasClass('rmp-call-theme-api-button')) {\n return;\n }\n\n jQuery('#rmp-new-menu-wizard').find('.rmp-page-loader').css('display', 'flex');\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_call_theme_api',\n 'ajax_nonce': rmpObject.ajax_nonce\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error2) {\n jQuery('#rmp-new-menu-wizard').find('.rmp-page-loader').hide();\n jQuery('#rmp-new-menu-wizard').find('#tabs-2 .rmp_theme_grids').html('Internal Error !');\n },\n success: function success(response) {\n if (response.data.html) {\n jQuery('#rmp-new-menu-wizard').find('#tabs-2 .rmp_theme_grids').html(response.data.html);\n jQuery(e.currentTarget).removeClass('rmp-call-theme-api-button');\n }\n }\n });\n });\n },\n\n /**\n * Jump to the next section of wizard.\n *\n * @return {void}\n */\n nextSection: function nextSection() {\n var currectSectionIndex = jQuery('div.rmp-menu-section.current').index();\n this.goToSection(currectSectionIndex + 1);\n },\n\n /**\n * Show the indexed section in wizard.\n *\n * @return {void}\n */\n goToSection: function goToSection(currectSectionIndex) {\n if (1 <= currectSectionIndex) {\n jQuery('#rmp-create-new-menu').show();\n jQuery('#rmp-menu-next-step').hide();\n } else {\n jQuery('#rmp-create-new-menu').hide();\n jQuery('#rmp-menu-next-step').show();\n }\n\n jQuery('div.rmp-menu-section').eq(currectSectionIndex).addClass('current').siblings().removeClass('current');\n jQuery('li.rmp-new-menu-step').eq(currectSectionIndex).addClass('current').siblings().removeClass('current');\n }\n};\nrmpMenuWizard.init();\n/* harmony default export */ __webpack_exports__[\"default\"] = (rmpMenuWizard);\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/js/rmp-menu-wizard.js?")},"./assets/admin/js/rmp-preview.js":function(){eval("/**\n * This is preview scripts file for responsive menu customizer.\n *\n * @file This files defines the rmpHook object.\n * @author ExpressTech System.\n * @type {Object}\n *\n * @since 4.0.0\n *\n * @package responsive-menu\n */\n\n/**\n * Hooks class.\n *\n * @type {Object}\n *\n * @since 4.0.0\n */\nvar rmpHook = {\n hooks: [],\n isBreak: false,\n\n /**\n * Function to register the hook.\n *\n * @since 4.0.0\n *\n * @param String name Hook Name.\n * @param function callback Associated function.\n */\n register: function register(name, callback) {\n if ('undefined' == typeof rmpHook.hooks[name]) {\n rmpHook.hooks[name] = [];\n }\n\n rmpHook.hooks[name].push(callback);\n },\n\n /**\n * Function to call the hook.\n *\n * @since 4.0.0\n *\n * @param String name Hook Name.\n * @param function params Paramter list.\n */\n call: function call(name, params) {\n if ('undefined' != typeof rmpHook.hooks[name]) {\n for (var i = 0; i < rmpHook.hooks[name].length; ++i) {\n var output = rmpHook.hooks[name][i](params);\n\n if (false == output) {\n rmpHook.isBreak = true;\n return false;\n }\n\n return output;\n }\n }\n\n return true;\n }\n};\n/**\n * Register function to color the menu elements.\n *\n * @since 4.0.0\n *\n * @param {Object} args List of inputs.\n * @return {String}\n */\n\nrmpHook.register('rmp_color_style', function (args) {\n if (!args) {\n return false;\n } // Set the state/pseudo class.\n\n\n if ('hover' == args.state) {\n args.outputSelector = args.outputSelector + ':hover';\n } else if ('placeholder' == args.state) {\n args.outputSelector = args.outputSelector + '::placeholder';\n } else if ('before' == args.state) {\n args.outputSelector = args.outputSelector + '::before';\n } else if ('after' == args.state) {\n args.outputSelector = args.outputSelector + '::after';\n } //Prepare css string and return.\n\n\n return args.outputSelector + '{ ' + args.attr + ' : ' + args.value + ';}';\n});\n/**\n * rmpPreview class\n *\n * @since 4.0.0\n *\n * @type {Object}\n */\n\nwindow.RMP_Preview = {\n iframe: '#rmp-preview-iframe',\n menuId: jQuery('#menu_id').val(),\n mobile_breakpoint: jQuery('#rmp-menu-mobile-breakpoint').val() + 'px',\n tablet_breakpoint: jQuery('#rmp-menu-tablet-breakpoint').val() + 'px',\n active_device: jQuery('#rmp_device_mode'),\n menuContainer: '#rmp-container-' + self.menuId,\n onTyping: function onTyping(inputSelector, outputSelector, type) {\n var meta = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n var self = this;\n var iframe = jQuery(self.iframe);\n jQuery(inputSelector).on('keyup change paste', function () {\n switch (type) {\n case 'border-radius':\n var value = jQuery(this).val();\n css = outputSelector + '{ border-radius : ' + value + 'px;}';\n self.inlineCssInjector(css);\n break;\n\n case 'section-padding':\n var value = jQuery(this).val();\n var is_linked = jQuery(this).parents('.rmp-input-group-control').find('.rmp-group-input-linked').hasClass('is-linked');\n var attr = 'padding';\n\n if (!is_linked) {\n pos = jQuery(this).attr('data-input');\n attr = attr + '-' + pos;\n }\n\n css = outputSelector + '{ ' + attr + ' : ' + value + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-text':\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).html(this.value);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').before('<div class=\"rmp-trigger-label rmp-trigger-label-top\"><span class=\"rmp-trigger-text\">\"' + this.value + '\"</span></div>');\n }\n\n break;\n\n case 'trigger-text-open':\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).html(this.value);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').before('<div class=\"rmp-trigger-label rmp-trigger-label-top\"><span class=\"rmp-trigger-text-open\">\"' + this.value + '\"</span></div>');\n }\n\n break;\n\n case 'text':\n iframe.contents().find(outputSelector).html(this.value);\n break;\n\n case 'placeholder':\n iframe.contents().find(outputSelector).attr('placeholder', this.value);\n break;\n\n case 'href':\n iframe.contents().find(outputSelector).attr('href', this.value);\n break;\n\n case 'font-size':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n var value = jQuery(this).val();\n css = outputSelector + '{ font-size : ' + (value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'width':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit) {\n unit = 'px';\n }\n\n css = outputSelector + '{ width : ' + (this.value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'height':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n css = outputSelector + '{ height : ' + (this.value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'line-height':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n css = outputSelector + '{ line-height : ' + (this.value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'min-width':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n css = outputSelector + '{ min-width : ' + (this.value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'max-width':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n css = outputSelector + '{ max-width : ' + (this.value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-side-position':\n side = jQuery('#rmp-menu-button-left-or-right').val();\n unit = jQuery('#rmp-menu-button-distance-from-side-unit').val();\n value = jQuery('#rmp-menu-button-distance-from-side').val();\n css = outputSelector + '{ ' + side + ' :' + (value + unit) + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'top':\n value = jQuery(this).val();\n unit = jQuery('#rmp-menu-button-top-unit').val();\n css = outputSelector + '{ top :' + (value + unit) + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'border-width':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit) {\n unit = 'px';\n }\n\n css = outputSelector + '{ border-width : ' + (this.value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'padding':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit) {\n unit = 'px';\n }\n\n if (meta == 'lr') {\n css = outputSelector + '{ padding : 0 ' + (this.value + unit) + ';}';\n }\n\n self.inlineCssInjector(css);\n break;\n }\n });\n },\n bindImage: function bindImage(inputSelector, outputSelector, type) {\n var self = this;\n var iframe = jQuery(self.iframe);\n jQuery(document).on('click', inputSelector, function (e) {\n e.preventDefault();\n var button = jQuery(this),\n custom_uploader = wp.media({\n title: 'Select image',\n library: {\n type: 'image'\n },\n button: {\n text: 'Use this image'\n },\n multiple: false\n }).on('select', function () {\n var attachment = custom_uploader.state().get('selection').first().toJSON();\n jQuery(e.target).prev('input.rmp-image-url-input').val(attachment.url);\n jQuery(e.target).css('background-image', 'url(' + attachment.url + ')');\n jQuery(e.target).append('<i class=\"rmp-image-picker-trash dashicons dashicons-trash\" aria-hidden=\"true\"></i>');\n\n if (type == 'img-src') {\n iframe.contents().find(outputSelector).attr('src', attachment.url);\n } else if (type == 'background') {\n css = outputSelector + '{ background-image : url(' + attachment.url + ');}';\n self.inlineCssInjector(css);\n } else if (type == 'trigger-icon') {\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).attr('src', attachment.url);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').append('<img class=\"rmp-trigger-icon rmp-trigger-icon-inactive\" src=\"' + attachment.url + '\"/>');\n }\n } else if (type == 'trigger-icon-open') {\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).attr('src', attachment.url);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').append('<img class=\"rmp-trigger-icon rmp-trigger-icon-active\" src=\"' + attachment.url + '\"/>');\n }\n }\n }).open();\n });\n },\n toggleElements: function toggleElements(inputSelector, outputSelector) {\n var self = this;\n jQuery(inputSelector).on('change', function (e) {\n e.preventDefault();\n e.stopPropagation();\n var iframe = jQuery(self.iframe);\n\n if (iframe.contents().find(outputSelector).length) {\n if (jQuery(this).is(':checked')) {\n iframe.contents().find(outputSelector).fadeIn(500);\n } else {\n iframe.contents().find(outputSelector).fadeOut(500);\n }\n } else {\n e.preventDefault();\n var menuId = jQuery('#menu_id').val(),\n toggle_on = jQuery(this).data('toggle');\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_enable_menu_item',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'menu_id': menuId,\n 'menu_element': toggle_on\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery(this).prop('disabled', true);\n jQuery('#iframe-spinner').show();\n },\n error: function error(_error) {\n console.log('Internal Error !');\n jQuery(this).prop('disabled', false);\n jQuery('#iframe-spinner').hide();\n },\n success: function success(response) {\n if (response.data.markup) {\n iframe.contents().find('#rmp-container-' + self.menuId).append(response.data.markup);\n self.orderMenuElements();\n }\n\n jQuery(this).prop('disabled', false);\n jQuery('#iframe-spinner').hide();\n }\n });\n }\n });\n },\n orderMenuElements: function orderMenuElements() {\n var list = [];\n var self = this;\n var iframeContents = jQuery(self.iframe).contents();\n jQuery('#tab-container .item-title').each(function () {\n var val = jQuery(this).text().toLocaleLowerCase().trim();\n\n if (val == 'title') {\n list.push(iframeContents.find(self.menuTitle));\n iframeContents.find(self.menuTitle).remove();\n } else if (val == 'search') {\n list.push(iframeContents.find(self.menuSearch));\n iframeContents.find(self.menuSearch).remove();\n } else if (val == 'menu') {\n list.push(iframeContents.find(self.menuWrap));\n iframeContents.find(self.menuWrap).remove();\n } else {\n list.push(iframeContents.find(self.menuContents));\n iframeContents.find(self.menuContents).remove();\n }\n });\n list.forEach(function (menuElement) {\n iframeContents.find(self.menuContainer).append(menuElement);\n });\n },\n\n /**\n * Function to bind the color input with option and elements.\n *\n * @version 4.0.0\n *\n * @param {String} inputSelector\n * @param {String} outputSelector\n * @param {String} attr\n * @param {String} state\n */\n bindColor: function bindColor(inputSelector, outputSelector, attr, state) {\n var self = this;\n jQuery(inputSelector).wpColorPicker({\n change: function change(event, ui) {\n var value = ui.color.toString();\n var css = rmpHook.call('rmp_color_style', {\n 'outputSelector': outputSelector,\n 'attr': attr,\n 'value': value,\n 'state': state\n });\n\n if (jQuery(inputSelector).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n }\n });\n },\n mediaQuery: function mediaQuery(css) {\n var self = this;\n self.tablet_breakpoint = jQuery('#rmp-menu-tablet-breakpoint').val() + 'px';\n css = '@media screen and (max-width: ' + self.tablet_breakpoint + ' ) {' + css + '}';\n return css;\n },\n inlineCssInjector: function inlineCssInjector(css) {\n var self = this;\n var iframe = jQuery(self.iframe);\n var styleElement = iframe.contents().find('#rmp-inline-css-' + self.menuId);\n\n if (styleElement.length) {\n styleElement.append(css);\n } else {\n style = '<style id=\"rmp-inline-css-' + self.menuId + '\">' + css + '</style>';\n iframe.contents().find('head').append(style);\n }\n },\n changeInput: function changeInput(inputSelector, outputSelector, attr) {\n var meta = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n var self = this;\n var iframe = jQuery(self.iframe);\n jQuery(inputSelector).on('change', function (e) {\n switch (attr) {\n case 'height-unit':\n value = jQuery(this).prev('input').val();\n unit = jQuery(this).val();\n css = outputSelector + '{ height : ' + (value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'line-height-unit':\n value = jQuery(this).prev('input').val();\n unit = jQuery(this).val();\n css = outputSelector + '{ line-height : ' + (value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'width-unit':\n var value = jQuery(this).prev('input').val();\n var unit = jQuery(this).val();\n css = outputSelector + '{ width : ' + (value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'font-size':\n value = jQuery(this).prev('input').val();\n unit = jQuery(this).val();\n css = outputSelector + '{ font-size :' + value + unit + ' !important;}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'font-family':\n value = jQuery(this).val();\n css = outputSelector + '{ font-family :' + value + ' !important;}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'font-weight':\n value = jQuery(this).val();\n css = outputSelector + '{ font-weight :' + value + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'padding-unit':\n var unit = jQuery(this).val();\n var value = jQuery(this).prev('input').val();\n\n if (!unit) {\n unit = 'px';\n }\n\n if (meta == 'lr') {\n css = outputSelector + '{ padding : 0 ' + (value + unit) + ';}';\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'letter-spacing':\n value = jQuery(this).val();\n css = outputSelector + '{ letter-spacing :' + value + 'px; }';\n self.inlineCssInjector(css);\n break;\n\n case 'position-alignment':\n if (iframe.contents().find(outputSelector).length) {\n position = jQuery(this).val();\n var rmpTriggerBox = iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box');\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').remove();\n\n if (position == 'top' || position == 'left') {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId).append(rmpTriggerBox);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId).prepend(rmpTriggerBox);\n }\n }\n\n break;\n\n case 'trigger-animation':\n value = jQuery(this).val();\n var new_class = 'rmp-menu-trigger-' + value;\n all_class = iframe.contents().find(outputSelector).attr('class').split(\" \");\n all_class.forEach(function (value) {\n if (value.includes('rmp-menu-trigger-')) {\n iframe.contents().find(outputSelector).removeClass(value);\n iframe.contents().find(outputSelector).addClass(new_class);\n }\n });\n break;\n\n case 'top':\n var unit = jQuery(this).val();\n value = jQuery(this).prev('input').val();\n css = outputSelector + '{ top :' + (value + unit) + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-side-position':\n side = jQuery('#rmp-menu-button-left-or-right').val();\n unit = jQuery('#rmp-menu-button-distance-from-side-unit').val();\n value = jQuery('#rmp-menu-button-distance-from-side').val();\n css = outputSelector + '{ ' + side + ' :' + (value + unit) + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-side':\n side = jQuery(this).val();\n value = jQuery('#rmp-menu-button-distance-from-side').val();\n unit = jQuery('#rmp-menu-button-distance-from-side-unit').val();\n\n if (side == 'left') {\n css = outputSelector + '{' + side + ':' + (value + unit) + ' !important;right:unset !important}';\n } else {\n css = outputSelector + '{' + side + ':' + (value + unit) + ' !important;left:unset !important}';\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'position':\n value = jQuery(this).val();\n css = outputSelector + '{ position :' + value + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-background':\n if (jQuery(this).is(':checked')) {\n iframe.contents().find(outputSelector).attr('style', 'background:unset !important;');\n } else {\n iframe.contents().find(outputSelector).removeAttr('style');\n }\n\n break;\n\n case 'target':\n var value = jQuery(this).val();\n\n if (!value.length) {\n value = '_self';\n }\n\n iframe.contents().find(outputSelector).attr('target', value);\n break;\n\n case 'text-align':\n var value = jQuery(this).val();\n iframe.contents().find(outputSelector).css({\n 'text-align': value\n });\n break;\n }\n });\n },\n init: function init() {\n var self = this; //Mobile menu elements.\n\n self.menuContainer = '#rmp-container-' + self.menuId;\n self.menuTitle = '#rmp-menu-title-' + self.menuId;\n self.menuSearch = '#rmp-search-box-' + self.menuId;\n self.menuWrap = '#rmp-menu-wrap-' + self.menuId;\n self.menuContents = '#rmp-menu-additional-content-' + self.menuId; //Menu container background color.\n\n self.bindColor('#rmp-container-background-colour', '#rmp-container-' + self.menuId, 'background', ''); //Menu background.\n\n self.bindColor('#rmp-menu-background-colour', '#rmp-menu-wrap-' + self.menuId, 'background'); //Menu title section background color.\n\n self.bindColor('#rmp-menu-title-background-colour', '#rmp-menu-title-' + self.menuId, 'background'); //Menu title section background hover color.\n\n self.bindColor('#rmp-menu-title-background-hover-colour', '#rmp-menu-title-' + self.menuId, 'background', 'hover'); // Menu item trigger\n\n self.bindColor('#rmp-menu-sub-arrow-shape-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'color');\n self.bindColor('#rmp-menu-sub-arrow-shape-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'color', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-shape-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active', 'color');\n self.bindColor('#rmp-menu-sub-arrow-shape-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active', 'color', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-border-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'border-color');\n self.bindColor('#rmp-menu-sub-arrow-border-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'border-color', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-border-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow-active', 'border-color');\n self.bindColor('#rmp-menu-sub-arrow-border-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow-active', 'border-color', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-background-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'background');\n self.bindColor('#rmp-menu-sub-arrow-background-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'background', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-background-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active', 'background');\n self.bindColor('#rmp-menu-sub-arrow-background-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active', 'background', 'hover'); //Legacy options\n\n self.bindColor('#rmp-submenu-sub-arrow-shape-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'color');\n self.bindColor('#rmp-submenu-sub-arrow-shape-colour-hover', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'color', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-shape-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'color');\n self.bindColor('#rmp-submenu-sub-arrow-shape-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'color', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-border-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'border-color');\n self.bindColor('#rmp-submenu-sub-arrow-border-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'border-color', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-border-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow.rmp-menu-subarrow-active', 'border-color');\n self.bindColor('#rmp-submenu-sub-arrow-border-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'border-color', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-background-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'background');\n self.bindColor('#rmp-submenu-sub-arrow-background-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'background', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-background-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'background');\n self.bindColor('#rmp-submenu-sub-arrow-background-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'background', 'hover');\n self.bindColor('#rmp-menu-title-colour', '#rmp-menu-title-' + self.menuId + ' > a', 'color');\n self.bindColor('#rmp-menu-title-hover-colour', '#rmp-menu-title-' + self.menuId + ' > a', 'color', 'hover');\n self.bindColor('#rmp-menu-additional-content-color', '#rmp-container-' + self.menuId + ' #rmp-menu-additional-content-' + self.menuId, 'color');\n self.bindColor('#rmp-menu-search-box-text-colour', '#rmp-container-' + self.menuId + ' #rmp-search-box-' + self.menuId + ' .rmp-search-box', 'color');\n self.bindColor('#rmp-menu-search-box-background-colour', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'background');\n self.bindColor('#rmp-menu-search-box-border-colour', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'border-color');\n self.bindColor('#rmp-menu-search-box-placeholder-colour', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'color', 'placeholder');\n self.changeInput('#rmp-menu-title-font-weight', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link', 'font-weight');\n self.changeInput('#rmp-menu-title-font-family', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link', 'font-family'); //Menu Trigger\n\n self.bindColor('#rmp-menu-button-background-colour', '#rmp_menu_trigger-' + self.menuId, 'background', '');\n self.bindColor('#rmp-menu-button-background-colour-hover', '#rmp_menu_trigger-' + self.menuId, 'background-color', 'hover');\n self.bindColor('#rmp-menu-button-background-colour-active', '#rmp_menu_trigger-' + self.menuId + '.is-active', 'background', '');\n self.bindColor('#rmp-menu-button-line-colour', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner,#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:after,#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:before', 'background', '');\n self.bindColor('#rmp-menu-button-line-colour-active', '.is-active#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner,.is-active#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:after,.is-active#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:before', 'background', '');\n self.bindColor('#rmp-menu-button-line-colour-hover', '#rmp_menu_trigger-' + self.menuId + ':hover .responsive-menu-pro-inner,#rmp_menu_trigger-' + self.menuId + ':hover .responsive-menu-pro-inner:after,#rmp_menu_trigger-' + self.menuId + ':hover .responsive-menu-pro-inner:before', 'background', '');\n self.bindColor('#rmp-menu-button-text-colour', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'color');\n self.onTyping('#rmp-menu-toggle-border-radius', '#rmp_menu_trigger-' + self.menuId, 'border-radius');\n self.onTyping('.rmp-menu-container-padding', '#rmp-container-' + self.menuId, 'section-padding');\n self.onTyping('.rmp-menu-title-section-padding', '#rmp-menu-title-' + self.menuId, 'section-padding');\n self.onTyping('.rmp-menu-section-padding', '#rmp-menu-wrap-' + self.menuId, 'section-padding');\n self.onTyping('.rmp-menu-search-section-padding', '#rmp-search-box-' + self.menuId, 'section-padding');\n self.onTyping('.rmp-menu-additional-section-padding', '#rmp-menu-additional-content-' + self.menuId, 'section-padding'); // CONTENT BASED ELEMENTS.\n\n self.onTyping('#rmp-menu-search-box-height', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'height');\n self.onTyping('#rmp-menu-search-box-border-radius', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'border-radius');\n self.onTyping('#rmp-menu-menu-title', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link span', 'text');\n self.onTyping('#rmp-menu-additional-content', '#rmp-menu-additional-content-' + self.menuId, 'text');\n self.onTyping('#rmp-menu-search-box-text', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'placeholder');\n self.onTyping('#rmp-menu-title-link', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link', 'href');\n self.onTyping('#rmp-menu-title-image-alt', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'alt');\n self.onTyping('#rmp-menu-title-font-size', '#rmp-menu-title-' + self.menuId + ' > a', 'font-size');\n self.onTyping('#rmp-menu-title-image-width', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'width');\n self.onTyping('#rmp-menu-title-image-height', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'height');\n self.bindImage('#rmp-menu-title-image-selector', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'img-src');\n self.onTyping('#rmp-menu-additional-content-font-size', '#rmp-menu-additional-content-' + self.menuId, 'font-size');\n self.onTyping('#rmp-menu-container-width', '#rmp-container-' + self.menuId, 'width');\n self.onTyping('#rmp-menu-container-min-width', '#rmp-container-' + self.menuId, 'min-width');\n self.onTyping('#rmp-menu-container-max-width', '#rmp-container-' + self.menuId, 'max-width');\n self.onTyping('#rmp-menu-button-image-alt-when-clicked', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-icon-active', 'alt');\n self.onTyping('#rmp-menu-button-image-alt', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-icon-inactive', 'alt');\n self.onTyping('#rmp-menu-button-title-open', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-text-open', 'trigger-text-open');\n self.onTyping('#rmp-menu-button-title', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-text', 'trigger-text');\n self.onTyping('#rmp-menu-button-font-size', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'font-size');\n self.onTyping('#rmp-menu-button-title-line-height', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'line-height'); //Menu Trigger\n\n self.onTyping('#rmp-menu-button-width', '#rmp_menu_trigger-' + self.menuId, 'width');\n self.onTyping('#rmp-menu-button-height', '#rmp_menu_trigger-' + self.menuId, 'height');\n self.onTyping('#rmp-menu-button-line-width', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner', 'width');\n self.onTyping('#rmp-menu-button-line-width', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:after', 'width');\n self.onTyping('#rmp-menu-button-line-width', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:before', 'width');\n self.onTyping('#rmp-menu-button-line-height', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner', 'height');\n self.onTyping('#rmp-menu-button-line-height', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:after', 'height');\n self.onTyping('#rmp-menu-button-line-height', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:before', 'height');\n self.bindImage('#rmp-button-title-image', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'img-src');\n self.bindImage('#rmp-menu-background-image-selector', '#rmp-container-' + self.menuId, 'background');\n self.bindImage('#rmp-menu-button-image-when-clicked-selector', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-icon-active', 'trigger-icon-open');\n self.bindImage('#rmp-menu-button-image-selector', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-icon-inactive', 'trigger-icon');\n self.changeInput('#rmp-menu-title-link-location', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link', 'target');\n self.changeInput('.rmp-menu-title-alignment', '#rmp-menu-title-' + self.menuId, 'text-align');\n self.changeInput('.rmp-menu-additional-content-alignment', '#rmp-menu-additional-content-' + self.menuId, 'text-align'); //Top menu item links\n\n self.onTyping('#rmp-menu-links-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'height');\n self.onTyping('#rmp-menu-links-line-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'line-height');\n self.onTyping('#rmp-menu-font-size', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'font-size');\n self.changeInput('#rmp-menu-font', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-item-link', 'font-family');\n self.changeInput('#rmp-menu-font-weight', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-item-link', 'font-weight');\n self.changeInput('.rmp-menu-text-alignment', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-item-link', 'text-align');\n self.changeInput('#rmp-menu-text-letter-spacing', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'letter-spacing');\n self.onTyping('#rmp-menu-depth-level-0', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'padding', 'lr');\n self.onTyping('#rmp-menu-border-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'border-width');\n self.onTyping('#rmp-menu-sub-arrow-border-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'border-width');\n self.onTyping('#rmp-submenu-sub-arrow-border-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'border-width');\n self.bindColor('#rmp-menu-link-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'color');\n self.bindColor('#rmp-menu-link-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'color', 'hover');\n self.bindColor('#rmp-menu-current-link-active-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'color');\n self.bindColor('#rmp-menu-current-link-active-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'color', 'hover');\n self.bindColor('#rmp-menu-item-background-colour', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'background');\n self.bindColor('#rmp-menu-item-background-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'background', 'hover');\n self.bindColor('#rmp-menu-current-item-background-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'background');\n self.bindColor('#rmp-menu-current-item-background-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'background', 'hover');\n self.bindColor('#rmp-menu-item-border-colour', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'border-color');\n self.bindColor('#rmp-menu-item-border-colour-hover', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'border-color', 'hover');\n self.bindColor('#rmp-menu-current-item-border-hover-colour', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'border-color', 'hover');\n self.bindColor('#rmp-menu-item-border-colour-active', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'border-color'); // Trigger of top level\n\n self.bindImage('#rmp-menu-inactive-arrow-image-selector', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow', 'background');\n self.bindImage('#rmp-menu-active-arrow-image-selector', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow-active', 'background');\n self.onTyping('#rmp-submenu-arrow-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'height');\n self.onTyping('#rmp-submenu-arrow-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'width');\n self.onTyping('#rmp-submenu-child-arrow-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'height');\n self.onTyping('#rmp-submenu-child-arrow-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'width');\n self.changeInput('#rmp-submenu-child-arrow-width-unit', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'width-unit');\n self.changeInput('#rmp-submenu-child-arrow-height-unit', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'height-unit');\n self.bindColor('#rmp-menu-sub-arrow-background-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow', 'background');\n self.bindColor('#rmp-menu-sub-arrow-background-hover-colour', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow', 'background', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-background-colour-active', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow-active', 'background');\n self.bindColor('#rmp-menu-sub-arrow-background-hover-colour-active', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow-active', 'background', 'hover'); //sub menu item links\n\n self.onTyping('#rmp-submenu-links-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'height');\n self.changeInput('#rmp-submenu-links-height-unit', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'height-unit');\n self.onTyping('#rmp-submenu-links-line-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'line-height');\n self.changeInput('#rmp-submenu-links-line-height-unit', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'line-height-unit');\n self.onTyping('#rmp-submenu-font-size', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'font-size');\n self.changeInput('#rmp-submenu-font', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'font-family');\n self.changeInput('#rmp-submenu-font-weight', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'font-weight');\n self.changeInput('.rmp-submenu-text-alignment', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'text-align');\n self.changeInput('#rmp-submenu-text-letter-spacing', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'letter-spacing');\n self.onTyping('#rmp-submenu-border-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'border-width');\n self.bindColor('#rmp-submenu-item-border-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'border-color');\n self.bindColor('#rmp-submenu-item-border-colour-hover', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'border-color', 'hover');\n self.bindColor('#rmp-submenu-item-border-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'border-color');\n self.bindColor('#rmp-submenu-current-item-border-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'border-color', 'hover');\n self.bindColor('#rmp-submenu-link-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'color');\n self.bindColor('#rmp-submenu-link-hover-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'color', 'hover');\n self.bindColor('#rmp-submenu-link-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'color');\n self.bindColor('#rmp-submenu-link-active-hover-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'color', 'hover');\n self.bindColor('#rmp-submenu-item-background-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'background');\n self.bindColor('#rmp-submenu-item-background-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'background', 'hover');\n self.bindColor('#rmp-submenu-current-item-background-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'background');\n self.bindColor('#rmp-submenu-current-item-background-hover-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'background', 'hover'); //Menu Trigger\n\n self.changeInput('.rmp-menu-button-transparent-background', '#rmp_menu_trigger-' + self.menuId, 'background', '');\n self.changeInput('#rmp-menu-button-position-type', '#rmp_menu_trigger-' + self.menuId, 'position');\n self.changeInput('.rmp-menu-button-left-or-right', '#rmp_menu_trigger-' + self.menuId, 'trigger-side');\n self.onTyping('#rmp-menu-button-distance-from-side', '#rmp_menu_trigger-' + self.menuId, 'trigger-side-position');\n self.onTyping('#rmp-menu-button-top', '#rmp_menu_trigger-' + self.menuId, 'top');\n self.changeInput('#rmp-menu-button-click-animation', '#rmp_menu_trigger-' + self.menuId, 'trigger-animation');\n self.changeInput('#rmp-menu-button-font', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'font-family');\n self.changeInput('.rmp-menu-button-title-position', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'position-alignment');\n jQuery(\"#rmp-menu-button-font-icon\").focus(function () {\n var outputSelector = '#rmp_menu_trigger-' + self.menuId + ' span.rmp-trigger-icon-inactive';\n value = jQuery(this).val();\n var iframe = jQuery(self.iframe);\n\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).addClass(value);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box img.rmp-trigger-icon').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').append('<span class=\"rmp-trigger-icon rmp-trigger-icon-inactive ' + value + '\"></span>');\n }\n });\n jQuery(\"#rmp-menu-button-font-icon-when-clicked\").focus(function () {\n var outputSelector = '#rmp_menu_trigger-' + self.menuId + ' span.rmp-trigger-icon-active';\n value = jQuery(this).val();\n var iframe = jQuery(self.iframe);\n\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).addClass(value);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box img.rmp-trigger-icon').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').append('<span class=\"rmp-trigger-icon rmp-trigger-icon-active ' + value + '\"></span>');\n }\n }); // Ordering elements\n\n self.toggleElements('#rmp-item-order-title', '#rmp-menu-title-' + self.menuId);\n self.toggleElements('#rmp-item-order-additional-content', '#rmp-menu-additional-content-' + self.menuId);\n self.toggleElements('#rmp-item-order-search', '#rmp-search-box-' + self.menuId);\n self.toggleElements('#rmp-item-order-menu', '#rmp-menu-wrap-' + self.menuId);\n jQuery('#rmp-menu-ordering-items').sortable({\n update: function update(event, ui) {\n self.orderMenuElements();\n }\n });\n }\n};\nRMP_Preview.init();\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/js/rmp-preview.js?")},"./assets/admin/js/wp-color-alpha.js":function(){eval("/**!\n * wp-color-picker-alpha\n *\n * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker\n * Only run in input and is defined data alpha in true\n *\n * Version: 2.1.4\n * https://github.com/kallookoo/wp-color-picker-alpha\n * Licensed under the GPLv2 license or later.\n */\n(function ($) {\n // Prevent double-init.\n if ($.wp.wpColorPicker.prototype._hasAlpha) {\n return;\n } // Variable for some backgrounds ( grid )\n\n\n var image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==',\n //Dtml stuff for wpColorPicker copy of the original color-picker.js\n _after = '<div class=\"wp-picker-holder\" />',\n _wrap = '<div class=\"wp-picker-container\" />',\n _before = '<button type=\"button\" class=\"button wp-color-result\" aria-expanded=\"false\"></button>',\n _wrappingLabel = '<label></label>',\n _wrappingLabelText = '<span class=\"screen-reader-text\"></span>';\n /**\n * Overwrite Color\n * for enable support rbga\n */\n\n Color.fn.toString = function () {\n if (this._alpha < 1) return this.toCSS('rgba', this._alpha).replace(/\\s+/g, '');\n var hex = parseInt(this._color, 10).toString(16);\n if (this.error) return '';\n if (hex.length < 6) hex = ('00000' + hex).substr(-6);\n return '#' + hex;\n };\n /**\n * Overwrite wpColorPicker\n */\n\n\n $.widget('wp.wpColorPicker', $.wp.wpColorPicker, {\n _hasAlpha: true,\n\n /**\n * @summary Creates the color picker.\n *\n * Creates the color picker, sets default values, css classes and wraps it all in HTML.\n *\n * @since 3.5.0\n *\n * @access private\n *\n * @returns {void}\n */\n _create: function _create() {\n // Return early if Iris support is missing.\n if (!$.support.iris) {\n return;\n }\n\n var self = this,\n el = self.element; // Override default options with options bound to the element.\n\n $.extend(self.options, el.data()); // Create a color picker which only allows adjustments to the hue.\n\n if (self.options.type === 'hue') {\n return self._createHueOnly();\n } // Bind the close event.\n\n\n self.close = $.proxy(self.close, self);\n self.initialValue = el.val(); // Add a CSS class to the input field.\n\n el.addClass('wp-color-picker');\n /*\n \t* Check if there's already a wrapping label, e.g. in the Customizer.\n \t* If there's no label, add a default one to match the Customizer template.\n \t*/\n\n if (!el.parent('label').length) {\n // Wrap the input field in the default label.\n el.wrap(_wrappingLabel); // Insert the default label text.\n\n self.wrappingLabelText = $(_wrappingLabelText).insertBefore(el).text('Color Picker');\n }\n /*\n \t* At this point, either it's the standalone version or the Customizer\n \t* one, we have a wrapping label to use as hook in the DOM, let's store it.\n \t*/\n\n\n self.wrappingLabel = el.parent(); // Wrap the label in the main wrapper.\n\n self.wrappingLabel.wrap(_wrap); // Store a reference to the main wrapper.\n\n self.wrap = self.wrappingLabel.parent(); // Set up the toggle button and insert it before the wrapping label.\n\n self.toggler = $(_before).insertBefore(self.wrappingLabel).css({\n backgroundColor: self.initialValue\n }); // Set up the Iris container and insert it after the wrapping label.\n\n self.pickerContainer = $(_after).insertAfter(self.wrappingLabel); // Wrap the wrapping label in its wrapper and append the Clear/Default button.\n\n self.wrappingLabel.wrap('<span class=\"wp-picker-input-wrap hidden rmp-color-input-wrap\" />');\n /*\n * The input wrapper now contains the label+input+Clear/Default button.\n * Store a reference to the input wrapper: we'll use this to toggle\n * the controls visibility.\n */\n\n self.inputWrapper = el.closest('.wp-picker-input-wrap');\n el.iris({\n target: self.pickerContainer,\n hide: self.options.hide,\n width: 240,\n mode: self.options.mode,\n palettes: self.options.palettes,\n\n /**\n * @summary Handles the onChange event if one has been defined in the options.\n *\n * Handles the onChange event if one has been defined in the options and additionally\n * sets the background color for the toggler element.\n *\n * @since 3.5.0\n *\n * @param {Event} event The event that's being called.\n * @param {HTMLElement} ui The HTMLElement containing the color picker.\n *\n * @returns {void}\n */\n change: function change(event, ui) {\n if (self.options.alpha) {\n self.toggler.css({\n 'background-image': 'url(' + image + ')'\n });\n self.toggler.css({\n 'position': 'relative'\n });\n\n if (self.toggler.find('span.color-alpha').length == 0) {\n self.toggler.append('<span class=\"color-alpha\" />');\n }\n\n self.toggler.find('span.color-alpha').css({\n 'width': '38px',\n 'height': '100%',\n 'position': 'absolute',\n 'top': 0,\n 'left': 0,\n 'background': ui.color.toString()\n });\n } else {\n self.toggler.css({\n backgroundColor: ui.color.toString()\n });\n }\n\n if ($.isFunction(self.options.change)) {\n self.options.change.call(this, event, ui);\n }\n }\n });\n el.val(self.initialValue);\n\n self._addListeners(); // Force the color picker to always be closed on initial load.\n\n\n if (!self.options.hide) {\n self.toggler.click();\n }\n },\n\n /**\n * @summary Binds event listeners to the color picker.\n *\n * @since 3.5.0\n *\n * @access private\n *\n * @returns {void}\n */\n _addListeners: function _addListeners() {\n var self = this;\n /**\n * @summary Prevent any clicks inside this widget from leaking to the top and closing it.\n *\n * @since 3.5.0\n *\n * @param {Event} event The event that's being called.\n *\n * @returs {void}\n */\n\n self.wrap.on('click.wpcolorpicker', function (event) {\n event.stopPropagation();\n });\n /**\n * @summary Open or close the color picker depending on the class.\n *\n * @since 3.5\n */\n\n self.toggler.click(function () {\n if (self.toggler.hasClass('wp-picker-open')) {\n self.close();\n } else {\n self.open();\n }\n });\n /**\n * @summary Checks if value is empty when changing the color in the color picker.\n *\n * Checks if value is empty when changing the color in the color picker.\n * If so, the background color is cleared.\n *\n * @since 3.5.0\n *\n * @param {Event} event The event that's being called.\n *\n * @returns {void}\n */\n\n self.element.on('change', function (event) {\n // Empty or Error = clear\n if ($(this).val() === '' || self.element.hasClass('iris-error')) {\n if (self.options.alpha) {\n self.toggler.find('span.color-alpha').css('backgroundColor', '');\n } else {\n self.toggler.css('backgroundColor', '');\n } // fire clear callback if we have one\n\n\n if ($.isFunction(self.options.clear)) self.options.clear.call(this, event);\n }\n });\n }\n });\n /**\n * Overwrite iris\n */\n\n $.widget('a8c.iris', $.a8c.iris, {\n _create: function _create() {\n this._super(); // Global option for check is mode rbga is enabled\n\n\n this.options.alpha = this.element.data('alpha') || false; // Is not input disabled\n\n if (!this.element.is(':input')) this.options.alpha = false;\n\n if (typeof this.options.alpha !== 'undefined' && this.options.alpha) {\n var self = this,\n el = self.element,\n _html = '<div class=\"iris-strip iris-slider iris-alpha-slider\"><div class=\"iris-slider-offset iris-slider-offset-alpha\"></div></div>',\n aContainer = $(_html).appendTo(self.picker.find('.iris-picker-inner')),\n aSlider = aContainer.find('.iris-slider-offset-alpha'),\n controls = {\n aContainer: aContainer,\n aSlider: aSlider\n };\n\n if (typeof el.data('custom-width') !== 'undefined') {\n self.options.customWidth = parseInt(el.data('custom-width')) || 0;\n } else {\n self.options.customWidth = 100;\n } // Set default width for input reset\n\n\n self.options.defaultWidth = el.width(); // Update width for input\n\n if (self._color._alpha < 1 || self._color.toString().indexOf('rgb') != -1) el.width(parseInt(self.options.defaultWidth + self.options.customWidth)); // Push new controls\n\n $.each(controls, function (k, v) {\n self.controls[k] = v;\n }); // Change size strip and add margin for sliders\n\n self.controls.square.css({\n 'margin-right': '0'\n });\n var emptyWidth = self.picker.width() - self.controls.square.width() - 20,\n stripsMargin = emptyWidth / 6,\n stripsWidth = emptyWidth / 2 - stripsMargin;\n $.each(['aContainer', 'strip'], function (k, v) {\n self.controls[v].width(stripsWidth).css({\n 'margin-left': stripsMargin + 'px'\n });\n }); // Add new slider\n\n self._initControls(); // For updated widget\n\n\n self._change();\n }\n },\n _initControls: function _initControls() {\n this._super();\n\n if (this.options.alpha) {\n var self = this,\n controls = self.controls;\n controls.aSlider.slider({\n orientation: 'vertical',\n min: 0,\n max: 100,\n step: 1,\n value: parseInt(self._color._alpha * 100),\n slide: function slide(event, ui) {\n // Update alpha value\n self._color._alpha = parseFloat(ui.value / 100);\n\n self._change.apply(self, arguments);\n }\n });\n }\n },\n _change: function _change() {\n this._super();\n\n var self = this,\n el = self.element;\n\n if (this.options.alpha) {\n var controls = self.controls,\n alpha = parseInt(self._color._alpha * 100),\n color = self._color.toRgb(),\n gradient = ['rgb(' + color.r + ',' + color.g + ',' + color.b + ') 0%', 'rgba(' + color.r + ',' + color.g + ',' + color.b + ', 0) 100%'],\n defaultWidth = self.options.defaultWidth,\n customWidth = self.options.customWidth,\n target = self.picker.closest('.wp-picker-container').find('.wp-color-result'); // Generate background slider alpha, only for CSS3 old browser fuck!! :)\n\n\n controls.aContainer.css({\n 'background': 'linear-gradient(to bottom, ' + gradient.join(', ') + '), url(' + image + ')'\n });\n\n if (target.hasClass('wp-picker-open')) {\n // Update alpha value\n controls.aSlider.slider('value', alpha);\n /**\n * Disabled change opacity in default slider Saturation ( only is alpha enabled )\n * and change input width for view all value\n */\n // if ( self._color._alpha < 1 ) {\n // \tcontrols.strip.attr( 'style', controls.strip.attr( 'style' ).replace( /rgba\\(([0-9]+,)(\\s+)?([0-9]+,)(\\s+)?([0-9]+)(,(\\s+)?[0-9\\.]+)\\)/g, 'rgb($1$3$5)' ) );\n // \tel.width( parseInt( defaultWidth + customWidth ) );\n // } else {\n // \tel.width( defaultWidth );\n // }\n }\n }\n\n var reset = el.data('reset-alpha') || false;\n\n if (reset) {\n self.picker.find('.iris-palette-container').on('click.palette', '.iris-palette', function () {\n self._color._alpha = 1;\n self.active = 'external';\n\n self._change();\n });\n }\n\n el.trigger('change');\n },\n _addInputListeners: function _addInputListeners(input) {\n var self = this,\n debounceTimeout = 100,\n callback = function callback(event) {\n var color = new Color(input.val()),\n val = input.val();\n input.removeClass('iris-error'); // we gave a bad color\n\n if (color.error) {\n // don't error on an empty input\n if (val !== '') input.addClass('iris-error');\n } else {\n if (color.toString() !== self._color.toString()) {\n // let's not do this on keyup for hex shortcodes\n if (!(event.type === 'keyup' && val.match(/^[0-9a-fA-F]{3}$/))) self._setOption('color', color.toString());\n }\n }\n };\n\n input.on('change', callback).on('keyup', self._debounce(callback, debounceTimeout)); // If we initialized hidden, show on first focus. The rest is up to you.\n\n if (self.options.hide) {\n input.on('focus', function () {\n self.show();\n });\n }\n }\n });\n})(jQuery);\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/js/wp-color-alpha.js?")},"./assets/admin/rmp-main.js":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _scss_wizard_ui_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scss/wizard-ui.scss */ "./assets/admin/scss/wizard-ui.scss");\n/* harmony import */ var _scss_wizard_ui_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_scss_wizard_ui_scss__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _scss_dark_mode_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scss/dark-mode.scss */ "./assets/admin/scss/dark-mode.scss");\n/* harmony import */ var _scss_dark_mode_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_scss_dark_mode_scss__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _js_rmp_admin_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./js/rmp-admin.js */ "./assets/admin/js/rmp-admin.js");\n/* harmony import */ var _js_rmp_admin_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_js_rmp_admin_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _js_wp_color_alpha_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./js/wp-color-alpha.js */ "./assets/admin/js/wp-color-alpha.js");\n/* harmony import */ var _js_wp_color_alpha_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_js_wp_color_alpha_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _js_rmp_editor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./js/rmp-editor.js */ "./assets/admin/js/rmp-editor.js");\n/* harmony import */ var _js_rmp_editor_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_js_rmp_editor_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _js_rmp_icon_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./js/rmp-icon.js */ "./assets/admin/js/rmp-icon.js");\n/* harmony import */ var _js_rmp_icon_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_js_rmp_icon_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _js_rmp_preview_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./js/rmp-preview.js */ "./assets/admin/js/rmp-preview.js");\n/* harmony import */ var _js_rmp_preview_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_js_rmp_preview_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _js_rmp_menu_wizard_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./js/rmp-menu-wizard.js */ "./assets/admin/js/rmp-menu-wizard.js");\n/**\n * Main scripts file.\n *\n * @package responsive-menu\n */\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/rmp-main.js?')},"./assets/admin/scss/dark-mode.scss":function(){eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/scss/dark-mode.scss?")},"./assets/admin/scss/wizard-ui.scss":function(){eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://responsive-menu-pro/./assets/admin/scss/wizard-ui.scss?")}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(n,{a:n}),n},__webpack_require__.d=function(e,n){for(var r in n)__webpack_require__.o(n,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},__webpack_require__.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__("./assets/admin/rmp-main.js")})();
v4.0.0/assets/admin/js/rmp-admin.js CHANGED
@@ -9,36 +9,6 @@
9
 
10
  jQuery( document ).ready( function( jQuery ) {
11
 
12
- /**
13
- * Rollback the plugin version.
14
- *
15
- * @version 4.0.0
16
- *
17
- * @fires Click
18
- */
19
- jQuery( '#rmp-rollback-version' ).on( 'click', function( e ) {
20
- e.preventDefault();
21
-
22
- const version = jQuery( '#rmp-versions' ).val();
23
-
24
- if ( '3.1.30' === version ) {
25
- jQuery.ajax( {
26
- url: rmpObject.ajaxURL,
27
- data: { action: 'rmp_rollback_version' },
28
- type: 'POST',
29
- dataType: 'json',
30
- error: function( error ) {
31
- jQuery( this ).prop( 'disabled', false );
32
- },
33
- success: function( response ) {
34
- if ( response.data.redirect ) {
35
- location.href = response.data.redirect;
36
- }
37
- }
38
- } );
39
- }
40
- } );
41
-
42
  /**
43
  * Iframe loader and contents show/hide.
44
  */
@@ -646,9 +616,16 @@ jQuery( document ).ready( function( jQuery ) {
646
  },
647
  success: function( response ) {
648
  jQuery( '#rmp-export-menu-button' ).prop( 'disabled', false );
649
- if( response.data ) {
650
  let menu_name = jQuery('#rmp_export_menu_list').children(":selected").text().trim().toLocaleLowerCase().split(' ').join('-');
651
  download_file( response.data , menu_name + '.json' , 'application/json' );
 
 
 
 
 
 
 
652
  }
653
  }
654
  });
9
 
10
  jQuery( document ).ready( function( jQuery ) {
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  /**
13
  * Iframe loader and contents show/hide.
14
  */
616
  },
617
  success: function( response ) {
618
  jQuery( '#rmp-export-menu-button' ).prop( 'disabled', false );
619
+ if ( response.success ) {
620
  let menu_name = jQuery('#rmp_export_menu_list').children(":selected").text().trim().toLocaleLowerCase().split(' ').join('-');
621
  download_file( response.data , menu_name + '.json' , 'application/json' );
622
+ }else{
623
+ jQuery( '#rmp-global-settings' ).before(
624
+ '<div class="notice notice-error settings-error is-dismissible"> <p>' + response.data.message + '</p></div>'
625
+ );
626
+ setTimeout( function() {
627
+ jQuery( '#rmp-global-settings' ).parent().find( '.notice' ).remove();
628
+ }, 3000 );
629
  }
630
  }
631
  });
v4.0.0/assets/js/rmp-menu.js CHANGED
@@ -54,7 +54,7 @@ jQuery( document ).ready( function( jQuery ) {
54
 
55
  //Append hamburger icon inside an element
56
  if ( this.options['button_position_type'] == 'inside-element' ) {
57
- var destination = jQuery(this.trigger).attr('destination');
58
  jQuery(this.trigger).appendTo(jQuery(destination).parent());
59
  }
60
 
54
 
55
  //Append hamburger icon inside an element
56
  if ( this.options['button_position_type'] == 'inside-element' ) {
57
+ var destination = jQuery(this.trigger).attr('data-destination');
58
  jQuery(this.trigger).appendTo(jQuery(destination).parent());
59
  }
60
 
v4.0.0/assets/scss/main.scss CHANGED
@@ -233,16 +233,22 @@
233
  }
234
  }
235
 
236
- .rmp-submenu-depth-2 .rmp-menu-item-link {
237
- padding-#{$menu_depth_side} : ( $menu_item_padding_depth_2 + $menu_item_padding_depth_2_unit);
 
 
238
  }
239
 
240
- .rmp-submenu-depth-3 .rmp-menu-item-link {
241
- padding-#{$menu_depth_side} : ( $menu_item_padding_depth_3 + $menu_item_padding_depth_3_unit);
 
 
242
  }
243
 
244
- .rmp-submenu-depth-4 .rmp-menu-item-link {
245
- padding-#{$menu_depth_side} : ( $menu_item_padding_depth_4 + $menu_item_padding_depth_4_unit);
 
 
246
  }
247
 
248
  .rmp-submenu.rmp-submenu-open {
@@ -285,7 +291,9 @@
285
  color: $menu_item_text_color;
286
  text-align: $menu_item_text_alignment;
287
  background-color: $menu_item_background_color;
288
- font-weight: $menu_item_font_weight;
 
 
289
  letter-spacing: ($menu_item_letter_spacing + 'px');
290
  display: block;
291
  width: 100%;
@@ -353,12 +361,16 @@
353
  @if ( $menu_item_toggle_position == 'left' ) {
354
  left: 0;
355
  border-right-style:solid;
356
- border-right-color:$menu_item_toggle_border_color;
 
 
357
  border-right-width: ( $menu_item_toggle_border_width + $menu_item_toggle_border_width_unit );
358
  } @else {
359
  right: 0;
360
  border-left-style:solid;
361
- border-left-color:$menu_item_toggle_border_color;
 
 
362
  border-left-width: ( $menu_item_toggle_border_width + $menu_item_toggle_border_width_unit );
363
  }
364
 
@@ -369,8 +381,12 @@
369
  background-color: $menu_item_toggle_background_color;
370
 
371
  &:hover {
372
- color: $menu_item_toggle_text_color_hover;
373
- border-color: $menu_item_toggle_border_color_hover;
 
 
 
 
374
  background-color: $menu_item_toggle_background_color_hover;
375
  }
376
 
@@ -387,12 +403,20 @@
387
  .rmp-menu-subarrow-active {
388
  display: block;
389
  background-size: cover;
390
- color: $menu_current_item_toggle_text_color;
391
- border-color: $menu_current_item_toggle_border_color;
 
 
 
 
392
  background-color: $menu_current_item_toggle_background_color;
393
  &:hover {
394
- color: $menu_current_item_toggle_text_color_hover;
395
- border-color: $menu_current_item_toggle_border_color_hover;
 
 
 
 
396
  background-color: $menu_current_item_toggle_background_color_hover;
397
  }
398
  }
@@ -400,8 +424,12 @@
400
  .rmp-submenu {
401
  display: none;
402
  .rmp-menu-item-link {
403
- height: ( $submenu_item_height + $submenu_item_height_unit);
404
- line-height: ( $submenu_item_line_height + $submenu_item_line_height_unit );
 
 
 
 
405
  letter-spacing: ($submenu_text_letter_spacing + px);
406
 
407
  @if( $submenu_item_font_size != '' ) {
@@ -425,21 +453,26 @@
425
  background-color: $submenu_item_background_color;
426
  &:hover {
427
  color: $submenu_item_text_color_hover;
428
- border-color: $submenu_item_border_color_hover;
 
 
429
  background-color: $submenu_item_background_color_hover;
430
-
431
  }
432
  }
433
 
434
  .rmp-menu-current-item {
435
  .rmp-menu-item-link {
436
  color: $submenu_current_item_text_color;
437
- border-color: $submenu_current_item_border_color;
 
 
438
  background-color: $submenu_current_item_background_color;
439
 
440
  &:hover {
441
  color: $submenu_current_item_text_color_hover;
442
- border-color: $submenu_current_item_border_color_hover;
 
 
443
  background-color: $submenu_current_item_background_color_hover;
444
  }
445
  }
@@ -480,7 +513,7 @@
480
  .rmp-menu-subarrow-active {
481
  color: $submenu_current_item_toggle_text_color;
482
  border-color: $submenu_current_item_toggle_border_color;
483
- background-color: $submenu_current_item_toggle_background_color;
484
  &:hover {
485
  color: $submenu_current_item_toggle_text_color_hover;
486
  border-color: $submenu_current_item_toggle_border_color_hover;
@@ -525,7 +558,9 @@
525
 
526
  .rmp-search-box {
527
  background: $menu_search_box_background_color;
528
- border: 1px solid $menu_search_box_border_color;
 
 
529
  color: $menu_search_box_text_color;
530
  width: 100%;
531
  padding: 0 5%;
@@ -542,7 +577,9 @@
542
 
543
  &:focus {
544
  background-color: $menu_search_box_background_color;
545
- outline:2px solid $menu_search_box_border_color;
 
 
546
  color: $menu_search_box_text_color;
547
  }
548
  }
@@ -551,9 +588,7 @@
551
  /** Menu Title Style */
552
  #{$menu_title_wrap} {
553
 
554
- @if( $menu_title_background != '' ) {
555
- background-color: $menu_title_background;
556
- }
557
 
558
  @if( $menu_title_font_color != '' ) {
559
  color: $menu_title_font_color;
@@ -587,7 +622,9 @@
587
  font-family : $menu_title_font_family;
588
  }
589
 
590
- font-weight: $menu_title_font_weight;
 
 
591
 
592
  transition: background-color $color_transition_speed, border-color $color_transition_speed, color $color_transition_speed;
593
 
233
  }
234
  }
235
 
236
+ @if( $menu_item_padding_depth_2 != '' and $menu_item_padding_depth_2_unit != '') {
237
+ .rmp-submenu-depth-2 .rmp-menu-item-link {
238
+ padding-#{$menu_depth_side} : ( $menu_item_padding_depth_2 + $menu_item_padding_depth_2_unit);
239
+ }
240
  }
241
 
242
+ @if( $menu_item_padding_depth_3 != '' and $menu_item_padding_depth_3_unit != '') {
243
+ .rmp-submenu-depth-3 .rmp-menu-item-link {
244
+ padding-#{$menu_depth_side} : ( $menu_item_padding_depth_3 + $menu_item_padding_depth_3_unit);
245
+ }
246
  }
247
 
248
+ @if( $menu_item_padding_depth_4 != '' and $menu_item_padding_depth_4_unit != '') {
249
+ .rmp-submenu-depth-4 .rmp-menu-item-link {
250
+ padding-#{$menu_depth_side} : ( $menu_item_padding_depth_4 + $menu_item_padding_depth_4_unit);
251
+ }
252
  }
253
 
254
  .rmp-submenu.rmp-submenu-open {
291
  color: $menu_item_text_color;
292
  text-align: $menu_item_text_alignment;
293
  background-color: $menu_item_background_color;
294
+ @if( $menu_title_font_weight != '' ) {
295
+ font-weight: $menu_item_font_weight;
296
+ }
297
  letter-spacing: ($menu_item_letter_spacing + 'px');
298
  display: block;
299
  width: 100%;
361
  @if ( $menu_item_toggle_position == 'left' ) {
362
  left: 0;
363
  border-right-style:solid;
364
+ @if ( $menu_item_toggle_border_color != '' ) {
365
+ border-right-color:$menu_item_toggle_border_color;
366
+ }
367
  border-right-width: ( $menu_item_toggle_border_width + $menu_item_toggle_border_width_unit );
368
  } @else {
369
  right: 0;
370
  border-left-style:solid;
371
+ @if ( $menu_item_toggle_border_color != '' ) {
372
+ border-left-color:$menu_item_toggle_border_color;
373
+ }
374
  border-left-width: ( $menu_item_toggle_border_width + $menu_item_toggle_border_width_unit );
375
  }
376
 
381
  background-color: $menu_item_toggle_background_color;
382
 
383
  &:hover {
384
+ @if ( $menu_item_toggle_text_color_hover != '' ) {
385
+ color: $menu_item_toggle_text_color_hover;
386
+ }
387
+ @if ( $menu_item_toggle_border_color_hover != '' ) {
388
+ border-color: $menu_item_toggle_border_color_hover;
389
+ }
390
  background-color: $menu_item_toggle_background_color_hover;
391
  }
392
 
403
  .rmp-menu-subarrow-active {
404
  display: block;
405
  background-size: cover;
406
+ @if ( $menu_current_item_toggle_text_color != '' ) {
407
+ color: $menu_current_item_toggle_text_color;
408
+ }
409
+ @if ( $menu_current_item_toggle_border_color != '' ) {
410
+ border-color: $menu_current_item_toggle_border_color;
411
+ }
412
  background-color: $menu_current_item_toggle_background_color;
413
  &:hover {
414
+ @if ( $menu_current_item_toggle_text_color_hover != '' ) {
415
+ color: $menu_current_item_toggle_text_color_hover;
416
+ }
417
+ @if ( $menu_current_item_toggle_border_color_hover != '' ) {
418
+ border-color: $menu_current_item_toggle_border_color_hover;
419
+ }
420
  background-color: $menu_current_item_toggle_background_color_hover;
421
  }
422
  }
424
  .rmp-submenu {
425
  display: none;
426
  .rmp-menu-item-link {
427
+ @if( $submenu_item_height != '' ) {
428
+ height: ( $submenu_item_height + $submenu_item_height_unit );
429
+ }
430
+ @if( $submenu_item_line_height != '' ) {
431
+ line-height: ( $submenu_item_line_height + $submenu_item_line_height_unit );
432
+ }
433
  letter-spacing: ($submenu_text_letter_spacing + px);
434
 
435
  @if( $submenu_item_font_size != '' ) {
453
  background-color: $submenu_item_background_color;
454
  &:hover {
455
  color: $submenu_item_text_color_hover;
456
+ @if( $submenu_item_border_color_hover != '' ) {
457
+ border-color: $submenu_item_border_color_hover;
458
+ }
459
  background-color: $submenu_item_background_color_hover;
 
460
  }
461
  }
462
 
463
  .rmp-menu-current-item {
464
  .rmp-menu-item-link {
465
  color: $submenu_current_item_text_color;
466
+ @if( $submenu_current_item_border_color != '' ) {
467
+ border-color: $submenu_current_item_border_color;
468
+ }
469
  background-color: $submenu_current_item_background_color;
470
 
471
  &:hover {
472
  color: $submenu_current_item_text_color_hover;
473
+ @if( $submenu_current_item_border_color_hover != '' ) {
474
+ border-color: $submenu_current_item_border_color_hover;
475
+ }
476
  background-color: $submenu_current_item_background_color_hover;
477
  }
478
  }
513
  .rmp-menu-subarrow-active {
514
  color: $submenu_current_item_toggle_text_color;
515
  border-color: $submenu_current_item_toggle_border_color;
516
+ background-color: $submenu_current_item_toggle_background_color;
517
  &:hover {
518
  color: $submenu_current_item_toggle_text_color_hover;
519
  border-color: $submenu_current_item_toggle_border_color_hover;
558
 
559
  .rmp-search-box {
560
  background: $menu_search_box_background_color;
561
+ @if( $menu_search_box_border_color != '' ) {
562
+ border: 1px solid $menu_search_box_border_color;
563
+ }
564
  color: $menu_search_box_text_color;
565
  width: 100%;
566
  padding: 0 5%;
577
 
578
  &:focus {
579
  background-color: $menu_search_box_background_color;
580
+ @if( $menu_search_box_border_color != '' ) {
581
+ outline:2px solid $menu_search_box_border_color;
582
+ }
583
  color: $menu_search_box_text_color;
584
  }
585
  }
588
  /** Menu Title Style */
589
  #{$menu_title_wrap} {
590
 
591
+ background-color: $menu_title_background;
 
 
592
 
593
  @if( $menu_title_font_color != '' ) {
594
  color: $menu_title_font_color;
622
  font-family : $menu_title_font_family;
623
  }
624
 
625
+ @if( $menu_title_font_weight != '' ) {
626
+ font-weight: $menu_title_font_weight;
627
+ }
628
 
629
  transition: background-color $color_transition_speed, border-color $color_transition_speed, color $color_transition_speed;
630
 
v4.0.0/inc/classes/class-admin.php CHANGED
@@ -51,7 +51,6 @@ class Admin {
51
  */
52
  protected function setup_hooks() {
53
  add_action( 'wp_ajax_rmp_save_global_settings', array( $this, 'save_menu_global_settings' ) );
54
- add_action( 'wp_ajax_rmp_rollback_version', array( $this, 'rollback_version' ) );
55
  add_action( 'wp_ajax_rmp_create_new_menu', array( $this, 'create_new_menu' ) );
56
  add_action( 'wp_ajax_rmp_export_menu', array( $this, 'rmp_export_menu' ) );
57
  add_action( 'wp_ajax_rmp_import_menu', array( $this, 'rmp_import_menu' ) );
@@ -61,7 +60,7 @@ class Admin {
61
  add_action( 'init', array( $this, 'rmp_menu_cpt' ), 0 );
62
 
63
  add_filter( 'post_row_actions', array( $this, 'rmp_menu_row_actions' ), 10, 2 );
64
- add_filter( 'get_edit_post_link', array( $this, 'my_edit_post_link' ), 10, 2 );
65
 
66
  add_filter( 'manage_rmp_menu_posts_columns', array( $this, 'set_custom_edit_menu_columns' ) );
67
  add_action( 'manage_rmp_menu_posts_custom_column', array( $this, 'add_custom_columns' ), 10, 2 );
@@ -78,6 +77,9 @@ class Admin {
78
  */
79
  public function save_menu_global_settings() {
80
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
 
 
 
81
 
82
  $options = array();
83
  $form_data = isset( $_POST['form'] ) ? rm_sanitize_rec_array( wp_unslash( $_POST['form'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
@@ -98,22 +100,7 @@ class Admin {
98
  */
99
  do_action( 'rmp_save_global_settings', $options );
100
 
101
- wp_send_json_success( 'Saved' );
102
- }
103
-
104
- /**
105
- * Rollback to older version from setting page.
106
- *
107
- * @since 4.0.0
108
- *
109
- * @return void
110
- */
111
- public function rollback_version() {
112
- if ( empty( update_option( 'is_rmp_new_version', 0 ) ) ) {
113
- add_option( 'is_rmp_new_version', 0 );
114
- }
115
-
116
- wp_send_json_success( array( 'redirect' => admin_url( 'admin.php?page=responsive-menu' ) ) );
117
  }
118
 
119
  /**
@@ -126,14 +113,18 @@ class Admin {
126
  public function create_new_menu() {
127
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
128
 
 
 
 
 
129
  $menu_name = isset( $_POST['menu_name'] ) ? sanitize_text_field( wp_unslash( $_POST['menu_name'] ) ) : '';
130
  if ( empty( $menu_name ) ) {
131
- wp_send_json_error( array( 'message' => esc_html__( 'Enter the Menu name !', 'responsive-menu' ) ) );
132
  }
133
 
134
  $menu_to_use = isset( $_POST['menu_to_use'] ) ? sanitize_text_field( wp_unslash( $_POST['menu_to_use'] ) ) : '';
135
  if ( empty( $menu_to_use ) ) {
136
- wp_send_json_error( array( 'message' => esc_html__( 'Select menu to use !', 'responsive-menu' ) ) );
137
  }
138
 
139
  $menu_to_hide = isset( $_POST['menu_to_hide'] ) ? sanitize_text_field( wp_unslash( $_POST['menu_to_hide'] ) ) : '';
@@ -197,7 +188,7 @@ class Admin {
197
 
198
  wp_send_json_success(
199
  array(
200
- 'message' => esc_html__( 'Menu is created successfully', 'responsive-menu' ),
201
  'customize_url' => sprintf(
202
  '%spost.php?post=%s&action=edit&editor=true',
203
  get_admin_url(),
@@ -206,7 +197,7 @@ class Admin {
206
  )
207
  );
208
  } else {
209
- wp_send_json_error( array( 'message' => esc_html__( 'Unable to create new Menu !', 'responsive-menu' ) ) );
210
  }
211
  }
212
 
@@ -215,7 +206,7 @@ class Admin {
215
  *
216
  * @since 4.0.0
217
  *
218
- * @param Array $atts Attributes List.
219
  *
220
  * @return HTML $output Menu contents.
221
  */
@@ -226,13 +217,13 @@ class Admin {
226
 
227
  // Check given id is valid.
228
  if ( empty( $attrs['id'] ) ) {
229
- return esc_html__( 'Please pass menu id as attribute.', 'responsive-menu' );
230
  }
231
 
232
  $menu_id = $attrs['id'];
233
  if ( 'publish' !== get_post_status( $menu_id ) ) {
234
  /* translators: %d: Menu id */
235
- return sprintf( esc_html__( 'Shortcode with menu id %d is not published.', 'responsive-menu' ), esc_html( $menu_id ) );
236
  }
237
 
238
  // Check shortcode option is activated or not.
@@ -240,7 +231,7 @@ class Admin {
240
  $option = $option_manager->get_option( $menu_id, 'menu_display_on' );
241
 
242
  if ( 'shortcode' !== $option ) {
243
- return esc_html__( 'Shortcode deactivated', 'responsive-menu' );
244
  }
245
 
246
  ob_start();
@@ -261,8 +252,8 @@ class Admin {
261
  public function responsive_menu_shortcode() {
262
 
263
  // Check shortcode option is activated or not.
264
- $options = Option_Manager::get_instance();
265
- $menu_ids = get_all_rmp_menu_ids();
266
 
267
  if ( ! empty( $menu_ids ) ) {
268
  foreach ( $menu_ids as $menu_id ) {
@@ -278,7 +269,7 @@ class Admin {
278
  return ob_get_clean();
279
  }
280
  } else {
281
- return esc_html__( 'Shortcode deactivated', 'responsive-menu' );
282
  }
283
  }
284
 
@@ -305,8 +296,8 @@ class Admin {
305
  public function rmp_register_submenu_page() {
306
  add_submenu_page(
307
  'edit.php?post_type=rmp_menu',
308
- esc_html__( 'Settings', 'responsive-menu' ),
309
- esc_html__( 'Settings', 'responsive-menu' ),
310
  'manage_options',
311
  'settings',
312
  array( $this, 'rmp_global_settings_page' )
@@ -314,8 +305,8 @@ class Admin {
314
 
315
  add_submenu_page(
316
  'edit.php?post_type=rmp_menu',
317
- esc_html__( 'Themes', 'responsive-menu' ),
318
- esc_html__( 'Themes', 'responsive-menu' ),
319
  'manage_options',
320
  'themes',
321
  array( $this, 'rmp_theme_admin_page' )
@@ -394,7 +385,7 @@ class Admin {
394
  $actions['edit'] = sprintf(
395
  '<a href="%s" aria-label="Edit">%s</a>',
396
  esc_url( get_edit_post_link( $post->ID ) ),
397
- esc_html__( 'Customize', 'responsive-menu' )
398
  );
399
  }
400
 
@@ -412,9 +403,9 @@ class Admin {
412
  */
413
  public function set_custom_edit_menu_columns( $columns ) {
414
  unset( $columns['date'] );
415
- $columns['shortcode_place'] = esc_html__( 'Shortcode', 'responsive-menu' );
416
- $columns['actions'] = esc_html__( 'Actions', 'responsive-menu' );
417
- $columns['date'] = esc_html__( 'Date', 'responsive-menu' );
418
 
419
  return $columns;
420
  }
@@ -429,8 +420,8 @@ class Admin {
429
  *
430
  * @return string $url Edited post url URL
431
  */
432
- public function my_edit_post_link( $url, $post_id ) {
433
- if ( 'rmp_menu' == get_post_type() ) {
434
  $url = get_admin_url() . 'post.php?post=' . $post_id . '&action=edit&editor=true';
435
  }
436
 
@@ -482,24 +473,24 @@ class Admin {
482
  }
483
 
484
  $labels = array(
485
- 'name' => esc_html__( 'Responsive Menu', 'responsive-menu' ),
486
- 'singular_name' => 'Rmp_Menu',
487
- 'menu_name' => esc_html__( 'Responsive Menu', 'responsive-menu' ),
488
- 'parent_item_colon' => esc_html__( 'Parent Menu', 'responsive-menu' ),
489
- 'all_items' => esc_html__( 'Menus', 'responsive-menu' ),
490
- 'view_item' => esc_html__( 'View Menu', 'responsive-menu' ),
491
- 'add_new_item' => esc_html__( 'Add New Menu', 'responsive-menu' ),
492
- 'add_new' => esc_html__( 'Create New Menu', 'responsive-menu' ),
493
- 'edit_item' => esc_html__( 'Edit Menu', 'responsive-menu' ),
494
- 'update_item' => esc_html__( 'Update Menu', 'responsive-menu' ),
495
- 'search_items' => esc_html__( 'Search Menu', 'responsive-menu' ),
496
- 'not_found' => esc_html__( 'Not Found', 'responsive-menu' ),
497
- 'not_found_in_trash' => esc_html__( 'Not found in Trash', 'responsive-menu' ),
498
  );
499
 
500
  $args = array(
501
- 'label' => esc_html__( 'Responsive Menu', 'responsive-menu' ),
502
- 'description' => esc_html__( 'Responsive Menu', 'responsive-menu' ),
503
  'labels' => $labels,
504
  'supports' => array( 'title', 'author' ),
505
  'public' => false,
@@ -538,8 +529,13 @@ class Admin {
538
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
539
 
540
  $menu_id = isset( $_POST['menu_id'] ) ? sanitize_text_field( wp_unslash( $_POST['menu_id'] ) ) : '';
 
541
  if ( empty( $menu_id ) ) {
542
- wp_send_json_error( array( 'message' => esc_html__( 'Select menu !', 'responsive-menu' ) ) );
 
 
 
 
543
  }
544
 
545
  $option_manager = Option_Manager::get_instance();
@@ -559,19 +555,29 @@ class Admin {
559
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
560
 
561
  if ( empty( $_FILES['file']['name'] ) ) {
562
- wp_send_json_error( array( 'message' => esc_html__( 'Please add file !', 'responsive-menu' ) ) );
563
  }
564
 
565
  if ( empty( $_FILES['file']['type'] ) || 'application/json' != $_FILES['file']['type'] ) {
566
- wp_send_json_error( array( 'message' => esc_html__( 'Please add json file !', 'responsive-menu' ) ) );
567
  }
568
 
569
  $menu_id = isset( $_POST['menu_id'] ) ? sanitize_text_field( wp_unslash( $_POST['menu_id'] ) ) : '';
570
  if ( empty( $menu_id ) ) {
571
- wp_send_json_error( array( 'message' => esc_html__( 'Select menu !', 'responsive-menu' ) ) );
 
 
 
 
 
 
 
 
 
572
  }
 
573
 
574
- $file_contents = isset( $_FILES['file']['tmp_name'] ) ? file_get_contents( wp_unslash( $_FILES['file']['tmp_name'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
575
  $import_options = json_decode( $file_contents, true );
576
 
577
  $option_manager = Option_Manager::get_instance();
@@ -594,6 +600,6 @@ class Admin {
594
  */
595
  do_action( 'rmp_import_menu', $menu_id );
596
 
597
- wp_send_json_success( array( 'message' => esc_html__( 'Menu settings imported successfully!', 'responsive-menu' ) ) );
598
  }
599
  }
51
  */
52
  protected function setup_hooks() {
53
  add_action( 'wp_ajax_rmp_save_global_settings', array( $this, 'save_menu_global_settings' ) );
 
54
  add_action( 'wp_ajax_rmp_create_new_menu', array( $this, 'create_new_menu' ) );
55
  add_action( 'wp_ajax_rmp_export_menu', array( $this, 'rmp_export_menu' ) );
56
  add_action( 'wp_ajax_rmp_import_menu', array( $this, 'rmp_import_menu' ) );
60
  add_action( 'init', array( $this, 'rmp_menu_cpt' ), 0 );
61
 
62
  add_filter( 'post_row_actions', array( $this, 'rmp_menu_row_actions' ), 10, 2 );
63
+ add_filter( 'get_edit_post_link', array( $this, 'rmp_edit_post_link' ), 10, 2 );
64
 
65
  add_filter( 'manage_rmp_menu_posts_columns', array( $this, 'set_custom_edit_menu_columns' ) );
66
  add_action( 'manage_rmp_menu_posts_custom_column', array( $this, 'add_custom_columns' ), 10, 2 );
77
  */
78
  public function save_menu_global_settings() {
79
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
80
+ if ( ! current_user_can( 'administrator' ) ) {
81
+ wp_send_json_error( __( 'You can\'t edit global settings!', 'responsive-menu' ) );
82
+ }
83
 
84
  $options = array();
85
  $form_data = isset( $_POST['form'] ) ? rm_sanitize_rec_array( wp_unslash( $_POST['form'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
100
  */
101
  do_action( 'rmp_save_global_settings', $options );
102
 
103
+ wp_send_json_success( __( 'Saved', 'responsive-menu' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  }
105
 
106
  /**
113
  public function create_new_menu() {
114
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
115
 
116
+ if ( ! current_user_can( 'administrator' ) ) {
117
+ wp_send_json_error( array( 'message' => __( 'You can not create menu !', 'responsive-menu' ) ) );
118
+ }
119
+
120
  $menu_name = isset( $_POST['menu_name'] ) ? sanitize_text_field( wp_unslash( $_POST['menu_name'] ) ) : '';
121
  if ( empty( $menu_name ) ) {
122
+ wp_send_json_error( array( 'message' => __( 'Enter the Menu name !', 'responsive-menu' ) ) );
123
  }
124
 
125
  $menu_to_use = isset( $_POST['menu_to_use'] ) ? sanitize_text_field( wp_unslash( $_POST['menu_to_use'] ) ) : '';
126
  if ( empty( $menu_to_use ) ) {
127
+ wp_send_json_error( array( 'message' => __( 'Select menu to use !', 'responsive-menu' ) ) );
128
  }
129
 
130
  $menu_to_hide = isset( $_POST['menu_to_hide'] ) ? sanitize_text_field( wp_unslash( $_POST['menu_to_hide'] ) ) : '';
188
 
189
  wp_send_json_success(
190
  array(
191
+ 'message' => __( 'Menu is created successfully', 'responsive-menu' ),
192
  'customize_url' => sprintf(
193
  '%spost.php?post=%s&action=edit&editor=true',
194
  get_admin_url(),
197
  )
198
  );
199
  } else {
200
+ wp_send_json_error( array( 'message' => __( 'Unable to create new Menu !', 'responsive-menu' ) ) );
201
  }
202
  }
203
 
206
  *
207
  * @since 4.0.0
208
  *
209
+ * @param Array $atts Attributes List.
210
  *
211
  * @return HTML $output Menu contents.
212
  */
217
 
218
  // Check given id is valid.
219
  if ( empty( $attrs['id'] ) ) {
220
+ return __( 'Please pass menu id as attribute.', 'responsive-menu' );
221
  }
222
 
223
  $menu_id = $attrs['id'];
224
  if ( 'publish' !== get_post_status( $menu_id ) ) {
225
  /* translators: %d: Menu id */
226
+ return sprintf( __( 'Shortcode with menu id %d is not published.', 'responsive-menu' ), esc_html( $menu_id ) );
227
  }
228
 
229
  // Check shortcode option is activated or not.
231
  $option = $option_manager->get_option( $menu_id, 'menu_display_on' );
232
 
233
  if ( 'shortcode' !== $option ) {
234
+ return __( 'Shortcode deactivated', 'responsive-menu' );
235
  }
236
 
237
  ob_start();
252
  public function responsive_menu_shortcode() {
253
 
254
  // Check shortcode option is activated or not.
255
+ $options = Option_Manager::get_instance();
256
+ $menu_ids = get_all_rmp_menu_ids();
257
 
258
  if ( ! empty( $menu_ids ) ) {
259
  foreach ( $menu_ids as $menu_id ) {
269
  return ob_get_clean();
270
  }
271
  } else {
272
+ return __( 'Shortcode deactivated', 'responsive-menu' );
273
  }
274
  }
275
 
296
  public function rmp_register_submenu_page() {
297
  add_submenu_page(
298
  'edit.php?post_type=rmp_menu',
299
+ __( 'Settings', 'responsive-menu' ),
300
+ __( 'Settings', 'responsive-menu' ),
301
  'manage_options',
302
  'settings',
303
  array( $this, 'rmp_global_settings_page' )
305
 
306
  add_submenu_page(
307
  'edit.php?post_type=rmp_menu',
308
+ __( 'Themes', 'responsive-menu' ),
309
+ __( 'Themes', 'responsive-menu' ),
310
  'manage_options',
311
  'themes',
312
  array( $this, 'rmp_theme_admin_page' )
385
  $actions['edit'] = sprintf(
386
  '<a href="%s" aria-label="Edit">%s</a>',
387
  esc_url( get_edit_post_link( $post->ID ) ),
388
+ __( 'Customize', 'responsive-menu' )
389
  );
390
  }
391
 
403
  */
404
  public function set_custom_edit_menu_columns( $columns ) {
405
  unset( $columns['date'] );
406
+ $columns['shortcode_place'] = __( 'Shortcode', 'responsive-menu' );
407
+ $columns['actions'] = __( 'Actions', 'responsive-menu' );
408
+ $columns['date'] = __( 'Date', 'responsive-menu' );
409
 
410
  return $columns;
411
  }
420
  *
421
  * @return string $url Edited post url URL
422
  */
423
+ public function rmp_edit_post_link( $url, $post_id ) {
424
+ if ( 'rmp_menu' === get_post_type() && current_user_can( 'edit_post', $post_id ) ) {
425
  $url = get_admin_url() . 'post.php?post=' . $post_id . '&action=edit&editor=true';
426
  }
427
 
473
  }
474
 
475
  $labels = array(
476
+ 'name' => __( 'Responsive Menu', 'responsive-menu' ),
477
+ 'singular_name' => __( 'Responsive Menu', 'responsive-menu' ),
478
+ 'menu_name' => __( 'Responsive Menu', 'responsive-menu' ),
479
+ 'parent_item_colon' => __( 'Parent Menu', 'responsive-menu' ),
480
+ 'all_items' => __( 'Menus', 'responsive-menu' ),
481
+ 'view_item' => __( 'View Menu', 'responsive-menu' ),
482
+ 'add_new_item' => __( 'Add New Menu', 'responsive-menu' ),
483
+ 'add_new' => __( 'Create New Menu', 'responsive-menu' ),
484
+ 'edit_item' => __( 'Edit Menu', 'responsive-menu' ),
485
+ 'update_item' => __( 'Update Menu', 'responsive-menu' ),
486
+ 'search_items' => __( 'Search Menu', 'responsive-menu' ),
487
+ 'not_found' => __( 'Not Found', 'responsive-menu' ),
488
+ 'not_found_in_trash' => __( 'Not found in Trash', 'responsive-menu' ),
489
  );
490
 
491
  $args = array(
492
+ 'label' => __( 'Responsive Menu', 'responsive-menu' ),
493
+ 'description' => __( 'Responsive Menu', 'responsive-menu' ),
494
  'labels' => $labels,
495
  'supports' => array( 'title', 'author' ),
496
  'public' => false,
529
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
530
 
531
  $menu_id = isset( $_POST['menu_id'] ) ? sanitize_text_field( wp_unslash( $_POST['menu_id'] ) ) : '';
532
+
533
  if ( empty( $menu_id ) ) {
534
+ wp_send_json_error( array( 'message' => __( 'Select menu !', 'responsive-menu' ) ) );
535
+ }
536
+
537
+ if ( ! current_user_can( 'edit_post', $menu_id ) ) {
538
+ wp_send_json_error( array( 'message' => __( 'You can not export menu !', 'responsive-menu' ) ) );
539
  }
540
 
541
  $option_manager = Option_Manager::get_instance();
555
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
556
 
557
  if ( empty( $_FILES['file']['name'] ) ) {
558
+ wp_send_json_error( array( 'message' => __( 'Please add file !', 'responsive-menu' ) ) );
559
  }
560
 
561
  if ( empty( $_FILES['file']['type'] ) || 'application/json' != $_FILES['file']['type'] ) {
562
+ wp_send_json_error( array( 'message' => __( 'Please add json file !', 'responsive-menu' ) ) );
563
  }
564
 
565
  $menu_id = isset( $_POST['menu_id'] ) ? sanitize_text_field( wp_unslash( $_POST['menu_id'] ) ) : '';
566
  if ( empty( $menu_id ) ) {
567
+ wp_send_json_error( array( 'message' => __( 'Select menu !', 'responsive-menu' ) ) );
568
+ }
569
+
570
+ if ( ! current_user_can( 'edit_post', $menu_id ) ) {
571
+ wp_send_json_error( array( 'message' => __( 'You can not import menu !', 'responsive-menu' ) ) );
572
+ }
573
+
574
+ global $wp_filesystem;
575
+ if ( empty( $wp_filesystem ) ) {
576
+ require_once ABSPATH . 'wp-admin/includes/file.php';
577
  }
578
+ WP_Filesystem();
579
 
580
+ $file_contents = isset( $_FILES['file']['tmp_name'] ) ? $wp_filesystem->get_contents( wp_unslash( $_FILES['file']['tmp_name'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
581
  $import_options = json_decode( $file_contents, true );
582
 
583
  $option_manager = Option_Manager::get_instance();
600
  */
601
  do_action( 'rmp_import_menu', $menu_id );
602
 
603
+ wp_send_json_success( array( 'message' => __( 'Menu settings imported successfully!', 'responsive-menu' ) ) );
604
  }
605
  }
v4.0.0/inc/classes/class-assets.php CHANGED
@@ -50,7 +50,7 @@ class Assets {
50
  */
51
  public function rmp_menu_editor_style_inline() {
52
  $editor = filter_input( INPUT_GET, 'editor', FILTER_SANITIZE_STRING );
53
- if ( ! empty( $editor ) && get_post_type() == 'rmp_menu' && is_admin() ) {
54
  $css_data = 'html.wp-toolbar {
55
  margin: 0;
56
  padding: 0 !important;
@@ -95,7 +95,7 @@ class Assets {
95
  $post_type = sanitize_text_field( wp_unslash( $_GET['post_type'] ) );
96
  }
97
 
98
- if ( 'rmp_menu' !== $post_type ) {
99
  return;
100
  }
101
 
50
  */
51
  public function rmp_menu_editor_style_inline() {
52
  $editor = filter_input( INPUT_GET, 'editor', FILTER_SANITIZE_STRING );
53
+ if ( ! empty( $editor ) && 'rmp_menu' === get_post_type() && current_user_can( 'administrator' ) ) {
54
  $css_data = 'html.wp-toolbar {
55
  margin: 0;
56
  padding: 0 !important;
95
  $post_type = sanitize_text_field( wp_unslash( $_GET['post_type'] ) );
96
  }
97
 
98
+ if ( 'rmp_menu' !== $post_type || ! current_user_can( 'administrator' ) ) {
99
  return;
100
  }
101
 
v4.0.0/inc/classes/class-editor-manager.php CHANGED
@@ -114,6 +114,10 @@ class Editor_Manager {
114
  $item_id = isset( $_POST['item_id'] ) ? sanitize_text_field( wp_unslash( $_POST['item_id'] ) ) : '';
115
  $value = isset( $_POST['value'] ) ? sanitize_text_field( wp_unslash( $_POST['value'] ) ) : '';
116
 
 
 
 
 
117
  $options = get_post_meta( $menu_id, 'rmp_menu_meta' );
118
 
119
  if ( ! empty( $options ) ) {
@@ -141,13 +145,18 @@ class Editor_Manager {
141
 
142
  $options = array();
143
  $form_data = isset( $_POST['form'] ) ? rm_sanitize_rec_array( wp_unslash( $_POST['form'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
144
- parse_str( $form_data, $options );
145
 
146
  $menu_id = sanitize_text_field( $options['menu_id'] );
 
147
  if ( empty( $menu_id ) ) {
148
  wp_send_json_error( array( 'message' => esc_html__( 'Menu ID missing !', 'responsive-menu' ) ) );
149
  }
150
 
 
 
 
 
151
  $options = $options['menu'];
152
 
153
  // Merge the default and update options.
114
  $item_id = isset( $_POST['item_id'] ) ? sanitize_text_field( wp_unslash( $_POST['item_id'] ) ) : '';
115
  $value = isset( $_POST['value'] ) ? sanitize_text_field( wp_unslash( $_POST['value'] ) ) : '';
116
 
117
+ if ( ! current_user_can( 'edit_post', $menu_id ) ) {
118
+ wp_send_json_error( array( 'message' => __( 'You can not update menu !', 'responsive-menu' ) ) );
119
+ }
120
+
121
  $options = get_post_meta( $menu_id, 'rmp_menu_meta' );
122
 
123
  if ( ! empty( $options ) ) {
145
 
146
  $options = array();
147
  $form_data = isset( $_POST['form'] ) ? rm_sanitize_rec_array( wp_unslash( $_POST['form'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
148
+ wp_parse_str( $form_data, $options );
149
 
150
  $menu_id = sanitize_text_field( $options['menu_id'] );
151
+
152
  if ( empty( $menu_id ) ) {
153
  wp_send_json_error( array( 'message' => esc_html__( 'Menu ID missing !', 'responsive-menu' ) ) );
154
  }
155
 
156
+ if ( ! current_user_can( 'edit_post', $menu_id ) ) {
157
+ wp_send_json_error( array( 'message' => __( 'You can not edit menu !', 'responsive-menu' ) ) );
158
+ }
159
+
160
  $options = $options['menu'];
161
 
162
  // Merge the default and update options.
v4.0.0/inc/classes/class-editor.php CHANGED
@@ -53,7 +53,7 @@ class Editor {
53
  */
54
  public function render_menu_editor_page() {
55
  $editor = filter_input( INPUT_GET, 'editor', FILTER_SANITIZE_STRING );
56
- if ( ! empty( $editor ) && get_post_type() == 'rmp_menu' && is_admin() ) {
57
  set_current_screen();
58
  include RMP_PLUGIN_PATH_V4 . '/templates/rmp-editor.php';
59
  exit;
53
  */
54
  public function render_menu_editor_page() {
55
  $editor = filter_input( INPUT_GET, 'editor', FILTER_SANITIZE_STRING );
56
+ if ( ! empty( $editor ) && 'rmp_menu' === get_post_type() && current_user_can( 'administrator' ) ) {
57
  set_current_screen();
58
  include RMP_PLUGIN_PATH_V4 . '/templates/rmp-editor.php';
59
  exit;
v4.0.0/inc/classes/class-option-manager.php CHANGED
@@ -56,15 +56,11 @@ class Option_Manager {
56
  */
57
  public function get_options( $menu_id ) {
58
 
59
- $options = get_post_meta( $menu_id, 'rmp_menu_meta' );
60
-
61
- if ( empty( $options[0] ) ) {
62
- return array();
63
- }
64
-
65
  $options = $options[0];
66
  $options['menu_id'] = $menu_id;
67
-
 
68
  return $options;
69
  }
70
 
@@ -78,13 +74,14 @@ class Option_Manager {
78
  */
79
  public function get_option( $menu_id, $key ) {
80
 
81
- $options = $this->get_options( $menu_id );
 
82
 
83
  if ( ! empty( $options[ $key ] ) ) {
84
  return $options[ $key ];
 
 
85
  }
86
-
87
- return;
88
  }
89
 
90
  /**
56
  */
57
  public function get_options( $menu_id ) {
58
 
59
+ $options = get_post_meta( $menu_id, 'rmp_menu_meta' );
 
 
 
 
 
60
  $options = $options[0];
61
  $options['menu_id'] = $menu_id;
62
+ $default_options = rmp_get_default_options();
63
+ $options = array_replace( $default_options, $options );
64
  return $options;
65
  }
66
 
74
  */
75
  public function get_option( $menu_id, $key ) {
76
 
77
+ $options = $this->get_options( $menu_id );
78
+ $default_options = rmp_get_default_options();
79
 
80
  if ( ! empty( $options[ $key ] ) ) {
81
  return $options[ $key ];
82
+ } elseif ( ! empty( $default_options[ $key ] ) ) {
83
+ return $default_options[ $key ];
84
  }
 
 
85
  }
86
 
87
  /**
v4.0.0/inc/classes/class-rmp-menu.php CHANGED
@@ -165,10 +165,10 @@ if ( ! class_exists( 'RMP_Menu' ) ) :
165
 
166
  $menu_trigger_destination = '';
167
  if ( ! empty( $this->options['hamburger_position_selector'] ) ) {
168
- $menu_trigger_destination = $this->options['hamburger_position_selector'];
169
  }
170
  ?>
171
- <button type="button" aria-controls="rmp-container-<?php echo esc_attr( $this->menu_id ); ?>" aria-label="Menu Trigger" id="rmp_menu_trigger-<?php echo esc_attr( $this->menu_id ); ?>" destination="<?php echo esc_attr( $menu_trigger_destination ); ?>" class="<?php echo esc_attr( $toggle_theme_class ); ?>">
172
  <?php
173
  $trigger_text_position = '';
174
 
165
 
166
  $menu_trigger_destination = '';
167
  if ( ! empty( $this->options['hamburger_position_selector'] ) ) {
168
+ $menu_trigger_destination = 'data-destination=' . $this->options['hamburger_position_selector'];
169
  }
170
  ?>
171
+ <button type="button" aria-controls="rmp-container-<?php echo esc_attr( $this->menu_id ); ?>" aria-label="Menu Trigger" id="rmp_menu_trigger-<?php echo esc_attr( $this->menu_id ); ?>" <?php echo esc_attr( $menu_trigger_destination ); ?> class="<?php echo esc_attr( $toggle_theme_class ); ?>">
172
  <?php
173
  $trigger_text_position = '';
174
 
v4.0.0/inc/classes/class-style-manager.php CHANGED
@@ -364,17 +364,17 @@ class Style_Manager {
364
  $menu_trigger_height = $options['button_height'] . $options['button_height_unit'];
365
  }
366
 
367
- $menu_trigger_background_color = '';
368
  if ( ! empty( $options['button_background_colour'] ) ) {
369
  $menu_trigger_background_color = $options['button_background_colour'];
370
  }
371
 
372
- $menu_trigger_background_color_hover = '';
373
  if ( ! empty( $options['button_background_colour_hover'] ) ) {
374
  $menu_trigger_background_color_hover = $options['button_background_colour_hover'];
375
  }
376
 
377
- $menu_trigger_active_color = '';
378
  if ( ! empty( $options['button_background_colour_active'] ) ) {
379
  $menu_trigger_active_color = $options['button_background_colour_active'];
380
  }
@@ -389,22 +389,22 @@ class Style_Manager {
389
  $menu_trigger_transparent_background = $options['button_transparent_background'];
390
  }
391
 
392
- $menu_trigger_line_color = '';
393
  if ( ! empty( $options['button_line_colour'] ) ) {
394
  $menu_trigger_line_color = $options['button_line_colour'];
395
  }
396
 
397
- $menu_trigger_line_color_hover = '';
398
  if ( ! empty( $options['button_line_colour_hover'] ) ) {
399
  $menu_trigger_line_color_hover = $options['button_line_colour_hover'];
400
  }
401
 
402
- $menu_trigger_line_active_color = '';
403
  if ( ! empty( $options['button_line_colour_active'] ) ) {
404
  $menu_trigger_line_active_color = $options['button_line_colour_active'];
405
  }
406
 
407
- $menu_trigger_title_color = '';
408
  if ( ! empty( $options['button_text_colour'] ) ) {
409
  $menu_trigger_title_color = $options['button_text_colour'];
410
  }
@@ -479,22 +479,22 @@ class Style_Manager {
479
  $menu_search_section_padding_bottom = $options['menu_search_section_padding']['bottom'];
480
  }
481
 
482
- $menu_search_box_text_color = '';
483
  if ( ! empty( $options['menu_search_box_text_colour'] ) ) {
484
  $menu_search_box_text_color = $options['menu_search_box_text_colour'];
485
  }
486
 
487
- $menu_search_box_background_color = '';
488
  if ( ! empty( $options['menu_search_box_background_colour'] ) ) {
489
  $menu_search_box_background_color = $options['menu_search_box_background_colour'];
490
  }
491
 
492
- $menu_search_box_border_color = '';
493
  if ( ! empty( $options['menu_search_box_border_colour'] ) ) {
494
  $menu_search_box_border_color = $options['menu_search_box_border_colour'];
495
  }
496
 
497
- $menu_search_box_placeholder_color = '';
498
  if ( ! empty( $options['menu_search_box_placeholder_colour'] ) ) {
499
  $menu_search_box_placeholder_color = $options['menu_search_box_placeholder_colour'];
500
  }
@@ -539,7 +539,7 @@ class Style_Manager {
539
  $menu_additional_section_padding_bottom = $options['menu_additional_section_padding']['bottom'];
540
  }
541
 
542
- $menu_additional_content_color = '';
543
  if ( ! empty( $options['menu_additional_content_colour'] ) ) {
544
  $menu_additional_content_color = $options['menu_additional_content_colour'];
545
  }
@@ -584,12 +584,12 @@ class Style_Manager {
584
  $menu_title_section_padding_bottom = $options['menu_title_section_padding']['bottom'];
585
  }
586
 
587
- $menu_title_background = '';
588
  if ( ! empty( $options['menu_title_background_colour'] ) ) {
589
  $menu_title_background = $options['menu_title_background_colour'];
590
  }
591
 
592
- $menu_title_background_hover = '';
593
  if ( ! empty( $options['menu_title_background_hover_colour'] ) ) {
594
  $menu_title_background_hover = $options['menu_title_background_hover_colour'];
595
  }
@@ -604,12 +604,12 @@ class Style_Manager {
604
  $menu_title_font_weight = $options['menu_title_font_weight'];
605
  }
606
 
607
- $menu_title_font_color = '';
608
  if ( ! empty( $options['menu_title_colour'] ) ) {
609
  $menu_title_font_color = $options['menu_title_colour'];
610
  }
611
 
612
- $menu_title_font_color_hover = '';
613
  if ( ! empty( $options['menu_title_hover_colour'] ) ) {
614
  $menu_title_font_color_hover = $options['menu_title_hover_colour'];
615
  }
@@ -784,7 +784,7 @@ class Style_Manager {
784
  $menu_item_border_width_unit = $options['menu_border_width_unit'];
785
  }
786
 
787
- $menu_item_border_color = '';
788
  if ( ! empty( $options['menu_item_border_colour'] ) ) {
789
  $menu_item_border_color = $options['menu_item_border_colour'];
790
  }
@@ -794,7 +794,7 @@ class Style_Manager {
794
  $menu_item_border_color_hover = $options['menu_item_border_colour_hover'];
795
  }
796
 
797
- $menu_current_item_border_color = '';
798
  if ( ! empty( $options['menu_current_item_border_colour'] ) ) {
799
  $menu_current_item_border_color = $options['menu_current_item_border_colour'];
800
  }
@@ -824,42 +824,42 @@ class Style_Manager {
824
  $menu_item_text_alignment = $options['menu_text_alignment'];
825
  }
826
 
827
- $menu_item_text_color = '';
828
  if ( ! empty( $options['menu_link_colour'] ) ) {
829
  $menu_item_text_color = $options['menu_link_colour'];
830
  }
831
 
832
- $menu_item_text_color_hover = '';
833
  if ( ! empty( $options['menu_link_hover_colour'] ) ) {
834
  $menu_item_text_color_hover = $options['menu_link_hover_colour'];
835
  }
836
 
837
- $menu_current_item_text_color = '';
838
  if ( ! empty( $options['menu_current_link_colour'] ) ) {
839
  $menu_current_item_text_color = $options['menu_current_link_colour'];
840
  }
841
 
842
- $menu_current_item_text_color_hover = '';
843
  if ( ! empty( $options['menu_current_link_hover_colour'] ) ) {
844
  $menu_current_item_text_color_hover = $options['menu_current_link_hover_colour'];
845
  }
846
 
847
- $menu_item_background_color = '';
848
  if ( ! empty( $options['menu_item_background_colour'] ) ) {
849
  $menu_item_background_color = $options['menu_item_background_colour'];
850
  }
851
 
852
- $menu_item_background_color_hover = '';
853
  if ( ! empty( $options['menu_item_background_hover_colour'] ) ) {
854
  $menu_item_background_color_hover = $options['menu_item_background_hover_colour'];
855
  }
856
 
857
- $menu_current_item_background_color = '';
858
  if ( ! empty( $options['menu_current_item_background_colour'] ) ) {
859
  $menu_current_item_background_color = $options['menu_current_item_background_colour'];
860
  }
861
 
862
- $menu_current_item_background_color_hover = '';
863
  if ( ! empty( $options['menu_current_item_background_hover_colour'] ) ) {
864
  $menu_current_item_background_color_hover = $options['menu_current_item_background_hover_colour'];
865
  }
@@ -949,47 +949,47 @@ class Style_Manager {
949
  $menu_item_toggle_width_unit = $options['submenu_arrow_width_unit'];
950
  }
951
 
952
- $menu_item_toggle_text_color = '';
953
  if ( ! empty( $options['menu_sub_arrow_shape_colour'] ) ) {
954
  $menu_item_toggle_text_color = $options['menu_sub_arrow_shape_colour'];
955
  }
956
 
957
- $menu_item_toggle_text_color_hover = '';
958
  if ( ! empty( $options['menu_sub_arrow_shape_hover_colour'] ) ) {
959
  $menu_item_toggle_text_color_hover = $options['menu_sub_arrow_shape_hover_colour'];
960
  }
961
 
962
- $menu_current_item_toggle_text_color = '';
963
  if ( ! empty( $options['menu_sub_arrow_shape_colour_active'] ) ) {
964
  $menu_current_item_toggle_text_color = $options['menu_sub_arrow_shape_colour_active'];
965
  }
966
 
967
- $menu_current_item_toggle_text_color_hover = '';
968
  if ( ! empty( $options['menu_sub_arrow_shape_hover_colour_active'] ) ) {
969
  $menu_current_item_toggle_text_color_hover = $options['menu_sub_arrow_shape_hover_colour_active'];
970
  }
971
 
972
- $menu_item_toggle_background_color = '';
973
  if ( ! empty( $options['menu_sub_arrow_background_colour'] ) ) {
974
  $menu_item_toggle_background_color = $options['menu_sub_arrow_background_colour'];
975
  }
976
 
977
- $menu_item_toggle_background_color_hover = '';
978
  if ( ! empty( $options['menu_sub_arrow_background_hover_colour'] ) ) {
979
  $menu_item_toggle_background_color_hover = $options['menu_sub_arrow_background_hover_colour'];
980
  }
981
 
982
- $menu_current_item_toggle_background_color = '';
983
  if ( ! empty( $options['menu_sub_arrow_background_colour_active'] ) ) {
984
  $menu_current_item_toggle_background_color = $options['menu_sub_arrow_background_colour_active'];
985
  }
986
 
987
- $menu_current_item_toggle_background_color_hover = '';
988
  if ( ! empty( $options['menu_sub_arrow_background_hover_colour_active'] ) ) {
989
  $menu_current_item_toggle_background_color_hover = $options['menu_sub_arrow_background_hover_colour_active'];
990
  }
991
 
992
- $menu_item_toggle_border_color = '';
993
  if ( ! empty( $options['menu_sub_arrow_border_colour'] ) ) {
994
  $menu_item_toggle_border_color = $options['menu_sub_arrow_border_colour'];
995
  }
@@ -999,7 +999,7 @@ class Style_Manager {
999
  $menu_item_toggle_border_color_hover = $options['menu_sub_arrow_border_hover_colour'];
1000
  }
1001
 
1002
- $menu_current_item_toggle_border_color = '';
1003
  if ( ! empty( $options['menu_sub_arrow_border_colour_active'] ) ) {
1004
  $menu_current_item_toggle_border_color = $options['menu_sub_arrow_border_colour_active'];
1005
  }
@@ -1016,7 +1016,7 @@ class Style_Manager {
1016
 
1017
  $submenu_item_height_unit = '';
1018
  if ( ! empty( $options['submenu_links_height_unit'] ) ) {
1019
- $submenu_item_height = $options['submenu_links_height_unit'];
1020
  }
1021
 
1022
  $submenu_item_line_height = '';
@@ -1039,7 +1039,7 @@ class Style_Manager {
1039
  $submenu_item_border_width_unit = $options['submenu_border_width_unit'];
1040
  }
1041
 
1042
- $submenu_item_border_color = '';
1043
  if ( ! empty( $options['submenu_item_border_colour'] ) ) {
1044
  $submenu_item_border_color = $options['submenu_item_border_colour'];
1045
  }
@@ -1049,7 +1049,7 @@ class Style_Manager {
1049
  $submenu_item_border_color_hover = $options['submenu_item_border_colour_hover'];
1050
  }
1051
 
1052
- $submenu_current_item_border_color = '';
1053
  if ( ! empty( $options['submenu_current_item_border_colour'] ) ) {
1054
  $submenu_current_item_border_color = $options['submenu_current_item_border_colour'];
1055
  }
@@ -1079,42 +1079,42 @@ class Style_Manager {
1079
  $submenu_item_text_alignment = $options['submenu_text_alignment'];
1080
  }
1081
 
1082
- $submenu_item_text_color = '';
1083
  if ( ! empty( $options['submenu_link_colour'] ) ) {
1084
  $submenu_item_text_color = $options['submenu_link_colour'];
1085
  }
1086
 
1087
- $submenu_item_text_color_hover = '';
1088
  if ( ! empty( $options['submenu_link_hover_colour'] ) ) {
1089
  $submenu_item_text_color_hover = $options['submenu_link_hover_colour'];
1090
  }
1091
 
1092
- $submenu_current_item_text_color = '';
1093
  if ( ! empty( $options['submenu_current_link_colour'] ) ) {
1094
  $submenu_current_item_text_color = $options['submenu_current_link_colour'];
1095
  }
1096
 
1097
- $submenu_current_item_text_color_hover = '';
1098
  if ( ! empty( $options['submenu_current_link_hover_colour'] ) ) {
1099
  $submenu_current_item_text_color_hover = $options['submenu_current_link_hover_colour'];
1100
  }
1101
 
1102
- $submenu_item_background_color = '';
1103
  if ( ! empty( $options['submenu_item_background_colour'] ) ) {
1104
  $submenu_item_background_color = $options['submenu_item_background_colour'];
1105
  }
1106
 
1107
- $submenu_item_background_color_hover = '';
1108
  if ( ! empty( $options['submenu_item_background_hover_colour'] ) ) {
1109
  $submenu_item_background_color_hover = $options['submenu_item_background_hover_colour'];
1110
  }
1111
 
1112
- $submenu_current_item_background_color = '';
1113
  if ( ! empty( $options['submenu_current_item_background_colour'] ) ) {
1114
  $submenu_current_item_background_color = $options['submenu_current_item_background_colour'];
1115
  }
1116
 
1117
- $submenu_current_item_background_color_hover = '';
1118
  if ( ! empty( $options['submenu_current_item_background_hover_colour'] ) ) {
1119
  $submenu_current_item_background_color_hover = $options['submenu_current_item_background_hover_colour'];
1120
  }
@@ -1164,47 +1164,47 @@ class Style_Manager {
1164
  $submenu_sub_arrow_border_width_unit = $options['submenu_sub_arrow_border_width_unit'];
1165
  }
1166
 
1167
- $submenu_item_toggle_text_color = '';
1168
  if ( ! empty( $options['submenu_sub_arrow_shape_colour'] ) ) {
1169
  $submenu_item_toggle_text_color = $options['submenu_sub_arrow_shape_colour'];
1170
  }
1171
 
1172
- $submenu_item_toggle_text_color_hover = '';
1173
  if ( ! empty( $options['submenu_sub_arrow_shape_hover_colour'] ) ) {
1174
  $submenu_item_toggle_text_color_hover = $options['submenu_sub_arrow_shape_hover_colour'];
1175
  }
1176
 
1177
- $submenu_current_item_toggle_text_color = '';
1178
  if ( ! empty( $options['submenu_sub_arrow_shape_colour_active'] ) ) {
1179
  $submenu_current_item_toggle_text_color = $options['submenu_sub_arrow_shape_colour_active'];
1180
  }
1181
 
1182
- $submenu_current_item_toggle_text_color_hover = '';
1183
  if ( ! empty( $options['submenu_sub_arrow_shape_hover_colour_active'] ) ) {
1184
  $submenu_current_item_toggle_text_color_hover = $options['submenu_sub_arrow_shape_hover_colour_active'];
1185
  }
1186
 
1187
- $submenu_item_toggle_background_color = '';
1188
  if ( ! empty( $options['submenu_sub_arrow_background_colour'] ) ) {
1189
  $submenu_item_toggle_background_color = $options['submenu_sub_arrow_background_colour'];
1190
  }
1191
 
1192
- $submenu_item_toggle_background_color_hover = '';
1193
  if ( ! empty( $options['submenu_sub_arrow_background_hover_colour'] ) ) {
1194
  $submenu_item_toggle_background_color_hover = $options['submenu_sub_arrow_background_hover_colour'];
1195
  }
1196
 
1197
- $submenu_current_item_toggle_background_color = '';
1198
  if ( ! empty( $options['submenu_sub_arrow_background_colour_active'] ) ) {
1199
  $submenu_current_item_toggle_background_color = $options['submenu_sub_arrow_background_colour_active'];
1200
  }
1201
 
1202
- $submenu_current_item_toggle_background_color_hover = '';
1203
  if ( ! empty( $options['submenu_sub_arrow_background_hover_colour_active'] ) ) {
1204
  $submenu_current_item_toggle_background_color_hover = $options['submenu_sub_arrow_background_hover_colour_active'];
1205
  }
1206
 
1207
- $submenu_item_toggle_border_color = '';
1208
  if ( ! empty( $options['submenu_sub_arrow_border_colour'] ) ) {
1209
  $submenu_item_toggle_border_color = $options['submenu_sub_arrow_border_colour'];
1210
  }
@@ -1214,7 +1214,7 @@ class Style_Manager {
1214
  $submenu_item_toggle_border_color_hover = $options['submenu_sub_arrow_border_hover_colour'];
1215
  }
1216
 
1217
- $submenu_current_item_toggle_border_color = '';
1218
  if ( ! empty( $options['submenu_sub_arrow_border_colour_active'] ) ) {
1219
  $submenu_current_item_toggle_border_color = $options['submenu_sub_arrow_border_colour_active'];
1220
  }
364
  $menu_trigger_height = $options['button_height'] . $options['button_height_unit'];
365
  }
366
 
367
+ $menu_trigger_background_color = 'inherit';
368
  if ( ! empty( $options['button_background_colour'] ) ) {
369
  $menu_trigger_background_color = $options['button_background_colour'];
370
  }
371
 
372
+ $menu_trigger_background_color_hover = 'inherit';
373
  if ( ! empty( $options['button_background_colour_hover'] ) ) {
374
  $menu_trigger_background_color_hover = $options['button_background_colour_hover'];
375
  }
376
 
377
+ $menu_trigger_active_color = 'inherit';
378
  if ( ! empty( $options['button_background_colour_active'] ) ) {
379
  $menu_trigger_active_color = $options['button_background_colour_active'];
380
  }
389
  $menu_trigger_transparent_background = $options['button_transparent_background'];
390
  }
391
 
392
+ $menu_trigger_line_color = 'inherit';
393
  if ( ! empty( $options['button_line_colour'] ) ) {
394
  $menu_trigger_line_color = $options['button_line_colour'];
395
  }
396
 
397
+ $menu_trigger_line_color_hover = 'inherit';
398
  if ( ! empty( $options['button_line_colour_hover'] ) ) {
399
  $menu_trigger_line_color_hover = $options['button_line_colour_hover'];
400
  }
401
 
402
+ $menu_trigger_line_active_color = 'inherit';
403
  if ( ! empty( $options['button_line_colour_active'] ) ) {
404
  $menu_trigger_line_active_color = $options['button_line_colour_active'];
405
  }
406
 
407
+ $menu_trigger_title_color = 'inherit';
408
  if ( ! empty( $options['button_text_colour'] ) ) {
409
  $menu_trigger_title_color = $options['button_text_colour'];
410
  }
479
  $menu_search_section_padding_bottom = $options['menu_search_section_padding']['bottom'];
480
  }
481
 
482
+ $menu_search_box_text_color = 'inherit';
483
  if ( ! empty( $options['menu_search_box_text_colour'] ) ) {
484
  $menu_search_box_text_color = $options['menu_search_box_text_colour'];
485
  }
486
 
487
+ $menu_search_box_background_color = 'inherit';
488
  if ( ! empty( $options['menu_search_box_background_colour'] ) ) {
489
  $menu_search_box_background_color = $options['menu_search_box_background_colour'];
490
  }
491
 
492
+ $menu_search_box_border_color = 'currentColor';
493
  if ( ! empty( $options['menu_search_box_border_colour'] ) ) {
494
  $menu_search_box_border_color = $options['menu_search_box_border_colour'];
495
  }
496
 
497
+ $menu_search_box_placeholder_color = 'inherit';
498
  if ( ! empty( $options['menu_search_box_placeholder_colour'] ) ) {
499
  $menu_search_box_placeholder_color = $options['menu_search_box_placeholder_colour'];
500
  }
539
  $menu_additional_section_padding_bottom = $options['menu_additional_section_padding']['bottom'];
540
  }
541
 
542
+ $menu_additional_content_color = 'inherit';
543
  if ( ! empty( $options['menu_additional_content_colour'] ) ) {
544
  $menu_additional_content_color = $options['menu_additional_content_colour'];
545
  }
584
  $menu_title_section_padding_bottom = $options['menu_title_section_padding']['bottom'];
585
  }
586
 
587
+ $menu_title_background = 'inherit';
588
  if ( ! empty( $options['menu_title_background_colour'] ) ) {
589
  $menu_title_background = $options['menu_title_background_colour'];
590
  }
591
 
592
+ $menu_title_background_hover = 'inherit';
593
  if ( ! empty( $options['menu_title_background_hover_colour'] ) ) {
594
  $menu_title_background_hover = $options['menu_title_background_hover_colour'];
595
  }
604
  $menu_title_font_weight = $options['menu_title_font_weight'];
605
  }
606
 
607
+ $menu_title_font_color = 'inherit';
608
  if ( ! empty( $options['menu_title_colour'] ) ) {
609
  $menu_title_font_color = $options['menu_title_colour'];
610
  }
611
 
612
+ $menu_title_font_color_hover = 'inherit';
613
  if ( ! empty( $options['menu_title_hover_colour'] ) ) {
614
  $menu_title_font_color_hover = $options['menu_title_hover_colour'];
615
  }
784
  $menu_item_border_width_unit = $options['menu_border_width_unit'];
785
  }
786
 
787
+ $menu_item_border_color = 'currentColor';
788
  if ( ! empty( $options['menu_item_border_colour'] ) ) {
789
  $menu_item_border_color = $options['menu_item_border_colour'];
790
  }
794
  $menu_item_border_color_hover = $options['menu_item_border_colour_hover'];
795
  }
796
 
797
+ $menu_current_item_border_color = 'currentColor';
798
  if ( ! empty( $options['menu_current_item_border_colour'] ) ) {
799
  $menu_current_item_border_color = $options['menu_current_item_border_colour'];
800
  }
824
  $menu_item_text_alignment = $options['menu_text_alignment'];
825
  }
826
 
827
+ $menu_item_text_color = 'inherit';
828
  if ( ! empty( $options['menu_link_colour'] ) ) {
829
  $menu_item_text_color = $options['menu_link_colour'];
830
  }
831
 
832
+ $menu_item_text_color_hover = 'inherit';
833
  if ( ! empty( $options['menu_link_hover_colour'] ) ) {
834
  $menu_item_text_color_hover = $options['menu_link_hover_colour'];
835
  }
836
 
837
+ $menu_current_item_text_color = 'inherit';
838
  if ( ! empty( $options['menu_current_link_colour'] ) ) {
839
  $menu_current_item_text_color = $options['menu_current_link_colour'];
840
  }
841
 
842
+ $menu_current_item_text_color_hover = 'inherit';
843
  if ( ! empty( $options['menu_current_link_hover_colour'] ) ) {
844
  $menu_current_item_text_color_hover = $options['menu_current_link_hover_colour'];
845
  }
846
 
847
+ $menu_item_background_color = 'inherit';
848
  if ( ! empty( $options['menu_item_background_colour'] ) ) {
849
  $menu_item_background_color = $options['menu_item_background_colour'];
850
  }
851
 
852
+ $menu_item_background_color_hover = 'inherit';
853
  if ( ! empty( $options['menu_item_background_hover_colour'] ) ) {
854
  $menu_item_background_color_hover = $options['menu_item_background_hover_colour'];
855
  }
856
 
857
+ $menu_current_item_background_color = 'inherit';
858
  if ( ! empty( $options['menu_current_item_background_colour'] ) ) {
859
  $menu_current_item_background_color = $options['menu_current_item_background_colour'];
860
  }
861
 
862
+ $menu_current_item_background_color_hover = 'inherit';
863
  if ( ! empty( $options['menu_current_item_background_hover_colour'] ) ) {
864
  $menu_current_item_background_color_hover = $options['menu_current_item_background_hover_colour'];
865
  }
949
  $menu_item_toggle_width_unit = $options['submenu_arrow_width_unit'];
950
  }
951
 
952
+ $menu_item_toggle_text_color = 'inherit';
953
  if ( ! empty( $options['menu_sub_arrow_shape_colour'] ) ) {
954
  $menu_item_toggle_text_color = $options['menu_sub_arrow_shape_colour'];
955
  }
956
 
957
+ $menu_item_toggle_text_color_hover = 'inherit';
958
  if ( ! empty( $options['menu_sub_arrow_shape_hover_colour'] ) ) {
959
  $menu_item_toggle_text_color_hover = $options['menu_sub_arrow_shape_hover_colour'];
960
  }
961
 
962
+ $menu_current_item_toggle_text_color = 'inherit';
963
  if ( ! empty( $options['menu_sub_arrow_shape_colour_active'] ) ) {
964
  $menu_current_item_toggle_text_color = $options['menu_sub_arrow_shape_colour_active'];
965
  }
966
 
967
+ $menu_current_item_toggle_text_color_hover = 'inherit';
968
  if ( ! empty( $options['menu_sub_arrow_shape_hover_colour_active'] ) ) {
969
  $menu_current_item_toggle_text_color_hover = $options['menu_sub_arrow_shape_hover_colour_active'];
970
  }
971
 
972
+ $menu_item_toggle_background_color = 'inherit';
973
  if ( ! empty( $options['menu_sub_arrow_background_colour'] ) ) {
974
  $menu_item_toggle_background_color = $options['menu_sub_arrow_background_colour'];
975
  }
976
 
977
+ $menu_item_toggle_background_color_hover = 'inherit';
978
  if ( ! empty( $options['menu_sub_arrow_background_hover_colour'] ) ) {
979
  $menu_item_toggle_background_color_hover = $options['menu_sub_arrow_background_hover_colour'];
980
  }
981
 
982
+ $menu_current_item_toggle_background_color = 'inherit';
983
  if ( ! empty( $options['menu_sub_arrow_background_colour_active'] ) ) {
984
  $menu_current_item_toggle_background_color = $options['menu_sub_arrow_background_colour_active'];
985
  }
986
 
987
+ $menu_current_item_toggle_background_color_hover = 'inherit';
988
  if ( ! empty( $options['menu_sub_arrow_background_hover_colour_active'] ) ) {
989
  $menu_current_item_toggle_background_color_hover = $options['menu_sub_arrow_background_hover_colour_active'];
990
  }
991
 
992
+ $menu_item_toggle_border_color = 'currentColor';
993
  if ( ! empty( $options['menu_sub_arrow_border_colour'] ) ) {
994
  $menu_item_toggle_border_color = $options['menu_sub_arrow_border_colour'];
995
  }
999
  $menu_item_toggle_border_color_hover = $options['menu_sub_arrow_border_hover_colour'];
1000
  }
1001
 
1002
+ $menu_current_item_toggle_border_color = 'currentColor';
1003
  if ( ! empty( $options['menu_sub_arrow_border_colour_active'] ) ) {
1004
  $menu_current_item_toggle_border_color = $options['menu_sub_arrow_border_colour_active'];
1005
  }
1016
 
1017
  $submenu_item_height_unit = '';
1018
  if ( ! empty( $options['submenu_links_height_unit'] ) ) {
1019
+ $submenu_item_height_unit = $options['submenu_links_height_unit'];
1020
  }
1021
 
1022
  $submenu_item_line_height = '';
1039
  $submenu_item_border_width_unit = $options['submenu_border_width_unit'];
1040
  }
1041
 
1042
+ $submenu_item_border_color = 'currentColor';
1043
  if ( ! empty( $options['submenu_item_border_colour'] ) ) {
1044
  $submenu_item_border_color = $options['submenu_item_border_colour'];
1045
  }
1049
  $submenu_item_border_color_hover = $options['submenu_item_border_colour_hover'];
1050
  }
1051
 
1052
+ $submenu_current_item_border_color = 'currentColor';
1053
  if ( ! empty( $options['submenu_current_item_border_colour'] ) ) {
1054
  $submenu_current_item_border_color = $options['submenu_current_item_border_colour'];
1055
  }
1079
  $submenu_item_text_alignment = $options['submenu_text_alignment'];
1080
  }
1081
 
1082
+ $submenu_item_text_color = 'inherit';
1083
  if ( ! empty( $options['submenu_link_colour'] ) ) {
1084
  $submenu_item_text_color = $options['submenu_link_colour'];
1085
  }
1086
 
1087
+ $submenu_item_text_color_hover = 'inherit';
1088
  if ( ! empty( $options['submenu_link_hover_colour'] ) ) {
1089
  $submenu_item_text_color_hover = $options['submenu_link_hover_colour'];
1090
  }
1091
 
1092
+ $submenu_current_item_text_color = 'inherit';
1093
  if ( ! empty( $options['submenu_current_link_colour'] ) ) {
1094
  $submenu_current_item_text_color = $options['submenu_current_link_colour'];
1095
  }
1096
 
1097
+ $submenu_current_item_text_color_hover = 'inherit';
1098
  if ( ! empty( $options['submenu_current_link_hover_colour'] ) ) {
1099
  $submenu_current_item_text_color_hover = $options['submenu_current_link_hover_colour'];
1100
  }
1101
 
1102
+ $submenu_item_background_color = 'inherit';
1103
  if ( ! empty( $options['submenu_item_background_colour'] ) ) {
1104
  $submenu_item_background_color = $options['submenu_item_background_colour'];
1105
  }
1106
 
1107
+ $submenu_item_background_color_hover = 'inherit';
1108
  if ( ! empty( $options['submenu_item_background_hover_colour'] ) ) {
1109
  $submenu_item_background_color_hover = $options['submenu_item_background_hover_colour'];
1110
  }
1111
 
1112
+ $submenu_current_item_background_color = 'inherit';
1113
  if ( ! empty( $options['submenu_current_item_background_colour'] ) ) {
1114
  $submenu_current_item_background_color = $options['submenu_current_item_background_colour'];
1115
  }
1116
 
1117
+ $submenu_current_item_background_color_hover = 'inherit';
1118
  if ( ! empty( $options['submenu_current_item_background_hover_colour'] ) ) {
1119
  $submenu_current_item_background_color_hover = $options['submenu_current_item_background_hover_colour'];
1120
  }
1164
  $submenu_sub_arrow_border_width_unit = $options['submenu_sub_arrow_border_width_unit'];
1165
  }
1166
 
1167
+ $submenu_item_toggle_text_color = 'inherit';
1168
  if ( ! empty( $options['submenu_sub_arrow_shape_colour'] ) ) {
1169
  $submenu_item_toggle_text_color = $options['submenu_sub_arrow_shape_colour'];
1170
  }
1171
 
1172
+ $submenu_item_toggle_text_color_hover = 'inherit';
1173
  if ( ! empty( $options['submenu_sub_arrow_shape_hover_colour'] ) ) {
1174
  $submenu_item_toggle_text_color_hover = $options['submenu_sub_arrow_shape_hover_colour'];
1175
  }
1176
 
1177
+ $submenu_current_item_toggle_text_color = 'inherit';
1178
  if ( ! empty( $options['submenu_sub_arrow_shape_colour_active'] ) ) {
1179
  $submenu_current_item_toggle_text_color = $options['submenu_sub_arrow_shape_colour_active'];
1180
  }
1181
 
1182
+ $submenu_current_item_toggle_text_color_hover = 'inherit';
1183
  if ( ! empty( $options['submenu_sub_arrow_shape_hover_colour_active'] ) ) {
1184
  $submenu_current_item_toggle_text_color_hover = $options['submenu_sub_arrow_shape_hover_colour_active'];
1185
  }
1186
 
1187
+ $submenu_item_toggle_background_color = 'inherit';
1188
  if ( ! empty( $options['submenu_sub_arrow_background_colour'] ) ) {
1189
  $submenu_item_toggle_background_color = $options['submenu_sub_arrow_background_colour'];
1190
  }
1191
 
1192
+ $submenu_item_toggle_background_color_hover = 'inherit';
1193
  if ( ! empty( $options['submenu_sub_arrow_background_hover_colour'] ) ) {
1194
  $submenu_item_toggle_background_color_hover = $options['submenu_sub_arrow_background_hover_colour'];
1195
  }
1196
 
1197
+ $submenu_current_item_toggle_background_color = 'inherit';
1198
  if ( ! empty( $options['submenu_sub_arrow_background_colour_active'] ) ) {
1199
  $submenu_current_item_toggle_background_color = $options['submenu_sub_arrow_background_colour_active'];
1200
  }
1201
 
1202
+ $submenu_current_item_toggle_background_color_hover = 'inherit';
1203
  if ( ! empty( $options['submenu_sub_arrow_background_hover_colour_active'] ) ) {
1204
  $submenu_current_item_toggle_background_color_hover = $options['submenu_sub_arrow_background_hover_colour_active'];
1205
  }
1206
 
1207
+ $submenu_item_toggle_border_color = 'currentColor';
1208
  if ( ! empty( $options['submenu_sub_arrow_border_colour'] ) ) {
1209
  $submenu_item_toggle_border_color = $options['submenu_sub_arrow_border_colour'];
1210
  }
1214
  $submenu_item_toggle_border_color_hover = $options['submenu_sub_arrow_border_hover_colour'];
1215
  }
1216
 
1217
+ $submenu_current_item_toggle_border_color = 'currentColor';
1218
  if ( ! empty( $options['submenu_sub_arrow_border_colour_active'] ) ) {
1219
  $submenu_current_item_toggle_border_color = $options['submenu_sub_arrow_border_colour_active'];
1220
  }
v4.0.0/inc/classes/class-theme-manager.php CHANGED
@@ -121,6 +121,10 @@ class Theme_Manager {
121
  public function rmp_theme_apply() {
122
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
123
 
 
 
 
 
124
  $theme_name = isset( $_POST['theme_name'] ) ? sanitize_text_field( wp_unslash( $_POST['theme_name'] ) ) : '';
125
  if ( empty( $theme_name ) ) {
126
  wp_send_json_error( array( 'message' => esc_html__( 'Theme Name Missing', 'responsive-menu' ) ) );
@@ -175,18 +179,19 @@ class Theme_Manager {
175
  $options = array();
176
  $min_version = '4.0.0';
177
 
 
 
 
 
 
 
178
  foreach ( $theme_dirs as $theme_dir ) {
179
- $config_theme_url = str_replace( RMP_PLUGIN_PATH_V4, RMP_PLUGIN_URL_V4, $theme_dir );
180
- $config_theme_url = str_replace( $theme_dir_path, $upload_theme_url, $config_theme_url );
181
- $config_file = wp_remote_get( $config_theme_url . '/config.json' );
182
- if ( is_array( $config_file ) && ! is_wp_error( $config_file ) ) {
183
- $config = json_decode( $config_file['body'], true );
184
- if ( $config['name'] === $theme_name ) {
185
- $min_version = ! empty( $config['min_rm_version'] ) ? $config['min_rm_version'] : '4.0.0';
186
- $options_file = wp_remote_get( $config_theme_url . '/options.json' );
187
- if ( is_array( $options_file ) && ! is_wp_error( $options_file ) ) {
188
- $options = json_decode( $options_file['body'], true );
189
- }
190
  break;
191
  }
192
  }
@@ -228,6 +233,10 @@ class Theme_Manager {
228
  public function rmp_theme_delete() {
229
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
230
 
 
 
 
 
231
  $theme_name = isset( $_POST['theme_name'] ) ? sanitize_text_field( wp_unslash( $_POST['theme_name'] ) ) : '';
232
  if ( empty( $theme_name ) ) {
233
  wp_send_json_error( array( 'message' => esc_html__( 'Theme Name Missing', 'responsive-menu' ) ) );
@@ -265,14 +274,16 @@ class Theme_Manager {
265
 
266
  // Themes from plugin bundle.
267
  $theme_dirs = array_merge( glob( RMP_PLUGIN_PATH_V4 . '/themes/*', GLOB_ONLYDIR ), $theme_dirs );
268
-
 
 
 
 
269
  foreach ( $theme_dirs as $theme_dir ) {
270
- $config_theme_url = str_replace( RMP_PLUGIN_PATH_V4, RMP_PLUGIN_URL_V4, $theme_dir );
271
- $config_theme_url = str_replace( $theme_dir_path, $upload_theme_url, $config_theme_url );
272
- $config_file = wp_remote_get( $config_theme_url . '/config.json' );
273
- if ( is_array( $config_file ) && ! is_wp_error( $config_file ) ) {
274
- $config = json_decode( $config_file['body'], true );
275
- if ( $config['name'] === $theme_name ) {
276
  return $theme_dir;
277
  }
278
  }
@@ -359,7 +370,7 @@ class Theme_Manager {
359
 
360
  // Check user capabilities.
361
  if ( ! current_user_can( 'manage_options' ) ) {
362
- return;
363
  }
364
 
365
  // Check if files are empty or not zip then return error message.
@@ -406,19 +417,23 @@ class Theme_Manager {
406
 
407
  // Get themes from plugin bundle.
408
  $theme_dirs = array_merge( glob( RMP_PLUGIN_PATH_V4 . '/themes/*', GLOB_ONLYDIR ), $theme_dirs );
409
-
 
 
 
 
410
  $themes = array();
411
  foreach ( $theme_dirs as $theme_dir ) {
412
- $config_theme_url = str_replace( RMP_PLUGIN_PATH_V4, RMP_PLUGIN_URL_V4, $theme_dir );
413
- $config_theme_url = str_replace( $theme_dir_path, $theme_url, $config_theme_url );
414
- $config_file = wp_remote_get( $config_theme_url . '/config.json' );
415
  $theme_preview_url = $theme_url . '/' . basename( $theme_dir ) . '/preview.png';
 
416
  // Theme preview image from plugin bundle.
417
- if ( strpos( $theme_dir, 'uploads' ) === false ) {
418
- $theme_preview_url = $config_theme_url . '/preview.png';
419
  }
420
- if ( is_array( $config_file ) && ! is_wp_error( $config_file ) ) {
421
- $config = json_decode( $config_file['body'], true );
 
422
  $themes[ basename( $theme_dir ) ]['theme_name'] = $config['name'];
423
  $themes[ basename( $theme_dir ) ]['theme_version'] = $config['version'];
424
  $themes[ basename( $theme_dir ) ]['demo_link'] = ! empty( $config['demo_link'] ) ? $config['demo_link'] : '';
@@ -477,6 +492,10 @@ class Theme_Manager {
477
  );
478
  }
479
 
 
 
 
 
480
  $options = array();
481
  $form_data = isset( $_POST['form'] ) ? rm_sanitize_rec_array( wp_unslash( $_POST['form'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
482
  wp_parse_str( $form_data, $options );
@@ -724,19 +743,23 @@ class Theme_Manager {
724
 
725
  // Get themes from plugin bundle.
726
  $theme_dirs = array_merge( glob( RMP_PLUGIN_PATH_V4 . '/themes/*', GLOB_ONLYDIR ), $theme_dirs );
727
-
 
 
 
 
728
  foreach ( $theme_dirs as $theme_dir ) {
729
- $config_theme_url = str_replace( RMP_PLUGIN_PATH_V4, RMP_PLUGIN_URL_V4, $theme_dir );
730
- $config_theme_url = str_replace( $theme_dir_path, $theme_url, $config_theme_url );
731
- $config_file = wp_remote_get( $config_theme_url . '/config.json' );
732
  $theme_preview_url = $theme_url . '/' . basename( $theme_dir ) . '/preview.png';
 
733
  // Theme preview image from plugin bundle.
734
- if ( strpos( $theme_dir, 'uploads' ) === false ) {
735
- $theme_preview_url = $config_theme_url . '/preview.png';
736
  }
737
- if ( is_array( $config_file ) && ! is_wp_error( $config_file ) ) {
738
- $config = json_decode( $config_file['body'], true );
739
- if ( $config['name'] === $theme_name ) {
 
740
  return $theme_preview_url;
741
  }
742
  }
@@ -794,14 +817,19 @@ class Theme_Manager {
794
  // Get themes from plugin bundle.
795
  $theme_dirs = array_merge( glob( RMP_PLUGIN_PATH_V4 . '/themes/*', GLOB_ONLYDIR ), $theme_dirs );
796
 
 
 
 
 
 
 
797
  foreach ( $theme_dirs as $theme_dir ) {
798
 
799
- $config_theme_url = str_replace( RMP_PLUGIN_PATH_V4, RMP_PLUGIN_URL_V4, $theme_dir );
800
- $config_theme_url = str_replace( $theme_dir_path, $theme_url, $config_theme_url );
801
- $config_file = wp_remote_get( $config_theme_url . '/config.json' );
802
- if ( is_array( $config_file ) && ! is_wp_error( $config_file ) ) {
803
- $config = json_decode( $config_file['body'], true );
804
- if ( $config['name'] === $theme_name && ! empty( $config['index'] ) ) {
805
  return $theme_dir . '/' . $config['index'];
806
  }
807
  }
@@ -1079,6 +1107,10 @@ class Theme_Manager {
1079
  // Check nonce to verify the authenticate upload file.
1080
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
1081
 
 
 
 
 
1082
  // Check if files are empty or not zip then return error message.
1083
  $file_name = isset( $_FILES['file']['name'] ) ? sanitize_file_name( wp_unslash( $_FILES['file']['name'] ) ) : '';
1084
  $validate_file = wp_check_filetype( $file_name );
121
  public function rmp_theme_apply() {
122
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
123
 
124
+ if ( ! current_user_can( 'administrator' ) ) {
125
+ wp_send_json_error( array( 'message' => __( 'You can not apply themes !', 'responsive-menu' ) ) );
126
+ }
127
+
128
  $theme_name = isset( $_POST['theme_name'] ) ? sanitize_text_field( wp_unslash( $_POST['theme_name'] ) ) : '';
129
  if ( empty( $theme_name ) ) {
130
  wp_send_json_error( array( 'message' => esc_html__( 'Theme Name Missing', 'responsive-menu' ) ) );
179
  $options = array();
180
  $min_version = '4.0.0';
181
 
182
+ global $wp_filesystem;
183
+ if ( empty( $wp_filesystem ) ) {
184
+ require_once ABSPATH . 'wp-admin/includes/file.php';
185
+ }
186
+ WP_Filesystem();
187
+
188
  foreach ( $theme_dirs as $theme_dir ) {
189
+ $config_file = $theme_dir . '/config.json';
190
+ if ( file_exists( $config_file ) ) {
191
+ $config = json_decode( $wp_filesystem->get_contents( $config_file ), true );
192
+ if ( $config['name'] == $theme_name ) {
193
+ $min_version = ! empty( $config['min_rm_version'] ) ? $config['min_rm_version'] : '4.0.0';
194
+ $options = json_decode( $wp_filesystem->get_contents( $theme_dir . '/options.json' ), true );
 
 
 
 
 
195
  break;
196
  }
197
  }
233
  public function rmp_theme_delete() {
234
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
235
 
236
+ if ( ! current_user_can( 'administrator' ) ) {
237
+ wp_send_json_error( array( 'message' => __( 'You can not delete themes !', 'responsive-menu' ) ) );
238
+ }
239
+
240
  $theme_name = isset( $_POST['theme_name'] ) ? sanitize_text_field( wp_unslash( $_POST['theme_name'] ) ) : '';
241
  if ( empty( $theme_name ) ) {
242
  wp_send_json_error( array( 'message' => esc_html__( 'Theme Name Missing', 'responsive-menu' ) ) );
274
 
275
  // Themes from plugin bundle.
276
  $theme_dirs = array_merge( glob( RMP_PLUGIN_PATH_V4 . '/themes/*', GLOB_ONLYDIR ), $theme_dirs );
277
+ global $wp_filesystem;
278
+ if ( empty( $wp_filesystem ) ) {
279
+ require_once ABSPATH . 'wp-admin/includes/file.php';
280
+ }
281
+ WP_Filesystem();
282
  foreach ( $theme_dirs as $theme_dir ) {
283
+ $config_file = $theme_dir . '/config.json';
284
+ if ( file_exists( $config_file ) ) {
285
+ $config = json_decode( $wp_filesystem->get_contents( $config_file ), true );
286
+ if ( $config['name'] == $theme_name ) {
 
 
287
  return $theme_dir;
288
  }
289
  }
370
 
371
  // Check user capabilities.
372
  if ( ! current_user_can( 'manage_options' ) ) {
373
+ wp_send_json_error( array( 'message' => __( 'You can not upload themes !', 'responsive-menu' ) ) );
374
  }
375
 
376
  // Check if files are empty or not zip then return error message.
417
 
418
  // Get themes from plugin bundle.
419
  $theme_dirs = array_merge( glob( RMP_PLUGIN_PATH_V4 . '/themes/*', GLOB_ONLYDIR ), $theme_dirs );
420
+ global $wp_filesystem;
421
+ if ( empty( $wp_filesystem ) ) {
422
+ require_once ABSPATH . 'wp-admin/includes/file.php';
423
+ }
424
+ WP_Filesystem();
425
  $themes = array();
426
  foreach ( $theme_dirs as $theme_dir ) {
427
+ $config_file = $theme_dir . '/config.json';
 
 
428
  $theme_preview_url = $theme_url . '/' . basename( $theme_dir ) . '/preview.png';
429
+
430
  // Theme preview image from plugin bundle.
431
+ if ( ! strpos( $theme_dir, 'uploads' ) ) {
432
+ $theme_preview_url = plugin_dir_url( $config_file ) . '/preview.png';
433
  }
434
+
435
+ if ( file_exists( $config_file ) ) {
436
+ $config = json_decode( $wp_filesystem->get_contents( $config_file ), true );
437
  $themes[ basename( $theme_dir ) ]['theme_name'] = $config['name'];
438
  $themes[ basename( $theme_dir ) ]['theme_version'] = $config['version'];
439
  $themes[ basename( $theme_dir ) ]['demo_link'] = ! empty( $config['demo_link'] ) ? $config['demo_link'] : '';
492
  );
493
  }
494
 
495
+ if ( ! current_user_can( 'edit_post', $menu_id ) ) {
496
+ wp_send_json_error( array( 'message' => __( 'You can not edit menu !', 'responsive-menu' ) ) );
497
+ }
498
+
499
  $options = array();
500
  $form_data = isset( $_POST['form'] ) ? rm_sanitize_rec_array( wp_unslash( $_POST['form'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
501
  wp_parse_str( $form_data, $options );
743
 
744
  // Get themes from plugin bundle.
745
  $theme_dirs = array_merge( glob( RMP_PLUGIN_PATH_V4 . '/themes/*', GLOB_ONLYDIR ), $theme_dirs );
746
+ global $wp_filesystem;
747
+ if ( empty( $wp_filesystem ) ) {
748
+ require_once ABSPATH . 'wp-admin/includes/file.php';
749
+ }
750
+ WP_Filesystem();
751
  foreach ( $theme_dirs as $theme_dir ) {
752
+ $config_file = $theme_dir . '/config.json';
 
 
753
  $theme_preview_url = $theme_url . '/' . basename( $theme_dir ) . '/preview.png';
754
+
755
  // Theme preview image from plugin bundle.
756
+ if ( ! strpos( $theme_dir, 'uploads' ) ) {
757
+ $theme_preview_url = plugin_dir_url( $config_file ) . '/preview.png';
758
  }
759
+
760
+ if ( file_exists( $config_file ) ) {
761
+ $config = json_decode( $wp_filesystem->get_contents( $config_file ), true );
762
+ if ( $config['name'] == $theme_name ) {
763
  return $theme_preview_url;
764
  }
765
  }
817
  // Get themes from plugin bundle.
818
  $theme_dirs = array_merge( glob( RMP_PLUGIN_PATH_V4 . '/themes/*', GLOB_ONLYDIR ), $theme_dirs );
819
 
820
+ global $wp_filesystem;
821
+ if ( empty( $wp_filesystem ) ) {
822
+ require_once ABSPATH . 'wp-admin/includes/file.php';
823
+ }
824
+ WP_Filesystem();
825
+
826
  foreach ( $theme_dirs as $theme_dir ) {
827
 
828
+ $config_file = $theme_dir . '/config.json';
829
+
830
+ if ( file_exists( $config_file ) ) {
831
+ $config = json_decode( $wp_filesystem->get_contents( $config_file ), true );
832
+ if ( $config['name'] == $theme_name && ! empty( $config['index'] ) ) {
 
833
  return $theme_dir . '/' . $config['index'];
834
  }
835
  }
1107
  // Check nonce to verify the authenticate upload file.
1108
  check_ajax_referer( 'rmp_nonce', 'ajax_nonce' );
1109
 
1110
+ if ( ! current_user_can( 'administrator' ) ) {
1111
+ wp_send_json_error( array( 'message' => __( 'You can not upload themes !', 'responsive-menu' ) ) );
1112
+ }
1113
+
1114
  // Check if files are empty or not zip then return error message.
1115
  $file_name = isset( $_FILES['file']['name'] ) ? sanitize_file_name( wp_unslash( $_FILES['file']['name'] ) ) : '';
1116
  $validate_file = wp_check_filetype( $file_name );