first commit
This commit is contained in:
Executable
+561
@@ -0,0 +1,561 @@
|
||||
(function($) {
|
||||
"use strict";
|
||||
/*--
|
||||
Commons Variables
|
||||
-----------------------------------*/
|
||||
var windows = $(window);
|
||||
|
||||
/*--
|
||||
Menu Sticky
|
||||
-----------------------------------*/
|
||||
var sticky = $('.header-sticky');
|
||||
|
||||
windows.on('scroll', function() {
|
||||
var scroll = windows.scrollTop();
|
||||
if (scroll < 300) {
|
||||
sticky.removeClass('is-sticky');
|
||||
} else {
|
||||
sticky.addClass('is-sticky');
|
||||
}
|
||||
});
|
||||
|
||||
/*--
|
||||
Header Search
|
||||
-----------------------------------*/
|
||||
var $headerSearchToggle = $('.header-search-toggle');
|
||||
var $headerSearchForm = $('.header-search-form');
|
||||
|
||||
$headerSearchToggle.on('click', function() {
|
||||
var $this = $(this);
|
||||
if (!$this.hasClass('open')) {
|
||||
$this.addClass('open').find('i').removeClass('bi bi-search').addClass('bi bi-search');
|
||||
$headerSearchForm.slideDown();
|
||||
} else {
|
||||
$this.removeClass('open').find('i').removeClass('bi bi-search').addClass('bi bi-search');
|
||||
$headerSearchForm.slideUp();
|
||||
}
|
||||
});
|
||||
/*--
|
||||
Mobile Menu
|
||||
-----------------------------------*/
|
||||
$('#mobile-menu-trigger').on('click', function() {
|
||||
$('#offcanvas-mobile-menu').removeClass('inactive').addClass('active');
|
||||
});
|
||||
|
||||
|
||||
$('#offcanvas-menu-close-trigger').on('click', function() {
|
||||
$('#offcanvas-mobile-menu').removeClass('active').addClass('inactive');
|
||||
});
|
||||
/*--
|
||||
Offcanvas Menu
|
||||
-----------------------------------*/
|
||||
var $offCanvasNav = $('.offcanvas-navigation'),
|
||||
$offCanvasNavSubMenu = $offCanvasNav.find('.submenu2');
|
||||
|
||||
/*Add Toggle Button With Off Canvas Sub Menu*/
|
||||
$offCanvasNavSubMenu.parent().prepend('<span class="menu-expand"><i></i></span>');
|
||||
|
||||
/*Close Off Canvas Sub Menu*/
|
||||
$offCanvasNavSubMenu.slideUp();
|
||||
|
||||
/*Category Sub Menu Toggle*/
|
||||
$offCanvasNav.on('click', 'li a, li .menu-expand', function(e) {
|
||||
var $this = $(this);
|
||||
if (($this.parent().attr('class').match(/\b(menu-item-has-children|has-children|has-sub-menu)\b/)) && ($this.attr('href') === '#' || $this.hasClass('menu-expand'))) {
|
||||
e.preventDefault();
|
||||
if ($this.siblings('ul:visible').length) {
|
||||
$this.parent('li').removeClass('active');
|
||||
$this.siblings('ul').slideUp();
|
||||
} else {
|
||||
$this.parent('li').addClass('active');
|
||||
$this.closest('li').siblings('li').removeClass('active').find('li').removeClass('active');
|
||||
$this.closest('li').siblings('li').find('ul:visible').slideUp();
|
||||
$this.siblings('ul').slideDown();
|
||||
}
|
||||
}
|
||||
});
|
||||
/*----------------------------
|
||||
3. Sidebar Search Active
|
||||
-----------------------------*/
|
||||
function sidebarSearch() {
|
||||
var searchTrigger = $('.header-search-toggle'),
|
||||
endTriggersearch = $('button.search-close'),
|
||||
container = $('.main-search-active');
|
||||
|
||||
searchTrigger.on('click', function() {
|
||||
container.addClass('inside');
|
||||
});
|
||||
|
||||
endTriggersearch.on('click', function() {
|
||||
container.removeClass('inside');
|
||||
});
|
||||
|
||||
};
|
||||
sidebarSearch();
|
||||
/*--
|
||||
- Background Image
|
||||
------------------------------------------*/
|
||||
var $backgroundImage = $('.bg-image');
|
||||
$backgroundImage.each(function() {
|
||||
var $this = $(this),
|
||||
$bgImage = $this.data('bg');
|
||||
$this.css('background-image', 'url(' + $bgImage + ')');
|
||||
});
|
||||
|
||||
/*------------------------------
|
||||
Nice Select Active
|
||||
---------------------------------*/
|
||||
$('select').niceSelect();
|
||||
|
||||
/*--
|
||||
Sliders
|
||||
-----------------------------------*/
|
||||
// Hero Slider
|
||||
$('.hero-slider').slick({
|
||||
infinite: true,
|
||||
fade: true,
|
||||
dots: false,
|
||||
prevArrow: '<button class="slick-prev"><i class="bi bi-chevron-left"></i></button>',
|
||||
nextArrow: '<button class="slick-next"><i class="bi bi-chevron-right"></i></button>',
|
||||
responsive: [{
|
||||
breakpoint: 992,
|
||||
settings: {
|
||||
dots: true,
|
||||
arrows: false,
|
||||
}
|
||||
}, ]
|
||||
});
|
||||
// Testimonial Slider
|
||||
$('.testimonial-slider-content').slick({
|
||||
infinite: true,
|
||||
arrows: false,
|
||||
fade: false,
|
||||
dots: true,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
adaptiveHeight: true,
|
||||
prevArrow: '<button class="slick-prev"><i class="fa fa-chevron-left"></i></button>',
|
||||
nextArrow: '<button class="slick-next"><i class="fa fa-chevron-right"></i></button>',
|
||||
responsive: [{
|
||||
breakpoint: 1501,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 1199,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 992,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 768,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 575,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
}
|
||||
},
|
||||
]
|
||||
});
|
||||
// Brand Slider
|
||||
$('.brand-slider').slick({
|
||||
infinite: true,
|
||||
arrows: false,
|
||||
dots: true,
|
||||
slidesToShow: 5,
|
||||
slidesToScroll: 5,
|
||||
responsive: [{
|
||||
breakpoint: 1199,
|
||||
settings: {
|
||||
slidesToShow: 4,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 992,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 768,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 479,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
}
|
||||
},
|
||||
]
|
||||
});
|
||||
// Work Slider
|
||||
$('.product-slider').slick({
|
||||
infinite: true,
|
||||
arrows: true,
|
||||
dots: false,
|
||||
slidesToShow: 4,
|
||||
slidesToScroll: 1,
|
||||
prevArrow: '<button class="slick-prev"><i class="fa fa-angle-left"></i></button>',
|
||||
nextArrow: '<button class="slick-next"><i class="fa fa-angle-right"></i></button>',
|
||||
responsive: [{
|
||||
breakpoint: 1200,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 992,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 768,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 576,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
arrows: false,
|
||||
autoplay: true
|
||||
}
|
||||
},
|
||||
]
|
||||
});
|
||||
/*-----------------------------------
|
||||
Single Product Slide Menu Active
|
||||
--------------------------------------*/
|
||||
$('.product-details-images').each(function() {
|
||||
var $this = $(this);
|
||||
var $thumb = $this.siblings('.product-details-thumbs');
|
||||
$this.slick({
|
||||
arrows: false,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
autoplay: false,
|
||||
autoplaySpeed: 5000,
|
||||
dots: false,
|
||||
infinite: true,
|
||||
centerMode: false,
|
||||
centerPadding: 0,
|
||||
asNavFor: $thumb,
|
||||
});
|
||||
});
|
||||
$('.product-details-thumbs').each(function() {
|
||||
var $this = $(this);
|
||||
var $details = $this.siblings('.product-details-images');
|
||||
$this.slick({
|
||||
slidesToShow: 4,
|
||||
slidesToScroll: 1,
|
||||
autoplay: false,
|
||||
autoplaySpeed: 5000,
|
||||
arrows: false,
|
||||
dots: false,
|
||||
infinite: true,
|
||||
focusOnSelect: true,
|
||||
centerMode: true,
|
||||
centerPadding: 0,
|
||||
prevArrow: '<span class="slick-prev"><i class="fa fa-angle-left"></i></span>',
|
||||
nextArrow: '<span class="slick-next"><i class="fa fa-angle-right"></i></span>',
|
||||
asNavFor: $details,
|
||||
responsive: [{
|
||||
breakpoint: 1024,
|
||||
settings: {}
|
||||
},
|
||||
{
|
||||
breakpoint: 600,
|
||||
settings: {}
|
||||
},
|
||||
{
|
||||
breakpoint: 480,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
});
|
||||
});
|
||||
/* Product Details 2 Images Slider */
|
||||
$('.product-details-images-2').each(function() {
|
||||
var $this = $(this);
|
||||
var $thumb = $this.siblings('.product-details-thumbs-2');
|
||||
$this.slick({
|
||||
arrows: false,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
autoplay: false,
|
||||
autoplaySpeed: 5000,
|
||||
dots: false,
|
||||
infinite: true,
|
||||
centerMode: false,
|
||||
centerPadding: 0,
|
||||
asNavFor: $thumb,
|
||||
});
|
||||
});
|
||||
$('.product-details-thumbs-2').each(function() {
|
||||
var $this = $(this);
|
||||
var $details = $this.siblings('.product-details-images-2');
|
||||
$this.slick({
|
||||
arrows: false,
|
||||
slidesToShow: 4,
|
||||
slidesToScroll: 1,
|
||||
autoplay: false,
|
||||
autoplaySpeed: 5000,
|
||||
vertical: true,
|
||||
verticalSwiping: true,
|
||||
dots: false,
|
||||
infinite: true,
|
||||
focusOnSelect: true,
|
||||
centerMode: false,
|
||||
centerPadding: 0,
|
||||
prevArrow: '<span class="slick-prev"><i class="fa fa-angle-up"></i></span>',
|
||||
nextArrow: '<span class="slick-next"><i class="fa fa-angle-down"></i></span>',
|
||||
asNavFor: $details,
|
||||
responsive: [{
|
||||
breakpoint: 1200,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 991,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 767,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 479,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
$('.slider-lg-image-1').slick({
|
||||
infinite: true,
|
||||
arrows: true,
|
||||
dots: false,
|
||||
slidesToShow: 4,
|
||||
slidesToScroll: 1,
|
||||
prevArrow: '<button class="slick-prev"><i class="fa fa-angle-left"></i></button>',
|
||||
nextArrow: '<button class="slick-next"><i class="fa fa-angle-right"></i></button>',
|
||||
responsive: [{
|
||||
breakpoint: 1199,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 992,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 768,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 576,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
arrows: false,
|
||||
autoplay: true
|
||||
}
|
||||
},
|
||||
]
|
||||
});
|
||||
/* Blog Slider Active */
|
||||
$('.blog-gallery').slick({
|
||||
infinite: true,
|
||||
arrows: false,
|
||||
dots: false,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
autoplay: true,
|
||||
prevArrow: '<button class="slick-prev"><i class="fa fa-angle-left"></i></button>',
|
||||
nextArrow: '<button class="slick-next"><i class="fa fa-angle-right"></i></button>',
|
||||
});
|
||||
|
||||
|
||||
/*-----------------------------------
|
||||
Price slider Active
|
||||
----------------------------------*/
|
||||
$('#price-range').slider({
|
||||
range: true,
|
||||
min: 0,
|
||||
max: 1000,
|
||||
values: [0, 900],
|
||||
slide: function(event, ui) {
|
||||
$('#price-amount').val('$' + ui.values[0] + ' - $' + ui.values[1]);
|
||||
}
|
||||
});
|
||||
$('#price-amount').val('$' + $('#price-range').slider('values', 0) +
|
||||
' - $' + $('#price-range').slider('values', 1));
|
||||
|
||||
/*-----------------------------------
|
||||
Count Down Active
|
||||
----------------------------------*/
|
||||
$('[data-countdown]').each(function() {
|
||||
var $this = $(this),
|
||||
finalDate = $(this).data('countdown');
|
||||
$this.countdown(finalDate, function(event) {
|
||||
$this.html(event.strftime('<div class="single-countdown big-font"><span class="single-countdown-time">%D</span><span class="single-countdown-text">days,</span></div><div class="single-countdown"><span class="single-countdown-time">%H</span><span class="single-countdown-text">h</span></div><div class="single-countdown"><span class="single-countdown-time">%M</span><span class="single-countdown-text">m</span></div><div class="single-countdown"><span class="single-countdown-time">%S</span><span class="single-countdown-text">s</span></div>'));
|
||||
});
|
||||
});
|
||||
$('[data-countdown2]').each(function() {
|
||||
var $this = $(this),
|
||||
finalDate = $(this).data('countdown2');
|
||||
$this.countdown(finalDate, function(event) {
|
||||
$this.html(event.strftime('<div class="single-count"><span class="single-countdown-times">%D</span><span class="single-countdown-content">Days</span></div><div class="single-count"><span class="single-countdown-times">%H</span><span class="single-countdown-content">Hours</span></div><div class="single-count"><span class="single-countdown-times">%M</span><span class="single-countdown-content">Mins</span></div><div class="single-count"><span class="single-countdown-times">%S</span><span class="single-countdown-content">Secs</span></div>'));
|
||||
});
|
||||
});
|
||||
|
||||
/*----------------------------------
|
||||
ScrollUp Active
|
||||
-----------------------------------*/
|
||||
$.scrollUp({
|
||||
scrollText: '<i class="bi bi-arrow-up"></i>',
|
||||
easingType: 'linear',
|
||||
scrollSpeed: 900,
|
||||
animation: 'fade'
|
||||
});
|
||||
|
||||
/*------------------------
|
||||
Sticky Sidebar Active
|
||||
-------------------------*/
|
||||
$('#sticky-sidebar').theiaStickySidebar({
|
||||
// Settings
|
||||
additionalMarginTop: 120
|
||||
})
|
||||
|
||||
/*-----
|
||||
Quantity
|
||||
--------------------------------*/
|
||||
$('.pro-qty').prepend('<button class="dec qtybtn">-</button>');
|
||||
$('.pro-qty').append('<button class="inc qtybtn">+</button>');
|
||||
$('.qtybtn').on('click', function() {
|
||||
var $button = $(this);
|
||||
var oldValue = $button.parent().find('input').val();
|
||||
if ($button.hasClass('inc')) {
|
||||
var newVal = parseFloat(oldValue) + 1;
|
||||
} else {
|
||||
// Don't allow decrementing below zero
|
||||
if (oldValue > 0) {
|
||||
var newVal = parseFloat(oldValue) - 1;
|
||||
} else {
|
||||
newVal = 0;
|
||||
}
|
||||
}
|
||||
$button.parent().find('input').val(newVal);
|
||||
});
|
||||
/* -------------------------
|
||||
Venobox Active
|
||||
* --------------------------*/
|
||||
$('.venobox').venobox({
|
||||
border: '10px',
|
||||
titleattr: 'data-title',
|
||||
numeratio: true,
|
||||
infinigall: true
|
||||
});
|
||||
/* --------------------------------------------------------
|
||||
FAQ Accordion
|
||||
* -------------------------------------------------------*/
|
||||
$('.card-header a').on('click', function() {
|
||||
$('.card').removeClass('actives');
|
||||
$(this).parents('.card').addClass('actives');
|
||||
});
|
||||
|
||||
/*-----
|
||||
Shipping Form Toggle
|
||||
--------------------------------*/
|
||||
$('[data-shipping]').on('click', function() {
|
||||
if ($('[data-shipping]:checked').length > 0) {
|
||||
$('#shipping-form').slideDown();
|
||||
} else {
|
||||
$('#shipping-form').slideUp();
|
||||
}
|
||||
})
|
||||
|
||||
/*-----
|
||||
Payment Method Select
|
||||
--------------------------------*/
|
||||
$('[name="payment-method"]').on('click', function() {
|
||||
|
||||
var $value = $(this).attr('value');
|
||||
|
||||
$('.single-method p').slideUp();
|
||||
$('[data-method="' + $value + '"]').slideDown();
|
||||
|
||||
})
|
||||
|
||||
/*--
|
||||
MailChimp
|
||||
-----------------------------------*/
|
||||
$('#mc-form').ajaxChimp({
|
||||
language: 'en',
|
||||
callback: mailChimpResponse,
|
||||
// ADD YOUR MAILCHIMP URL BELOW HERE!
|
||||
url: 'http://devitems.us11.list-manage.com/subscribe/post?u=6bbb9b6f5827bd842d9640c82&id=05d85f18ef'
|
||||
|
||||
});
|
||||
|
||||
function mailChimpResponse(resp) {
|
||||
|
||||
if (resp.result === 'success') {
|
||||
$('.mailchimp-success').html('' + resp.msg).fadeIn(900);
|
||||
$('.mailchimp-error').fadeOut(400);
|
||||
|
||||
} else if (resp.result === 'error') {
|
||||
$('.mailchimp-error').html('' + resp.msg).fadeIn(900);
|
||||
}
|
||||
}
|
||||
|
||||
/*--
|
||||
Conatact Map
|
||||
-----------------------------------*/
|
||||
if ($('.contact-map').length) {
|
||||
function initialize() {
|
||||
var mapOptions = {
|
||||
zoom: 14,
|
||||
scrollwheel: false,
|
||||
center: new google.maps.LatLng(40.730610, -73.935242)
|
||||
};
|
||||
var map = new google.maps.Map(document.getElementById('contact-map'), mapOptions);
|
||||
var marker = new google.maps.Marker({
|
||||
position: map.getCenter(),
|
||||
map: map,
|
||||
animation: google.maps.Animation.BOUNCE
|
||||
});
|
||||
|
||||
}
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
Executable
+3728
File diff suppressed because it is too large
Load Diff
+1725
File diff suppressed because it is too large
Load Diff
+3396
File diff suppressed because it is too large
Load Diff
+519
@@ -0,0 +1,519 @@
|
||||
/* Modernizr 2.8.3 (Custom Build) | MIT & BSD
|
||||
* Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
|
||||
*/
|
||||
;
|
||||
window.Modernizr = function(a, b, c) {
|
||||
function D(a) {
|
||||
j.cssText = a
|
||||
}
|
||||
|
||||
function E(a, b) {
|
||||
return D(n.join(a + ";") + (b || ""))
|
||||
}
|
||||
|
||||
function F(a, b) {
|
||||
return typeof a === b
|
||||
}
|
||||
|
||||
function G(a, b) {
|
||||
return !!~("" + a).indexOf(b)
|
||||
}
|
||||
|
||||
function H(a, b) {
|
||||
for (var d in a) {
|
||||
var e = a[d];
|
||||
if (!G(e, "-") && j[e] !== c) return b == "pfx" ? e : !0
|
||||
}
|
||||
return !1
|
||||
}
|
||||
|
||||
function I(a, b, d) {
|
||||
for (var e in a) {
|
||||
var f = b[a[e]];
|
||||
if (f !== c) return d === !1 ? a[e] : F(f, "function") ? f.bind(d || b) : f
|
||||
}
|
||||
return !1
|
||||
}
|
||||
|
||||
function J(a, b, c) {
|
||||
var d = a.charAt(0).toUpperCase() + a.slice(1),
|
||||
e = (a + " " + p.join(d + " ") + d).split(" ");
|
||||
return F(b, "string") || F(b, "undefined") ? H(e, b) : (e = (a + " " + q.join(d + " ") + d).split(" "), I(e, b, c))
|
||||
}
|
||||
|
||||
function K() {
|
||||
e.input = function(c) {
|
||||
for (var d = 0, e = c.length; d < e; d++) u[c[d]] = c[d] in k;
|
||||
return u.list && (u.list = !!b.createElement("datalist") && !!a.HTMLDataListElement), u
|
||||
}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")), e.inputtypes = function(a) {
|
||||
for (var d = 0, e, f, h, i = a.length; d < i; d++) k.setAttribute("type", f = a[d]), e = k.type !== "text", e && (k.value = l, k.style.cssText = "position:absolute;visibility:hidden;", /^range$/.test(f) && k.style.WebkitAppearance !== c ? (g.appendChild(k), h = b.defaultView, e = h.getComputedStyle && h.getComputedStyle(k, null).WebkitAppearance !== "textfield" && k.offsetHeight !== 0, g.removeChild(k)) : /^(search|tel)$/.test(f) || (/^(url|email)$/.test(f) ? e = k.checkValidity && k.checkValidity() === !1 : e = k.value != l)), t[a[d]] = !!e;
|
||||
return t
|
||||
}("search tel url email datetime date month week time datetime-local number range color".split(" "))
|
||||
}
|
||||
var d = "2.8.3",
|
||||
e = {},
|
||||
f = !0,
|
||||
g = b.documentElement,
|
||||
h = "modernizr",
|
||||
i = b.createElement(h),
|
||||
j = i.style,
|
||||
k = b.createElement("input"),
|
||||
l = ":)",
|
||||
m = {}.toString,
|
||||
n = " -webkit- -moz- -o- -ms- ".split(" "),
|
||||
o = "Webkit Moz O ms",
|
||||
p = o.split(" "),
|
||||
q = o.toLowerCase().split(" "),
|
||||
r = {
|
||||
svg: "http://www.w3.org/2000/svg"
|
||||
},
|
||||
s = {},
|
||||
t = {},
|
||||
u = {},
|
||||
v = [],
|
||||
w = v.slice,
|
||||
x, y = function(a, c, d, e) {
|
||||
var f, i, j, k, l = b.createElement("div"),
|
||||
m = b.body,
|
||||
n = m || b.createElement("body");
|
||||
if (parseInt(d, 10))
|
||||
while (d--) j = b.createElement("div"), j.id = e ? e[d] : h + (d + 1), l.appendChild(j);
|
||||
return f = ["­", '<style id="s', h, '">', a, "</style>"].join(""), l.id = h, (m ? l : n).innerHTML += f, n.appendChild(l), m || (n.style.background = "", n.style.overflow = "hidden", k = g.style.overflow, g.style.overflow = "hidden", g.appendChild(n)), i = c(l, a), m ? l.parentNode.removeChild(l) : (n.parentNode.removeChild(n), g.style.overflow = k), !!i
|
||||
},
|
||||
z = function(b) {
|
||||
var c = a.matchMedia || a.msMatchMedia;
|
||||
if (c) return c(b) && c(b).matches || !1;
|
||||
var d;
|
||||
return y("@media " + b + " { #" + h + " { position: absolute; } }", function(b) {
|
||||
d = (a.getComputedStyle ? getComputedStyle(b, null) : b.currentStyle)["position"] == "absolute"
|
||||
}), d
|
||||
},
|
||||
A = function() {
|
||||
function d(d, e) {
|
||||
e = e || b.createElement(a[d] || "div"), d = "on" + d;
|
||||
var f = d in e;
|
||||
return f || (e.setAttribute || (e = b.createElement("div")), e.setAttribute && e.removeAttribute && (e.setAttribute(d, ""), f = F(e[d], "function"), F(e[d], "undefined") || (e[d] = c), e.removeAttribute(d))), e = null, f
|
||||
}
|
||||
var a = {
|
||||
select: "input",
|
||||
change: "input",
|
||||
submit: "form",
|
||||
reset: "form",
|
||||
error: "img",
|
||||
load: "img",
|
||||
abort: "img"
|
||||
};
|
||||
return d
|
||||
}(),
|
||||
B = {}.hasOwnProperty,
|
||||
C;
|
||||
!F(B, "undefined") && !F(B.call, "undefined") ? C = function(a, b) {
|
||||
return B.call(a, b)
|
||||
} : C = function(a, b) {
|
||||
return b in a && F(a.constructor.prototype[b], "undefined")
|
||||
}, Function.prototype.bind || (Function.prototype.bind = function(b) {
|
||||
var c = this;
|
||||
if (typeof c != "function") throw new TypeError;
|
||||
var d = w.call(arguments, 1),
|
||||
e = function() {
|
||||
if (this instanceof e) {
|
||||
var a = function() {};
|
||||
a.prototype = c.prototype;
|
||||
var f = new a,
|
||||
g = c.apply(f, d.concat(w.call(arguments)));
|
||||
return Object(g) === g ? g : f
|
||||
}
|
||||
return c.apply(b, d.concat(w.call(arguments)))
|
||||
};
|
||||
return e
|
||||
}), s.flexbox = function() {
|
||||
return J("flexWrap")
|
||||
}, s.canvas = function() {
|
||||
var a = b.createElement("canvas");
|
||||
return !!a.getContext && !!a.getContext("2d")
|
||||
}, s.canvastext = function() {
|
||||
return !!e.canvas && !!F(b.createElement("canvas").getContext("2d").fillText, "function")
|
||||
}, s.webgl = function() {
|
||||
return !!a.WebGLRenderingContext
|
||||
}, s.touch = function() {
|
||||
var c;
|
||||
return "ontouchstart" in a || a.DocumentTouch && b instanceof DocumentTouch ? c = !0 : y(["@media (", n.join("touch-enabled),("), h, ")", "{#modernizr{top:9px;position:absolute}}"].join(""), function(a) {
|
||||
c = a.offsetTop === 9
|
||||
}), c
|
||||
}, s.geolocation = function() {
|
||||
return "geolocation" in navigator
|
||||
}, s.postmessage = function() {
|
||||
return !!a.postMessage
|
||||
}, s.websqldatabase = function() {
|
||||
return !!a.openDatabase
|
||||
}, s.indexedDB = function() {
|
||||
return !!J("indexedDB", a)
|
||||
}, s.hashchange = function() {
|
||||
return A("hashchange", a) && (b.documentMode === c || b.documentMode > 7)
|
||||
}, s.history = function() {
|
||||
return !!a.history && !!history.pushState
|
||||
}, s.draganddrop = function() {
|
||||
var a = b.createElement("div");
|
||||
return "draggable" in a || "ondragstart" in a && "ondrop" in a
|
||||
}, s.websockets = function() {
|
||||
return "WebSocket" in a || "MozWebSocket" in a
|
||||
}, s.rgba = function() {
|
||||
return D("background-color:rgba(150,255,150,.5)"), G(j.backgroundColor, "rgba")
|
||||
}, s.hsla = function() {
|
||||
return D("background-color:hsla(120,40%,100%,.5)"), G(j.backgroundColor, "rgba") || G(j.backgroundColor, "hsla")
|
||||
}, s.multiplebgs = function() {
|
||||
return D("background:url(https://),url(https://),red url(https://)"), /(url\s*\(.*?){3}/.test(j.background)
|
||||
}, s.backgroundsize = function() {
|
||||
return J("backgroundSize")
|
||||
}, s.borderimage = function() {
|
||||
return J("borderImage")
|
||||
}, s.borderradius = function() {
|
||||
return J("borderRadius")
|
||||
}, s.boxshadow = function() {
|
||||
return J("boxShadow")
|
||||
}, s.textshadow = function() {
|
||||
return b.createElement("div").style.textShadow === ""
|
||||
}, s.opacity = function() {
|
||||
return E("opacity:.55"), /^0.55$/.test(j.opacity)
|
||||
}, s.cssanimations = function() {
|
||||
return J("animationName")
|
||||
}, s.csscolumns = function() {
|
||||
return J("columnCount")
|
||||
}, s.cssgradients = function() {
|
||||
var a = "background-image:",
|
||||
b = "gradient(linear,left top,right bottom,from(#9f9),to(white));",
|
||||
c = "linear-gradient(left top,#9f9, white);";
|
||||
return D((a + "-webkit- ".split(" ").join(b + a) + n.join(c + a)).slice(0, -a.length)), G(j.backgroundImage, "gradient")
|
||||
}, s.cssreflections = function() {
|
||||
return J("boxReflect")
|
||||
}, s.csstransforms = function() {
|
||||
return !!J("transform")
|
||||
}, s.csstransforms3d = function() {
|
||||
var a = !!J("perspective");
|
||||
return a && "webkitPerspective" in g.style && y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}", function(b, c) {
|
||||
a = b.offsetLeft === 9 && b.offsetHeight === 3
|
||||
}), a
|
||||
}, s.csstransitions = function() {
|
||||
return J("transition")
|
||||
}, s.fontface = function() {
|
||||
var a;
|
||||
return y('@font-face {font-family:"font";src:url("https://")}', function(c, d) {
|
||||
var e = b.getElementById("smodernizr"),
|
||||
f = e.sheet || e.styleSheet,
|
||||
g = f ? f.cssRules && f.cssRules[0] ? f.cssRules[0].cssText : f.cssText || "" : "";
|
||||
a = /src/i.test(g) && g.indexOf(d.split(" ")[0]) === 0
|
||||
}), a
|
||||
}, s.generatedcontent = function() {
|
||||
var a;
|
||||
return y(["#", h, "{font:0/0 a}#", h, ':after{content:"', l, '";visibility:hidden;font:3px/1 a}'].join(""), function(b) {
|
||||
a = b.offsetHeight >= 3
|
||||
}), a
|
||||
}, s.video = function() {
|
||||
var a = b.createElement("video"),
|
||||
c = !1;
|
||||
try {
|
||||
if (c = !!a.canPlayType) c = new Boolean(c), c.ogg = a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, ""), c.h264 = a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, ""), c.webm = a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, "")
|
||||
} catch (d) {}
|
||||
return c
|
||||
}, s.audio = function() {
|
||||
var a = b.createElement("audio"),
|
||||
c = !1;
|
||||
try {
|
||||
if (c = !!a.canPlayType) c = new Boolean(c), c.ogg = a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), c.mp3 = a.canPlayType("audio/mpeg;").replace(/^no$/, ""), c.wav = a.canPlayType('audio/wav; codecs="1"').replace(/^no$/, ""), c.m4a = (a.canPlayType("audio/x-m4a;") || a.canPlayType("audio/aac;")).replace(/^no$/, "")
|
||||
} catch (d) {}
|
||||
return c
|
||||
}, s.localstorage = function() {
|
||||
try {
|
||||
return localStorage.setItem(h, h), localStorage.removeItem(h), !0
|
||||
} catch (a) {
|
||||
return !1
|
||||
}
|
||||
}, s.sessionstorage = function() {
|
||||
try {
|
||||
return sessionStorage.setItem(h, h), sessionStorage.removeItem(h), !0
|
||||
} catch (a) {
|
||||
return !1
|
||||
}
|
||||
}, s.webworkers = function() {
|
||||
return !!a.Worker
|
||||
}, s.applicationcache = function() {
|
||||
return !!a.applicationCache
|
||||
}, s.svg = function() {
|
||||
return !!b.createElementNS && !!b.createElementNS(r.svg, "svg").createSVGRect
|
||||
}, s.inlinesvg = function() {
|
||||
var a = b.createElement("div");
|
||||
return a.innerHTML = "<svg/>", (a.firstChild && a.firstChild.namespaceURI) == r.svg
|
||||
}, s.smil = function() {
|
||||
return !!b.createElementNS && /SVGAnimate/.test(m.call(b.createElementNS(r.svg, "animate")))
|
||||
}, s.svgclippaths = function() {
|
||||
return !!b.createElementNS && /SVGClipPath/.test(m.call(b.createElementNS(r.svg, "clipPath")))
|
||||
};
|
||||
for (var L in s) C(s, L) && (x = L.toLowerCase(), e[x] = s[L](), v.push((e[x] ? "" : "no-") + x));
|
||||
return e.input || K(), e.addTest = function(a, b) {
|
||||
if (typeof a == "object")
|
||||
for (var d in a) C(a, d) && e.addTest(d, a[d]);
|
||||
else {
|
||||
a = a.toLowerCase();
|
||||
if (e[a] !== c) return e;
|
||||
b = typeof b == "function" ? b() : b, typeof f != "undefined" && f && (g.className += " " + (b ? "" : "no-") + a), e[a] = b
|
||||
}
|
||||
return e
|
||||
}, D(""), i = k = null,
|
||||
function(a, b) {
|
||||
function l(a, b) {
|
||||
var c = a.createElement("p"),
|
||||
d = a.getElementsByTagName("head")[0] || a.documentElement;
|
||||
return c.innerHTML = "x<style>" + b + "</style>", d.insertBefore(c.lastChild, d.firstChild)
|
||||
}
|
||||
|
||||
function m() {
|
||||
var a = s.elements;
|
||||
return typeof a == "string" ? a.split(" ") : a
|
||||
}
|
||||
|
||||
function n(a) {
|
||||
var b = j[a[h]];
|
||||
return b || (b = {}, i++, a[h] = i, j[i] = b), b
|
||||
}
|
||||
|
||||
function o(a, c, d) {
|
||||
c || (c = b);
|
||||
if (k) return c.createElement(a);
|
||||
d || (d = n(c));
|
||||
var g;
|
||||
return d.cache[a] ? g = d.cache[a].cloneNode() : f.test(a) ? g = (d.cache[a] = d.createElem(a)).cloneNode() : g = d.createElem(a), g.canHaveChildren && !e.test(a) && !g.tagUrn ? d.frag.appendChild(g) : g
|
||||
}
|
||||
|
||||
function p(a, c) {
|
||||
a || (a = b);
|
||||
if (k) return a.createDocumentFragment();
|
||||
c = c || n(a);
|
||||
var d = c.frag.cloneNode(),
|
||||
e = 0,
|
||||
f = m(),
|
||||
g = f.length;
|
||||
for (; e < g; e++) d.createElement(f[e]);
|
||||
return d
|
||||
}
|
||||
|
||||
function q(a, b) {
|
||||
b.cache || (b.cache = {}, b.createElem = a.createElement, b.createFrag = a.createDocumentFragment, b.frag = b.createFrag()), a.createElement = function(c) {
|
||||
return s.shivMethods ? o(c, a, b) : b.createElem(c)
|
||||
}, a.createDocumentFragment = Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + m().join().replace(/[\w\-]+/g, function(a) {
|
||||
return b.createElem(a), b.frag.createElement(a), 'c("' + a + '")'
|
||||
}) + ");return n}")(s, b.frag)
|
||||
}
|
||||
|
||||
function r(a) {
|
||||
a || (a = b);
|
||||
var c = n(a);
|
||||
return s.shivCSS && !g && !c.hasCSS && (c.hasCSS = !!l(a, "article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")), k || q(a, c), a
|
||||
}
|
||||
var c = "3.7.0",
|
||||
d = a.html5 || {},
|
||||
e = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,
|
||||
f = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,
|
||||
g, h = "_html5shiv",
|
||||
i = 0,
|
||||
j = {},
|
||||
k;
|
||||
(function() {
|
||||
try {
|
||||
var a = b.createElement("a");
|
||||
a.innerHTML = "<xyz></xyz>", g = "hidden" in a, k = a.childNodes.length == 1 || function() {
|
||||
b.createElement("a");
|
||||
var a = b.createDocumentFragment();
|
||||
return typeof a.cloneNode == "undefined" || typeof a.createDocumentFragment == "undefined" || typeof a.createElement == "undefined"
|
||||
}()
|
||||
} catch (c) {
|
||||
g = !0, k = !0
|
||||
}
|
||||
})();
|
||||
var s = {
|
||||
elements: d.elements || "abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",
|
||||
version: c,
|
||||
shivCSS: d.shivCSS !== !1,
|
||||
supportsUnknownElements: k,
|
||||
shivMethods: d.shivMethods !== !1,
|
||||
type: "default",
|
||||
shivDocument: r,
|
||||
createElement: o,
|
||||
createDocumentFragment: p
|
||||
};
|
||||
a.html5 = s, r(b)
|
||||
}(this, b), e._version = d, e._prefixes = n, e._domPrefixes = q, e._cssomPrefixes = p, e.mq = z, e.hasEvent = A, e.testProp = function(a) {
|
||||
return H([a])
|
||||
}, e.testAllProps = J, e.testStyles = y, e.prefixed = function(a, b, c) {
|
||||
return b ? J(a, b, c) : J(a, "pfx")
|
||||
}, g.className = g.className.replace(/(^|\s)no-js(\s|$)/, "$1$2") + (f ? " js " + v.join(" ") : ""), e
|
||||
}(this, this.document),
|
||||
function(a, b, c) {
|
||||
function d(a) {
|
||||
return "[object Function]" == o.call(a)
|
||||
}
|
||||
|
||||
function e(a) {
|
||||
return "string" == typeof a
|
||||
}
|
||||
|
||||
function f() {}
|
||||
|
||||
function g(a) {
|
||||
return !a || "loaded" == a || "complete" == a || "uninitialized" == a
|
||||
}
|
||||
|
||||
function h() {
|
||||
var a = p.shift();
|
||||
q = 1, a ? a.t ? m(function() {
|
||||
("c" == a.t ? B.injectCss : B.injectJs)(a.s, 0, a.a, a.x, a.e, 1)
|
||||
}, 0) : (a(), h()) : q = 0
|
||||
}
|
||||
|
||||
function i(a, c, d, e, f, i, j) {
|
||||
function k(b) {
|
||||
if (!o && g(l.readyState) && (u.r = o = 1, !q && h(), l.onload = l.onreadystatechange = null, b)) {
|
||||
"img" != a && m(function() {
|
||||
t.removeChild(l)
|
||||
}, 50);
|
||||
for (var d in y[c]) y[c].hasOwnProperty(d) && y[c][d].onload()
|
||||
}
|
||||
}
|
||||
var j = j || B.errorTimeout,
|
||||
l = b.createElement(a),
|
||||
o = 0,
|
||||
r = 0,
|
||||
u = {
|
||||
t: d,
|
||||
s: c,
|
||||
e: f,
|
||||
a: i,
|
||||
x: j
|
||||
};
|
||||
1 === y[c] && (r = 1, y[c] = []), "object" == a ? l.data = c : (l.src = c, l.type = a), l.width = l.height = "0", l.onerror = l.onload = l.onreadystatechange = function() {
|
||||
k.call(this, r)
|
||||
}, p.splice(e, 0, u), "img" != a && (r || 2 === y[c] ? (t.insertBefore(l, s ? null : n), m(k, j)) : y[c].push(l))
|
||||
}
|
||||
|
||||
function j(a, b, c, d, f) {
|
||||
return q = 0, b = b || "j", e(a) ? i("c" == b ? v : u, a, b, this.i++, c, d, f) : (p.splice(this.i++, 0, a), 1 == p.length && h()), this
|
||||
}
|
||||
|
||||
function k() {
|
||||
var a = B;
|
||||
return a.loader = {
|
||||
load: j,
|
||||
i: 0
|
||||
}, a
|
||||
}
|
||||
var l = b.documentElement,
|
||||
m = a.setTimeout,
|
||||
n = b.getElementsByTagName("script")[0],
|
||||
o = {}.toString,
|
||||
p = [],
|
||||
q = 0,
|
||||
r = "MozAppearance" in l.style,
|
||||
s = r && !!b.createRange().compareNode,
|
||||
t = s ? l : n.parentNode,
|
||||
l = a.opera && "[object Opera]" == o.call(a.opera),
|
||||
l = !!b.attachEvent && !l,
|
||||
u = r ? "object" : l ? "script" : "img",
|
||||
v = l ? "script" : u,
|
||||
w = Array.isArray || function(a) {
|
||||
return "[object Array]" == o.call(a)
|
||||
},
|
||||
x = [],
|
||||
y = {},
|
||||
z = {
|
||||
timeout: function(a, b) {
|
||||
return b.length && (a.timeout = b[0]), a
|
||||
}
|
||||
},
|
||||
A, B;
|
||||
B = function(a) {
|
||||
function b(a) {
|
||||
var a = a.split("!"),
|
||||
b = x.length,
|
||||
c = a.pop(),
|
||||
d = a.length,
|
||||
c = {
|
||||
url: c,
|
||||
origUrl: c,
|
||||
prefixes: a
|
||||
},
|
||||
e, f, g;
|
||||
for (f = 0; f < d; f++) g = a[f].split("="), (e = z[g.shift()]) && (c = e(c, g));
|
||||
for (f = 0; f < b; f++) c = x[f](c);
|
||||
return c
|
||||
}
|
||||
|
||||
function g(a, e, f, g, h) {
|
||||
var i = b(a),
|
||||
j = i.autoCallback;
|
||||
i.url.split(".").pop().split("?").shift(), i.bypass || (e && (e = d(e) ? e : e[a] || e[g] || e[a.split("/").pop().split("?")[0]]), i.instead ? i.instead(a, e, f, g, h) : (y[i.url] ? i.noexec = !0 : y[i.url] = 1, f.load(i.url, i.forceCSS || !i.forceJS && "css" == i.url.split(".").pop().split("?").shift() ? "c" : c, i.noexec, i.attrs, i.timeout), (d(e) || d(j)) && f.load(function() {
|
||||
k(), e && e(i.origUrl, h, g), j && j(i.origUrl, h, g), y[i.url] = 2
|
||||
})))
|
||||
}
|
||||
|
||||
function h(a, b) {
|
||||
function c(a, c) {
|
||||
if (a) {
|
||||
if (e(a)) c || (j = function() {
|
||||
var a = [].slice.call(arguments);
|
||||
k.apply(this, a), l()
|
||||
}), g(a, j, b, 0, h);
|
||||
else if (Object(a) === a)
|
||||
for (n in m = function() {
|
||||
var b = 0,
|
||||
c;
|
||||
for (c in a) a.hasOwnProperty(c) && b++;
|
||||
return b
|
||||
}(), a) a.hasOwnProperty(n) && (!c && !--m && (d(j) ? j = function() {
|
||||
var a = [].slice.call(arguments);
|
||||
k.apply(this, a), l()
|
||||
} : j[n] = function(a) {
|
||||
return function() {
|
||||
var b = [].slice.call(arguments);
|
||||
a && a.apply(this, b), l()
|
||||
}
|
||||
}(k[n])), g(a[n], j, b, n, h))
|
||||
} else !c && l()
|
||||
}
|
||||
var h = !!a.test,
|
||||
i = a.load || a.both,
|
||||
j = a.callback || f,
|
||||
k = j,
|
||||
l = a.complete || f,
|
||||
m, n;
|
||||
c(h ? a.yep : a.nope, !!i), i && c(i)
|
||||
}
|
||||
var i, j, l = this.yepnope.loader;
|
||||
if (e(a)) g(a, 0, l, 0);
|
||||
else if (w(a))
|
||||
for (i = 0; i < a.length; i++) j = a[i], e(j) ? g(j, 0, l, 0) : w(j) ? B(j) : Object(j) === j && h(j, l);
|
||||
else Object(a) === a && h(a, l)
|
||||
}, B.addPrefix = function(a, b) {
|
||||
z[a] = b
|
||||
}, B.addFilter = function(a) {
|
||||
x.push(a)
|
||||
}, B.errorTimeout = 1e4, null == b.readyState && b.addEventListener && (b.readyState = "loading", b.addEventListener("DOMContentLoaded", A = function() {
|
||||
b.removeEventListener("DOMContentLoaded", A, 0), b.readyState = "complete"
|
||||
}, 0)), a.yepnope = k(), a.yepnope.executeStack = h, a.yepnope.injectJs = function(a, c, d, e, i, j) {
|
||||
var k = b.createElement("script"),
|
||||
l, o, e = e || B.errorTimeout;
|
||||
k.src = a;
|
||||
for (o in d) k.setAttribute(o, d[o]);
|
||||
c = j ? h : c || f, k.onreadystatechange = k.onload = function() {
|
||||
!l && g(k.readyState) && (l = 1, c(), k.onload = k.onreadystatechange = null)
|
||||
}, m(function() {
|
||||
l || (l = 1, c(1))
|
||||
}, e), i ? k.onload() : n.parentNode.insertBefore(k, n)
|
||||
}, a.yepnope.injectCss = function(a, c, d, e, g, i) {
|
||||
var e = b.createElement("link"),
|
||||
j, c = i ? h : c || f;
|
||||
e.href = a, e.rel = "stylesheet", e.type = "text/css";
|
||||
for (j in d) e.setAttribute(j, d[j]);
|
||||
g || (n.parentNode.insertBefore(e, n), m(c, 0))
|
||||
}
|
||||
}(this, document), Modernizr.load = function() {
|
||||
yepnope.apply(window, [].slice.call(arguments, 0))
|
||||
};
|
||||
+868
@@ -0,0 +1,868 @@
|
||||
/*
|
||||
Copyright (C) Federico Zivolo 2018
|
||||
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
|
||||
*/
|
||||
(function(e, t) {
|
||||
'object' == typeof exports && 'undefined' != typeof module ? module.exports = t() : 'function' == typeof define && define.amd ? define(t) : e.Popper = t()
|
||||
})(this, function() {
|
||||
'use strict';
|
||||
|
||||
function e(e) {
|
||||
return e && '[object Function]' === {}.toString.call(e)
|
||||
}
|
||||
|
||||
function t(e, t) {
|
||||
if (1 !== e.nodeType) return [];
|
||||
var o = getComputedStyle(e, null);
|
||||
return t ? o[t] : o
|
||||
}
|
||||
|
||||
function o(e) {
|
||||
return 'HTML' === e.nodeName ? e : e.parentNode || e.host
|
||||
}
|
||||
|
||||
function n(e) {
|
||||
if (!e) return document.body;
|
||||
switch (e.nodeName) {
|
||||
case 'HTML':
|
||||
case 'BODY':
|
||||
return e.ownerDocument.body;
|
||||
case '#document':
|
||||
return e.body;
|
||||
}
|
||||
var i = t(e),
|
||||
r = i.overflow,
|
||||
p = i.overflowX,
|
||||
s = i.overflowY;
|
||||
return /(auto|scroll|overlay)/.test(r + s + p) ? e : n(o(e))
|
||||
}
|
||||
|
||||
function r(e) {
|
||||
return 11 === e ? re : 10 === e ? pe : re || pe
|
||||
}
|
||||
|
||||
function p(e) {
|
||||
if (!e) return document.documentElement;
|
||||
for (var o = r(10) ? document.body : null, n = e.offsetParent; n === o && e.nextElementSibling;) n = (e = e.nextElementSibling).offsetParent;
|
||||
var i = n && n.nodeName;
|
||||
return i && 'BODY' !== i && 'HTML' !== i ? -1 !== ['TD', 'TABLE'].indexOf(n.nodeName) && 'static' === t(n, 'position') ? p(n) : n : e ? e.ownerDocument.documentElement : document.documentElement
|
||||
}
|
||||
|
||||
function s(e) {
|
||||
var t = e.nodeName;
|
||||
return 'BODY' !== t && ('HTML' === t || p(e.firstElementChild) === e)
|
||||
}
|
||||
|
||||
function d(e) {
|
||||
return null === e.parentNode ? e : d(e.parentNode)
|
||||
}
|
||||
|
||||
function a(e, t) {
|
||||
if (!e || !e.nodeType || !t || !t.nodeType) return document.documentElement;
|
||||
var o = e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING,
|
||||
n = o ? e : t,
|
||||
i = o ? t : e,
|
||||
r = document.createRange();
|
||||
r.setStart(n, 0), r.setEnd(i, 0);
|
||||
var l = r.commonAncestorContainer;
|
||||
if (e !== l && t !== l || n.contains(i)) return s(l) ? l : p(l);
|
||||
var f = d(e);
|
||||
return f.host ? a(f.host, t) : a(e, d(t).host)
|
||||
}
|
||||
|
||||
function l(e) {
|
||||
var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 'top',
|
||||
o = 'top' === t ? 'scrollTop' : 'scrollLeft',
|
||||
n = e.nodeName;
|
||||
if ('BODY' === n || 'HTML' === n) {
|
||||
var i = e.ownerDocument.documentElement,
|
||||
r = e.ownerDocument.scrollingElement || i;
|
||||
return r[o]
|
||||
}
|
||||
return e[o]
|
||||
}
|
||||
|
||||
function f(e, t) {
|
||||
var o = 2 < arguments.length && void 0 !== arguments[2] && arguments[2],
|
||||
n = l(t, 'top'),
|
||||
i = l(t, 'left'),
|
||||
r = o ? -1 : 1;
|
||||
return e.top += n * r, e.bottom += n * r, e.left += i * r, e.right += i * r, e
|
||||
}
|
||||
|
||||
function m(e, t) {
|
||||
var o = 'x' === t ? 'Left' : 'Top',
|
||||
n = 'Left' == o ? 'Right' : 'Bottom';
|
||||
return parseFloat(e['border' + o + 'Width'], 10) + parseFloat(e['border' + n + 'Width'], 10)
|
||||
}
|
||||
|
||||
function h(e, t, o, n) {
|
||||
return $(t['offset' + e], t['scroll' + e], o['client' + e], o['offset' + e], o['scroll' + e], r(10) ? o['offset' + e] + n['margin' + ('Height' === e ? 'Top' : 'Left')] + n['margin' + ('Height' === e ? 'Bottom' : 'Right')] : 0)
|
||||
}
|
||||
|
||||
function c() {
|
||||
var e = document.body,
|
||||
t = document.documentElement,
|
||||
o = r(10) && getComputedStyle(t);
|
||||
return {
|
||||
height: h('Height', e, t, o),
|
||||
width: h('Width', e, t, o)
|
||||
}
|
||||
}
|
||||
|
||||
function g(e) {
|
||||
return le({}, e, {
|
||||
right: e.left + e.width,
|
||||
bottom: e.top + e.height
|
||||
})
|
||||
}
|
||||
|
||||
function u(e) {
|
||||
var o = {};
|
||||
try {
|
||||
if (r(10)) {
|
||||
o = e.getBoundingClientRect();
|
||||
var n = l(e, 'top'),
|
||||
i = l(e, 'left');
|
||||
o.top += n, o.left += i, o.bottom += n, o.right += i
|
||||
} else o = e.getBoundingClientRect()
|
||||
} catch (t) {}
|
||||
var p = {
|
||||
left: o.left,
|
||||
top: o.top,
|
||||
width: o.right - o.left,
|
||||
height: o.bottom - o.top
|
||||
},
|
||||
s = 'HTML' === e.nodeName ? c() : {},
|
||||
d = s.width || e.clientWidth || p.right - p.left,
|
||||
a = s.height || e.clientHeight || p.bottom - p.top,
|
||||
f = e.offsetWidth - d,
|
||||
h = e.offsetHeight - a;
|
||||
if (f || h) {
|
||||
var u = t(e);
|
||||
f -= m(u, 'x'), h -= m(u, 'y'), p.width -= f, p.height -= h
|
||||
}
|
||||
return g(p)
|
||||
}
|
||||
|
||||
function b(e, o) {
|
||||
var i = 2 < arguments.length && void 0 !== arguments[2] && arguments[2],
|
||||
p = r(10),
|
||||
s = 'HTML' === o.nodeName,
|
||||
d = u(e),
|
||||
a = u(o),
|
||||
l = n(e),
|
||||
m = t(o),
|
||||
h = parseFloat(m.borderTopWidth, 10),
|
||||
c = parseFloat(m.borderLeftWidth, 10);
|
||||
i && 'HTML' === o.nodeName && (a.top = $(a.top, 0), a.left = $(a.left, 0));
|
||||
var b = g({
|
||||
top: d.top - a.top - h,
|
||||
left: d.left - a.left - c,
|
||||
width: d.width,
|
||||
height: d.height
|
||||
});
|
||||
if (b.marginTop = 0, b.marginLeft = 0, !p && s) {
|
||||
var y = parseFloat(m.marginTop, 10),
|
||||
w = parseFloat(m.marginLeft, 10);
|
||||
b.top -= h - y, b.bottom -= h - y, b.left -= c - w, b.right -= c - w, b.marginTop = y, b.marginLeft = w
|
||||
}
|
||||
return (p && !i ? o.contains(l) : o === l && 'BODY' !== l.nodeName) && (b = f(b, o)), b
|
||||
}
|
||||
|
||||
function y(e) {
|
||||
var t = 1 < arguments.length && void 0 !== arguments[1] && arguments[1],
|
||||
o = e.ownerDocument.documentElement,
|
||||
n = b(e, o),
|
||||
i = $(o.clientWidth, window.innerWidth || 0),
|
||||
r = $(o.clientHeight, window.innerHeight || 0),
|
||||
p = t ? 0 : l(o),
|
||||
s = t ? 0 : l(o, 'left'),
|
||||
d = {
|
||||
top: p - n.top + n.marginTop,
|
||||
left: s - n.left + n.marginLeft,
|
||||
width: i,
|
||||
height: r
|
||||
};
|
||||
return g(d)
|
||||
}
|
||||
|
||||
function w(e) {
|
||||
var n = e.nodeName;
|
||||
return 'BODY' === n || 'HTML' === n ? !1 : 'fixed' === t(e, 'position') || w(o(e))
|
||||
}
|
||||
|
||||
function E(e) {
|
||||
if (!e || !e.parentElement || r()) return document.documentElement;
|
||||
for (var o = e.parentElement; o && 'none' === t(o, 'transform');) o = o.parentElement;
|
||||
return o || document.documentElement
|
||||
}
|
||||
|
||||
function v(e, t, i, r) {
|
||||
var p = 4 < arguments.length && void 0 !== arguments[4] && arguments[4],
|
||||
s = {
|
||||
top: 0,
|
||||
left: 0
|
||||
},
|
||||
d = p ? E(e) : a(e, t);
|
||||
if ('viewport' === r) s = y(d, p);
|
||||
else {
|
||||
var l;
|
||||
'scrollParent' === r ? (l = n(o(t)), 'BODY' === l.nodeName && (l = e.ownerDocument.documentElement)) : 'window' === r ? l = e.ownerDocument.documentElement : l = r;
|
||||
var f = b(l, d, p);
|
||||
if ('HTML' === l.nodeName && !w(d)) {
|
||||
var m = c(),
|
||||
h = m.height,
|
||||
g = m.width;
|
||||
s.top += f.top - f.marginTop, s.bottom = h + f.top, s.left += f.left - f.marginLeft, s.right = g + f.left
|
||||
} else s = f
|
||||
}
|
||||
return s.left += i, s.top += i, s.right -= i, s.bottom -= i, s
|
||||
}
|
||||
|
||||
function x(e) {
|
||||
var t = e.width,
|
||||
o = e.height;
|
||||
return t * o
|
||||
}
|
||||
|
||||
function O(e, t, o, n, i) {
|
||||
var r = 5 < arguments.length && void 0 !== arguments[5] ? arguments[5] : 0;
|
||||
if (-1 === e.indexOf('auto')) return e;
|
||||
var p = v(o, n, r, i),
|
||||
s = {
|
||||
top: {
|
||||
width: p.width,
|
||||
height: t.top - p.top
|
||||
},
|
||||
right: {
|
||||
width: p.right - t.right,
|
||||
height: p.height
|
||||
},
|
||||
bottom: {
|
||||
width: p.width,
|
||||
height: p.bottom - t.bottom
|
||||
},
|
||||
left: {
|
||||
width: t.left - p.left,
|
||||
height: p.height
|
||||
}
|
||||
},
|
||||
d = Object.keys(s).map(function(e) {
|
||||
return le({
|
||||
key: e
|
||||
}, s[e], {
|
||||
area: x(s[e])
|
||||
})
|
||||
}).sort(function(e, t) {
|
||||
return t.area - e.area
|
||||
}),
|
||||
a = d.filter(function(e) {
|
||||
var t = e.width,
|
||||
n = e.height;
|
||||
return t >= o.clientWidth && n >= o.clientHeight
|
||||
}),
|
||||
l = 0 < a.length ? a[0].key : d[0].key,
|
||||
f = e.split('-')[1];
|
||||
return l + (f ? '-' + f : '')
|
||||
}
|
||||
|
||||
function L(e, t, o) {
|
||||
var n = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null,
|
||||
i = n ? E(t) : a(t, o);
|
||||
return b(o, i, n)
|
||||
}
|
||||
|
||||
function S(e) {
|
||||
var t = getComputedStyle(e),
|
||||
o = parseFloat(t.marginTop) + parseFloat(t.marginBottom),
|
||||
n = parseFloat(t.marginLeft) + parseFloat(t.marginRight),
|
||||
i = {
|
||||
width: e.offsetWidth + n,
|
||||
height: e.offsetHeight + o
|
||||
};
|
||||
return i
|
||||
}
|
||||
|
||||
function T(e) {
|
||||
var t = {
|
||||
left: 'right',
|
||||
right: 'left',
|
||||
bottom: 'top',
|
||||
top: 'bottom'
|
||||
};
|
||||
return e.replace(/left|right|bottom|top/g, function(e) {
|
||||
return t[e]
|
||||
})
|
||||
}
|
||||
|
||||
function C(e, t, o) {
|
||||
o = o.split('-')[0];
|
||||
var n = S(e),
|
||||
i = {
|
||||
width: n.width,
|
||||
height: n.height
|
||||
},
|
||||
r = -1 !== ['right', 'left'].indexOf(o),
|
||||
p = r ? 'top' : 'left',
|
||||
s = r ? 'left' : 'top',
|
||||
d = r ? 'height' : 'width',
|
||||
a = r ? 'width' : 'height';
|
||||
return i[p] = t[p] + t[d] / 2 - n[d] / 2, i[s] = o === s ? t[s] - n[a] : t[T(s)], i
|
||||
}
|
||||
|
||||
function D(e, t) {
|
||||
return Array.prototype.find ? e.find(t) : e.filter(t)[0]
|
||||
}
|
||||
|
||||
function N(e, t, o) {
|
||||
if (Array.prototype.findIndex) return e.findIndex(function(e) {
|
||||
return e[t] === o
|
||||
});
|
||||
var n = D(e, function(e) {
|
||||
return e[t] === o
|
||||
});
|
||||
return e.indexOf(n)
|
||||
}
|
||||
|
||||
function P(t, o, n) {
|
||||
var i = void 0 === n ? t : t.slice(0, N(t, 'name', n));
|
||||
return i.forEach(function(t) {
|
||||
t['function'] && console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
|
||||
var n = t['function'] || t.fn;
|
||||
t.enabled && e(n) && (o.offsets.popper = g(o.offsets.popper), o.offsets.reference = g(o.offsets.reference), o = n(o, t))
|
||||
}), o
|
||||
}
|
||||
|
||||
function k() {
|
||||
if (!this.state.isDestroyed) {
|
||||
var e = {
|
||||
instance: this,
|
||||
styles: {},
|
||||
arrowStyles: {},
|
||||
attributes: {},
|
||||
flipped: !1,
|
||||
offsets: {}
|
||||
};
|
||||
e.offsets.reference = L(this.state, this.popper, this.reference, this.options.positionFixed), e.placement = O(this.options.placement, e.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding), e.originalPlacement = e.placement, e.positionFixed = this.options.positionFixed, e.offsets.popper = C(this.popper, e.offsets.reference, e.placement), e.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute', e = P(this.modifiers, e), this.state.isCreated ? this.options.onUpdate(e) : (this.state.isCreated = !0, this.options.onCreate(e))
|
||||
}
|
||||
}
|
||||
|
||||
function W(e, t) {
|
||||
return e.some(function(e) {
|
||||
var o = e.name,
|
||||
n = e.enabled;
|
||||
return n && o === t
|
||||
})
|
||||
}
|
||||
|
||||
function B(e) {
|
||||
for (var t = [!1, 'ms', 'Webkit', 'Moz', 'O'], o = e.charAt(0).toUpperCase() + e.slice(1), n = 0; n < t.length; n++) {
|
||||
var i = t[n],
|
||||
r = i ? '' + i + o : e;
|
||||
if ('undefined' != typeof document.body.style[r]) return r
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
function H() {
|
||||
return this.state.isDestroyed = !0, W(this.modifiers, 'applyStyle') && (this.popper.removeAttribute('x-placement'), this.popper.style.position = '', this.popper.style.top = '', this.popper.style.left = '', this.popper.style.right = '', this.popper.style.bottom = '', this.popper.style.willChange = '', this.popper.style[B('transform')] = ''), this.disableEventListeners(), this.options.removeOnDestroy && this.popper.parentNode.removeChild(this.popper), this
|
||||
}
|
||||
|
||||
function A(e) {
|
||||
var t = e.ownerDocument;
|
||||
return t ? t.defaultView : window
|
||||
}
|
||||
|
||||
function M(e, t, o, i) {
|
||||
var r = 'BODY' === e.nodeName,
|
||||
p = r ? e.ownerDocument.defaultView : e;
|
||||
p.addEventListener(t, o, {
|
||||
passive: !0
|
||||
}), r || M(n(p.parentNode), t, o, i), i.push(p)
|
||||
}
|
||||
|
||||
function I(e, t, o, i) {
|
||||
o.updateBound = i, A(e).addEventListener('resize', o.updateBound, {
|
||||
passive: !0
|
||||
});
|
||||
var r = n(e);
|
||||
return M(r, 'scroll', o.updateBound, o.scrollParents), o.scrollElement = r, o.eventsEnabled = !0, o
|
||||
}
|
||||
|
||||
function F() {
|
||||
this.state.eventsEnabled || (this.state = I(this.reference, this.options, this.state, this.scheduleUpdate))
|
||||
}
|
||||
|
||||
function R(e, t) {
|
||||
return A(e).removeEventListener('resize', t.updateBound), t.scrollParents.forEach(function(e) {
|
||||
e.removeEventListener('scroll', t.updateBound)
|
||||
}), t.updateBound = null, t.scrollParents = [], t.scrollElement = null, t.eventsEnabled = !1, t
|
||||
}
|
||||
|
||||
function U() {
|
||||
this.state.eventsEnabled && (cancelAnimationFrame(this.scheduleUpdate), this.state = R(this.reference, this.state))
|
||||
}
|
||||
|
||||
function Y(e) {
|
||||
return '' !== e && !isNaN(parseFloat(e)) && isFinite(e)
|
||||
}
|
||||
|
||||
function j(e, t) {
|
||||
Object.keys(t).forEach(function(o) {
|
||||
var n = ''; - 1 !== ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(o) && Y(t[o]) && (n = 'px'), e.style[o] = t[o] + n
|
||||
})
|
||||
}
|
||||
|
||||
function K(e, t) {
|
||||
Object.keys(t).forEach(function(o) {
|
||||
var n = t[o];
|
||||
!1 === n ? e.removeAttribute(o) : e.setAttribute(o, t[o])
|
||||
})
|
||||
}
|
||||
|
||||
function q(e, t, o) {
|
||||
var n = D(e, function(e) {
|
||||
var o = e.name;
|
||||
return o === t
|
||||
}),
|
||||
i = !!n && e.some(function(e) {
|
||||
return e.name === o && e.enabled && e.order < n.order
|
||||
});
|
||||
if (!i) {
|
||||
var r = '`' + t + '`';
|
||||
console.warn('`' + o + '`' + ' modifier is required by ' + r + ' modifier in order to work, be sure to include it before ' + r + '!')
|
||||
}
|
||||
return i
|
||||
}
|
||||
|
||||
function G(e) {
|
||||
return 'end' === e ? 'start' : 'start' === e ? 'end' : e
|
||||
}
|
||||
|
||||
function z(e) {
|
||||
var t = 1 < arguments.length && void 0 !== arguments[1] && arguments[1],
|
||||
o = me.indexOf(e),
|
||||
n = me.slice(o + 1).concat(me.slice(0, o));
|
||||
return t ? n.reverse() : n
|
||||
}
|
||||
|
||||
function V(e, t, o, n) {
|
||||
var i = e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),
|
||||
r = +i[1],
|
||||
p = i[2];
|
||||
if (!r) return e;
|
||||
if (0 === p.indexOf('%')) {
|
||||
var s;
|
||||
switch (p) {
|
||||
case '%p':
|
||||
s = o;
|
||||
break;
|
||||
case '%':
|
||||
case '%r':
|
||||
default:
|
||||
s = n;
|
||||
}
|
||||
var d = g(s);
|
||||
return d[t] / 100 * r
|
||||
}
|
||||
if ('vh' === p || 'vw' === p) {
|
||||
var a;
|
||||
return a = 'vh' === p ? $(document.documentElement.clientHeight, window.innerHeight || 0) : $(document.documentElement.clientWidth, window.innerWidth || 0), a / 100 * r
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
function _(e, t, o, n) {
|
||||
var i = [0, 0],
|
||||
r = -1 !== ['right', 'left'].indexOf(n),
|
||||
p = e.split(/(\+|\-)/).map(function(e) {
|
||||
return e.trim()
|
||||
}),
|
||||
s = p.indexOf(D(p, function(e) {
|
||||
return -1 !== e.search(/,|\s/)
|
||||
}));
|
||||
p[s] && -1 === p[s].indexOf(',') && console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
|
||||
var d = /\s*,\s*|\s+/,
|
||||
a = -1 === s ? [p] : [p.slice(0, s).concat([p[s].split(d)[0]]), [p[s].split(d)[1]].concat(p.slice(s + 1))];
|
||||
return a = a.map(function(e, n) {
|
||||
var i = (1 === n ? !r : r) ? 'height' : 'width',
|
||||
p = !1;
|
||||
return e.reduce(function(e, t) {
|
||||
return '' === e[e.length - 1] && -1 !== ['+', '-'].indexOf(t) ? (e[e.length - 1] = t, p = !0, e) : p ? (e[e.length - 1] += t, p = !1, e) : e.concat(t)
|
||||
}, []).map(function(e) {
|
||||
return V(e, i, t, o)
|
||||
})
|
||||
}), a.forEach(function(e, t) {
|
||||
e.forEach(function(o, n) {
|
||||
Y(o) && (i[t] += o * ('-' === e[n - 1] ? -1 : 1))
|
||||
})
|
||||
}), i
|
||||
}
|
||||
|
||||
function X(e, t) {
|
||||
var o, n = t.offset,
|
||||
i = e.placement,
|
||||
r = e.offsets,
|
||||
p = r.popper,
|
||||
s = r.reference,
|
||||
d = i.split('-')[0];
|
||||
return o = Y(+n) ? [+n, 0] : _(n, p, s, d), 'left' === d ? (p.top += o[0], p.left -= o[1]) : 'right' === d ? (p.top += o[0], p.left += o[1]) : 'top' === d ? (p.left += o[0], p.top -= o[1]) : 'bottom' === d && (p.left += o[0], p.top += o[1]), e.popper = p, e
|
||||
}
|
||||
for (var J = Math.min, Q = Math.round, Z = Math.floor, $ = Math.max, ee = 'undefined' != typeof window && 'undefined' != typeof document, te = ['Edge', 'Trident', 'Firefox'], oe = 0, ne = 0; ne < te.length; ne += 1)
|
||||
if (ee && 0 <= navigator.userAgent.indexOf(te[ne])) {
|
||||
oe = 1;
|
||||
break
|
||||
}
|
||||
var i = ee && window.Promise,
|
||||
ie = i ? function(e) {
|
||||
var t = !1;
|
||||
return function() {
|
||||
t || (t = !0, window.Promise.resolve().then(function() {
|
||||
t = !1, e()
|
||||
}))
|
||||
}
|
||||
} : function(e) {
|
||||
var t = !1;
|
||||
return function() {
|
||||
t || (t = !0, setTimeout(function() {
|
||||
t = !1, e()
|
||||
}, oe))
|
||||
}
|
||||
},
|
||||
re = ee && !!(window.MSInputMethodContext && document.documentMode),
|
||||
pe = ee && /MSIE 10/.test(navigator.userAgent),
|
||||
se = function(e, t) {
|
||||
if (!(e instanceof t)) throw new TypeError('Cannot call a class as a function')
|
||||
},
|
||||
de = function() {
|
||||
function e(e, t) {
|
||||
for (var o, n = 0; n < t.length; n++) o = t[n], o.enumerable = o.enumerable || !1, o.configurable = !0, 'value' in o && (o.writable = !0), Object.defineProperty(e, o.key, o)
|
||||
}
|
||||
return function(t, o, n) {
|
||||
return o && e(t.prototype, o), n && e(t, n), t
|
||||
}
|
||||
}(),
|
||||
ae = function(e, t, o) {
|
||||
return t in e ? Object.defineProperty(e, t, {
|
||||
value: o,
|
||||
enumerable: !0,
|
||||
configurable: !0,
|
||||
writable: !0
|
||||
}) : e[t] = o, e
|
||||
},
|
||||
le = Object.assign || function(e) {
|
||||
for (var t, o = 1; o < arguments.length; o++)
|
||||
for (var n in t = arguments[o], t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
||||
return e
|
||||
},
|
||||
fe = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'],
|
||||
me = fe.slice(3),
|
||||
he = {
|
||||
FLIP: 'flip',
|
||||
CLOCKWISE: 'clockwise',
|
||||
COUNTERCLOCKWISE: 'counterclockwise'
|
||||
},
|
||||
ce = function() {
|
||||
function t(o, n) {
|
||||
var i = this,
|
||||
r = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {};
|
||||
se(this, t), this.scheduleUpdate = function() {
|
||||
return requestAnimationFrame(i.update)
|
||||
}, this.update = ie(this.update.bind(this)), this.options = le({}, t.Defaults, r), this.state = {
|
||||
isDestroyed: !1,
|
||||
isCreated: !1,
|
||||
scrollParents: []
|
||||
}, this.reference = o && o.jquery ? o[0] : o, this.popper = n && n.jquery ? n[0] : n, this.options.modifiers = {}, Object.keys(le({}, t.Defaults.modifiers, r.modifiers)).forEach(function(e) {
|
||||
i.options.modifiers[e] = le({}, t.Defaults.modifiers[e] || {}, r.modifiers ? r.modifiers[e] : {})
|
||||
}), this.modifiers = Object.keys(this.options.modifiers).map(function(e) {
|
||||
return le({
|
||||
name: e
|
||||
}, i.options.modifiers[e])
|
||||
}).sort(function(e, t) {
|
||||
return e.order - t.order
|
||||
}), this.modifiers.forEach(function(t) {
|
||||
t.enabled && e(t.onLoad) && t.onLoad(i.reference, i.popper, i.options, t, i.state)
|
||||
}), this.update();
|
||||
var p = this.options.eventsEnabled;
|
||||
p && this.enableEventListeners(), this.state.eventsEnabled = p
|
||||
}
|
||||
return de(t, [{
|
||||
key: 'update',
|
||||
value: function() {
|
||||
return k.call(this)
|
||||
}
|
||||
}, {
|
||||
key: 'destroy',
|
||||
value: function() {
|
||||
return H.call(this)
|
||||
}
|
||||
}, {
|
||||
key: 'enableEventListeners',
|
||||
value: function() {
|
||||
return F.call(this)
|
||||
}
|
||||
}, {
|
||||
key: 'disableEventListeners',
|
||||
value: function() {
|
||||
return U.call(this)
|
||||
}
|
||||
}]), t
|
||||
}();
|
||||
return ce.Utils = ('undefined' == typeof window ? global : window).PopperUtils, ce.placements = fe, ce.Defaults = {
|
||||
placement: 'bottom',
|
||||
positionFixed: !1,
|
||||
eventsEnabled: !0,
|
||||
removeOnDestroy: !1,
|
||||
onCreate: function() {},
|
||||
onUpdate: function() {},
|
||||
modifiers: {
|
||||
shift: {
|
||||
order: 100,
|
||||
enabled: !0,
|
||||
fn: function(e) {
|
||||
var t = e.placement,
|
||||
o = t.split('-')[0],
|
||||
n = t.split('-')[1];
|
||||
if (n) {
|
||||
var i = e.offsets,
|
||||
r = i.reference,
|
||||
p = i.popper,
|
||||
s = -1 !== ['bottom', 'top'].indexOf(o),
|
||||
d = s ? 'left' : 'top',
|
||||
a = s ? 'width' : 'height',
|
||||
l = {
|
||||
start: ae({}, d, r[d]),
|
||||
end: ae({}, d, r[d] + r[a] - p[a])
|
||||
};
|
||||
e.offsets.popper = le({}, p, l[n])
|
||||
}
|
||||
return e
|
||||
}
|
||||
},
|
||||
offset: {
|
||||
order: 200,
|
||||
enabled: !0,
|
||||
fn: X,
|
||||
offset: 0
|
||||
},
|
||||
preventOverflow: {
|
||||
order: 300,
|
||||
enabled: !0,
|
||||
fn: function(e, t) {
|
||||
var o = t.boundariesElement || p(e.instance.popper);
|
||||
e.instance.reference === o && (o = p(o));
|
||||
var n = B('transform'),
|
||||
i = e.instance.popper.style,
|
||||
r = i.top,
|
||||
s = i.left,
|
||||
d = i[n];
|
||||
i.top = '', i.left = '', i[n] = '';
|
||||
var a = v(e.instance.popper, e.instance.reference, t.padding, o, e.positionFixed);
|
||||
i.top = r, i.left = s, i[n] = d, t.boundaries = a;
|
||||
var l = t.priority,
|
||||
f = e.offsets.popper,
|
||||
m = {
|
||||
primary: function(e) {
|
||||
var o = f[e];
|
||||
return f[e] < a[e] && !t.escapeWithReference && (o = $(f[e], a[e])), ae({}, e, o)
|
||||
},
|
||||
secondary: function(e) {
|
||||
var o = 'right' === e ? 'left' : 'top',
|
||||
n = f[o];
|
||||
return f[e] > a[e] && !t.escapeWithReference && (n = J(f[o], a[e] - ('right' === e ? f.width : f.height))), ae({}, o, n)
|
||||
}
|
||||
};
|
||||
return l.forEach(function(e) {
|
||||
var t = -1 === ['left', 'top'].indexOf(e) ? 'secondary' : 'primary';
|
||||
f = le({}, f, m[t](e))
|
||||
}), e.offsets.popper = f, e
|
||||
},
|
||||
priority: ['left', 'right', 'top', 'bottom'],
|
||||
padding: 5,
|
||||
boundariesElement: 'scrollParent'
|
||||
},
|
||||
keepTogether: {
|
||||
order: 400,
|
||||
enabled: !0,
|
||||
fn: function(e) {
|
||||
var t = e.offsets,
|
||||
o = t.popper,
|
||||
n = t.reference,
|
||||
i = e.placement.split('-')[0],
|
||||
r = Z,
|
||||
p = -1 !== ['top', 'bottom'].indexOf(i),
|
||||
s = p ? 'right' : 'bottom',
|
||||
d = p ? 'left' : 'top',
|
||||
a = p ? 'width' : 'height';
|
||||
return o[s] < r(n[d]) && (e.offsets.popper[d] = r(n[d]) - o[a]), o[d] > r(n[s]) && (e.offsets.popper[d] = r(n[s])), e
|
||||
}
|
||||
},
|
||||
arrow: {
|
||||
order: 500,
|
||||
enabled: !0,
|
||||
fn: function(e, o) {
|
||||
var n;
|
||||
if (!q(e.instance.modifiers, 'arrow', 'keepTogether')) return e;
|
||||
var i = o.element;
|
||||
if ('string' == typeof i) {
|
||||
if (i = e.instance.popper.querySelector(i), !i) return e;
|
||||
} else if (!e.instance.popper.contains(i)) return console.warn('WARNING: `arrow.element` must be child of its popper element!'), e;
|
||||
var r = e.placement.split('-')[0],
|
||||
p = e.offsets,
|
||||
s = p.popper,
|
||||
d = p.reference,
|
||||
a = -1 !== ['left', 'right'].indexOf(r),
|
||||
l = a ? 'height' : 'width',
|
||||
f = a ? 'Top' : 'Left',
|
||||
m = f.toLowerCase(),
|
||||
h = a ? 'left' : 'top',
|
||||
c = a ? 'bottom' : 'right',
|
||||
u = S(i)[l];
|
||||
d[c] - u < s[m] && (e.offsets.popper[m] -= s[m] - (d[c] - u)), d[m] + u > s[c] && (e.offsets.popper[m] += d[m] + u - s[c]), e.offsets.popper = g(e.offsets.popper);
|
||||
var b = d[m] + d[l] / 2 - u / 2,
|
||||
y = t(e.instance.popper),
|
||||
w = parseFloat(y['margin' + f], 10),
|
||||
E = parseFloat(y['border' + f + 'Width'], 10),
|
||||
v = b - e.offsets.popper[m] - w - E;
|
||||
return v = $(J(s[l] - u, v), 0), e.arrowElement = i, e.offsets.arrow = (n = {}, ae(n, m, Q(v)), ae(n, h, ''), n), e
|
||||
},
|
||||
element: '[x-arrow]'
|
||||
},
|
||||
flip: {
|
||||
order: 600,
|
||||
enabled: !0,
|
||||
fn: function(e, t) {
|
||||
if (W(e.instance.modifiers, 'inner')) return e;
|
||||
if (e.flipped && e.placement === e.originalPlacement) return e;
|
||||
var o = v(e.instance.popper, e.instance.reference, t.padding, t.boundariesElement, e.positionFixed),
|
||||
n = e.placement.split('-')[0],
|
||||
i = T(n),
|
||||
r = e.placement.split('-')[1] || '',
|
||||
p = [];
|
||||
switch (t.behavior) {
|
||||
case he.FLIP:
|
||||
p = [n, i];
|
||||
break;
|
||||
case he.CLOCKWISE:
|
||||
p = z(n);
|
||||
break;
|
||||
case he.COUNTERCLOCKWISE:
|
||||
p = z(n, !0);
|
||||
break;
|
||||
default:
|
||||
p = t.behavior;
|
||||
}
|
||||
return p.forEach(function(s, d) {
|
||||
if (n !== s || p.length === d + 1) return e;
|
||||
n = e.placement.split('-')[0], i = T(n);
|
||||
var a = e.offsets.popper,
|
||||
l = e.offsets.reference,
|
||||
f = Z,
|
||||
m = 'left' === n && f(a.right) > f(l.left) || 'right' === n && f(a.left) < f(l.right) || 'top' === n && f(a.bottom) > f(l.top) || 'bottom' === n && f(a.top) < f(l.bottom),
|
||||
h = f(a.left) < f(o.left),
|
||||
c = f(a.right) > f(o.right),
|
||||
g = f(a.top) < f(o.top),
|
||||
u = f(a.bottom) > f(o.bottom),
|
||||
b = 'left' === n && h || 'right' === n && c || 'top' === n && g || 'bottom' === n && u,
|
||||
y = -1 !== ['top', 'bottom'].indexOf(n),
|
||||
w = !!t.flipVariations && (y && 'start' === r && h || y && 'end' === r && c || !y && 'start' === r && g || !y && 'end' === r && u);
|
||||
(m || b || w) && (e.flipped = !0, (m || b) && (n = p[d + 1]), w && (r = G(r)), e.placement = n + (r ? '-' + r : ''), e.offsets.popper = le({}, e.offsets.popper, C(e.instance.popper, e.offsets.reference, e.placement)), e = P(e.instance.modifiers, e, 'flip'))
|
||||
}), e
|
||||
},
|
||||
behavior: 'flip',
|
||||
padding: 5,
|
||||
boundariesElement: 'viewport'
|
||||
},
|
||||
inner: {
|
||||
order: 700,
|
||||
enabled: !1,
|
||||
fn: function(e) {
|
||||
var t = e.placement,
|
||||
o = t.split('-')[0],
|
||||
n = e.offsets,
|
||||
i = n.popper,
|
||||
r = n.reference,
|
||||
p = -1 !== ['left', 'right'].indexOf(o),
|
||||
s = -1 === ['top', 'left'].indexOf(o);
|
||||
return i[p ? 'left' : 'top'] = r[o] - (s ? i[p ? 'width' : 'height'] : 0), e.placement = T(t), e.offsets.popper = g(i), e
|
||||
}
|
||||
},
|
||||
hide: {
|
||||
order: 800,
|
||||
enabled: !0,
|
||||
fn: function(e) {
|
||||
if (!q(e.instance.modifiers, 'hide', 'preventOverflow')) return e;
|
||||
var t = e.offsets.reference,
|
||||
o = D(e.instance.modifiers, function(e) {
|
||||
return 'preventOverflow' === e.name
|
||||
}).boundaries;
|
||||
if (t.bottom < o.top || t.left > o.right || t.top > o.bottom || t.right < o.left) {
|
||||
if (!0 === e.hide) return e;
|
||||
e.hide = !0, e.attributes['x-out-of-boundaries'] = ''
|
||||
} else {
|
||||
if (!1 === e.hide) return e;
|
||||
e.hide = !1, e.attributes['x-out-of-boundaries'] = !1
|
||||
}
|
||||
return e
|
||||
}
|
||||
},
|
||||
computeStyle: {
|
||||
order: 850,
|
||||
enabled: !0,
|
||||
fn: function(e, t) {
|
||||
var o = t.x,
|
||||
n = t.y,
|
||||
i = e.offsets.popper,
|
||||
r = D(e.instance.modifiers, function(e) {
|
||||
return 'applyStyle' === e.name
|
||||
}).gpuAcceleration;
|
||||
void 0 !== r && console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
|
||||
var s, d, a = void 0 === r ? t.gpuAcceleration : r,
|
||||
l = p(e.instance.popper),
|
||||
f = u(l),
|
||||
m = {
|
||||
position: i.position
|
||||
},
|
||||
h = {
|
||||
left: Z(i.left),
|
||||
top: Q(i.top),
|
||||
bottom: Q(i.bottom),
|
||||
right: Z(i.right)
|
||||
},
|
||||
c = 'bottom' === o ? 'top' : 'bottom',
|
||||
g = 'right' === n ? 'left' : 'right',
|
||||
b = B('transform');
|
||||
if (d = 'bottom' == c ? -f.height + h.bottom : h.top, s = 'right' == g ? -f.width + h.right : h.left, a && b) m[b] = 'translate3d(' + s + 'px, ' + d + 'px, 0)', m[c] = 0, m[g] = 0, m.willChange = 'transform';
|
||||
else {
|
||||
var y = 'bottom' == c ? -1 : 1,
|
||||
w = 'right' == g ? -1 : 1;
|
||||
m[c] = d * y, m[g] = s * w, m.willChange = c + ', ' + g
|
||||
}
|
||||
var E = {
|
||||
"x-placement": e.placement
|
||||
};
|
||||
return e.attributes = le({}, E, e.attributes), e.styles = le({}, m, e.styles), e.arrowStyles = le({}, e.offsets.arrow, e.arrowStyles), e
|
||||
},
|
||||
gpuAcceleration: !0,
|
||||
x: 'bottom',
|
||||
y: 'right'
|
||||
},
|
||||
applyStyle: {
|
||||
order: 900,
|
||||
enabled: !0,
|
||||
fn: function(e) {
|
||||
return j(e.instance.popper, e.styles), K(e.instance.popper, e.attributes), e.arrowElement && Object.keys(e.arrowStyles).length && j(e.arrowElement, e.arrowStyles), e
|
||||
},
|
||||
onLoad: function(e, t, o, n, i) {
|
||||
var r = L(i, t, e, o.positionFixed),
|
||||
p = O(o.placement, r, t, e, o.modifiers.flip.boundariesElement, o.modifiers.flip.padding);
|
||||
return t.setAttribute('x-placement', p), j(t, {
|
||||
position: o.positionFixed ? 'fixed' : 'absolute'
|
||||
}), o
|
||||
},
|
||||
gpuAcceleration: void 0
|
||||
}
|
||||
}
|
||||
}, ce
|
||||
});
|
||||
Reference in New Issue
Block a user