This commit is contained in:
apuc committed 2024-05-20 15:37:46 +03:00
commit 00b7dbd0b7
10404 files changed
+3285853

No files matched your search

@@ -0,0 +1,13 @@
/**
* Elementor Preview Styles
*/
.visual-portfolio-elementor-preview {
position: relative;
overflow: hidden;
pointer-events: none;
iframe {
max-width: none;
min-height: 20px;
}
}
File diff suppressed because it is too large. Load diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

@@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15">
<defs>
<style>
.cls-1 {
fill: #bbbbbb;
}
</style>
</defs>
<rect id="BR" class="cls-1" y="6" width="7" height="9"/>
<rect id="BL" class="cls-1" x="8" y="10" width="7" height="5"/>
<rect id="TR" class="cls-1" width="7" height="5"/>
<rect id="TL" class="cls-1" x="8" width="7" height="9"/>
</svg>

After

Width:  |  Height:  |  Size: 454 B

@@ -0,0 +1,11 @@
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="100" height="100" rx="50" fill="currentColor"/>
<path d="M57.5311 69.5L70.2439 33H58.4473L47 69.5H57.5311Z" fill="url(#paint0_linear)"/>
<path d="M42.7128 69.5L30 33H41.7966L53.2439 69.5H42.7128Z" fill="white"/>
<defs>
<linearGradient id="paint0_linear" x1="64.5" y1="33" x2="33" y2="77" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="white" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 548 B

@@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15">
<defs>
<style>
.cls-1 {
fill: #555d66;
}
</style>
</defs>
<rect id="BR" class="cls-1" y="6" width="7" height="9"/>
<rect id="BL" class="cls-1" x="8" y="10" width="7" height="5"/>
<rect id="TR" class="cls-1" width="7" height="5"/>
<rect id="TL" class="cls-1" x="8" width="7" height="9"/>
</svg>

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@@ -0,0 +1,11 @@
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="100" height="100" rx="50" fill="white"/>
<path d="M57.5311 69.5L70.2439 33H58.4473L47 69.5H57.5311Z" fill="url(#paint0_linear)"/>
<path d="M42.7128 69.5L30 33H41.7966L53.2439 69.5H42.7128Z" fill="black"/>
<defs>
<linearGradient id="paint0_linear" x1="64.5" y1="33" x2="33" y2="77" gradientUnits="userSpaceOnUse">
<stop/>
<stop offset="1" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

@@ -0,0 +1,52 @@
import $ from 'jquery';
const { ajaxurl, VPAdminVariables } = window;
// multiple select with AJAX search
$('select[name="vp_general[portfolio_archive_page]"]').select2({
ajax: {
url: ajaxurl, // AJAX URL is predefined in WordPress admin
dataType: 'json',
delay: 250, // delay in ms while typing when to perform a AJAX search
data(params) {
return {
q: params.term, // search query
selected: this[0].value,
nonce: VPAdminVariables.nonce,
action: 'vp_get_pages_list', // AJAX action for admin-ajax.php
};
},
processResults(ajaxData) {
const options = [];
const data = this.$element.select2('data');
let alreadyAddedID = false;
// add selected value.
if (data && data[0] && data[0].selected) {
alreadyAddedID = Number(data[0].id);
options.push({
id: alreadyAddedID,
text: data[0].text,
});
}
// parse new options.
if (ajaxData) {
// ajaxData is the array of arrays, and each of them contains ID and the Label of the option
$.each(ajaxData, (index, itemData) => {
if (!alreadyAddedID || alreadyAddedID !== itemData[0]) {
options.push({
id: itemData[0],
text: itemData[1],
});
}
});
}
return {
results: options,
};
},
cache: true,
},
});
@@ -0,0 +1,24 @@
import $ from 'jquery';
const { ajaxurl, VPAskReviewNotice } = window;
const $body = $('body');
$body.on('click', '.vpf-review-plugin-notice-dismiss', function (e) {
const $this = $(this);
const type = $this.attr('data-vpf-review-action');
// Don't prevent click on Yes link, as it is URL for rate.
if (type !== 'yes') {
e.preventDefault();
}
// Hide notice.
$this.closest('.notice').slideUp('slow');
// Save user answer in DB.
$.post(ajaxurl, {
action: 'vpf_dismiss_ask_review_notice',
type,
nonce: VPAskReviewNotice.nonce,
});
});
@@ -0,0 +1,84 @@
import $ from 'jquery';
import rafSchd from 'raf-schd';
import { throttle } from 'throttle-debounce';
const { elementorFrontend, VPAdminElementorVariables: variables } = window;
const $wnd = $(window);
$wnd.on('elementor/frontend/init', ($data) => {
if (!variables) {
return;
}
const { target: elementorWindow } = $data;
// add fake iframe width, so @media styles will work fine.
function maybeResizePreviews() {
const elementorWidth = elementorWindow
.jQuery(elementorWindow.document)
.width();
elementorWindow.jQuery
.find('.visual-portfolio-elementor-preview iframe')
.forEach((item) => {
const $this = $(item);
const parentWidth = $this.parent().width();
$this.css({
width: elementorWidth,
});
if (item.iFrameResizer) {
item.iFrameResizer.sendMessage({
name: 'resize',
width: parentWidth,
});
item.iFrameResizer.resize();
}
});
}
// window resize.
$wnd.on('resize', throttle(300, rafSchd(maybeResizePreviews)));
// added/changed widget.
elementorFrontend.hooks.addAction(
'frontend/element_ready/visual-portfolio.default',
($scope) => {
const $block = $($scope).find(
'.visual-portfolio-elementor-preview'
);
const $frame = $block.find('iframe');
const id = $block.attr('data-id');
const iframeURL = `${
variables.preview_url +
(variables.preview_url.split('?')[1] ? '&' : '?')
}vp_preview_frame=true&vp_preview_type=elementor&vp_preview_frame_id=${id}&vp_preview_nonce=${
variables.nonce
}`;
$frame.attr('src', iframeURL);
// resize iframe
if ($.fn.iFrameResize) {
$frame.iFrameResize({
onInit() {
maybeResizePreviews();
},
onMessage({ message }) {
// select current block on click message.
if (message === 'clicked') {
// Select current widget to display settings.
$frame
.closest('.elementor-element')
.find('.elementor-editor-element-edit')
.click();
window.focus();
}
},
});
}
}
);
});
@@ -0,0 +1,48 @@
const { tinymce, VPTinyMCEData } = window;
if (typeof VPTinyMCEData !== 'undefined' && VPTinyMCEData.layouts.length) {
const options = [
{
text: '',
value: '',
},
];
Object.keys(VPTinyMCEData.layouts).forEach((k) => {
options.push({
text: VPTinyMCEData.layouts[k].title,
value: VPTinyMCEData.layouts[k].id,
});
});
tinymce.create('tinymce.plugins.visual_portfolio', {
init(editor) {
editor.addButton('visual_portfolio', {
type: 'listbox',
title: VPTinyMCEData.plugin_name,
icon: 'visual-portfolio',
classes: 'visual-portfolio-btn',
onclick() {
if (this.menu) {
this.menu.$el.find('.mce-first').hide();
}
},
onselect() {
if (this.value()) {
editor.insertContent(
`[visual_portfolio id="${this.value()}"]`
);
}
this.value('');
},
values: options,
value: '',
});
},
});
tinymce.PluginManager.add(
'visual_portfolio',
tinymce.plugins.visual_portfolio
);
}
Whitespace-only changes.
@@ -0,0 +1,106 @@
import $ from 'jquery';
import rafSchd from 'raf-schd';
import { debounce } from '@wordpress/compose';
const { ajaxurl, VPAdminVariables } = window;
const $body = $('body');
// select shortcode text in input
$body.on(
'focus',
'[name="vp_list_shortcode"], [name="vp_filter_shortcode"], [name="vp_sort_shortcode"]',
function () {
this.select();
}
);
$body.on('click', '.vp-onclick-selection', function () {
// eslint-disable-next-line @wordpress/no-global-get-selection
window.getSelection().selectAllChildren(this);
});
// fix the problem with Gutenberg shortcode transform (allowed only plain text pasted).
$body.on('copy cut', '.vp-onclick-selection', (e) => {
// eslint-disable-next-line @wordpress/no-global-get-selection
const copyText = window
.getSelection()
.toString()
.replace(/[\n\r]+/g, '');
e.originalEvent.clipboardData.setData('text/plain', copyText);
e.originalEvent.preventDefault();
});
// Post format metabox show/hide
const $videoMetabox = $('#vp_format_video');
const $videoFormatCheckbox = $('#post-format-video');
let isVideoFormat = null;
function toggleVideoMetabox(show) {
if (isVideoFormat === null || isVideoFormat !== show) {
isVideoFormat = show;
$videoMetabox[show ? 'show' : 'hide']();
}
}
if ($videoMetabox.length) {
if ($videoFormatCheckbox.length) {
toggleVideoMetabox($videoFormatCheckbox.is(':checked'));
$body.on('change', '[name=post_format]', () => {
toggleVideoMetabox($videoFormatCheckbox.is(':checked'));
});
}
}
let oembedAjax = null;
let runAjaxVideoOembed = function ($this) {
oembedAjax = $.ajax({
url: ajaxurl,
method: 'POST',
dataType: 'json',
data: {
action: 'vp_find_oembed',
q: $this.val(),
nonce: VPAdminVariables.nonce,
},
complete(data) {
const json = data.responseJSON;
if (json && typeof json.html !== 'undefined') {
$this.next('.vp-oembed-preview').html(json.html);
}
},
});
};
runAjaxVideoOembed = debounce(300, rafSchd(runAjaxVideoOembed));
$body.on('change input', '.vp-input[name="_vp_format_video_url"]', function () {
if (oembedAjax !== null) {
oembedAjax.abort();
}
const $this = $(this);
$this.next('.vp-oembed-preview').html('');
runAjaxVideoOembed($this);
});
/**
* When attempting to disable registration of portfolio post type,
* We inform the user of the possible consequences and provide them with the opportunity to cancel this operation.
*/
$body.on(
'change',
"input[name='vp_general[register_portfolio_post_type]']",
function () {
// Does some stuff and logs the event to the console
if (!$(this).is(':checked')) {
// eslint-disable-next-line no-restricted-globals, no-alert, no-undef
const confirmation = confirm(
"Are you sure you want to turn off the Portfolio custom post type and related taxonomies? Make sure you don't use this post type on your site, otherwise you might see errors on the frontend."
);
if (!confirmation) {
$(this).prop('checked', true);
}
}
}
);
@@ -0,0 +1,25 @@
import $ from 'jquery';
const { vc } = window;
$(() => {
// shortcode frontend editor
if (typeof vc !== 'undefined') {
// on shortcode add and update events
vc.events.on('shortcodes:add shortcodeView:updated', (e) => {
if (e.settings.base !== 'visual_portfolio') {
return;
}
const wnd = vc.$frame[0].contentWindow;
const jQframe = wnd ? wnd.jQuery : false;
if (jQframe) {
const $vp = jQframe(e.view.el).children('.vp-portfolio');
if ($vp.length && typeof $vp.vpf !== 'undefined') {
$vp.vpf();
}
}
});
}
});
@@ -0,0 +1,14 @@
/**
* Lazyload CSS Variables
*/
:root {
// Lazy.
--vp-lazyload-images__background: linear-gradient(270deg, rgba(140, 140, 140, 15%), rgba(140, 140, 140, 5%), rgba(140, 140, 140, 5%), rgba(140, 140, 140, 15%));
--vp-lazyload-images__background-size: 400% 100%;
--vp-lazyload-images__animation-duration: 7s;
// Transitions.
--vp-lazyload-transition-duration: 0.3s;
--vp-lazyload-transition-easing: ease-in-out;
}
@@ -0,0 +1,47 @@
/**
* Global CSS Variables
*/
:root {
// Main colors.
--vp-color-brand: #2540cc;
--vp-color-gray: #6c7781;
--vp-color-gray-darken: #4b4b4b;
--vp-color-gray-light: #e8e8e8;
--vp-color-gray-lighten: #f7f7f7;
--vp-color-red: #b71515;
// Radius.
--vp-border-radius: 5px;
// Gap.
--vp-items__gap: 0;
// Transitions.
--vp-transition-duration: 0.3s;
--vp-transition-easing: ease-in-out;
--vp-interactive__transition-duration: 0.2s;
--vp-interactive__transition-easing: ease-in-out;
}
// Vertical gap.
.vp-portfolio__items {
--vp-items__gap-vertical: var(--vp-items__gap);
}
.vp-portfolio {
--vp-wrap__min-height: 114px;
--vp-elements__gap: 20px;
// Images.
--vp-images__object-fit: cover;
--vp-images__object-position: 50% 50%;
}
.vp-spinner {
--vp-spinner__color: currentcolor;
--vp-spinner__size: 20px;
--vp-spinner__border-size: 2px;
--vp-spinner__speed: 0.3s;
--vp-spinner--background__color: var(--vp-spinner__color);
--vp-spinner--background__opacity: 0.3;
}
@@ -0,0 +1,17 @@
/**
* Popup Galleries CSS Variables
*/
.vp-pswp,
.vp-fancybox {
--vp-popup__z-index: 1500;
// Thumbnails.
--vp-popup--thumbnails__size: 160px;
--vp-popup--thumbnails__aspect-ratio: 10 / 7;
--vp-popup--thumbnails__background-color: #1e1e1e;
--vp-popup--thumbnails--items__border-color: var(--vp-color-brand);
--vp-popup--thumbnails--scrollbar__size: 7px;
--vp-popup--thumbnails--scrollbar-track__background-color: #1f1f1f;
--vp-popup--thumbnails--scrollbar-thumb__background-color: #424242;
--vp-popup--thumbnails--scrollbar-thumb__border-radius: 10px;
}
@@ -0,0 +1,38 @@
/**
* Slider CSS Variables
*/
.vp-portfolio {
// Arrows.
--vp-layout-slider--arrows__width: 2em;
--vp-layout-slider--arrows__height: 2em;
--vp-layout-slider--arrows__offset: 10px;
--vp-layout-slider--arrows__compensation: 10px;
--vp-layout-slider--arrows__color: var(--vp-color-gray);
--vp-layout-slider--arrows__background-color: #fff;
--vp-layout-slider--arrows__border-radius: 50%;
--vp-layout-slider--arrows__box-shadow: 0 0 7px 2px rgba(0, 0, 0, 4%);
--vp-layout-slider--arrows__opacity: 0.5;
--vp-layout-slider--arrows-hover__box-shadow: 0 2px 15px 2px rgba(0, 0, 0, 4%);
--vp-layout-slider--arrows-hover__opacity: 1;
// Bullets.
--vp-layout-slider--bullets__margin-top: 2em;
--vp-layout-slider--bullets__width: 0.4em;
--vp-layout-slider--bullets__height: 0.4em;
--vp-layout-slider--bullets__gap: 0.4em;
--vp-layout-slider--bullets__compensation: 4px;
--vp-layout-slider--bullets__background-color: currentcolor;
--vp-layout-slider--bullets__border-radius: 50%;
--vp-layout-slider--bullets__opacity: 0.2;
--vp-layout-slider--bullets-hover__opacity: 0.5;
--vp-layout-slider--bullets-active__opacity: 1;
// Thumbnails.
--vp-layout-slider--thumbnails__opacity: 0.5;
--vp-layout-slider--thumbnails-hover__opacity: 1;
--vp-layout-slider--thumbnails-active__opacity: 1;
// Transitions.
--vp-layout-slider__transition-duration: var(--vp-interactive__transition-duration);
--vp-layout-slider__transition-easing: var(--vp-interactive__transition-easing);
}
@@ -0,0 +1,10 @@
/*
* Visual Portfolio custom scrollbar.
*/
.vp-portfolio__custom-scrollbar {
--vp-custom-scrollbar__background-color: #888;
.simplebar-scrollbar::before {
background-color: var(--vp-custom-scrollbar__background-color);
}
}
@@ -0,0 +1,13 @@
/*
* Additional styles to fix Elementor page builder conflicts.
*/
// Gaps.
[data-vp-layout="grid"],
[data-vp-layout="masonry"],
[data-vp-layout="tiles"] {
.elementor & .vp-portfolio__items .vp-portfolio__item-wrap .vp-portfolio__item {
margin-top: var(--vp-items__gap-vertical);
margin-left: var(--vp-items__gap);
}
}
@@ -0,0 +1,47 @@
/*
* Visual Portfolio layout Grid.
*/
// Gaps.
[data-vp-layout="grid"] {
.vp-portfolio__items {
margin-top: calc(-1 * var(--vp-items__gap-vertical));
margin-left: calc(-1 * var(--vp-items__gap));
}
.vp-portfolio__item-wrap .vp-portfolio__item {
margin-top: var(--vp-items__gap-vertical);
margin-left: var(--vp-items__gap);
}
}
// Images.
[data-vp-grid-images-aspect-ratio*=":"] {
.vp-portfolio__item-img img,
.vp-portfolio__item-img {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.vp-portfolio__item-img-wrap {
position: relative;
display: block;
overflow: hidden;
&::before {
display: block;
padding-top: 56%;
content: "";
}
}
.vp-portfolio__item-img img {
width: 100%;
height: 100%;
object-fit: var(--vp-images__object-fit);
object-position: var(--vp-images__object-position);
}
}
@@ -0,0 +1,10 @@
/*
* Visual Portfolio layout Justified.
*/
[data-vp-layout="justified"] {
.vp-portfolio__item-wrap {
top: 0;
left: 0;
float: left;
}
}
@@ -0,0 +1,47 @@
/*
* Visual Portfolio layout Masonry.
*/
// Gaps.
[data-vp-layout="masonry"] {
.vp-portfolio__items {
margin-top: calc(-1 * var(--vp-items__gap-vertical));
margin-left: calc(-1 * var(--vp-items__gap));
}
.vp-portfolio__item-wrap .vp-portfolio__item {
margin-top: var(--vp-items__gap-vertical);
margin-left: var(--vp-items__gap);
}
}
// Images.
[data-vp-masonry-images-aspect-ratio*=":"] {
.vp-portfolio__item-img img,
.vp-portfolio__item-img {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.vp-portfolio__item-img-wrap {
position: relative;
display: block;
overflow: hidden;
&::before {
display: block;
padding-top: 56%;
content: "";
}
}
.vp-portfolio__item-img img {
width: 100%;
height: 100%;
object-fit: var(--vp-images__object-fit);
object-position: var(--vp-images__object-position);
}
}
@@ -0,0 +1,167 @@
@import "./variables-slider";
/*
* Visual Portfolio layout Slider.
*/
[data-vp-layout="slider"] {
// Initial styles before Swiper init.
.vp-portfolio__items-wrap:not(.swiper) .vp-portfolio__items,
.vp-portfolio__thumbnails-wrap:not(.swiper) .vp-portfolio__thumbnails {
position: relative;
box-sizing: content-box;
display: flex;
}
.vp-portfolio__items-wrap:not(.swiper) .vp-portfolio__items .vp-portfolio__item-wrap,
.vp-portfolio__thumbnails-wrap:not(.swiper) .vp-portfolio__thumbnails .vp-portfolio__thumbnail-wrap {
width: calc(100% / var(--vp-layout-slider__initial-slides-per-view, 8));
min-width: calc(100% / var(--vp-layout-slider__initial-slides-per-view, 8));
}
@for $i from 1 through 8 {
&[data-vp-slider-slides-per-view="#{$i}"] .vp-portfolio__items-wrap:not(.swiper),
&[data-vp-slider-thumbnails-per-view="#{$i}"] .vp-portfolio__thumbnails-wrap:not(.swiper) {
--vp-layout-slider__initial-slides-per-view: #{$i};
}
}
.vp-portfolio__thumbnail-img-wrap {
position: relative;
display: block;
overflow: hidden;
}
.vp-portfolio__item-img-wrap::before,
.vp-portfolio__thumbnail-img-wrap::before {
display: block;
content: "";
}
.vp-portfolio__item-img img,
.vp-portfolio__thumbnail-img img {
object-fit: var(--vp-images__object-fit);
object-position: var(--vp-images__object-position);
}
// arrows
.vp-portfolio__items-arrow {
position: absolute;
top: 50%;
z-index: 1;
display: flex;
align-items: center;
justify-content: center;
width: var(--vp-layout-slider--arrows__width);
height: var(--vp-layout-slider--arrows__height);
margin-top: calc(-1 * var(--vp-layout-slider--arrows__height) / 2);
color: var(--vp-layout-slider--arrows__color);
cursor: pointer;
background-color: var(--vp-layout-slider--arrows__background-color);
border-radius: var(--vp-layout-slider--arrows__border-radius);
box-shadow: var(--vp-layout-slider--arrows__box-shadow);
opacity: var(--vp-layout-slider--arrows__opacity);
transition: var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing), var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);
// additional element to make the buttons clickable also in outside.
&::after {
position: absolute;
top: calc(-1 * var(--vp-layout-slider--arrows__compensation));
right: calc(-1 * var(--vp-layout-slider--arrows__compensation));
bottom: calc(-1 * var(--vp-layout-slider--arrows__compensation));
left: calc(-1 * var(--vp-layout-slider--arrows__compensation));
display: block;
content: "";
}
&:hover {
box-shadow: var(--vp-layout-slider--arrows-hover__box-shadow);
opacity: var(--vp-layout-slider--arrows-hover__opacity);
}
// RTL.
@if variable-exists(rtl) and $rtl {
svg {
transform: scaleX(-1);
}
}
}
.vp-portfolio__items-arrow-prev {
left: var(--vp-layout-slider--arrows__offset);
}
.vp-portfolio__items-arrow-next {
right: var(--vp-layout-slider--arrows__offset);
}
// bullets
&[data-vp-slider-bullets="true"] .vp-portfolio__items-wrap {
padding-bottom: var(--vp-layout-slider--bullets__margin-top);
.vp-portfolio__items-arrow {
transform: translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2));
}
}
.vp-portfolio__items-bullets {
position: absolute;
bottom: 0;
z-index: 1;
text-align: center;
// Fixes Swiper default font-size
&.swiper-pagination-bullets-dynamic {
font-size: 1em;
}
> .swiper-pagination-bullet {
position: relative;
width: var(--vp-layout-slider--bullets__width);
height: var(--vp-layout-slider--bullets__height);
margin: 0 calc(var(--vp-layout-slider--bullets__gap) / 2);
cursor: pointer;
background-color: var(--vp-layout-slider--bullets__background-color);
border-radius: var(--vp-layout-slider--bullets__border-radius);
opacity: var(--vp-layout-slider--bullets__opacity);
transition: var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);
&:hover,
&:focus {
opacity: var(--vp-layout-slider--bullets-hover__opacity);
}
&.swiper-pagination-bullet-active {
opacity: var(--vp-layout-slider--bullets-active__opacity);
}
// additional element to make the buttons clickable also in outside.
&::after {
position: absolute;
top: calc(-1 * var(--vp-layout-slider--bullets__compensation));
right: calc(-1 * var(--vp-layout-slider--bullets__compensation));
bottom: calc(-1 * var(--vp-layout-slider--bullets__compensation));
left: calc(-1 * var(--vp-layout-slider--bullets__compensation));
display: block;
content: "";
}
}
}
// thumbnails
.vp-portfolio__thumbnails-wrap {
.vp-portfolio__thumbnail-wrap {
cursor: pointer;
opacity: var(--vp-layout-slider--thumbnails__opacity);
transition: var(--vp-layout-slider__transition-duration) opacity;
&:hover,
&:focus {
opacity: var(--vp-layout-slider--thumbnails-hover__opacity);
}
&.swiper-slide-thumb-active {
opacity: var(--vp-layout-slider--thumbnails-active__opacity);
}
}
}
}
@@ -0,0 +1,50 @@
/*
* Visual Portfolio layout Tiles.
*/
[data-vp-layout="tiles"] {
// Gaps.
.vp-portfolio__items,
.vp-portfolio__item-wrap .vp-portfolio__item-img-wrap {
margin-top: calc(-1 * var(--vp-items__gap-vertical));
margin-left: calc(-1 * var(--vp-items__gap));
}
.vp-portfolio__item-wrap .vp-portfolio__item {
margin-top: var(--vp-items__gap-vertical);
margin-left: var(--vp-items__gap);
}
// Images
.vp-portfolio__item-img img,
.vp-portfolio__item-img {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.vp-portfolio__item-img {
top: var(--vp-items__gap-vertical);
left: var(--vp-items__gap);
}
.vp-portfolio__item-img-wrap {
position: relative;
display: block;
overflow: hidden;
&::before {
display: block;
padding-top: 56%;
content: "";
}
}
.vp-portfolio__item-img img {
width: 100%;
height: 100%;
object-fit: var(--vp-images__object-fit);
object-position: var(--vp-images__object-position);
}
}
@@ -0,0 +1,32 @@
/*
* Visual Portfolio Lazyload Images fallback for old browsers
* which does not support CSS :has()
*/
:is(.vp-portfolio__item-img, .vp-portfolio__thumbnail-img) {
// Extra check for lazy loading class on the inner image
// to make sure image will be lazy loaded by Visual Portfolio.
&:is(.vp-has-lazyload, .vp-has-lazyloading, .vp-has-lazyloaded)::before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
// Fixed possible bug with inaccessible links on images in the Classic style.
pointer-events: none;
visibility: visible;
content: "";
background-image: var(--vp-lazyload-images__background);
background-size: var(--vp-lazyload-images__background-size);
opacity: 1;
transition: var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity, var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility;
}
&:is(.vp-has-lazyloading)::before {
animation: vp-lazyload-placeholder var(--vp-lazyload-images__animation-duration) linear infinite;
}
&:is(.vp-has-lazyloaded)::before {
visibility: hidden;
opacity: 0;
}
}
@@ -0,0 +1,59 @@
@import "./variables-lazyload";
/*
* Visual Portfolio Lazyload Images
*
* - :first-of-type is used to prevent conflicts with hover image (Pro feature)
*/
// LazyLoad image
img.vp-lazyload,
img.vp-lazyloaded,
img.vp-lazypreload,
img.vp-lazyloading {
opacity: 0;
transition: var(--vp-lazyload-transition-duration) opacity;
}
img.vp-lazyloaded {
opacity: 1;
}
:is(.vp-portfolio__item-img, .vp-portfolio__thumbnail-img) {
// Extra check for lazy loading class on the inner image
// to make sure image will be lazy loaded by Visual Portfolio.
&:has(img:first-of-type:is(.vp-lazyload, .vp-lazyloading, .vp-lazyloaded))::before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
// Fixed possible bug with inaccessible links on images in the Classic style.
pointer-events: none;
visibility: visible;
content: "";
background-image: var(--vp-lazyload-images__background);
background-size: var(--vp-lazyload-images__background-size);
opacity: 1;
transition: var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) opacity, var(--vp-lazyload-transition-duration) var(--vp-lazyload-transition-duration) visibility;
}
&:has(img:first-of-type.vp-lazyloading)::before {
animation: vp-lazyload-placeholder var(--vp-lazyload-images__animation-duration) ease-in-out infinite;
}
&:has(img:first-of-type.vp-lazyloaded)::before {
visibility: hidden;
opacity: 0;
}
}
@keyframes vp-lazyload-placeholder {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
@@ -0,0 +1,306 @@
@import "./variables-main";
/*
* Visual Portfolio main style.
*/
.vp-portfolio {
position: relative;
box-sizing: border-box;
min-height: var(--vp-wrap__min-height);
overflow-wrap: break-word;
*,
*::before,
*::after {
box-sizing: inherit;
}
// Fixes Swiper box-sizing conflict.
// https://github.com/nk-crew/visual-portfolio/issues/147
.swiper-wrapper {
box-sizing: inherit;
}
}
.vp-portfolio__items {
transition: var(--vp-transition-duration) height var(--vp-transition-easing), var(--vp-transition-duration) transform var(--vp-transition-easing);
}
.vp-portfolio::after,
.vp-portfolio__items::after {
display: block;
clear: both;
content: "";
}
.vp-portfolio__items-wrap,
.vp-portfolio__thumbnails-wrap,
.vp-portfolio__filter-wrap,
.vp-portfolio__sort-wrap,
.vp-portfolio__pagination-wrap,
.vp-portfolio__item {
position: relative;
overflow: hidden;
}
.vp-portfolio__items-wrap,
.vp-portfolio__thumbnails-wrap,
.vp-portfolio__layout-elements {
margin-bottom: var(--vp-elements__gap);
visibility: hidden;
opacity: 0;
transition: var(--vp-transition-duration) opacity, var(--vp-transition-duration) visibility;
}
.vp-portfolio > :last-child {
margin-bottom: 0;
}
.vp-portfolio__item-wrap {
position: relative;
float: left;
width: 33.333%;
}
// icons.
.vp-svg-icon {
display: inline-block;
width: 1em;
height: 1em;
overflow: visible;
font-size: inherit;
vertical-align: -0.125em;
}
// screen readers only.
.vp-screen-reader-text {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
word-break: normal;
word-wrap: normal !important;
border: 0;
&:focus {
top: 5px;
right: 5px;
z-index: 100000;
display: block;
width: auto;
height: auto;
padding: 15px 23px 14px;
clip: auto !important;
clip-path: none;
font-size: 14px;
font-size: 0.875rem;
font-weight: 700;
line-height: normal;
color: var(--vp-color-brand);
text-decoration: none;
background-color: #f1f1f1;
border-radius: 3px;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 60%);
}
}
// fix for default themes styles.
[data-vp-layout]:not([data-vp-layout="slider"]) .vp-portfolio__item-wrap {
padding: 0 !important;
margin: 0 !important;
}
[data-vp-layout="slider"] .vp-portfolio__item-wrap {
// In some plugins there is a style with `display: flex`, which breaks our items.
display: block;
float: none;
padding: 0 !important;
margin-top: 0 !important;
margin-bottom: 0 !important;
margin-left: 0 !important;
}
.vp-portfolio__item .vp-portfolio__item-img img,
.vp-portfolio__item .vp-portfolio__item-img a,
.vp-portfolio__item .vp-portfolio__thumbnail-img img {
display: block;
width: 100%;
height: auto;
}
.vp-portfolio__item-img,
.vp-portfolio__thumbnail-img {
position: relative;
}
// Fix conflict with such theme styles:
// a { position: relative; }
// https://wordpress.org/support/topic/gallery-images-grey/
.vp-portfolio__item .vp-portfolio__item-img a {
position: unset;
}
// layout elements
.vp-portfolio__layout-elements {
display: flex;
flex-wrap: wrap;
gap: var(--vp-elements__gap);
&-align-left {
justify-content: flex-start;
}
&-align-center {
justify-content: center;
}
&-align-right {
justify-content: flex-end;
}
&-align-between {
justify-content: space-between;
}
}
// Fix custom theme styles for figures
.vp-portfolio figure.vp-portfolio__item {
display: block;
margin: 0;
}
[class^="wp-block-"]:not(.wp-block-gallery) figcaption.vp-portfolio__item-meta,
.vp-portfolio figcaption.vp-portfolio__item-meta {
margin-bottom: 0;
font-style: inherit;
}
// Preloader
.vp-portfolio__preloader-wrap {
visibility: visible;
opacity: 1;
transition: var(--vp-transition-duration) opacity, var(--vp-transition-duration) visibility;
}
.vp-portfolio__preloader {
position: absolute;
left: 50%;
width: 20px;
height: 20px;
margin-top: 45px;
margin-left: -10px;
svg,
img {
display: block;
width: 100%;
height: 100%;
border-radius: 20px;
}
&::after {
position: absolute;
top: -2px;
left: -2px;
display: block;
width: 24px;
height: 24px;
text-indent: -9999em;
content: "";
border: 1px solid rgba(#000, 0.2);
border-left: 1px solid #000;
border-radius: 50%;
animation: vp-preloader-spinner 0.3s infinite linear;
}
}
@keyframes vp-preloader-spinner {
100% {
transform: rotate(360deg);
}
}
// On loaded portfolio
.vp-portfolio.vp-portfolio__ready {
min-height: initial;
.vp-portfolio__items-wrap,
.vp-portfolio__thumbnails-wrap,
.vp-portfolio__layout-elements {
visibility: visible;
opacity: 1;
}
.vp-portfolio__preloader-wrap {
visibility: hidden;
opacity: 0;
.vp-portfolio__preloader {
animation: none;
}
}
}
.vp-portfolio__layout-elements__ready {
visibility: visible;
opacity: 1;
}
.vp-single-filter.vp-single-filter__ready {
.vp-portfolio__filter-wrap {
visibility: visible;
opacity: 1;
}
}
.vp-single-sort.vp-single-sort__ready {
.vp-portfolio__sort-wrap {
visibility: visible;
opacity: 1;
}
}
// Loading
.vp-portfolio.vp-portfolio__loading .vp-portfolio__layout-elements {
opacity: 0.5;
}
// Popup Galleries
.vp-portfolio__item-popup {
display: none;
}
// loading spinner.
.vp-spinner {
position: relative;
display: block;
width: var(--vp-spinner__size);
height: var(--vp-spinner__size);
text-indent: -9999em;
border: var(--vp-spinner__border-size) solid transparent;
border-left: var(--vp-spinner__border-size) solid var(--vp-spinner__color);
border-radius: 50%;
animation: vp-spinner var(--vp-spinner__speed) infinite linear;
&::after {
position: absolute;
top: calc(-1 * var(--vp-spinner__border-size));
right: calc(-1 * var(--vp-spinner__border-size));
bottom: calc(-1 * var(--vp-spinner__border-size));
left: calc(-1 * var(--vp-spinner__border-size));
display: block;
content: "";
border: var(--vp-spinner__border-size) solid var(--vp-spinner--background__color);
border-radius: 50%;
opacity: var(--vp-spinner--background__opacity);
}
}
@keyframes vp-spinner {
100% {
transform: rotate(360deg);
}
}
@@ -0,0 +1,28 @@
/*
* Visual Portfolio Noscript
* Loaded inline in class-assets.php -> add_noscript_styles
*/
// preloader
.vp-portfolio__preloader-wrap {
display: none;
}
// hidden items before load.
.vp-portfolio__items-wrap,
.vp-portfolio__filter-wrap,
.vp-portfolio__sort-wrap,
.vp-portfolio__pagination-wrap {
visibility: visible;
opacity: 1;
}
// image tag without script
.vp-portfolio__item .vp-portfolio__item-img noscript + img {
display: none;
}
// Slider thumbnails
.vp-portfolio__thumbnails-wrap {
display: none;
}
@@ -0,0 +1,88 @@
@import "./variables-popup";
/*
* Visual Portfolio styles for Fancybox.
*/
.vp-fancybox {
top: var(--wp-admin--admin-bar--height, 0);
z-index: var(--vp-popup__z-index);
height: calc(100% - var(--wp-admin--admin-bar--height, 0px));
// removed white background to improve vertical videos displaying.
.fancybox-slide--iframe .fancybox-content {
background: none;
}
// Caption.
.fancybox-caption__body {
font-size: 12px;
color: #fff;
h3 {
color: inherit;
}
a {
color: inherit;
&:hover {
opacity: 0.8;
}
}
.vp-portfolio__item-meta-title {
margin-top: 0;
margin-bottom: 3px;
font-size: 14px;
color: inherit;
a {
text-decoration: none;
}
}
}
// Thumbnails.
.fancybox-thumbs {
width: var(--vp-popup--thumbnails__size);
background: var(--vp-popup--thumbnails__background-color);
}
&.fancybox-show-thumbs .fancybox-inner {
right: var(--vp-popup--thumbnails__size);
}
.fancybox-thumbs__list a {
width: var(--vp-popup--thumbnails__size);
max-width: calc(100% - 4px);
height: calc(var(--vp-popup--thumbnails__size) / calc(var(--vp-popup--thumbnails__aspect-ratio)));
&::before {
border: 2px solid var(--vp-popup--thumbnails--items__border-color);
}
@supports (aspect-ratio: 16 / 9) {
width: calc(100% - 4px);
max-width: none;
height: auto;
max-height: none;
aspect-ratio: var(--vp-popup--thumbnails__aspect-ratio);
}
}
.fancybox-thumbs-y .fancybox-thumbs__list {
&::-webkit-scrollbar {
width: var(--vp-popup--thumbnails--scrollbar__size);
}
&::-webkit-scrollbar-track {
background: var(--vp-popup--thumbnails--scrollbar-track__background-color);
box-shadow: none;
}
&::-webkit-scrollbar-thumb {
background: var(--vp-popup--thumbnails--scrollbar-thumb__background-color);
border-radius: var(--vp-popup--thumbnails--scrollbar-thumb__border-radius);
}
}
}
@@ -0,0 +1,97 @@
@import "./variables-popup";
/*
* Visual Portfolio styles for PhotoSwipe.
*/
.vp-pswp {
top: var(--wp-admin--admin-bar--height, 0);
z-index: var(--vp-popup__z-index);
height: calc(100% - var(--wp-admin--admin-bar--height, 0px));
.pswp__caption {
background-color: rgba(0, 0, 0, 75%);
> div {
max-width: 600px;
font-size: 12px;
color: #fff;
}
h3 {
color: inherit;
}
a {
color: inherit;
&:hover {
opacity: 0.8;
}
}
.vp-portfolio__item-meta-title {
margin-top: 0;
margin-bottom: 3px;
font-size: 14px;
color: inherit;
a {
text-decoration: none;
}
}
}
.pswp__preloader {
position: absolute;
right: 0;
bottom: 0;
z-index: 1;
}
.vp-pswp-video {
position: relative;
z-index: 1045;
display: flex;
align-items: center;
width: 100%;
max-width: 1920px;
height: 100%;
margin: 0 auto;
line-height: 0;
text-align: left;
vertical-align: middle;
> div {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%;
iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
margin: 0;
}
video,
audio {
position: absolute;
width: 100% !important;
height: 100% !important;
margin: 0;
}
audio {
padding: 20px;
}
}
}
// Default cursor when click to zoom option disabled.
&.vp-pswp-no-zoom .pswp__img {
cursor: default;
}
}
@@ -0,0 +1,5 @@
// Fix images <a> tags.
// https://wordpress.org/support/topic/portfolio-page-doesnt-display-images/
.vp-portfolio__item .vp-portfolio__item-img a {
position: unset !important;
}
@@ -0,0 +1,33 @@
// Fix popup buttons styles.
// https://wordpress.org/support/topic/your-plugin-does-not-load-the-css-correctly/
.vp-pswp {
.pswp__button,
.pswp__button--arrow--left::before,
.pswp__button--arrow--right::before,
.pswp__button:hover,
.pswp__button--arrow--left:hover::before,
.pswp__button--arrow--right:hover::before {
padding: 0;
background-color: transparent;
border: none;
border-radius: 0;
}
}
.vp-fancybox {
.fancybox-button,
.fancybox-button:hover {
background-color: rgba(30, 30, 30, 60%);
border: none;
border-radius: 0;
box-shadow: none;
&::after {
content: none;
}
}
.fancybox-button:not(:hover) {
color: #ccc !important;
}
}
@@ -0,0 +1,36 @@
// Fix headings margin.
.entry-content .vp-portfolio__item-meta-title {
margin-top: 0;
}
// Fix preview background color.
.vp-preview-body {
background: none;
}
// Fix font family.
.vp-filter__item,
.vp-sort__item,
.vp-sort select,
.vp-portfolio__item-meta-category,
.vp-pagination__item {
font-family: "Noto Sans", sans-serif;
}
// Fix links border.
.vp-portfolio__item-meta-title,
.vp-filter__item,
.vp-sort__item,
.vp-portfolio__item-meta-category,
.vp-pagination__item,
.vp-portfolio__item-img {
.entry-content & a {
border: none;
}
}
// Fix figcaption padding.
.wp-block-visual-portfolio[class^="wp-block-"].vp-portfolio__items-style-fade figcaption,
.wp-block-visual-portfolio[class^="wp-block-"].vp-portfolio__items-style-fly figcaption {
padding: 0;
}
@@ -0,0 +1,23 @@
// Fix links decoration.
.entry .entry-content .vp-portfolio a {
text-decoration: none;
}
// Fix headings margin.
.entry-content .vp-portfolio__item-meta-title {
margin-top: 0;
}
// Fix headings decorators.
.vp-portfolio__item-meta-title::before {
content: none;
}
// Fix font family.
.vp-filter__item,
.vp-sort__item,
.vp-sort select,
.vp-portfolio__item-meta-category,
.vp-pagination__item {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}
@@ -0,0 +1,30 @@
// Fix links border.
.entry-content .vp-portfolio {
a,
a:hover,
a:focus {
box-shadow: none;
}
}
// Fix headings padding and font.
.entry-content .vp-portfolio__item-meta-title {
padding-top: 0;
font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
font-weight: 600;
}
// Fix for figcaption in block.
.wp-block-visual-portfolio[class^="wp-block-"]:not(.wp-block-gallery) figcaption {
margin-bottom: 0;
font-style: inherit;
text-align: center;
}
// Fix color on hover.
.vp-portfolio__items-style-fade .vp-portfolio__item-meta:hover,
.vp-portfolio__items-style-fade .vp-portfolio__item-meta:focus,
.vp-portfolio__items-style-fly .vp-portfolio__item-meta:hover,
.vp-portfolio__items-style-fly .vp-portfolio__item-meta:focus {
color: inherit;
}
@@ -0,0 +1,19 @@
// Fix preview background color.
.vp-preview-body {
background: none;
}
// Fix headings margin.
.entry-content .vp-portfolio__item-meta-title {
margin-top: 0;
}
// Fix font family.
.vp-portfolio__item-meta-title,
.vp-filter__item,
.vp-sort__item,
.vp-sort select,
.vp-portfolio__item-meta-category,
.vp-pagination__item {
font-family: Montserrat, "Helvetica Neue", sans-serif;
}
@@ -0,0 +1,56 @@
// Fix headings margin.
.entry-content .vp-portfolio__item-meta-title {
margin-top: 0;
}
// Fix caption margin.
.vp-portfolio__item figcaption {
margin-top: 0;
}
// Fix preview background color.
.vp-preview-body {
background: none;
}
// Fix font family.
.vp-filter__item,
.vp-sort__item,
.vp-sort select,
.vp-portfolio__item-meta-category,
.vp-pagination__item {
font-family: "Inter var", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
}
// Filters, Sort and Pagination.
.vp-filter__style-default {
--vp-filter-default--items__font-size: 0.7em;
}
.vp-filter__style-minimal {
--vp-filter-minimal--items__font-size: 0.7em;
}
.vp-filter__style-dropdown {
--vp-filter-dropdown--items__font-size: 0.7em;
}
.vp-sort__style-default {
--vp-sort-default--items__font-size: 0.7em;
}
.vp-sort__style-minimal {
--vp-sort-minimal--items__font-size: 0.7em;
}
.vp-sort__style-dropdown {
--vp-sort-dropdown--items__font-size: 0.7em;
}
.vp-pagination__style-default {
--vp-pagination-default--items__font-size: 0.7em;
}
.vp-pagination__style-minimal {
--vp-pagination-minimal--items__font-size: 0.7em;
}
@@ -0,0 +1,25 @@
// Fix headings margin.
.entry-content .vp-portfolio__item-meta-title {
margin-top: 0;
}
// Fix caption margin.
.vp-portfolio__item figcaption {
margin-top: 0;
margin-bottom: 0;
}
// Fix preview background color.
.vp-preview-body {
background: none;
}
// Fix images size.
// https://github.com/WordPress/twentytwentyone/blob/trunk/inc/template-functions.php#L405-L447.
[data-vp-layout="tiles"] .vp-portfolio__item-img img,
[data-vp-masonry-images-aspect-ratio*=":"] .vp-portfolio__item-img img,
[data-vp-grid-images-aspect-ratio*=":"] .vp-portfolio__item-img img {
width: 100% !important;
max-width: none !important;
height: 100% !important;
}
@@ -0,0 +1,11 @@
// Fix headings margin.
.vp-portfolio__item-meta-title {
margin-top: 0;
}
// Fix top and bottom padding of main content in the popup iframe.
.vp-popup-iframe .wp-site-blocks > main {
padding-top: 80px;
padding-bottom: 80px;
margin-top: 0;
}
@@ -0,0 +1,11 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="20" height="20" rx="10" fill="black" />
<path d="M11.5062 13.9L14.0488 6.59998H11.6894L9.39999 13.9H11.5062Z" fill="url(#vpf_logo_paint0_linear)" />
<path d="M8.54255 13.9L5.99999 6.59998H8.35932L10.6488 13.9H8.54255Z" fill="white" />
<defs>
<linearGradient id="vpf_logo_paint0_linear" x1="12.9" y1="6.59998" x2="6.59999" y2="15.4" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="white" />
<stop offset="1" stop-color="white" stop-opacity="0" />
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 661 B

@@ -0,0 +1,11 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="20" height="20" rx="10" fill="white" />
<path d="M11.5062 13.9L14.0488 6.59998H11.6894L9.39999 13.9H11.5062Z" fill="url(#vpf_logo_paint0_linear)" />
<path d="M8.54255 13.9L5.99999 6.59998H8.35932L10.6488 13.9H8.54255Z" fill="black" />
<defs>
<linearGradient id="vpf_logo_paint0_linear" x1="12.9" y1="6.59998" x2="6.59999" y2="15.4" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="black" />
<stop offset="1" stop-color="black" stop-opacity="0" />
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

@@ -0,0 +1,42 @@
import $ from 'jquery';
import { debounce } from 'throttle-debounce';
let jetpackLazyImagesLoadEvent;
try {
jetpackLazyImagesLoadEvent = new Event('jetpack-lazy-images-load', {
bubbles: true,
cancelable: true,
});
} catch (e) {
jetpackLazyImagesLoadEvent = document.createEvent('Event');
jetpackLazyImagesLoadEvent.initEvent(
'jetpack-lazy-images-load',
true,
true
);
}
// Fix AJAX loaded images.
$(document).on('loadedNewItems.vpf', function (event) {
if (event.namespace !== 'vpf') {
return;
}
$('body').get(0).dispatchEvent(jetpackLazyImagesLoadEvent);
});
// Fix masonry reloading when Jetpack images lazy loaded.
// https://github.com/Automattic/jetpack/issues/9595
//
// p.s. it looks like this fix is not working at all in Safari browser.
const runReLayout = debounce(200, ($gallery) => {
$gallery.vpf('imagesLoaded');
});
$(document.body).on('jetpack-lazy-loaded-image', '.vp-portfolio', function () {
const $this = $(this).closest('.vp-portfolio');
if ($this && $this.length) {
runReLayout($this);
}
});
@@ -0,0 +1,115 @@
import $ from 'jquery';
const { SimpleBar, navigator } = window;
const $doc = $(document);
// Don't run on Mac and mobile devices.
const allowScrollbar =
!/Mac|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
navigator.userAgent
);
if (allowScrollbar && typeof SimpleBar !== 'undefined') {
// Extend VP class.
$doc.on('extendClass.vpf', (event, VP) => {
if (event.namespace !== 'vpf') {
return;
}
/**
* Init Simplebar plugin
*/
VP.prototype.initCustomScrollbar = function () {
const self = this;
self.emitEvent('beforeInitCustomScrollbar');
self.$items_wrap
.find('.vp-portfolio__custom-scrollbar')
.each(function () {
const instance = SimpleBar.instances.get(this);
if (!instance) {
new SimpleBar(this);
}
});
self.emitEvent('initCustomScrollbar');
};
/**
* Destroy Simplebar plugin
*/
VP.prototype.destroyCustomScrollbar = function () {
const self = this;
self.$items_wrap
.find('[data-simplebar="init"].vp-portfolio__custom-scrollbar')
.each(function () {
const instance = SimpleBar.instances.get(this);
if (instance) {
instance.unMount();
}
});
self.emitEvent('destroyCustomScrollbar');
};
});
// Add Items.
$doc.on('addItems.vpf', (event, self, $items, removeExisting) => {
if (event.namespace !== 'vpf') {
return;
}
if (removeExisting) {
self.destroyCustomScrollbar();
}
self.initCustomScrollbar();
});
// Init.
$doc.on('init.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.initCustomScrollbar();
});
// Destroy.
$doc.on('destroy.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.destroyCustomScrollbar();
});
// Init Swiper duplicated slides scrollbars.
$doc.on('initSwiper.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
if (self.options.sliderLoop === 'true') {
self.initCustomScrollbar();
}
});
// Fix Simplebar content size in some themes.
// For example, in Astra theme in content with enabled sidebar, Simplebar calculate wrong height automatically.
$(() => {
$('[data-simplebar="init"].vp-portfolio__custom-scrollbar').each(
function () {
const instance = SimpleBar.instances.get(this);
if (instance) {
instance.recalculate();
}
}
);
});
}
@@ -0,0 +1,165 @@
import $ from 'jquery';
const $wnd = $(window);
/**
* Check if lines cross
*
* @param {Object} a - first point of the first line
* @param {Object} b - second point of the first line
* @param {Object} c - first point of the second line
* @param {Object} d - second point of the second line
*
* @return {boolean} cross lines
*/
function isCrossLine(a, b, c, d) {
// Working code #1:
//
// var common = (b.x - a.x)*(d.y - c.y) - (b.y - a.y)*(d.x - c.x);
// if (common === 0) {
// return false;
// }
//
// var rH = (a.y - c.y)*(d.x - c.x) - (a.x - c.x)*(d.y - c.y);
// var sH = (a.y - c.y)*(b.x - a.x) - (a.x - c.x)*(b.y - a.y);
//
// var r = rH / common;
// var s = sH / common;
//
// return r >= 0 && r <= 1 && s >= 0 && s <= 1;
// Working code #2:
const v1 = (d.x - c.x) * (a.y - c.y) - (d.y - c.y) * (a.x - c.x);
const v2 = (d.x - c.x) * (b.y - c.y) - (d.y - c.y) * (b.x - c.x);
const v3 = (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
const v4 = (b.x - a.x) * (d.y - a.y) - (b.y - a.y) * (d.x - a.x);
return v1 * v2 <= 0 && v3 * v4 <= 0;
}
// Init Events.
$(document).on('initEvents.vpf', (event, self) => {
if (event.namespace !== 'vpf' || self.options.itemsStyle !== 'fly') {
return;
}
const evp = `.vpf-uid-${self.uid}`;
// determine cursor position
let lastCursorPos = {};
$wnd.on(`mousemove${evp}`, (e) => {
lastCursorPos = {
x: e.clientX,
y: e.clientY,
};
});
self.$item.on(
`mouseenter${evp} mouseleave${evp}`,
'.vp-portfolio__item',
function (e) {
const $this = $(this);
const itemRect = $this[0].getBoundingClientRect();
const $overlay = $this.find('.vp-portfolio__item-overlay');
const enter = e.type === 'mouseenter';
let endX = '0%';
let endY = '0%';
const curCursorPos = {
x: e.clientX,
y: e.clientY,
};
// find the corner that placed on cursor path.
let isUp = isCrossLine(
{ x: itemRect.left, y: itemRect.top },
{ x: itemRect.left + itemRect.width, y: itemRect.top },
curCursorPos,
lastCursorPos
);
let isDown = isCrossLine(
{ x: itemRect.left, y: itemRect.top + itemRect.height },
{
x: itemRect.left + itemRect.width,
y: itemRect.top + itemRect.height,
},
curCursorPos,
lastCursorPos
);
let isLeft = isCrossLine(
{ x: itemRect.left, y: itemRect.top },
{ x: itemRect.left, y: itemRect.top + itemRect.height },
curCursorPos,
lastCursorPos
);
let isRight = isCrossLine(
{ x: itemRect.left + itemRect.width, y: itemRect.top },
{
x: itemRect.left + itemRect.width,
y: itemRect.top + itemRect.height,
},
curCursorPos,
lastCursorPos
);
// Sometimes isCrossLine returned false, so we need to check direction manually (less accurate, but it is not a big problem).
if (!isUp && !isDown && !isLeft && !isRight) {
const x =
(itemRect.width / 2 - curCursorPos.x + itemRect.left) /
(itemRect.width / 2);
const y =
(itemRect.height / 2 - curCursorPos.y + itemRect.top) /
(itemRect.height / 2);
if (Math.abs(x) > Math.abs(y)) {
if (x > 0) {
isLeft = true;
} else {
isRight = true;
}
} else if (y > 0) {
isUp = true;
} else {
isDown = true;
}
}
if (isUp) {
endY = '-100.1%';
} else if (isDown) {
endY = '100.1%';
} else if (isLeft) {
endX = '-100.1%';
} else if (isRight) {
endX = '100.1%';
}
if (enter) {
$overlay.css({
transition: 'none',
transform: `translateX(${endX}) translateY(${endY}) translateZ(0)`,
});
// Trigger a reflow, flushing the CSS changes. This need to fix some glithes in Safari and Firefox.
// Info here - https://stackoverflow.com/questions/11131875/what-is-the-cleanest-way-to-disable-css-transition-effects-temporarily
// eslint-disable-next-line no-unused-expressions
$overlay[0].offsetHeight;
}
$overlay.css({
transition: '.2s transform ease-in-out',
transform: `translateX(${enter ? '0%' : endX}) translateY(${
enter ? '0%' : endY
}) translateZ(0)`,
});
}
);
});
// Destroy Events.
$(document).on('destroyEvents.vpf', (event, self) => {
if (event.namespace !== 'vpf' || self.options.itemsStyle !== 'fly') {
return;
}
const evp = `.vpf-uid-${self.uid}`;
$wnd.off(`mousemove${evp}`);
self.$item.off(`mouseenter${evp} mouseleave${evp}`);
});
@@ -0,0 +1,183 @@
import $ from 'jquery';
const { screenSizes } = window.VPData;
//
// Our custom Grid layout for Isotope.
//
// * fixes grid items position in FireFox - https://wordpress.org/support/topic/gallery-difference-between-firefox-and-all-other-browsers/
//
if (
typeof window.Isotope !== 'undefined' &&
typeof window.Isotope.LayoutMode !== 'undefined'
) {
const VPRows = window.Isotope.LayoutMode.create('vpRows');
const proto = VPRows.prototype;
proto.measureColumns = function () {
// set items, used if measuring first item
this.items = this.isotope.filteredItems;
this.getContainerWidth();
// if columnWidth is 0, default to outerWidth of first item
if (!this.columnWidth) {
const firstItem = this.items[0];
const firstItemElem = firstItem && firstItem.element;
// columnWidth fall back to item of first element
this.columnWidth =
(firstItemElem && window.getSize(firstItemElem).outerWidth) ||
// if first elem has no width, default to size of container
this.containerWidth;
}
this.columnWidth += this.gutter;
// calculate columns
const containerWidth = this.containerWidth + this.gutter;
let cols = containerWidth / this.columnWidth;
// fix rounding errors, typically with gutters
const excess = this.columnWidth - (containerWidth % this.columnWidth);
// if overshoot is less than a pixel, round up, otherwise floor it
const mathMethod = excess && excess < 1 ? 'round' : 'floor';
cols = Math[mathMethod](cols);
this.cols = Math.max(cols, 1);
};
proto.getContainerWidth = function () {
// container is parent if fit width
const isFitWidth = this._getOption
? this._getOption('fitWidth')
: false;
const container = isFitWidth ? this.element.parentNode : this.element;
// check that this.size and size are there
// IE8 triggers resize on body size change, so they might not be
const size = window.getSize(container);
this.containerWidth = size && size.innerWidth;
};
proto._resetLayout = function () {
this.x = 0;
this.y = 0;
this.maxY = 0;
this.horizontalColIndex = 0;
this._getMeasurement('columnWidth', 'outerWidth');
this._getMeasurement('gutter', 'outerWidth');
this.measureColumns();
};
proto._getItemLayoutPosition = function (item) {
item.getSize();
// how many columns does this brick span
const remainder = item.size.outerWidth % this.columnWidth;
const mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';
// round if off by 1 pixel, otherwise use ceil
let colSpan = Math[mathMethod](item.size.outerWidth / this.columnWidth);
colSpan = Math.min(colSpan, this.cols);
let col = this.horizontalColIndex % this.cols;
const isOver = colSpan > 1 && col + colSpan > this.cols;
// shift to next row if item can't fit on current row
col = isOver ? 0 : col;
// don't let zero-size items take up space
const hasSize = item.size.outerWidth && item.size.outerHeight;
this.horizontalColIndex = hasSize
? col + colSpan
: this.horizontalColIndex;
const itemWidth = item.size.outerWidth + this.gutter;
// if this element cannot fit in the current row
if (this.x !== 0 && this.horizontalColIndex === 1) {
this.x = 0;
this.y = this.maxY;
}
const position = {
x: this.x,
y: this.y,
};
this.maxY = Math.max(this.maxY, this.y + item.size.outerHeight);
this.x += itemWidth;
return position;
};
proto._getContainerSize = function () {
return { height: this.maxY };
};
}
// Init Options.
$(document).on('initOptions.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.defaults.gridColumns = 3;
if (!self.options.gridColumns) {
self.options.gridColumns = self.defaults.gridColumns;
}
if (!self.options.gridImagesAspectRatio) {
self.options.gridImagesAspectRatio =
self.defaults.gridImagesAspectRatio;
}
});
// Init Layout.
$(document).on('initLayout.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
if (self.options.layout !== 'grid') {
return;
}
// columns.
self.addStyle('.vp-portfolio__item-wrap', {
width: `${100 / self.options.gridColumns}%`,
});
// calculate responsive.
let count = self.options.gridColumns - 1;
let currentPoint = Math.min(screenSizes.length - 1, count);
for (; currentPoint >= 0; currentPoint -= 1) {
if (count > 0 && typeof screenSizes[currentPoint] !== 'undefined') {
self.addStyle(
'.vp-portfolio__item-wrap',
{
width: `${100 / count}%`,
},
`screen and (max-width: ${screenSizes[currentPoint]}px)`
);
}
count -= 1;
}
});
// Change Isotope Layout Mode.
$(document).on('beforeInitIsotope.vpf', (event, self, initOptions) => {
if (event.namespace !== 'vpf') {
return;
}
if (self.options.layout !== 'grid' || typeof initOptions !== 'object') {
return;
}
initOptions.layoutMode = 'vpRows';
});
@@ -0,0 +1,19 @@
import $ from 'jquery';
// Init Options.
$(document).on('initOptions.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.defaults.justifiedRowHeight = 250;
self.defaults.justifiedRowHeightTolerance = 0.25;
if (!self.options.justifiedRowHeight) {
self.options.justifiedRowHeight = self.defaults.justifiedRowHeight;
}
if (!self.options.justifiedRowHeightTolerance) {
self.options.justifiedRowHeightTolerance =
self.defaults.justifiedRowHeightTolerance;
}
});
@@ -0,0 +1,53 @@
import $ from 'jquery';
const { screenSizes } = window.VPData;
// Init Options.
$(document).on('initOptions.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.defaults.masonryColumns = 3;
if (!self.options.masonryColumns) {
self.options.masonryColumns = self.defaults.masonryColumns;
}
if (!self.options.masonryImagesAspectRatio) {
self.options.masonryImagesAspectRatio =
self.defaults.masonryImagesAspectRatio;
}
});
// Init Layout.
$(document).on('initLayout.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
if (self.options.layout !== 'masonry') {
return;
}
// columns.
self.addStyle('.vp-portfolio__item-wrap', {
width: `${100 / self.options.masonryColumns}%`,
});
// calculate responsive.
let count = self.options.masonryColumns - 1;
let currentPoint = Math.min(screenSizes.length - 1, count);
for (; currentPoint >= 0; currentPoint -= 1) {
if (count > 0 && typeof screenSizes[currentPoint] !== 'undefined') {
self.addStyle(
'.vp-portfolio__item-wrap',
{
width: `${100 / count}%`,
},
`screen and (max-width: ${screenSizes[currentPoint]}px)`
);
}
count -= 1;
}
});
@@ -0,0 +1,152 @@
import isNumber from 'is-number';
import $ from 'jquery';
import { throttle } from 'throttle-debounce';
const { ResizeObserver } = window;
// Listen for slider width change to calculate dynamic height of images.
const dynamicHeightObserver = new ResizeObserver(
throttle(100, (entries) => {
entries.forEach(({ target }) => {
if (target && target.vpf) {
const self = target.vpf;
const calculatedHeight =
(self.$item.width() *
parseFloat(self.options.sliderItemsHeight)) /
100;
target
.querySelector('.vp-portfolio__items-wrap')
.style.setProperty(
'--vp-layout-slider--auto-items__height',
`${calculatedHeight}px`
);
}
});
})
);
// Init Layout.
$(document).on('initLayout.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
if (self.options.layout !== 'slider') {
return;
}
['items', 'thumbnails'].forEach((type) => {
let itemsHeight =
type === 'items'
? self.options.sliderItemsHeight
: self.options.sliderThumbnailsHeight;
if (itemsHeight === 'auto') {
return;
}
const typeSingle = type.replace(/s$/g, '');
let itemsMinHeight =
type === 'items' ? self.options.sliderItemsMinHeight : 0;
itemsHeight = isNumber(itemsHeight) ? `${itemsHeight}px` : itemsHeight;
// prevent minHeight option in preview, when used 'vh' units.
if (itemsMinHeight && self.isPreview() && /vh/.test(itemsMinHeight)) {
itemsMinHeight = 0;
}
const itemsPerView =
type === 'items'
? self.options.sliderSlidesPerView
: self.options.sliderThumbnailsPerView;
if (itemsPerView === 'auto') {
// fix fade slider items width.
// https://github.com/nk-crew/visual-portfolio/issues/95.
let itemsWidth = 'auto';
if (type === 'items' && self.options.sliderEffect === 'fade') {
itemsWidth = '100%';
}
// Calculate dynamic height.
// Previously we tried the pure CSS solution, but there was couple bugs like:
// - Classic styles items wrong height
// - FireFox wrong images width render
if (itemsHeight.indexOf('%') === itemsHeight.length - 1) {
dynamicHeightObserver.observe(self.$item[0]);
// Static height.
} else {
self.addStyle(`.vp-portfolio__${type}-wrap`, {
'--vp-layout-slider--auto-items__height': itemsHeight,
});
}
self.addStyle(`.vp-portfolio__${typeSingle}-wrap`, {
width: 'auto',
});
self.addStyle(
`.vp-portfolio__${typeSingle} .vp-portfolio__${typeSingle}-img img`,
{
width: itemsWidth,
height: 'var(--vp-layout-slider--auto-items__height)',
}
);
// min height.
if (itemsMinHeight) {
self.addStyle(
`.vp-portfolio__${typeSingle} .vp-portfolio__${typeSingle}-img img`,
{
'min-height': itemsMinHeight,
}
);
}
} else {
// We have to use this hack with Before to support Dynamic height.
// Also, previously we used the `margin-top`,
// but it is not working correctly with Items Mininmal Height option.
self.addStyle(`.vp-portfolio__${typeSingle}-img-wrap::before`, {
'padding-top': itemsHeight,
});
self.addStyle(`.vp-portfolio__${typeSingle}-img img`, {
position: 'absolute',
top: 0,
right: 0,
bottom: 0,
left: 0,
});
self.addStyle(`.vp-portfolio__${typeSingle}-img`, {
position: 'absolute',
top: 0,
right: 0,
bottom: 0,
left: 0,
});
self.addStyle(
`.vp-portfolio__${typeSingle} .vp-portfolio__${typeSingle}-img img`,
{
width: '100%',
height: '100%',
}
);
// min height.
if (itemsMinHeight) {
self.addStyle(`.vp-portfolio__${typeSingle}-img-wrap::before`, {
'min-height': itemsMinHeight,
});
}
}
});
// thumbnails top gap.
if (self.options.sliderThumbnailsGap) {
self.addStyle('.vp-portfolio__thumbnails-wrap', {
'margin-top': `${self.options.sliderThumbnailsGap}px`,
});
}
});
@@ -0,0 +1,179 @@
import $ from 'jquery';
const { screenSizes } = window.VPData;
// fix masonry items position for Tiles layout.
// https://github.com/nk-crew/visual-portfolio/issues/111
if (
typeof window.Isotope !== 'undefined' &&
typeof window.Isotope.LayoutMode !== 'undefined'
) {
const MasonryMode = window.Isotope.LayoutMode.modes.masonry;
if (MasonryMode) {
const defaultMeasureColumns = MasonryMode.prototype.measureColumns;
MasonryMode.prototype.measureColumns = function () {
let runDefault = true;
// if columnWidth is 0, default to columns count size.
if (!this.columnWidth) {
const $vp = $(this.element).closest(
'.vp-portfolio[data-vp-layout="tiles"]'
);
// change column size for Tiles type only.
if ($vp.length && $vp[0].vpf) {
this.getContainerWidth();
const { vpf } = $vp[0];
const settings = vpf.getTilesSettings();
// get columns number
let columns = parseInt(settings[0], 10) || 1;
// calculate responsive.
let count = columns - 1;
let currentPoint = Math.min(screenSizes.length - 1, count);
for (; currentPoint >= 0; currentPoint -= 1) {
if (
count > 0 &&
typeof screenSizes[currentPoint] !== 'undefined'
) {
if (
window.innerWidth <= screenSizes[currentPoint]
) {
columns = count;
}
}
count -= 1;
}
if (columns) {
this.columnWidth = this.containerWidth / columns;
this.columnWidth += this.gutter;
this.cols = columns;
runDefault = false;
}
}
}
if (runDefault) {
defaultMeasureColumns.call(this);
}
};
}
}
// Extend VP class.
$(document).on('extendClass.vpf', (event, VP) => {
if (event.namespace !== 'vpf') {
return;
}
/**
* Get Tiles Layout Settings
*
* @return {string} tiles layout
*/
VP.prototype.getTilesSettings = function () {
const self = this;
const layoutArr = self.options.tilesType.split(/[:|]/);
// remove last empty item
if (
typeof layoutArr[layoutArr.length - 1] !== 'undefined' &&
!layoutArr[layoutArr.length - 1]
) {
layoutArr.pop();
}
return layoutArr;
};
});
// Init Options.
$(document).on('initOptions.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.defaults.tilesType = '3|1,1|';
if (!self.options.tilesType) {
self.options.tilesType = self.defaults.tilesType;
}
});
// Init Layout.
$(document).on('initLayout.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
if (self.options.layout !== 'tiles') {
return;
}
const settings = self.getTilesSettings();
// get columns number
const columns = parseInt(settings[0], 10) || 1;
settings.shift();
// set columns
self.addStyle('.vp-portfolio__item-wrap', {
width: `${100 / columns}%`,
});
// set items sizes
if (settings && settings.length) {
for (let k = 0; k < settings.length; k += 1) {
const size = settings[k].split(',');
const w = parseFloat(size[0]) || 1;
const h = parseFloat(size[1]) || 1;
let itemSelector = '.vp-portfolio__item-wrap';
if (settings.length > 1) {
itemSelector += `:nth-of-type(${settings.length}n+${k + 1})`;
}
if (w && w !== 1) {
self.addStyle(itemSelector, {
width: `${(w * 100) / columns}%`,
});
}
self.addStyle(
`${itemSelector} .vp-portfolio__item-img-wrap::before`,
{
'padding-top': `${h * 100}%`,
}
);
}
}
// calculate responsive.
let count = columns - 1;
let currentPoint = Math.min(screenSizes.length - 1, count);
for (; currentPoint >= 0; currentPoint -= 1) {
if (count > 0 && typeof screenSizes[currentPoint] !== 'undefined') {
self.addStyle(
'.vp-portfolio__item-wrap',
{
width: `${100 / count}%`,
},
`screen and (max-width: ${screenSizes[currentPoint]}px)`
);
self.addStyle(
'.vp-portfolio__item-wrap:nth-of-type(n)',
{
width: `${100 / count}%`,
},
`screen and (max-width: ${screenSizes[currentPoint]}px)`
);
}
count -= 1;
}
});
@@ -0,0 +1,26 @@
/*
* Visual Portfolio images lazy load fallback for browsers
* which does not support CSS :has()
*/
// Lazyloaded - remove preloader images placeholder effect.
document.addEventListener('lazybeforeunveil', (e) => {
const vpfImgWrapper = e.target.closest(
'.vp-portfolio__item-img, .vp-portfolio__thumbnail-img'
);
if (vpfImgWrapper) {
vpfImgWrapper.classList.add('vp-has-lazyloading');
}
});
document.addEventListener('lazyloaded', (e) => {
const vpfImgWrapper = e.target.closest(
'.vp-portfolio__item-img, .vp-portfolio__thumbnail-img'
);
if (vpfImgWrapper) {
vpfImgWrapper.classList.add('vp-has-lazyloaded');
vpfImgWrapper.classList.add('vp-has-lazyloading');
}
});
@@ -0,0 +1,26 @@
// Recalculate image size if parent is <picture>
document.addEventListener('lazybeforesizes', (e) => {
// for some reason sometimes e.detail is undefined, so we need to check it.
if (!e.detail || !e.detail.width || !e.target) {
return;
}
const parent = e.target.closest(':not(picture)');
if (parent) {
e.detail.width = parent.clientWidth || e.detail.width;
}
});
/**
* Remove <noscript> tag.
* Some of optimization plugin make something, that killed our styles with noscript tag.
* Related topic: https://wordpress.org/support/topic/visual-portfolio-and-sg-optimizer-dont-play-well/
*/
document.addEventListener('lazybeforeunveil', (e) => {
const prevEl = e.target.previousElementSibling;
if (prevEl && prevEl.matches('noscript')) {
prevEl.remove();
}
});
@@ -0,0 +1,12 @@
window.lazySizesConfig = window.lazySizesConfig || {};
window.lazySizesConfig = {
...window.lazySizesConfig,
lazyClass: 'vp-lazyload',
loadedClass: 'vp-lazyloaded',
preloadClass: 'vp-lazypreload',
loadingClass: 'vp-lazyloading',
srcAttr: 'data-src',
srcsetAttr: 'data-srcset',
sizesAttr: 'data-sizes',
};
@@ -0,0 +1,67 @@
(function (window, factory) {
const globalInstall = function () {
factory(window.lazySizes);
window.removeEventListener('lazyunveilread', globalInstall, true);
};
factory = factory.bind(null, window, window.document);
if (window.lazySizes) {
globalInstall();
} else {
window.addEventListener('lazyunveilread', globalInstall, true);
}
})(window, (window, document, lazySizes) => {
if (!window.addEventListener) {
return;
}
const getCSS = function (elem) {
return window.getComputedStyle(elem, null) || {};
};
const objectFitCover = {
calculateSize(element, width) {
const CSS = getCSS(element);
if (CSS && CSS.objectFit && CSS.objectFit === 'cover') {
const blockHeight = parseInt(
element.getAttribute('height'),
10
);
const blockWidth = parseInt(element.getAttribute('width'), 10);
if (blockHeight) {
if (
blockWidth / blockHeight >
element.clientWidth / element.clientHeight
) {
width = parseInt(
(element.clientHeight * blockWidth) / blockHeight,
10
);
}
}
}
return width;
},
};
lazySizes.objectFitCover = objectFitCover;
document.addEventListener('lazybeforesizes', (e) => {
// for some reason sometimes e.detail is undefined, so we need to check it.
if (
e.defaultPrevented ||
!e.detail ||
!e.detail.width ||
!e.target ||
e.detail.instance !== lazySizes
) {
return;
}
const element = e.target;
e.detail.width = objectFitCover.calculateSize(element, e.detail.width);
});
});
@@ -0,0 +1,91 @@
/**
* Load duplicated Swiper slides to prevent images "blink" effect after swipe.
*
* @param window
* @param factory
*/
(function (window, factory) {
const globalInstall = function () {
factory(window.lazySizes);
window.removeEventListener('lazyunveilread', globalInstall, true);
};
factory = factory.bind(null, window, window.document);
if (window.lazySizes) {
globalInstall();
} else {
window.addEventListener('lazyunveilread', globalInstall, true);
}
})(window, (window, document, lazySizes) => {
if (!window.addEventListener) {
return;
}
const { unveil } = lazySizes.loader;
const getSiblings = (el, filter) =>
[...el.parentNode.children].filter(
(child) =>
child.nodeType === 1 &&
child !== el &&
(!filter || child.matches(filter))
);
const swiperDuplicatesLoad = {
getSlideData(element) {
const $el = element.closest('.swiper-slide');
const slideIndex = $el
? $el.getAttribute('data-swiper-slide-index')
: false;
return {
$el,
slideIndex,
};
},
run(element) {
const slideData = this.getSlideData(element);
if (slideData.slideIndex) {
const $siblingDuplicates = getSiblings(
slideData.$el,
`[data-swiper-slide-index="${slideData.slideIndex}"]`
);
$siblingDuplicates.forEach((el) => {
// We should also get images in `loading` state, because in some rare situations
// duplicated images by default has this class and not displaying correctly.
const $images = el.querySelectorAll(
'img.vp-lazyload, img.vp-lazyloading'
);
if ($images) {
$images.forEach(($img) => {
unveil($img);
});
}
});
}
return true;
},
};
lazySizes.swiperDuplicatesLoad = swiperDuplicatesLoad;
document.addEventListener('lazyloaded', (e) => {
// for some reason sometimes e.detail is undefined, so we need to check it.
if (
e.defaultPrevented ||
!e.detail ||
e.detail.swiperDuplicatesChecked ||
!e.target ||
e.detail.instance !== lazySizes
) {
return;
}
const element = e.target;
e.detail.swiperDuplicatesChecked = swiperDuplicatesLoad.run(element);
});
});
@@ -0,0 +1,995 @@
import $ from 'jquery';
import rafSchd from 'raf-schd';
import { throttle } from 'throttle-debounce';
const { VPData } = window;
const { __ } = VPData;
const $wnd = $(window);
/**
* Emit Resize Event.
*/
function windowResizeEmit() {
if (typeof window.Event === 'function') {
// modern browsers
window.dispatchEvent(new window.Event('resize'));
} else {
// for IE and other old browsers
// causes deprecation warning on modern browsers
const evt = window.document.createEvent('UIEvents');
evt.initUIEvent('resize', true, false, window, 0);
window.dispatchEvent(evt);
}
}
const visibilityData = {};
let shouldCheckVisibility = false;
let checkVisibilityTimeout = false;
let isFocusVisible = false;
// fix portfolio inside Tabs and Accordions
// check visibility by timer https://stackoverflow.com/questions/19669786/check-if-element-is-visible-in-dom/33456469
//
// https://github.com/nk-crew/visual-portfolio/issues/11
// https://github.com/nk-crew/visual-portfolio/issues/113
function checkVisibility() {
clearTimeout(checkVisibilityTimeout);
if (!shouldCheckVisibility) {
return;
}
const $items = $('.vp-portfolio__ready');
if ($items.length) {
let isVisibilityChanged = false;
$items.each(function () {
const { vpf } = this;
if (!vpf) {
return;
}
const currentState = visibilityData[vpf.uid] || 'none';
visibilityData[vpf.uid] =
this.offsetParent === null ? 'hidden' : 'visible';
// changed from hidden to visible.
if (
currentState === 'hidden' &&
visibilityData[vpf.uid] === 'visible'
) {
isVisibilityChanged = true;
}
});
// resize, if visibility changed.
if (isVisibilityChanged) {
windowResizeEmit();
}
} else {
shouldCheckVisibility = false;
}
// run again.
checkVisibilityTimeout = setTimeout(checkVisibility, 500);
}
// run check function only after portfolio inited.
$(document).on('inited.vpf', (event) => {
if (event.namespace !== 'vpf') {
return;
}
shouldCheckVisibility = true;
checkVisibility();
});
/**
* If the most recent user interaction was via the keyboard;
* and the key press did not include a meta, alt/option, or control key;
* then the modality is keyboard. Otherwise, the modality is not keyboard.
*/
document.addEventListener(
'keydown',
function (e) {
if (e.metaKey || e.altKey || e.ctrlKey) {
return;
}
isFocusVisible = true;
},
true
);
/**
* If at any point a user clicks with a pointing device, ensure that we change
* the modality away from keyboard.
* This avoids the situation where a user presses a key on an already focused
* element, and then clicks on a different element, focusing it with a
* pointing device, while we still think we're in keyboard modality.
*/
document.addEventListener(
'mousedown',
() => {
isFocusVisible = false;
},
true
);
document.addEventListener(
'pointerdown',
() => {
isFocusVisible = false;
},
true
);
document.addEventListener(
'touchstart',
() => {
isFocusVisible = false;
},
true
);
/**
* Main VP class
*/
class VP {
constructor($item, userOptions) {
const self = this;
self.$item = $item;
// get id from class
const classes = $item[0].className.split(/\s+/);
for (let k = 0; k < classes.length; k += 1) {
if (classes[k] && /^vp-uid-/.test(classes[k])) {
self.uid = classes[k].replace(/^vp-uid-/, '');
}
if (classes[k] && /^vp-id-/.test(classes[k])) {
self.id = classes[k].replace(/^vp-id-/, '');
}
}
if (!self.uid) {
// eslint-disable-next-line no-console
console.error(__.couldnt_retrieve_vp);
return;
}
self.href = window.location.href;
self.$items_wrap = $item.find('.vp-portfolio__items');
self.$slider_thumbnails_wrap = $item.find('.vp-portfolio__thumbnails');
self.$pagination = $item.find('.vp-portfolio__pagination-wrap');
self.$filter = $item.find('.vp-portfolio__filter-wrap');
self.$sort = $item.find('.vp-portfolio__sort-wrap');
// find single filter block.
if (self.id) {
self.$filter = self.$filter.add(
`.vp-single-filter.vp-id-${self.id} .vp-portfolio__filter-wrap`
);
}
// find single sort block.
if (self.id) {
self.$sort = self.$sort.add(
`.vp-single-sort.vp-id-${self.id} .vp-portfolio__sort-wrap`
);
}
// user options
self.userOptions = userOptions;
self.firstRun = true;
self.init();
}
// emit event
// Example:
// $(document).on('init.vpf', function (event, infiniteObject) {
// console.log(infiniteObject);
// });
emitEvent(event, data) {
data = data ? [this].concat(data) : [this];
this.$item.trigger(`${event}.vpf`, data);
this.$item.trigger(`${event}.vpf-uid-${this.uid}`, data);
}
/**
* Init
*/
init() {
const self = this;
// destroy if already inited
if (!self.firstRun) {
self.destroy();
}
self.destroyed = false;
self.$item.addClass('vp-portfolio__ready');
// init options
self.initOptions();
// init events
self.initEvents();
// init layout
self.initLayout();
// init custom colors
self.initCustomColors();
self.emitEvent('init');
if (self.id) {
$(`.vp-single-filter.vp-id-${self.id}`)
.addClass('vp-single-filter__ready')
.parent('.vp-portfolio__layout-elements')
.addClass('vp-portfolio__layout-elements__ready');
$(`.vp-single-sort.vp-id-${self.id}`)
.addClass('vp-single-sort__ready')
.parent('.vp-portfolio__layout-elements')
.addClass('vp-portfolio__layout-elements__ready');
}
// resized
self.resized();
// images loaded
self.imagesLoaded();
self.emitEvent('inited');
self.firstRun = false;
}
/**
* Check if script loaded in preview.
*
* @return {boolean} is in preview.
*/
isPreview() {
const self = this;
return !!self.$item.closest('#vp_preview').length;
}
/**
* Called after resized container.
*/
resized() {
windowResizeEmit();
this.emitEvent('resized');
}
/**
* Images loaded.
*/
imagesLoaded() {
const self = this;
if (!self.$items_wrap.imagesLoaded) {
return;
}
self.$items_wrap.imagesLoaded().progress(() => {
this.emitEvent('imagesLoaded');
});
}
/**
* Destroy
*/
destroy() {
const self = this;
// remove loaded class
self.$item.removeClass('vp-portfolio__ready');
if (self.id) {
$(`.vp-single-filter.vp-id-${self.id}`)
.removeClass('vp-single-filter__ready')
.parent('.vp-portfolio__layout-elements')
.removeClass('vp-portfolio__layout-elements__ready');
$(`.vp-single-sort.vp-id-${self.id}`)
.removeClass('vp-single-sort__ready')
.parent('.vp-portfolio__layout-elements')
.removeClass('vp-portfolio__layout-elements__ready');
}
// destroy events
self.destroyEvents();
// remove all generated styles
self.removeStyle();
self.renderStyle();
self.emitEvent('destroy');
self.destroyed = true;
}
/**
* Add style to the current portfolio list
*
* @param {string} selector css selector
* @param {string} styles object with styles
* @param {string} media string with media query
*/
addStyle(selector, styles, media) {
media = media || '';
const self = this;
const { uid } = self;
if (!self.stylesList) {
self.stylesList = {};
}
if (typeof self.stylesList[uid] === 'undefined') {
self.stylesList[uid] = {};
}
if (typeof self.stylesList[uid][media] === 'undefined') {
self.stylesList[uid][media] = {};
}
if (typeof self.stylesList[uid][media][selector] === 'undefined') {
self.stylesList[uid][media][selector] = {};
}
self.stylesList[uid][media][selector] = $.extend(
self.stylesList[uid][media][selector],
styles
);
self.emitEvent('addStyle', [selector, styles, media, self.stylesList]);
}
/**
* Remove style from the current portfolio list
*
* @param {string} selector css selector (if not set - removed all styles)
* @param {string} styles object with styles
* @param {string} media string with media query
*/
removeStyle(selector, styles, media) {
media = media || '';
const self = this;
const { uid } = self;
if (!self.stylesList) {
self.stylesList = {};
}
if (typeof self.stylesList[uid] !== 'undefined' && !selector) {
self.stylesList[uid] = {};
}
if (
typeof self.stylesList[uid] !== 'undefined' &&
typeof self.stylesList[uid][media] !== 'undefined' &&
typeof self.stylesList[uid][media][selector] !== 'undefined' &&
selector
) {
delete self.stylesList[uid][media][selector];
}
self.emitEvent('removeStyle', [selector, styles, self.stylesList]);
}
/**
* Render style for the current portfolio list
*/
renderStyle() {
const self = this;
// timeout for the case, when styles added one by one
const { uid } = self;
let stylesString = '';
if (!self.stylesList) {
self.stylesList = {};
}
// create string with styles
if (typeof self.stylesList[uid] !== 'undefined') {
Object.keys(self.stylesList[uid]).forEach((m) => {
// media
if (m) {
stylesString += `@media ${m} {`;
}
Object.keys(self.stylesList[uid][m]).forEach((s) => {
// selector
const selectorParent = `.vp-uid-${uid}`;
let selector = `${selectorParent} ${s}`;
// add parent selector after `,`.
selector = selector.replace(
/, |,/g,
`, ${selectorParent} `
);
stylesString += `${selector} {`;
Object.keys(self.stylesList[uid][m][s]).forEach((p) => {
// property and value
stylesString += `${p}:${self.stylesList[uid][m][s][p]};`;
});
stylesString += '}';
});
// media
if (m) {
stylesString += '}';
}
});
}
// add in style tag
let $style = $(`#vp-style-${uid}`);
if (!$style.length) {
$style = $('<style>')
.attr('id', `vp-style-${uid}`)
.appendTo('head');
}
$style.html(stylesString);
self.emitEvent('renderStyle', [stylesString, self.stylesList, $style]);
}
/**
* First char to lower case
*
* @param {string} str string to transform
* @return {string} result string
*/
firstToLowerCase(str) {
return str.substr(0, 1).toLowerCase() + str.substr(1);
}
/**
* Init options
*
* @param {Object} userOptions user options
*/
initOptions(userOptions) {
const self = this;
// default options
self.defaults = {
layout: 'tile',
itemsGap: 0,
pagination: 'load-more',
};
// new user options
if (userOptions) {
self.userOptions = userOptions;
}
// prepare data options
const dataOptions = self.$item[0].dataset;
const pureDataOptions = {};
Object.keys(dataOptions).forEach((k) => {
if (k && k.substring(0, 2) === 'vp') {
pureDataOptions[self.firstToLowerCase(k.substring(2))] =
dataOptions[k];
}
});
self.options = $.extend(
{},
self.defaults,
pureDataOptions,
self.userOptions
);
self.emitEvent('initOptions');
}
/**
* Init events
*/
initEvents() {
const self = this;
const evp = `.vpf-uid-${self.uid}`;
// Stretch
function stretch() {
const rect = self.$item[0].getBoundingClientRect();
const { left } = rect;
const right = window.innerWidth - rect.right;
const ml = parseFloat(self.$item.css('margin-left') || 0);
const mr = parseFloat(self.$item.css('margin-right') || 0);
self.$item.css({
marginLeft: ml - left,
marginRight: mr - right,
maxWidth: 'none',
width: 'auto',
});
}
if (self.$item.hasClass('vp-portfolio__stretch') && !self.isPreview()) {
$wnd.on(`load${evp} resize${evp} orientationchange${evp}`, () => {
stretch();
});
stretch();
}
// add helper focus class
// TODO: change to CSS :has() when will be widely available
// @link https://caniuse.com/?search=%3Ahas
self.$item.on(`focus${evp}`, '.vp-portfolio__item a', function () {
const $item = $(this).closest('.vp-portfolio__item');
$item.addClass('vp-portfolio__item-focus');
if (isFocusVisible) {
$item.addClass('vp-portfolio__item-focus-visible');
}
});
self.$item.on(`blur${evp}`, '.vp-portfolio__item a', function () {
$(this)
.closest('.vp-portfolio__item')
.removeClass(
'vp-portfolio__item-focus vp-portfolio__item-focus-visible'
);
});
// on filter click
self.$filter.on(
`click${evp}`,
'.vp-filter .vp-filter__item a',
function (e) {
e.preventDefault();
const $this = $(this);
if (!self.loading) {
$this
.closest('.vp-filter__item')
.addClass('vp-filter__item-active')
.siblings()
.removeClass('vp-filter__item-active');
}
self.loadNewItems($this.attr('href'), true);
}
);
// on sort click
self.$sort.on(`click${evp}`, '.vp-sort .vp-sort__item a', function (e) {
e.preventDefault();
const $this = $(this);
if (!self.loading) {
$this
.closest('.vp-sort__item')
.addClass('vp-sort__item-active')
.siblings()
.removeClass('vp-sort__item-active');
}
self.loadNewItems($this.attr('href'), true);
});
// on filter/sort select change
self.$filter
.add(self.$sort)
.on(
`change${evp}`,
'.vp-filter select, .vp-sort select',
function () {
const $this = $(this);
const value = $this.val();
const $option = $this.find(`[value="${value}"]`);
if ($option.length) {
self.loadNewItems($option.attr('data-vp-url'), true);
}
}
);
// on pagination click
self.$item.on(
`click${evp}`,
'.vp-pagination .vp-pagination__item a',
function (e) {
e.preventDefault();
const $this = $(this);
const $pagination = $this.closest('.vp-pagination');
if (
$pagination.hasClass('vp-pagination__no-more') &&
self.options.pagination !== 'paged'
) {
return;
}
self.loadNewItems(
$this.attr('href'),
self.options.pagination === 'paged'
);
// Scroll to top
if (
self.options.pagination === 'paged' &&
$pagination.hasClass('vp-pagination__scroll-top')
) {
const $adminBar = $('#wpadminbar');
const currentTop =
window.pageYOffset ||
document.documentElement.scrollTop;
let { top } = self.$item.offset();
// Custom user offset.
if ($pagination.attr('data-vp-pagination-scroll-top')) {
top -=
parseInt(
$pagination.attr(
'data-vp-pagination-scroll-top'
),
10
) || 0;
}
// Admin bar offset.
if (
$adminBar.length &&
$adminBar.css('position') === 'fixed'
) {
top -= $adminBar.outerHeight();
}
// Limit max offset.
top = Math.max(0, top);
if (currentTop > top) {
window.scrollTo({
top,
behavior: 'smooth',
});
}
}
}
);
// on categories of item click
self.$item.on(
`click${evp}`,
'.vp-portfolio__items .vp-portfolio__item-meta-category a',
function (e) {
e.preventDefault();
e.stopPropagation();
self.loadNewItems($(this).attr('href'), true);
}
);
// resized container
self.$item.on(`transitionend${evp}`, '.vp-portfolio__items', (e) => {
if (e.currentTarget === e.target) {
self.resized();
}
});
self.emitEvent('initEvents');
}
/**
* Destroy events
*/
destroyEvents() {
const self = this;
const evp = `.vpf-uid-${self.uid}`;
// destroy click events
self.$item.off(evp);
self.$filter.off(evp);
self.$sort.off(evp);
// destroy window events
$wnd.off(evp);
self.emitEvent('destroyEvents');
}
/**
* Init layout
*/
initLayout() {
const self = this;
self.emitEvent('initLayout');
self.renderStyle();
}
/**
* Init custom color by data attributes:
* data-vp-bg-color
* data-vp-text-color
*/
initCustomColors() {
const self = this;
self.$item.find('[data-vp-bg-color]').each(function () {
const val = $(this).attr('data-vp-bg-color');
self.addStyle(`[data-vp-bg-color="${val}"]`, {
'background-color': `${val} !important`,
});
});
self.$item.find('[data-vp-text-color]').each(function () {
const val = $(this).attr('data-vp-text-color');
self.addStyle(`[data-vp-text-color="${val}"]`, {
color: `${val} !important`,
});
});
self.renderStyle();
self.emitEvent('initCustomColors');
}
/**
* Add New Items
*
* @param {object|dom|jQuery} $items - elements.
* @param {bool} removeExisting - remove existing elements.
* @param {Object} $newVP - new visual portfolio jQuery.
*/
addItems($items, removeExisting, $newVP) {
const self = this;
self.emitEvent('addItems', [$items, removeExisting, $newVP]);
}
/**
* Remove Items
*
* @param {object|dom|jQuery} $items - elements.
*/
removeItems($items) {
const self = this;
self.emitEvent('removeItems', [$items]);
}
/**
* AJAX Load New Items
*
* @param {string} url - url to request.
* @param {bool} removeExisting - remove existing elements.
* @param {Function} cb - callback.
*/
loadNewItems(url, removeExisting, cb) {
const self = this;
const { randomSeed } = self.options;
if (
(self.loading && typeof self.loading.readyState === 'undefined') ||
!url ||
self.href === url
) {
return;
}
// Abort previous AJAX loader to prevent conflict.
// We need it mostly for Search feature, because users can type also when already in loading state.
if (self.loading && self.loading.readyState && self.loading.abort) {
self.loading.abort();
}
const ajaxData = {
method: 'POST',
url,
data: {
vpf_ajax_call: true,
vpf_random_seed:
typeof randomSeed !== 'undefined' ? randomSeed : false,
},
complete({ responseText }) {
self.href = url;
self.replaceItems(responseText, removeExisting, cb);
},
};
self.loading = true;
self.$item.addClass('vp-portfolio__loading');
self.emitEvent('startLoadingNewItems', [url, ajaxData]);
self.loading = $.ajax(ajaxData);
}
/**
* Replace items to the new loaded using AJAX
*
* @param {string} content - new page content.
* @param {bool} removeExisting - remove existing elements.
* @param {Function} cb - callback.
*/
replaceItems(content, removeExisting, cb) {
const self = this;
if (!content) {
return;
}
// load to invisible container, then append to posts container
content = content
.replace('<body', '<body><div id="vp-ajax-load-body"')
.replace('</body>', '</div></body>');
const $body = $(content).filter('#vp-ajax-load-body');
// find current block on new page
const $newVP = $body.find(`.vp-portfolio.vp-uid-${self.uid}`);
// insert new items
if ($newVP.length) {
const newItems = $newVP.find('.vp-portfolio__items').html();
const nothingFound = $newVP.hasClass('vp-portfolio-not-found');
// We should clean up notices here, as they may be cloned over and over.
self.$item.find('.vp-notice').remove();
if (nothingFound) {
self.$item
.find('.vp-portfolio__items-wrap')
.before($newVP.find('.vp-notice').clone());
self.$item.addClass('vp-portfolio-not-found');
} else {
self.$item.removeClass('vp-portfolio-not-found');
}
// update filter
if (self.$filter.length) {
self.$filter.each(function () {
const $filter = $(this);
let newFilterContent = '';
if ($filter.parent().hasClass('vp-single-filter')) {
newFilterContent = $body
.find(
`[class="${$filter
.parent()
.attr('class')
.replace(
' vp-single-filter__ready',
''
)}"] .vp-portfolio__filter-wrap`
)
.html();
} else {
newFilterContent = $newVP
.find('.vp-portfolio__filter-wrap')
.html();
}
$filter.html(newFilterContent);
});
}
// update sort
if (self.$sort.length) {
self.$sort.each(function () {
const $sort = $(this);
let newFilterContent = '';
if ($sort.parent().hasClass('vp-single-sort')) {
newFilterContent = $body
.find(
`[class="${$sort
.parent()
.attr('class')
.replace(
' vp-single-sort__ready',
''
)}"] .vp-portfolio__sort-wrap`
)
.html();
} else {
newFilterContent = $newVP
.find('.vp-portfolio__sort-wrap')
.html();
}
$sort.html(newFilterContent);
});
}
// update pagination
if (self.$pagination.length) {
self.$pagination.html(
$newVP.find('.vp-portfolio__pagination-wrap').html()
);
}
self.addItems($(newItems), removeExisting, $newVP);
self.emitEvent('loadedNewItems', [$newVP, removeExisting, content]);
if (cb) {
cb();
}
}
// update next page data
const nextPageUrl = $newVP.attr('data-vp-next-page-url');
self.options.nextPageUrl = nextPageUrl;
self.$item.attr('data-vp-next-page-url', nextPageUrl);
self.$item.removeClass('vp-portfolio__loading');
self.loading = false;
self.emitEvent('endLoadingNewItems');
// images loaded
self.imagesLoaded();
// init custom colors
self.initCustomColors();
}
}
// extend VP object.
$(document).trigger('extendClass.vpf', [VP]);
// global definition
const plugin = function (options, ...args) {
let ret;
this.each(function () {
if (typeof ret !== 'undefined') {
return;
}
if (typeof options === 'object' || typeof options === 'undefined') {
if (!this.vpf) {
this.vpf = new VP($(this), options);
}
} else if (this.vpf) {
ret = this.vpf[options](...args);
}
});
return typeof ret !== 'undefined' ? ret : this;
};
plugin.constructor = VP;
// no conflict
const oldPlugin = $.fn.vpf;
$.fn.vpf = plugin;
$.fn.vpf.noConflict = function () {
$.fn.vpf = oldPlugin;
return this;
};
// initialization
$(() => {
$('.vp-portfolio').vpf();
});
const throttledInit = throttle(
200,
rafSchd(() => {
$('.vp-portfolio:not(.vp-portfolio__ready)').vpf();
})
);
if (window.MutationObserver) {
new window.MutationObserver(throttledInit).observe(
document.documentElement,
{
childList: true,
subtree: true,
}
);
} else {
$(document).on('DOMContentLoaded DOMNodeInserted load', () => {
throttledInit();
});
}
@@ -0,0 +1,51 @@
import $ from 'jquery';
import rafSchd from 'raf-schd';
import { throttle } from 'throttle-debounce';
const $wnd = $(window);
// Init infinite scroll pagination.
$(document).on('initEvents.vpf', (event, self) => {
if (event.namespace !== 'vpf' || self.options.pagination !== 'infinite') {
return;
}
const evp = `.vpf-uid-${self.uid}`;
const scrollThreshold = 400;
let visibilityCheckBusy = false;
function checkVisibilityAndLoad() {
if (visibilityCheckBusy || !self.options.nextPageUrl) {
return;
}
visibilityCheckBusy = true;
const rect = self.$item[0].getBoundingClientRect();
if (
rect.bottom > 0 &&
rect.bottom - scrollThreshold <= window.innerHeight
) {
self.loadNewItems(self.options.nextPageUrl, false, () => {
setTimeout(() => {
visibilityCheckBusy = false;
checkVisibilityAndLoad();
}, 300);
});
} else {
visibilityCheckBusy = false;
}
}
checkVisibilityAndLoad();
$wnd.on(
`load${evp} scroll${evp} resize${evp} orientationchange${evp}`,
throttle(
150,
rafSchd(() => {
checkVisibilityAndLoad();
})
)
);
});
@@ -0,0 +1,46 @@
import $ from 'jquery';
const { ResizeObserver } = window;
function setImgWidth($el) {
if ($el && $el.height > 1) {
$el.style.width = `${$el.height}px`;
}
}
// We need to use resize observer because for some reason in the Preview
// and on some mobile devices image height is 1px.
const resizeObserver = new ResizeObserver((entries) => {
entries.forEach(({ target }) => {
if (target) {
setImgWidth(target);
}
});
});
// Init minimal paged pagination.
$(document).on('init.vpf loadedNewItems.vpf', (event, self) => {
if (
event.namespace !== 'vpf' ||
self.options.pagination !== 'paged' ||
!self.$pagination.children('.vp-pagination__style-minimal').length
) {
return;
}
// Hack used in Paged active item to make circle using hidden <img>.
// See styles for <img> tag in /templates/pagination/style.scss
const $activeItem = self.$pagination.find('.vp-pagination__item-active');
let $img = $activeItem.find('img');
if (!$img.length) {
$img = $(
'<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="">'
);
resizeObserver.observe($img[0]);
$activeItem.prepend($img);
setImgWidth($img[0]);
}
});
@@ -0,0 +1,209 @@
import $ from 'jquery';
const { VPData, VPPopupAPI } = window;
const { __, settingsPopupGallery } = VPData;
const $doc = $(document);
const $window = $(window);
if (typeof $.fancybox !== 'undefined' && VPPopupAPI) {
let fancyboxInstance;
// Extend Popup API.
VPPopupAPI.vendor = 'fancybox';
VPPopupAPI.open = function (items, index, self) {
const finalItems = [];
// prepare items for fancybox api.
items.forEach((item) => {
if (item.type === 'embed' && item.src) {
finalItems.push({
type: 'iframe',
src: item.src,
opts: {
width: item.width,
height: item.height,
caption: item.caption,
},
});
} else if (item.type === 'embed' && item.embed) {
finalItems.push({
type: 'html',
src: item.embed,
opts: {
width: item.width,
height: item.height,
caption: item.caption,
},
});
} else {
finalItems.push({
type: 'image',
src: item.src,
el: item.el,
opts: {
width: item.width,
height: item.height,
srcset: item.srcset,
caption: item.caption,
thumb: item.srcSmall,
},
});
}
});
const buttons = [];
if (settingsPopupGallery.show_zoom_button) {
buttons.push('zoom');
}
if (settingsPopupGallery.show_fullscreen_button) {
buttons.push('fullScreen');
}
if (settingsPopupGallery.show_slideshow) {
buttons.push('slideShow');
}
if (settingsPopupGallery.show_thumbs) {
buttons.push('thumbs');
}
if (settingsPopupGallery.show_share_button) {
buttons.push('share');
}
if (settingsPopupGallery.show_download_button) {
buttons.push('download');
}
if (settingsPopupGallery.show_close_button) {
buttons.push('close');
}
// define options
const options = {
// Close existing modals
// Set this to false if you do not need to stack multiple instances
closeExisting: true,
// Enable infinite gallery navigation
loop: true,
// Should display navigation arrows at the screen edges
arrows: settingsPopupGallery.show_arrows,
// Should display counter at the top left corner
infobar: settingsPopupGallery.show_counter,
// Should display close button (using `btnTpl.smallBtn` template) over the content
// Can be true, false, "auto"
// If "auto" - will be automatically enabled for "html", "inline" or "ajax" items
smallBtn: false,
// Should display toolbar (buttons at the top)
// Can be true, false, "auto"
// If "auto" - will be automatically hidden if "smallBtn" is enabled
toolbar: 'auto',
// What buttons should appear in the top right corner.
// Buttons will be created using templates from `btnTpl` option
// and they will be placed into toolbar (class="fancybox-toolbar"` element)
buttons,
// Custom CSS class for layout
baseClass: 'vp-fancybox',
// Hide browser vertical scrollbars; use at your own risk
hideScrollbar: true,
// Use mousewheel to navigate gallery
// If 'auto' - enabled for images only
wheel: false,
// Clicked on the content
clickContent(current) {
return current.type === 'image' &&
settingsPopupGallery.click_to_zoom
? 'zoom'
: false;
},
lang: 'wordpress',
i18n: {
wordpress: {
CLOSE: __.fancybox_close,
NEXT: __.fancybox_next,
PREV: __.fancybox_prev,
ERROR: __.fancybox_error,
PLAY_START: __.fancybox_play_start,
PLAY_STOP: __.fancybox_play_stop,
FULL_SCREEN: __.fancybox_full_screen,
THUMBS: __.fancybox_thumbs,
DOWNLOAD: __.fancybox_download,
SHARE: __.fancybox_share,
ZOOM: __.fancybox_zoom,
},
},
beforeClose() {
const currentItemData = items[fancyboxInstance.currIndex];
if (currentItemData) {
VPPopupAPI.maybeFocusGalleryItem(currentItemData);
}
if (self) {
self.emitEvent('beforeCloseFancybox', [
options,
items,
fancyboxInstance,
]);
}
fancyboxInstance = false;
},
beforeShow(e, instance) {
if (self) {
self.emitEvent('beforeShowFancybox', [e, instance]);
}
},
afterShow(e, instance) {
if (self) {
self.emitEvent('afterShowFancybox', [e, instance]);
}
},
};
if (self) {
self.emitEvent('beforeInitFancybox', [options, finalItems, index]);
}
// Disable Loop if only 1 item in gallery.
// We need this because Fancybox still let us scroll gallery using keyboard.
if (items.length === 1) {
options.loop = false;
}
// Start new fancybox instance
fancyboxInstance = $.fancybox.open(finalItems, options, index);
if (self) {
self.emitEvent('initFancybox', [
options,
finalItems,
index,
fancyboxInstance,
]);
}
};
VPPopupAPI.close = function () {
if (fancyboxInstance) {
fancyboxInstance.close();
fancyboxInstance = false;
}
};
// Fix zoom image sizes attribute.
// https://wordpress.org/support/topic/blurry-zoom-images/
$doc.on('transitionend', '.fancybox-content', function () {
const $img = $(this).find('.fancybox-image[sizes]');
const sizes = `${Math.round(100 * ($img.width() / $window.width()))}vw`;
$img.attr('sizes', sizes);
});
}
@@ -0,0 +1,130 @@
import $ from 'jquery';
// Extend VP class.
$(document).on('extendClass.vpf', (event, VP) => {
if (event.namespace !== 'vpf') {
return;
}
/**
* Init fjGallery plugin
*
* @param {mixed} options - gallery options.
* @param {mixed} additional - additional args.
*/
VP.prototype.initFjGallery = function (options = false, additional = null) {
const self = this;
if (self.$items_wrap.fjGallery && self.options.layout === 'justified') {
const initOptions =
options !== false
? options
: {
gutter: {
horizontal:
parseFloat(self.options.itemsGap) || 0,
vertical:
self.options.itemsGapVertical !== ''
? parseFloat(
self.options.itemsGapVertical
) || 0
: parseFloat(self.options.itemsGap) ||
0,
},
rowHeight:
parseFloat(self.options.justifiedRowHeight) ||
200,
maxRowsCount:
parseInt(
self.options.justifiedMaxRowsCount,
10
) || 0,
lastRow: self.options.justifiedLastRow || 'left',
rowHeightTolerance:
parseFloat(
self.options.justifiedRowHeightTolerance
) || 0,
calculateItemsHeight: true,
itemSelector: '.vp-portfolio__item-wrap',
imageSelector: '.vp-portfolio__item-img img',
transitionDuration: '0.3s',
};
if (initOptions.maxRowsCount === 0) {
initOptions.maxRowsCount = Number.POSITIVE_INFINITY;
}
self.emitEvent('beforeInitFjGallery', [initOptions, additional]);
self.$items_wrap.fjGallery(initOptions, additional);
self.emitEvent('initFjGallery', [initOptions, additional]);
}
};
/**
* Destroy fjGallery plugin
*/
VP.prototype.destroyFjGallery = function () {
const self = this;
const fjGallery = self.$items_wrap.data('fjGallery');
if (fjGallery) {
self.$items_wrap.fjGallery('destroy');
self.emitEvent('destroyFjGallery');
}
};
});
// Add Items.
$(document).on('addItems.vpf', (event, self, $items, removeExisting) => {
if (event.namespace !== 'vpf') {
return;
}
const fjGallery = self.$items_wrap.data('fjGallery');
if (!fjGallery) {
return;
}
if (removeExisting) {
self.destroyFjGallery();
self.$items_wrap.find('.vp-portfolio__item-wrap').remove();
self.$items_wrap.prepend($items);
self.initFjGallery();
} else {
self.$items_wrap.append($items);
self.initFjGallery('appendImages', $items);
}
});
// Init.
$(document).on('init.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.initFjGallery();
});
// Images Loaded.
$(document).on('imagesLoaded.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
// sometimes on iOs images failed to calculate positions, so we need this imagesLoaded event.
// related issue: https://github.com/nk-crew/visual-portfolio/issues/55
self.initFjGallery();
});
// Destroy.
$(document).on('destroy.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.destroyFjGallery();
});
@@ -0,0 +1,206 @@
import $ from 'jquery';
import rafSchd from 'raf-schd';
import { debounce, throttle } from 'throttle-debounce';
const { getComputedStyle } = window;
const $wnd = $(window);
const $doc = $(document);
const SUPPORTED_LAYOUTS = ['tiles', 'masonry', 'grid'];
// Extend VP class.
$doc.on('extendClass.vpf', (event, VP) => {
if (event.namespace !== 'vpf') {
return;
}
/**
* Init Isotope
* TODO: Check one of these scripts as alternative
* - https://github.com/haltu/muuri
* - https://github.com/Vestride/Shuffle
* - https://github.com/patrickkunka/mixitup
*
* @param {Object} options isotope options
*/
VP.prototype.initIsotope = function (options) {
const self = this;
if (
self.$items_wrap.isotope &&
SUPPORTED_LAYOUTS.includes(self.options.layout)
) {
const isRtl =
getComputedStyle(self.$items_wrap[0]).direction === 'rtl';
const initOptions = options || {
itemSelector: '.vp-portfolio__item-wrap',
layoutMode: 'masonry',
// masonry: {
// horizontalOrder: true
// },
transitionDuration: '0.3s',
percentPosition: true,
originLeft: !isRtl,
// See `initEvents.vpf` event why we need this option disabled.
resize: false,
};
self.emitEvent('beforeInitIsotope', [initOptions]);
self.$items_wrap.isotope(initOptions);
self.emitEvent('initIsotope', [initOptions]);
}
};
/**
* Destroy Isotope
*/
VP.prototype.destroyIsotope = function () {
const self = this;
const isotope = self.$items_wrap.data('isotope');
if (isotope) {
self.$items_wrap.isotope('destroy');
self.emitEvent('destroyIsotope');
}
};
});
// Add Items.
$doc.on('addItems.vpf', (event, self, $items, removeExisting) => {
if (event.namespace !== 'vpf') {
return;
}
const isotope = self.$items_wrap.data('isotope');
if (!isotope) {
return;
}
if (removeExisting) {
const $existing = self.$items_wrap.find('.vp-portfolio__item-wrap');
self.$items_wrap.isotope('remove', $existing);
// we need to prepend items when remove existing just because Tiles layout have troubles with appending and removing items
self.$items_wrap.prepend($items).isotope('prepended', $items);
} else {
self.$items_wrap.append($items).isotope('appended', $items);
}
// idk why, but with timeout isotope recalculate all items fine.
setTimeout(() => {
self.initIsotope('layout');
}, 0);
});
// Remove Items.
$doc.on('removeItems.vpf', (event, self, $items) => {
if (event.namespace !== 'vpf') {
return;
}
const isotope = self.$items_wrap.data('isotope');
if (!isotope) {
return;
}
self.$items_wrap.isotope('remove', $items);
});
// Init.
$doc.on('init.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.initIsotope();
});
// Images Loaded.
$doc.on('imagesLoaded.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
// sometimes on iOs images failed to calculate positions, so we need this imagesLoaded event.
// related issue: https://github.com/nk-crew/visual-portfolio/issues/55
self.initIsotope('layout');
});
// Destroy.
$doc.on('destroy.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.destroyIsotope();
});
// Init events.
$doc.on('initEvents.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
// We need to resize isotope manually, since the native relayout
// is not working properly, when container size is not changed
// but items sizes are changed in CSS. For some reason Isotope don't relayout it.
if (
self.$items_wrap.isotope &&
SUPPORTED_LAYOUTS.includes(self.options.layout)
) {
const evp = `.vpf-uid-${self.uid}`;
$wnd.on(
`resize${evp}`,
throttle(
100,
rafSchd(() => {
self.initIsotope('layout');
})
)
);
}
});
// Destroy events.
$doc.on('destroyEvents.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
if (SUPPORTED_LAYOUTS.includes(self.options.layout)) {
const evp = `.vpf-uid-${self.uid}`;
$wnd.off(`resize${evp}`);
}
});
// WPBakery Page Builder fullwidth row fix.
$doc.on(
'vc-full-width-row',
debounce(
150,
rafSchd((event, el) => {
$(el)
.find('.vp-portfolio')
.each(function () {
if (!this.vpf || !this.vpf.initIsotope) {
return;
}
const isotope = this.vpf.$items_wrap.data('isotope');
if (isotope) {
this.vpf.initIsotope('layout');
}
});
})
)
);
@@ -0,0 +1,515 @@
import isNumber from 'is-number';
import $ from 'jquery';
const {
Image,
VPData,
VPPopupAPI,
PhotoSwipe,
PhotoSwipeUI_Default: PhotoSwipeUIDefault,
} = window;
const { __, settingsPopupGallery } = VPData;
function resizeVideo(data, curItem) {
if (typeof curItem === 'undefined') {
if (data && data.itemHolders.length) {
data.itemHolders.forEach((val) => {
if (val.item && val.item.html) {
resizeVideo(data, val.item);
}
});
}
return;
}
// calculate real viewport in pixels
const vpW = data.viewportSize.x;
let vpH = data.viewportSize.y;
const ratio = curItem.vw / curItem.vh;
let resultW;
const $container = $(curItem.container);
const bars = data.options.barsSize;
let barTop = 0;
let barBot = 0;
if (bars) {
barTop = bars.top && bars.top !== 'auto' ? bars.top : 0;
barBot = bars.bottom && bars.bottom !== 'auto' ? bars.bottom : 0;
}
vpH -= barTop + barBot;
if (ratio > vpW / vpH) {
resultW = vpW;
} else {
resultW = vpH * ratio;
}
const $videoCont = $container.find('.vp-pswp-video');
$videoCont.css('max-width', resultW);
$videoCont.children().css({
paddingBottom: `${100 * (curItem.vh / curItem.vw)}%`,
});
$container.css({
top: barTop,
bottom: barBot,
});
}
if (PhotoSwipe && VPPopupAPI) {
let pswpInstance;
// prepare photoswipe markup
if (!$('.vp-pswp').length) {
const markup = `
<div class="pswp vp-pswp${
settingsPopupGallery.click_to_zoom ? '' : ' vp-pswp-no-zoom'
}" tabindex="-1" role="dialog" aria-hidden="true">
<div class="pswp__bg"></div>
<div class="pswp__scroll-wrap">
<div class="pswp__container">
<div class="pswp__item"></div>
<div class="pswp__item"></div>
<div class="pswp__item"></div>
</div>
<div class="pswp__ui pswp__ui--hidden">
<div class="pswp__top-bar">
<div class="pswp__counter"></div>
<button class="pswp__button pswp__button--close" title="${
__.pswp_close
}"></button>
<button class="pswp__button pswp__button--share" title="${
__.pswp_share
}"></button>
<button class="pswp__button pswp__button--fs" title="${
__.pswp_fs
}"></button>
<button class="pswp__button pswp__button--zoom" title="${
__.pswp_zoom
}"></button>
</div>
<div class="pswp__preloader">
<div class="pswp__preloader__icn">
<div class="pswp__preloader__cut">
<div class="pswp__preloader__donut"></div>
</div>
</div>
</div>
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
<div class="pswp__share-tooltip"></div>
</div>
<button class="pswp__button pswp__button--arrow--left" title="${
__.pswp_prev
}"></button>
<button class="pswp__button pswp__button--arrow--right" title="${
__.pswp_next
}"></button>
<div class="pswp__caption">
<div class="pswp__caption__center"></div>
</div>
</div>
</div>
</div>
`;
$('body').append(markup);
}
// Extend Popup API.
VPPopupAPI.vendor = 'photoswipe';
VPPopupAPI.open = function (items, index, self) {
const finalItems = [];
// prepare items for fancybox api.
items.forEach((item) => {
if (item.type === 'embed') {
finalItems.push({
html: `<div class="vp-pswp-video"><div>${item.embed}</div></div>`,
vw: item.width || 0,
vh: item.height || 0,
title: item.caption,
});
} else {
finalItems.push({
src: item.src,
el: item.el,
w: item.width || 0,
h: item.height || 0,
title: item.caption,
o: {
src: item.src,
w: item.width || 0,
h: item.height || 0,
},
...(item.srcMedium
? {
m: {
src: item.srcMedium,
w: item.srcMediumWidth || 0,
h: item.srcMediumHeight || 0,
},
msrc: item.srcMedium,
}
: {}),
});
}
});
const $pswpElement = $('.vp-pswp');
const pswpElement = $pswpElement[0];
// define options (if needed)
const options = {
captionAndToolbarShowEmptyCaptions: false,
closeEl: settingsPopupGallery.show_close_button,
captionEl: true,
fullscreenEl: settingsPopupGallery.show_fullscreen_button,
zoomEl: settingsPopupGallery.show_zoom_button,
shareEl: settingsPopupGallery.show_share_button,
counterEl: settingsPopupGallery.show_counter,
arrowEl: settingsPopupGallery.show_arrows,
shareButtons: [
{
id: 'facebook',
label: __.pswp_share_fb,
url: 'https://www.facebook.com/sharer/sharer.php?u={{url}}',
},
{
id: 'twitter',
label: __.pswp_share_tw,
url: 'https://twitter.com/intent/tweet?text={{text}}&url={{url}}',
},
{
id: 'pinterest',
label: __.pswp_share_pin,
url: 'https://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}',
},
],
getImageURLForShare() {
const currentItem = items[pswpInstance.getCurrentIndex()];
if (currentItem.type === 'image' && currentItem.src) {
return currentItem.src;
}
return pswpInstance.currItem.src || '';
},
getPageURLForShare() {
const currentItem = items[pswpInstance.getCurrentIndex()];
if (currentItem.type === 'image' && currentItem.src) {
return currentItem.src;
}
return window.location.href;
},
getTextForShare() {
const currentItem = items[pswpInstance.getCurrentIndex()];
if (currentItem.caption) {
const $caption = $(currentItem.caption);
if (
$caption.filter('.vp-portfolio__item-popup-title')
.length
) {
return $caption
.filter('.vp-portfolio__item-popup-title')
.text();
}
if (
$caption.filter('.vp-portfolio__item-popup-description')
.length
) {
return $caption
.filter('.vp-portfolio__item-popup-description')
.text();
}
}
return '';
},
bgOpacity: 1,
tapToClose: false,
tapToToggleControls: true,
showHideOpacity: true,
history: false,
getThumbBoundsFn(thumbIndex) {
if (!finalItems[thumbIndex] || !finalItems[thumbIndex].el) {
return false;
}
const $el = $(finalItems[thumbIndex].el).find('img')[0];
if (!$el) {
return false;
}
const rect = $el.getBoundingClientRect();
const pageYScroll =
window.pageYOffset || document.documentElement.scrollTop;
const pswpTop = parseFloat($pswpElement.css('top')) || 0;
return {
x: rect.left,
y: rect.top + pageYScroll - pswpTop,
w: rect.width,
h: rect.height,
};
},
getDoubleTapZoom(isMouseClick, item) {
// isMouseClick - true if mouse, false if double-tap
// item - slide object that is zoomed, usually current
// item.initialZoomLevel - initial scale ratio of image
// e.g. if viewport is 700px and image is 1400px,
// initialZoomLevel will be 0.5
if (isMouseClick) {
// is mouse click on image or zoom icon
// Click to zoom disabled.
if (!settingsPopupGallery.click_to_zoom) {
return item.initialZoomLevel;
}
// In case the image is vertically wide, zoom it to fit screen width only.
// - check if original image size is wider than screen
// - check if zoomed out image in less than 25% of the screen width
if (
item.w > window.innerWidth &&
(item.w * item.initialZoomLevel) / window.innerWidth <
0.25
) {
return window.innerWidth / item.w;
}
// zoom to original
return 1;
// e.g. for 1400px image:
// 0.5 - zooms to 700px
// 2 - zooms to 2800px
}
// zoom to original if initial zoom is less than 0.7x,
// otherwise to 1.5x, to make sure that double-tap gesture always zooms image.
return item.initialZoomLevel < 0.7 ? 1 : 1.5;
},
};
options.index = parseInt(index, 10);
// exit if index not found
if (!isNumber(options.index)) {
return;
}
// Pass data to PhotoSwipe and initialize it
pswpInstance = new PhotoSwipe(
pswpElement,
PhotoSwipeUIDefault,
finalItems,
options
);
// see: http://photoswipe.com/documentation/responsive-images.html
let realViewportWidth;
let useLargeImages = false;
let firstResize = true;
let imageSrcWillChange;
pswpInstance.listen('beforeResize', () => {
// pswpInstance.viewportSize.x - width of PhotoSwipe viewport
// pswpInstance.viewportSize.y - height of PhotoSwipe viewport
// window.devicePixelRatio - ratio between physical pixels and device independent pixels (Number)
// 1 (regular display), 2 (@2x, retina) ...
// calculate real pixels when size changes
realViewportWidth =
pswpInstance.viewportSize.x * window.devicePixelRatio;
// Code below is needed if you want image to switch dynamically on window.resize
// Find out if current images need to be changed
if (useLargeImages && realViewportWidth < 1000) {
useLargeImages = false;
imageSrcWillChange = true;
} else if (!useLargeImages && realViewportWidth >= 1000) {
useLargeImages = true;
imageSrcWillChange = true;
}
// Invalidate items only when source is changed and when it's not the first update
if (imageSrcWillChange && !firstResize) {
// invalidateCurrItems sets a flag on slides that are in DOM,
// which will force update of content (image) on window.resize.
pswpInstance.invalidateCurrItems();
}
if (firstResize) {
firstResize = false;
}
imageSrcWillChange = false;
});
pswpInstance.listen('gettingData', (idx, item) => {
// Prepare iframes.
if (item.html) {
// -- Iframe Autoplay - Part 1 --
// Disable autoplay parameter in iframes on inactive slides.
// Mostly for Youtube and Vimeo to prevent video playing in background.
// Later we add autoplay only to active slides.
item.html = item.html.replace(/autoplay=1/, 'autoplay=0');
return;
}
// Prepare image sizes.
if (useLargeImages && item.o) {
if (item.o.src) {
item.src = item.o.src;
}
if (item.o.w) {
item.w = item.o.w;
}
if (item.o.h) {
item.h = item.o.h;
}
} else if (item.m) {
if (item.m.src) {
item.src = item.m.src;
}
if (item.m.w) {
item.w = item.m.w;
}
if (item.m.h) {
item.h = item.m.h;
}
}
});
pswpInstance.listen('imageLoadComplete', (idx, item) => {
if (item.h < 1 || item.w < 1) {
const img = new Image();
img.onload = () => {
item.w = img.width;
item.h = img.height;
pswpInstance.invalidateCurrItems();
pswpInstance.updateSize(true);
};
img.src = item.src;
}
});
pswpInstance.listen('resize', function () {
resizeVideo(this);
});
pswpInstance.listen('afterChange', function () {
resizeVideo(this);
if (self) {
self.emitEvent('afterChangePhotoSwipe', [this, pswpInstance]);
}
});
// disable video play if no active.
pswpInstance.listen('beforeChange', function () {
const data = this;
// -- Iframe Autoplay - Part 2 --
// Set autoplay to 1 on active slides and to 0 on inactive.
if (data && data.itemHolders.length) {
const currentIndex = data.getCurrentIndex();
data.itemHolders.forEach((val) => {
const $iframe = val.el
? $(val.el).find('.vp-pswp-video iframe')
: false;
if ($iframe && $iframe.length) {
if (val.index === currentIndex) {
$iframe.attr(
'src',
$iframe
.attr('src')
.replace(/autoplay=0/, 'autoplay=1')
);
} else {
$iframe.attr(
'src',
$iframe
.attr('src')
.replace(/autoplay=1/, 'autoplay=0')
);
}
}
});
}
if (self) {
self.emitEvent('beforeChangePhotoSwipe', [data, pswpInstance]);
}
});
// destroy event.
pswpInstance.listen('destroy', function () {
const data = this;
if (data) {
// Remove video block.
if (data.itemHolders.length) {
data.itemHolders.forEach((val) => {
if (val.el) {
$(val.el).find('.vp-pswp-video').remove();
}
});
}
const currentItemData = items[data.getCurrentIndex()];
if (currentItemData) {
VPPopupAPI.maybeFocusGalleryItem(currentItemData);
}
if (self) {
self.emitEvent('beforeClosePhotoSwipe', [
options,
items,
pswpInstance,
]);
}
}
pswpInstance = false;
});
if (self) {
self.emitEvent('beforeInitPhotoSwipe', [
options,
finalItems,
index,
pswpInstance,
]);
}
pswpInstance.init();
if (self) {
self.emitEvent('initPhotoSwipe', [
options,
finalItems,
index,
pswpInstance,
]);
}
};
VPPopupAPI.close = function () {
if (pswpInstance) {
pswpInstance.close();
pswpInstance = false;
}
};
}
@@ -0,0 +1,431 @@
import isNumber from 'is-number';
import $ from 'jquery';
const $doc = $(document);
const { screenSizes } = window.VPData;
function getSwiperVersion(Swiper) {
let ver = 8;
// in version 8 added new parameter `maxBackfaceHiddenSlides`.
if (typeof Swiper.defaults.maxBackfaceHiddenSlides === 'undefined') {
ver = 7;
}
// in version 7 added new parameter `rewind`.
if (typeof Swiper.defaults.rewind === 'undefined') {
ver = 6;
}
// in version 6 added new parameter `loopPreventsSlide`.
if (typeof Swiper.defaults.loopPreventsSlide === 'undefined') {
ver = 5;
}
return ver;
}
// Extend VP class.
$doc.on('extendClass.vpf', (event, VP) => {
if (event.namespace !== 'vpf') {
return;
}
/**
* Init Swiper plugin
*
* @param {mixed} options - slider options.
*/
VP.prototype.initSwiper = function (options = false) {
const self = this;
if (
self.options.layout === 'slider' &&
typeof window.Swiper !== 'undefined'
) {
const $parent = self.$items_wrap.parent();
$parent.addClass('swiper');
self.$items_wrap.addClass('swiper-wrapper');
self.$items_wrap.children().addClass('swiper-slide');
// calculate responsive.
let slidesPerView = self.options.sliderSlidesPerView || 3;
const breakPoints = {};
if (self.options.sliderEffect === 'fade') {
slidesPerView = 1;
}
if (isNumber(slidesPerView)) {
let count = slidesPerView;
let currentPoint = Math.min(screenSizes.length - 1, count - 1);
for (; currentPoint >= 0; currentPoint -= 1) {
if (
count > 0 &&
typeof screenSizes[currentPoint] !== 'undefined'
) {
breakPoints[screenSizes[currentPoint] + 1] = {
slidesPerView: count,
};
}
count -= 1;
}
slidesPerView = count || 1;
}
let optionsThumbs = false;
let $thumbsParent = false;
options = options || {
speed: (parseFloat(self.options.sliderSpeed) || 0) * 1000,
autoHeight: self.options.sliderItemsHeight === 'auto',
effect: self.options.sliderEffect || 'slide',
// fix fade items collapse (mostly in Default items style).
fadeEffect: {
crossFade: true,
},
spaceBetween: parseFloat(self.options.itemsGap) || 0,
centeredSlides: self.options.sliderCenteredSlides === 'true',
freeMode: {
enabled: self.options.sliderFreeMode === 'true',
sticky: self.options.sliderFreeModeSticky === 'true',
},
loop: self.options.sliderLoop === 'true',
// This feature is cool, but not working properly when loop enabled
// and fast clicking on previous button is not working properly
// https://github.com/nolimits4web/swiper/issues/5945
// loopPreventsSlide: false,
autoplay: parseFloat(self.options.sliderAutoplay) > 0 && {
delay: parseFloat(self.options.sliderAutoplay) * 1000,
disableOnInteraction: false,
},
navigation: self.options.sliderArrows === 'true' && {
nextEl: '.vp-portfolio__items-arrow-next',
prevEl: '.vp-portfolio__items-arrow-prev',
},
pagination: self.options.sliderBullets === 'true' && {
el: '.vp-portfolio__items-bullets',
clickable: true,
dynamicBullets:
self.options.sliderBulletsDynamic === 'true',
renderBullet(index, className) {
return `<span class="${className}" data-bullet-index="${index}" data-bullet-number="${
index + 1
}"></span>`;
},
},
mousewheel: self.options.sliderMousewheel === 'true',
slidesPerView,
breakpoints: breakPoints,
keyboard: true,
grabCursor: true,
preloadImages: false,
// fixes text selection when swipe in the items gap.
touchEventsTarget: 'container',
};
// fix first load slide position (seems like a conflict with lazySizes)
// issue: https://github.com/nk-crew/visual-portfolio/issues/54
if (options.speed === 0) {
options.speed = 1;
}
let positionFix = 0;
options.on = {
transitionEnd() {
if (positionFix === 0) {
positionFix = 1;
this.setTransition(1);
this.setTranslate(this.translate + 0.1);
} else if (positionFix === 1) {
positionFix = 2;
this.slideReset();
}
},
// These events used to add fixes for
// conflict with custom cursor movement.
touchStart(swiper, e) {
self.emitEvent('swiperTouchStart', [swiper, e]);
},
touchMove(swiper, e) {
self.emitEvent('swiperTouchMove', [swiper, e]);
},
touchEnd(swiper, e) {
self.emitEvent('swiperTouchEnd', [swiper, e]);
},
};
self.emitEvent('beforeInitSwiper', [options]);
// thumbnails.
if (self.$slider_thumbnails_wrap.length) {
$thumbsParent = self.$slider_thumbnails_wrap.parent();
$thumbsParent.addClass('swiper');
self.$slider_thumbnails_wrap.addClass('swiper-wrapper');
self.$slider_thumbnails_wrap
.children()
.addClass('swiper-slide');
// calculate responsive.
let thumbnailsPerView =
self.options.sliderThumbnailsPerView || 8;
const thumbnailsBreakPoints = {};
if (isNumber(thumbnailsPerView)) {
let count = thumbnailsPerView;
let currentPoint = Math.min(
screenSizes.length - 1,
count - 1
);
for (; currentPoint >= 0; currentPoint -= 1) {
if (
count > 0 &&
typeof screenSizes[currentPoint] !== 'undefined'
) {
thumbnailsBreakPoints[
screenSizes[currentPoint] + 1
] = {
slidesPerView: count,
};
}
count -= 1;
}
thumbnailsPerView = count || 1;
}
optionsThumbs = {
autoHeight: self.options.sliderThumbnailsHeight === 'auto',
effect: 'slide',
spaceBetween:
parseFloat(self.options.sliderThumbnailsGap) || 0,
loop: false,
// This feature is cool, but not working properly when loop enabled
// and fast clicking on previous button is not working properly
// https://github.com/nolimits4web/swiper/issues/5945
// loopPreventsSlide: false,
freeMode: {
enabled: true,
sticky: true,
},
loopedSlides: 5,
slidesPerView: thumbnailsPerView,
breakpoints: thumbnailsBreakPoints,
keyboard: true,
grabCursor: true,
watchSlidesVisibility: true,
watchSlidesProgress: true,
preloadImages: false,
// fixed text selection when swipe in the items gap.
touchEventsTarget: 'container',
on: {
// These events used to add fixes for
// conflict with custom cursor movement.
touchStart(swiper, e) {
self.emitEvent('swiperTouchStart', [swiper, e]);
},
touchMove(swiper, e) {
self.emitEvent('swiperTouchMove', [swiper, e]);
},
touchEnd(swiper, e) {
self.emitEvent('swiperTouchEnd', [swiper, e]);
},
},
};
}
// Fallbacks for old Swiper versions.
(() => {
const swiperVersion = getSwiperVersion(window.Swiper);
const isThumbsEnabled =
optionsThumbs && $thumbsParent && $thumbsParent[0];
// Since v7 used container class `swiper`, we should also add old `swiper-container` class.
if (swiperVersion < 7) {
$parent.addClass('swiper-container');
if (isThumbsEnabled) {
$thumbsParent.addClass('swiper-container');
}
}
// Since v7 freeMode options moved under `freeMode` object.
if (swiperVersion < 7) {
options.freeModeSticky = options.freeMode.sticky;
options.freeMode = options.freeMode.enabled;
if (isThumbsEnabled) {
optionsThumbs.freeModeSticky =
optionsThumbs.freeMode.sticky;
optionsThumbs.freeMode = optionsThumbs.freeMode.enabled;
}
}
// Since v5 `breakpointsInverse` option is removed and it is now `true` by default, but in older versions it was `false`.
if (swiperVersion >= 5) {
options.breakpointsInverse = true;
if (isThumbsEnabled) {
optionsThumbs.breakpointsInverse = true;
}
}
})();
// Init Swiper.
if (optionsThumbs && $thumbsParent && $thumbsParent[0]) {
const swiperThumbs = new window.Swiper(
$thumbsParent[0],
optionsThumbs
);
options.thumbs = {
swiper: swiperThumbs,
};
}
const instance = new window.Swiper($parent[0], options);
// Autoplay Hover Pause.
if (
self.options.sliderAutoplayHoverPause === 'true' &&
parseFloat(self.options.sliderAutoplay) > 0
) {
self.$item.on(
`mouseenter.vpf-uid-${self.uid}`,
'.swiper',
() => {
$parent[0].swiper.autoplay.stop();
}
);
self.$item.on(
`mouseleave.vpf-uid-${self.uid}`,
'.swiper',
() => {
$parent[0].swiper.autoplay.start();
}
);
}
self.emitEvent('initSwiper', [options, instance]);
}
};
/**
* Destroy Swiper plugin
*/
VP.prototype.destroySwiper = function () {
const self = this;
const $parent = self.$items_wrap.parent();
const $thumbsParent = self.$slider_thumbnails_wrap.length
? self.$slider_thumbnails_wrap.parent()
: false;
const SliderSwiper = $parent[0].swiper;
const ThumbsSwiper = $thumbsParent ? $thumbsParent[0].swiper : false;
let isDestroyed = false;
// Thumbnails.
if (ThumbsSwiper) {
ThumbsSwiper.destroy();
$thumbsParent.removeClass('swiper');
self.$slider_thumbnails_wrap.removeClass('swiper-wrapper');
self.$slider_thumbnails_wrap.children().removeClass('swiper-slide');
isDestroyed = true;
}
// Slider.
if (SliderSwiper) {
SliderSwiper.destroy();
$parent.removeClass('swiper');
self.$items_wrap.removeClass('swiper-wrapper');
self.$items_wrap.children().removeClass('swiper-slide');
$parent
.find('.vp-portfolio__items-bullets')
.removeClass(
'swiper-pagination-clickable swiper-pagination-bullets-dynamic'
)
.removeAttr('style')
.html('');
isDestroyed = true;
}
if (isDestroyed) {
self.emitEvent('destroySwiper');
}
};
});
// Add Items.
$doc.on('addItems.vpf', (event, self, $items, removeExisting, $newVP) => {
if (event.namespace !== 'vpf') {
return;
}
const Swiper = self.$items_wrap.parent()[0].swiper;
if (!Swiper) {
return;
}
// Slider.
{
if (removeExisting) {
Swiper.removeAllSlides();
}
const appendArr = [];
$items.addClass('swiper-slide').each(function () {
appendArr.push(this);
});
Swiper.appendSlide(appendArr);
}
// Thumbnails.
const ThumbsSwiper = self.$slider_thumbnails_wrap.length
? self.$slider_thumbnails_wrap.parent()[0].swiper
: false;
if (ThumbsSwiper) {
if (removeExisting) {
ThumbsSwiper.removeAllSlides();
}
const appendArr = [];
$newVP
.find('.vp-portfolio__thumbnails > .vp-portfolio__thumbnail-wrap')
.clone()
.addClass('swiper-slide')
.each(function () {
appendArr.push(this);
});
ThumbsSwiper.appendSlide(appendArr);
}
});
// Init.
$doc.on('init.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.initSwiper();
});
// Destroy.
$doc.on('destroy.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.destroySwiper();
});
@@ -0,0 +1,635 @@
import $ from 'jquery';
const { VPData } = window;
const { settingsPopupGallery } = VPData;
const templatesSupport = 'content' in document.createElement('template');
/*
* Global Popup Gallery API.
*/
const VPPopupAPI = {
vendor: false,
vendors: [
{
vendor: 'youtube',
embedUrl: 'https://www.youtube.com/embed/{{video_id}}?{{params}}',
pattern:
/(https?:\/\/)?(www.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(?:embed\/|shorts\/|v\/|watch\?v=|watch\?list=(.*)&v=|watch\?(.*[^&]&)v=)?((\w|-){11})(&list=(\w+)&?)?(.*)/,
patternIndex: 6,
params: {
autoplay: 1,
autohide: 1,
fs: 1,
rel: 0,
hd: 1,
wmode: 'transparent',
enablejsapi: 1,
html5: 1,
},
paramsIndex: 10,
embedCallback(url, match) {
let result = false;
const vendorData = this;
const videoId =
match && match[vendorData.patternIndex]
? match[vendorData.patternIndex]
: false;
if (videoId) {
const isShorts = /\/shorts\//.test(url);
const width = isShorts ? 476 : 1920;
const height = isShorts ? 847 : 1080;
result = VPPopupAPI.embedCallback(
{
...vendorData,
width,
height,
},
videoId,
url,
match
);
}
return result;
},
},
{
vendor: 'vimeo',
embedUrl: 'https://player.vimeo.com/video/{{video_id}}?{{params}}',
pattern:
/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)(.*)/,
patternIndex: 3,
params: {
autoplay: 1,
hd: 1,
show_title: 1,
show_byline: 1,
show_portrait: 0,
fullscreen: 1,
},
paramsIndex: 4,
},
],
init() {},
open() {},
close() {},
/**
* Parse query parameters.
* Thanks to https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
*
* @param {string} query - query string.
*
* @return {string}
*/
getQueryStringParams(query) {
return query
? (/^[?#]/.test(query) ? query.slice(1) : query)
.split('&')
.reduce((params, param) => {
const [key, value] = param.split('=');
params[key] = value
? decodeURIComponent(value.replace(/\+/g, ' '))
: '';
return params;
}, {})
: {};
},
/**
* Prepare params from parsed URL.
*
* @param {Object} match - url match data.
* @param {Object} vendorData - vendor data.
*
* @return {string}
*/
prepareParams(match, vendorData) {
let result = '';
// Prepare default params.
const params = vendorData.params || {};
// Parse params from URL.
if (vendorData.paramsIndex && match && match[vendorData.paramsIndex]) {
const newParams = VPPopupAPI.getQueryStringParams(
match[vendorData.paramsIndex]
);
if (newParams && typeof newParams === 'object') {
Object.keys(newParams).forEach((key) => {
if (key && newParams[key]) {
params[key] = newParams[key];
}
});
}
}
if (params && Object.keys(params).length) {
Object.keys(params).forEach((key) => {
if (key && params[key]) {
if (result) {
result += '&';
}
result += `${key}=${params[key]}`;
}
});
}
return result;
},
/**
* Prepare data for embed.
*
* @param {Object} vendorData current video vendor data.
* @param {string} videoId parsed video ID.
* @param {string} url video URL provided.
* @param {Object | boolean} match URL match data.
*
* @return {Object}
*/
embedCallback(vendorData, videoId, url, match = false) {
let { embedUrl } = vendorData;
embedUrl = embedUrl.replace(/{{video_id}}/g, videoId);
embedUrl = embedUrl.replace(/{{video_url}}/g, url);
embedUrl = embedUrl.replace(
/{{video_url_encoded}}/g,
encodeURIComponent(url)
);
embedUrl = embedUrl.replace(
/{{params}}/g,
match ? VPPopupAPI.prepareParams(match, vendorData) : ''
);
const width = vendorData.width || 1920;
const height = vendorData.height || 1080;
return {
vendor: vendorData.vendor,
id: videoId,
embed: `<iframe width="${width}" height="${height}" src="${embedUrl}" scrolling="no" frameborder="0" allowTransparency="true" allow="accelerometer; autoplay; clipboard-write; fullscreen; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`,
embedUrl,
url,
width,
height,
};
},
/**
* Parse video URL and return object with data
*
* @param {string} url - video url.
* @param {string} url - optional poster url.
*
* @param poster
* @return {object|boolean} video data
*/
parseVideo(url, poster) {
let result = false;
VPPopupAPI.vendors.forEach((vendorData) => {
if (!result) {
const match = url.match(vendorData.pattern);
const videoId =
match && match[vendorData.patternIndex]
? match[vendorData.patternIndex]
: false;
if (videoId) {
// Custom embed callback.
if (vendorData.embedCallback) {
result = vendorData.embedCallback(url, match, poster);
// Predefined embed callback.
} else {
result = VPPopupAPI.embedCallback(
vendorData,
videoId,
url,
match
);
}
}
}
});
// Unknown vendor.
if (!result) {
result = VPPopupAPI.embedCallback(
{
vendor: 'unknown',
embedUrl: url,
},
url,
url,
false
);
}
return result;
},
/**
* Parse gallery item popup data.
*
* @param {element} itemElement - gallery item
*/
parseItem(itemElement) {
let result = false;
const $dataElement =
itemElement &&
itemElement.querySelector('.vp-portfolio__item-popup');
if ($dataElement) {
result = {
$dataElement,
$content: $dataElement,
data: $dataElement.dataset,
};
// Support for <template> tag.
if (
templatesSupport &&
$dataElement.nodeName === 'TEMPLATE' &&
$dataElement.content
) {
result.$content = $dataElement.content;
}
result.$title = result?.$content?.querySelector(
'.vp-portfolio__item-popup-title'
);
result.$description = result?.$content?.querySelector(
'.vp-portfolio__item-popup-description'
);
}
return result;
},
/**
* Parse gallery
*
* @param {jQuery} $gallery - gallery element.
*
* @return {Array} gallery data
*/
parseGallery($gallery) {
const items = [];
let size;
let item;
let video;
let videoData;
// Find all gallery items
// Skip Swiper slider duplicates.
// Previously we also used the `:not(.swiper-slide-duplicate-active)`, but it contains a valid first slide.
$gallery
.find('.vp-portfolio__item-wrap:not(.swiper-slide-duplicate)')
.each(function () {
const itemData = VPPopupAPI.parseItem(this);
if (itemData) {
size = (
itemData?.data?.vpPopupImgSize || '1920x1080'
).split('x');
video = itemData?.data?.vpPopupVideo;
videoData = false;
if (video) {
videoData = VPPopupAPI.parseVideo(
video,
itemData?.data?.vpPopupPoster
);
}
if (videoData) {
item = {
type: 'embed',
el: this,
poster: videoData.poster,
src: videoData.embedUrl,
embed: videoData.embed,
width: videoData.width || 1920,
height: videoData.height || 1080,
};
} else {
// create slide object
item = {
type: 'image',
el: this,
src: itemData?.data?.vpPopupImg,
srcset: itemData?.data?.vpPopupImgSrcset,
width: parseInt(size[0], 10),
height: parseInt(size[1], 10),
};
const srcSmall =
itemData?.data?.vpPopupSmImg || item.src;
if (srcSmall) {
const smallSize = (
itemData?.data?.vpPopupSmImgSize ||
itemData?.data?.vpPopupImgSize ||
'1920x1080'
).split('x');
item.srcSmall = srcSmall;
item.srcSmallWidth = parseInt(smallSize[0], 10);
item.srcSmallHeight = parseInt(smallSize[1], 10);
}
const srcMedium =
itemData?.data?.vpPopupMdImg || item.src;
if (srcMedium) {
const mediumSize = (
itemData?.data?.vpPopupMdImgSize ||
itemData?.data?.vpPopupImgSize ||
'1920x1080'
).split('x');
item.srcMedium = srcMedium;
item.srcMediumWidth = parseInt(mediumSize[0], 10);
item.srcMediumHeight = parseInt(mediumSize[1], 10);
}
}
if (itemData?.$title || itemData?.$description) {
item.caption =
(itemData?.$title?.outerHTML || '') +
(itemData?.$description?.outerHTML || '');
}
items.push(item);
}
});
return items;
},
/**
* Try to focus gallery item link.
* Used when popup gallery is closed.
*
* @param {Object} data - data of the current item
*/
maybeFocusGalleryItem(data) {
if (!settingsPopupGallery.restore_focus) {
return;
}
// Focus native gallery item.
if (data.linkEl) {
$(data.linkEl).focus();
// Focus Visual Portfolio gallery item.
} else if (data.el) {
$(data.el).find('.vp-portfolio__item-img > a').focus();
}
},
};
window.VPPopupAPI = VPPopupAPI;
// Extend VP class.
$(document).on('extendClass.vpf', (event, VP) => {
if (event.namespace !== 'vpf') {
return;
}
/**
* Init popup gallery
*/
VP.prototype.initPopupGallery = function () {
const self = this;
if (
!self.options.itemsClickAction ||
self.options.itemsClickAction === 'url'
) {
return;
}
// prevent on preview page
if (self.isPreview()) {
return;
}
// click action
// `a.vp-portfolio__item-overlay` added as fallback for old templates, used in themes.
self.$item.on(
`click.vpf-uid-${self.uid}`,
`
.vp-portfolio__item a.vp-portfolio__item-meta,
.vp-portfolio__item .vp-portfolio__item-img > a,
.vp-portfolio__item .vp-portfolio__item-meta-title > a,
.vp-portfolio__item a.vp-portfolio__item-overlay
`,
function (e) {
if (e.isDefaultPrevented()) {
return;
}
const $this = $(this);
let $itemWrap = $this.closest('.vp-portfolio__item-wrap');
// Use Swiper data-attribute to support slide duplicates.
if (
$itemWrap.hasClass('swiper-slide-duplicate') &&
$itemWrap.attr('data-swiper-slide-index')
) {
$itemWrap = self.$item.find(
`[data-swiper-slide-index="${$itemWrap.attr(
'data-swiper-slide-index'
)}"].swiper-slide:not(.swiper-slide-duplicate)`
);
}
if (!$itemWrap.find('.vp-portfolio__item-popup').length) {
return;
}
const items = VPPopupAPI.parseGallery(self.$item);
let index = -1;
// Get gallery item index.
// We should check all items with gallery data to prevent
// issue with items and custom URL used.
items.forEach((item, idx) => {
if (item.el === $itemWrap[0]) {
index = idx;
}
});
// Let's open popup once item index found.
if (index !== -1) {
e.preventDefault();
VPPopupAPI.open(items, index, self);
}
}
);
};
/**
* Destroy popup gallery
*/
VP.prototype.destroyPopupGallery = function () {
const self = this;
if (
!self.options.itemsClickAction ||
self.options.itemsClickAction === 'url'
) {
return;
}
self.$item.off(`click.vpf-uid-${self.uid}`);
self.emitEvent('destroyPopupGallery');
};
});
// Init.
$(document).on('init.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.initPopupGallery();
});
// Destroy.
$(document).on('destroy.vpf', (event, self) => {
if (event.namespace !== 'vpf') {
return;
}
self.destroyPopupGallery();
});
// Check if link is image.
function isLinkImage(link) {
return /(.png|.jpg|.jpeg|.gif|.tiff|.tif|.jfif|.jpe|.svg|.bmp|.webp)$/.test(
link.href.toLowerCase().split('?')[0].split('#')[0]
);
}
// Parse image data from link.
function parseImgData(link) {
const $link = $(link);
let img = link.childNodes[0];
let caption = $link.next('figcaption');
// <noscript> tag used in plugins, that adds lazy loading
if (img.nodeName === 'NOSCRIPT' && link.childNodes[1]) {
img = link.childNodes[1];
}
if (!caption.length && $link.parent('.gallery-icon').length) {
caption = $link.parent('.gallery-icon').next('figcaption');
}
caption = caption.html();
if (caption) {
caption = `<div class="vp-portfolio__item-popup-description">${caption}</div>`;
}
return {
type: 'image',
el: img,
linkEl: link,
src: link.href,
caption,
};
}
/* Popup for default WordPress images */
if (settingsPopupGallery.enable_on_wordpress_images) {
$(document).on(
'click',
`
.wp-block-image > a,
.wp-block-image > figure > a,
.wp-block-gallery .blocks-gallery-item > figure > a,
.wp-block-gallery .wp-block-image > a,
.wp-block-media-text > figure > a,
.gallery .gallery-icon > a,
figure.wp-caption > a,
figure.tiled-gallery__item > a,
p > a
`,
function (e) {
if (e.isDefaultPrevented()) {
return;
}
if (!this.childNodes.length) {
return;
}
let imageNode = this.childNodes[0];
// <noscript> tag used in plugins, that adds lazy loading
if (imageNode.nodeName === 'NOSCRIPT' && this.childNodes[1]) {
imageNode = this.childNodes[1];
}
// check if child node is <img> or <picture> tag.
// <picture> tag used in plugins, that adds WebP support
if (
imageNode.nodeName !== 'IMG' &&
imageNode.nodeName !== 'PICTURE'
) {
return;
}
// check if link is image.
if (!isLinkImage(this)) {
return;
}
e.preventDefault();
const $this = $(this);
const items = [];
const currentImage = parseImgData(this);
const $gallery = $this.closest(
'.wp-block-gallery, .gallery, .tiled-gallery__gallery'
);
let activeIndex = 0;
// Block gallery, WordPress default gallery, Jetpack gallery.
if ($gallery.length) {
const $galleryItems = $gallery.find(
'.blocks-gallery-item > figure > a, .wp-block-image > a, .gallery-icon > a, figure.tiled-gallery__item > a'
);
let i = 0;
$galleryItems.each(function () {
// check if link is image.
if (isLinkImage(this)) {
if (this === currentImage.linkEl) {
activeIndex = i;
}
items.push(parseImgData(this));
i += 1;
}
});
// WordPress gallery.
} else {
items.push(currentImage);
}
VPPopupAPI.open(items, activeIndex);
}
);
}
@@ -0,0 +1,93 @@
import $ from 'jquery';
const $body = $('body');
const $doc = $(document);
const $preview = $('#vp_preview');
// prevent click on links.
document.addEventListener(
'click',
(e) => {
e.stopPropagation();
e.preventDefault();
if (window.parentIFrame) {
window.parentIFrame.sendMessage('clicked');
}
},
true
);
// prevent click on <select> and similar elements.
document.addEventListener(
'mousedown',
(e) => {
e.stopPropagation();
e.preventDefault();
e.target.blur();
window.focus();
},
true
);
// add dynamic data to AJAX calls.
$doc.on('startLoadingNewItems.vpf', (event, vpObject, url, ajaxData) => {
if (event.namespace !== 'vpf') {
return;
}
ajaxData.data = Object.assign(
ajaxData.data || {},
window.vp_preview_post_data
);
});
// Dynamic CSS cache.
const dynamicCSScache = {};
// configure iFrame resizer script.
window.iFrameResizer = {
log: false,
heightCalculationMethod() {
return $preview.outerHeight(true);
},
onMessage(data) {
if (!data || !data.name) {
return;
}
switch (data.name) {
case 'resize':
// This random number needed for proper resize Isotope and other plugins.
$body.css('max-width', data.width + Math.random());
break;
case 'dynamic-css': {
// Insert dynamic styles.
const styleId = `vp-dynamic-styles-${data.blockId}-inline-css`;
// Skip if styles haven't changed.
if (
dynamicCSScache[styleId] &&
data.styles === dynamicCSScache[styleId]
) {
break;
}
let $style = $(`#${styleId}`);
if (!$style.length) {
$style = $(`<style id="${styleId}"></style>`).appendTo(
'head'
);
}
dynamicCSScache[styleId] = data.styles;
$style.text(data.styles);
break;
}
// no default
}
},
};
@@ -0,0 +1,7 @@
/*!
* Name : Conditionize - jQuery conditions for forms
* Version : 1.0.5
* Author : nK <https://nkdev.info>
* GitHub : https://github.com/nk-o/conditionize
*/!function(n){const o={};function r(t){if(o[t])return o[t].exports;const e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;const n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!==typeof e)for(const o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){const e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";n.r(e);const r=n(2),o=n(3);function u(t){return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(e,t){let n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)),o}function i(r){for(let t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach(function(t){let e,n,o;e=r,o=i[n=t],n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function a(t,e){for(let n=0;n<e.length;n++){const o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}let f=o.window.jQuery,s=0;function l(t){this.table=t}l.prototype.parse=function(t){for(var e,n=t.length,o=this.table,r=[],i=[],c=0;c<n;){switch(e=t[c++]){case"(":i.unshift(e);break;case")":for(;i.length;){if("("===(e=i.shift()))break;r.push(e)}if("("!==e)throw new Error("Mismatched parentheses.");break;default:if(o.hasOwnProperty(e)){for(;i.length;){const u=i[0];if("("===u)break;const a=o[e],f=a.precedence,s=o[u].precedence;if(s<f||f===s&&"right"===a.associativity)break;r.push(i.shift())}i.unshift(e)}else r.push(e)}}for(;i.length;){if("("===(e=i.shift()))throw new Error("Mismatched parentheses.");r.push(e)}return r};function p(t,e){("object"===("undefined"===typeof HTMLElement?"undefined":u(HTMLElement))?t instanceof HTMLElement:t&&"object"===u(t)&&null!==t&&1===t.nodeType&&"string"===typeof t.nodeName)&&(t=[t]);for(var n,o=e,r=Array.prototype.slice.call(arguments,2),i=t.length,c=0;c<i;c++)if("object"===u(o)||void 0===o?t[c].Conditionize||(t[c].Conditionize=new v(t[c],o)):t[c].Conditionize&&(n=t[c].Conditionize[o].apply(t[c].Conditionize,r)),void 0!==n)return n;return t}var d={precedence:3,associativity:"left"},y={precedence:2,associativity:"left"},h={"==":{eval(t,e){return t==e},sort:y},"!=":{eval(t,e){return t!=e},sort:y},"===":{eval(t,e){return t===e},sort:y},"!==":{eval(t,e){return t!==e},sort:y},"*=":{eval(t,e){return-1!==t.indexOf(e)},sort:y},"<=":{eval(t,e){return t<=e},sort:d},">=":{eval(t,e){return e<=t},sort:d},"<":{eval(t,e){return t<e},sort:d},">":{eval(t,e){return e<t},sort:d},"&&":{eval(t,e){return t&&e},sort:{precedence:1,associativity:"right"}},"||":{eval(t,e){return t||e},sort:{precedence:0,associativity:"right"}}},v=function(){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);const n=this;n.instanceID=s++,n.$container=f(t),n.defaults={selector:"[data-cond]",conditionAttr:"data-cond",checkDebounce:150,customToggle:null,onInit:null,onDestroy:null,onCheck:null},n.options=i(i({},n.defaults),e),n.runCheck=Object(r.debounce)(n.options.checkDebounce,n.runCheck),n.init()}let t,e,n;return t=o,(e=[{key:"init",value(){const t=this;t.options.customToggle?t.options.customToggle.call(t,t.$container.find(t.options.selector),!1):t.$container.find(t.options.selector).hide(),t.$container.on("change.conditionize","input, select, textarea",function(){t.runCheck(t.$container.find(t.options.selector))}),t.runCheck(t.$container.find(t.options.selector)),t.options.onInit&&t.options.onInit.call(t)}},{key:"runCheck",value(t){const o=this;t.each(function(){const t=f(this),e=t.attr(o.options.conditionAttr).toString(),n=o.checkCondition(e);o.options.customToggle?o.options.customToggle.call(o,t,n):t[n?"show":"hide"](),o.options.onCheck&&o.options.onCheck(t,n)})}},{key:"checkCondition",value(t){var e=t.match(/[^\s]+/g),n={};Object.keys(h).forEach(function(t){n[t]=h[t].sort});for(var o,r,i,e=new l(n).parse(eLine truncated
//# sourceMappingURL=conditionize.min.js.map
@@ -0,0 +1 @@
{"version":3,"sources":["conditionize.js"],"names":["modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","throttle_debounce__WEBPACK_IMPORTED_MODULE_0__","global__WEBPACK_IMPORTED_MODULE_1__","_typeof","obj","iterator","constructor","ownKeys","enumerableOnly","symbols","keys","getOwnPropertySymbols","filter","sym","getOwnPropertyDescriptor","push","apply","_objectSpread","target","arguments","length","source","forEach","configurable","writable","getOwnPropertyDescriptors","defineProperties","_defineProperties","props","descriptor","$","jQuery","instanceID","Parser","e","this","table","parse","a","h","unshift","shift","Error","f","precedence","associativity","plugin","items","HTMLElement","nodeType","nodeName","ret","options","args","Array","slice","len","k","Conditionize","sortRelational","sortEquality","relations","==","eval","b","sort","!=","===","!==","*=","indexOf","<=",">=","<",">","&&","||","container","userOptions","instance","Constructor","TypeError","_classCallCheck","self","$container","defaults","selector","conditionAttr","checkDebounce","customToggle","onInit","onDestroy","onCheck","runCheck","init","protoProps","staticProps","find","hide","on","$items","each","$this","conditionString","attr","toString","conditionResult","checkCondition","str","tokens","match","parserRelations","token","stack","index","pop","compare","isNumeric","error","operator","arr","condition","isValidSelector","$listenTo","result","is","val","off","show","jQueryPlugin","res","oldJqPlugin","fn","conditionize","noConflict","throttle","delay","noTrailing","callback","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","clearTimeout","wrapper","elapsed","Date","now","exec","undefined","setTimeout","cancel","debounce","atBegin","global","win","window","g","Function"],"mappings":";;;;;IAAA,SAAAA,GAEA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAJ,EAAAG,GAAAK,KAAAH,EAAAD,QAAAC,EAAAA,EAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAT,EAGAC,EAAAS,EAAA,SAAAP,EAAAQ,EAAAC,GACAX,EAAAY,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,EAAA,CAAAK,YAAA,EAAAC,IAAAL,KAKAX,EAAAiB,EAAA,SAAAf,GACA,oBAAAgB,QAAAA,OAAAC,aACAN,OAAAC,eAAAZ,EAAAgB,OAAAC,YAAA,CAAAC,MAAA,WAEAP,OAAAC,eAAAZ,EAAA,aAAA,CAAAkB,OAAA,KAQApB,EAAAqB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAApB,EAAAoB,IACA,EAAAE,EAAA,OAAAF,EACA,GAAA,EAAAE,GAAA,iBAAAF,GAAAA,GAAAA,EAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFAzB,EAAAiB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,UAAA,CAAAT,YAAA,EAAAK,MAAAA,IACA,EAAAE,GAAA,iBAAAF,EAAA,IAAA,IAAAM,KAAAN,EAAApB,EAAAS,EAAAe,EAAAE,EAAA,SAAAA,GAAA,OAAAN,EAAAM,IAAAC,KAAA,KAAAD,IACA,OAAAF,GAIAxB,EAAA4B,EAAA,SAAAzB,GACA,IAAAQ,EAAAR,GAAAA,EAAAoB,WACA,WAAA,OAAApB,EAAA,SACA,WAAA,OAAAA,GAEA,OADAH,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAiB,EAAAC,GAAA,OAAAjB,OAAAkB,UAAAC,eAAA1B,KAAAuB,EAAAC,IAGA9B,EAAAiC,EAAA,GAIAjC,EAAAA,EAAAkC,EAAA,GAnFA,CAsFA,CAEA,SAAA/B,EAAAD,EAAAF,GAEAG,EAAAD,QAAAF,EAAA,IAKA,SAAAG,EAAAgC,EAAAnC,gBAGAA,EAAAiB,EAAAkB,GACA,IAAAC,EAAApC,EAAA,GACAqC,EAAArC,EAAA,GAEA,SAAAsC,EAAAC,GAAA,OAAAD,EAAA,mBAAApB,QAAA,iBAAAA,OAAAsB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAArB,QAAAqB,EAAAE,cAAAvB,QAAAqB,IAAArB,OAAAa,UAAA,gBAAAQ,IAAAA,GAEA,SAAAG,EAAAb,EAAAc,GAAA,IAAAC,EAAAC,EAAAhC,OAAAgC,KAAAhB,GAAA,OAAAhB,OAAAiC,wBAAAF,EAAA/B,OAAAiC,sBAAAjB,GAAAc,IAAAC,EAAAA,EAAAG,OAAA,SAAAC,GAAA,OAAAnC,OAAAoC,yBAAApB,EAAAmB,GAAAjC,cAAA8B,EAAAK,KAAAC,MAAAN,EAAAD,IAAAC,EAEA,SAAAO,EAAAC,GAAA,IAAA,IAAAjD,EAAA,EAAAA,EAAAkD,UAAAC,OAAAnD,IAAA,CAAA,IAAAoD,EAAA,MAAAF,UAAAlD,GAAAkD,UAAAlD,GAAA,GAAAA,EAAA,EAAAsC,EAAA7B,OAAA2C,IAAA,GAAAC,QAAA,SAAA/B,GAEA,IAAAa,EAAAb,EAAAN,EAAAmB,EAFAc,EAEAjC,EAFAoC,EAEA9B,EAFAA,GAEAA,KAAAa,EAAA1B,OAAAC,eAAAyB,EAAAb,EAAA,CAAAN,MAAAA,EAAAL,YAAA,EAAA2C,cAAA,EAAAC,UAAA,IAAApB,EAAAb,GAAAN,IAFAP,OAAA+C,0BAAA/C,OAAAgD,iBAAAR,EAAAxC,OAAA+C,0BAAAJ,IAAAd,EAAA7B,OAAA2C,IAAAC,QAAA,SAAA/B,GAAAb,OAAAC,eAAAuC,EAAA3B,EAAAb,OAAAoC,yBAAAO,EAAA9B,MAAA,OAAA2B,EAMA,SAAAS,EAAAT,EAAAU,GAAA,IAAA,IAAA3D,EAAA,EAAAA,EAAA2D,EAAAR,OAAAnD,IAAA,CAAA,IAAA4D,EAAAD,EAAA3D,GAAA4D,EAAAjD,WAAAiD,EAAAjD,aAAA,EAAAiD,EAAAN,cAAA,EAAA,UAAAM,IAAAA,EAAAL,UAAA,GAAA9C,OAAAC,eAAAuC,EAAAW,EAAAtC,IAAAsC,IAMA,IAAAC,EAAA5B,EAAA,OAAA6B,OACAC,EAAA,EAIA,SAAAC,EAAAC,GACAC,KAAAC,MAAAF,EAGAD,EAAArC,UAAAyC,MAAA,SAAAH,GACA,IAAA,IAqCAjE,EArCAa,EAAAoD,EAAAd,OAAAlC,EAAAiD,KAAAC,MAAArC,EAAA,GAAAuC,EAAA,GAAAC,EAAA,EAAAA,EAAAzD,GAAA,CAGA,OAFAb,EAAAiE,EAAAK,MAGA,IAAA,IACAD,EAAAE,QAAAvE,GACA,MAEA,IAAA,IACA,KAAAqE,EAAAlB,QAAA,CAEA,GAAA,OADAnD,EAAAqE,EAAAG,SACA,MACA1C,EAAAgB,KAAA9C,GAGA,GAAA,MAAAA,EAAA,MAAA,IAAAyE,MAAA,2BACA,MAEA,QACA,GAAAxD,EAAAW,eAAA5B,GAAA,CACA,KAAAqE,EAAAlB,QAAA,CACA,IAAAuB,Line truncated
@@ -0,0 +1 @@
body.compensate-for-scrollbar{overflow:hidden}.fancybox-active{height:auto}.fancybox-is-hidden{left:-9999px;margin:0;position:absolute!important;top:-9999px;visibility:hidden}.fancybox-container{-webkit-backface-visibility:hidden;height:100%;left:0;outline:none;position:fixed;-webkit-tap-highlight-color:transparent;top:0;-ms-touch-action:manipulation;touch-action:manipulation;transform:translateZ(0);width:100%;z-index:99992}.fancybox-container *{box-sizing:border-box}.fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-stage{bottom:0;left:0;position:absolute;right:0;top:0}.fancybox-outer{-webkit-overflow-scrolling:touch;overflow-y:auto}.fancybox-bg{background:#1e1e1e;opacity:0;transition-duration:inherit;transition-property:opacity;transition-timing-function:cubic-bezier(.47,0,.74,.71)}.fancybox-is-open .fancybox-bg{opacity:.9;transition-timing-function:cubic-bezier(.22,.61,.36,1)}.fancybox-caption,.fancybox-infobar,.fancybox-navigation .fancybox-button,.fancybox-toolbar{direction:ltr;opacity:0;position:absolute;transition:opacity .25s ease,visibility 0s ease .25s;visibility:hidden;z-index:99997}.fancybox-show-caption .fancybox-caption,.fancybox-show-infobar .fancybox-infobar,.fancybox-show-nav .fancybox-navigation .fancybox-button,.fancybox-show-toolbar .fancybox-toolbar{opacity:1;transition:opacity .25s ease 0s,visibility 0s ease 0s;visibility:visible}.fancybox-infobar{color:#ccc;font-size:13px;-webkit-font-smoothing:subpixel-antialiased;height:44px;left:0;line-height:44px;min-width:44px;mix-blend-mode:difference;padding:0 10px;pointer-events:none;top:0;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fancybox-toolbar{right:0;top:0}.fancybox-stage{direction:ltr;overflow:visible;transform:translateZ(0);z-index:99994}.fancybox-is-open .fancybox-stage{overflow:hidden}.fancybox-slide{-webkit-backface-visibility:hidden;display:none;height:100%;left:0;outline:none;overflow:auto;-webkit-overflow-scrolling:touch;padding:44px;position:absolute;text-align:center;top:0;transition-property:transform,opacity;white-space:normal;width:100%;z-index:99994}.fancybox-slide:before{content:"";display:inline-block;font-size:0;height:100%;vertical-align:middle;width:0}.fancybox-is-sliding .fancybox-slide,.fancybox-slide--current,.fancybox-slide--next,.fancybox-slide--previous{display:block}.fancybox-slide--image{overflow:hidden;padding:44px 0}.fancybox-slide--image:before{display:none}.fancybox-slide--html{padding:6px}.fancybox-content{background:#fff;display:inline-block;margin:0;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;padding:44px;position:relative;text-align:left;vertical-align:middle}.fancybox-slide--image .fancybox-content{animation-timing-function:cubic-bezier(.5,0,.14,1);-webkit-backface-visibility:hidden;background:transparent;background-repeat:no-repeat;background-size:100% 100%;left:0;max-width:none;overflow:visible;padding:0;position:absolute;top:0;transform-origin:top left;transition-property:transform,opacity;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:99995}.fancybox-can-zoomOut .fancybox-content{cursor:zoom-out}.fancybox-can-zoomIn .fancybox-content{cursor:zoom-in}.fancybox-can-pan .fancybox-content,.fancybox-can-swipe .fancybox-content{cursor:grab}.fancybox-is-grabbing .fancybox-content{cursor:grabbing}.fancybox-container [data-selectable=true]{cursor:text}.fancybox-image,.fancybox-spaceball{background:transparent;border:0;height:100%;left:0;margin:0;max-height:none;max-width:none;padding:0;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.fancybox-spaceball{z-index:1}.fancybox-slide--iframe .fancybox-content,.fancybox-slide--map .fancybox-content,.fancybox-slide--pdf .fancybox-content,.fancybox-slide--video .fancybox-content{height:100%;overflow:visible;padding:0;width:100%}.fancybox-slide--video .fancybox-content{background:#000}.fancybox-slide--map .fancybox-content{background:#e5e3df}.fancybox-slide--iframe .fancybox-content{background:#fff}.fancybox-iframe,.fancybox-video{background:transparent;border:0;display:block;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.fancybox-iframe{left:0;position:absolute;top:0}.fancybox-error{background:#fff;cursor:default;max-width:400px;padding:40px;width:100%}.fancybox-error p{color:#444;font-size:16px;line-height:20px;margin:0;padding:0}.fancybox-button{background:rgba(30,30,30,.6);border:0;border-radius:0;box-shadow:none;cursor:pointer;display:inline-block;height:44px;margin:0;padding:10px;position:relative;transition:color .2s;vertical-align:top;visibility:inherit;width:44px}.fancybox-button,.fancybox-button:link,.fancybox-button:visited{color:#ccc}.fancybox-button:hover{color:#fff}.fancybox-button:focus{outline:none}.fancybox-button.fancybox-focus{outline:1px dotted}.fancybox-button[disabled],.fancybox-button[disabled]:hover{color:#888;cursor:default;Line truncated
@@ -0,0 +1,13 @@
// ==================================================
// fancyBox v3.5.7
//
// Licensed GPLv3 for open source use
// or fancyBox Commercial License for commercial use
//
// http://fancyapps.com/fancybox/
// Copyright 2019 fancyApps
//
// ==================================================
!function(t,e,n,o){"use strict";function i(t,e){var o,i,a,s=[],r=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=h(t.data.options,e)),o=e.$target||n(t.currentTarget).trigger("blur"),(a=n.fancybox.getInstance())&&a.$trigger&&a.$trigger.is(o)||(e.selector?s=n(e.selector):(i=o.attr("data-fancybox")||"",i?(s=t.data?t.data.items:[],s=s.length?s.filter('[data-fancybox="'+i+'"]'):n('[data-fancybox="'+i+'"]')):s=[o]),r=n(s).index(o),r<0&&(r=0),a=n.fancybox.open(s,e,r),a.$trigger=o))}if(t.console=t.console||{info:function(t){}},n){if(n.fn.fancybox)return void console.info("fancyBox already initialized");var a={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="fancybox-container" role="dialog" tabindex="-1"><div class="fancybox-bg"></div><div class="fancybox-inner"><div class="fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class="fancybox-toolbar">{{buttons}}</div><div class="fancybox-navigation">{{arrows}}</div><div class="fancybox-stage"></div><div class="fancybox-caption"><div class="fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="fancybox-loading"></div>',errorTpl:'<div class="fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="fancybox-button fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> PLine truncated
"auto"==r&&(r=Math.abs(f.width/f.height-l.width/l.height)>.1),r&&(l.opacity=0),n.fancybox.setTranslate(a,c),p(a),n.fancybox.animate(a,l,i,h),!0):(o&&i?n.fancybox.animate(f.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+o,i,h):!0===t?setTimeout(h,i):h(),!0)))},cleanUp:function(e){var o,i,a,s=this,r=s.current.opts.$orig;s.current.$slide.trigger("onReset"),s.$refs.container.empty().remove(),s.trigger("afterClose",e),s.current.opts.backFocus&&(r&&r.length&&r.is(":visible")||(r=s.$trigger),r&&r.length&&(i=t.scrollX,a=t.scrollY,r.trigger("focus"),n("html, body").scrollTop(a).scrollLeft(i))),s.current=null,o=n.fancybox.getInstance(),o?o.activate():(n("body").removeClass("fancybox-active compensate-for-scrollbar"),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;if(s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),!1===o)return o;"afterClose"!==t&&a.$refs?a.$refs.container.trigger(t+".fb",i):r.trigger(t+".fb",i)},updateControls:function(){var t=this,o=t.current,i=o.index,a=t.$refs.container,s=t.$refs.caption,r=o.opts.caption;o.$slide.trigger("refresh"),r&&r.length?(t.$caption=s,s.children().eq(0).html(r)):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),a.find("[data-fancybox-count]").html(t.group.length),a.find("[data-fancybox-index]").html(i+1),a.find("[data-fancybox-prev]").prop("disabled",!o.opts.loop&&i<=0),a.find("[data-fancybox-next]").prop("disabled",!o.opts.loop&&i>=t.group.length-1),"image"===o.type?a.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",o.opts.image.src||o.src).show():o.opts.toolbar&&a.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),n(e.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=this,n=["infobar","toolbar","nav"];!t&&e.current.opts.preventCaptionOverlap||n.push("caption"),this.$refs.container.removeClass(n.map(function(t){return"fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.5.7",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new b(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))})},setTranslate:function(t,e){var n="",o={};if(t&&e)return void 0===e.left&&void 0===e.top||(n=(void 0===e.left?t.position().left:e.left)+"px, "+(void 0===e.top?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),void 0!==e.scaleX&&void 0!==e.scaleY?n+=" scale("+e.scaleX+", "+e.scaleY+")":void 0!==e.scaleX&&(n+=" scaleX("+e.scaleX+")"),n.length&&(o.transform=n),void 0!==e.opacity&&(o.opacity=e.opacity),void 0!==e.width&&(o.width=e.width),void 0!==e.height&&(o.height=e.height),t.css(o)},animate:function(t,e,o,i,a){var s,r=this;n.isFunction(o)&&(i=o,o=null),r.stop(t),s=r.getTranslate(t),t.on(f,function(c){(!c||!c.originalEvent||t.is(c.originalEvent.target)&&"z-index"!=c.originalEvent.propertyName)&&(r.stop(t),n.isNumeric(o)&&t.css("transition-duration",""),n.isPlainObject(e)?void 0!==e.scaleX&&void 0!==e.scaleY&&r.setTranslate(t,{top:e.top,left:e.left,width:s.width*e.scaleX,height:s.height*e.scaleY,scaleX:1,scaleY:1}):!0!==a&&t.removeClass(e),n.isFunction(i)&&i(c))}),n.isNumeric(o)&&t.css("transition-duration",o+"ms"),n.isPlainObject(e)?(void 0!==e.scaleX&&void 0!==e.scaleY&&(delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&&t.parent().addClass("fancybox-is-scaling")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger(f)},o+33))},stop:functionLine truncated
tpl:'<div class="fancybox-share"><h1>{{SHARE}}</h1><p><a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>'}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,i=e.fancybox.getInstance(),a=i.current||null;a&&("function"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[i,a])),o=a.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===a.type?encodeURIComponent(a.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,i.$caption?encodeURIComponent(i.$caption.text()):""),e.fancybox.open({src:i.translate(i,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return{hash:e,index:o<1?1:o,gallery:i}}function i(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function a(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,""!==(n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""))&&n)}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),n(function(){!1!==n.fancybox.defaults.hash&&(n(e).on({"onInit.fb":function(t,e){var n,i;!1!==e.group[e.currIndex].opts.hash&&(n=o(),(i=a(e))&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i,s){var r;i&&!1!==i.opts.hash&&(r=a(o))&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),t.location.hash!=="#"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300)))},"beforeClose.fb":function(n,o,i){i&&!1!==i.opts.hash&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var i=n(o).data("FancyBox");if(i&&i.currentHash)return e=i,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&i(t)}),setTimeout(function(){n.fancybox.getInstance()||i(o())},50))})}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<2||!1===o.opts.wheel||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"Line truncated
@@ -0,0 +1,19 @@
.fj-gallery {
position: relative;
overflow: hidden;
}
.fj-gallery::after {
content: "";
display: block;
clear: both;
}
.fj-gallery .fj-gallery-item {
float: left;
top: 0;
left: 0;
}
.fj-gallery .fj-gallery-item > img {
display: block;
width: 100%;
height: auto;
}
@@ -0,0 +1,13 @@
/*!
* Flickr's Justified Gallery [fjGallery] v2.1.2 (https://flickr-justified-gallery.nkdev.info)
* Copyright 2022 nK <https://nkdev.info>
* Licensed under MIT (https://github.com/nk-o/flickr-justified-gallery/blob/master/LICENSE)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).fjGallery=e()}(this,(function(){"use strict";let t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var e=t;function i(t,e,i){var o=(i||{}).atBegin;return function(t,e,i){var o,n=i||{},s=n.noTrailing,a=void 0!==s&&s,r=n.noLeading,h=void 0!==r&&r,c=n.debounceMode,l=void 0===c?void 0:c,g=!1,d=0;function u(){o&&clearTimeout(o)}function p(){for(var i=arguments.length,n=new Array(i),s=0;s<i;s++)n[s]=arguments[s];var r=this,c=Date.now()-d;function p(){d=Date.now(),e.apply(r,n)}function f(){o=void 0}g||(h||!l||o||p(),u(),void 0===l&&c>t?h?(d=Date.now(),a||(o=setTimeout(l?f:p,t))):p():!0!==a&&(o=setTimeout(l?f:p,void 0===l?t-c:t)))}return p.cancel=function(t){var e=(t||{}).upcomingOnly,i=void 0!==e&&e;u(),g=!i},p}(t,e,{debounceMode:!1!==(void 0!==o&&o)})}var o=function(t){var e=[],i=null,o=function(){for(var o=arguments.length,n=new Array(o),s=0;s<o;s++)n[s]=arguments[s];e=n,i||(i=requestAnimationFrame((function(){i=null,t.apply(void 0,e)})))};return o.cancel=function(){i&&(cancelAnimationFrame(i),i=null)},o},n={exports:{}};(n.exports=function(t){this.top=t.top,this.left=t.left,this.width=t.width,this.spacing=t.spacing,this.targetRowHeight=t.targetRowHeight,this.targetRowHeightTolerance=t.targetRowHeightTolerance,this.minAspectRatio=this.width/t.targetRowHeight*(1-t.targetRowHeightTolerance),this.maxAspectRatio=this.width/t.targetRowHeight*(1+t.targetRowHeightTolerance),this.edgeCaseMinRowHeight=t.edgeCaseMinRowHeight,this.edgeCaseMaxRowHeight=t.edgeCaseMaxRowHeight,this.widowLayoutStyle=t.widowLayoutStyle,this.isBreakoutRow=t.isBreakoutRow,this.items=[],this.height=0}).prototype={addItem:function(t){var e,i,o,n=this.items.concat(t),s=this.width-(n.length-1)*this.spacing,a=n.reduce((function(t,e){return t+e.aspectRatio}),0),r=s/this.targetRowHeight;return this.isBreakoutRow&&0===this.items.length&&t.aspectRatio>=1?(this.items.push(t),this.completeLayout(s/t.aspectRatio,"justify"),!0):a<this.minAspectRatio?(this.items.push(Object.assign({},t)),!0):a>this.maxAspectRatio?0===this.items.length?(this.items.push(Object.assign({},t)),this.completeLayout(s/a,"justify"),!0):(e=this.width-(this.items.length-1)*this.spacing,i=this.items.reduce((function(t,e){return t+e.aspectRatio}),0),o=e/this.targetRowHeight,Math.abs(a-r)>Math.abs(i-o)?(this.completeLayout(e/i,"justify"),!1):(this.items.push(Object.assign({},t)),this.completeLayout(s/a,"justify"),!0)):(this.items.push(Object.assign({},t)),this.completeLayout(s/a,"justify"),!0)},isLayoutComplete:function(){return this.height>0},completeLayout:function(t,e){var i,o,n,s,a,r=this.left,h=this.width-(this.items.length-1)*this.spacing;(void 0===e||["justify","center","left"].indexOf(e)<0)&&(e="left"),t!==(o=Math.max(this.edgeCaseMinRowHeight,Math.min(t,this.edgeCaseMaxRowHeight)))?(this.height=o,i=h/o/(h/t)):(this.height=t,i=1),this.items.forEach((function(t){t.top=this.top,t.width=t.aspectRatio*this.height*i,t.height=this.height,t.left=r,r+=t.width+this.spacing}),this),"justify"===e?(r-=this.spacing+this.left,n=(r-this.width)/this.items.length,s=this.items.map((function(t,e){return Math.round((e+1)*n)})),1===this.items.length?this.items[0].width-=Math.round(n):this.items.forEach((function(t,e){e>0?(t.left-=s[e-1],t.width-=s[e]-s[e-1]):t.width-=s[e]}))):"center"===e&&(a=(this.width-r)/2,this.items.forEach((function(t){t.left+=a+this.spacing}),this))},forceComplete:function(t,e){"number"==typeof e?this.completeLayout(e,this.widowLayoutStyle):this.completeLayout(this.targetRowHeight,this.widowLayoutStyle)},getItems:function(){return this.items}};
/*!
* Copyright 2019 SmugMug, Inc.
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
* @license
*/
var s=n.exports;function a(t,e){var i;return!1!==t.fullWidthBreakoutRowCadence&&(e._rows.length+1)%t.fullWidthBreakoutRowCadence==0&&(i=!0),new s({top:e._containerHeight,left:t.containerPadding.left,width:t.containerWidth-t.containerPadding.left-t.containerPadding.right,spacing:t.boxSpacing.horizontal,targetRowHeight:t.targetRowHeight,targetRowHeightTolerance:t.targetRowHeightTolerance,edgeCaseMinRowHeight:.5*t.targetRowHeight,edgeCaseMaxRowHeight:2*t.targetRowHeight,rightToLeft:!1,isBreakoutRow:i,widowLayoutStyle:t.widowLayoutStyle})}function r(t,e,i){return e._rows.push(i),e._layoutItems=e._layoutItems.concat(i.getItems()),e._containerHeight+=i.height+t.boxSpacing.vertical,i.items}var h=function(t,e){var i={},o={},n={containerWidth:1060,containerPadding:10,boxSpacing:10,targetRowHeight:320,targetRowHeightTolerance:.25,maxNumRows:Number.POSITIVE_INFINITY,forceAspectRatio:!1,showWidows:!0,fullWidthBreakoutRowCadence:!1,widowLayoutStyle:"left"},s={},h={};return e=e||{},i=Object.assign(n,e),s.top=isNaN(parseFloat(i.containerPadding.top))?i.containerPadding:i.containerPadding.top,s.right=isNaN(parseFloat(i.containerPadding.right))?i.containerPadding:i.containerPadding.right,s.bottom=isNaN(parseFloat(i.containerPadding.bottom))?i.containerPadding:i.containerPadding.bottom,s.left=isNaN(parseFloat(i.containerPadding.left))?i.containerPadding:i.containerPadding.left,h.horizontal=isNaN(parseFloat(i.boxSpacing.horizontal))?i.boxSpacing:i.boxSpacing.horizontal,h.vertical=isNaN(parseFloat(i.boxSpacing.vertical))?i.boxSpacing:i.boxSpacing.vertical,i.containerPadding=s,i.boxSpacing=h,o._layoutItems=[],o._awakeItems=[],o._inViewportItems=[],o._leadingOrphans=[],o._trailingOrphans=[],o._containerHeight=i.containerPadding.top,o._rows=[],o._orphans=[],i._widowCount=0,function(t,e,i){var o,n,s,h=[];return t.forceAspectRatio&&i.forEach((function(e){e.forcedAspectRatio=!0,e.aspectRatio=t.forceAspectRatio})),i.some((function(i,s){if(isNaN(i.aspectRatio))throw new Error("Item "+s+" has an invalid aspect ratio");if(n||(n=a(t,e)),o=n.addItem(i),n.isLayoutComplete()){if(h=h.concat(r(t,e,n)),e._rows.length>=t.maxNumRows)return n=null,!0;if(n=a(t,e),!o&&(o=n.addItem(i),n.isLayoutComplete())){if(h=h.concat(r(t,e,n)),e._rows.length>=t.maxNumRows)return n=null,!0;n=a(t,e)}}})),n&&n.getItems().length&&t.showWidows&&(e._rows.length?(s=e._rows[e._rows.length-1].isBreakoutRow?e._rows[e._rows.length-1].targetRowHeight:e._rows[e._rows.length-1].height,n.forceComplete(!1,s)):n.forceComplete(!1),h=h.concat(r(t,e,n)),t._widowCount=n.getItems().length),e._containerHeight=e._containerHeight-t.boxSpacing.vertical,e._containerHeight=e._containerHeight+t.containerPadding.bottom,{containerHeight:e._containerHeight,widowCount:t._widowCount,boxes:e._layoutItems}}(i,o,t.map((function(t){return t.width&&t.height?{aspectRatio:t.width/t.height}:{aspectRatio:t}})))};function c(t,e){let i,o=!1,n=!1;const s=()=>{o?e(o):t.naturalWidth&&(o={width:t.naturalWidth,height:t.naturalHeight},e(o),clearInterval(i),n&&c())},a=()=>{s()},r=()=>{s()},h=()=>{0<t.naturalWidth&&s()},c=()=>{n=!1,t.removeEventListener("load",a),t.removeEventListener("error",r)};h(),o||(n=!0,t.addEventListener("load",a),t.addEventListener("error",r),i=setInterval(h,100))}const l=[],g=o((()=>{l.forEach((t=>{t.resize()}))}));var d;e.addEventListener("resize",g),e.addEventListener("orientationchange",g),e.addEventListener("load",g),d=()=>{g()},"complete"===document.readyState||"interactive"===document.readyState?d():document.addEventListener("DOMContentLoaded",d,{capture:!0,once:!0,passive:!0});let u=0;class p{constructor(t,e){const n=this;n.instanceID=u,u+=1,n.$container=t,n.images=[],n.defaults={itemSelector:".fj-gallery-item",imageSelector:"img",gutter:10,rowHeight:320,rowHeightTolerance:.25,maxRowsCount:Number.POSITIVE_INFINITY,lastRow:"left",transitionDuration:"0.3s",calculateItemsHeight:!1,resizeDebounce:100,isRtl:"rtl"===n.css(n.$container,"direction"),onInit:null,onDestroy:null,onAppendImages:null,onBeforeJustify:null,onJustify:null};const s=n.$container.dataset||{},a={};Object.keys(s).forEach((t=>{const e=t.substr(0,1).toLowerCase()+t.substr(1);e&&void 0!==n.defaults[e]&&(a[e]=s[t])})),n.options={...n.defaults,...a,...e},n.pureOptions={...n.options},n.resize=i(n.options.resizeDebounce,n.resize),n.justify=o(n.justify.bind(n)),n.init()}css(t,i){return"string"==typeof i?e.getComputedStyle(t).getPropertyValue(i):(Object.keys(i).forEach((e=>{t.style[e]=i[e]})),t)}applyTransition(t,e){const i=this;i.onTransitionEnd(t)(),i.css(t,{"transition-property":e.join(", "),"transition-duration":i.options.transitionDuration}),t.addEventListener("transitionend",i.onTransitionEnd(t,e),!1)}onTransitionEnd(t){const e=this;return()=>{e.css(t,{"transition-property":"","transition-duration":""}),t.removeEventListener("transitionend",e.onTransitionEnd(t))}}addToFjGalleryList(){l.push(this),g()}removeFromFjGalleryList(){const t=this;l.forEach(((e,i)=>{e.instanceID===t.instanceID&&l.splice(i,1)}))}init(){const t=thiLine truncated
//# sourceMappingURL=fjGallery.min.js.map
@@ -0,0 +1 @@
{"version":3,"file":"fjGallery.min.js","sources":["../src/utils/global.js","../node_modules/throttle-debounce/esm/index.js","../node_modules/raf-schd/dist/raf-schd.esm.js","../node_modules/justified-layout/lib/row.js","../node_modules/justified-layout/lib/index.js","../src/utils/get-img-dimensions.js","../src/fjGallery.js","../src/utils/ready.js","../src/fjGallery.umd.js"],"sourcesContent":["/* eslint-disable import/no-mutable-exports */\n/* eslint-disable no-restricted-globals */\nlet win;\n\nif ('undefined' !== typeof window) {\n win = window;\n} else if ('undefined' !== typeof global) {\n win = global;\n} else if ('undefined' !== typeof self) {\n win = self;\n} else {\n win = {};\n}\n\nexport default win;\n","/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)\n * are most useful.\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,\n * as-is, to `callback` when the throttled-function is executed.\n * @param {object} [options] - An object to configure options.\n * @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds\n * while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed\n * one final time after the last throttled-function call. (After the throttled-function has not been called for\n * `delay` milliseconds, the internal counter is reset).\n * @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback\n * immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that\n * callback will never executed if both noLeading = true and noTrailing = true.\n * @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is\n * false (at end), schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function} A new, throttled, function.\n */\nfunction throttle (delay, callback, options) {\n var _ref = options || {},\n _ref$noTrailing = _ref.noTrailing,\n noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,\n _ref$noLeading = _ref.noLeading,\n noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,\n _ref$debounceMode = _ref.debounceMode,\n debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;\n /*\n * After wrapper has stopped being called, this timeout ensures that\n * `callback` is executed at the proper times in `throttle` and `end`\n * debounce modes.\n */\n\n\n var timeoutID;\n var cancelled = false; // Keep track of the last time `callback` was executed.\n\n var lastExec = 0; // Function to clear existing timeout\n\n function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec\n\n\n function cancel(options) {\n var _ref2 = options || {},\n _ref2$upcomingOnly = _ref2.upcomingOnly,\n upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;\n\n clearExistingTimeout();\n cancelled = !upcomingOnly;\n }\n /*\n * The `wrapper` function encapsulates all of the throttling / debouncing\n * functionality and when executed will limit the rate at which `callback`\n * is executed.\n */\n\n\n function wrapper() {\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n arguments_[_key] = arguments[_key];\n }\n\n var self = this;\n var elapsed = Date.now() - lastExec;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (!noLeading && debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"iframeResizer.contentWindow.min.js","sources":["iframeResizer.contentWindow.js"],"names":["undefined","window","autoResize","bodyBackground","bodyMargin","bodyMarginStr","bodyObserver","bodyPadding","calculateWidth","doubleEventList","resize","click","eventCancelTimer","firstRun","height","heightCalcModeDefault","heightCalcMode","initLock","initMsg","inPageLinks","interval","intervalTimer","logging","mouseEvents","msgID","msgIdLen","length","myID","resetRequiredMethods","max","min","bodyScroll","documentElementScroll","resizeFrom","sendPermit","target","parent","targetOriginDefault","tolerance","triggerLocked","triggerLockedTimer","throttledTimer","width","widthCalcModeDefault","widthCalcMode","win","onMessage","warn","onReady","onPageInfo","customCalcMethods","document","documentElement","offsetHeight","body","scrollWidth","eventHandlersByName","passiveSupported","options","Object","create","passive","get","addEventListener","noop","removeEventListener","error","func","context","args","result","timeout","previous","getHeight","bodyOffset","getComputedStyle","offset","scrollHeight","custom","documentElementOffset","Math","apply","getAllMeasurements","grow","lowestElement","getMaxElement","getAllElements","taggedElement","getTaggedElements","getWidth","offsetWidth","scroll","rightMostElement","sizeIFrameThrottled","sizeIFrame","now","Date","remaining","this","arguments","clearTimeout","setTimeout","later","event","processRequestFromParent","init","data","source","reset","log","triggerReset","sendSize","moveToAnchor","findTarget","getData","inPageLink","pageInfo","msgBody","JSON","parse","message","getMessageType","split","slice","indexOf","isInitMsg","true","false","callFromParent","messageType","module","exports","jQuery","prototype","chkLateLoaded","el","evt","capitalizeFirstLetter","string","charAt","toUpperCase","formatLogMsg","msg","console","strBool","str","setupCustomCalcMethods","calcMode","calcFunc","Number","enable","location","href","iFrameResizer","constructor","stringify","keys","forEach","depricate","targetOrigin","heightCalculationMethod","widthCalculationMethod","sendMouse","e","sendMsg","type","screenY","screenX","addMouseListener","name","setBodyStyle","attr","value","clearFix","createElement","style","clear","display","appendChild","checkHeightMode","checkWidthMode","parentIFrame","startEventListeners","manageEventListeners","disconnect","clearInterval","close","getId","getPageInfo","callback","hash","resetIFrame","scrollTo","x","y","scrollToOffset","sendMessage","setHeightCalculationMethod","setWidthCalculationMethod","setTargetOrigin","size","customHeight","customWidth","getElementPosition","elPosition","getBoundingClientRect","pagePosition","pageXOffset","scrollLeft","pageYOffset","scrollTop","parseInt","left","top","hashData","decodeURIComponent","getElementById","getElementsByName","jumpPosition","checkLocationHash","bindAnchors","Array","call","querySelectorAll","getAttribute","preventDefault","enableInPageLinks","key","splitName","manageTriggerEvent","listener","add","eventName","handleEvent","eventType","remove","eventNames","map","method","checkCalcMode","calcModeDefault","modes","forceIntervalTimer","MutationObserver","WebKitMutationObserver","initInterval","addImageLoadListners","mutation","addImageLoadListener","element","complete","src","imageLoaded","imageError","elements","push","attributeName","removeImageLoadListener","splice","imageEventTriggered","typeDesc","mutationObserved","mutations","observer","querySelector","observe","attributes","attributeOldValue","characterData","characterDataOldValue","childList","subtree","setInterval","abs","prop","retVal","defaultView","side","elVal","elementsLength","maxVal","Side","timer","i","dimensions","tag","triggerEvent","triggerEventDesc","checkDownSizing","checkTolarance","a","b","currentHeight","currentWidth","lockTrigger","resetPage","hcm","postMessage","readyState"],"mappings":";;;;;;;AAWC,CAAA,SAAWA,GACV,GAAsB,aAAlB,OAAOC,OAAX,CAEA,IAAIC,EAAa,CAAA,EAEfC,EAAiB,GACjBC,EAAa,EACbC,EAAgB,GAChBC,EAAe,KACfC,EAAc,GACdC,EAAiB,CAAA,EACjBC,EAAkB,CAAEC,OAAQ,EAAGC,MAAO,CAAE,EACxCC,EAAmB,IACnBC,EAAW,CAAA,EACXC,EAAS,EACTC,EAAwB,aACxBC,EAAiBD,EACjBE,EAAW,CAAA,EACXC,EAAU,GACVC,EAAc,GACdC,EAAW,GACXC,EAAgB,KAChBC,EAAU,CAAA,EACVC,EAAc,CAAA,EACdC,EAAQ,gBACRC,EAAWD,EAAME,OACjBC,EAAO,GACPC,EAAuB,CACrBC,IAAK,EACLC,IAAK,EACLC,WAAY,EACZC,sBAAuB,CACzB,EACAC,EAAa,QACbC,EAAa,CAAA,EACbC,EAASlC,OAAOmC,OAChBC,EAAsB,IACtBC,EAAY,EACZC,EAAgB,CAAA,EAChBC,EAAqB,KACrBC,EAAiB,GACjBC,EAAQ,EACRC,EAAuB,SACvBC,EAAgBD,EAChBE,EAAM5C,OACN6C,EAAY,WACVC,EAAK,gCAAgC,CACvC,EACAC,EAAU,aACVC,EAAa,aACbC,EAAoB,CAClBpC,OAAQ,WAEN,OADAiC,EAAK,gDAAgD,EAC9CI,SAASC,gBAAgBC,YAClC,EACAX,MAAO,WAEL,OADAK,EAAK,+CAA+C,EAC7CI,SAASG,KAAKC,WACvB,CACF,EACAC,GAAsB,GACtBC,GAAmB,CAAA,EAIrB,IACE,IAAIC,GAAUC,OAAOC,OACnB,GACA,CACEC,QAAS,CAEPC,IAAK,WACHL,GAAmB,CAAA,CACrB,CACF,CACF,CACF,EACAxD,OAAO8D,iBAAiB,OAAQC,GAAMN,EAAO,EAC7CzD,OAAOgE,oBAAoB,OAAQD,GAAMN,EAAO,CAGlD,CAFE,MAAOQ,IAgLine truncated
@@ -0,0 +1,9 @@
/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v4.3.7 - 2023-09-14
* Desc: Include this file in any page being loaded into an iframe
* to force the iframe to resize to the content size.
* Requires: iframeResizer.min.js on host page.
* Copyright: (c) 2023 David J. Bradshaw - dave@bradshaw.net
* License: MIT
*/
!function(a){if("undefined"!=typeof window){var r=!0,P="",u=0,c="",s=null,D="",d=!1,j={resize:1,click:1},l=128,q=!0,f=1,n="bodyOffset",m=n,H=!0,W="",h={},g=32,B=null,p=!1,v=!1,y="[iFrameSizer]",J=y.length,w="",U={max:1,min:1,bodyScroll:1,documentElementScroll:1},b="child",V=!0,X=window.parent,T="*",E=0,i=!1,Y=null,O=16,S=1,K="scroll",M=K,Q=window,G=function(){x("onMessage function not defined")},Z=function(){},$=function(){},_={height:function(){return x("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return x("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},te=!1;try{var ne=Object.create({},{passive:{get:function(){te=!0}}});window.addEventListener("test",ae,ne),window.removeEventListener("test",ae,ne)}catch(e){}var oe,o,I,ie,N,A,C={bodyOffset:function(){return document.body.offsetHeight+ye("marginTop")+ye("marginBottom")},offset:function(){return C.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return _.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,e(C))},min:function(){return Math.min.apply(null,e(C))},grow:function(){return C.max()},lowestElement:function(){return Math.max(C.bodyOffset()||C.documentElementOffset(),we("bottom",Te()))},taggedElement:function(){return be("bottom","data-iframe-height")}},z={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return _.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(z.bodyScroll(),z.documentElementScroll())},max:function(){return Math.max.apply(null,e(z))},min:function(){return Math.min.apply(null,e(z))},rightMostElement:function(){return we("right",Te())},taggedElement:function(){return be("right","data-iframe-width")}},re=(oe=Ee,N=null,A=0,function(){var e=Date.now(),t=O-(e-(A=A||e));return o=this,I=arguments,t<=0||O<t?(N&&(clearTimeout(N),N=null),A=e,ie=oe.apply(o,I),N||(o=I=null)):N=N||setTimeout(Oe,t),ie});k(window,"message",function(t){var n={init:function(){W=t.data,X=t.source,se(),q=!1,setTimeout(function(){H=!1},l)},reset:function(){H?R("Page reset ignored by init"):(R("Page size reset by host page"),Me("resetPage"))},resize:function(){L("resizeParent","Parent window requested size check")},moveToAnchor:function(){h.findTarget(i())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=i();R("PageInfoFromParent called from parent: "+e),$(JSON.parse(e)),R(" --")},message:function(){var e=i();R("onMessage called from parent: "+e),G(JSON.parse(e)),R(" --")}};function o(){return t.data.split("]")[1].split(":")[0]}function i(){return t.data.slice(t.data.indexOf(":")+1)}function r(){return t.data.split(":")[2]in{true:1,false:1}}function e(){var e=o();e in n?n[e]():("undefined"==typeof module||!module.exports)&&"iFrameResize"in window||window.jQuery!==a&&"iFrameResize"in window.jQuery.prototype||r()||x("Unexpected message ("+t.data+")")}y===(""+t.data).slice(0,J)&&(!1===q?e():r()?n.init():R('Ignored message of type "'+o()+'". Received before initialization.'))}),k(window,"readystatechange",Ne),Ne()}function ae(){}function k(e,t,n,o){e.addEventListener(t,n,!!te&&(o||{}))}function ue(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ce(e){return y+"["+w+"] "+e}function R(e){p&&"object"==typeof window.console&&console.log(ce(e))}function x(e){"object"==typeof window.console&&console.warn(ce(e))}function se(){function e(e){return"true"===e}function t(e,t){return"function"==typeof e&&(R("Setup custom "+t+"CalcMethod"),_[t]=e,e="custom"),e}{var n;n=W.slice(J).split(":"),w=n[0],u=a===n[1]?u:Number(n[1]),d=a===n[2]?d:e(n[2]),p=a===n[3]?p:e(n[3]),g=a===n[4]?g:Number(n[4]),r=a===n[6]?r:e(n[6]),c=n[7],m=a===n[8]?m:n[8],P=n[9],D=n[10],E=a===n[11]?E:Number(n[11]),h.enable=a!==n[12]&&e(n[12]),b=a===n[13]?b:n[13],M=a===n[14]?M:n[14],v=a===n[15]?v:e(n[15]),R("Initialising iFrame ("+window.location.href+")"),"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(n=window.iFrameResizer,R("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(de,n),G="onMessage"in n?n.onMessage:G,Z="onReady"in n?n.onReady:Z,T="targetOrigin"in n?n.targetOrigin:T,m="heightCalculationMethod"in n?n.heightCalculationMethod:m,M="widthCalculationMethod"in n?n.widthCalculationMethod:M,m=t(m,"height"),M=t(M,"width"))}function o(e){F(0,0,e.type,e.screenY+":"+e.screenX)}function i(e,t){R("Add event listener: "+t),k(window.document,e,o)}R("TargetOrigin for parent set to: "+T),le("margin",function(e,t){-1!==t.indexOf("-")&&(x("Negative CSS value ignored for "+e),t="");return t}("margin",c=a===c?u+"px":c)),le("background",P),le("padding",DLine truncated
//# sourceMappingURL=iframeResizer.contentWindow.map
@@ -0,0 +1 @@
{"version":3,"file":"iframeResizer.min.js","sources":["iframeResizer.js"],"names":["undefined","count","logEnabled","hiddenCheckEnabled","msgHeaderLen","msgId","msgIdLen","pagePosition","requestAnimationFrame","resetRequiredMethods","settings","timer","defaults","frameTimer","getMutationObserver","window","MutationObserver","WebKitMutationObserver","MozMutationObserver","addEventListener","el","evt","func","removeEventListener","formatLogHeader","iframeId","retStr","top","self","parentIFrame","getId","isLogEnabled","log","msg","output","info","warn","type","enabled","console","iFrameListener","event","resizeIFrame","ensureInRange","syncResize","setSize","messageData","setPagePosition","on","processMsg","data","slice","split","height","parseInt","iframe","compStyle","getComputedStyle","id","boxSizing","paddingTop","bot","paddingBottom","borderTopWidth","borderBottomWidth","width","Dimension","max","Number","min","dimension","toLowerCase","size","isMessageFromIFrame","origin","checkOrigin","constructor","Array","checkSingle","remoteHost","i","retCode","length","Error","getMsgBody","offset","indexOf","sendPageInfoToIframe","fn","time","frameId","bodyPosition","iFramePosition","trigger","document","body","getBoundingClientRect","JSON","stringify","iframeHeight","iframeWidth","clientHeight","Math","documentElement","innerHeight","clientWidth","innerWidth","offsetTop","offsetLeft","left","scrollTop","pageYOffset","scrollLeft","pageXOffset","documentHeight","documentWidth","windowHeight","windowWidth","setTimeout","getElementPosition","target","getPagePosition","x","floor","y","scrollRequestFromChild","addOffset","newPosition","scrollTo","unsetPagePosition","findTarget","location","hash","hashData","decodeURIComponent","getElementById","getElementsByName","jumpPosition","moveToAnchor","onMouse","mousePos","screenX","screenY","funcName","val","chkEvent","actionMsg","firstRun","closeIFrame","msgBody","message","parse","autoResize","setListener","stopPageInfo","stop","resetIFrame","sendPageInfo","forEach","createOutgoingMsg","loaded","true","false","retBool","retVal","TypeError","removeIframeListeners","parentNode","removeChild","error","chkZero","checkIFrames","Object","keys","key","chkDimension","settingId","style","offsetParent","mutationObserved","mutations","debouce","querySelector","observe","attributes","attributeOldValue","characterData","characterDataOldValue","childList","subtree","processDimension","sizeHeight","sizeWidth","doNotSync","jasmine","calleeMsg","noResponseWarning","chkAndSend","contentWindow","targetOrigin","postMessage","warnOnNoResponse","warningTimeout","msgTimeout","errorShown","bodyMarginV1","interval","enablePublicMethods","bodyMargin","heightCalculationMethod","bodyBackground","bodyPadding","tolerance","inPageLinks","resizeFrom","widthCalculationMethod","mouseEvents","setupIFrame","options","init","mutation","prototype","call","removedNodes","removedNode","resetRequertMethod","depricate","splitName","this","name","charAt","toUpperCase","processOptions","create","src","join","copyOptions","option","hasOwnProperty","match","scrolling","overflow","chkMinMax","addStyle","iFrameResizer","close","bind","removeListeners","resize","anchor","sendMessage","styleValue","Infinity","tabVisible","visibilityState","sendTriggerMsg","eventName","setupEventListeners","factory","element","tagName","iFrames","push","vendors","querySelectorAll","createJQueryPublicMethod","$","iFrameResize","filter","each","index","end","freeze","scroll","bodyScroll","documentElementScroll","maxHeight","maxWidth","minHeight","minWidth","onClose","onClosed","onInit","onMessage","onMouseEnter","onMouseLeave","onResized","onScroll","jQuery","define","amd","module","exports"],"mappings":";;;;;;AAWC,CAAA,SAAWA,GACV,IAEIC,EACFC,EACAC,EAEAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAMAC,EACAC,EACAC,EAssCEC,EA7pCJ,SAASC,IACP,OACEC,OAAOC,kBACPD,OAAOE,wBACPF,OAAOG,mBAEX,CAEA,SAASC,EAAiBC,EAAIC,EAAKC,GACjCF,EAAGD,iBAAiBE,EAAKC,EAAM,CAAA,CAAK,CACtC,CAEA,SAASC,EAAoBH,EAAIC,EAAKC,GACpCF,EAAGG,oBAAoBF,EAAKC,EAAM,CAAA,CAAK,CACzC,CAkCA,SAASE,EAAgBC,GACvB,OAAOpB,EAAQ,KAbXqB,EAAS,eADED,EAccA,GAV3BC,EADEX,OAAOY,MAAQZ,OAAOa,KAEtBb,OAAOc,cAAgBd,OAAOc,aAAaC,MACvCf,OAAOc,aAAaC,MAAM,EAAI,KAAOL,EACrC,qBAAuBA,EAGxBC,GAIkC,IAd3C,IACMA,CAcN,CAEA,SAASK,EAAaN,GACpB,OAAOf,EAASe,GAAYf,EAASe,GAAUO,IAAM9B,CACvD,CAEA,SAAS8B,EAAIP,EAAUQ,GACrBC,EAAO,MAAOT,EAAUQ,EAAKF,EAAaN,CAAQ,CAAC,CACrD,CAEA,SAASU,EAAKV,EAAUQ,GACtBC,EAAO,OAAQT,EAAUQ,EAAKF,EAAaN,CAAQ,CAAC,CACtD,CAEA,SAASW,EAAKX,EAAUQ,GACtBC,EAAO,OAAQT,EAAUQ,EAAK,CAAA,CAAI,CACpC,CAEA,SAASC,EAAOG,EAAMZ,EAAUQ,EAAKK,GAC/B,CAAA,IAASA,GAAW,UAAa,OAAOvB,OAAOwB,SAEjDA,QAAQF,GAAMb,EAAgBC,CAAQ,EAAGQ,CAAG,CAEhD,CAEA,SAASO,EAAeC,GACtB,SAASC,IAOPC,EAAc,QAAQ,EACtBA,EAAc,OAAO,EAErBC,EATA,WACEC,EAAQC,CAAW,EACnBC,EAAgBtB,CAAQ,EACxBuB,EAAG,YAAaF,CAAW,CAC7B,EAKmBA,EAAa,MAAM,CACxC,CAEA,SAASG,IACP,IAAIC,EAAOjB,EAAIkB,MAAM7C,CAAQ,EAAE8C,MAAM,GAAG,EACpCC,EAASH,EAAK,GAAKI,SAASJ,EAAK,GAAI,EAAE,EAAI,EAC3CK,EAAS7C,EAASwC,EAAK,KAAOxC,EAASwC,EAAK,IAAILine truncated
@@ -0,0 +1,8 @@
/*! iFrame Resizer (iframeSizer.min.js ) - v4.3.7 - 2023-09-14
* Desc: Force cross domain iframes to size to content.
* Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame.
* Copyright: (c) 2023 David J. Bradshaw - dave@bradshaw.net
* License: MIT
*/
!function(d){var c,u,a,v,x,I,M,r,f,k,i,l,z;function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function F(e,n,i){e.addEventListener(n,i,!1)}function B(e,n,i){e.removeEventListener(n,i,!1)}function p(e){return x+"["+(n="Host page: "+(e=e),n=window.top!==window.self?window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e:n)+"]";var n}function t(e){return k[e]?k[e].log:u}function O(e,n){o("log",e,n,t(e))}function E(e,n){o("info",e,n,t(e))}function R(e,n){o("warn",e,n,!0)}function o(e,n,i,t){!0===t&&"object"==typeof window.console&&console[e](p(n),i)}function w(e){function i(){t("Height"),t("Width"),P(function(){H(w),C(b),l("onResized",w)},w,"init")}function n(){var e=p.slice(I).split(":"),n=e[1]?parseInt(e[1],10):0,i=k[e[0]]&&k[e[0]].iframe,t=getComputedStyle(i);return{iframe:i,id:e[0],height:n+function(e){if("border-box"!==e.boxSizing)return 0;var n=e.paddingTop?parseInt(e.paddingTop,10):0,e=e.paddingBottom?parseInt(e.paddingBottom,10):0;return n+e}(t)+function(e){if("border-box"!==e.boxSizing)return 0;var n=e.borderTopWidth?parseInt(e.borderTopWidth,10):0,e=e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0;return n+e}(t),width:e[2],type:e[3]}}function t(e){var n=Number(k[b]["max"+e]),i=Number(k[b]["min"+e]),e=e.toLowerCase(),t=Number(w[e]);O(b,"Checking "+e+" is in range "+i+"-"+n),t<i&&(t=i,O(b,"Set "+e+" to min value")),n<t&&(t=n,O(b,"Set "+e+" to max value")),w[e]=""+t}function o(){var t=e.origin,o=k[b]&&k[b].checkOrigin;if(o&&""+t!="null"&&!function(){if(o.constructor!==Array)return e=k[b]&&k[b].remoteHost,O(b,"Checking connection is from: "+e),t===e;var e,n=0,i=!1;for(O(b,"Checking connection is from allowed list of origins: "+o);n<o.length;n++)if(o[n]===t){i=!0;break}return i}())throw new Error("Unexpected message received from: "+t+" for "+w.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return 1}function a(e){return p.slice(p.indexOf(":")+v+e)}function s(i,t){var e,n,o;e=function(){var e,n;A("Send Page Info","pageInfo:"+(e=document.body.getBoundingClientRect(),n=w.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:n.height,iframeWidth:n.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(n.top-e.top,10),offsetLeft:parseInt(n.left-e.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),i,t)},n=32,z[o=t]||(z[o]=setTimeout(function(){z[o]=null,e()},n))}function r(e){e=e.getBoundingClientRect();return W(b),{x:Math.floor(Number(e.left)+Number(M.x)),y:Math.floor(Number(e.top)+Number(M.y))}}function d(e){var n=e?r(w.iframe):{x:0,y:0},i={x:Number(w.width)+n.x,y:Number(w.height)+n.y};O(b,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(M=i,c(),O(b,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](i.x,i.y):R(b,"Unable to scroll to requested position, window.parentIFrame not found")}function c(){!1===l("onScroll",M)?S():C(b)}function u(e){var e=e.split("#")[1]||"",n=decodeURIComponent(e),n=document.getElementById(n)||document.getElementsByName(n)[0];n?(n=r(n),O(b,"Moving to in page link (#"+e+") at x: "+n.x+" y: "+n.y),M={x:n.x,y:n.y},c(),O(b,"--")):window.top===window.self?O(b,"In page link #"+e+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(e):O(b,"In page link #"+e+" not found and window.parentIFrame not found")}function f(e){var n,i={};i=0===Number(w.width)&&0===Number(w.height)?{x:(n=a(9).split(":"))[1],y:n[0]}:{x:w.width,y:w.height},l(e,{iframe:w.iframe,screenX:Number(i.x),screenY:Number(i.y),type:w.type})}function l(e,n){return T(b,e,n)}function m(){switch(k[b]&&k[b].firstRun&&k[b]&&(k[b].firstRun=!1),w.type){case"close":N(w.iframe);break;case"message":n=a(6),O(b,"onMessage passed: {iframe: "+w.iframe.id+", message: "+n+"}"),l("onMessage",{iframe:w.iframe,message:JSON.parse(n)}),O(b,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":k[b].autoResize=JSON.parse(a(9));break;case"scrollTo":d(!1);break;case"scrollToOffset":d(!0);break;case"pageInfo":s(k[b]&&k[b].iframe,b),r=b,e("Add ",F),k[r]&&(k[r].stopPageInfo=o);break;case"pageInfoStop":k[b]&&k[b].stopPageInfo&&(k[b].stopPageInfo(),delete k[b].stopPageInfo);break;case"inPageLink":u(a(9));break;case"reset":j(w);break;case"init":i(),l("onInit",w.iframe);break;default:0===Number(w.width)&&0===Number(w.height)?R("Unsupported message received ("+w.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):i()}function e(n,i){function t()Line truncated
//# sourceMappingURL=iframeResizer.map
@@ -0,0 +1,12 @@
/*!
* Isotope PACKAGED v3.0.6
*
* Licensed GPLv3 for open source use
* or Isotope Commercial License for commercial use
*
* https://isotope.metafizzy.co
* Copyright 2010-2018 Metafizzy
*/
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n<i.length;n++){var s=i[n],r=o&&o[s];r&&(this.off(t,s),delete o[s]),s.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<h;e++){var i=u[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function n(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=o(e);r=200==Math.round(t(n.width)),s.isBoxSizeOuter=r,i.removeChild(e)}}function s(e){if(n(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=o(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;l<h;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,I=d&&r,x=t(s.width);x!==!1&&(a.width=x+(I?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(I?0:y+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+z),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var o=e[i],n=o+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var o=Array.prototype.slice;i.makeArray=function(Line truncated
}:"function"==typeof t?function(e){return t(e.element)}:function(e){return o(e.element,t)}},l.updateSortData=function(t){var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},l._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=f(i)}},l._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){var o=t[i];o.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),s=n&&n[1],r=e(s,o),a=d.sortDataParsers[i[1]];return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){if(this.options.sortBy){var t=n.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=a(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;i<n;i++)o=e[i],this.element.appendChild(o.element);var s=this._filter(e).matches;for(i=0;i<n;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<n;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,o=0;i&&o<i;o++){var s=e[o];n.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var o=t.apply(this,e);return this.options.transitionDuration=i,o},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});
@@ -0,0 +1,3 @@
/*! lazysizes - v5.3.2 */
!function(e){var t=function(u,D,f){"use strict";var k,H;if(function(){var e;var t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,i=u.HTMLPictureElement,P="addEventListener",$="getAttribute",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,o=u.requestIdleCallback,j=/^picture$/i,r=["load","error","lazyincluded","_lazyloaded"],a={},G=Array.prototype.forEach,J=function(e,t){if(!a[t]){a[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")}return a[t].test(e[$]("class")||"")&&a[t]},K=function(e,t){if(!J(e,t)){e.setAttribute("class",(e[$]("class")||"").trim()+" "+t)}},Q=function(e,t){var a;if(a=J(e,t)){e.setAttribute("class",(e[$]("class")||"").replace(a," "))}},V=function(t,a,e){var i=e?P:"removeEventListener";if(e){V(t,a)}r.forEach(function(e){t[i](e,a)})},X=function(e,t,a,i,r){var n=D.createEvent("Event");if(!a){a={}}a.instance=k;n.initEvent(t,!i,!r);n.detail=a;e.dispatchEvent(n);return n},Y=function(e,t){var a;if(!i&&(a=u.picturefill||H.pf)){if(t&&t.src&&!e[$]("srcset")){e.setAttribute("srcset",t.src)}a({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,a){a=a||e.offsetWidth;while(a<H.minSize&&t&&!e._lazysizesWidth){a=t.offsetWidth;t=t.parentNode}return a},ee=function(){var a,i;var t=[];var r=[];var n=t;var s=function(){var e=n;n=t.length?r:t;a=true;i=false;while(e.length){e.shift()()}a=false};var e=function(e,t){if(a&&!t){e.apply(this,arguments)}else{n.push(e);if(!i){i=true;(D.hidden?I:U)(s)}}};e._lsFlush=s;return e}(),te=function(a,e){return e?function(){ee(a)}:function(){var e=this;var t=arguments;ee(function(){a.apply(e,t)})}},ae=function(e){var a;var i=0;var r=H.throttleDelay;var n=H.ricTimeout;var t=function(){a=false;i=f.now();e()};var s=o&&n>49?function(){o(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(a){return}a=true;t=r-(f.now()-i);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ie=function(e){var t,a;var i=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-a;if(e<i){I(n,i-e)}else{(o||r)(r)}};return function(){a=f.now();if(!t){t=I(n,i)}}},e=function(){var v,m,c,h,e;var y,z,g,p,C,b,A;var n=/^img$/i;var d=/^iframe$/i;var E="onscroll"in u&&!/(gle|ing)bot/.test(navigator.userAgent);var _=0;var w=0;var M=0;var N=-1;var L=function(e){M--;if(!e||M<0||!e.target){M=0}};var x=function(e){if(A==null){A=Z(D.body,"visibility")=="hidden"}return A||!(Z(e.parentNode,"visibility")=="hidden"&&Z(e,"visibility")=="hidden")};var W=function(e,t){var a;var i=e;var r=x(e);g-=t;b+=t;p-=t;C+=t;while(r&&(i=i.offsetParent)&&i!=D.body&&i!=O){r=(Z(i,"opacity")||1)>0;if(r&&Z(i,"overflow")!="visible"){a=i.getBoundingClientRect();r=C>a.left&&p<a.right&&b>a.top-1&&g<a.bottom+1}}return r};var t=function(){var e,t,a,i,r,n,s,o,l,u,f,c;var d=k.elements;if((h=H.loadMode)&&M<8&&(e=d.length)){t=0;N++;for(;t<e;t++){if(!d[t]||d[t]._lazyRace){continue}if(!E||k.prematureUnveil&&k.prematureUnveil(d[t])){R(d[t]);continue}if(!(o=d[t][$]("data-expand"))||!(n=o*1)){n=w}if(!u){u=!H.expand||H.expand<1?O.clientHeight>500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w<f&&M<1&&N>2&&h>2&&!D.hidden){w=f;N=0}else if(h>1&&N>1&&M<6){w=u}else{w=_}}if(l!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;l=n}a=d[t].getBoundingClientRect();if((b=a.bottom)>=s&&(g=a.top)<=z&&(C=a.right)>=s*c&&(p=a.left)<=y&&(b||C||p||g)&&(H.loadHidden||x(d[t]))&&(m&&M<3&&!o&&(h<3||N<4)||W(d[t],n))){R(d[t]);r=true;if(M>9){break}}else if(!r&&m&&!i&&M<4&&N<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!o&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){i=v[0]||d[t]}}if(i&&!r){R(i)}}};var a=ae(t);var S=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}L(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,B);X(t,"lazyloaded")};var i=te(S);var B=function(e){i({target:e.target})};var T=function(e,t){var a=e.getAttribute("data-load-mode")||H.iframeLoadMode;if(a==0){e.contentWindow.location.replace(t)}else if(a==1){e.src=t}};var F=function(e){var t;var a=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(a){e.setAttribute("srcset",a)}};var s=te(function(t,e,a,i,r){var n,s,o,l,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(i){if(a){K(t,H.autosizesClass)}else{t.setAttribute("sizes",i)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){o=t.parentNode;l=o&&j.test(o.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||l);u=Line truncated
@@ -0,0 +1,482 @@
/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */
/*
Contents:
1. Buttons
2. Share modal and links
3. Index indicator ("1 of X" counter)
4. Caption
5. Loading indicator
6. Additional styles (root element, top bar, idle state, hidden state, etc.)
*/
/*
1. Buttons
*/
/* <button> css reset */
.pswp__button {
width: 44px;
height: 44px;
position: relative;
background: none;
cursor: pointer;
overflow: visible;
-webkit-appearance: none;
display: block;
border: 0;
padding: 0;
margin: 0;
float: right;
opacity: 0.75;
-webkit-transition: opacity 0.2s;
transition: opacity 0.2s;
-webkit-box-shadow: none;
box-shadow: none; }
.pswp__button:focus, .pswp__button:hover {
opacity: 1; }
.pswp__button:active {
outline: none;
opacity: 0.9; }
.pswp__button::-moz-focus-inner {
padding: 0;
border: 0; }
/* pswp__ui--over-close class it added when mouse is over element that should close gallery */
.pswp__ui--over-close .pswp__button--close {
opacity: 1; }
.pswp__button,
.pswp__button--arrow--left:before,
.pswp__button--arrow--right:before {
background: url(default-skin.png) 0 0 no-repeat;
background-size: 264px 88px;
width: 44px;
height: 44px; }
@media (-webkit-min-device-pixel-ratio: 1.1), (-webkit-min-device-pixel-ratio: 1.09375), (min-resolution: 105dpi), (min-resolution: 1.1dppx) {
/* Serve SVG sprite if browser supports SVG and resolution is more than 105dpi */
.pswp--svg .pswp__button,
.pswp--svg .pswp__button--arrow--left:before,
.pswp--svg .pswp__button--arrow--right:before {
background-image: url(default-skin.svg); }
.pswp--svg .pswp__button--arrow--left,
.pswp--svg .pswp__button--arrow--right {
background: none; } }
.pswp__button--close {
background-position: 0 -44px; }
.pswp__button--share {
background-position: -44px -44px; }
.pswp__button--fs {
display: none; }
.pswp--supports-fs .pswp__button--fs {
display: block; }
.pswp--fs .pswp__button--fs {
background-position: -44px 0; }
.pswp__button--zoom {
display: none;
background-position: -88px 0; }
.pswp--zoom-allowed .pswp__button--zoom {
display: block; }
.pswp--zoomed-in .pswp__button--zoom {
background-position: -132px 0; }
/* no arrows on touch screens */
.pswp--touch .pswp__button--arrow--left,
.pswp--touch .pswp__button--arrow--right {
visibility: hidden; }
/*
Arrow buttons hit area
(icon is added to :before pseudo-element)
*/
.pswp__button--arrow--left,
.pswp__button--arrow--right {
background: none;
top: 50%;
margin-top: -50px;
width: 70px;
height: 100px;
position: absolute; }
.pswp__button--arrow--left {
left: 0; }
.pswp__button--arrow--right {
right: 0; }
.pswp__button--arrow--left:before,
.pswp__button--arrow--right:before {
content: '';
top: 35px;
background-color: rgba(0, 0, 0, 0.3);
height: 30px;
width: 32px;
position: absolute; }
.pswp__button--arrow--left:before {
left: 6px;
background-position: -138px -44px; }
.pswp__button--arrow--right:before {
right: 6px;
background-position: -94px -44px; }
/*
2. Share modal/popup and links
*/
.pswp__counter,
.pswp__share-modal {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.pswp__share-modal {
display: block;
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
top: 0;
left: 0;
padding: 10px;
position: absolute;
z-index: 1600;
opacity: 0;
-webkit-transition: opacity 0.25s ease-out;
transition: opacity 0.25s ease-out;
-webkit-backface-visibility: hidden;
will-change: opacity; }
.pswp__share-modal--hidden {
display: none; }
.pswp__share-tooltip {
z-index: 1620;
position: absolute;
background: #FFF;
top: 56px;
border-radius: 2px;
display: block;
width: auto;
right: 44px;
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
-webkit-transform: translateY(6px);
-ms-transform: translateY(6px);
transform: translateY(6px);
-webkit-transition: -webkit-transform 0.25s;
transition: transform 0.25s;
-webkit-backface-visibility: hidden;
will-change: transform; }
.pswp__share-tooltip a {
display: block;
padding: 8px 12px;
color: #000;
text-decoration: none;
font-size: 14px;
line-height: 18px; }
.pswp__share-tooltip a:hover {
text-decoration: none;
color: #000; }
.pswp__share-tooltip a:first-child {
/* round corners on the first/last list item */
border-radius: 2px 2px 0 0; }
.pswp__share-tooltip a:last-child {
border-radius: 0 0 2px 2px; }
.pswp__share-modal--fade-in {
opacity: 1; }
.pswp__share-modal--fade-in .pswp__share-tooltip {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0); }
/* increase size of share links on touch devices */
.pswp--touch .pswp__share-tooltip a {
padding: 16px 12px; }
a.pswp__share--facebook:before {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
top: -12px;
right: 15px;
border: 6px solid transparent;
border-bottom-color: #FFF;
-webkit-pointer-events: none;
-moz-pointer-events: none;
pointer-events: none; }
a.pswp__share--facebook:hover {
background: #3E5C9A;
color: #FFF; }
a.pswp__share--facebook:hover:before {
border-bottom-color: #3E5C9A; }
a.pswp__share--twitter:hover {
background: #55ACEE;
color: #FFF; }
a.pswp__share--pinterest:hover {
background: #CCC;
color: #CE272D; }
a.pswp__share--download:hover {
background: #DDD; }
/*
3. Index indicator ("1 of X" counter)
*/
.pswp__counter {
position: absolute;
left: 0;
top: 0;
height: 44px;
font-size: 13px;
line-height: 44px;
color: #FFF;
opacity: 0.75;
padding: 0 10px; }
/*
4. Caption
*/
.pswp__caption {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
min-height: 44px; }
.pswp__caption small {
font-size: 11px;
color: #BBB; }
.pswp__caption__center {
text-align: left;
max-width: 420px;
margin: 0 auto;
font-size: 13px;
padding: 10px;
line-height: 20px;
color: #CCC; }
.pswp__caption--empty {
display: none; }
/* Fake caption element, used to calculate height of next/prev image */
.pswp__caption--fake {
visibility: hidden; }
/*
5. Loading indicator (preloader)
You can play with it here - http://codepen.io/dimsemenov/pen/yyBWoR
*/
.pswp__preloader {
width: 44px;
height: 44px;
position: absolute;
top: 0;
left: 50%;
margin-left: -22px;
opacity: 0;
-webkit-transition: opacity 0.25s ease-out;
transition: opacity 0.25s ease-out;
will-change: opacity;
direction: ltr; }
.pswp__preloader__icn {
width: 20px;
height: 20px;
margin: 12px; }
.pswp__preloader--active {
opacity: 1; }
.pswp__preloader--active .pswp__preloader__icn {
/* We use .gif in browsers that don't support CSS animation */
background: url(preloader.gif) 0 0 no-repeat; }
.pswp--css_animation .pswp__preloader--active {
opacity: 1; }
.pswp--css_animation .pswp__preloader--active .pswp__preloader__icn {
-webkit-animation: clockwise 500ms linear infinite;
animation: clockwise 500ms linear infinite; }
.pswp--css_animation .pswp__preloader--active .pswp__preloader__donut {
-webkit-animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite;
animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; }
.pswp--css_animation .pswp__preloader__icn {
background: none;
opacity: 0.75;
width: 14px;
height: 14px;
position: absolute;
left: 15px;
top: 15px;
margin: 0; }
.pswp--css_animation .pswp__preloader__cut {
/*
The idea of animating inner circle is based on Polymer ("material") loading indicator
by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html
*/
position: relative;
width: 7px;
height: 14px;
overflow: hidden; }
.pswp--css_animation .pswp__preloader__donut {
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 14px;
height: 14px;
border: 2px solid #FFF;
border-radius: 50%;
border-left-color: transparent;
border-bottom-color: transparent;
position: absolute;
top: 0;
left: 0;
background: none;
margin: 0; }
@media screen and (max-width: 1024px) {
.pswp__preloader {
position: relative;
left: auto;
top: auto;
margin: 0;
float: right; } }
@-webkit-keyframes clockwise {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg); } }
@keyframes clockwise {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg); } }
@-webkit-keyframes donut-rotate {
0% {
-webkit-transform: rotate(0);
transform: rotate(0); }
50% {
-webkit-transform: rotate(-140deg);
transform: rotate(-140deg); }
100% {
-webkit-transform: rotate(0);
transform: rotate(0); } }
@keyframes donut-rotate {
0% {
-webkit-transform: rotate(0);
transform: rotate(0); }
50% {
-webkit-transform: rotate(-140deg);
transform: rotate(-140deg); }
100% {
-webkit-transform: rotate(0);
transform: rotate(0); } }
/*
6. Additional styles
*/
/* root element of UI */
.pswp__ui {
-webkit-font-smoothing: auto;
visibility: visible;
opacity: 1;
z-index: 1550; }
/* top black bar with buttons and "1 of X" indicator */
.pswp__top-bar {
position: absolute;
left: 0;
top: 0;
height: 44px;
width: 100%; }
.pswp__caption,
.pswp__top-bar,
.pswp--has_mouse .pswp__button--arrow--left,
.pswp--has_mouse .pswp__button--arrow--right {
-webkit-backface-visibility: hidden;
will-change: opacity;
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
/* pswp--has_mouse class is added only when two subsequent mousemove events occur */
.pswp--has_mouse .pswp__button--arrow--left,
.pswp--has_mouse .pswp__button--arrow--right {
visibility: visible; }
.pswp__top-bar,
.pswp__caption {
background-color: rgba(0, 0, 0, 0.5); }
/* pswp__ui--fit class is added when main image "fits" between top bar and bottom bar (caption) */
.pswp__ui--fit .pswp__top-bar,
.pswp__ui--fit .pswp__caption {
background-color: rgba(0, 0, 0, 0.3); }
/* pswp__ui--idle class is added when mouse isn't moving for several seconds (JS option timeToIdle) */
.pswp__ui--idle .pswp__top-bar {
opacity: 0; }
.pswp__ui--idle .pswp__button--arrow--left,
.pswp__ui--idle .pswp__button--arrow--right {
opacity: 0; }
/*
pswp__ui--hidden class is added when controls are hidden
e.g. when user taps to toggle visibility of controls
*/
.pswp__ui--hidden .pswp__top-bar,
.pswp__ui--hidden .pswp__caption,
.pswp__ui--hidden .pswp__button--arrow--left,
.pswp__ui--hidden .pswp__button--arrow--right {
/* Force paint & create composition layer for controls. */
opacity: 0.001; }
/* pswp__ui--one-slide class is added when there is just one item in gallery */
.pswp__ui--one-slide .pswp__button--arrow--left,
.pswp__ui--one-slide .pswp__button--arrow--right,
.pswp__ui--one-slide .pswp__counter {
display: none; }
.pswp__element--disabled {
display: none !important; }
.pswp--minimal--dark .pswp__top-bar {
background: none; }
Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

@@ -0,0 +1 @@
<svg width="264" height="88" viewBox="0 0 264 88" xmlns="http://www.w3.org/2000/svg"><title>default-skin 2</title><g fill="none" fill-rule="evenodd"><g><path d="M67.002 59.5v3.768c-6.307.84-9.184 5.75-10.002 9.732 2.22-2.83 5.564-5.098 10.002-5.098V71.5L73 65.585 67.002 59.5z" id="Shape" fill="#fff"/><g fill="#fff"><path d="M13 29v-5h2v3h3v2h-5zM13 15h5v2h-3v3h-2v-5zM31 15v5h-2v-3h-3v-2h5zM31 29h-5v-2h3v-3h2v5z" id="Shape"/></g><g fill="#fff"><path d="M62 24v5h-2v-3h-3v-2h5zM62 20h-5v-2h3v-3h2v5zM70 20v-5h2v3h3v2h-5zM70 24h5v2h-3v3h-2v-5z"/></g><path d="M20.586 66l-5.656-5.656 1.414-1.414L22 64.586l5.656-5.656 1.414 1.414L23.414 66l5.656 5.656-1.414 1.414L22 67.414l-5.656 5.656-1.414-1.414L20.586 66z" fill="#fff"/><path d="M111.785 65.03L110 63.5l3-3.5h-10v-2h10l-3-3.5 1.785-1.468L117 59l-5.215 6.03z" fill="#fff"/><path d="M152.215 65.03L154 63.5l-3-3.5h10v-2h-10l3-3.5-1.785-1.468L147 59l5.215 6.03z" fill="#fff"/><g><path id="Rectangle-11" fill="#fff" d="M160.957 28.543l-3.25-3.25-1.413 1.414 3.25 3.25z"/><path d="M152.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" id="Oval-1" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M150 21h5v1h-5z"/></g><g><path d="M116.957 28.543l-1.414 1.414-3.25-3.25 1.414-1.414 3.25 3.25z" fill="#fff"/><path d="M108.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M106 21h5v1h-5z"/><path fill="#fff" d="M109.043 19.008l-.085 5-1-.017.085-5z"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

@@ -0,0 +1,4 @@
/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2019 Dmitry Semenov; */
!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipeUI_Default=b()}(this,function(){"use strict";var a=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=this,w=!1,x=!0,y=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(a,b){return a.title?(b.children[0].innerHTML=a.title,!0):(b.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return a.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return a.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},A=function(a){if(r)return!0;a=a||window.event,q.timeToIdle&&q.mouseUsed&&!k&&K();for(var c,d,e=a.target||a.srcElement,f=e.getAttribute("class")||"",g=0;g<S.length;g++)c=S[g],c.onTap&&f.indexOf("pswp__"+c.name)>-1&&(c.onTap(),d=!0);if(d){a.stopPropagation&&a.stopPropagation(),r=!0;var h=b.features.isOldAndroid?600:30;s=setTimeout(function(){r=!1},h)}},B=function(){return!a.likelyTouchDevice||q.mouseUsed||screen.width>q.fitControlsWidth},C=function(a,c,d){b[(d?"add":"remove")+"Class"](a,"pswp__"+c)},D=function(){var a=1===q.getNumItemsFn();a!==p&&(C(d,"ui--one-slide",a),p=a)},E=function(){C(i,"share-modal--hidden",y)},F=function(){return y=!y,y?(b.removeClass(i,"pswp__share-modal--fade-in"),setTimeout(function(){y&&E()},300)):(E(),setTimeout(function(){y||b.addClass(i,"pswp__share-modal--fade-in")},30)),y||H(),!1},G=function(b){b=b||window.event;var c=b.target||b.srcElement;return a.shout("shareLinkClick",b,c),!!c.href&&(!!c.hasAttribute("download")||(window.open(c.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),y||F(),!1))},H=function(){for(var a,b,c,d,e,f="",g=0;g<q.shareButtons.length;g++)a=q.shareButtons[g],c=q.getImageURLForShare(a),d=q.getPageURLForShare(a),e=q.getTextForShare(a),b=a.url.replace("{{url}}",encodeURIComponent(d)).replace("{{image_url}}",encodeURIComponent(c)).replace("{{raw_image_url}}",c).replace("{{text}}",encodeURIComponent(e)),f+='<a href="'+b+'" target="_blank" class="pswp__share--'+a.id+'"'+(a.download?"download":"")+">"+a.label+"</a>",q.parseShareButtonOut&&(f=q.parseShareButtonOut(a,f));i.children[0].innerHTML=f,i.children[0].onclick=G},I=function(a){for(var c=0;c<q.closeElClasses.length;c++)if(b.hasClass(a,"pswp__"+q.closeElClasses[c]))return!0},J=0,K=function(){clearTimeout(u),J=0,k&&v.setIdle(!1)},L=function(a){a=a?a:window.event;var b=a.relatedTarget||a.toElement;b&&"HTML"!==b.nodeName||(clearTimeout(u),u=setTimeout(function(){v.setIdle(!0)},q.timeToIdleOutside))},M=function(){q.fullscreenEl&&!b.features.isOldAndroid&&(c||(c=v.getFullscreenAPI()),c?(b.bind(document,c.eventK,v.updateFullscreen),v.updateFullscreen(),b.addClass(a.template,"pswp--supports-fs")):b.removeClass(a.template,"pswp--supports-fs"))},N=function(){q.preloaderEl&&(O(!0),l("beforeChange",function(){clearTimeout(o),o=setTimeout(function(){a.currItem&&a.currItem.loading?(!a.allowProgressiveImg()||a.currItem.img&&!a.currItem.img.naturalWidth)&&O(!1):O(!0)},q.loadingIndicatorDelay)}),l("imageLoadComplete",function(b,c){a.currItem===c&&O(!0)}))},O=function(a){n!==a&&(C(m,"preloader--active",!a),n=a)},P=function(a){var c=a.vGap;if(B()){var g=q.barsSize;if(q.captionEl&&"auto"===g.bottom)if(f||(f=b.createEl("pswp__caption pswp__caption--fake"),f.appendChild(b.createEl("pswp__caption__center")),d.insertBefore(f,e),b.addClass(d,"pswp__ui--fit")),q.addCaptionHTMLFn(a,f,!0)){var h=f.clientHeight;c.bottom=parseInt(h,10)||44}else c.bottom=g.top;else c.bottom="auto"===g.bottom?0:g.bottom;c.top=g.top}else c.top=c.bottom=0},Q=function(){q.timeToIdle&&l("mouseUsed",function(){b.bind(document,"mousemove",K),b.bind(document,"mouseout",L),t=setInterval(function(){J++,2===J&&v.setIdle(!0)},q.timeToIdle/2)})},R=function(){l("onVerticalDrag",function(a){x&&a<.95?v.hideControls():!x&&a>=.95&&v.showControls()});var a;l("onPinchClose",function(b){x&&b<.9?(v.hideControls(),a=!0):a&&!x&&b>.9&&v.showControls()}),l("zoomGestureEnded",function(){a=!1,a&&!x&&v.showControls()})},S=[{name:"caption",option:"captionEl",onInit:function(a){e=a}},{name:"share-modal",option:"shareEl",onInit:function(a){i=a},onTap:function(){F()}},{name:"Line truncated
@@ -0,0 +1,179 @@
/*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */
/*
Styles for basic PhotoSwipe functionality (sliding area, open/close transitions)
*/
/* pswp = photoswipe */
.pswp {
display: none;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
overflow: hidden;
-ms-touch-action: none;
touch-action: none;
z-index: 1500;
-webkit-text-size-adjust: 100%;
/* create separate layer, to avoid paint on window.onscroll in webkit/blink */
-webkit-backface-visibility: hidden;
outline: none; }
.pswp * {
-webkit-box-sizing: border-box;
box-sizing: border-box; }
.pswp img {
max-width: none; }
/* style is added when JS option showHideOpacity is set to true */
.pswp--animate_opacity {
/* 0.001, because opacity:0 doesn't trigger Paint action, which causes lag at start of transition */
opacity: 0.001;
will-change: opacity;
/* for open/close transition */
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp--open {
display: block; }
.pswp--zoom-allowed .pswp__img {
/* autoprefixer: off */
cursor: -webkit-zoom-in;
cursor: -moz-zoom-in;
cursor: zoom-in; }
.pswp--zoomed-in .pswp__img {
/* autoprefixer: off */
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab; }
.pswp--dragging .pswp__img {
/* autoprefixer: off */
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing; }
/*
Background is added as a separate element.
As animating opacity is much faster than animating rgba() background-color.
*/
.pswp__bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: #000;
opacity: 0;
-webkit-transform: translateZ(0);
transform: translateZ(0);
-webkit-backface-visibility: hidden;
will-change: opacity; }
.pswp__scroll-wrap {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: hidden; }
.pswp__container,
.pswp__zoom-wrap {
-ms-touch-action: none;
touch-action: none;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0; }
/* Prevent selection and tap highlights */
.pswp__container,
.pswp__img {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none; }
.pswp__zoom-wrap {
position: absolute;
width: 100%;
-webkit-transform-origin: left top;
-ms-transform-origin: left top;
transform-origin: left top;
/* for open/close transition */
-webkit-transition: -webkit-transform 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp__bg {
will-change: opacity;
/* for open/close transition */
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp--animated-in .pswp__bg,
.pswp--animated-in .pswp__zoom-wrap {
-webkit-transition: none;
transition: none; }
.pswp__container,
.pswp__zoom-wrap {
-webkit-backface-visibility: hidden; }
.pswp__item {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow: hidden; }
.pswp__img {
position: absolute;
width: auto;
height: auto;
top: 0;
left: 0; }
/*
stretched thumbnail or div placeholder element (see below)
style is added to avoid flickering in webkit/blink when layers overlap
*/
.pswp__img--placeholder {
-webkit-backface-visibility: hidden; }
/*
div element that matches size of large image
large image loads on top of it
*/
.pswp__img--placeholder--blank {
background: #222; }
.pswp--ie .pswp__img {
width: 100% !important;
height: auto !important;
left: 0;
top: 0; }
/*
Error message appears when image is not loaded
(JS option errorMsg controls markup)
*/
.pswp__error-msg {
position: absolute;
left: 0;
top: 50%;
width: 100%;
text-align: center;
font-size: 14px;
line-height: 16px;
margin-top: -8px;
color: #CCC; }
.pswp__error-msg a {
color: #CCC;
text-decoration: underline; }
@@ -0,0 +1,4 @@
/*! PhotoSwipe - v4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2019 Dmitry Semenov; */
!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipe=b()}(this,function(){"use strict";var a=function(a,b,c,d){var e={features:null,bind:function(a,b,c,d){var e=(d?"remove":"add")+"EventListener";b=b.split(" ");for(var f=0;f<b.length;f++)b[f]&&a[e](b[f],c,!1)},isArray:function(a){return a instanceof Array},createEl:function(a,b){var c=document.createElement(b||"div");return a&&(c.className=a),c},getScrollY:function(){var a=window.pageYOffset;return void 0!==a?a:document.documentElement.scrollTop},unbind:function(a,b,c){e.bind(a,b,c,!0)},removeClass:function(a,b){var c=new RegExp("(\\s|^)"+b+"(\\s|$)");a.className=a.className.replace(c," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(a,b){e.hasClass(a,b)||(a.className+=(a.className?" ":"")+b)},hasClass:function(a,b){return a.className&&new RegExp("(^|\\s)"+b+"(\\s|$)").test(a.className)},getChildByClass:function(a,b){for(var c=a.firstChild;c;){if(e.hasClass(c,b))return c;c=c.nextSibling}},arraySearch:function(a,b,c){for(var d=a.length;d--;)if(a[d][c]===b)return d;return-1},extend:function(a,b,c){for(var d in b)if(b.hasOwnProperty(d)){if(c&&a.hasOwnProperty(d))continue;a[d]=b[d]}},easing:{sine:{out:function(a){return Math.sin(a*(Math.PI/2))},inOut:function(a){return-(Math.cos(Math.PI*a)-1)/2}},cubic:{out:function(a){return--a*a*a+1}}},detectFeatures:function(){if(e.features)return e.features;var a=e.createEl(),b=a.style,c="",d={};if(d.oldIE=document.all&&!document.addEventListener,d.touch="ontouchstart"in window,window.requestAnimationFrame&&(d.raf=window.requestAnimationFrame,d.caf=window.cancelAnimationFrame),d.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,!d.pointerEvent){var f=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var g=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);g&&g.length>0&&(g=parseInt(g[1],10),g>=1&&g<8&&(d.isOldIOSPhone=!0))}var h=f.match(/Android\s([0-9\.]*)/),i=h?h[1]:0;i=parseFloat(i),i>=1&&(i<4.4&&(d.isOldAndroid=!0),d.androidVersion=i),d.isMobileOpera=/opera mini|opera mobi/i.test(f)}for(var j,k,l=["transform","perspective","animationName"],m=["","webkit","Moz","ms","O"],n=0;n<4;n++){c=m[n];for(var o=0;o<3;o++)j=l[o],k=c+(c?j.charAt(0).toUpperCase()+j.slice(1):j),!d[j]&&k in b&&(d[j]=k);c&&!d.raf&&(c=c.toLowerCase(),d.raf=window[c+"RequestAnimationFrame"],d.raf&&(d.caf=window[c+"CancelAnimationFrame"]||window[c+"CancelRequestAnimationFrame"]))}if(!d.raf){var p=0;d.raf=function(a){var b=(new Date).getTime(),c=Math.max(0,16-(b-p)),d=window.setTimeout(function(){a(b+c)},c);return p=b+c,d},d.caf=function(a){clearTimeout(a)}}return d.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,e.features=d,d}};e.detectFeatures(),e.features.oldIE&&(e.bind=function(a,b,c,d){b=b.split(" ");for(var e,f=(d?"detach":"attach")+"Event",g=function(){c.handleEvent.call(c)},h=0;h<b.length;h++)if(e=b[h])if("object"==typeof c&&c.handleEvent){if(d){if(!c["oldIE"+e])return!1}else c["oldIE"+e]=g;a[f]("on"+e,c["oldIE"+e])}else a[f]("on"+e,c)});var f=this,g=25,h=3,i={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(a){return"A"===a.tagName},getDoubleTapZoom:function(a,b){return a?1:b.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};e.extend(i,d);var j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma=function(){return{x:0,y:0}},na=ma(),oa=ma(),pa=ma(),qa={},ra=0,sa={},ta=ma(),ua=0,va=!0,wa=[],xa={},ya=!1,za=function(a,b){e.extend(f,b.publicMethods),wa.push(a)},Aa=function(a){var b=ac();return a>b-1?a-b:a<0?b+a:a},Ba={},Ca=function(a,b){return Ba[a]||(Ba[a]=[]),Ba[a].push(b)},Da=function(a){var b=Ba[a];if(b){var c=Array.prototype.slice.call(arguments);c.shift();for(var d=0;d<b.length;d++)b[d].apply(f,c)}},Ea=function(){return(new Date).getTime()},Fa=function(a){ja=a,f.bg.style.opacity=a*i.bgOpacity},Ga=function(a,b,c,d,e){(!ya||e&&e!==f.currItem)&&(d/=e?e.fitRatio:f.currItem.fitRatio),a[E]=u+b+"px, "+c+"px"+v+" scale("+d+")"},Ha=function(a){ea&&(a&&(s>f.currItem.fitRatio?ya||(mc(f.currItem,!1,!0),ya=!0):ya&&(mc(f.currItem),ya=!1)),Ga(ea,pa.x,pa.y,s))},Ia=function(a){a.container&&Ga(a.container.style,a.initialPosition.x,a.initialPosition.y,a.initialZoomLevel,a)},Ja=function(a,b){b[E]=u+a+"px, 0px"+v},Ka=function(a,b){if(!i.loop&&b){var c=m+(ta.x*ra-a)/ta.x,d=Math.round(a-tb.x);(c<0&&d>0||c>=ac()-1&&d<0)&&(a=tb.x+d*i.mainScrollEndFriction)}tb.x=a,Ja(a,n)},La=function(a,b){var c=ub[a]-sa[a];return oa[a]+na[a]+c-c*(b/t)},Ma=function(a,b){a.x=b.x,a.y=b.y,b.id&&(a.id=b.id)},Na=function(a){a.x=Math.round(a.x),a.y=Math.round(a.y)},OaLine truncated
@@ -0,0 +1 @@
# Vendor scripts will be loaded automatically after `build` task
@@ -0,0 +1 @@
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;bordeLine truncated
@@ -0,0 +1,2 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(n){"function"===typeof define&&define.amd?define(["jquery"],n):"object"===typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!==typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){const e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;let t,n,r,h,o,s,f,g,m,v,y,_,i,a,b;function w(e,t){return i.call(e,t)}function l(e,t){let n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),--u;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&f){for(u=(n=e.split("/")).length;0<u;--u){if(r=n.slice(0,u).join("/"),h)for(d=h.length;0<d;--d)if(i=(i=f[h.slice(0,d).join("/")])&&i[r]){o=i,a=u;break}if(o)break;!l&&g&&g[r]&&(l=g[r],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function A(t,n){return function(){const e=a.call(arguments,0);return"string"!==typeof e[0]&&1===e.length&&e.push(null),s.apply(h,e.concat([t,n]))}}function x(t){return function(e){m[t]=e}}function D(e){if(w(v,e)){const t=v[e];delete v[e],_[e]=!0,o.apply(h,t)}if(!w(m,e)&&!w(_,e))throw new Error("No "+e);return m[e]}function c(e){let t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?c(e):[]}return e&&e.requirejs||(e?n=e:e={},m={},v={},y={},_={},i=Object.prototype.hasOwnProperty,a=[].slice,b=/\.js$/,f=function(e,t){let n,r,i=c(e),o=i[0],s=t[1];return e=i[1],o&&(n=D(o=l(o,s))),o?e=n&&n.normalize?n.normalize(e,(r=s,function(e){return l(e,r)})):l(e,s):(o=(i=c(e=l(e,s)))[0],e=i[1],o&&(n=D(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},g={require(e){return A(e)},exports(e){const t=m[e];return void 0!==t?t:m[e]={}},module(e){return{id:e,uri:"",exports:m[e],config:(t=e,function(){return y&&y.config&&y.config[t]||{}})};let t}},o=function(e,t,n,r){let i,o,s,a,l,c,u,d=[],p=typeof n;if(c=S(r=r||e),"undefined"==p||"function"==p){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=f(t[l],c)).f))d[l]=g.require(e);else if("exports"===o)d[l]=g.exports(e),u=!0;else if("module"===o)i=d[l]=g.module(e);else if(w(m,o)||w(v,o)||w(_,o))d[l]=D(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,A(r,!0),x(o),{}),d[l]=m[o]}s=n?n.apply(m[e],d):void 0,e&&(i&&i.exports!==h&&i.exports!==m[e]?m[e]=i.exports:s===h&&u||(m[e]=s))}else e&&(m[e]=n)},t=n=s=function(e,t,n,r,i){if("string"===typeof e)return g[e]?g[e](t):D(f(e,S(t)).f);if(!e.splice){if((y=e).deps&&s(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=h}return t=t||function(){},"function"===typeof n&&(n=r,r=i),r?o(h,e,t,n):setTimeout(function(){o(h,e,t,n)},4),s},s.config=function(e){return s(e)},t._defined=m,(r=function(e,t,n){if("string"!==typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),w(m,e)||w(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0},e.requirejs=t,e.require=n,e.define=r),e.define("almond",function(){}),e.define("jquery",[],function(){const e=u||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(o){const i={};function u(e){const t=e.prototype,n=[];for(const r in t){"function"===typeof t[r]&&"constructor"!==r&&n.push(r)}return n}i.Extend=function(e,t){const n={}.hasOwnProperty;function r(){this.constructor=e}for(const i in t)n.call(t,i)&&(e[i]=t[i]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i.Decorate=function(r,i){const e=u(i),t=u(r);function o(){let e=Array.prototype.unshift,t=i.prototype.constructor.length,n=r.prototype.constructor;0<t&&(e.call(arguments,r.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=r.displayName,o.prototype=new function(){this.constructor=o};for(let n=0;n<t.length;n++){const s=t[n];o.prototype[s]=r.prototype[s]}function a(e){let t=function(){};e in o.prototype&&(t=o.prototype[e]);const n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}for(let l=0;l<e.length;l++){const c=e[l];o.prototype[c]=a(c)}return o};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){let t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=functiLine truncated
Loaded 100 of 10404 files, more files were not shown because too many files have changed in this diff. Show more