{"version":3,"file":"main-fb242aca.js","sources":["../assets/js/superfish.js","../assets/js/component.js","../assets/js/header.js","../../node_modules/plyr/dist/plyr.min.mjs","../assets/js/general-ajax.js","../assets/js/woocommerce.js","../assets/js/archive-append.js","../assets/js/authentication.js","../assets/utilities/main.js"],"sourcesContent":["/*\n * jQuery Superfish Menu Plugin - v1.7.10\n * Copyright (c) 2018 Joel Birch\n *\n * Dual licensed under the MIT and GPL licenses:\n *\thttp://www.opensource.org/licenses/mit-license.php\n *\thttp://www.gnu.org/licenses/gpl.html\n */\n\n ;(function ($, w) {\n\t\"use strict\";\n\n\tvar methods = (function () {\n\t\t// private properties and methods go here\n\t\tvar c = {\n\t\t\t\tbcClass: 'sf-breadcrumb',\n\t\t\t\tmenuClass: 'sf-js-enabled',\n\t\t\t\tanchorClass: 'sf-with-ul',\n\t\t\t\tmenuArrowClass: 'sf-arrows'\n\t\t\t},\n\t\t\tios = (function () {\n\t\t\t\tvar ios = /^(?![\\w\\W]*Windows Phone)[\\w\\W]*(iPhone|iPad|iPod)/i.test(navigator.userAgent);\n\t\t\t\tif (ios) {\n\t\t\t\t\t// tap anywhere on iOS to unfocus a submenu\n\t\t\t\t\t$('html').css('cursor', 'pointer').on('click', $.noop);\n\t\t\t\t}\n\t\t\t\treturn ios;\n\t\t\t})(),\n\t\t\twp7 = (function () {\n\t\t\t\tvar style = document.documentElement.style;\n\t\t\t\treturn ('behavior' in style && 'fill' in style && /iemobile/i.test(navigator.userAgent));\n\t\t\t})(),\n\t\t\tunprefixedPointerEvents = (function () {\n\t\t\t\treturn (!!w.PointerEvent);\n\t\t\t})(),\n\t\t\ttoggleMenuClasses = function ($menu, o, add) {\n\t\t\t\tvar classes = c.menuClass,\n\t\t\t\t\tmethod;\n\t\t\t\tif (o.cssArrows) {\n\t\t\t\t\tclasses += ' ' + c.menuArrowClass;\n\t\t\t\t}\n\t\t\t\tmethod = (add) ? 'addClass' : 'removeClass';\n\t\t\t\t$menu[method](classes);\n\t\t\t},\n\t\t\tsetPathToCurrent = function ($menu, o) {\n\t\t\t\treturn $menu.find('li.' + o.pathClass).slice(0, o.pathLevels)\n\t\t\t\t\t.addClass(o.hoverClass + ' ' + c.bcClass)\n\t\t\t\t\t\t.filter(function () {\n\t\t\t\t\t\t\treturn ($(this).children(o.popUpSelector).hide().show().length);\n\t\t\t\t\t\t}).removeClass(o.pathClass);\n\t\t\t},\n\t\t\ttoggleAnchorClass = function ($li, add) {\n\t\t\t\tvar method = (add) ? 'addClass' : 'removeClass';\n\t\t\t\t$li.children('a')[method](c.anchorClass);\n\t\t\t},\n\t\t\ttoggleTouchAction = function ($menu) {\n\t\t\t\tvar msTouchAction = $menu.css('ms-touch-action');\n\t\t\t\tvar touchAction = $menu.css('touch-action');\n\t\t\t\ttouchAction = touchAction || msTouchAction;\n\t\t\t\ttouchAction = (touchAction === 'pan-y') ? 'auto' : 'pan-y';\n\t\t\t\t$menu.css({\n\t\t\t\t\t'ms-touch-action': touchAction,\n\t\t\t\t\t'touch-action': touchAction\n\t\t\t\t});\n\t\t\t},\n\t\t\tgetMenu = function ($el) {\n\t\t\t\treturn $el.closest('.' + c.menuClass);\n\t\t\t},\n\t\t\tgetOptions = function ($el) {\n\t\t\t\treturn getMenu($el).data('sfOptions');\n\t\t\t},\n\t\t\tover = function () {\n\t\t\t\tvar $this = $(this),\n\t\t\t\t\to = getOptions($this);\n\t\t\t\tclearTimeout(o.sfTimer);\n\t\t\t\t$this.siblings().superfish('hide').end().superfish('show');\n\t\t\t},\n\t\t\tclose = function (o) {\n\t\t\t\to.retainPath = ($.inArray(this[0], o.$path) > -1);\n\t\t\t\tthis.superfish('hide');\n\n\t\t\t\tif (!this.parents('.' + o.hoverClass).length) {\n\t\t\t\t\to.onIdle.call(getMenu(this));\n\t\t\t\t\tif (o.$path.length) {\n\t\t\t\t\t\t$.proxy(over, o.$path)();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tout = function () {\n\t\t\t\tvar $this = $(this),\n\t\t\t\t\to = getOptions($this);\n\t\t\t\tif (ios) {\n\t\t\t\t\t$.proxy(close, $this, o)();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tclearTimeout(o.sfTimer);\n\t\t\t\t\to.sfTimer = setTimeout($.proxy(close, $this, o), o.delay);\n\t\t\t\t}\n\t\t\t},\n\t\t\ttouchHandler = function (e) {\n\t\t\t\tvar $this = $(this),\n\t\t\t\t\to = getOptions($this),\n\t\t\t\t\t$ul = $this.siblings(e.data.popUpSelector);\n\n\t\t\t\tif (o.onHandleTouch.call($ul) === false) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t\tif ($ul.length > 0 && $ul.is(':hidden')) {\n\t\t\t\t\t$this.one('click.superfish', false);\n\t\t\t\t\tif (e.type === 'MSPointerDown' || e.type === 'pointerdown') {\n\t\t\t\t\t\t$this.trigger('focus');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$.proxy(over, $this.parent('li'))();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tapplyHandlers = function ($menu, o) {\n\t\t\t\tvar targets = 'li:has(' + o.popUpSelector + ')';\n\t\t\t\tif ($.fn.hoverIntent && !o.disableHI) {\n\t\t\t\t\t$menu.hoverIntent(over, out, targets);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$menu\n\t\t\t\t\t\t.on('mouseenter.superfish', targets, over)\n\t\t\t\t\t\t.on('mouseleave.superfish', targets, out);\n\t\t\t\t}\n\t\t\t\tvar touchevent = 'MSPointerDown.superfish';\n\t\t\t\tif (unprefixedPointerEvents) {\n\t\t\t\t\ttouchevent = 'pointerdown.superfish';\n\t\t\t\t}\n\t\t\t\tif (!ios) {\n\t\t\t\t\ttouchevent += ' touchend.superfish';\n\t\t\t\t}\n\t\t\t\tif (wp7) {\n\t\t\t\t\ttouchevent += ' mousedown.superfish';\n\t\t\t\t}\n\t\t\t\t$menu\n\t\t\t\t\t.on('focusin.superfish', 'li', over)\n\t\t\t\t\t.on('focusout.superfish', 'li', out)\n\t\t\t\t\t.on(touchevent, 'a', o, touchHandler);\n\t\t\t};\n\n\t\treturn {\n\t\t\t// public methods\n\t\t\thide: function (instant) {\n\t\t\t\tif (this.length) {\n\t\t\t\t\tvar $this = this,\n\t\t\t\t\t\to = getOptions($this);\n\t\t\t\t\tif (!o) {\n\t\t\t\t\t\treturn this;\n\t\t\t\t\t}\n\t\t\t\t\tvar not = (o.retainPath === true) ? o.$path : '',\n\t\t\t\t\t\t$ul = $this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector),\n\t\t\t\t\t\tspeed = o.speedOut;\n\n\t\t\t\t\tif (instant) {\n\t\t\t\t\t\t$ul.show();\n\t\t\t\t\t\tspeed = 0;\n\t\t\t\t\t}\n\t\t\t\t\to.retainPath = false;\n\n\t\t\t\t\tif (o.onBeforeHide.call($ul) === false) {\n\t\t\t\t\t\treturn this;\n\t\t\t\t\t}\n\n\t\t\t\t\t$ul.stop(true, true).animate(o.animationOut, speed, function () {\n\t\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\t\to.onHide.call($this);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tshow: function () {\n\t\t\t\tvar o = getOptions(this);\n\t\t\t\tif (!o) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tvar $this = this.addClass(o.hoverClass),\n\t\t\t\t\t$ul = $this.children(o.popUpSelector);\n\n\t\t\t\tif (o.onBeforeShow.call($ul) === false) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t\t$ul.stop(true, true).animate(o.animation, o.speed, function () {\n\t\t\t\t\to.onShow.call($ul);\n\t\t\t\t});\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdestroy: function () {\n\t\t\t\treturn this.each(function () {\n\t\t\t\t\tvar $this = $(this),\n\t\t\t\t\t\to = $this.data('sfOptions'),\n\t\t\t\t\t\t$hasPopUp;\n\t\t\t\t\tif (!o) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$hasPopUp = $this.find(o.popUpSelector).parent('li');\n\t\t\t\t\tclearTimeout(o.sfTimer);\n\t\t\t\t\ttoggleMenuClasses($this, o);\n\t\t\t\t\ttoggleAnchorClass($hasPopUp);\n\t\t\t\t\ttoggleTouchAction($this);\n\t\t\t\t\t// remove event handlers\n\t\t\t\t\t$this.off('.superfish').off('.hoverIntent');\n\t\t\t\t\t// clear animation's inline display style\n\t\t\t\t\t$hasPopUp.children(o.popUpSelector).attr('style', function (i, style) {\n\t\t\t\t\t\tif (typeof style !== 'undefined') {\n\t\t\t\t\t\t\treturn style.replace(/display[^;]+;?/g, '');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t// reset 'current' path classes\n\t\t\t\t\to.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass);\n\t\t\t\t\t$this.find('.' + o.hoverClass).removeClass(o.hoverClass);\n\t\t\t\t\to.onDestroy.call($this);\n\t\t\t\t\t$this.removeData('sfOptions');\n\t\t\t\t});\n\t\t\t},\n\t\t\tinit: function (op) {\n\t\t\t\treturn this.each(function () {\n\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\tif ($this.data('sfOptions')) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tvar o = $.extend({}, $.fn.superfish.defaults, op),\n\t\t\t\t\t\t$hasPopUp = $this.find(o.popUpSelector).parent('li');\n\t\t\t\t\to.$path = setPathToCurrent($this, o);\n\n\t\t\t\t\t$this.data('sfOptions', o);\n\n\t\t\t\t\ttoggleMenuClasses($this, o, true);\n\t\t\t\t\ttoggleAnchorClass($hasPopUp, true);\n\t\t\t\t\ttoggleTouchAction($this);\n\t\t\t\t\tapplyHandlers($this, o);\n\n\t\t\t\t\t$hasPopUp.not('.' + c.bcClass).superfish('hide', true);\n\n\t\t\t\t\to.onInit.call(this);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t})();\n\n\t$.fn.superfish = function (method, args) {\n\t\tif (methods[method]) {\n\t\t\treturn methods[method].apply(this, Array.prototype.slice.call(arguments, 1));\n\t\t}\n\t\telse if (typeof method === 'object' || ! method) {\n\t\t\treturn methods.init.apply(this, arguments);\n\t\t}\n\t\telse {\n\t\t\treturn $.error('Method ' + method + ' does not exist on jQuery.fn.superfish');\n\t\t}\n\t};\n\n\t$.fn.superfish.defaults = {\n\t\tpopUpSelector: 'ul,.sf-mega', // within menu context\n\t\thoverClass: 'sfHover',\n\t\tpathClass: 'overrideThisToUse',\n\t\tpathLevels: 1,\n\t\tdelay: 800,\n\t\tanimation: {opacity: 'show'},\n\t\tanimationOut: {opacity: 'hide'},\n\t\tspeed: 'normal',\n\t\tspeedOut: 'fast',\n\t\tcssArrows: true,\n\t\tdisableHI: false,\n\t\tonInit: $.noop,\n\t\tonBeforeShow: $.noop,\n\t\tonShow: $.noop,\n\t\tonBeforeHide: $.noop,\n\t\tonHide: $.noop,\n\t\tonIdle: $.noop,\n\t\tonDestroy: $.noop,\n\t\tonHandleTouch: $.noop\n\t};\n\n})(jQuery, window);\n","import './superfish.js';\nimport bootstrapcomponent from './bootstrap-component.js';\n\n\nexport default class component {\n constructor() {\n this.slider = jQuery('.custom-tab-slider');\n this.leftArrow = jQuery('.left');\n this.rightArrow = jQuery('.right');\n this.scrollAmount = 200; // Adjust scroll distance as needed\n this.menuSelector = 'ul.sf-menu';\n\n const bootstrap = new bootstrapcomponent();\n bootstrap.tooltip();\n\n this.HeaderHeight();\n this.MenuLayout();\n this.event_Handler();\n this.HeaderScroll();\n this.ReadMore();\n this.SearchHideOptions();\n this.NavTabHandler();\n this.loader();\n }\n\n\n event_Handler() {\n jQuery(document.body).on(\"click\", \"#back-to-top\", this.BacktoTop.bind(this));\n\n jQuery(window).scroll(() => {\n this.scrollAdditional();\n });\n\n jQuery(document.body).on(\"click\", '.copy-url-btn', this.CopyUrl.bind(this));\n\n jQuery(document.body).on(\"click\", 'button.plus, button.minus', this.ShopQuantity.bind(this));\n\n // Add /Edit comment offcanvas\n jQuery(document.body).on(\"click\", \"#openReviewButton\", this.ReviewOffCanvas.bind(this));\n\n jQuery(window).resize(() => {\n this.HeaderHeight();\n });\n\n jQuery(document.body).on(\"click\", \"#edit-profile-picture-btn\", this.EditProfilePicture.bind(this));\n\n jQuery(document.body).on('woosq_loaded woosq_close', this.QuickViewSection.bind(this));\n\n\n }\n\n\n /**\n * Handles the profile picture edit functionality.\n * \n * @param {Event} event - The event object triggered when the edit profile button is clicked.\n * \n * This function prevents the default button action, triggers the file input \n * click event, and sets up an event listener to preview the selected image \n * file once it's selected. It ensures the selected file is an image and \n * displays the preview accordingly.\n */\n EditProfilePicture(event) {\n // Prevents the default button click behavior (e.g., form submission)\n event.preventDefault();\n\n // Trigger the click event of the hidden file input element when the edit button is clicked\n jQuery('#upload-profile-picture').click();\n\n // Listen for the file input change event when the user selects a file\n jQuery('#upload-profile-picture').on('change', (e) => {\n // Get the selected file from the file input\n var file = e.target.files[0];\n\n // Check if the selected file exists and is an image\n if (file && file.type.startsWith('image/')) {\n // Create a FileReader instance to read the image file\n var reader = new FileReader();\n\n // Once the image is successfully loaded, update the preview image source\n reader.onload = (e) => {\n jQuery('#profile-picture-preview').attr('src', e.target.result);\n };\n\n // Read the image file as a base64 data URL for preview\n reader.readAsDataURL(file);\n } else {\n // If the selected file is not an image, clear the preview\n jQuery('#profile-picture-preview').attr('src', '');\n }\n });\n }\n\n\n /**\n * Handles the update of the product quantity when the plus or minus button is clicked.\n * \n * @param {Event} event - The event object triggered by clicking the plus or minus button.\n * \n * This function retrieves the current quantity value, checks the boundaries (min/max), \n * and adjusts the quantity based on the button clicked (plus or minus). It also \n * ensures that the \"update cart\" button is enabled after any change.\n */\n ShopQuantity(event) {\n // Get the clicked button element\n const button = jQuery(event.target).closest('button');\n\n // Find the quantity input field associated with the button\n const qty = button.closest('.quantity').find('.qty');\n\n // Enable the \"update cart\" button when a quantity change occurs\n jQuery('button[name=\"update_cart\"]').removeAttr('disabled');\n\n // Get the current quantity value (default to 0 if not valid)\n let val = parseFloat(qty.val()) || 0;\n\n // Get the maximum, minimum, and step values from the input attributes\n const max = parseFloat(qty.attr('max')) || Infinity;\n const min = parseFloat(qty.attr('min')) || 0;\n const step = parseFloat(qty.attr('step')) || 1;\n\n // Handle the \"plus\" button click (increase quantity)\n if (button.hasClass('plus')) {\n // Increase the quantity, ensuring it doesn't exceed the max limit\n qty.val(val < max ? val + step : max);\n }\n // Handle the \"minus\" button click (decrease quantity)\n else if (button.hasClass('minus')) {\n // Decrease the quantity, ensuring it doesn't go below the min limit\n qty.val(val > min ? val - step : min);\n }\n }\n\n\n /**\n * Copies the URL from the input field to the clipboard.\n * \n * @param {Event} event - The event object triggered when the copy button is clicked.\n * \n * This function prevents the default button action, selects the URL in the input field, \n * and copies it to the clipboard using the `document.execCommand('copy')` method.\n */\n CopyUrl(event) {\n // Prevents the default button action (e.g., form submission or navigation)\n event.preventDefault();\n\n // Select the content of the input field with the class \"copy-post-url\"\n jQuery('.copy-post-url').select();\n\n // Execute the 'copy' command to copy the selected text to the clipboard\n try {\n // Modern browsers support `document.execCommand()` for copying content\n const successful = document.execCommand('copy');\n\n // Optionally, provide feedback to the user (you can use an alert or a UI update)\n if (successful) {\n console.log('URL copied to clipboard');\n } else {\n console.log('Failed to copy URL');\n }\n } catch (err) {\n // Handle errors (for example, in cases where `document.execCommand()` is not supported)\n console.error('Unable to copy URL: ', err);\n }\n }\n\n\n /**\n * Manages the layout and behavior of the menu, adapting for responsive/mobile views\n * and enabling appropriate functionality for hover or touch events.\n */\n MenuLayout() {\n var $menu = jQuery(this.menuSelector);\n\n // Check if the screen is in a responsive (mobile) view\n if (this.isResponsiveView()) {\n\n // Destroy hover events to avoid issues on mobile (but keep Superfish for animation)\n this.removeHoverEvents();\n\n // Optionally, add touch event to simulate hover-like functionality on mobile\n this.addTouchEventForMobile();\n\n } else {\n // Enable Superfish for larger screens with animation and auto arrows\n $menu.superfish({\n delay: 500, // Delay before submenus open/close\n animation: { opacity: 'show', height: 'show' }, // Simple fade and slide animation\n speed: 'fast', // Animation speed\n cssArrows: true, // Use CSS arrows for submenu items\n autoArrows: true, // Automatically adds arrows for parent menu items\n });\n }\n }\n\n /**\n * Function to check if the screen width is mobile (responsive view).\n * \n * @returns {boolean} True if the screen is mobile (<= 768px), false otherwise.\n */\n isResponsiveView() {\n return window.innerWidth <= 768; // Adjust the threshold as needed\n }\n\n /**\n * Removes hover events on the menu for mobile views to prevent unwanted interactions.\n */\n removeHoverEvents() {\n var $menu = jQuery(this.menuSelector);\n\n // Remove hover events from all