{"version":3,"sources":["public.min.js"],"names":[],"mappings":"AAAA","file":"public.min.js","sourcesContent":["\"use strict\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\n(function ($) {\n window.DSSuit = {};\n window.DSSuit.fix_et_db_et_boc_body_css = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var $style, fixedText;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n try {\n $style = $(\"#et-builder-module-design-cached-inline-styles\");\n fixedText = $style.text().replace(/\\.et-db #et-boc body/g, \"body\");\n $style.text(fixedText);\n } catch (error) {\n console.log(\"Battle Suit for Divi failed to fix the broken css\", error);\n }\n\n case 1:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n\n window.DSSuit.dss_lightbox_on_blurb = function (selector) {\n if (typeof $.magnificPopup === \"undefined\") {\n // console.log(\"MagnificPopup has not yet loaded. Re-trying in 300ms\");\n setTimeout(function () {\n window.DSSuit.dss_lightbox_on_blurb(selector);\n }, 500);\n return;\n }\n\n try {\n var $module = $(selector.split(\" \").join(\".\"));\n var $image = $module.find(\".et_pb_image_wrap img\");\n var url = $image.attr(\"src\");\n $image.magnificPopup({\n type: 'image',\n items: {\n src: url\n }\n });\n } catch (error) {\n console.log(\"Error while setting up lightbox on blurb\", error);\n }\n };\n\n $.fn.dss_hover_link_double_tap = function (params) {\n if (!('ontouchstart' in window) && !navigator.msMaxTouchPoints && !navigator.userAgent.toLowerCase().match(/windows phone os 7/i)) return false;\n this.each(function () {\n var curItem = false;\n $(this).on('click', function (e) {\n var item = $(this);\n\n if (item[0] != curItem[0]) {\n e.preventDefault();\n curItem = item;\n }\n });\n $(document).on('click touchstart MSPointerDown', function (e) {\n var resetItem = true,\n parents = $(e.target).parents();\n\n if ($(e.target)[0] == curItem[0]) {\n return;\n }\n\n for (var i = 0; i < parents.length; i++) {\n if (parents[i] == curItem[0]) {\n resetItem = false;\n }\n }\n\n if (resetItem) curItem = false;\n });\n });\n return this;\n };\n\n $.fn.dss_masonry_gallery = function (params) {\n var $this = $(this);\n\n if (typeof $.magnificPopup === \"undefined\") {\n setTimeout(function () {\n $this.dss_masonry_gallery(params);\n }, 300);\n return;\n }\n\n var masonry = $this.masonry({\n itemSelector: '.grid-item',\n columnWidth: '.grid-sizer',\n gutter: '.gutter-sizer',\n percentPosition: true\n });\n $this.find('.grid-item a').magnificPopup({\n type: 'image',\n removalDelay: 500,\n gallery: {\n enabled: true,\n navigateByImgClick: true,\n tCounter: '%curr% / %total%'\n },\n mainClass: 'mfp-fade',\n zoom: {\n enabled: true,\n duration: 500,\n opener: function opener(element) {\n return element.find('img');\n }\n },\n autoFocusLast: false,\n image: {\n verticalFit: true,\n titleSrc: function titleSrc(item) {\n var title = \"\";\n\n if (item.el.attr('data-title')) {\n title += item.el.attr('data-title');\n }\n\n if (item.el.attr('data-caption')) {\n title += \"\" + item.el.attr('data-caption') + \"\";\n }\n\n return title;\n }\n }\n });\n var layout = $.debounce(250, function () {\n masonry.masonry('layout');\n });\n\n if ($this.attr(\"data-lazy\") === \"true\") {\n var observer = new MutationObserver(layout);\n var config = {\n attributes: true,\n childList: true,\n subtree: true\n };\n observer.observe($this[0], config);\n }\n\n masonry.imagesLoaded().progress(layout);\n return masonry.masonry('layout');\n };\n\n $(document).ready(function () {\n $(\".dss_bucket .dss_bucket_link\").dss_hover_link_double_tap();\n $(\".dss_masonry_gallery\").each(function () {\n $(\".\" + $(this).attr(\"class\").replace(/ /g, \".\") + \" .grid\").dss_masonry_gallery();\n });\n window.DSSuit.fix_et_db_et_boc_body_css();\n });\n})(jQuery);"]}