vendor: 4,579 bytes, lines 1-4
1/* Modernizr (Custom Build) | MIT & BSD 2 * Build: http://modernizr.com/download/#-csstransforms3d-csstransitions-touch-shiv-load-cssclasses-prefixed-teststyles-testprops-testallprops-prefixes-domprefixes-mq-respond 3 */ 4;window.Modernizr=function(e,t,n){function C(e){f.cssText=e}function k(e,t){return C(h.join(e+";")+(t||""))}function L(e,t){return typeof e===t}function A(e,t){return!!~(""+e).indexOf(t)}function O(e,t){for(var r in e){var i=e[r];if(!A(i,"-")&&f[i]!==n)return t=="pfx"?i:!0}return!1}function M(e,t,r){for(var i in e){var s=t[e[i]];if(s!==n)return r===!1?e[i]:L(s,"function")?s.bind(r||t):s}return!1}function _(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+d.join(r+" ")+r).split(" ");return L(t,"string")||L(t,"undefined")?O(i,t):(i=(e+" "+v.join(r+" ")+r).split(" "),M(i,t,n))}var r="2.8.3",i={},s=!0,o=t.documentElement,u="modernizr",a=t.createElement(u),f=a.style,l,c={}.toString,h=" -webkit- -moz- -o- -ms- ".split(" "),p="Webkit Moz O ms",d=p.split(" "),v=p.toLowerCase().split(" "),m={},g={},y={},b=[],w=b.slice,E,S=function(e,n,r,i){var s,a,f,l,c=t.createElement("div"),h=t.body,p=h||t.createElement("body");if(parseInt(r,10))while(r--)f=t.createElement("div"),f.id=i?i[r]:u+(r+1),c.appendChild(f);return s=["­",'<style id="s',u,'">',e,"</style>"].join(""),c.id=u,(h?c:p).innerHTML+=s,p.appendChild(c),h||(p.style.background="",p.style.overflow="hidden",l=o.style.overflow,o.style.overflow="hidden",o.appendChild(p)),a=n(c,e),h?c.parentNode.removeChild(c):(p.parentNode.removeChild(p),o.style.overflow=l),!!a},x=function(t){var n=e.matchMedia||e.msMatchMedia;if(n)return n(t)&&n(t).matches||!1;var r;return S("@media "+t+" { #"+u+" { position: absolute; } }",function(t){r=(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle)["position"]=="absolute"}),r},T={}.hasOwnProperty,N;!L(T,"undefined")&&!L(T.call,"undefined")?N=function(e,t){return T.call(e,t)}:N=function(e,t){return t in e&&L(e.constructor.prototype[t],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError;var r=w.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,o=n.apply(s,r.concat(w.call(arguments)));return Object(o)===o?o:s}return n.apply(t,r.concat(w.call(arguments)))};return i}),m.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:S(["@media (",h.join("touch-enabled),("),u,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(e){n=e.offsetTop===9}),n},m.csstransforms3d=function(){var e=!!_("perspective");return e&&"webkitPerspective"in o.style&&S("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t,n){e=t.offsetLeft===9&&t.offsetHeight===3}),e},m.csstransitions=function(){return _("transition")};for(var D in m)N(m,D)&&(E=D.toLowerCase(),i[E]=m[D](),b.push((i[E]?"":"no-")+E));return i.addTest=function(e,t){if(typeof e=="object")for(var r in e)N(e,r)&&i.addTest(r,e[r]);else{e=e.toLowerCase();if(i[e]!==n)return i;t=typeof t=="function"?t():t,typeof s!="undefined"&&s&&(o.className+=" "+(t?"":"no-")+e),i[e]=t}return i},C(""),a=l=null,function(e,t){function c(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function h(){var e=y.elements;return typeof e=="string"?e.split(" "):e}function p(e){var t=f[e[u]];return t||(t={},a++,e[u]=a,f[a]=t),t}function d(e,n,r){n||(n=t);if(l)return n.createElement(e);r||(r=p(n));var o;return r.cache[e]?o=r.cache[e].cloneNode():s.test(e)?o=(r.cache[e]=r.createElem(e)).cloneNode():o=r.createElem(e),o.canHaveChildren&&!i.test(e)&&!o.tagUrn?r.frag.appendChild(o):o}function v(e,n){e||(e=t);if(l)return e.createDocumentFragment();n=n||p(e);var r=n.frag.cloneNode(),i=0,s=h(),o=s.length;for(;i<o;i++)r.createElement(s[i]);return r}function m(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return y.shivMethods?d(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/[\w\-]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(y,t.frag)}function g(e){e||(e=t);var n=p(e);return y.shivCSS&&!o&&!n.hasCSS&&(n.hasCSS=!!c(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{dis
vendor: 4,200 bytes, line 4
4play:block}mark{background:#FF0;color:#000}template{display:none}")),l||m(e,n),e}var n="3.7.0",r=e.html5||{},i=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,s=/^(?: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,o,u="_html5shiv",a=0,f={},l;(function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",o="hidden"in e,l=e.childNodes.length==1||function(){t.createElement("a");var e=t.createDocumentFragment();return typeof e.cloneNode=="undefined"||typeof e.createDocumentFragment=="undefined"||typeof e.createElement=="undefined"}()}catch(n){o=!0,l=!0}})();var y={elements:r.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:n,shivCSS:r.shivCSS!==!1,supportsUnknownElements:l,shivMethods:r.shivMethods!==!1,type:"default",shivDocument:g,createElement:d,createDocumentFragment:v};e.html5=y,g(t)}(this,t),i._version=r,i._prefixes=h,i._domPrefixes=v,i._cssomPrefixes=d,i.mq=x,i.testProp=function(e){return O([e])},i.testAllProps=_,i.testStyles=S,i.prefixed=function(e,t,n){return t?_(e,t,n):_(e,"pfx")},o.className=o.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(s?" js "+b.join(" "):""),i}(this,this.document),function(e,t,n){function r(e){return"[object Function]"==d.call(e)}function i(e){return"string"==typeof e}function s(){}function o(e){return!e||"loaded"==e||"complete"==e||"uninitialized"==e}function u(){var e=v.shift();m=1,e?e.t?h(function(){("c"==e.t?k.injectCss:k.injectJs)(e.s,0,e.a,e.x,e.e,1)},0):(e(),u()):m=0}function a(e,n,r,i,s,a,f){function l(t){if(!d&&o(c.readyState)&&(w.r=d=1,!m&&u(),c.onload=c.onreadystatechange=null,t)){"img"!=e&&h(function(){b.removeChild(c)},50);for(var r in T[n])T[n].hasOwnProperty(r)&&T[n][r].onload()}}var f=f||k.errorTimeout,c=t.createElement(e),d=0,g=0,w={t:r,s:n,e:s,a:a,x:f};1===T[n]&&(g=1,T[n]=[]),"object"==e?c.data=n:(c.src=n,c.type=e),c.width=c.height="0",c.onerror=c.onload=c.onreadystatechange=function(){l.call(this,g)},v.splice(i,0,w),"img"!=e&&(g||2===T[n]?(b.insertBefore(c,y?null:p),h(l,f)):T[n].push(c))}function f(e,t,n,r,s){return m=0,t=t||"j",i(e)?a("c"==t?E:w,e,t,this.i++,n,r,s):(v.splice(this.i++,0,e),1==v.length&&u()),this}function l(){var e=k;return e.loader={load:f,i:0},e}var c=t.documentElement,h=e.setTimeout,p=t.getElementsByTagName("script")[0],d={}.toString,v=[],m=0,g="MozAppearance"in c.style,y=g&&!!t.createRange().compareNode,b=y?c:p.parentNode,c=e.opera&&"[object Opera]"==d.call(e.opera),c=!!t.attachEvent&&!c,w=g?"object":c?"script":"img",E=c?"script":w,S=Array.isArray||function(e){return"[object Array]"==d.call(e)},x=[],T={},N={timeout:function(e,t){return t.length&&(e.timeout=t[0]),e}},C,k;k=function(e){function t(e){var e=e.split("!"),t=x.length,n=e.pop(),r=e.length,n={url:n,origUrl:n,prefixes:e},i,s,o;for(s=0;s<r;s++)o=e[s].split("="),(i=N[o.shift()])&&(n=i(n,o));for(s=0;s<t;s++)n=x[s](n);return n}function o(e,i,s,o,u){var a=t(e),f=a.autoCallback;a.url.split(".").pop().split("?").shift(),a.bypass||(i&&(i=r(i)?i:i[e]||i[o]||i[e.split("/").pop().split("?")[0]]),a.instead?a.instead(e,i,s,o,u):(T[a.url]?a.noexec=!0:T[a.url]=1,s.load(a.url,a.forceCSS||!a.forceJS&&"css"==a.url.split(".").pop().split("?").shift()?"c":n,a.noexec,a.attrs,a.timeout),(r(i)||r(f))&&s.load(function(){l(),i&&i(a.origUrl,u,o),f&&f(a.origUrl,u,o),T[a.url]=2})))}function u(e,t){function n(e,n){if(e){if(i(e))n||(f=function(){var e=[].slice.call(arguments);l.apply(this,e),c()}),o(e,f,t,0,u);else if(Object(e)===e)for(p in h=function(){var t=0,n;for(n in e)e.hasOwnProperty(n)&&t++;return t}(),e)e.hasOwnProperty(p)&&(!n&&!--h&&(r(f)?f=function(){var e=[].slice.call(arguments);l.apply(this,e),c()}:f[p]=function(e){return function(){var t=[].slice.call(arguments);e&&e.apply(this,t),c()}}(l[p])),o(e[p],f,t,p,u))}else!n&&c()}var u=!!e.test,a=e.load||e.both,f=e.callback||s,l=f,c=e.complete||s,h,p;n(u?e.yep:e.nope,!!a),a&&n(a)}var a,f,c=this.yepnope.loader;if(i(e))o(e,0,c,0);else if(S(e))for(a=0;a<e.length;a++)f=e[a],i(f)?o(f,0,c,0):S(f)?k(f):Object(f)===f&&u(f,c);else Object(e)===e&&u(e,c)}
4,k.addPrefix=function(e,t){N[e]=t},k.addFilter=function(e){x.push(e)},k.errorTimeout=1e4,null==t.readyState&&t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",C=function(){t.removeEventListener("DOMContentLoaded",C,0),t.readyState="complete"},0)),e.yepnope=l(),e.yepnope.executeStack=u,e.yepnope.injectJs=function(e,n,r,i,a,f){var l=t.createElement("script"),c,d,i=i||k.errorTimeout;l.src=e;for(d in r)l.setAttribute(d,r[d]);n=f?u:n||s,l.onreadystatechange=l.onload=function(){!c&&o(l.readyState)&&(c=1,n(),l.onload=l.onreadystatechange=null)},h(function(){c||(c=1,n(1))},i),a?l.onload():p.parentNode.insertBefore(l,p)},e.yepnope.injectCss=function(e,n,r,i,o,a){var i=t.createElement("link"),f,n=a?u:n||s;i.href=e,i.rel="stylesheet",i.type="text/css";for(f in r)i.setAttribute(f,r[f]);o||(p.parentNode.insertBefore(i,p),h(n,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};/**! 5 * @fileOverview Kickass library to create and place poppers near their reference elements. 6 * @version 1.16.1 7 * @license 8 * Copyright (C) Federico Zivolo 2020 9 */ 10(function (global, factory) { 11 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 12 typeof define === 'function' && define.amd ? define(factory) : 13 (global.Popper = factory()); 14}(this, (function () { 15 'use strict'; 16 17 var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined'; 18 19 var timeoutDuration = function () { 20 var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox']; 21 for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) { 22 if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) { 23 return 1; 24 } 25 } 26 return 0; 27 }(); 28 29 function microtaskDebounce(fn) { 30 var called = false; 31 return function () { 32 if (called) { 33 return; 34 } 35 called = true; 36 window.Promise.resolve().then(function () { 37 called = false; 38 fn(); 39 }); 40 }; 41 } 42 43 function taskDebounce(fn) { 44 var scheduled = false; 45 return function () { 46 if (!scheduled) { 47 scheduled = true; 48 setTimeout(function () { 49 scheduled = false; 50 fn(); 51 }, timeoutDuration); 52 } 53 }; 54 } 55 56 var supportsMicroTasks = isBrowser && window.Promise; 57 58 /** 59 * Create a debounced version of a method, that's asynchronously deferred 60 * but called in the minimum time possible. 61 * 62 * @method 63 * @memberof Popper.Utils 64 * @argument {Function} fn 65 * @returns {Function} 66 */ 67 var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce; 68 69 /** 70 * Check if the given variable is a function 71 * @method 72 * @memberof Popper.Utils 73 * @argument {Any} functionToCheck - variable to check 74 * @returns {Boolean} answer to: is a function? 75 */ 76 function isFunction(functionToCheck) { 77 var getType = {}; 78 return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; 79 } 80 81 /** 82 * Get CSS computed property of the given element 83 * @method 84 * @memberof Popper.Utils 85 * @argument {Eement} element 86 * @argument {String} property 87 */ 88 function getStyleComputedProperty(element, property) { 89 if (element.nodeType !== 1) { 90 return []; 91 } 92 // NOTE: 1 DOM access here 93 var window = element.ownerDocument.defaultView; 94 var css = window.getComputedStyle(element, null); 95 return property ? css[property] : css; 96 } 97 98 /** 99 * Returns the parentNode or the host of the element 100 * @method 101 * @memberof Popper.Utils 102 * @argument {Element} element 103 * @returns {Element} parent 104 */ 105 function getParentNode(element) { 106 if (element.nodeName === 'HTML') { 107 return element; 108 } 109 return element.parentNode || element.host; 110 } 111 112 /** 113 * Returns the scrolling parent of the given element 114 * @method 115 * @memberof Popper.Utils 116 * @argument {Element} element 117 * @returns {Element} scroll parent 118 */ 119 function getScrollParent(element) { 120 // Return body, `getScroll` will take care to get the correct `scrollTop` from it 121 if (!element) { 122 return document.body; 123 } 124 125 switch (element.nodeName) { 126 case 'HTML': 127 case 'BODY': 128 return element.ownerDocument.body; 129 case '#document': 130 return element.body; 131 } 132 133 // Firefox want us to check `-x` and `-y` variations as well 134 135 var _getStyleComputedProp = getStyleComputedProperty(element), 136 overflow = _getStyleComputedProp.overflow, 137 overflowX = _getStyleComputedProp.overflowX, 138 overflowY = _getStyleComputedProp.overflowY; 139 140 if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { 141 return element; 142 } 143 144 return getScrollParent(getParentNode(element)); 145 } 146 147 /** 148 * Returns the reference node of the reference object, or the reference object itself. 149 * @method 150 * @memberof Popper.Utils
vendor: 9,150 bytes, lines 151-399
151 * @param {Element|Object} reference - the reference element (the popper will be relative to this) 152 * @returns {Element} parent 153 */ 154 function getReferenceNode(reference) { 155 return reference && reference.referenceNode ? reference.referenceNode : reference; 156 } 157 158 var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode); 159 var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent); 160 161 /** 162 * Determines if the browser is Internet Explorer 163 * @method 164 * @memberof Popper.Utils 165 * @param {Number} version to check 166 * @returns {Boolean} isIE 167 */ 168 function isIE(version) { 169 if (version === 11) { 170 return isIE11; 171 } 172 if (version === 10) { 173 return isIE10; 174 } 175 return isIE11 || isIE10; 176 } 177 178 /** 179 * Returns the offset parent of the given element 180 * @method 181 * @memberof Popper.Utils 182 * @argument {Element} element 183 * @returns {Element} offset parent 184 */ 185 function getOffsetParent(element) { 186 if (!element) { 187 return document.documentElement; 188 } 189 190 var noOffsetParent = isIE(10) ? document.body : null; 191 192 // NOTE: 1 DOM access here 193 var offsetParent = element.offsetParent || null; 194 // Skip hidden elements which don't have an offsetParent 195 while (offsetParent === noOffsetParent && element.nextElementSibling) { 196 offsetParent = (element = element.nextElementSibling).offsetParent; 197 } 198 199 var nodeName = offsetParent && offsetParent.nodeName; 200 201 if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { 202 return element ? element.ownerDocument.documentElement : document.documentElement; 203 } 204 205 // .offsetParent will return the closest TH, TD or TABLE in case 206 // no offsetParent is present, I hate this job... 207 if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') { 208 return getOffsetParent(offsetParent); 209 } 210 211 return offsetParent; 212 } 213 214 function isOffsetContainer(element) { 215 var nodeName = element.nodeName; 216 217 if (nodeName === 'BODY') { 218 return false; 219 } 220 return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element; 221 } 222 223 /** 224 * Finds the root node (document, shadowDOM root) of the given element 225 * @method 226 * @memberof Popper.Utils 227 * @argument {Element} node 228 * @returns {Element} root node 229 */ 230 function getRoot(node) { 231 if (node.parentNode !== null) { 232 return getRoot(node.parentNode); 233 } 234 235 return node; 236 } 237 238 /** 239 * Finds the offset parent common to the two provided nodes 240 * @method 241 * @memberof Popper.Utils 242 * @argument {Element} element1 243 * @argument {Element} element2 244 * @returns {Element} common offset parent 245 */ 246 function findCommonOffsetParent(element1, element2) { 247 // This check is needed to avoid errors in case one of the elements isn't defined for any reason 248 if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) { 249 return document.documentElement; 250 } 251 252 // Here we make sure to give as "start" the element that comes first in the DOM 253 var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING; 254 var start = order ? element1 : element2; 255 var end = order ? element2 : element1; 256 257 // Get common ancestor container 258 var range = document.createRange(); 259 range.setStart(start, 0); 260 range.setEnd(end, 0); 261 var commonAncestorContainer = range.commonAncestorContainer; 262 263 // Both nodes are inside #document 264 265 if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) { 266 if (isOffsetContainer(commonAncestorContainer)) { 267 return commonAncestorContainer; 268 } 269 270 return getOffsetParent(commonAncestorContainer); 271 } 272 273 // one of the nodes is inside shadowDOM, find which one 274 var element1root = getRoot(element1); 275 if (element1root.host) { 276 return findCommonOffsetParent(element1root.host, element2); 277 } else { 278 return findCommonOffsetParent(element1, getRoot(element2).host); 279 } 280 } 281 282 /** 283 * Gets the scroll value of the given element in the given side (top and left) 284 * @method 285 * @memberof Popper.Utils 286 * @argument {Element} element 287 * @argument {String} side `top` or `left` 288 * @returns {number} amount of scrolled pixels 289 */ 290 function getScroll(element) { 291 var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top'; 292 293 var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft'; 294 var nodeName = element.nodeName; 295 296 if (nodeName === 'BODY' || nodeName === 'HTML') { 297 var html = element.ownerDocument.documentElement; 298 var scrollingElement = element.ownerDocument.scrollingElement || html; 299 return scrollingElement[upperSide]; 300 } 301 302 return element[upperSide]; 303 } 304 305 /* 306 * Sum or subtract the element scroll values (left and top) from a given rect object 307 * @method 308 * @memberof Popper.Utils 309 * @param {Object} rect - Rect object you want to change 310 * @param {HTMLElement} element - The element from the function reads the scroll values 311 * @param {Boolean} subtract - set to true if you want to subtract the scroll values 312 * @return {Object} rect - The modifier rect object 313 */ 314 function includeScroll(rect, element) { 315 var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; 316 317 var scrollTop = getScroll(element, 'top'); 318 var scrollLeft = getScroll(element, 'left'); 319 var modifier = subtract ? -1 : 1; 320 rect.top += scrollTop * modifier; 321 rect.bottom += scrollTop * modifier; 322 rect.left += scrollLeft * modifier; 323 rect.right += scrollLeft * modifier; 324 return rect; 325 } 326 327 /* 328 * Helper to detect borders of a given element 329 * @method 330 * @memberof Popper.Utils 331 * @param {CSSStyleDeclaration} styles 332 * Result of `getStyleComputedProperty` on the given element 333 * @param {String} axis - `x` or `y` 334 * @return {number} borders - The borders size of the given axis 335 */ 336 337 function getBordersSize(styles, axis) { 338 var sideA = axis === 'x' ? 'Left' : 'Top'; 339 var sideB = sideA === 'Left' ? 'Right' : 'Bottom'; 340 341 return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']); 342 } 343 344 function getSize(axis, body, html, computedStyle) { 345 return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0); 346 } 347 348 function getWindowSizes(document) { 349 var body = document.body; 350 var html = document.documentElement; 351 var computedStyle = isIE(10) && getComputedStyle(html); 352 353 return { 354 height: getSize('Height', body, html, computedStyle), 355 width: getSize('Width', body, html, computedStyle) 356 }; 357 } 358 359 var classCallCheck = function (instance, Constructor) { 360 if (!(instance instanceof Constructor)) { 361 throw new TypeError("Cannot call a class as a function"); 362 } 363 }; 364 365 var createClass = function () { 366 function defineProperties(target, props) { 367 for (var i = 0; i < props.length; i++) { 368 var descriptor = props[i]; 369 descriptor.enumerable = descriptor.enumerable || false; 370 descriptor.configurable = true; 371 if ("value" in descriptor) descriptor.writable = true; 372 Object.defineProperty(target, descriptor.key, descriptor); 373 } 374 } 375 376 return function (Constructor, protoProps, staticProps) { 377 if (protoProps) defineProperties(Constructor.prototype, protoProps); 378 if (staticProps) defineProperties(Constructor, staticProps); 379 return Constructor; 380 }; 381 }(); 382 383 384 385 386 387 var defineProperty = function (obj, key, value) { 388 if (key in obj) { 389 Object.defineProperty(obj, key, { 390 value: value, 391 enumerable: true, 392 configurable: true, 393 writable: true 394 }); 395 } else { 396 obj[key] = value; 397 } 398 399 return obj;
vendor: 13,319 bytes, lines 400-742
400 }; 401 402 var _extends = Object.assign || function (target) { 403 for (var i = 1; i < arguments.length; i++) { 404 var source = arguments[i]; 405 406 for (var key in source) { 407 if (Object.prototype.hasOwnProperty.call(source, key)) { 408 target[key] = source[key]; 409 } 410 } 411 } 412 413 return target; 414 }; 415 416 /** 417 * Given element offsets, generate an output similar to getBoundingClientRect 418 * @method 419 * @memberof Popper.Utils 420 * @argument {Object} offsets 421 * @returns {Object} ClientRect like output 422 */ 423 function getClientRect(offsets) { 424 return _extends({}, offsets, { 425 right: offsets.left + offsets.width, 426 bottom: offsets.top + offsets.height 427 }); 428 } 429 430 /** 431 * Get bounding client rect of given element 432 * @method 433 * @memberof Popper.Utils 434 * @param {HTMLElement} element 435 * @return {Object} client rect 436 */ 437 function getBoundingClientRect(element) { 438 var rect = {}; 439 440 // IE10 10 FIX: Please, don't ask, the element isn't 441 // considered in DOM in some circumstances... 442 // This isn't reproducible in IE10 compatibility mode of IE11 443 try { 444 if (isIE(10)) { 445 rect = element.getBoundingClientRect(); 446 var scrollTop = getScroll(element, 'top'); 447 var scrollLeft = getScroll(element, 'left'); 448 rect.top += scrollTop; 449 rect.left += scrollLeft; 450 rect.bottom += scrollTop; 451 rect.right += scrollLeft; 452 } else { 453 rect = element.getBoundingClientRect(); 454 } 455 } catch (e) { } 456 457 var result = { 458 left: rect.left, 459 top: rect.top, 460 width: rect.right - rect.left, 461 height: rect.bottom - rect.top 462 }; 463 464 // subtract scrollbar size from sizes 465 var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {}; 466 var width = sizes.width || element.clientWidth || result.width; 467 var height = sizes.height || element.clientHeight || result.height; 468 469 var horizScrollbar = element.offsetWidth - width; 470 var vertScrollbar = element.offsetHeight - height; 471 472 // if an hypothetical scrollbar is detected, we must be sure it's not a `border` 473 // we make this check conditional for performance reasons 474 if (horizScrollbar || vertScrollbar) { 475 var styles = getStyleComputedProperty(element); 476 horizScrollbar -= getBordersSize(styles, 'x'); 477 vertScrollbar -= getBordersSize(styles, 'y'); 478 479 result.width -= horizScrollbar; 480 result.height -= vertScrollbar; 481 } 482 483 return getClientRect(result); 484 } 485 486 function getOffsetRectRelativeToArbitraryNode(children, parent) { 487 var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; 488 489 var isIE10 = isIE(10); 490 var isHTML = parent.nodeName === 'HTML'; 491 var childrenRect = getBoundingClientRect(children); 492 var parentRect = getBoundingClientRect(parent); 493 var scrollParent = getScrollParent(children); 494 495 var styles = getStyleComputedProperty(parent); 496 var borderTopWidth = parseFloat(styles.borderTopWidth); 497 var borderLeftWidth = parseFloat(styles.borderLeftWidth); 498 499 // In cases where the parent is fixed, we must ignore negative scroll in offset calc 500 if (fixedPosition && isHTML) { 501 parentRect.top = Math.max(parentRect.top, 0); 502 parentRect.left = Math.max(parentRect.left, 0); 503 } 504 var offsets = getClientRect({ 505 top: childrenRect.top - parentRect.top - borderTopWidth, 506 left: childrenRect.left - parentRect.left - borderLeftWidth, 507 width: childrenRect.width, 508 height: childrenRect.height 509 }); 510 offsets.marginTop = 0; 511 offsets.marginLeft = 0; 512 513 // Subtract margins of documentElement in case it's being used as parent 514 // we do this only on HTML because it's the only element that behaves 515 // differently when margins are applied to it. The margins are included in 516 // the box of the documentElement, in the other cases not. 517 if (!isIE10 && isHTML) { 518 var marginTop = parseFloat(styles.marginTop); 519 var marginLeft = parseFloat(styles.marginLeft); 520 521 offsets.top -= borderTopWidth - marginTop; 522 offsets.bottom -= borderTopWidth - marginTop; 523 offsets.left -= borderLeftWidth - marginLeft; 524 offsets.right -= borderLeftWidth - marginLeft; 525 526 // Attach marginTop and marginLeft because in some circumstances we may need them 527 offsets.marginTop = marginTop; 528 offsets.marginLeft = marginLeft; 529 } 530 531 if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { 532 offsets = includeScroll(offsets, parent); 533 } 534 535 return offsets; 536 } 537 538 function getViewportOffsetRectRelativeToArtbitraryNode(element) { 539 var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 540 541 var html = element.ownerDocument.documentElement; 542 var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); 543 var width = Math.max(html.clientWidth, window.innerWidth || 0); 544 var height = Math.max(html.clientHeight, window.innerHeight || 0); 545 546 var scrollTop = !excludeScroll ? getScroll(html) : 0; 547 var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0; 548 549 var offset = { 550 top: scrollTop - relativeOffset.top + relativeOffset.marginTop, 551 left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft, 552 width: width, 553 height: height 554 }; 555 556 return getClientRect(offset); 557 } 558 559 /** 560 * Check if the given element is fixed or is inside a fixed parent 561 * @method 562 * @memberof Popper.Utils 563 * @argument {Element} element 564 * @argument {Element} customContainer 565 * @returns {Boolean} answer to "isFixed?" 566 */ 567 function isFixed(element) { 568 var nodeName = element.nodeName; 569 if (nodeName === 'BODY' || nodeName === 'HTML') { 570 return false; 571 } 572 if (getStyleComputedProperty(element, 'position') === 'fixed') { 573 return true; 574 } 575 var parentNode = getParentNode(element); 576 if (!parentNode) { 577 return false; 578 } 579 return isFixed(parentNode); 580 } 581 582 /** 583 * Finds the first parent of an element that has a transformed property defined 584 * @method 585 * @memberof Popper.Utils 586 * @argument {Element} element 587 * @returns {Element} first transformed parent or documentElement 588 */ 589 590 function getFixedPositionOffsetParent(element) { 591 // This check is needed to avoid errors in case one of the elements isn't defined for any reason 592 if (!element || !element.parentElement || isIE()) { 593 return document.documentElement; 594 } 595 var el = element.parentElement; 596 while (el && getStyleComputedProperty(el, 'transform') === 'none') { 597 el = el.parentElement; 598 } 599 return el || document.documentElement; 600 } 601 602 /** 603 * Computed the boundaries limits and return them 604 * @method 605 * @memberof Popper.Utils 606 * @param {HTMLElement} popper 607 * @param {HTMLElement} reference 608 * @param {number} padding 609 * @param {HTMLElement} boundariesElement - Element used to define the boundaries 610 * @param {Boolean} fixedPosition - Is in fixed position mode 611 * @returns {Object} Coordinates of the boundaries 612 */ 613 function getBoundaries(popper, reference, padding, boundariesElement) { 614 var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; 615 616 // NOTE: 1 DOM access here 617 618 var boundaries = { top: 0, left: 0 }; 619 var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference)); 620 621 // Handle viewport case 622 if (boundariesElement === 'viewport') { 623 boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); 624 } else { 625 // Handle other cases based on DOM element used as boundaries 626 var boundariesNode = void 0; 627 if (boundariesElement === 'scrollParent') { 628 boundariesNode = getScrollParent(getParentNode(reference)); 629 if (boundariesNode.nodeName === 'BODY') { 630 boundariesNode = popper.ownerDocument.documentElement; 631 } 632 } else if (boundariesElement === 'window') { 633 boundariesNode = popper.ownerDocument.documentElement; 634 } else { 635 boundariesNode = boundariesElement; 636 } 637 638 var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); 639 640 // In case of HTML, we need a different computation 641 if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { 642 var _getWindowSizes = getWindowSizes(popper.ownerDocument), 643 height = _getWindowSizes.height, 644 width = _getWindowSizes.width; 645 646 boundaries.top += offsets.top - offsets.marginTop; 647 boundaries.bottom = height + offsets.top; 648 boundaries.left += offsets.left - offsets.marginLeft; 649 boundaries.right = width + offsets.left; 650 } else { 651 // for all the other DOM elements, this one is good 652 boundaries = offsets; 653 } 654 } 655 656 // Add paddings 657 padding = padding || 0; 658 var isPaddingNumber = typeof padding === 'number'; 659 boundaries.left += isPaddingNumber ? padding : padding.left || 0; 660 boundaries.top += isPaddingNumber ? padding : padding.top || 0; 661 boundaries.right -= isPaddingNumber ? padding : padding.right || 0; 662 boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; 663 664 return boundaries; 665 } 666 667 function getArea(_ref) { 668 var width = _ref.width, 669 height = _ref.height; 670 671 return width * height; 672 } 673 674 /** 675 * Utility used to transform the `auto` placement to the placement with more 676 * available space. 677 * @method 678 * @memberof Popper.Utils 679 * @argument {Object} data - The data object generated by update method 680 * @argument {Object} options - Modifiers configuration and options 681 * @returns {Object} The data object, properly modified 682 */ 683 function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) { 684 var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; 685 686 if (placement.indexOf('auto') === -1) { 687 return placement; 688 } 689 690 var boundaries = getBoundaries(popper, reference, padding, boundariesElement); 691 692 var rects = { 693 top: { 694 width: boundaries.width, 695 height: refRect.top - boundaries.top 696 }, 697 right: { 698 width: boundaries.right - refRect.right, 699 height: boundaries.height 700 }, 701 bottom: { 702 width: boundaries.width, 703 height: boundaries.bottom - refRect.bottom 704 }, 705 left: { 706 width: refRect.left - boundaries.left, 707 height: boundaries.height 708 } 709 }; 710 711 var sortedAreas = Object.keys(rects).map(function (key) { 712 return _extends({ 713 key: key 714 }, rects[key], { 715 area: getArea(rects[key]) 716 }); 717 }).sort(function (a, b) { 718 return b.area - a.area; 719 }); 720 721 var filteredAreas = sortedAreas.filter(function (_ref2) { 722 var width = _ref2.width, 723 height = _ref2.height; 724 return width >= popper.clientWidth && height >= popper.clientHeight; 725 }); 726 727 var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key; 728 729 var variation = placement.split('-')[1]; 730 731 return computedPlacement + (variation ? '-' + variation : ''); 732 } 733 734 /** 735 * Get offsets to the reference element 736 * @method 737 * @memberof Popper.Utils 738 * @param {Object} state 739 * @param {Element} popper - the popper element 740 * @param {Element} reference - the reference element (the popper will be relative to this) 741 * @param {Element} fixedPosition - is in fixed position mode 742 * @returns {Object}
742 An object containing the offsets which will be applied to the popper 743 */ 744 function getReferenceOffsets(state, popper, reference) { 745 var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; 746 747 var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference)); 748 return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); 749 } 750 751 /** 752 * Get the outer sizes of the given element (offset size + margins) 753 * @method 754 * @memberof Popper.Utils 755 * @argument {Element} element 756 * @returns {Object} object containing width and height properties 757 */ 758 function getOuterSizes(element) { 759 var window = element.ownerDocument.defaultView; 760 var styles = window.getComputedStyle(element); 761 var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0); 762 var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0
vendor: 4,087 bytes, lines 762-878
762); 763 var result = { 764 width: element.offsetWidth + y, 765 height: element.offsetHeight + x 766 }; 767 return result; 768 } 769 770 /** 771 * Get the opposite placement of the given one 772 * @method 773 * @memberof Popper.Utils 774 * @argument {String} placement 775 * @returns {String} flipped placement 776 */ 777 function getOppositePlacement(placement) { 778 var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; 779 return placement.replace(/left|right|bottom|top/g, function (matched) { 780 return hash[matched]; 781 }); 782 } 783 784 /** 785 * Get offsets to the popper 786 * @method 787 * @memberof Popper.Utils 788 * @param {Object} position - CSS position the Popper will get applied 789 * @param {HTMLElement} popper - the popper element 790 * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this) 791 * @param {String} placement - one of the valid placement options 792 * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper 793 */ 794 function getPopperOffsets(popper, referenceOffsets, placement) { 795 placement = placement.split('-')[0]; 796 797 // Get popper node sizes 798 var popperRect = getOuterSizes(popper); 799 800 // Add position, width and height to our offsets object 801 var popperOffsets = { 802 width: popperRect.width, 803 height: popperRect.height 804 }; 805 806 // depending by the popper placement we have to compute its offsets slightly differently 807 var isHoriz = ['right', 'left'].indexOf(placement) !== -1; 808 var mainSide = isHoriz ? 'top' : 'left'; 809 var secondarySide = isHoriz ? 'left' : 'top'; 810 var measurement = isHoriz ? 'height' : 'width'; 811 var secondaryMeasurement = !isHoriz ? 'height' : 'width'; 812 813 popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2; 814 if (placement === secondarySide) { 815 popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement]; 816 } else { 817 popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)]; 818 } 819 820 return popperOffsets; 821 } 822 823 /** 824 * Mimics the `find` method of Array 825 * @method 826 * @memberof Popper.Utils 827 * @argument {Array} arr 828 * @argument prop 829 * @argument value 830 * @returns index or -1 831 */ 832 function find(arr, check) { 833 // use native find if supported 834 if (Array.prototype.find) { 835 return arr.find(check); 836 } 837 838 // use `filter` to obtain the same behavior of `find` 839 return arr.filter(check)[0]; 840 } 841 842 /** 843 * Return the index of the matching object 844 * @method 845 * @memberof Popper.Utils 846 * @argument {Array} arr 847 * @argument prop 848 * @argument value 849 * @returns index or -1 850 */ 851 function findIndex(arr, prop, value) { 852 // use native findIndex if supported 853 if (Array.prototype.findIndex) { 854 return arr.findIndex(function (cur) { 855 return cur[prop] === value; 856 }); 857 } 858 859 // use `find` + `indexOf` if `findIndex` isn't supported 860 var match = find(arr, function (obj) { 861 return obj[prop] === value; 862 }); 863 return arr.indexOf(match); 864 } 865 866 /** 867 * Loop trough the list of modifiers and run them in order, 868 * each of them will then edit the data object. 869 * @method 870 * @memberof Popper.Utils 871 * @param {dataObject} data 872 * @param {Array} modifiers 873 * @param {String} ends - Optional modifier name used as stopper 874 * @returns {dataObject} 875 */ 876 function runModifiers(modifiers, data, ends) { 877 var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends)); 878
vendor: 48,996 bytes, lines 879-2069
879 modifiersToRun.forEach(function (modifier) { 880 if (modifier['function']) { 881 // eslint-disable-line dot-notation 882 console.warn('`modifier.function` is deprecated, use `modifier.fn`!'); 883 } 884 var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation 885 if (modifier.enabled && isFunction(fn)) { 886 // Add properties to offsets to make them a complete clientRect object 887 // we do this before each modifier to make sure the previous one doesn't 888 // mess with these values 889 data.offsets.popper = getClientRect(data.offsets.popper); 890 data.offsets.reference = getClientRect(data.offsets.reference); 891 892 data = fn(data, modifier); 893 } 894 }); 895 896 return data; 897 } 898 899 /** 900 * Updates the position of the popper, computing the new offsets and applying 901 * the new style.<br /> 902 * Prefer `scheduleUpdate` over `update` because of performance reasons. 903 * @method 904 * @memberof Popper 905 */ 906 function update() { 907 // if popper is destroyed, don't perform any further update 908 if (this.state.isDestroyed) { 909 return; 910 } 911 912 var data = { 913 instance: this, 914 styles: {}, 915 arrowStyles: {}, 916 attributes: {}, 917 flipped: false, 918 offsets: {} 919 }; 920 921 // compute reference element offsets 922 data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); 923 924 // compute auto placement, store placement inside the data object, 925 // modifiers will be able to edit `placement` if needed 926 // and refer to originalPlacement to know the original value 927 data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); 928 929 // store the computed placement inside `originalPlacement` 930 data.originalPlacement = data.placement; 931 932 data.positionFixed = this.options.positionFixed; 933 934 // compute the popper offsets 935 data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); 936 937 data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; 938 939 // run the modifiers 940 data = runModifiers(this.modifiers, data); 941 942 // the first `update` will call `onCreate` callback 943 // the other ones will call `onUpdate` callback 944 if (!this.state.isCreated) { 945 this.state.isCreated = true; 946 this.options.onCreate(data); 947 } else { 948 this.options.onUpdate(data); 949 } 950 } 951 952 /** 953 * Helper used to know if the given modifier is enabled. 954 * @method 955 * @memberof Popper.Utils 956 * @returns {Boolean} 957 */ 958 function isModifierEnabled(modifiers, modifierName) { 959 return modifiers.some(function (_ref) { 960 var name = _ref.name, 961 enabled = _ref.enabled; 962 return enabled && name === modifierName; 963 }); 964 } 965 966 /** 967 * Get the prefixed supported property name 968 * @method 969 * @memberof Popper.Utils 970 * @argument {String} property (camelCase) 971 * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix) 972 */ 973 function getSupportedPropertyName(property) { 974 var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; 975 var upperProp = property.charAt(0).toUpperCase() + property.slice(1); 976 977 for (var i = 0; i < prefixes.length; i++) { 978 var prefix = prefixes[i]; 979 var toCheck = prefix ? '' + prefix + upperProp : property; 980 if (typeof document.body.style[toCheck] !== 'undefined') { 981 return toCheck; 982 } 983 } 984 return null; 985 } 986 987 /** 988 * Destroys the popper. 989 * @method 990 * @memberof Popper 991 */ 992 function destroy() { 993 this.state.isDestroyed = true; 994 995 // touch DOM only if `applyStyle` modifier is enabled 996 if (isModifierEnabled(this.modifiers, 'applyStyle')) { 997 this.popper.removeAttribute('x-placement'); 998 this.popper.style.position = ''; 999 this.popper.style.top = ''; 1000 this.popper.style.left = ''; 1001 this.popper.style.right = ''; 1002 this.popper.style.bottom = ''; 1003 this.popper.style.willChange = ''; 1004 this.popper.style[getSupportedPropertyName('transform')] = ''; 1005 } 1006 1007 this.disableEventListeners(); 1008 1009 // remove the popper if user explicitly asked for the deletion on destroy 1010 // do not use `remove` because IE11 doesn't support it 1011 if (this.options.removeOnDestroy) { 1012 this.popper.parentNode.removeChild(this.popper); 1013 } 1014 return this; 1015 } 1016 1017 /** 1018 * Get the window associated with the element 1019 * @argument {Element} element 1020 * @returns {Window} 1021 */ 1022 function getWindow(element) { 1023 var ownerDocument = element.ownerDocument; 1024 return ownerDocument ? ownerDocument.defaultView : window; 1025 } 1026 1027 function attachToScrollParents(scrollParent, event, callback, scrollParents) { 1028 var isBody = scrollParent.nodeName === 'BODY'; 1029 var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent; 1030 target.addEventListener(event, callback, { passive: true }); 1031 1032 if (!isBody) { 1033 attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents); 1034 } 1035 scrollParents.push(target); 1036 } 1037 1038 /** 1039 * Setup needed event listeners used to update the popper position 1040 * @method 1041 * @memberof Popper.Utils 1042 * @private 1043 */ 1044 function setupEventListeners(reference, options, state, updateBound) { 1045 // Resize event listener on window 1046 state.updateBound = updateBound; 1047 getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); 1048 1049 // Scroll event listener on scroll parents 1050 var scrollElement = getScrollParent(reference); 1051 attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents); 1052 state.scrollElement = scrollElement; 1053 state.eventsEnabled = true; 1054 1055 return state; 1056 } 1057 1058 /** 1059 * It will add resize/scroll events and start recalculating 1060 * position of the popper element when they are triggered. 1061 * @method 1062 * @memberof Popper 1063 */ 1064 function enableEventListeners() { 1065 if (!this.state.eventsEnabled) { 1066 this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); 1067 } 1068 } 1069 1070 /** 1071 * Remove event listeners used to update the popper position 1072 * @method 1073 * @memberof Popper.Utils 1074 * @private 1075 */ 1076 function removeEventListeners(reference, state) { 1077 // Remove resize event listener on window 1078 getWindow(reference).removeEventListener('resize', state.updateBound); 1079 1080 // Remove scroll event listener on scroll parents 1081 state.scrollParents.forEach(function (target) { 1082 target.removeEventListener('scroll', state.updateBound); 1083 }); 1084 1085 // Reset state 1086 state.updateBound = null; 1087 state.scrollParents = []; 1088 state.scrollElement = null; 1089 state.eventsEnabled = false; 1090 return state; 1091 } 1092 1093 /** 1094 * It will remove resize/scroll events and won't recalculate popper position 1095 * when they are triggered. It also won't trigger `onUpdate` callback anymore, 1096 * unless you call `update` method manually. 1097 * @method 1098 * @memberof Popper 1099 */ 1100 function disableEventListeners() { 1101 if (this.state.eventsEnabled) { 1102 cancelAnimationFrame(this.scheduleUpdate); 1103 this.state = removeEventListeners(this.reference, this.state); 1104 } 1105 } 1106 1107 /** 1108 * Tells if a given input is a number 1109 * @method 1110 * @memberof Popper.Utils 1111 * @param {*} input to check 1112 * @return {Boolean} 1113 */ 1114 function isNumeric(n) { 1115 return n !== '' && !isNaN(parseFloat(n)) && isFinite(n); 1116 } 1117 1118 /** 1119 * Set the style to the given popper 1120 * @method 1121 * @memberof Popper.Utils 1122 * @argument {Element} element - Element to apply the style to 1123 * @argument {Object} styles 1124 * Object with a list of properties and values which will be applied to the element 1125 */ 1126 function setStyles(element, styles) { 1127 Object.keys(styles).forEach(function (prop) { 1128 var unit = ''; 1129 // add unit if the value is numeric and is one of the following 1130 if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) { 1131 unit = 'px'; 1132 } 1133 element.style[prop] = styles[prop] + unit; 1134 }); 1135 } 1136 1137 /** 1138 * Set the attributes to the given popper 1139 * @method 1140 * @memberof Popper.Utils 1141 * @argument {Element} element - Element to apply the attributes to 1142 * @argument {Object} styles 1143 * Object with a list of properties and values which will be applied to the element 1144 */ 1145 function setAttributes(element, attributes) { 1146 Object.keys(attributes).forEach(function (prop) { 1147 var value = attributes[prop]; 1148 if (value !== false) { 1149 element.setAttribute(prop, attributes[prop]); 1150 } else { 1151 element.removeAttribute(prop); 1152 } 1153 }); 1154 } 1155 1156 /** 1157 * @function 1158 * @memberof Modifiers 1159 * @argument {Object} data - The data object generated by `update` method 1160 * @argument {Object} data.styles - List of style properties - values to apply to popper element 1161 * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element 1162 * @argument {Object} options - Modifiers configuration and options 1163 * @returns {Object} The same data object 1164 */ 1165 function applyStyle(data) { 1166 // any property present in `data.styles` will be applied to the popper, 1167 // in this way we can make the 3rd party modifiers add custom styles to it 1168 // Be aware, modifiers could override the properties defined in the previous 1169 // lines of this modifier! 1170 setStyles(data.instance.popper, data.styles); 1171 1172 // any property present in `data.attributes` will be applied to the popper, 1173 // they will be set as HTML attributes of the element 1174 setAttributes(data.instance.popper, data.attributes); 1175 1176 // if arrowElement is defined and arrowStyles has some properties 1177 if (data.arrowElement && Object.keys(data.arrowStyles).length) { 1178 setStyles(data.arrowElement, data.arrowStyles); 1179 } 1180 1181 return data; 1182 } 1183 1184 /** 1185 * Set the x-placement attribute before everything else because it could be used 1186 * to add margins to the popper margins needs to be calculated to get the 1187 * correct popper offsets. 1188 * @method 1189 * @memberof Popper.modifiers 1190 * @param {HTMLElement} reference - The reference element used to position the popper 1191 * @param {HTMLElement} popper - The HTML element used as popper 1192 * @param {Object} options - Popper.js options 1193 */ 1194 function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { 1195 // compute reference element offsets 1196 var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); 1197 1198 // compute auto placement, store placement inside the data object, 1199 // modifiers will be able to edit `placement` if needed 1200 // and refer to originalPlacement to know the original value 1201 var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding); 1202 1203 popper.setAttribute('x-placement', placement); 1204 1205 // Apply `position` to popper before anything else because 1206 // without the position applied we can't guarantee correct computations 1207 setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' }); 1208 1209 return options; 1210 } 1211 1212 /** 1213 * @function 1214 * @memberof Popper.Utils 1215 * @argument {Object} data - The data object generated by `update` method 1216 * @argument {Boolean} shouldRound - If the offsets should be rounded at all 1217 * @returns {Object} The popper's position offsets rounded 1218 * 1219 * The tale of pixel-perfect positioning. It's still not 100% perfect, but as 1220 * good as it can be within reason. 1221 * Discussion here: https://github.com/FezVrasta/popper.js/pull/715 1222 * 1223 * Low DPI screens cause a popper to be blurry if not using full pixels (Safari 1224 * as well on High DPI screens). 1225 * 1226 * Firefox prefers no rounding for positioning and does not have blurriness on 1227 * high DPI screens. 1228 * 1229 * Only horizontal placement and left/right values need to be considered. 1230 */ 1231 function getRoundedOffsets(data, shouldRound) { 1232 var _data$offsets = data.offsets, 1233 popper = _data$offsets.popper, 1234 reference = _data$offsets.reference; 1235 var round = Math.round, 1236 floor = Math.floor; 1237 1238 var noRound = function noRound(v) { 1239 return v; 1240 }; 1241 1242 var referenceWidth = round(reference.width); 1243 var popperWidth = round(popper.width); 1244 1245 var isVertical = ['left', 'right'].indexOf(data.placement) !== -1; 1246 var isVariation = data.placement.indexOf('-') !== -1; 1247 var sameWidthParity = referenceWidth % 2 === popperWidth % 2; 1248 var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1; 1249 1250 var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor; 1251 var verticalToInteger = !shouldRound ? noRound : round; 1252 1253 return { 1254 left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left), 1255 top: verticalToInteger(popper.top), 1256 bottom: verticalToInteger(popper.bottom), 1257 right: horizontalToInteger(popper.right) 1258 }; 1259 } 1260 1261 var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent); 1262 1263 /** 1264 * @function 1265 * @memberof Modifiers 1266 * @argument {Object} data - The data object generated by `update` method 1267 * @argument {Object} options - Modifiers configuration and options 1268 * @returns {Object} The data object, properly modified 1269 */ 1270 function computeStyle(data, options) { 1271 var x = options.x, 1272 y = options.y; 1273 var popper = data.offsets.popper; 1274 1275 // Remove this legacy support in Popper.js v2 1276 1277 var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) { 1278 return modifier.name === 'applyStyle'; 1279 }).gpuAcceleration; 1280 if (legacyGpuAccelerationOption !== undefined) { 1281 console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'); 1282 } 1283 var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration; 1284 1285 var offsetParent = getOffsetParent(data.instance.popper); 1286 var offsetParentRect = getBoundingClientRect(offsetParent); 1287 1288 // Styles 1289 var styles = { 1290 position: popper.position 1291 }; 1292 1293 var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox); 1294 1295 var sideA = x === 'bottom' ? 'top' : 'bottom'; 1296 var sideB = y === 'right' ? 'left' : 'right'; 1297 1298 // if gpuAcceleration is set to `true` and transform is supported, 1299 // we use `translate3d` to apply the position to the popper we 1300 // automatically use the supported prefixed version if needed 1301 var prefixedProperty = getSupportedPropertyName('transform'); 1302 1303 // now, let's make a step back and look at this code closely (wtf?) 1304 // If the content of the popper grows once it's been positioned, it 1305 // may happen that the popper gets misplaced because of the new content 1306 // overflowing its reference element 1307 // To avoid this problem, we provide two options (x and y), which allow 1308 // the consumer to define the offset origin. 1309 // If we position a popper on top of a reference element, we can set 1310 // `x` to `top` to make the popper grow towards its top instead of 1311 // its bottom. 1312 var left = void 0, 1313 top = void 0; 1314 if (sideA === 'bottom') { 1315 // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar) 1316 // and not the bottom of the html element 1317 if (offsetParent.nodeName === 'HTML') { 1318 top = -offsetParent.clientHeight + offsets.bottom; 1319 } else { 1320 top = -offsetParentRect.height + offsets.bottom; 1321 } 1322 } else { 1323 top = offsets.top; 1324 } 1325 if (sideB === 'right') { 1326 if (offsetParent.nodeName === 'HTML') { 1327 left = -offsetParent.clientWidth + offsets.right; 1328 } else { 1329 left = -offsetParentRect.width + offsets.right; 1330 } 1331 } else { 1332 left = offsets.left; 1333 } 1334 if (gpuAcceleration && prefixedProperty) { 1335 styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)'; 1336 styles[sideA] = 0; 1337 styles[sideB] = 0; 1338 styles.willChange = 'transform'; 1339 } else { 1340 // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties 1341 var invertTop = sideA === 'bottom' ? -1 : 1; 1342 var invertLeft = sideB === 'right' ? -1 : 1; 1343 styles[sideA] = top * invertTop; 1344 styles[sideB] = left * invertLeft; 1345 styles.willChange = sideA + ', ' + sideB; 1346 } 1347 1348 // Attributes 1349 var attributes = { 1350 'x-placement': data.placement 1351 }; 1352 1353 // Update `data` attributes, styles and arrowStyles 1354 data.attributes = _extends({}, attributes, data.attributes); 1355 data.styles = _extends({}, styles, data.styles); 1356 data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles); 1357 1358 return data; 1359 } 1360 1361 /** 1362 * Helper used to know if the given modifier depends from another one.<br /> 1363 * It checks if the needed modifier is listed and enabled. 1364 * @method 1365 * @memberof Popper.Utils 1366 * @param {Array} modifiers - list of modifiers 1367 * @param {String} requestingName - name of requesting modifier 1368 * @param {String} requestedName - name of requested modifier 1369 * @returns {Boolean} 1370 */ 1371 function isModifierRequired(modifiers, requestingName, requestedName) { 1372 var requesting = find(modifiers, function (_ref) { 1373 var name = _ref.name; 1374 return name === requestingName; 1375 }); 1376 1377 var isRequired = !!requesting && modifiers.some(function (modifier) { 1378 return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order; 1379 }); 1380 1381 if (!isRequired) { 1382 var _requesting = '`' + requestingName + '`'; 1383 var requested = '`' + requestedName + '`'; 1384 console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!'); 1385 } 1386 return isRequired; 1387 } 1388 1389 /** 1390 * @function 1391 * @memberof Modifiers 1392 * @argument {Object} data - The data object generated by update method 1393 * @argument {Object} options - Modifiers configuration and options 1394 * @returns {Object} The data object, properly modified 1395 */ 1396 function arrow(data, options) { 1397 var _data$offsets$arrow; 1398 1399 // arrow depends on keepTogether in order to work 1400 if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) { 1401 return data; 1402 } 1403 1404 var arrowElement = options.element; 1405 1406 // if arrowElement is a string, suppose it's a CSS selector 1407 if (typeof arrowElement === 'string') { 1408 arrowElement = data.instance.popper.querySelector(arrowElement); 1409 1410 // if arrowElement is not found, don't run the modifier 1411 if (!arrowElement) { 1412 return data; 1413 } 1414 } else { 1415 // if the arrowElement isn't a query selector we must check that the 1416 // provided DOM node is child of its popper node 1417 if (!data.instance.popper.contains(arrowElement)) { 1418 console.warn('WARNING: `arrow.element` must be child of its popper element!'); 1419 return data; 1420 } 1421 } 1422 1423 var placement = data.placement.split('-')[0]; 1424 var _data$offsets = data.offsets, 1425 popper = _data$offsets.popper, 1426 reference = _data$offsets.reference; 1427 1428 var isVertical = ['left', 'right'].indexOf(placement) !== -1; 1429 1430 var len = isVertical ? 'height' : 'width'; 1431 var sideCapitalized = isVertical ? 'Top' : 'Left'; 1432 var side = sideCapitalized.toLowerCase(); 1433 var altSide = isVertical ? 'left' : 'top'; 1434 var opSide = isVertical ? 'bottom' : 'right'; 1435 var arrowElementSize = getOuterSizes(arrowElement)[len]; 1436 1437 // 1438 // extends keepTogether behavior making sure the popper and its 1439 // reference have enough pixels in conjunction 1440 // 1441 1442 // top/left side 1443 if (reference[opSide] - arrowElementSize < popper[side]) { 1444 data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize); 1445 } 1446 // bottom/right side 1447 if (reference[side] + arrowElementSize > popper[opSide]) { 1448 data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide]; 1449 } 1450 data.offsets.popper = getClientRect(data.offsets.popper); 1451 1452 // compute center of the popper 1453 var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; 1454 1455 // Compute the sideValue using the updated popper offsets 1456 // take popper margin in account because we don't have this info available 1457 var css = getStyleComputedProperty(data.instance.popper); 1458 var popperMarginSide = parseFloat(css['margin' + sideCapitalized]); 1459 var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']); 1460 var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; 1461 1462 // prevent arrowElement from being placed not contiguously to its popper 1463 sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); 1464 1465 data.arrowElement = arrowElement; 1466 data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow); 1467 1468 return data; 1469 } 1470 1471 /** 1472 * Get the opposite placement variation of the given one 1473 * @method 1474 * @memberof Popper.Utils 1475 * @argument {String} placement variation 1476 * @returns {String} flipped placement variation 1477 */ 1478 function getOppositeVariation(variation) { 1479 if (variation === 'end') { 1480 return 'start'; 1481 } else if (variation === 'start') { 1482 return 'end'; 1483 } 1484 return variation; 1485 } 1486 1487 /** 1488 * List of accepted placements to use as values of the `placement` option.<br /> 1489 * Valid placements are: 1490 * - `auto` 1491 * - `top` 1492 * - `right` 1493 * - `bottom` 1494 * - `left` 1495 * 1496 * Each placement can have a variation from this list: 1497 * - `-start` 1498 * - `-end` 1499 * 1500 * Variations are interpreted easily if you think of them as the left to right 1501 * written languages. Horizontally (`top` and `bottom`), `start` is left and `end` 1502 * is right.<br /> 1503 * Vertically (`left` and `right`), `start` is top and `end` is bottom. 1504 * 1505 * Some valid examples are: 1506 * - `top-end` (on top of reference, right aligned) 1507 * - `right-start` (on right of reference, top aligned) 1508 * - `bottom` (on bottom, centered) 1509 * - `auto-end` (on the side with more space available, alignment depends by placement) 1510 * 1511 * @static 1512 * @type {Array} 1513 * @enum {String} 1514 * @readonly 1515 * @method placements 1516 * @memberof Popper 1517 */ 1518 var placements = ['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']; 1519 1520 // Get rid of `auto` `auto-start` and `auto-end` 1521 var validPlacements = placements.slice(3); 1522 1523 /** 1524 * Given an initial placement, returns all the subsequent placements 1525 * clockwise (or counter-clockwise). 1526 * 1527 * @method 1528 * @memberof Popper.Utils 1529 * @argument {String} placement - A valid placement (it accepts variations) 1530 * @argument {Boolean} counter - Set to true to walk the placements counterclockwise 1531 * @returns {Array} placements including their variations 1532 */ 1533 function clockwise(placement) { 1534 var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 1535 1536 var index = validPlacements.indexOf(placement); 1537 var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index)); 1538 return counter ? arr.reverse() : arr; 1539 } 1540 1541 var BEHAVIORS = { 1542 FLIP: 'flip', 1543 CLOCKWISE: 'clockwise', 1544 COUNTERCLOCKWISE: 'counterclockwise' 1545 }; 1546 1547 /** 1548 * @function 1549 * @memberof Modifiers 1550 * @argument {Object} data - The data object generated by update method 1551 * @argument {Object} options - Modifiers configuration and options 1552 * @returns {Object} The data object, properly modified 1553 */ 1554 function flip(data, options) { 1555 // if `inner` modifier is enabled, we can't use the `flip` modifier 1556 if (isModifierEnabled(data.instance.modifiers, 'inner')) { 1557 return data; 1558 } 1559 1560 if (data.flipped && data.placement === data.originalPlacement) { 1561 // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides 1562 return data; 1563 } 1564 1565 var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed); 1566 1567 var placement = data.placement.split('-')[0]; 1568 var placementOpposite = getOppositePlacement(placement); 1569 var variation = data.placement.split('-')[1] || ''; 1570 1571 var flipOrder = []; 1572 1573 switch (options.behavior) { 1574 case BEHAVIORS.FLIP: 1575 flipOrder = [placement, placementOpposite]; 1576 break; 1577 case BEHAVIORS.CLOCKWISE: 1578 flipOrder = clockwise(placement); 1579 break; 1580 case BEHAVIORS.COUNTERCLOCKWISE: 1581 flipOrder = clockwise(placement, true); 1582 break; 1583 default: 1584 flipOrder = options.behavior; 1585 } 1586 1587 flipOrder.forEach(function (step, index) { 1588 if (placement !== step || flipOrder.length === index + 1) { 1589 return data; 1590 } 1591 1592 placement = data.placement.split('-')[0]; 1593 placementOpposite = getOppositePlacement(placement); 1594 1595 var popperOffsets = data.offsets.popper; 1596 var refOffsets = data.offsets.reference; 1597 1598 // using floor because the reference offsets may contain decimals we are not going to consider here 1599 var floor = Math.floor; 1600 var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom); 1601 1602 var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left); 1603 var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right); 1604 var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top); 1605 var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom); 1606 1607 var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; 1608 1609 // flip the variation if required 1610 var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; 1611 1612 // flips variation if reference element overflows boundaries 1613 var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); 1614 1615 // flips variation if popper content overflows boundaries 1616 var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop); 1617 1618 var flippedVariation = flippedVariationByRef || flippedVariationByContent; 1619 1620 if (overlapsRef || overflowsBoundaries || flippedVariation) { 1621 // this boolean to detect any flip loop 1622 data.flipped = true; 1623 1624 if (overlapsRef || overflowsBoundaries) { 1625 placement = flipOrder[index + 1]; 1626 } 1627 1628 if (flippedVariation) { 1629 variation = getOppositeVariation(variation); 1630 } 1631 1632 data.placement = placement + (variation ? '-' + variation : ''); 1633 1634 // this object contains `position`, we want to preserve it along with 1635 // any additional property we may add in the future 1636 data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement)); 1637 1638 data = runModifiers(data.instance.modifiers, data, 'flip'); 1639 } 1640 }); 1641 return data; 1642 } 1643 1644 /** 1645 * @function 1646 * @memberof Modifiers 1647 * @argument {Object} data - The data object generated by update method 1648 * @argument {Object} options - Modifiers configuration and options 1649 * @returns {Object} The data object, properly modified 1650 */ 1651 function keepTogether(data) { 1652 var _data$offsets = data.offsets, 1653 popper = _data$offsets.popper, 1654 reference = _data$offsets.reference; 1655 1656 var placement = data.placement.split('-')[0]; 1657 var floor = Math.floor; 1658 var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; 1659 var side = isVertical ? 'right' : 'bottom'; 1660 var opSide = isVertical ? 'left' : 'top'; 1661 var measurement = isVertical ? 'width' : 'height'; 1662 1663 if (popper[side] < floor(reference[opSide])) { 1664 data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement]; 1665 } 1666 if (popper[opSide] > floor(reference[side])) { 1667 data.offsets.popper[opSide] = floor(reference[side]); 1668 } 1669 1670 return data; 1671 } 1672 1673 /** 1674 * Converts a string containing value + unit into a px value number 1675 * @function 1676 * @memberof {modifiers~offset} 1677 * @private 1678 * @argument {String} str - Value + unit string 1679 * @argument {String} measurement - `height` or `width` 1680 * @argument {Object} popperOffsets 1681 * @argument {Object} referenceOffsets 1682 * @returns {Number|String} 1683 * Value in pixels, or original string if no values were extracted 1684 */ 1685 function toValue(str, measurement, popperOffsets, referenceOffsets) { 1686 // separate value from unit 1687 var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/); 1688 var value = +split[1]; 1689 var unit = split[2]; 1690 1691 // If it's not a number it's an operator, I guess 1692 if (!value) { 1693 return str; 1694 } 1695 1696 if (unit.indexOf('%') === 0) { 1697 var element = void 0; 1698 switch (unit) { 1699 case '%p': 1700 element = popperOffsets; 1701 break; 1702 case '%': 1703 case '%r': 1704 default: 1705 element = referenceOffsets; 1706 } 1707 1708 var rect = getClientRect(element); 1709 return rect[measurement] / 100 * value; 1710 } else if (unit === 'vh' || unit === 'vw') { 1711 // if is a vh or vw, we calculate the size based on the viewport 1712 var size = void 0; 1713 if (unit === 'vh') { 1714 size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); 1715 } else { 1716 size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); 1717 } 1718 return size / 100 * value; 1719 } else { 1720 // if is an explicit pixel unit, we get rid of the unit and keep the value 1721 // if is an implicit unit, it's px, and we return just the value 1722 return value; 1723 } 1724 } 1725 1726 /** 1727 * Parse an `offset` string to extrapolate `x` and `y` numeric offsets. 1728 * @function 1729 * @memberof {modifiers~offset} 1730 * @private 1731 * @argument {String} offset 1732 * @argument {Object} popperOffsets 1733 * @argument {Object} referenceOffsets 1734 * @argument {String} basePlacement 1735 * @returns {Array} a two cells array with x and y offsets in numbers 1736 */ 1737 function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) { 1738 var offsets = [0, 0]; 1739 1740 // Use height if placement is left or right and index is 0 otherwise use width 1741 // in this way the first offset will use an axis and the second one 1742 // will use the other one 1743 var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1; 1744 1745 // Split the offset string to obtain a list of values and operands 1746 // The regex addresses values with the plus or minus sign in front (+10, -20, etc) 1747 var fragments = offset.split(/(\+|\-)/).map(function (frag) { 1748 return frag.trim(); 1749 }); 1750 1751 // Detect if the offset string contains a pair of values or a single one 1752 // they could be separated by comma or space 1753 var divider = fragments.indexOf(find(fragments, function (frag) { 1754 return frag.search(/,|\s/) !== -1; 1755 })); 1756 1757 if (fragments[divider] && fragments[divider].indexOf(',') === -1) { 1758 console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.'); 1759 } 1760 1761 // If divider is found, we divide the list of values and operands to divide 1762 // them by ofset X and Y. 1763 var splitRegex = /\s*,\s*|\s+/; 1764 var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; 1765 1766 // Convert the values with units to absolute pixels to allow our computations 1767 ops = ops.map(function (op, index) { 1768 // Most of the units rely on the orientation of the popper 1769 var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width'; 1770 var mergeWithPrevious = false; 1771 return op 1772 // This aggregates any `+` or `-` sign that aren't considered operators 1773 // e.g.: 10 + +5 => [10, +, +5] 1774 .reduce(function (a, b) { 1775 if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { 1776 a[a.length - 1] = b; 1777 mergeWithPrevious = true; 1778 return a; 1779 } else if (mergeWithPrevious) { 1780 a[a.length - 1] += b; 1781 mergeWithPrevious = false; 1782 return a; 1783 } else { 1784 return a.concat(b); 1785 } 1786 }, []) 1787 // Here we convert the string values into number values (in px) 1788 .map(function (str) { 1789 return toValue(str, measurement, popperOffsets, referenceOffsets); 1790 }); 1791 }); 1792 1793 // Loop trough the offsets arrays and execute the operations 1794 ops.forEach(function (op, index) { 1795 op.forEach(function (frag, index2) { 1796 if (isNumeric(frag)) { 1797 offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1); 1798 } 1799 }); 1800 }); 1801 return offsets; 1802 } 1803 1804 /** 1805 * @function 1806 * @memberof Modifiers 1807 * @argument {Object} data - The data object generated by update method 1808 * @argument {Object} options - Modifiers configuration and options 1809 * @argument {Number|String} options.offset=0 1810 * The offset value as described in the modifier description 1811 * @returns {Object} The data object, properly modified 1812 */ 1813 function offset(data, _ref) { 1814 var offset = _ref.offset; 1815 var placement = data.placement, 1816 _data$offsets = data.offsets, 1817 popper = _data$offsets.popper, 1818 reference = _data$offsets.reference; 1819 1820 var basePlacement = placement.split('-')[0]; 1821 1822 var offsets = void 0; 1823 if (isNumeric(+offset)) { 1824 offsets = [+offset, 0]; 1825 } else { 1826 offsets = parseOffset(offset, popper, reference, basePlacement); 1827 } 1828 1829 if (basePlacement === 'left') { 1830 popper.top += offsets[0]; 1831 popper.left -= offsets[1]; 1832 } else if (basePlacement === 'right') { 1833 popper.top += offsets[0]; 1834 popper.left += offsets[1]; 1835 } else if (basePlacement === 'top') { 1836 popper.left += offsets[0]; 1837 popper.top -= offsets[1]; 1838 } else if (basePlacement === 'bottom') { 1839 popper.left += offsets[0]; 1840 popper.top += offsets[1]; 1841 } 1842 1843 data.popper = popper; 1844 return data; 1845 } 1846 1847 /** 1848 * @function 1849 * @memberof Modifiers 1850 * @argument {Object} data - The data object generated by `update` method 1851 * @argument {Object} options - Modifiers configuration and options 1852 * @returns {Object} The data object, properly modified 1853 */ 1854 function preventOverflow(data, options) { 1855 var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper); 1856 1857 // If offsetParent is the reference element, we really want to 1858 // go one step up and use the next offsetParent as reference to 1859 // avoid to make this modifier completely useless and look like broken 1860 if (data.instance.reference === boundariesElement) { 1861 boundariesElement = getOffsetParent(boundariesElement); 1862 } 1863 1864 // NOTE: DOM access here 1865 // resets the popper's position so that the document size can be calculated excluding 1866 // the size of the popper element itself 1867 var transformProp = getSupportedPropertyName('transform'); 1868 var popperStyles = data.instance.popper.style; // assignment to help minification 1869 var top = popperStyles.top, 1870 left = popperStyles.left, 1871 transform = popperStyles[transformProp]; 1872 1873 popperStyles.top = ''; 1874 popperStyles.left = ''; 1875 popperStyles[transformProp] = ''; 1876 1877 var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); 1878 1879 // NOTE: DOM access here 1880 // restores the original style properties after the offsets have been computed 1881 popperStyles.top = top; 1882 popperStyles.left = left; 1883 popperStyles[transformProp] = transform; 1884 1885 options.boundaries = boundaries; 1886 1887 var order = options.priority; 1888 var popper = data.offsets.popper; 1889 1890 var check = { 1891 primary: function primary(placement) { 1892 var value = popper[placement]; 1893 if (popper[placement] < boundaries[placement] && !options.escapeWithReference) { 1894 value = Math.max(popper[placement], boundaries[placement]); 1895 } 1896 return defineProperty({}, placement, value); 1897 }, 1898 secondary: function secondary(placement) { 1899 var mainSide = placement === 'right' ? 'left' : 'top'; 1900 var value = popper[mainSide]; 1901 if (popper[placement] > boundaries[placement] && !options.escapeWithReference) { 1902 value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height)); 1903 } 1904 return defineProperty({}, mainSide, value); 1905 } 1906 }; 1907 1908 order.forEach(function (placement) { 1909 var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary'; 1910 popper = _extends({}, popper, check[side](placement)); 1911 }); 1912 1913 data.offsets.popper = popper; 1914 1915 return data; 1916 } 1917 1918 /** 1919 * @function 1920 * @memberof Modifiers 1921 * @argument {Object} data - The data object generated by `update` method 1922 * @argument {Object} options - Modifiers configuration and options 1923 * @returns {Object} The data object, properly modified 1924 */ 1925 function shift(data) { 1926 var placement = data.placement; 1927 var basePlacement = placement.split('-')[0]; 1928 var shiftvariation = placement.split('-')[1]; 1929 1930 // if shift shiftvariation is specified, run the modifier 1931 if (shiftvariation) { 1932 var _data$offsets = data.offsets, 1933 reference = _data$offsets.reference, 1934 popper = _data$offsets.popper; 1935 1936 var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1; 1937 var side = isVertical ? 'left' : 'top'; 1938 var measurement = isVertical ? 'width' : 'height'; 1939 1940 var shiftOffsets = { 1941 start: defineProperty({}, side, reference[side]), 1942 end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement]) 1943 }; 1944 1945 data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]); 1946 } 1947 1948 return data; 1949 } 1950 1951 /** 1952 * @function 1953 * @memberof Modifiers 1954 * @argument {Object} data - The data object generated by update method 1955 * @argument {Object} options - Modifiers configuration and options 1956 * @returns {Object} The data object, properly modified 1957 */ 1958 function hide(data) { 1959 if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) { 1960 return data; 1961 } 1962 1963 var refRect = data.offsets.reference; 1964 var bound = find(data.instance.modifiers, function (modifier) { 1965 return modifier.name === 'preventOverflow'; 1966 }).boundaries; 1967 1968 if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) { 1969 // Avoid unnecessary DOM access if visibility hasn't changed 1970 if (data.hide === true) { 1971 return data; 1972 } 1973 1974 data.hide = true; 1975 data.attributes['x-out-of-boundaries'] = ''; 1976 } else { 1977 // Avoid unnecessary DOM access if visibility hasn't changed 1978 if (data.hide === false) { 1979 return data; 1980 } 1981 1982 data.hide = false; 1983 data.attributes['x-out-of-boundaries'] = false; 1984 } 1985 1986 return data; 1987 } 1988 1989 /** 1990 * @function 1991 * @memberof Modifiers 1992 * @argument {Object} data - The data object generated by `update` method 1993 * @argument {Object} options - Modifiers configuration and options 1994 * @returns {Object} The data object, properly modified 1995 */ 1996 function inner(data) { 1997 var placement = data.placement; 1998 var basePlacement = placement.split('-')[0]; 1999 var _data$offsets = data.offsets, 2000 popper = _data$offsets.popper, 2001 reference = _data$offsets.reference; 2002 2003 var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1; 2004 2005 var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1; 2006 2007 popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0); 2008 2009 data.placement = getOppositePlacement(placement); 2010 data.offsets.popper = getClientRect(popper); 2011 2012 return data; 2013 } 2014 2015 /** 2016 * Modifier function, each modifier can have a function of this type assigned 2017 * to its `fn` property.<br /> 2018 * These functions will be called on each update, this means that you must 2019 * make sure they are performant enough to avoid performance bottlenecks. 2020 * 2021 * @function ModifierFn 2022 * @argument {dataObject} data - The data object generated by `update` method 2023 * @argument {Object} options - Modifiers configuration and options 2024 * @returns {dataObject} The data object, properly modified 2025 */ 2026 2027 /** 2028 * Modifiers are plugins used to alter the behavior of your poppers.<br /> 2029 * Popper.js uses a set of 9 modifiers to provide all the basic functionalities 2030 * needed by the library. 2031 * 2032 * Usually you don't want to override the `order`, `fn` and `onLoad` props. 2033 * All the other properties are configurations that could be tweaked. 2034 * @namespace modifiers 2035 */ 2036 var modifiers = { 2037 /** 2038 * Modifier used to shift the popper on the start or end of its reference 2039 * element.<br /> 2040 * It will read the variation of the `placement` property.<br /> 2041 * It can be one either `-end` or `-start`. 2042 * @memberof modifiers 2043 * @inner 2044 */ 2045 shift: { 2046 /** @prop {number} order=100 - Index used to define the order of execution */ 2047 order: 100, 2048 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 2049 enabled: true, 2050 /** @prop {ModifierFn} */ 2051 fn: shift 2052 }, 2053 2054 /** 2055 * The `offset` modifier can shift your popper on both its axis. 2056 * 2057 * It accepts the following units: 2058 * - `px` or unit-less, interpreted as pixels 2059 * - `%` or `%r`, percentage relative to the length of the reference element 2060 * - `%p`, percentage relative to the length of the popper element 2061 * - `vw`, CSS viewport width unit 2062 * - `vh`, CSS viewport height unit 2063 * 2064 * For length is intended the main axis relative to the placement of the popper.<br /> 2065 * This means that if the placement is `top` or `bottom`, the length will be the 2066 * `width`. In case of `left` or `right`, it will be the `height`. 2067 * 2068 * You can provide a single value (as `Number` or `String`), or a pair of values 2069 * as `String` divided by a comma or one (or more) white space
2069s.<br /> 2070 * The latter is a deprecated method because it leads to confusion and will be 2071 * removed in v2.<br /> 2072 * Additionally, it accepts additions and subtractions between different units. 2073 * Note that multiplications and divisions aren't supported. 2074 * 2075 * Valid examples are: 2076 * ``` 2077 * 10 2078 * '10%' 2079 * '10, 10' 2080 * '10%, 10' 2081 * '10 + 10%' 2082 * '10 - 5vh + 3%' 2083 * '-10px + 5vh, 5px - 6%' 2084 * ``` 2085 * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap 2086 * > with their reference element, unfortunately, you will have to disable the `flip` modifier. 2087 * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373). 2088 * 2089 * @memberof modifiers 2090 * @inner 2091 */ 2092 offset: { 2093 /** @prop {number} order=200 - Index used to define the order of execution */ 2094 order: 200, 2095 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 2096 enabled: true, 2097 /** @prop {ModifierFn} */ 2098 fn: offset, 2099 /** @prop {Number|String} offset=0 2100 * The offset value as described in the modifier description 2101 */ 2102 offset: 0 2103 }, 2104 2105 /** 2106 * Modifier used to prevent the popper from being positioned outside the boundary. 2107 * 2108 * A scenario exists where the reference itself is not within the boundaries.<br /> 2109 * We can say it has "escaped the boundaries" — or just "escaped".<br /> 2110 * In this case we need to decide whether the popper should either: 2111 * 2112 * - detach from the reference and remain "trapped" in the boundaries, or 2113 * - if it should ignore the boundary and "escape with its reference" 2114 * 2115 * When `escapeWithReference` is set to`true` and reference is completely 2116 * outside its boundaries, the popper will overflow (or completely leave) 2117 * the boundaries in order to remain attached to the edge of the reference. 2118 * 2119 * @memberof modifiers 2120 * @inner 2121 */ 2122 preventOverflow: { 2123 /** @prop {number} order=300 - Index used to define the order of execution */ 2124 order: 300, 2125 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 2126 enabled: true, 2127 /** @prop {ModifierFn} */ 2128 fn: preventOverflow, 2129 /** 2130 * @prop {Array} [priority=['left','right','top','bottom']] 2131 * Popper will try to prevent overflow following these priorities by default, 2132 * then, it could overflow on the left and on top of the `boundariesElement` 2133 */ 2134 priority: ['left', 'right', 'top', 'bottom'], 2135 /** 2136 * @prop {number} padding=5 2137 * Amount of pixel used to define a minimum distance between the boundaries 2138 * and the popper. This makes sure the popper always has a little padding 2139 * between the edges of its container 2140 */ 2141 padding: 5, 2142 /** 2143 * @prop {String|HTMLElement} boundariesElement='scrollParent' 2144 * Boundaries used by the modifier. Can be `scrollParent`, `window`, 2145 * `viewport` or any DOM element. 2146 */ 2147 boundariesElement: 'scrollParent' 2148 }, 2149 2150 /** 2151 * Modifier used to make sure the reference and its popper stay near each other 2152 * without leaving any gap between the two. Especially useful when the arrow is 2153 * enabled and you want to ensure that it points to its reference element. 2154 * It cares only about the first axis. You can still have poppers with margin 2155 * between the popper and its reference element. 2156 * @memberof modifiers 2157 * @inner 2158 */ 2159 keepTogether: { 2160 /** @prop {number} order=400 - Index used to define the order of execution */ 2161 order: 400, 2162 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 2163 enabled: true, 2164 /** @prop {ModifierFn} */ 2165 fn: keepTogether 2166 }, 2167 2168 /** 2169 * This modifier is used to move the `arrowElement` of the popper to make 2170 * sure it is positioned between the reference element and its popper element. 2171 * It will read the outer size of the `arrowElement` node to detect how many 2172 * pixels of conjunction are needed. 2173 * 2174 * It has no effect if no `arrowElement` is provided. 2175 * @memberof modifiers 2176 * @inner 2177 */ 2178 arrow: { 2179 /** @prop {number} order=500 - Index used to define the order of execution */ 2180 order: 500, 2181 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 2182 enabled: true, 2183 /** @prop {ModifierFn} */ 2184 fn: arrow, 2185 /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */ 2186 element: '[x-arrow]' 2187 }, 2188 2189 /** 2190 * Modifier used to flip the popper's placement when it starts to overlap its 2191 * reference element. 2192 * 2193 * Requires the `preventOverflow` modifier before it in order to work. 2194 * 2195 * **NOTE:** this modifier will interrupt the current update cycle and will 2196 * restart it if it detects the need to flip the placement. 2197 * @memberof modifiers 2198 * @inner 2199 */ 2200 flip: { 2201 /** @prop {number} order=600 - Index used to define the order of execution */ 2202 order: 600, 2203 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 2204 enabled: true, 2205 /** @prop {ModifierFn} */ 2206 fn: flip, 2207 /** 2208 * @prop {String|Array} behavior='flip' 2209 * The behavior used to change the popper's placement. It can be one of 2210 * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid 2211 * placements (with optional variations) 2212 */ 2213 behavior: 'flip', 2214 /** 2215 * @prop {number} padding=5 2216 * The popper will flip if it hits the edges of the `boundariesElement` 2217 */ 2218 padding: 5, 2219 /** 2220 * @prop {String|HTMLElement} boundariesElement='viewport' 2221 * The element which will define the boundaries of the popper position. 2222 * The popper will never be placed outside of the defined boundaries 2223 * (except if `keepTogether` is enabled) 2224 */ 2225 boundariesElement: 'viewport', 2226 /** 2227 * @prop {Boolean} flipVariations=false 2228 * The popper will switch placement variation between `-start` and `-end` when 2229 * the reference element overlaps its boundaries. 2230 * 2231 * The original placement should have a set variation. 2232 */ 2233 flipVariations: false, 2234 /** 2235 * @prop {Boolean} flipVariationsByContent=false 2236 * The popper will switch placement variation between `-start` and `-end` when 2237 * the popper element overlaps its reference boundaries. 2238 * 2239 * The original placement should have a set variation. 2240 */ 2241 flipVariationsByContent: false 2242 }, 2243 2244 /** 2245 * Modifier used to make the popper flow toward the inner of the reference element. 2246 * By default, when this modifier is disabled, the popper will be placed outside 2247 * the reference element. 2248 * @memberof modifiers 2249 * @inner 2250 */ 2251 inner: { 2252 /** @prop {number} order=700 - Index used to define the order of execution */ 2253 order: 700, 2254 /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */ 2255 enabled: false, 2256 /** @prop {ModifierFn} */ 2257 fn: inner 2258 }, 2259 2260 /** 2261 * Modifier used to hide the popper when its reference element is outside of the 2262 * popper boundaries. It will set a `x-out-of-boundaries` attribute which can 2263 * be used to hide with a CSS selector the popper when its reference is 2264 * out of boundaries. 2265 * 2266 * Requires the `preventOverflow` modifier before it in order to work. 2267 * @memberof modifiers 2268 * @inner 2269 */ 2270 hide: { 2271 /** @prop {number} order=800 - Index used to define the order of execution */ 2272 order: 800, 2273 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 2274 enabled: true, 2275 /** @prop {ModifierFn} */ 2276 fn: hide 2277 }, 2278 2279 /** 2280 * Computes the style that will be applied to the popper element to gets 2281 * properly positioned. 2282 * 2283 * Note that this modifier will not touch the DOM, it just prepares the styles 2284 * so that `applyStyle` modifier can apply it. This separation is useful 2285 * in case you need to replace `applyStyle` with a custom implementation. 2286 * 2287 * This modifier has `850` as `order` value to maintain backward compatibility 2288 * with previous versions of Popper.js. Expect the modifiers ordering method 2289 * to change in future major versions of the library. 2290 * 2291 * @memberof modifiers 2292 * @inner 2293 */ 2294 computeStyle: { 2295 /** @prop {number} order=850 - Index used to define the order of execution */ 2296 order: 850, 2297 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 2298 enabled: true, 2299 /** @prop {ModifierFn} */ 2300 fn: computeStyle, 2301 /** 2302 * @prop {Boolean} gpuAcceleration=true 2303 * If true, it uses the CSS 3D transformation to position the popper. 2304 * Otherwise, it will use the `top` and `left` properties 2305 */ 2306 gpuAcceleration: true, 2307 /** 2308 * @prop {string} [x='bottom'] 2309 * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin. 2310 * Change this if your popper should grow in a direction different from `bottom` 2311 */ 2312 x: 'bottom', 2313 /** 2314 * @prop {string} [x='left'] 2315 * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin. 2316 * Change this if your popper should grow in a direction different from `right` 2317 */ 2318 y: 'right' 2319 }, 2320 2321 /** 2322 * Applies the computed styles to the popper element. 2323 * 2324 * All the DOM manipulations are limited to this modifier. This is useful in case 2325 * you want to integrate Popper.js inside a framework or view library and you 2326 * want to delegate all the DOM manipulations to it. 2327 * 2328 * Note that if you disable this modifier, you must make sure the popper element 2329 * has its position set to `absolute` before Popper.js can do its work! 2330 * 2331 * Just disable this modifier and define your own to achieve the desired effect. 2332 * 2333 * @memberof modifiers 2334 * @inner 2335 */ 2336 applyStyle: { 2337 /** @prop {number} order=900 - Index used to define the order of execution */ 2338 order: 900, 2339 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 2340 enabled: true, 2341 /** @prop {ModifierFn} */
vendor: 5,657 bytes, lines 2342-2480
2342 fn: applyStyle, 2343 /** @prop {Function} */ 2344 onLoad: applyStyleOnLoad, 2345 /** 2346 * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier 2347 * @prop {Boolean} gpuAcceleration=true 2348 * If true, it uses the CSS 3D transformation to position the popper. 2349 * Otherwise, it will use the `top` and `left` properties 2350 */ 2351 gpuAcceleration: undefined 2352 } 2353 }; 2354 2355 /** 2356 * The `dataObject` is an object containing all the information used by Popper.js. 2357 * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks. 2358 * @name dataObject 2359 * @property {Object} data.instance The Popper.js instance 2360 * @property {String} data.placement Placement applied to popper 2361 * @property {String} data.originalPlacement Placement originally defined on init 2362 * @property {Boolean} data.flipped True if popper has been flipped by flip modifier 2363 * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper 2364 * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier 2365 * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`) 2366 * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`) 2367 * @property {Object} data.boundaries Offsets of the popper boundaries 2368 * @property {Object} data.offsets The measurements of popper, reference and arrow elements 2369 * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values 2370 * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values 2371 * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0 2372 */ 2373 2374 /** 2375 * Default options provided to Popper.js constructor.<br /> 2376 * These can be overridden using the `options` argument of Popper.js.<br /> 2377 * To override an option, simply pass an object with the same 2378 * structure of the `options` object, as the 3rd argument. For example: 2379 * ``` 2380 * new Popper(ref, pop, { 2381 * modifiers: { 2382 * preventOverflow: { enabled: false } 2383 * } 2384 * }) 2385 * ``` 2386 * @type {Object} 2387 * @static 2388 * @memberof Popper 2389 */ 2390 var Defaults = { 2391 /** 2392 * Popper's placement. 2393 * @prop {Popper.placements} placement='bottom' 2394 */ 2395 placement: 'bottom', 2396 2397 /** 2398 * Set this to true if you want popper to position it self in 'fixed' mode 2399 * @prop {Boolean} positionFixed=false 2400 */ 2401 positionFixed: false, 2402 2403 /** 2404 * Whether events (resize, scroll) are initially enabled. 2405 * @prop {Boolean} eventsEnabled=true 2406 */ 2407 eventsEnabled: true, 2408 2409 /** 2410 * Set to true if you want to automatically remove the popper when 2411 * you call the `destroy` method. 2412 * @prop {Boolean} removeOnDestroy=false 2413 */ 2414 removeOnDestroy: false, 2415 2416 /** 2417 * Callback called when the popper is created.<br /> 2418 * By default, it is set to no-op.<br /> 2419 * Access Popper.js instance with `data.instance`. 2420 * @prop {onCreate} 2421 */ 2422 onCreate: function onCreate() { }, 2423 2424 /** 2425 * Callback called when the popper is updated. This callback is not called 2426 * on the initialization/creation of the popper, but only on subsequent 2427 * updates.<br /> 2428 * By default, it is set to no-op.<br /> 2429 * Access Popper.js instance with `data.instance`. 2430 * @prop {onUpdate} 2431 */ 2432 onUpdate: function onUpdate() { }, 2433 2434 /** 2435 * List of modifiers used to modify the offsets before they are applied to the popper. 2436 * They provide most of the functionalities of Popper.js. 2437 * @prop {modifiers} 2438 */ 2439 modifiers: modifiers 2440 }; 2441 2442 /** 2443 * @callback onCreate 2444 * @param {dataObject} data 2445 */ 2446 2447 /** 2448 * @callback onUpdate 2449 * @param {dataObject} data 2450 */ 2451 2452 // Utils 2453 // Methods 2454 var Popper = function () { 2455 /** 2456 * Creates a new Popper.js instance. 2457 * @class Popper 2458 * @param {Element|referenceObject} reference - The reference element used to position the popper 2459 * @param {Element} popper - The HTML / XML element used as the popper 2460 * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults) 2461 * @return {Object} instance - The generated Popper.js instance 2462 */ 2463 function Popper(reference, popper) { 2464 var _this = this; 2465 2466 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; 2467 classCallCheck(this, Popper); 2468 2469 this.scheduleUpdate = function () { 2470 return requestAnimationFrame(_this.update); 2471 }; 2472 2473 // make update() debounced, so that it only runs at most once-per-tick 2474 this.update = debounce(this.update.bind(this)); 2475 2476 // with {} we create a new object with the options inside it 2477 this.options = _extends({}, Popper.Defaults, options); 2478 2479 // init state 2480 this.state = {
2481 isDestroyed: false, 2482 isCreated: false, 2483 scrollParents: [] 2484 }; 2485 2486 // get reference and popper elements (allow jQuery wrappers) 2487 this.reference = reference && reference.jquery ? reference[0] : reference; 2488 this.popper = popper && popper.jquery ? popper[0] : popper; 2489 2490 // Deep merge modifiers options 2491 this.options.modifiers = {}; 2492 Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) { 2493 _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {}); 2494 }); 2495 2496 // Refactoring modifiers' list (Object => Array) 2497 this.modifiers = Object.keys(this.options.modifiers).map(function (name) { 2498 return _extends({ 2499 name: name 2500 }, _this.options.modifiers[name]); 2501 }) 2502 // sort the modifiers by order 2503 .sort(function (a, b) { 2504 return a.order - b.order; 2505 }); 2506 2507 // modifiers have the ability to execute arbitrary code when Popper.js get inited 2508 // such code is executed in the same order of its modifier 2509 // they could add new properties to their options configuration 2510 // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`! 2511 this.modifiers.forEach(function (modifierOptions) { 2512 if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) { 2513 modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state); 2514 } 2515 }); 2516 2517 // fire the first update to position the popper in the right place 2518 this.update(); 2519 2520 var eventsEnabled = this.options.eventsEnabled; 2521 if (eventsEnabled) { 2522 // setup event listeners, they will take care of update the position in specific situations 2523 this.enableEventListeners(); 2524 } 2525 2526 this.state.eventsEnabled = eventsEnabled; 2527 } 2528 2529 // We can't use class properties because they don't get listed in the 2530 // class prototype and break stuff like Sinon stubs 2531 2532 2533 createClass(Popper, [{ 2534 key: 'update', 2535 value: function update$$1() { 2536 return update.call(this); 2537 } 2538 }, { 2539 key: 'destroy', 2540 value: function destroy$$1() { 2541 return destroy.call(this); 2542 } 2543 }, { 2544 key: 'enableEventListeners', 2545 value: function enableEventListeners$$1() { 2546 return enableEventListeners.call(this); 2547 } 2548 }, { 2549 key: 'disableEventListeners', 2550 value: function disableEventListeners$$1() { 2551 return disableEventListeners.call(this); 2552 } 2553 2554 /** 2555 * Schedules an update. It will run on the next UI update available. 2556 * @method scheduleUpdate 2557 * @memberof Popper 2558 */ 2559 2560 2561 /** 2562 * Collection of utilities useful when writing custom modifiers. 2563 * Starting from version 1.7, this method is available only if you 2564 * include `popper-utils.js` before `popper.js`. 2565 * 2566 * **DEPRECATION**: This way to access PopperUtils is deprecated 2567 * and will be removed in v2! Use the PopperUtils module directly instead. 2568 * Due to the high instability of the methods contained in Utils, we can't 2569 * guarantee them to follow semver. Use them at your own risk! 2570 * @static 2571 * @private 2572 * @type {Object} 2573 * @deprecated since version 1.8 2574 * @member Utils 2575 * @memberof Popper 2576 */ 2577 2578 }]); 2579 return Popper; 2580 }(); 2581 2582 /** 2583 * The `referenceObject` is an object that provides an interface compatible with Popper.js 2584 * and lets you use it as replacement of a real DOM node.<br /> 2585 * You can use this method to position a popper relatively to a set of coordinates 2586 * in case you don't have a DOM node to use as reference. 2587 * 2588 * ``` 2589 * new Popper(referenceObject, popperNode); 2590 * ``` 2591 * 2592 * NB: This feature isn't supported in Internet Explorer 10. 2593 * @name referenceObject 2594 * @property {Function} data.getBoundingClientRect 2595 * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method. 2596 * @property {number} data.clientWidth 2597 * An ES6 getter that will return the width of the virtual reference element. 2598 * @property {number} data.clientHeight 2599 * An ES6 getter that will return the height of the virtual reference element. 2600 */ 2601 2602 2603 Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils; 2604 Popper.placements = placements; 2605 Popper.Defaults = Defaults; 2606 2607 return Popper; 2608 2609}))); 2610/*! 2611 * Bootstrap v5.0.2 (https://getbootstrap.com/) 2612 * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 2613 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 2614 */ 2615!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).bootstrap = e() }(this, (function () { "use strict"; const t = { find: (t, e = document.documentElement) => [].concat(...Element.prototype.querySelectorAll.call(e, t)), findOne: (t, e = document.documentElement) => Element.prototype.querySelector.call(e, t), children: (t, e) => [].concat(...t.children).filter(t => t.matches(e)), parents(t, e) { const i = []; let n = t.parentNode; for (; n && n.nodeType === Node.ELEMENT_NODE && 3 !== n.nodeType;)n.matches(e) && i.push(n), n = n.parentNode; return i }, prev(t, e) { let i = t.previousElementSibling; for (; i;) { if (i.matches(e)) return [i]; i = i.previousElementSibling } return [] }, next(t, e) { let i = t.nextElementSibling; for (; i;) { if (i.matches(e)) return [i]; i = i.nextElementSibling } return [] } }, e = t => { do { t += Math.floor(1e6 * Math.random()) } while (document.getElementById(t)); return t }, i = t => { let e = t.getAttribute("data-bs-target"); if (!e || "#" === e) { let i = t.getAttribute("href"); if (!i || !i.includes("#") && !i.startsWith(".")) return null; i.includes("#") && !i.startsWith("#") && (i = "#" + i.split("#")[1]), e = i && "#" !== i ? i.trim() : null } return e }, n = t => { const e = i(t); return e && document.querySelector(e) ? e : null }, s = t => { const e = i(t); return e ? document.querySelector(e) : null }, o = t => { t.dispatchEvent(new Event("transitionend")) }, r = t => !(!t || "object" != typeof t) && (void 0 !== t.jquery && (t = t[0]), void 0 !== t.nodeType), a = e => r(e) ? e.jquery ? e[0] : e : "string" == typeof e && e.length > 0 ? t.findOne(e) : null, l = (t, e, i) =>
vendor: 21,426 bytes, line 2615
2615 { Object.keys(i).forEach(n => { const s = i[n], o = e[n], a = o && r(o) ? "element" : null == (l = o) ? "" + l : {}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase(); var l; if (!new RegExp(s).test(a)) throw new TypeError(`${t.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${s}".`) }) }, c = t => !(!r(t) || 0 === t.getClientRects().length) && "visible" === getComputedStyle(t).getPropertyValue("visibility"), h = t => !t || t.nodeType !== Node.ELEMENT_NODE || !!t.classList.contains("disabled") || (void 0 !== t.disabled ? t.disabled : t.hasAttribute("disabled") && "false" !== t.getAttribute("disabled")), d = t => { if (!document.documentElement.attachShadow) return null; if ("function" == typeof t.getRootNode) { const e = t.getRootNode(); return e instanceof ShadowRoot ? e : null } return t instanceof ShadowRoot ? t : t.parentNode ? d(t.parentNode) : null }, u = () => { }, f = t => t.offsetHeight, p = () => { const { jQuery: t } = window; return t && !document.body.hasAttribute("data-bs-no-jquery") ? t : null }, m = [], g = () => "rtl" === document.documentElement.dir, _ = t => { var e; e = () => { const e = p(); if (e) { const i = t.NAME, n = e.fn[i]; e.fn[i] = t.jQueryInterface, e.fn[i].Constructor = t, e.fn[i].noConflict = () => (e.fn[i] = n, t.jQueryInterface) } }, "loading" === document.readyState ? (m.length || document.addEventListener("DOMContentLoaded", () => { m.forEach(t => t()) }), m.push(e)) : e() }, b = t => { "function" == typeof t && t() }, v = (t, e, i = !0) => { if (!i) return void b(t); const n = (t => { if (!t) return 0; let { transitionDuration: e, transitionDelay: i } = window.getComputedStyle(t); const n = Number.parseFloat(e), s = Number.parseFloat(i); return n || s ? (e = e.split(",")[0], i = i.split(",")[0], 1e3 * (Number.parseFloat(e) + Number.parseFloat(i))) : 0 })(e) + 5; let s = !1; const r = ({ target: i }) => { i === e && (s = !0, e.removeEventListener("transitionend", r), b(t)) }; e.addEventListener("transitionend", r), setTimeout(() => { s || o(e) }, n) }, y = (t, e, i, n) => { let s = t.indexOf(e); if (-1 === s) return t[!i && n ? t.length - 1 : 0]; const o = t.length; return s += i ? 1 : -1, n && (s = (s + o) % o), t[Math.max(0, Math.min(s, o - 1))] }, w = /[^.]*(?=\..*)\.|.*/, E = /\..*/, A = /::\d+$/, T = {}; let O = 1; const C = { mouseenter: "mouseover", mouseleave: "mouseout" }, k = /^(mouseenter|mouseleave)/i, L = new Set(["click", "dblclick", "mouseup", "mousedown", "contextmenu", "mousewheel", "DOMMouseScroll", "mouseover", "mouseout", "mousemove", "selectstart", "selectend", "keydown", "keypress", "keyup", "orientationchange", "touchstart", "touchmove", "touchend", "touchcancel", "pointerdown", "pointermove", "pointerup", "pointerleave", "pointercancel", "gesturestart", "gesturechange", "gestureend", "focus", "blur", "change", "reset", "select", "submit", "focusin", "focusout", "load", "unload", "beforeunload", "resize", "move", "DOMContentLoaded", "readystatechange", "error", "abort", "scroll"]); function x(t, e) { return e && `${e}::${O++}` || t.uidEvent || O++ } function D(t) { const e = x(t); return t.uidEvent = e, T[e] = T[e] || {}, T[e] } function S(t, e, i = null) { const n = Object.keys(t); for (let s = 0, o = n.length; s < o; s++) { const o = t[n[s]]; if (o.originalHandler === e && o.delegationSelector === i) return o } return null } function I(t, e, i) { const n = "string" == typeof e, s = n ? i : e; let o = M(t); return L.has(o) || (o = t), [n, s, o] } function N(t, e, i, n, s) { if ("string" != typeof e || !t) return; if (i || (i = n, n = null), k.test(e)) { const t = t => function (e) { if (!e.relatedTarget || e.relatedTarget !== e.delegateTarget && !e.delegateTarget.contains(e.relatedTarget)) return t.call(this, e) }; n ? n = t(n) : i = t(i) } const [o, r, a] = I(e, i, n), l = D(t), c = l[a] || (l[a] = {}), h = S(c, r, o ? i : null); if (h) return void (h.oneOff = h.oneOff && s); const d = x(r, e.replace(w, "")), u = o ? function (t, e, i) { return function n(s) { const o = t.querySelectorAll(e); for (let { target: r } = s; r && r !== this; r = r.parentNode)for (let a = o.length; a--;)if (o[a] === r) return s.delegateTarget = r, n.oneOff && P.off(t, s.type, e, i), i.apply(r, [s]); return null } }(t, i, n) : function (t, e) { return function i(n) { return n.delegateTarget = t, i.oneOff && P.off(t, n.type, e), e.apply(t, [n]) } }(t, i); u.delegationSelector = o ? i : null, u.originalHandler = r, u.oneOff = s, u.uidEvent = d, c[d] = u, t.addEventListener(a, u, o) } function j(t, e, i, n, s) { const o = S(e[i], n, s); o && (t.removeEventListener(i, o, Boolean(s)), delete e[i][o.uidEvent]) } function M(t) { return t = t.replace(E, ""), C[t] || t } const P = { on(t, e, i, n) { N(t, e, i, n, !1) }, one(t, e, i, n) { N(t, e, i, n, !0) }, off(t, e, i, n) { if ("string" != typeof e || !t) return; const [s, o, r] = I(e, i, n), a = r !== e, l = D(t), c = e.startsWith("."); if (void 0 !== o) { if (!l || !l[r]) return; return void j(t, l, r, o, s ? i : null) } c && Object.keys(l).forEach(i => { !function (t, e, i, n) { const s = e[i] || {}; Object.keys(s).forEach(o => { if (o.includes(n)) { const n = s[o]; j(t, e, i, n.originalHandler, n.delegationSelector) } }) }(t, l, i, e.slice(1)) }); const h = l[r] || {}; Object.keys(h).forEach(i => { const n = i.replace(A, ""); if (!a || e.includes(n)) { const e = h[i]; j(t, l, r, e.originalHandler, e.delegationSelector) } }) }, trigger(t, e, i) { if ("string" != typeof e || !t) return null; const n = p(), s = M(e), o = e !== s, r = L.has(s); let a, l = !0, c = !0, h = !1, d = null; return o && n && (a = n.Event(e, i), n(t).trigger(a), l = !a.isPropagationStopped(), c = !a.isImmediatePropagationStopped(), h = a.isDefaultPrevented()), r ? (d = document.createEvent("HTMLEvents"), d.initEvent(s, l, !0)) : d = new CustomEvent(e, { bubbles: l, cancelable: !0 }), void 0 !== i && Object.keys(i).forEach(t => { Object.defineProperty(d, t, { get: () => i[t] }) }), h && d.preventDefault(), c && t.dispatchEvent(d), d.defaultPrevented && void 0 !== a && a.preventDefault(), d } }, H = new Map; var R = { set(t, e, i) { H.has(t) || H.set(t, new Map); const n = H.get(t); n.has(e) || 0 === n.size ? n.set(e, i) : console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`) }, get: (t, e) => H.has(t) && H.get(t).get(e) || null, remove(t, e) { if (!H.has(t)) return; const i = H.get(t); i.delete(e), 0 === i.size && H.delete(t) } }; class B { constructor(t) { (t = a(t)) && (this._element = t, R.set(this._element, this.constructor.DATA_KEY, this)) } dispose() { R.remove(this._element, this.constructor.DATA_KEY), P.off(this._element, this.constructor.EVENT_KEY), Object.getOwnPropertyNames(this).forEach(t => { this[t] = null }) } _queueCallback(t, e, i = !0) { v(t, e, i) } static getInstance(t) { return R.get(t, this.DATA_KEY) } static getOrCreateInstance(t, e = {}) { return this.getInstance(t) || new this(t, "object" == typeof e ? e : null) } static get VERSION() { return "5.0.2" } static get NAME() { throw new Error('You have to implement the static method "NAME", for each component!') } static get DATA_KEY() { return "bs." + this.NAME } static get EVENT_KEY() { return "." + this.DATA_KEY } } class W extends B { static get NAME() { return "alert" } close(t) { const e = t ? this._getRootElement(t) : this._element, i = this._triggerCloseEvent(e); null === i || i.defaultPrevented || this._removeElement(e) } _getRootElement(t) { return s(t) || t.closest(".alert") } _triggerCloseEvent(t) { return P.trigger(t, "close.bs.alert") } _removeElement(t) { t.classList.remove("show"); const e = t.classList.contains("fade"); this._queueCallback(() => this._destroyElement(t), t, e) } _destroyElement(t) { t.remove(), P.trigger(t, "closed.bs.alert") } static jQueryInterface(t) { return this.each((function () { const e = W.getOrCreateInstance(this); "close" === t && e[t](this) })) } static handleDismiss(t) { return function (e) { e && e.preventDefault(), t.close(this) } } } P.on(document, "click.bs.alert.data-api", '[data-bs-dismiss="alert"]', W.handleDismiss(new W)), _(W); class q extends B { static get NAME() { return "button" } toggle() { this._element.setAttribute("aria-pressed", this._element.classList.toggle("active")) } static jQueryInterface(t) { return this.each((function () { const e = q.getOrCreateInstance(this); "toggle" === t && e[t]() })) } } function z(t) { return "true" === t || "false" !== t && (t === Number(t).toString() ? Number(t) : "" === t || "null" === t ? null : t) } function $(t) { return t.replace(/[A-Z]/g, t => "-" + t.toLowerCase()) } P.on(document, "click.bs.button.data-api", '[data-bs-toggle="button"]', t => { t.preventDefault(); const e = t.target.closest('[data-bs-toggle="button"]'); q.getOrCreateInstance(e).toggle() }), _(q); const U = { setDataAttribute(t, e, i) { t.setAttribute("data-bs-" + $(e), i) }, removeDataAttribute(t, e) { t.removeAttribute("data-bs-" + $(e)) }, getDataAttributes(t) { if (!t) return {}; const e = {}; return Object.keys(t.dataset).filter(t => t.startsWith("bs")).forEach(i => { let n = i.replace(/^bs/, ""); n = n.charAt(0).toLowerCase() + n.slice(1, n.length), e[n] = z(t.dataset[i]) }), e }, getDataAttribute: (t, e) => z(t.getAttribute("data-bs-" + $(e))), offset(t) { const e = t.getBoundingClientRect(); return { top: e.top + document.body.scrollTop, left: e.left + document.body.scrollLeft } }, position: t => ({ top: t.offsetTop, left: t.offsetLeft }) }, F = { interval: 5e3, keyboard: !0, slide: !1, pause: "hover", wrap: !0, touch: !0 }, V = { interval: "(number|boolean)", keyboard: "boolean", slide: "(boolean|string)", pause: "(string|boolean)", wrap: "boolean", touch: "boolean" }, K = "next", X = "prev", Y = "left", Q = "right", G = { ArrowLeft: Q, ArrowRight: Y }; class Z extends B { constructor(e, i) { super(e), this._items = null, this._interval = null, this._activeElement = null, this._isPaused = !1, this._isSliding = !1, this.touchTimeout = null, this.touchStartX = 0, this.touchDeltaX = 0, this._config = this._getConfig(i), this._indicatorsElement = t.findOne(".carousel-indicators", this._element), this._touchSupported = "ontouchstart" in document.documentElement || navigator.maxTouchPoints > 0, this._pointerEvent = Boolean(window.PointerEvent), this._addEventListeners() } static get Default() { return F } static get NAME() { return "carousel" } next() { this._slide(K) } nextWhenVisible() { !document.hidden && c(this._element) && this.next() } prev() { this._slide(X) } pause(e) { e || (this._isPaused = !0), t.findOne(".carousel-item-next, .carousel-item-prev", this._element) && (o(this._element), this.cycle(!0)), clearInterval(this._interval), this._interval = null } cycle(t) { t || (this._isPaused = !1), this._interval && (clearInterval(this._interval), this._interval = null), this._config && this._config.interval && !this._isPaused && (this._updateInterval(), this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval)) } to(e) { this._activeElement = t.findOne(".active.carousel-item", this._element); const i = this._getItemIndex(this._activeElement); if (e > this._items.length - 1 || e < 0) return; if (this._isSliding) return void P.one(this._element, "slid.bs.carousel", () => this.to(e)); if (i === e) return this.pause(), void this.cycle(); const n = e > i ? K : X; this._slide(n, this._items[e]) } _getConfig(t) { return t = { ...F, ...U.getDataAttributes(this._element), ..."object" == typeof t ? t : {} }, l("carousel", t, V), t } _handleSwipe() { const t = Math.abs(this.touchDeltaX); if (t <= 40) return; const e = t / this.touchDeltaX; this.touchDeltaX = 0, e && this._slide(e > 0 ? Q : Y) } _addEventListeners() { this._config.keyboard && P.on(this._element, "keydown.bs.carousel", t => this._keydown(t)), "hover" === this._config.pause && (P.on(this._element, "mouseenter.bs.carousel", t => this.pause(t)), P.on(this._element, "mouseleave.bs.carousel", t => this.cycle(t))), this._config.touch && this._touchSupported && this._addTouchEventListeners() } _addTouchEventListeners() { const e = t => { !this._pointerEvent || "pen" !== t.pointerType && "touch" !== t.pointerType ? this._pointerEvent || (this.touchStartX = t.touches[0].clientX) : this.touchStartX = t.clientX }, i = t => { this.touchDeltaX = t.touches && t.touches.length > 1 ? 0 : t.touches[0].clientX - this.touchStartX }, n = t => { !this._pointerEvent || "pen" !== t.pointerType && "touch" !== t.pointerType || (this.touchDeltaX = t.clientX - this.touchStartX), this._handleSwipe(), "hover" === this._config.pause && (this.pause(), this.touchTimeout && clearTimeout(this.touchTimeout), this.touchTimeout = setTimeout(t => this.cycle(t), 500 + this._config.interval)) }; t.find(".carousel-item img", this._element).forEach(t => { P.on(t, "dragstart.bs.carousel", t => t.preventDefault()) }), this._pointerEvent ? (P.on(this._element, "pointerdown.bs.carousel", t => e(t)), P.on(this._element, "pointerup.bs.carousel", t => n(t)), this._element.classList.add("pointer-event")) : (P.on(this._element, "touchstart.bs.carousel", t => e(t)), P.on(this._element, "touchmove.bs.carousel", t => i(t)), P.on(this._element, "touchend.bs.carousel", t => n(t))) } _keydown(t) { if (/input|textarea/i.test(t.target.tagName)) return; const e = G[t.key]; e && (t.preventDefault(), this._slide(e)) } _getItemIndex(e) { return this._items = e && e.parentNode ? t.find(".carousel-item", e.parentNode) : [], this._items.indexOf(e) } _getItemByOrder(t, e) { const i = t === K; return y(this._items, e, i, this._config.wrap) } _triggerSlideEvent(e, i) { const n = this._getItemIndex(e), s = this._getItemIndex(t.findOne(".active.carousel-item", this._element)); return P.trigger(this._element, "slide.bs.carousel", { relatedTarget: e, direction: i, from: s, to: n }) } _setActiveIndicatorElement(e) { if (this._indicatorsElement) { const i = t.findOne(".active", this._indicatorsElement); i.classList.remove("active"), i.removeAttribute("aria-current"); const n = t.find("[data-bs-target]", this._indicatorsElement); for (let t = 0; t < n.length; t++)if (Number.parseInt(n[t].getAttribute("data-bs-slide-to"), 10) === this._getItemIndex(e)) { n[t].classList.add("active"), n[t].setAttribute("aria-current", "true"); break } } } _updateInterval() { const e = this._activeElement || t.findOne(".active.carousel-item", this._element); if (!e) return; const i = Number.parseInt(e.getAttribute("data-bs-interval"), 10); i ? (this._config.defaultInterval = this._config.defaultInterval || this._config.interval, this._config.interval = i) : this._config.interval = this._config.defaultInterval || this._config.interval } _slide(e, i) { const n = this._directionToOrder(e), s = t.findOne(".active.carousel-item", this._element), o = this._getItemIndex(s), r = i || this._getItemByOrder(n, s), a = this._getItemIndex(r), l = Boolean(this._interval), c = n === K, h = c ? "carousel-item-start" : "carousel-item-end", d = c ? "carousel-item-next" : "carousel-item-prev", u = this._orderToDirection(n); if (r && r.classList.contains("active")) return void (this._isSliding = !1); if (this._isSliding) return; if (this._triggerSlideEvent(r, u).defaultPrevented) return; if (!s || !r) return; this._isSliding = !0, l && this.pause(), this._setActiveIndicatorElement(r), this._activeElement = r; const p = () => { P.trigger(this._element, "slid.bs.carousel", { relatedTarget: r, direction: u, from: o, to: a }) }; if (this._element.classList.contains("slide")) { r.classList.add(d), f(r), s.classList.add(h), r.classList.add(h); const t = () => { r.classList.remove(h, d), r.classList.add("active"), s.classList.remove("active", d, h), this._isSliding = !1, setTimeout(p, 0) }; this._queueCallback(t, s, !0) } else s.classList.remove("active"), r.classList.add("active"), this._isSliding = !1, p(); l && this.cycle() } _directionToOrder(t) { return [Q, Y].includes(t) ? g() ? t === Y ? X : K : t === Y ? K : X : t } _orderToDirection(t) { return [K, X].includes(t) ? g() ? t === X ? Y : Q : t === X ? Q : Y : t } static carouselInterface(t, e) { const i = Z.getOrCreateInstance(t, e); let { _config: n } = i; "object" == typeof e && (n = { ...n, ...e }); const s = "string" == typeof e ? e : n.slide; if ("number" == typeof e) i.to(e); else if ("string" == typeof s) { if (void 0 === i[s]) throw new TypeError(`No method named "${s}"`); i[s]() } else n.interval && n.ride && (i.pause(), i.cycle()) } static jQueryInterface(t) { return this.each((function () { Z.carouselInterface(this, t) })) } static dataApiClickHandler(t) { const e = s(this); if (!e || !e.classList.contains("carousel")) return; const i = { ...U.getDataAttributes(e), ...U.getDataAttributes(this) }, n = this.getAttribute("data-bs-slide-to"); n && (i.interval = !1), Z.carouselInterface(e, i), n && Z.getInstance(e).to(n), t.preventDefault() } } P.on(document, "click.bs.carousel.data-api", "[data-bs-slide], [data-bs-slide-to]", Z.dataApiClickHandler), P.on(window, "load.bs.carousel.data-api", () => { const e = t.find('[data-bs-ride="carousel"]'); for (let t = 0, i = e.length; t < i; t++)Z.carouselInterface(e[t], Z.getInstance(e[t])) }), _(Z); const J = { toggle: !0, parent: "" }, tt = { toggle: "boolean", parent: "(string|element)" }; class et extends B { constructor(e, i) { super(e), this._isTransitioning = !1, this._config = this._getConfig(i), this._triggerArray = t.find(`[data-bs-toggle="collapse"][href="#${this._element.id}"],[data-bs-toggle="collapse"][data-bs-target="#${this._element.id}"]`); const s = t.find('[data-bs-toggle="collapse"]'); for (let e = 0, i = s.length; e < i; e++) { const i = s[e], o = n(i), r = t.find(o).filter(t => t === this._element); null !== o && r.length && (this._selector = o, this._triggerArray.push(i)) } this._parent = this._config.parent ? this._getParent() : null, this._config.parent || this._addAriaAndCollapsedClass(this._element, this._triggerArray), this._config.toggle && this.toggle() } static get Default() { return J } static get NAME() { return "collapse" } toggle() { this._element.classList.contains("show") ? this.hide() : this.show() } show() { if (this._isTransitioning || this._element.classList.contains("show")) return; let e, i; this._parent && (e = t.find(".show, .collapsing", this._parent).filter(t => "string" == typeof this._config.parent ? t.getAttribute("data-bs-parent") === this._config.parent : t.classList.contains("collapse")), 0 === e.length && (e = null)); const n = t.findOne(this._selector); if (e) { const t = e.find(t => n !== t); if (i = t ? et.getInstance(t) : null, i && i._isTransitioning) return } if (P.trigger(this._element, "show.bs.collapse").defaultPrevented) return; e && e.forEach(t => { n !== t && et.collapseInterface(t, "hide"), i || R.set(t, "bs.collapse", null) }); const s = this._getDimension(); this._element.classList.remove("collapse"), this._element.classList.add("collapsing"), this._element.style[s] = 0, this._triggerArray.length && this._triggerArray.forEach(t => { t.classList.remove("collapsed"), t.setAttribute("aria-expanded", !0) }), this.setTransitioning(!0); const o = "scroll" + (s[0].toUpperCase() + s.slice(1)); this._queueCallback(() => { this._element.classList.remove("collapsing"), this._element.classList.add("collapse", "show"), this._element.style[s] = "", this.setTransitioning(!1), P.trigger(this._element, "shown.bs.collapse") }, this._element, !0), this._element.style[s] = this._element[o] + "px" } hide() { if (this._isTransitioning || !this._element.classList.contains("show")) return; if (P.trigger(this._element, "hide.bs.collapse").defaultPrevented) return; const t = this._getDimension(); this._element.style[t] = this._element.getBoundingClientRect()[t] + "px", f(this._element), this._element.classList.add("collapsing"), this._element.classList.remove("collapse", "show"); const e = this._triggerArray.length; if (e > 0) for (let t = 0; t < e; t++) { const e = this._triggerArray[t], i = s(e); i && !i.classList.contains("show") && (e.classList.add("collapsed"), e.setAttribute("aria-expanded", !1)) } this.setTransitioning(!0), this._element.style[t] = "", this._queueCallback(() => { this.setTransitioning(!1), this._element.classList.remove("collapsing"), this._element.classList.add("collapse"), P.trigger(this._element, "hidden.bs.collapse") }, this._element, !0) } setTransitioning(t) { this._isTransitioning = t } _getConfig(t) { return (t = { ...J, ...t }).toggle = Boolean(t.toggle), l("collapse", t, tt), t } _getDimension() { return this._element.classList.contains("width") ? "width" : "height" } _getParent() { let { parent: e } = this._config; e = a(e); const i = `[data-bs-toggle="collapse"][data-bs-parent="${e}"]`; return t.find(i, e).forEach(t => { const e = s(t); this._addAriaAndCollapsedClass(e, [t]) }), e } _addAriaAndCollapsedClass(t, e) { if (!t || !e.length) return; const i = t.classList.contains("show"); e.forEach(t => { i ? t.classList.remove("collapsed") : t.classList.add("collapsed"), t.setAttribute("aria-expanded", i) }) } static collapseInterface(t, e) { let i = et.getInstance(t); const n = { ...J, ...U.getDataAttributes(t), ..."object" == typeof e && e ? e : {} }; if (!i && n.toggle && "string" == typeof e && /show|hide/.test(e) && (n.toggle = !1), i || (i = new et(t, n)), "string" == typeof e) { if (void 0 === i[e]) throw new TypeError(`No method n
2615amed "${e}"`); i[e]() } } static jQueryInterface(t) { return this.each((function () { et.collapseInterface(this, t) })) } } P.on(document, "click.bs.collapse.data-api", '[data-bs-toggle="collapse"]', (function (e) { ("A" === e.target.tagName || e.delegateTarget && "A" === e.delegateTarget.tagName) && e.preventDefault(); const i = U.getDataAttributes(this), s = n(this); t.find(s).forEach(t => { const e = et.getInstance(t); let n; e ? (null === e._parent && "string" == typeof i.parent && (e._config.parent = i.parent, e._parent = e._getParent()), n = "toggle") : n = i, et.collapseInterface(t, n) }) })), _(et); var it = "top", nt = "bottom", st = "right", ot = "left", rt = [it, nt, st, ot], at = rt.reduce((function (t, e) { return t.concat([e + "-start", e + "-end"]) }), []), lt = [].concat(rt, ["auto"]).reduce((function (t, e) { return t.concat([e, e + "-start", e + "-end"]) }), []), ct = ["beforeRead", "read", "afterRead", "beforeMain", "main", "afterMain", "beforeWrite", "write", "afterWrite"]; function ht(t) { return t ? (t.nodeName || "").toLowerCase() : null } function dt(t) { if (null == t) return window; if ("[object Window]" !== t.toString()) { var e = t.ownerDocument; return e && e.defaultView || window } return t } function ut(t) { return t instanceof dt(t).Element || t instanceof Element } function ft(t) { return t instanceof dt(t).HTMLElement || t instanceof HTMLElement } function pt(t) { return "undefined" != typeof ShadowRoot && (t instanceof dt(t).ShadowRoot || t instanceof ShadowRoot) } var mt = { name: "applyStyles", enabled: !0, phase: "write", fn: function (t) { var e = t.state; Object.keys(e.elements).forEach((function (t) { var i = e.styles[t] || {}, n = e.attributes[t] || {}, s = e.elements[t]; ft(s) && ht(s) && (Object.assign(s.style, i), Object.keys(n).forEach((function (t) { var e = n[t]; !1 === e ? s.removeAttribute(t) : s.setAttribute(t, !0 === e ? "" : e) }))) })) }, effect: function (t) { var e = t.state, i = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} }; return Object.assign(e.elements.popper.style, i.popper), e.styles = i, e.elements.arrow && Object.assign(e.elements.arrow.style, i.arrow), function () { Object.keys(e.elements).forEach((function (t) { var n = e.elements[t], s = e.attributes[t] || {}, o = Object.keys(e.styles.hasOwnProperty(t) ? e.styles[t] : i[t]).reduce((function (t, e) { return t[e] = "", t }), {}); ft(n) && ht(n) && (Object.assign(n.style, o), Object.keys(s).forEach((function (t) { n.removeAttribute(t) }))) })) } }, requires: ["computeStyles"] }; function gt(t) { return t.split("-")[0] } function _t(t) { var e = t.getBoundingClientRect(); return { width: e.width, height: e.height, top: e.top, right: e.right, bottom: e.bottom, left: e.left, x: e.left, y: e.top } } function bt(t) { var e = _t(t), i = t.offsetWidth, n = t.offsetHeight; return Math.abs(e.width - i) <= 1 && (i = e.width), Math.abs(e.height - n) <= 1 && (n = e.height), { x: t.offsetLeft, y: t.offsetTop, width: i, height: n } } function vt(t, e) { var i = e.getRootNode && e.getRootNode(); if (t.contains(e)) return !0; if (i && pt(i)) { var n = e; do { if (n && t.isSameNode(n)) return !0; n = n.parentNode || n.host } while (n) } return !1 } function yt(t) { return dt(t).getComputedStyle(t) } function wt(t) { return ["table", "td", "th"].indexOf(ht(t)) >= 0 } function Et(t) { return ((ut(t) ? t.ownerDocument : t.document) || window.document).documentElement } function At(t) { return "html" === ht(t) ? t : t.assignedSlot || t.parentNode || (pt(t) ? t.host : null) || Et(t) } function Tt(t) { return ft(t) && "fixed" !== yt(t).position ? t.offsetParent : null } function Ot(t) { for (var e = dt(t), i = Tt(t); i && wt(i) && "static" === yt(i).position;)i = Tt(i); return i && ("html" === ht(i) || "body" === ht(i) && "static" === yt(i).position) ? e : i || function (t) { var e = -1 !== navigator.userAgent.toLowerCase().indexOf("firefox"); if (-1 !== navigator.userAgent.indexOf("Trident") && ft(t) && "fixed" === yt(t).position) return null; for (var i = At(t); ft(i) && ["html", "body"].indexOf(ht(i)) < 0;) { var n = yt(i); if ("none" !== n.transform || "none" !== n.perspective || "paint" === n.contain || -1 !== ["transform", "perspective"].indexOf(n.willChange) || e && "filter" === n.willChange || e && n.filter && "none" !== n.filter) return i; i = i.parentNode } return null }(t) || e } function Ct(t) { return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y" } var kt = Math.max, Lt = Math.min, xt = Math.round; function Dt(t, e, i) { return kt(t, Lt(e, i)) } function St(t) { return Object.assign({}, { top: 0, right: 0, bottom: 0, left: 0 }, t) } function It(t, e) { return e.reduce((function (e, i) { return e[i] = t, e }), {}) } var Nt = { name: "arrow", enabled: !0, phase: "main", fn: function (t) { var e, i = t.state, n = t.name, s = t.options, o = i.elements.arrow, r = i.modifiersData.popperOffsets, a = gt(i.placement), l = Ct(a), c = [ot, st].indexOf(a) >= 0 ? "height" : "width"; if (o && r) { var h = function (t, e) { return St("number" != typeof (t = "function" == typeof t ? t(Object.assign({}, e.rects, { placement: e.placement })) : t) ? t : It(t, rt)) }
2615(s.padding, i), d = bt(o), u = "y" === l ? it : ot, f = "y" === l ? nt : st, p = i.rects.reference[c] + i.rects.reference[l] - r[l] - i.rects.popper[c], m = r[l] - i.rects.reference[l], g = Ot(o), _ = g ? "y" === l ? g.clientHeight || 0 : g.clientWidth || 0 : 0, b = p / 2 - m / 2, v = h[u], y = _ - d[c] - h[f], w = _ / 2 - d[c] / 2 + b, E = Dt(v, w, y), A = l; i.modifiersData[n] = ((e = {})[A] = E, e.centerOffset = E - w, e) } }, effect: function (t) { var e = t.state, i = t.options.element, n = void 0 === i ? "[data-popper-arrow]" : i; null != n && ("string" != typeof n || (n = e.elements.popper.querySelector(n))) && vt(e.elements.popper, n) && (e.elements.arrow = n) }, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }, jt = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function Mt(t) { var e, i = t.popper, n = t.popperRect, s = t.placement, o = t.offsets, r = t.position, a = t.gpuAcceleration, l = t.adaptive, c = t.roundOffsets, h = !0 === c ? function (t) { var e = t.x, i = t.y, n = window.devicePixelRatio || 1; return { x: xt(xt(e * n) / n) || 0, y: xt(xt(i * n) / n) || 0 } }(o) : "function" == typeof c ? c(o) : o, d = h.x, u = void 0 === d ? 0 : d, f = h.y, p = void 0 === f ? 0 : f, m = o.hasOwnProperty("x"), g = o.hasOwnProperty("y"), _ = ot, b = it, v = window; if (l) { var y = Ot(i), w = "clientHeight", E = "clientWidth"; y === dt(i) && "static" !== yt(y = Et(i)).position && (w = "scrollHeight", E = "scrollWidth"), y = y, s === it && (b = nt, p -= y[w] - n.height, p *= a ? 1 : -1), s === ot && (_ = st, u -= y[E] - n.width, u *= a ? 1 : -1) } var A, T = Object.assign({ position: r }, l && jt); return a ? Object.assign({}, T, ((A = {})[b] = g ? "0" : "", A[_] = m ? "0" : "", A.transform = (v.devicePixelRatio || 1) < 2 ? "translate(" + u + "px, " + p + "px)" : "translate3d(" + u + "px, " + p + "px, 0)", A)) : Object.assign({}, T, ((e = {})[b] = g ? p + "px" : "", e[_] = m ? u + "px" : "", e.transform = "", e)) } var Pt = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: function (t) { var e = t.state, i = t.options, n = i.gpuAcceleration, s = void 0 === n || n, o = i.adaptive, r = void 0 === o || o, a = i.roundOffsets, l = void 0 === a || a, c = { placement: gt(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: s }; null != e.modifiersData.popperOffsets && (e.styles.popper = Object.assign({}, e.styles.popper, Mt(Object.assign({}, c, { offsets: e.modifiersData.popperOffsets, position: e.options.strategy, adaptive: r, roundOffsets: l })))), null != e.modifiersData.arrow && (e.styles.arrow = Object.assign({}, e.styles.arrow, Mt(Object.assign({}, c, { offsets: e.modifiersData.arrow, position: "absolute", adaptive: !1, roun
vendor: 9,369 bytes, line 2615
2615dOffsets: l })))), e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-placement": e.placement }) }, data: {} }, Ht = { passive: !0 }, Rt = { name: "eventListeners", enabled: !0, phase: "write", fn: function () { }, effect: function (t) { var e = t.state, i = t.instance, n = t.options, s = n.scroll, o = void 0 === s || s, r = n.resize, a = void 0 === r || r, l = dt(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper); return o && c.forEach((function (t) { t.addEventListener("scroll", i.update, Ht) })), a && l.addEventListener("resize", i.update, Ht), function () { o && c.forEach((function (t) { t.removeEventListener("scroll", i.update, Ht) })), a && l.removeEventListener("resize", i.update, Ht) } }, data: {} }, Bt = { left: "right", right: "left", bottom: "top", top: "bottom" }; function Wt(t) { return t.replace(/left|right|bottom|top/g, (function (t) { return Bt[t] })) } var qt = { start: "end", end: "start" }; function zt(t) { return t.replace(/start|end/g, (function (t) { return qt[t] })) } function $t(t) { var e = dt(t); return { scrollLeft: e.pageXOffset, scrollTop: e.pageYOffset } } function Ut(t) { return _t(Et(t)).left + $t(t).scrollLeft } function Ft(t) { var e = yt(t), i = e.overflow, n = e.overflowX, s = e.overflowY; return /auto|scroll|overlay|hidden/.test(i + s + n) } function Vt(t, e) { var i; void 0 === e && (e = []); var n = function t(e) { return ["html", "body", "#document"].indexOf(ht(e)) >= 0 ? e.ownerDocument.body : ft(e) && Ft(e) ? e : t(At(e)) }(t), s = n === (null == (i = t.ownerDocument) ? void 0 : i.body), o = dt(n), r = s ? [o].concat(o.visualViewport || [], Ft(n) ? n : []) : n, a = e.concat(r); return s ? a : a.concat(Vt(At(r))) } function Kt(t) { return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height }) } function Xt(t, e) { return "viewport" === e ? Kt(function (t) { var e = dt(t), i = Et(t), n = e.visualViewport, s = i.clientWidth, o = i.clientHeight, r = 0, a = 0; return n && (s = n.width, o = n.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (r = n.offsetLeft, a = n.offsetTop)), { width: s, height: o, x: r + Ut(t), y: a } }(t)) : ft(e) ? function (t) { var e = _t(t); return e.top = e.top + t.clientTop, e.left = e.left + t.clientLeft, e.bottom = e.top + t.clientHeight, e.right = e.left + t.clientWidth, e.width = t.clientWidth, e.height = t.clientHeight, e.x = e.left, e.y = e.top, e }(e) : Kt(function (t) { var e, i = Et(t), n = $t(t), s = null == (e = t.ownerDocument) ? void 0 : e.body, o = kt(i.scrollWidth, i.clientWidth, s ? s.scrollWidth : 0, s ? s.clientWidth : 0), r = kt(i.scrollHeight, i.clientHeight, s ? s.scrollHeight : 0, s ? s.clientHeight : 0), a = -n.scrollLeft + Ut(t), l = -n.scrollTop; return "rtl" === yt(s || i).direction && (a += kt(i.clientWidth, s ? s.clientWidth : 0) - o), { width: o, height: r, x: a, y: l } }(Et(t))) } function Yt(t) { return t.split("-")[1] } function Qt(t) { var e, i = t.reference, n = t.element, s = t.placement, o = s ? gt(s) : null, r = s ? Yt(s) : null, a = i.x + i.width / 2 - n.width / 2, l = i.y + i.height / 2 - n.height / 2; switch (o) { case it: e = { x: a, y: i.y - n.height }; break; case nt: e = { x: a, y: i.y + i.height }; break; case st: e = { x: i.x + i.width, y: l }; break; case ot: e = { x: i.x - n.width, y: l }; break; default: e = { x: i.x, y: i.y } }var c = o ? Ct(o) : null; if (null != c) { var h = "y" === c ? "height" : "width"; switch (r) { case "start": e[c] = e[c] - (i[h] / 2 - n[h] / 2); break; case "end": e[c] = e[c] + (i[h] / 2 - n[h] / 2) } } return e } function Gt(t, e) { void 0 === e && (e = {}); var i = e, n = i.placement, s = void 0 === n ? t.placement : n, o = i.boundary, r = void 0 === o ? "clippingParents" : o, a = i.rootBoundary, l = void 0 === a ? "viewport" : a, c = i.elementContext, h = void 0 === c ? "popper" : c, d = i.altBoundary, u = void 0 !== d && d, f = i.padding, p = void 0 === f ? 0 : f, m = St("number" != typeof p ? p : It(p, rt)), g = "popper" === h ? "reference" : "popper", _ = t.elements.reference, b = t.rects.popper, v = t.elements[u ? g : h], y = function (t, e, i) { var n = "clippingParents" === e ? function (t) { var e = Vt(At(t)), i = ["absolute", "fixed"].indexOf(yt(t).position) >= 0 && ft(t) ? Ot(t) : t; return ut(i) ? e.filter((function (t) { return ut(t) && vt(t, i) && "body" !== ht(t) })) : [] }(t) : [].concat(e), s = [].concat(n, [i]), o = s[0], r = s.reduce((function (e, i) { var n = Xt(t, i); return e.top = kt(n.top, e.top), e.right = Lt(n.right, e.right), e.bottom = Lt(n.bottom, e.bottom), e.left = kt(n.left, e.left), e }), Xt(t, o)); return r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r }(ut(v) ? v : v.contextElement || Et(t.elements.popper), r, l), w = _t(_), E = Qt({ reference: w, element: b, strategy: "absolute", placement: s }), A = Kt(Object.assign({}, b, E)), T = "popper" === h ? A : w, O = { top: y.top - T.top + m.top, bottom: T.bottom - y.bottom + m.bottom, left: y.left - T.left + m.left, right: T.right - y.right + m.right }, C = t.modifiersData.offset; if ("popper" === h && C) { var k = C[s]; Object.keys(O).forEach((function (t) { var e = [st, nt].indexOf(t) >= 0 ? 1 : -1, i = [it, nt].indexOf(t) >= 0 ? "y" : "x"; O[t] += k[i] * e })) } return O } function Zt(t, e) { void 0 === e && (e = {}); var i = e, n = i.placement, s = i.boundary, o = i.rootBoundary, r = i.padding, a = i.flipVariations, l = i.allowedAutoPlacements, c = void 0 === l ? lt : l, h = Yt(n), d = h ? a ? at : at.filter((function (t) { return Yt(t) === h })) : rt, u = d.filter((function (t) { return c.indexOf(t) >= 0 })); 0 === u.length && (u = d); var f = u.reduce((function (e, i) { return e[i] = Gt(t, { placement: i, boundary: s, rootBoundary: o, padding: r })[gt(i)], e }), {}); return Object.keys(f).sort((function (t, e) { return f[t] - f[e] })) } var Jt = { name: "flip", enabled: !0, phase: "main", fn: function (t) { var e = t.state, i = t.options, n = t.name; if (!e.modifiersData[n]._skip) { for (var s = i.mainAxis, o = void 0 === s || s, r = i.altAxis, a = void 0 === r || r, l = i.fallbackPlacements, c = i.padding, h = i.boundary, d = i.rootBoundary, u = i.altBoundary, f = i.flipVariations, p = void 0 === f || f, m = i.allowedAutoPlacements, g = e.options.placement, _ = gt(g), b = l || (_ !== g && p ? function (t) { if ("auto" === gt(t)) return []; var e = Wt(t); return [zt(t), e, zt(e)] }(g) : [Wt(g)]), v = [g].concat(b).reduce((function (t, i) { return t.concat("auto" === gt(i) ? Zt(e, { placement: i, boundary: h, rootBoundary: d, padding: c, flipVariations: p, allowedAutoPlacements: m }) : i) }), []), y = e.rects.reference, w = e.rects.popper, E = new Map, A = !0, T = v[0], O = 0; O < v.length; O++) { var C = v[O], k = gt(C), L = "start" === Yt(C), x = [it, nt].indexOf(k) >= 0, D = x ? "width" : "height", S = Gt(e, { placement: C, boundary: h, rootBoundary: d, altBoundary: u, padding: c }), I = x ? L ? st : ot : L ? nt : it; y[D] > w[D] && (I = Wt(I)); var N = Wt(I), j = []; if (o && j.push(S[k] <= 0), a && j.push(S[I] <= 0, S[N] <= 0), j.every((function (t) { return t }))) { T = C, A = !1; break } E.set(C, j) } if (A) for (var M = function (t) { var e = v.find((function (e) { var i = E.get(e); if (i) return i.slice(0, t).every((function (t) { return t })) })); if (e) return T = e, "break" }, P = p ? 3 : 1; P > 0 && "break" !== M(P); P--); e.placement !== T && (e.modifiersData[n]._skip = !0, e.placement = T, e.reset = !0) } }, requiresIfExists: ["offset"], data: { _skip: !1 } }; function te(t, e, i) { return void 0 === i && (i = { x: 0, y: 0 }), { top: t.top - e.height - i.y, right: t.right - e.width + i.x, bottom: t.bottom - e.height + i.y, left: t.left - e.width - i.x } } function ee(t) { return [it, st, nt, ot].some((function (e) { return t[e] >= 0 })) } var ie = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: function (t) { var e = t.state, i = t.name, n = e.rects.reference, s = e.rects.popper, o = e.modifiersData.preventOverflow, r = Gt(e, { elementContext: "reference" }), a = Gt(e, { altBoundary: !0 }), l = te(r, n), c = te(a, s, o), h = ee(l), d = ee(c); e.modifiersData[i] = { referenceClippingOffsets: l, popperEscapeOffsets: c, isReferenceHidden: h, hasPopperEscaped: d }, e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-reference-hidden": h, "data-popper-escaped": d }) } }, ne = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: function (t) { var e = t.state, i = t.options, n = t.name, s = i.offset, o = void 0 === s ? [0, 0] : s, r = lt.reduce((function (t, i) { return t[i] = function (t, e, i) { var n = gt(t), s = [ot, it].indexOf(n) >= 0 ? -1 : 1, o = "function" == typeof i ? i(Object.assign({}, e, { placement: t })) : i, r = o[0], a = o[1]; return r = r || 0, a = (a || 0) * s, [ot, st].indexOf(n) >= 0 ? { x: a, y: r } : { x: r, y: a } }(i, e.rects, o), t }), {}), a = r[e.placement], l = a.x, c = a.y; null != e.modifiersData.popperOffsets && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += c), e.modifiersData[n] = r } }, se = { name: "popperOffsets", enabled: !0, phase: "read", fn: function (t) { var e = t.state, i = t.name; e.modifiersData[i] = Qt({ reference: e.rects.reference, element: e.re
2615cts.popper, strategy: "absolute", placement: e.placement }) }, data: {} }, oe = { name: "preventOverflow", enabled: !0, phase: "main", fn: function (t) { var e = t.state, i = t.options, n = t.name, s = i.mainAxis, o = void 0 === s || s, r = i.altAxis, a = void 0 !== r && r, l = i.boundary, c = i.rootBoundary, h = i.altBoundary, d = i.padding, u = i.tether, f = void 0 === u || u, p = i.tetherOffset, m = void 0 === p ? 0 : p, g = Gt(e, { boundary: l, rootBoundary: c, padding: d, altBoundary: h }), _ = gt(e.placement), b = Yt(e.placement), v = !b, y = Ct(_), w = "x" === y ? "y" : "x", E = e.modifiersData.popperOffsets, A = e.rects.reference, T = e.rects.popper, O = "function" == typeof m ? m(Object.assign({}, e.rects, { placement: e.placement })) : m, C = { x: 0, y: 0 }; if (E) { if (o || a) { var k = "y" === y ? it : ot, L = "y" === y ? nt : st, x = "y" === y ? "height" : "width", D = E[y], S = E[y] + g[k], I = E[y] - g[L], N = f ? -T[x] / 2 : 0, j = "start" === b ? A[x] : T[x], M = "start" === b ? -T[x] : -A[x], P = e.elements.arrow, H = f && P ? bt(P) : { width: 0, height: 0 }, R = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : { top: 0, right: 0, bottom: 0, left: 0 }, B = R[k], W = R[L], q = Dt(0, A[x], H[x]), z = v ? A[x] / 2 - N - q - B - O : j - q - B - O, $ = v ? -A[x] / 2 + N + q + W + O : M + q + W + O, U = e.elements.arrow && Ot(e.elements.arrow), F = U ? "y" === y ? U.clientTop || 0 : U.clientLeft || 0 : 0, V = e.modifiersData.offset ? e.modifiersData.offset[e.placement][y] : 0, K = E[y] + z - V - F, X = E[y] + $ - V; if (o) { var Y = Dt(f ? Lt(S, K) : S, D, f ? kt(I, X) : I); E[y] = Y, C[y] = Y - D } if (a) { var Q = "x" === y ? it : ot, G = "x" === y ? nt : st, Z = E[w], J = Z + g[Q], tt = Z - g[G], et = Dt(f ? Lt(J, K) : J, Z, f ? kt(tt, X) : tt); E[w] = et, C[w] = et - Z } } e.modifiersData[n] = C } }, requiresIfExists: ["offset"] }; function re(t, e, i) { void 0 === i && (i = !1); var n, s, o = Et(e), r = _t(t), a = ft(e), l = { scrollLeft: 0, scrollTop: 0 }, c = { x: 0, y: 0 }; return (a || !a && !i) && (("body" !== ht(e) || Ft(o)) && (l = (n = e) !== dt(n) && ft(n) ? { scrollLeft: (s = n).scrollLeft, scrollTop: s.scrollTop } : $t(n)), ft(e) ? ((c = _t(e)).x += e.clientLeft, c.y += e.clientTop) : o && (c.x = Ut(o))), { x: r.left + l.scrollLeft - c.x, y: r.top + l.scrollTop - c.y, width: r.width, height: r.height } } var ae = { placement: "bottom", modifiers: [], strategy: "absolute" }; function le() { for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)e[i] = arguments[i]; return !e.some((function (t) { return !(t && "function" == typeof t.getBoundingClientRect) })) } function ce(t) { void 0 === t && (t = {}); var e = t, i = e.defaultModifiers, n = void 0 === i ? [] : i, s = e.defaultOptions, o = void 0 === s ? ae : s; return function (t, e, i) { void 0 === i && (i = o); var s, r, a = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, ae, o), modifiersData: {}, elements: { reference: t, popper: e }, attributes: {}, styles: {} }, l = [], c = !1, h = { state: a, setOptions: function (i) { d(), a.options = Object.assign({}, o, a.options, i), a.scrollParents = { reference: ut(t) ? Vt(t) : t.contextElement ? Vt(t.contextElement) : [], popper: Vt(e) }; var s, r, c = function (t) { var e = function (t) { var e = new Map, i = new Set, n = []; return t.forEach((function (t) { e.set(t.name, t) })), t.forEach((function (t) { i.has(t.name) || function t(s) { i.add(s.name), [].concat(s.requires || [], s.requiresIfExists || []).forEach((function (n) { if (!i.has(n)) { var s = e.get(n); s && t(s) } })), n.push(s) }(t) })), n }(t); return ct.reduce((function (t, i) { return t.concat(e.filter((function (t) { return t.phase === i }))) }), []) }((s = [].concat(n, a.options.modifiers), r = s.reduce((function (t, e) { var i = t[e.name]; return t[e.name] = i ? Object.assign({}, i, e, { options: Object.assign({}, i.options, e.options), data: Object.assign({}, i.data, e.data) }) : e, t }), {}), Object.keys(r).map((function (t) { return r[t] })))); return a.orderedModifiers = c.filter((function (t) { return t.enabled }
2615)), a.orderedModifiers.forEach((function (t) { var e = t.name, i = t.options, n = void 0 === i ? {} : i, s = t.effect; if ("function" == typeof s) { var o = s({ state: a, name: e, instance: h, options: n }); l.push(o || function () { }) } })), h.update() }, forceUpdate: function () { if (!c) { var t = a.elements, e = t.reference, i = t.popper; if (le(e, i)) { a.rects = { reference: re(e, Ot(i), "fixed" === a.options.strategy), popper: bt(i) }, a.reset = !1, a.placement = a.options.placement, a.orderedModifiers.forEach((function (t) { return a.modifiersData[t.name] = Object.assign({}, t.data) })); for (var n = 0; n < a.orderedModifiers.length; n++)if (!0 !== a.reset) { var s = a.orderedModifiers[n], o = s.fn, r = s.options, l = void 0 === r ? {} : r, d = s.name; "function" == typeof o && (a = o({ state: a, options: l, name: d, instance: h }) || a) } else a.reset = !1, n = -1 } } }, update: (s = function () { return new Promise((function (t) { h.forceUpdate(), t(a) })) }, function () { return r || (r = new Promise((function (t) { Promise.resolve().then((function () { r = void 0, t(s()) })) }))), r }), destroy: function () { d(), c = !0 } }; if (!le(t, e)) return h; function d() { l.forEach((function (t) { return t() })), l = [] } return h.setOptions(i).then((function (t) { !c && i.onFirstUpdate && i.onFirstUpdate(t) })), h } } var he = ce(), de = ce({ defaultModifiers: [Rt, se, Pt, mt] }), ue = ce({ defaultModifiers: [Rt, se, Pt, mt, ne, Jt, oe, Nt, ie] }), fe = Object.freeze({ __proto__: null, popperGenerator: ce, detectOverflow: Gt, createPopperBase: he, createPopper: ue, createPopperLite: de, top: it, bottom: nt, right: st, left: ot, auto: "auto", basePlacements: rt, start: "start", end: "end", clippingParents: "clippingParents", viewport: "viewport", popper: "popper", reference: "reference", variationPlacements: at, placements: lt, beforeRead: "beforeRead", read: "read", afterRead: "afterRead", beforeMain: "beforeMain", main: "main", afterMain: "afterMain", beforeWrite: "beforeWrite", write: "write", afterWrite: "afterWrite", modifierPhases: ct, applyStyles: mt, arrow: Nt, computeStyles: Pt, eventListeners: Rt, flip: Jt, hide: ie, offset: ne, popperOffsets: se, preventOverflow: oe }); const pe = new RegExp("ArrowUp|ArrowDown|Escape"), me = g() ? "top-end" : "top-start", ge = g() ? "top-start" : "top-end", _e = g() ? "bottom-end" : "bottom-start", be = g() ? "bottom-start" : "bottom-end", ve = g() ? "left-start" : "right-start", ye = g() ? "right-start" : "left-start", we = { offset: [0, 2], boundary: "clippingParents", reference: "toggle", display: "dynamic", popperConfig: null, autoClose: !0 }, Ee = { offset: "(array|string|function)", boundary: "(string|element)", reference: "(string|element|object)", display: "string", popperConfig: "(null|object|function)", autoClose: "(boolean|string)" }; class Ae extends B { constructor(t, e) { super(t), this._popper = null, this._config = this._getConfig(e), this._menu = this._getMenuElement(), this._inNavbar = this._detectNavbar(), this._addEventListeners() } static get Default() { return we } static get DefaultType() { return Ee } static get NAME() { return "dropdown" } toggle() { h(this._element) || (this._element.classList.contains("show") ? this.hide() : this.show()) } show() { if (h(this._element) || this._menu.classList.contains("show")) return; const t = Ae.getParentFromElement(this._element), e = { relatedTarget: this._element }; if (!P.trigger(this._element, "show.bs.dropdown", e).defaultPrevented) { if (this._inNavbar) U.setDataAttribute(this._menu, "popper", "none"); else { if (void 0 === fe) throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)"); let e = this._element; "parent" === this._config.reference ? e = t : r(this._config.reference) ? e = a(this._config.reference) : "object" == typeof this._config.reference && (e = this._config.reference); const i = this._getPopperConfig(), n = i.modifiers.find(t => "applyStyles" === t.name && !1 === t.enabled); this._popper = ue(e, this._menu, i), n && U.setDataAttribute(this._menu, "popper", "static") }
vendor: 13,803 bytes, line 2615
2615 "ontouchstart" in document.documentElement && !t.closest(".navbar-nav") && [].concat(...document.body.children).forEach(t => P.on(t, "mouseover", u)), this._element.focus(), this._element.setAttribute("aria-expanded", !0), this._menu.classList.toggle("show"), this._element.classList.toggle("show"), P.trigger(this._element, "shown.bs.dropdown", e) } } hide() { if (h(this._element) || !this._menu.classList.contains("show")) return; const t = { relatedTarget: this._element }; this._completeHide(t) } dispose() { this._popper && this._popper.destroy(), super.dispose() } update() { this._inNavbar = this._detectNavbar(), this._popper && this._popper.update() } _addEventListeners() { P.on(this._element, "click.bs.dropdown", t => { t.preventDefault(), this.toggle() }) } _completeHide(t) { P.trigger(this._element, "hide.bs.dropdown", t).defaultPrevented || ("ontouchstart" in document.documentElement && [].concat(...document.body.children).forEach(t => P.off(t, "mouseover", u)), this._popper && this._popper.destroy(), this._menu.classList.remove("show"), this._element.classList.remove("show"), this._element.setAttribute("aria-expanded", "false"), U.removeDataAttribute(this._menu, "popper"), P.trigger(this._element, "hidden.bs.dropdown", t)) } _getConfig(t) { if (t = { ...this.constructor.Default, ...U.getDataAttributes(this._element), ...t }, l("dropdown", t, this.constructor.DefaultType), "object" == typeof t.reference && !r(t.reference) && "function" != typeof t.reference.getBoundingClientRect) throw new TypeError("dropdown".toUpperCase() + ': Option "reference" provided type "object" without a required "getBoundingClientRect" method.'); return t } _getMenuElement() { return t.next(this._element, ".dropdown-menu")[0] } _getPlacement() { const t = this._element.parentNode; if (t.classList.contains("dropend")) return ve; if (t.classList.contains("dropstart")) return ye; const e = "end" === getComputedStyle(this._menu).getPropertyValue("--bs-position").trim(); return t.classList.contains("dropup") ? e ? ge : me : e ? be : _e } _detectNavbar() { return null !== this._element.closest(".navbar") } _getOffset() { const { offset: t } = this._config; return "string" == typeof t ? t.split(",").map(t => Number.parseInt(t, 10)) : "function" == typeof t ? e => t(e, this._element) : t } _getPopperConfig() { const t = { placement: this._getPlacement(), modifiers: [{ name: "preventOverflow", options: { boundary: this._config.boundary } }, { name: "offset", options: { offset: this._getOffset() } }] }; return "static" === this._config.display && (t.modifiers = [{ name: "applyStyles", enabled: !1 }]), { ...t, ..."function" == typeof this._config.popperConfig ? this._config.popperConfig(t) : this._config.popperConfig } } _selectMenuItem({ key: e, target: i }) { const n = t.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)", this._menu).filter(c); n.length && y(n, i, "ArrowDown" === e, !n.includes(i)).focus() } static dropdownInterface(t, e) { const i = Ae.getOrCreateInstance(t, e); if ("string" == typeof e) { if (void 0 === i[e]) throw new TypeError(`No method named "${e}"`); i[e]() } } static jQueryInterface(t) { return this.each((function () { Ae.dropdownInterface(this, t) })) } static clearMenus(e) { if (e && (2 === e.button || "keyup" === e.type && "Tab" !== e.key)) return; const i = t.find('[data-bs-toggle="dropdown"]'); for (let t = 0, n = i.length; t < n; t++) { const n = Ae.getInstance(i[t]); if (!n || !1 === n._config.autoClose) continue; if (!n._element.classList.contains("show")) continue; const s = { relatedTarget: n._element }; if (e) { const t = e.composedPath(), i = t.includes(n._menu); if (t.includes(n._element) || "inside" === n._config.autoClose && !i || "outside" === n._config.autoClose && i) continue; if (n._menu.contains(e.target) && ("keyup" === e.type && "Tab" === e.key || /input|select|option|textarea|form/i.test(e.target.tagName))) continue; "click" === e.type && (s.clickEvent = e) } n._completeHide(s) } } static getParentFromElement(t) { return s(t) || t.parentNode } static dataApiKeydownHandler(e) { if (/input|textarea/i.test(e.target.tagName) ? "Space" === e.key || "Escape" !== e.key && ("ArrowDown" !== e.key && "ArrowUp" !== e.key || e.target.closest(".dropdown-menu")) : !pe.test(e.key)) return; const i = this.classList.contains("show"); if (!i && "Escape" === e.key) return; if (e.preventDefault(), e.stopPropagation(), h(this)) return; const n = () => this.matches('[data-bs-toggle="dropdown"]') ? this : t.prev(this, '[data-bs-toggle="dropdown"]')[0]; return "Escape" === e.key ? (n().focus(), void Ae.clearMenus()) : "ArrowUp" === e.key || "ArrowDown" === e.key ? (i || n().click(), void Ae.getInstance(n())._selectMenuItem(e)) : void (i && "Space" !== e.key || Ae.clearMenus()) } } P.on(document, "keydown.bs.dropdown.data-api", '[data-bs-toggle="dropdown"]', Ae.dataApiKeydownHandler), P.on(document, "keydown.bs.dropdown.data-api", ".dropdown-menu", Ae.dataApiKeydownHandler), P.on(document, "click.bs.dropdown.data-api", Ae.clearMenus), P.on(document, "keyup.bs.dropdown.data-api", Ae.clearMenus), P.on(document, "click.bs.dropdown.data-api", '[data-bs-toggle="dropdown"]', (function (t) { t.preventDefault(), Ae.dropdownInterface(this) })), _(Ae); class Te { constructor() { this._element = document.body } getWidth() { const t = document.documentElement.clientWidth; return Math.abs(window.innerWidth - t) } hide() { const t = this.getWidth(); this._disableOverFlow(), this._setElementAttributes(this._element, "paddingRight", e => e + t), this._setElementAttributes(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top", "paddingRight", e => e + t), this._setElementAttributes(".sticky-top", "marginRight", e => e - t) } _disableOverFlow() { this._saveInitialAttribute(this._element, "overflow"), this._element.style.overflow = "hidden" } _setElementAttributes(t, e, i) { const n = this.getWidth(); this._applyManipulationCallback(t, t => { if (t !== this._element && window.innerWidth > t.clientWidth + n) return; this._saveInitialAttribute(t, e); const s = window.getComputedStyle(t)[e]; t.style[e] = i(Number.parseFloat(s)) + "px" }) } reset() { this._resetElementAttributes(this._element, "overflow"), this._resetElementAttributes(this._element, "paddingRight"), this._resetElementAttributes(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top", "paddingRight"), this._resetElementAttributes(".sticky-top", "marginRight") } _saveInitialAttribute(t, e) { const i = t.style[e]; i && U.setDataAttribute(t, e, i) } _resetElementAttributes(t, e) { this._applyManipulationCallback(t, t => { const i = U.getDataAttribute(t, e); void 0 === i ? t.style.removeProperty(e) : (U.removeDataAttribute(t, e), t.style[e] = i) }) } _applyManipulationCallback(e, i) { r(e) ? i(e) : t.find(e, this._element).forEach(i) } isOverflowing() { return this.getWidth() > 0 } } const Oe = { isVisible: !0, isAnimated: !1, rootElement: "body", clickCallback: null }, Ce = { isVisible: "boolean", isAnimated: "boolean", rootElement: "(element|string)", clickCallback: "(function|null)" }; class ke { constructor(t) { this._config = this._getConfig(t), this._isAppended = !1, this._element = null } show(t) { this._config.isVisible ? (this._append(), this._config.isAnimated && f(this._getElement()), this._getElement().classList.add("show"), this._emulateAnimation(() => { b(t) })) : b(t) } hide(t) { this._config.isVisible ? (this._getElement().classList.remove("show"), this._emulateAnimation(() => { this.dispose(), b(t) })) : b(t) } _getElement() { if (!this._element) { const t = document.createElement("div"); t.className = "modal-backdrop", this._config.isAnimated && t.classList.add("fade"), this._element = t } return this._element } _getConfig(t) { return (t = { ...Oe, ..."object" == typeof t ? t : {} }).rootElement = a(t.rootElement), l("backdrop", t, Ce), t } _append() { this._isAppended || (this._config.rootElement.appendChild(this._getElement()), P.on(this._getElement(), "mousedown.bs.backdrop", () => { b(this._config.clickCallback) }), this._isAppended = !0) } dispose() { this._isAppended && (P.off(this._element, "mousedown.bs.backdrop"), this._element.remove(), this._isAppended = !1) } _emulateAnimation(t) { v(t, this._getElement(), this._config.isAnimated) } } const Le = { backdrop: !0, keyboard: !0, focus: !0 }, xe = { backdrop: "(boolean|string)", keyboard: "boolean", focus: "boolean" }; class De extends B { constructor(e, i) { super(e), this._config = this._getConfig(i), this._dialog = t.findOne(".modal-dialog", this._element), this._backdrop = this._initializeBackDrop(), this._isShown = !1, this._ignoreBackdropClick = !1, this._isTransitioning = !1, this._scrollBar = new Te } static get Default() { return Le } static get NAME() { return "modal" } toggle(t) { return this._isShown ? this.hide() : this.show(t) } show(t) { this._isShown || this._isTransitioning || P.trigger(this._element, "show.bs.modal", { relatedTarget: t }).defaultPrevented || (this._isShown = !0, this._isAnimated() && (this._isTransitioning = !0), this._scrollBar.hide(), document.body.classList.add("modal-open"), this._adjustDialog(), this._setEscapeEvent(), this._setResizeEvent(), P.on(this._element, "click.dismiss.bs.modal", '[data-bs-dismiss="modal"]', t => this.hide(t)), P.on(this._dialog, "mousedown.dismiss.bs.modal", () => { P.one(this._element, "mouseup.dismiss.bs.modal", t => { t.target === this._element && (this._ignoreBackdropClick = !0) }) }), this._showBackdrop(() => this._showElement(t))) } hide(t) { if (t && ["A", "AREA"].includes(t.target.tagName) && t.preventDefault(), !this._isShown || this._isTransitioning) return; if (P.trigger(this._element, "hide.bs.modal").defaultPrevented) return; this._isShown = !1; const e = this._isAnimated(); e && (this._isTransitioning = !0), this._setEscapeEvent(), this._setResizeEvent(), P.off(document, "focusin.bs.modal"), this._element.classList.remove("show"), P.off(this._element, "click.dismiss.bs.modal"), P.off(this._dialog, "mousedown.dismiss.bs.modal"), this._queueCallback(() => this._hideModal(), this._element, e) } dispose() { [window, this._dialog].forEach(t => P.off(t, ".bs.modal")), this._backdrop.dispose(), super.dispose(), P.off(document, "focusin.bs.modal") } handleUpdate() { this._adjustDialog() } _initializeBackDrop() { return new ke({ isVisible: Boolean(this._config.backdrop), isAnimated: this._isAnimated() }) } _getConfig(t) { return t = { ...Le, ...U.getDataAttributes(this._element), ..."object" == typeof t ? t : {} }, l("modal", t, xe), t } _showElement(e) { const i = this._isAnimated(), n = t.findOne(".modal-body", this._dialog); this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE || document.body.appendChild(this._element), this._element.style.display = "block", this._element.removeAttribute("aria-hidden"), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), this._element.scrollTop = 0, n && (n.scrollTop = 0), i && f(this._element), this._element.classList.add("show"), this._config.focus && this._enforceFocus(), this._queueCallback(() => { this._config.focus && this._element.focus(), this._isTransitioning = !1, P.trigger(this._element, "shown.bs.modal", { relatedTarget: e }) }, this._dialog, i) } _enforceFocus() { P.off(document, "focusin.bs.modal"), P.on(document, "focusin.bs.modal", t => { document === t.target || this._element === t.target || this._element.contains(t.target) || this._element.focus() }) } _setEscapeEvent() { this._isShown ? P.on(this._element, "keydown.dismiss.bs.modal", t => { this._config.keyboard && "Escape" === t.key ? (t.preventDefault(), this.hide()) : this._config.keyboard || "Escape" !== t.key || this._triggerBackdropTransition() }) : P.off(this._element, "keydown.dismiss.bs.modal") } _setResizeEvent() { this._isShown ? P.on(window, "resize.bs.modal", () => this._adjustDialog()) : P.off(window, "resize.bs.modal") } _hideModal() { this._element.style.display = "none", this._element.setAttribute("aria-hidden", !0), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._isTransitioning = !1, this._backdrop.hide(() => { document.body.classList.remove("modal-open"), this._resetAdjustments(), this._scrollBar.reset(), P.trigger(this._element, "hidden.bs.modal") }) } _showBackdrop(t) { P.on(this._element, "click.dismiss.bs.modal", t => { this._ignoreBackdropClick ? this._ignoreBackdropClick = !1 : t.target === t.currentTarget && (!0 === this._config.backdrop ? this.hide() : "static" === this._config.backdrop && this._triggerBackdropTransition()) }), this._backdrop.show(t) } _isAnimated() { return this._element.classList.contains("fade") } _triggerBackdropTransition() { if (P.trigger(this._element, "hidePrevented.bs.modal").defaultPrevented) return; const { classList: t, scrollHeight: e, style: i } = this._element, n = e > document.documentElement.clientHeight; !n && "hidden" === i.overflowY || t.contains("modal-static") || (n || (i.overflowY = "hidden"), t.add("modal-static"), this._queueCallback(() => { t.remove("modal-static"), n || this._queueCallback(() => { i.overflowY = "" }, this._dialog) }, this._dialog), this._element.focus()) } _adjustDialog() { const t = this._element.scrollHeight > document.documentElement.clientHeight, e = this._scrollBar.getWidth(), i = e > 0; (!i && t && !g() || i && !t && g()) && (this._element.style.paddingLeft = e + "px"), (i && !t && !g() || !i && t && g()) && (this._element.style.paddingRight = e + "px") } _resetAdjustments() { this._element.style.paddingLeft = "", this._element.style.paddingRight = "" } static jQueryInterface(t, e) { return this.each((function () { const i = De.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === i[t]) throw new TypeError(`No method n
2615amed "${t}"`); i[t](e) } })) } } P.on(document, "click.bs.modal.data-api", '[data-bs-toggle="modal"]', (function (t) { const e = s(this);["A", "AREA"].includes(this.tagName) && t.preventDefault(), P.one(e, "show.bs.modal", t => { t.defaultPrevented || P.one(e, "hidden.bs.modal", () => { c(this) && this.focus() }) }), De.getOrCreateInstance(e).toggle(this) })), _(De); const Se = { backdrop: !0, keyboard: !0, scroll: !1 }, Ie = { backdrop: "boolean", keyboard: "boolean", scroll: "boolean" }; class Ne extends B { constructor(t, e) { super(t), this._config = this._getConfig(e), this._isShown = !1, this._backdrop = this._initializeBackDrop(), this._addEventListeners() } static get NAME() { return "offcanvas" } static get Default() { return Se } toggle(t) { return this._isShown ? this.hide() : this.show(t) } show(t) { this._isShown || P.trigger(this._element, "show.bs.offcanvas", { relatedTarget: t }).defaultPrevented || (this._isShown = !0, this._element.style.visibility = "visible", this._backdrop.show(), this._config.scroll || ((new Te).hide(), this._enforceFocusOnElement(this._element)), this._element.removeAttribute("aria-hidden"), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), this._element.classList.add("show"), this._queueCallback(() => { P.trigger(this._element, "shown.bs.offcanvas", { relatedTarget: t }) }, this._element, !0)) } hide() { this._isShown && (P.trigger(this._element, "hide.bs.offcanvas").defaultPrevented || (P.off(document, "focusin.bs.offcanvas"), this._element.blur(), this._isShown = !1, this._element.classList.remove("show"), this._backdrop.hide(), this._queueCallback(() => { this._element.setAttribute("aria-hidden", !0), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._element.style.visibility = "hidden", this._config.scroll || (new Te).reset(), P.trigger(this._element, "hidden.bs.offcanvas") }, this._element, !0))) } dispose() { this._backdrop.dispose(), super.dispose(), P.off(document, "focusin.bs.offcanvas") } _getConfig(t) { return t = { ...Se, ...U.getDataAttributes(this._element), ..."object" == typeof t ? t : {} }, l("offcanvas", t, Ie), t } _initializeBackDrop() { return new ke({ isVisible: this._config.backdrop, isAnimated: !0, rootElement: this._element.parentNode, clickCallback: () => this.hide() }) } _enforceFocusOnElement(t) { P.off(document, "focusin.bs.offcanvas"), P.on(document, "focusin.bs.offcanvas", e => { document === e.target || t === e.target || t.contains(e.target) || t.focus() }), t.focus() } _addEventListeners() { P.on(this._element, "click.dismiss.bs.offcanvas", '[data-bs-dismiss="offcanvas"]', () => this.hide()), P.on(this._element, "keydown.dismiss.bs.offcanvas", t => { this._config.keyboard && "Escape" === t.key && this.hide() }) } static jQueryInterface(t) { return this.each((function () { const e = Ne.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === e[t] || t.startsWith("_") || "constructor" === t) throw new TypeError(`No method named "${t}"`); e[t](this) } })) } } P.on(document, "click.bs.offcanvas.data-api", '[data-bs-toggle="offcanvas"]', (function (e) { const i = s(this); if (["A", "AREA"].includes(this.tagName) && e.preventDefault(), h(this)) return; P.one(i, "hidden.bs.offcanvas", () => { c(this) && this.focus() }); const n = t.findOne(".offcanvas.show"); n && n !== i && Ne.getInstance(n).hide(), Ne.getOrCreateInstance(i).toggle(this) })), P.on(window, "load.bs.offcanvas.data-api", () => t.find(".offcanvas.show").forEach(t => Ne.getOrCreateInstance(t).show())), _(Ne); const je = new Set(["background", "cite", "href", "itemtype", "longdesc", "poster", "src", "xlink:href"]), Me = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i, Pe = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i, He = (t, e) => { const i = t.nodeName.toLowerCase(); if (e.includes(i)) return !je.has(i) || Boolean(Me.test(t.nodeValue) || Pe.test(t.nodeValue)); const n = e.filter(t => t instanceof RegExp); for (let t = 0, e = n.length; t < e; t++)if (n[t].test(i)) return !0; return !1 }; function Re(t, e, i) { if (!t.length) return t; if (i && "function" == typeof i) return i(t); const n = (new window.DOMParser).parseFromString(t, "text/html"), s = Object.keys(e), o = [].concat(...n.body.querySelectorAll("*")); for (let t = 0, i = o.length; t < i; t++) { const i = o[t], n = i.nodeName.toLowerCase(); if (!s.includes(n)) { i.remove();
vendor: 21,792 bytes, line 2615
2615 continue } const r = [].concat(...i.attributes), a = [].concat(e["*"] || [], e[n] || []); r.forEach(t => { He(t, a) || i.removeAttribute(t.nodeName) }) } return n.body.innerHTML } const Be = new RegExp("(^|\\s)bs-tooltip\\S+", "g"), We = new Set(["sanitize", "allowList", "sanitizeFn"]), qe = { animation: "boolean", template: "string", title: "(string|element|function)", trigger: "string", delay: "(number|object)", html: "boolean", selector: "(string|boolean)", placement: "(string|function)", offset: "(array|string|function)", container: "(string|element|boolean)", fallbackPlacements: "array", boundary: "(string|element)", customClass: "(string|function)", sanitize: "boolean", sanitizeFn: "(null|function)", allowList: "object", popperConfig: "(null|object|function)" }, ze = { AUTO: "auto", TOP: "top", RIGHT: g() ? "left" : "right", BOTTOM: "bottom", LEFT: g() ? "right" : "left" }, $e = { animation: !0, template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', trigger: "hover focus", title: "", delay: 0, html: !1, selector: !1, placement: "top", offset: [0, 0], container: !1, fallbackPlacements: ["top", "right", "bottom", "left"], boundary: "clippingParents", customClass: "", sanitize: !0, sanitizeFn: null, allowList: { "*": ["class", "dir", "id", "lang", "role", /^aria-[\w-]*$/i], a: ["target", "href", "title", "rel"], area: [], b: [], br: [], col: [], code: [], div: [], em: [], hr: [], h1: [], h2: [], h3: [], h4: [], h5: [], h6: [], i: [], img: ["src", "srcset", "alt", "title", "width", "height"], li: [], ol: [], p: [], pre: [], s: [], small: [], span: [], sub: [], sup: [], strong: [], u: [], ul: [] }, popperConfig: null }, Ue = { HIDE: "hide.bs.tooltip", HIDDEN: "hidden.bs.tooltip", SHOW: "show.bs.tooltip", SHOWN: "shown.bs.tooltip", INSERTED: "inserted.bs.tooltip", CLICK: "click.bs.tooltip", FOCUSIN: "focusin.bs.tooltip", FOCUSOUT: "focusout.bs.tooltip", MOUSEENTER: "mouseenter.bs.tooltip", MOUSELEAVE: "mouseleave.bs.tooltip" }; class Fe extends B { constructor(t, e) { if (void 0 === fe) throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)"); super(t), this._isEnabled = !0, this._timeout = 0, this._hoverState = "", this._activeTrigger = {}, this._popper = null, this._config = this._getConfig(e), this.tip = null, this._setListeners() } static get Default() { return $e } static get NAME() { return "tooltip" } static get Event() { return Ue } static get DefaultType() { return qe } enable() { this._isEnabled = !0 } disable() { this._isEnabled = !1 } toggleEnabled() { this._isEnabled = !this._isEnabled } toggle(t) { if (this._isEnabled) if (t) { const e = this._initializeOnDelegatedTarget(t); e._activeTrigger.click = !e._activeTrigger.click, e._isWithActiveTrigger() ? e._enter(null, e) : e._leave(null, e) } else { if (this.getTipElement().classList.contains("show")) return void this._leave(null, this); this._enter(null, this) } } dispose() { clearTimeout(this._timeout), P.off(this._element.closest(".modal"), "hide.bs.modal", this._hideModalHandler), this.tip && this.tip.remove(), this._popper && this._popper.destroy(), super.dispose() } show() { if ("none" === this._element.style.display) throw new Error("Please use show on visible elements"); if (!this.isWithContent() || !this._isEnabled) return; const t = P.trigger(this._element, this.constructor.Event.SHOW), i = d(this._element), n = null === i ? this._element.ownerDocument.documentElement.contains(this._element) : i.contains(this._element); if (t.defaultPrevented || !n) return; const s = this.getTipElement(), o = e(this.constructor.NAME); s.setAttribute("id", o), this._element.setAttribute("aria-describedby", o), this.setContent(), this._config.animation && s.classList.add("fade"); const r = "function" == typeof this._config.placement ? this._config.placement.call(this, s, this._element) : this._config.placement, a = this._getAttachment(r); this._addAttachmentClass(a); const { container: l } = this._config; R.set(s, this.constructor.DATA_KEY, this), this._element.ownerDocument.documentElement.contains(this.tip) || (l.appendChild(s), P.trigger(this._element, this.constructor.Event.INSERTED)), this._popper ? this._popper.update() : this._popper = ue(this._element, s, this._getPopperConfig(a)), s.classList.add("show"); const c = "function" == typeof this._config.customClass ? this._config.customClass() : this._config.customClass; c && s.classList.add(...c.split(" ")), "ontouchstart" in document.documentElement && [].concat(...document.body.children).forEach(t => { P.on(t, "mouseover", u) }); const h = this.tip.classList.contains("fade"); this._queueCallback(() => { const t = this._hoverState; this._hoverState = null, P.trigger(this._element, this.constructor.Event.SHOWN), "out" === t && this._leave(null, this) }, this.tip, h) } hide() { if (!this._popper) return; const t = this.getTipElement(); if (P.trigger(this._element, this.constructor.Event.HIDE).defaultPrevented) return; t.classList.remove("show"), "ontouchstart" in document.documentElement && [].concat(...document.body.children).forEach(t => P.off(t, "mouseover", u)), this._activeTrigger.click = !1, this._activeTrigger.focus = !1, this._activeTrigger.hover = !1; const e = this.tip.classList.contains("fade"); this._queueCallback(() => { this._isWithActiveTrigger() || ("show" !== this._hoverState && t.remove(), this._cleanTipClass(), this._element.removeAttribute("aria-describedby"), P.trigger(this._element, this.constructor.Event.HIDDEN), this._popper && (this._popper.destroy(), this._popper = null)) }, this.tip, e), this._hoverState = "" } update() { null !== this._popper && this._popper.update() } isWithContent() { return Boolean(this.getTitle()) } getTipElement() { if (this.tip) return this.tip; const t = document.createElement("div"); return t.innerHTML = this._config.template, this.tip = t.children[0], this.tip } setContent() { const e = this.getTipElement(); this.setElementContent(t.findOne(".tooltip-inner", e), this.getTitle()), e.classList.remove("fade", "show") } setElementContent(t, e) { if (null !== t) return r(e) ? (e = a(e), void (this._config.html ? e.parentNode !== t && (t.innerHTML = "", t.appendChild(e)) : t.textContent = e.textContent)) : void (this._config.html ? (this._config.sanitize && (e = Re(e, this._config.allowList, this._config.sanitizeFn)), t.innerHTML = e) : t.textContent = e) } getTitle() { let t = this._element.getAttribute("data-bs-original-title"); return t || (t = "function" == typeof this._config.title ? this._config.title.call(this._element) : this._config.title), t } updateAttachment(t) { return "right" === t ? "end" : "left" === t ? "start" : t } _initializeOnDelegatedTarget(t, e) { const i = this.constructor.DATA_KEY; return (e = e || R.get(t.delegateTarget, i)) || (e = new this.constructor(t.delegateTarget, this._getDelegateConfig()), R.set(t.delegateTarget, i, e)), e } _getOffset() { const { offset: t } = this._config; return "string" == typeof t ? t.split(",").map(t => Number.parseInt(t, 10)) : "function" == typeof t ? e => t(e, this._element) : t } _getPopperConfig(t) { const e = { placement: t, modifiers: [{ name: "flip", options: { fallbackPlacements: this._config.fallbackPlacements } }, { name: "offset", options: { offset: this._getOffset() } }, { name: "preventOverflow", options: { boundary: this._config.boundary } }, { name: "arrow", options: { element: `.${this.constructor.NAME}-arrow` } }, { name: "onChange", enabled: !0, phase: "afterWrite", fn: t => this._handlePopperPlacementChange(t) }], onFirstUpdate: t => { t.options.placement !== t.placement && this._handlePopperPlacementChange(t) } }; return { ...e, ..."function" == typeof this._config.popperConfig ? this._config.popperConfig(e) : this._config.popperConfig } } _addAttachmentClass(t) { this.getTipElement().classList.add("bs-tooltip-" + this.updateAttachment(t)) } _getAttachment(t) { return ze[t.toUpperCase()] } _setListeners() { this._config.trigger.split(" ").forEach(t => { if ("click" === t) P.on(this._element, this.constructor.Event.CLICK, this._config.selector, t => this.toggle(t)); else if ("manual" !== t) { const e = "hover" === t ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN, i = "hover" === t ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT; P.on(this._element, e, this._config.selector, t => this._enter(t)), P.on(this._element, i, this._config.selector, t => this._leave(t)) } }), this._hideModalHandler = () => { this._element && this.hide() }, P.on(this._element.closest(".modal"), "hide.bs.modal", this._hideModalHandler), this._config.selector ? this._config = { ...this._config, trigger: "manual", selector: "" } : this._fixTitle() } _fixTitle() { const t = this._element.getAttribute("title"), e = typeof this._element.getAttribute("data-bs-original-title"); (t || "string" !== e) && (this._element.setAttribute("data-bs-original-title", t || ""), !t || this._element.getAttribute("aria-label") || this._element.textContent || this._element.setAttribute("aria-label", t), this._element.setAttribute("title", "")) } _enter(t, e) { e = this._initializeOnDelegatedTarget(t, e), t && (e._activeTrigger["focusin" === t.type ? "focus" : "hover"] = !0), e.getTipElement().classList.contains("show") || "show" === e._hoverState ? e._hoverState = "show" : (clearTimeout(e._timeout), e._hoverState = "show", e._config.delay && e._config.delay.show ? e._timeout = setTimeout(() => { "show" === e._hoverState && e.show() }, e._config.delay.show) : e.show()) } _leave(t, e) { e = this._initializeOnDelegatedTarget(t, e), t && (e._activeTrigger["focusout" === t.type ? "focus" : "hover"] = e._element.contains(t.relatedTarget)), e._isWithActiveTrigger() || (clearTimeout(e._timeout), e._hoverState = "out", e._config.delay && e._config.delay.hide ? e._timeout = setTimeout(() => { "out" === e._hoverState && e.hide() }, e._config.delay.hide) : e.hide()) } _isWithActiveTrigger() { for (const t in this._activeTrigger) if (this._activeTrigger[t]) return !0; return !1 } _getConfig(t) { const e = U.getDataAttributes(this._element); return Object.keys(e).forEach(t => { We.has(t) && delete e[t] }), (t = { ...this.constructor.Default, ...e, ..."object" == typeof t && t ? t : {} }).container = !1 === t.container ? document.body : a(t.container), "number" == typeof t.delay && (t.delay = { show: t.delay, hide: t.delay }), "number" == typeof t.title && (t.title = t.title.toString()), "number" == typeof t.content && (t.content = t.content.toString()), l("tooltip", t, this.constructor.DefaultType), t.sanitize && (t.template = Re(t.template, t.allowList, t.sanitizeFn)), t } _getDelegateConfig() { const t = {}; if (this._config) for (const e in this._config) this.constructor.Default[e] !== this._config[e] && (t[e] = this._config[e]); return t } _cleanTipClass() { const t = this.getTipElement(), e = t.getAttribute("class").match(Be); null !== e && e.length > 0 && e.map(t => t.trim()).forEach(e => t.classList.remove(e)) } _handlePopperPlacementChange(t) { const { state: e } = t; e && (this.tip = e.elements.popper, this._cleanTipClass(), this._addAttachmentClass(this._getAttachment(e.placement))) } static jQueryInterface(t) { return this.each((function () { const e = Fe.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); e[t]() } })) } } _(Fe); const Ve = new RegExp("(^|\\s)bs-popover\\S+", "g"), Ke = { ...Fe.Default, placement: "right", offset: [0, 8], trigger: "click", content: "", template: '<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>' }, Xe = { ...Fe.DefaultType, content: "(string|element|function)" }, Ye = { HIDE: "hide.bs.popover", HIDDEN: "hidden.bs.popover", SHOW: "show.bs.popover", SHOWN: "shown.bs.popover", INSERTED: "inserted.bs.popover", CLICK: "click.bs.popover", FOCUSIN: "focusin.bs.popover", FOCUSOUT: "focusout.bs.popover", MOUSEENTER: "mouseenter.bs.popover", MOUSELEAVE: "mouseleave.bs.popover" }; class Qe extends Fe { static get Default() { return Ke } static get NAME() { return "popover" } static get Event() { return Ye } static get DefaultType() { return Xe } isWithContent() { return this.getTitle() || this._getContent() } getTipElement() { return this.tip || (this.tip = super.getTipElement(), this.getTitle() || t.findOne(".popover-header", this.tip).remove(), this._getContent() || t.findOne(".popover-body", this.tip).remove()), this.tip } setContent() { const e = this.getTipElement(); this.setElementContent(t.findOne(".popover-header", e), this.getTitle()); let i = this._getContent(); "function" == typeof i && (i = i.call(this._element)), this.setElementContent(t.findOne(".popover-body", e), i), e.classList.remove("fade", "show") } _addAttachmentClass(t) { this.getTipElement().classList.add("bs-popover-" + this.updateAttachment(t)) } _getContent() { return this._element.getAttribute("data-bs-content") || this._config.content } _cleanTipClass() { const t = this.getTipElement(), e = t.getAttribute("class").match(Ve); null !== e && e.length > 0 && e.map(t => t.trim()).forEach(e => t.classList.remove(e)) } static jQueryInterface(t) { return this.each((function () { const e = Qe.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); e[t]() } })) } } _(Qe); const Ge = { offset: 10, method: "auto", target: "" }, Ze = { offset: "number", method: "string", target: "(string|element)" }; class Je extends B { constructor(t, e) { super(t), this._scrollElement = "BODY" === this._element.tagName ? window : this._element, this._config = this._getConfig(e), this._selector = `${this._config.target} .nav-link, ${this._config.target} .list-group-item, ${this._config.target} .dropdown-item`, this._offsets = [], this._targets = [], this._activeTarget = null, this._scrollHeight = 0, P.on(this._scrollElement, "scroll.bs.scrollspy", () => this._process()), this.refresh(), this._process() } static get Default() { return Ge } static get NAME() { return "scrollspy" } refresh() { const e = this._scrollElement === this._scrollElement.window ? "offset" : "position", i = "auto" === this._config.method ? e : this._config.method, s = "position" === i ? this._getScrollTop() : 0; this._offsets = [], this._targets = [], this._scrollHeight = this._getScrollHeight(), t.find(this._selector).map(e => { const o = n(e), r = o ? t.findOne(o) : null; if (r) { const t = r.getBoundingClientRect(); if (t.width || t.height) return [U[i](r).top + s, o] } return null }).filter(t => t).sort((t, e) => t[0] - e[0]).forEach(t => { this._offsets.push(t[0]), this._targets.push(t[1]) }) } dispose() { P.off(this._scrollElement, ".bs.scrollspy"), super.dispose() } _getConfig(t) { if ("string" != typeof (t = { ...Ge, ...U.getDataAttributes(this._element), ..."object" == typeof t && t ? t : {} }).target && r(t.target)) { let { id: i } = t.target; i || (i = e("scrollspy"), t.target.id = i), t.target = "#" + i } return l("scrollspy", t, Ze), t } _getScrollTop() { return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop } _getScrollHeight() { return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) } _getOffsetHeight() { return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height } _process() { const t = this._getScrollTop() + this._config.offset, e = this._getScrollHeight(), i = this._config.offset + e - this._getOffsetHeight(); if (this._scrollHeight !== e && this.refresh(), t >= i) { const t = this._targets[this._targets.length - 1]; this._activeTarget !== t && this._activate(t) } else { if (this._activeTarget && t < this._offsets[0] && this._offsets[0] > 0) return this._activeTarget = null, void this._clear(); for (let e = this._offsets.length; e--;)this._activeTarget !== this._targets[e] && t >= this._offsets[e] && (void 0 === this._offsets[e + 1] || t < this._offsets[e + 1]) && this._activate(this._targets[e]) } } _activate(e) { this._activeTarget = e, this._clear(); const i = this._selector.split(",").map(t => `${t}[data-bs-target="${e}"],${t}[href="${e}"]`), n = t.findOne(i.join(",")); n.classList.contains("dropdown-item") ? (t.findOne(".dropdown-toggle", n.closest(".dropdown")).classList.add("active"), n.classList.add("active")) : (n.classList.add("active"), t.parents(n, ".nav, .list-group").forEach(e => { t.prev(e, ".nav-link, .list-group-item").forEach(t => t.classList.add("active")), t.prev(e, ".nav-item").forEach(e => { t.children(e, ".nav-link").forEach(t => t.classList.add("active")) }) })), P.trigger(this._scrollElement, "activate.bs.scrollspy", { relatedTarget: e }) } _clear() { t.find(this._selector).filter(t => t.classList.contains("active")).forEach(t => t.classList.remove("active")) } static jQueryInterface(t) { return this.each((function () { const e = Je.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); e[t]() } })) } } P.on(window, "load.bs.scrollspy.data-api", () => { t.find('[data-bs-spy="scroll"]').forEach(t => new Je(t)) }), _(Je); class ti extends B { static get NAME() { return "tab" } show() { if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains("active")) return; let e; const i = s(this._element), n = this._element.closest(".nav, .list-group"); if (n) { const i = "UL" === n.nodeName || "OL" === n.nodeName ? ":scope > li > .active" : ".active"; e = t.find(i, n), e = e[e.length - 1] } const o = e ? P.trigger(e, "hide.bs.tab", { relatedTarget: this._element }) : null; if (P.trigger(this._element, "show.bs.tab", { relatedTarget: e }).defaultPrevented || null !== o && o.defaultPrevented) return; this._activate(this._element, n); const r = () => { P.trigger(e, "hidden.bs.tab", { relatedTarget: this._element }), P.trigger(this._element, "shown.bs.tab", { relatedTarget: e }) }; i ? this._activate(i, i.parentNode, r) : r() } _activate(e, i, n) { const s = (!i || "UL" !== i.nodeName && "OL" !== i.nodeName ? t.children(i, ".active") : t.find(":scope > li > .active", i))[0], o = n && s && s.classList.contains("fade"), r = () => this._transitionComplete(e, s, n); s && o ? (s.classList.remove("show"), this._queueCallback(r, e, !0)) : r() } _transitionComplete(e, i, n) { if (i) { i.classList.remove("active"); const e = t.findOne(":scope > .dropdown-menu .active", i.parentNode); e && e.classList.remove("active"), "tab" === i.getAttribute("role") && i.setAttribute("aria-selected", !1) } e.classList.add("active"), "tab" === e.getAttribute("role") && e.setAttribute("aria-selected", !0), f(e), e.classList.contains("fade") && e.classList.add("show"); let s = e.parentNode; if (s && "LI" === s.nodeName && (s = s.parentNode), s && s.classList.contains("dropdown-menu")) { const i = e.closest(".dropdown"); i && t.find(".dropdown-toggle", i).forEach(t => t.classList.add("active")), e.setAttribute("aria-expanded", !0) } n && n() } static jQueryInterface(t) { return this.each((function () { const e = ti.getOrCreateInstance(this); if ("string" == typeof t) { if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); e[t]() } })) } } P.on(document, "click.bs.tab.data-api", '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]', (function (t) { ["A", "AREA"].includes(this.tagName) && t.preventDefault(), h(this) || ti.getOrCreateInstance(this).show() })), _(ti); const ei = { animation: "boolean", autohide: "boolean", delay: "number" }, ii = { animation: !0, autohide: !0, delay: 5e3 }; class ni extends B { constructor(t, e) { super(t), this._config = this._getConfig(e), this._timeout = null, this._hasMouseInteraction = !1, this._hasKeyboardInteraction = !1, this._setListeners() } static get DefaultType() { return ei } static get Default() { return ii } static get NAME() { return "toast" } show() { P.trigger(this._element, "show.bs.toast").defaultPrevented || (this._clearTimeout(), this._config.animation && this._element.classList.add("fade"), this._element.classList.remove("hide"), f(this._element), this._element.classList.add("showing"), this._queueCallback(() => { this._element.classList.remove("showing"), this._element.classList.add("show"), P.trigger(this._element, "shown.bs.toast"), this._maybeScheduleHide() }, this._element, this._config.animation)) } hide() { this._element.classList.contains("show") && (P.trigger(this._element, "hide.bs.toast").defaultPrevented || (this._element.classList.remove("show"), this._queueCallback(() => { this._element.classList.add("hide"), P.trigger(this._element, "hidden.bs.toast") }, this._element, this._config.animation))) } dispose() { this._clearTimeout(), this._element.classList.contains("show") && this._element.classList.remove("show"), super.dispose() } _getConfig(t) { return t = { ...ii, ...U.getDataAttributes(this._element), ..."object" == typeof t && t ? t : {} }, l("toast", t, this.constructor.DefaultType), t } _maybeScheduleHide() { this._config.autohide && (this._hasMouseInteraction || this._hasKeyboardInteraction || (this._timeout = setTimeout(() => { this.hide() }, this._config.delay))) } _onInteraction(t, e) { switch (t.type) { case "mouseover": case "mouseout": this._hasMouseInteraction = e; break; case "focusin": case "focusout": this._hasKeyboardInteraction = e }if (e) return void this._clearTimeout(); const i = t.relatedTarget; this._element === i || this._element.contains(i) || this._maybeScheduleHide() } _setListeners() { P.on(this._element, "click.dismiss.bs.toast", '[data-bs-dismiss="toast"]',
2615() => this.hide()), P.on(this._element, "mouseover.bs.toast", t => this._onInteraction(t, !0)), P.on(this._element, "mouseout.bs.toast", t => this._onInteraction(t, !1)), P.on(this._element, "focusin.bs.toast", t => this._onInteraction(t, !0)), P.on(this._element, "focusout.bs.toast", t => this._onInteraction(t, !1)) } _clearTimeout() { clearTimeout(this._timeout), this._timeout = null } static jQueryInterface(t) { return this.each((function () { const e = ni.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); e[t](this) } })) } } return _(ni), { Alert: W, Button: q, Carousel: Z, Collapse: et, Dropdown: Ae, Modal: De, Offcanvas: Ne, Popover: Qe, ScrollSpy: Je, Tab: ti, Toast: ni, Tooltip: Fe } })); 2616/*! 2617 * Bootstrap scrollspy.js v4.6.0 (https://getbootstrap.com/) 2618 * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 2619 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 2620 */ 2621(function (global, factory) { 2622 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : 2623 typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) : 2624 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.jQuery, global.Util)); 2625}(this, (function ($, Util) { 2626 'use strict'; 2627 2628 function _interopDefaultLegacy(e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } 2629 2630 var $__default = /*#__PURE__*/_interopDefaultLegacy($); 2631 var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util); 2632 2633 function _defineProperties(target, props) { 2634 for (var i = 0; i < props.length; i++) { 2635 var descriptor = props[i]; 2636 descriptor.enumerable = descriptor.enumerable || false; 2637 descriptor.configurable = true; 2638 if ("value" in descriptor) descriptor.writable = true; 2639 Object.defineProperty(target, descriptor.key, descriptor); 2640 } 2641 } 2642 2643 function _createClass(Constructor, protoProps, staticProps) { 2644 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 2645 if (staticProps) _defineProperties(Constructor, staticProps); 2646 return Constructor; 2647 } 2648 2649 function _extends() { 2650 _extends = Object.assign || function (target) { 2651 for (var i = 1; i < arguments.length; i++) { 2652 var source = arguments[i]; 2653 2654 for (var key in source) { 2655 if (Object.prototype.hasOwnProperty.call(source, key)) { 2656 target[key] = source[key]; 2657 } 2658 } 2659 } 2660 2661 return target; 2662 }; 2663 2664 return _extends.apply(this, arguments); 2665 } 2666 2667 /** 2668 * ------------------------------------------------------------------------ 2669 * Constants 2670 * ------------------------------------------------------------------------ 2671 */ 2672 2673 var NAME = 'scrollspy'; 2674 var VERSION = '4.6.0'; 2675 var DATA_KEY = 'bs.scrollspy'; 2676 var EVENT_KEY = "." + DATA_KEY; 2677 var DATA_API_KEY = '.data-api'; 2678 var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME]; 2679 var Default = { 2680 offset: 10, 2681 method: 'auto', 2682 target: '' 2683 }; 2684 var DefaultType = { 2685 offset: 'number', 2686 method: 'string', 2687 target: '(string|element)' 2688 }; 2689 var EVENT_ACTIVATE = "activate" + EVENT_KEY; 2690 var EVENT_SCROLL = "scroll" + EVENT_KEY; 2691 var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY; 2692 var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'; 2693 var CLASS_NAME_ACTIVE = 'active'; 2694 var SELECTOR_DATA_SPY = '[data-spy="scroll"]'; 2695 var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'; 2696 var SELECTOR_NAV_LINKS = '.nav-link'; 2697 var SELECTOR_NAV_ITEMS = '.nav-item'; 2698 var SELECTOR_LIST_ITEMS = '.list-group-item'; 2699 var SELECTOR_DROPDOWN = '.dropdown'; 2700 var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item'; 2701 var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'; 2702 var METHOD_OFFSET = 'offset'; 2703 var METHOD_POSITION = 'position'; 2704 /** 2705 * ------------------------------------------------------------------------ 2706 * Class Definition 2707 * ------------------------------------------------------------------------ 2708 */ 2709 2710 var ScrollSpy = /*#__PURE__*/function () { 2711 function ScrollSpy(element, config) { 2712 var _this = this; 2713 2714 this._element = element; 2715 this._scrollElement = element.tagName === 'BODY' ? window : element; 2716 this._config = this._getConfig(config); 2717 this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_IT
2717EMS); 2718 this._offsets = []; 2719 this._targets = []; 2720 this._activeTarget = null; 2721 this._scrollHeight = 0; 2722 $__default['default'](this._scrollElement).on(EVENT_SCROLL, function (event) { 2723 return _this._process(event); 2724 }); 2725 this.refresh(); 2726 2727 this._process(); 2728 } // Getters 2729 2730 2731 var _proto = ScrollSpy.prototype; 2732 2733 // Public 2734 _proto.refresh = function refresh() { 2735 var _this2 = this; 2736 2737 var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION; 2738 var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; 2739 var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0; 2740 this._offsets = []; 2741 this._targets = []; 2742 this._scrollHeight = this._getScrollHeight(); 2743 var targets = [].slice.call(document.querySelectorAll(this._selector)); 2744 targets.map(function (element) { 2745 var target; 2746 var targetSelector = Util__default['default'].getSelectorFromElement(element); 2747 2748 if (targetSelector) { 2749 target = document.querySelector(targetSelector); 2750 } 2751 2752 if (target) { 2753 var targetBCR = target.getBoundingClientRect(); 2754 2755 if (targetBCR.width || targetBCR.height) { 2756 // TODO (fat): remove sketch reliance on jQuery position/offset 2757 return [$__default['default'](target)[offsetMethod]().top + offsetBase, targetSelector]; 2758 } 2759 } 2760 2761 return null; 2762 }).filter(function (item) { 2763 return item; 2764 }).sort(function (a, b) { 2765 return a[0] - b[0]; 2766 }
vendor: 4,014 bytes, lines 2766-2871
2766).forEach(function (item) { 2767 _this2._offsets.push(item[0]); 2768 2769 _this2._targets.push(item[1]); 2770 }); 2771 }; 2772 2773 _proto.dispose = function dispose() { 2774 $__default['default'].removeData(this._element, DATA_KEY); 2775 $__default['default'](this._scrollElement).off(EVENT_KEY); 2776 this._element = null; 2777 this._scrollElement = null; 2778 this._config = null; 2779 this._selector = null; 2780 this._offsets = null; 2781 this._targets = null; 2782 this._activeTarget = null; 2783 this._scrollHeight = null; 2784 } // Private 2785 ; 2786 2787 _proto._getConfig = function _getConfig(config) { 2788 config = _extends({}, Default, typeof config === 'object' && config ? config : {}); 2789 2790 if (typeof config.target !== 'string' && Util__default['default'].isElement(config.target)) { 2791 var id = $__default['default'](config.target).attr('id'); 2792 2793 if (!id) { 2794 id = Util__default['default'].getUID(NAME); 2795 $__default['default'](config.target).attr('id', id); 2796 } 2797 2798 config.target = "#" + id; 2799 } 2800 2801 Util__default['default'].typeCheckConfig(NAME, config, DefaultType); 2802 return config; 2803 }; 2804 2805 _proto._getScrollTop = function _getScrollTop() { 2806 return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; 2807 }; 2808 2809 _proto._getScrollHeight = function _getScrollHeight() { 2810 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); 2811 }; 2812 2813 _proto._getOffsetHeight = function _getOffsetHeight() { 2814 return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; 2815 }; 2816 2817 _proto._process = function _process() { 2818 var scrollTop = this._getScrollTop() + this._config.offset; 2819 2820 var scrollHeight = this._getScrollHeight(); 2821 2822 var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); 2823 2824 if (this._scrollHeight !== scrollHeight) { 2825 this.refresh(); 2826 } 2827 2828 if (scrollTop >= maxScroll) { 2829 var target = this._targets[this._targets.length - 1]; 2830 2831 if (this._activeTarget !== target) { 2832 this._activate(target); 2833 } 2834 2835 return; 2836 } 2837 2838 if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { 2839 this._activeTarget = null; 2840 2841 this._clear(); 2842 2843 return; 2844 } 2845 2846 for (var i = this._offsets.length; i--;) { 2847 var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); 2848 2849 if (isActiveTarget) { 2850 this._activate(this._targets[i]); 2851 } 2852 } 2853 }; 2854 2855 _proto._activate = function _activate(target) { 2856 this._activeTarget = target; 2857 2858 this._clear(); 2859 2860 var queries = this._selector.split(',').map(function (selector) { 2861 return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"; 2862 }); 2863 2864 var $link = $__default['default']([].slice.call(document.querySelectorAll(queries.join(',')))); 2865 2866 if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) { 2867 $link.closest(SELECTOR_DROPDOWN).find(SELECTOR_DROPDOWN_TOGGLE).addClass(CLASS_NAME_ACTIVE); 2868 $link.addClass(CLASS_NAME_ACTIVE); 2869 } else { 2870 // Set triggered link as active 2871 $link.addClass(CLASS_NAME_ACTIVE); // Set triggered links parents as active
vendor: 4,818 bytes, lines 2872-2997
2872 // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor 2873 2874 $link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE); // Handle special case when .nav-link is inside .nav-item 2875 2876 $link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE); 2877 } 2878 2879 $__default['default'](this._scrollElement).trigger(EVENT_ACTIVATE, { 2880 relatedTarget: target 2881 }); 2882 }; 2883 2884 _proto._clear = function _clear() { 2885 [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) { 2886 return node.classList.contains(CLASS_NAME_ACTIVE); 2887 }).forEach(function (node) { 2888 return node.classList.remove(CLASS_NAME_ACTIVE); 2889 }); 2890 } // Static 2891 ; 2892 2893 ScrollSpy._jQueryInterface = function _jQueryInterface(config) { 2894 return this.each(function () { 2895 var data = $__default['default'](this).data(DATA_KEY); 2896 2897 var _config = typeof config === 'object' && config; 2898 2899 if (!data) { 2900 data = new ScrollSpy(this, _config); 2901 $__default['default'](this).data(DATA_KEY, data); 2902 } 2903 2904 if (typeof config === 'string') { 2905 if (typeof data[config] === 'undefined') { 2906 throw new TypeError("No method named \"" + config + "\""); 2907 } 2908 2909 data[config](); 2910 } 2911 }); 2912 }; 2913 2914 _createClass(ScrollSpy, null, [{ 2915 key: "VERSION", 2916 get: function get() { 2917 return VERSION; 2918 } 2919 }, { 2920 key: "Default", 2921 get: function get() { 2922 return Default; 2923 } 2924 }]); 2925 2926 return ScrollSpy; 2927 }(); 2928 /** 2929 * ------------------------------------------------------------------------ 2930 * Data Api implementation 2931 * ------------------------------------------------------------------------ 2932 */ 2933 2934 2935 $__default['default'](window).on(EVENT_LOAD_DATA_API, function () { 2936 var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY)); 2937 var scrollSpysLength = scrollSpys.length; 2938 2939 for (var i = scrollSpysLength; i--;) { 2940 var $spy = $__default['default'](scrollSpys[i]); 2941 2942 ScrollSpy._jQueryInterface.call($spy, $spy.data()); 2943 } 2944 }); 2945 /** 2946 * ------------------------------------------------------------------------ 2947 * jQuery 2948 * ------------------------------------------------------------------------ 2949 */ 2950 2951 $__default['default'].fn[NAME] = ScrollSpy._jQueryInterface; 2952 $__default['default'].fn[NAME].Constructor = ScrollSpy; 2953 2954 $__default['default'].fn[NAME].noConflict = function () { 2955 $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT; 2956 return ScrollSpy._jQueryInterface; 2957 }; 2958 2959 return ScrollSpy; 2960 2961}))); 2962//# sourceMappingURL=scrollspy.js.map 2963/*! 2964 * Bootstrap util.js v4.6.0 (https://getbootstrap.com/) 2965 * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 2966 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 2967 */ 2968(function (global, factory) { 2969 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) : 2970 typeof define === 'function' && define.amd ? define(['jquery'], factory) : 2971 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Util = factory(global.jQuery)); 2972}(this, (function ($) { 2973 'use strict'; 2974 2975 function _interopDefaultLegacy(e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } 2976 2977 var $__default = /*#__PURE__*/_interopDefaultLegacy($); 2978 2979 /** 2980 * -------------------------------------------------------------------------- 2981 * Bootstrap (v4.6.0): util.js 2982 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 2983 * -------------------------------------------------------------------------- 2984 */ 2985 /** 2986 * ------------------------------------------------------------------------ 2987 * Private TransitionEnd Helpers 2988 * ------------------------------------------------------------------------ 2989 */ 2990 2991 var TRANSITION_END = 'transitionend'; 2992 var MAX_UID = 1000000; 2993 var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp) 2994 2995 function toType(obj) { 2996 if (obj === null || typeof obj === 'undefined') { 2997 return "" + obj;
vendor: 5,951 bytes, lines 2998-3145
2998 } 2999 3000 return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); 3001 } 3002 3003 function getSpecialTransitionEndEvent() { 3004 return { 3005 bindType: TRANSITION_END, 3006 delegateType: TRANSITION_END, 3007 handle: function handle(event) { 3008 if ($__default['default'](event.target).is(this)) { 3009 return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params 3010 } 3011 3012 return undefined; 3013 } 3014 }; 3015 } 3016 3017 function transitionEndEmulator(duration) { 3018 var _this = this; 3019 3020 var called = false; 3021 $__default['default'](this).one(Util.TRANSITION_END, function () { 3022 called = true; 3023 }); 3024 setTimeout(function () { 3025 if (!called) { 3026 Util.triggerTransitionEnd(_this); 3027 } 3028 }, duration); 3029 return this; 3030 } 3031 3032 function setTransitionEndSupport() { 3033 $__default['default'].fn.emulateTransitionEnd = transitionEndEmulator; 3034 $__default['default'].event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); 3035 } 3036 /** 3037 * -------------------------------------------------------------------------- 3038 * Public Util Api 3039 * -------------------------------------------------------------------------- 3040 */ 3041 3042 3043 var Util = { 3044 TRANSITION_END: 'bsTransitionEnd', 3045 getUID: function getUID(prefix) { 3046 do { 3047 prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here 3048 } while (document.getElementById(prefix)); 3049 3050 return prefix; 3051 }, 3052 getSelectorFromElement: function getSelectorFromElement(element) { 3053 var selector = element.getAttribute('data-target'); 3054 3055 if (!selector || selector === '#') { 3056 var hrefAttr = element.getAttribute('href'); 3057 selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''; 3058 } 3059 3060 try { 3061 return document.querySelector(selector) ? selector : null; 3062 } catch (_) { 3063 return null; 3064 } 3065 }, 3066 getTransitionDurationFromElement: function getTransitionDurationFromElement(element) { 3067 if (!element) { 3068 return 0; 3069 } // Get transition-duration of the element 3070 3071 3072 var transitionDuration = $__default['default'](element).css('transition-duration'); 3073 var transitionDelay = $__default['default'](element).css('transition-delay'); 3074 var floatTransitionDuration = parseFloat(transitionDuration); 3075 var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found 3076 3077 if (!floatTransitionDuration && !floatTransitionDelay) { 3078 return 0; 3079 } // If multiple durations are defined, take the first 3080 3081 3082 transitionDuration = transitionDuration.split(',')[0]; 3083 transitionDelay = transitionDelay.split(',')[0]; 3084 return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; 3085 }, 3086 reflow: function reflow(element) { 3087 return element.offsetHeight; 3088 }, 3089 triggerTransitionEnd: function triggerTransitionEnd(element) { 3090 $__default['default'](element).trigger(TRANSITION_END); 3091 }, 3092 supportsTransitionEnd: function supportsTransitionEnd() { 3093 return Boolean(TRANSITION_END); 3094 }, 3095 isElement: function isElement(obj) { 3096 return (obj[0] || obj).nodeType; 3097 }, 3098 typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { 3099 for (var property in configTypes) { 3100 if (Object.prototype.hasOwnProperty.call(configTypes, property)) { 3101 var expectedTypes = configTypes[property]; 3102 var value = config[property]; 3103 var valueType = value && Util.isElement(value) ? 'element' : toType(value); 3104 3105 if (!new RegExp(expectedTypes).test(valueType)) { 3106 throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); 3107 } 3108 } 3109 } 3110 }, 3111 findShadowRoot: function findShadowRoot(element) { 3112 if (!document.documentElement.attachShadow) { 3113 return null; 3114 } // Can find the shadow root otherwise it'll return the document 3115 3116 3117 if (typeof element.getRootNode === 'function') { 3118 var root = element.getRootNode(); 3119 return root instanceof ShadowRoot ? root : null; 3120 } 3121 3122 if (element instanceof ShadowRoot) { 3123 return element; 3124 } // when we don't find a shadow root 3125 3126 3127 if (!element.parentNode) { 3128 return null; 3129 } 3130 3131 return Util.findShadowRoot(element.parentNode); 3132 }, 3133 jQueryDetection: function jQueryDetection() { 3134 if (typeof $__default['default'] === 'undefined') { 3135 throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); 3136 } 3137 3138 var version = $__default['default'].fn.jquery.split(' ')[0].split('.'); 3139 var minMajor = 1; 3140 var ltMajor = 2; 3141 var minMinor = 9; 3142 var minPatch = 1; 3143 var maxMajor = 4; 3144 3145 if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >
3145= maxMajor) { 3146 throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0'); 3147 } 3148 } 3149 }; 3150 Util.jQueryDetection(); 3151 setTransitionEndSupport(); 3152 3153 return Util; 3154 3155}))); 3156//# sourceMappingURL=util.js.map 3157; (function (factory) { if (typeof define === 'function' && define.amd) { define(['jquery'], factory) } else if (typeof exports === 'object') { factory(require('jquery')) } else { factory(window.jQuery || window.Zepto) } }(function ($) { var CLOSE_EVENT = 'Close', BEFORE_CLOSE_EVENT = 'BeforeClose', AFTER_CLOSE_EVENT = 'AfterClose', BEFORE_APPEND_EVENT = 'BeforeAppend', MARKUP_PARSE_EVENT = 'MarkupParse', OPEN_EVENT = 'Open', CHANGE_EVENT = 'Change', NS = 'mfp', EVENT_NS = '.' + NS, READY_CLASS = 'mfp-ready', REMOVING_CLASS = 'mfp-removing', PREVENT_CLOSE_CLASS = 'mfp-prevent-close'; var mfp, MagnificPopup = function () { }, _isJQ = !!(window.jQuery), _prevStatus, _window = $(window), _body, _document, _prevContentType, _wrapClasses, _currPopupType; var _mfpOn = function (name, f) { mfp.ev.on(NS + name + EVENT_NS, f) }, _getEl = function (className, appendTo, html, raw) { var el = document.createElement('div'); el.className = 'mfp-' + className; if (html) { el.innerHTML = html } if (!raw) { el = $(el); if (appendTo) { el.appendTo(appendTo) } } else if (appendTo) { appendTo.appendChild(el) } return el }, _mfpTrigger = function (e, data) { mfp.ev.triggerHandler(NS + e, data); if (mfp.st.callbacks) { e = e.charAt(0).toLowerCase() + e.slice(1); if (mfp.st.callbacks[e]) { mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]) } } }, _getCloseBtn = function (type) { if (type !== _currPopupType || !mfp.currTemplate.closeBtn) { mfp.currTemplate.closeBtn = $(mfp.st.closeMarkup.replace('%title%', mfp.st.tClose)); _currPopupType = type } return mfp.currTemplate.closeBtn }, _checkInstance = function () { if (!$.magnificPopup.instance) { mfp = new MagnificPopup(); mfp.init(); $.magnificPopup.instance = mfp } }, supportsTransitions = function () { var s = document.createElement('p').style, v = ['ms', 'O', 'Moz', 'Webkit']; if (s['transition'] !== undefined) { return true } while (v.length) { if (v.pop() + 'Transition' in s) { return true } } return false }; MagnificPopup.prototype = { constructor: MagnificPopup, init: function () { var appVersion = navigator.appVersion; mfp.isIE7 = appVersion.indexOf("MSIE 7.") !== -1; mfp.isIE8 = appVersion.indexOf("MSIE 8.") !== -1; mfp.isLowIE = mfp.isIE7 || mfp.isIE8; mfp.isAndroid = (/android/gi).test(appVersion); mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion); mfp.supportsTransition = supportsTransitions(); mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent)); _document = $(document); mfp.popupsCache = {} }, open: function (data) { if (!_body) { _body = $(document.body) } var i; if (data.isObj === false) { mfp.items = data.items.toArray(); mfp.index = 0; var items = data.items, item; for (i = 0; i < items.length; i++) { item = items[i]; if (item.parsed) { item = item.el[0] } if (item === data.el[0]) { mfp.index = i; break } } } else { mfp.items = $.isArray(data.items) ? data.items : [data.items]; mfp.index = data.index || 0 } if (mfp.isOpen) { mfp.updateItemHTML(); return } mfp.types = []; _wrapClasses = ''; if (data.mainEl && data.mainEl.length) { mfp.ev = data.mainEl.eq(0) } else { mfp.ev = _document } if (data.key) { if (!mfp.popupsCache[data.key]) { mfp.popupsCache[data.key] = {} } mfp.currTemplate = mfp.popupsCache[data.key] } else { mfp.currTemplate = {} } mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data); mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos; if (mfp.st.modal) { mfp.st.closeOnContentClick = false; mfp.st.closeOnBgClick = false; mfp.st.showCloseBtn = false; mfp.st.enableEscapeKey = false } if (!mfp.bgOverlay) { mfp.bgOverlay = _getEl('bg').on('click' + EVENT_NS, function () { mfp.close() });
3157 mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click' + EVENT_NS, function (e) { if (mfp._checkIfClose(e.target)) { mfp.close() } }); mfp.container = _getEl('container', mfp.wrap) } mfp.contentContainer = _getEl('content'); if (mfp.st.preloader) { mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading) } var modules = $.magnificPopup.modules; for (i = 0; i < modules.length; i++) { var n = modules[i]; n = n.charAt(0).toUpperCase() + n.slice(1); mfp['init' + n].call(mfp) } _mfpTrigger('BeforeOpen'); if (mfp.st.showCloseBtn) { if (!mfp.st.closeBtnInside) { mfp.wrap.append(_getCloseBtn()) } else { _mfpOn(MARKUP_PARSE_EVENT, function (e, template, values, item) { values.close_replaceWith = _getCloseBtn(item.type) }); _wrapClasses += ' mfp-close-btn-in' } } if (mfp.st.alignTop) { _wrapClasses += ' mfp-align-top' } if (mfp.fixedContentPos) { mfp.wrap.css({ overflow: mfp.st.overflowY, overflowX: 'hidden', overflowY: mfp.st.overflowY }) } else { mfp.wrap.css({ top: _window.scrollTop(), position: 'absolute' }) } if (mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos)) { mfp.bgOverlay.css({ height: _document.height(), position: 'absolute' }) } if (mfp.st.enableEscapeKey) { _document.on('keyup' + EVENT_NS, function (e) { if (e.keyCode === 27) { mfp.close() } }) } _window.on('resize' + EVENT_NS, function () { mfp.updateSize() }); if (!mfp.st.closeOnContentClick) { _wrapClasses += ' mfp-auto-cursor' } if (_wrapClasses) mfp.wrap.addClass(_wrapClasses); var windowHeight = mfp.wH = _window.height(); var windowStyles = {}; if (mfp.fixedContentPos) { if (mfp._hasScrollBar(windowHeight)) { var s = mfp._getScrollbarSize(); if (s) { windowStyles.marginRight = s } } } if (mfp.fixedContentPos) { if (!mfp.isIE7) { windowStyles.overflow = 'hidden' } else { $('body, html').css('overflow', 'hidden') } } var classesToadd = mfp.st.mainClass; if (mfp.isIE7) { classesToadd += ' mfp-ie7' } if (classesToadd) { mfp._addClassToMFP(classesToadd) } mfp.updateItemHTML(); _mfpTrigger('BuildControls'); $('html').css(windowStyles); mfp.bgOverlay.add(mfp.wrap).prependTo(mfp.st.prependTo || _body); mfp._lastFocusedEl = document.activeElement; setTimeout(function () { if (mfp.content) { mfp._addClassToMFP(READY_CLASS); mfp._setFocus() } else { mfp.bgOverlay.addClass(READY_CLASS) } _document.on('focusin' + EVENT_NS, mfp._onFocusIn) }, 16); mfp.isOpen = true; mfp.updateSize(windowHeight); _mfpTrigger(OPEN_EVENT); return data }, close: function () { if (!mfp.isOpen) return; _mfpTrigger(BEFORE_CLOSE_EVENT); mfp.isOpen = false; if (mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition) { mfp._addClassToMFP(REMOVING_CLASS); setTimeout(function () { mfp._close() }, mfp.st.removalDelay) } else { mfp._close() } }, _close: function () { _mfpTrigger(CLOSE_EVENT); var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' '; mfp.bgOverlay.detach(); mfp.wrap.detach(); mfp.container.empty(); if (mfp.st.mainClass) { classesToRemove += mfp.st.mainClass + ' ' } mfp._removeClassFromMFP(classesToRemove); if (mfp.fixedContentPos) { var windowStyles = { marginRight: '' }; if (mfp.isIE7) { $('body, html').css('overflow', '') } else { windowStyles.overflow = '' } $('html').css(windowStyles) } _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS); mfp.ev.off(EVENT_NS); mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style'); mfp.bgOverlay.attr('class', 'mfp-bg'); mfp.container.attr('class', 'mfp-container'); if (mfp.st.showCloseBtn && (!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) { if (mfp.currTemplate.closeBtn) mfp.currTemplate.closeBtn.detach() } if (mfp._lastFocusedEl) { $(mfp._lastFocusedEl).focus() } mfp.currItem = null; mfp.content = null; mfp.currTemplate = null; mfp.prevHeight = 0; _mfpTrigger(AFTER_CLOSE_EVENT) }, updateSize: function (winHeight) { if (mfp.isIOS) { var zoomLevel = document.documentElement.clientWidth / window.innerWidth; var height = window.innerHeight * zoomLevel; mfp.wrap.css('height', height); mfp.wH = height } else { mfp.wH = winHeight || _window.height() } if (!mfp.fixedContentPos) { mfp.wrap.css('height', mfp.wH) } _mfpTrigger('Resize') }, updateItemHTML: function () { var item = mfp.items[mfp.index]; mfp.contentContainer.detach(); if (mfp.content) mfp.content.detach(); if (!item.parsed) { item = mfp.parseEl(mfp.index) } var type = item.type; _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]); mfp.currItem = item; if (!mfp.currTemplate[type]) { var markup = mfp.st[type] ? mfp.st[type].markup : false; _mfpTrigger('FirstMarkupParse', markup); if (markup) { mfp.currTemplate[type] = $(markup) } else { mfp.currTemplate[type] = true } } if (_prevContentType && _prevContentType !== item.type) { mfp.container.removeClass('mfp-' + _prevContentType + '-holder') } var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]); mfp.appendContent(newContent, type); item.preloaded = true; _mfpTrigger(CHANGE_EVENT, item); _prevContentType = item.type; mfp.container.prepend(mfp.contentContainer); _mfpTrigger('AfterChange') }, appendContent: function (newContent, type) { mfp.content = newContent; if (newContent) { if (mfp.st.showCloseBtn && mfp.st.closeBtnInside && mfp.currTemplate[type] === true) { if (!mfp.content.find('.mfp-close').length) { mfp.content.append(_getCloseBtn()) } } else { mfp.content = newContent } } else { mfp.content = '' } _mfpTrigger(BEFORE_APPEND_EVENT); mfp.container.addClass('mfp-' + type + '-holder'); mfp.contentContainer.append(mfp.content) }, parseEl: function (index) { var item = mfp.items[index], type; if (item.tagName) { item = { el: $(item) } } else { type = item.type; item = { data: item, src: item.src } }
3157 if (item.el) { var types = mfp.types; for (var i = 0; i < types.length; i++) { if (item.el.hasClass('mfp-' + types[i])) { type = types[i]; break } } item.src = item.el.attr('data-mfp-src'); if (!item.src) { item.src = item.el.attr('href') } } item.type = type || mfp.st.type || 'inline'; item.index = index; item.parsed = true; mfp.items[index] = item; _mfpTrigger('ElementParse', item); return mfp.items[index] }, addGroup: function (el, options) { var eHandler = function (e) { e.mfpEl = this; mfp._openClick(e, el, options) }; if (!options) { options = {} } var eName = 'click.magnificPopup'; options.mainEl = el; if (options.items) { options.isObj = true; el.off(eName).on(eName, eHandler) } else { options.isObj = false; if (options.delegate) { el.off(eName).on(eName, options.delegate, eHandler) } else { options.items = el; el.off(eName).on(eName, eHandler) } } }, _openClick: function (e, el, options) { var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick; if (!midClick && (e.which === 2 || e.ctrlKey || e.metaKey)) { return } var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn; if (disableOn) { if ($.isFunction(disableOn)) { if (!disableOn.call(mfp)) { return true } } else { if (_window.width() < disableOn) { return true } } } if (e.type) { e.preventDefault(); if (mfp.isOpen) { e.stopPropagation() } } options.el = $(e.mfpEl); if (options.delegate) { options.items = el.find(options.delegate) } mfp.open(options) }, updateStatus: function (status, text) { if (mfp.preloader) { if (_prevStatus !== status) { mfp.container.removeClass('mfp-s-' + _prevStatus) } if (!text && status === 'loading') { text = mfp.st.tLoading } var data = { status: status, text: text }; _mfpTrigger('UpdateStatus', data); status = data.status; text = data.text; mfp.preloader.html(text); mfp.preloader.find('a').on('click', function (e) { e.stopImmediatePropagation() }); mfp.container.addClass('mfp-s-' + status); _prevStatus = status } }, _checkIfClose: function (target) { if ($(target).hasClass(PREVENT_CLOSE_CLASS)) { return } var closeOnContent = mfp.st.closeOnContentClick; var closeOnBg = mfp.st.closeOnBgClick; if (closeOnContent && closeOnBg) { return true } else { if (!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0])) { return true } if ((target !== mfp.content[0] && !$.contains(mfp.content[0], target))) { if (closeOnBg) { if ($.contains(document, target)) { return true } } } else if (closeOnContent) { return true } } return false }, _addClassToMFP: function (cName) { mfp.bgOverlay.addClass(cName); mfp.wrap.addClass(cName) }, _removeClassFromMFP: function (cName) { this.bgOverlay.removeClass(cName); mfp.wrap.removeClass(cName) }, _hasScrollBar: function (winHeight) { return ((mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height())) }, _setFocus: function () { (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus() }, _onFocusIn: function (e) { if (e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target)) { mfp._setFocus(); return false } }, _parseMarkup: function (template, values, item) { var arr; if (item.data) { values = $.extend(item.data, values) } _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item]); $.each(values, function (key, value) { if (value === undefined || value === false) { return true } arr = key.split('_'); if (arr.length > 1) { var el = template.find(EVENT_NS + '-' + arr[0]); if (el.length > 0) { var attr = arr[1]; if (attr === 'replaceWith') { if (el[0] !== value[0]) { el.replaceWith(value) } } else if (attr === 'img') { if (el.is('img')) { el.attr('src', value) } else { el.replaceWith('<img src="' + value + '" class="' + el.attr('class') + '" />') } } else { el.attr(arr[1], value) } } } else { template.find(EVENT_NS + '-' + key).html(value) } }) }, _getScrollbarSize: function () { if (mfp.scrollbarSize === undefined) { var scrollDiv = document.createElement("div"); scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;'; document.body.appendChild(scrollDiv); mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth; document.body.removeChild(scrollDiv) } return mfp.scrollbarSize } }; $.magnificPopup = { instance: null, proto: MagnificPopup.prototype, modules: [], open: function (options, index) { _checkInstance(); if (!options) { options = {} } else { options = $.extend(true, {}, options) } options.isObj = true; options.index = index || 0; return this.instance.open(options) }, close: function () { return $.magnificPopup.instance && $.magnificPopup.instance.close() }, registerModule: function (name, module) { if (module.options) { $.magnificPopup.defaults[name] = module.options } $.extend(this.proto, module.proto); this.modules.push(name) }, defaults: { disableOn: 0, key: null, midClick: false, mainClass: '', preloader: true, focus: '', closeOnContentClick: false, closeOnBgClick: true, closeBtnInside: true, showCloseBtn: true, enableEscapeKey: true, modal: false, alignTop: false, removalDelay: 0, prependTo: null, fixedContentPos: 'auto', fixedBgPos: 'auto', overflowY: 'auto', closeMarkup: '<button title="%title%" type="button" class="mfp-close">×</button>', tClose: 'Close (Esc)', tLoading: 'Loading...' } }; $.fn.magnificPopup = function (options) { _checkInstance(); var jqEl = $(this); if (typeof options === "string") { if (options === 'open') { var items, itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup, index = parseInt(arguments[1], 10) || 0; if (itemOpts.items) { items = itemOpts.items[index] } else { items = jqEl; if (itemOpts.delegate) { items = items.find(itemOpts.delegate) } items = items.eq(index) } mfp._openClick({ mfpEl: items }, jqEl, itemOpts) } else { if (mfp.isOpen) mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1)) } } else { options = $.extend(true, {}, options); if (_isJQ) { jqEl.data('magnificPopup', options) } else { jqEl[0].magnificPopup = options } mfp.addGroup(jqEl, options) } return jqEl }; var INLINE_NS = 'inline', _hiddenClass, _inlinePlaceholder, _lastInlineElement, _putInlineElementsBack = function () { if (_lastInlineElement) { _inlinePlaceholder.after(_lastInlineElement.addClass(_hiddenClass)).detach(); _lastInlineElement = null } }; $.magnificPopup.registerModule(INLINE_NS, { options: { hiddenClass: 'hide', markup: '', tNotFound: 'Content not found' }, proto: { initInline: function () { mfp.types.push(INLINE_NS); _mfpOn(CLOSE_EVENT + '.' + INLINE_NS, function () { _putInlineElementsBack() }) }, getInline: function (item, template) { _putInlineElementsBack(); if (item.src) { var inlineSt = mfp.st.inline, el = $(item.src); if (el.length) { var parent = el[0].parentNode; if (parent && parent.tagName) { if (!_inlinePlaceholder) { _hiddenClass = inlineSt.hiddenClass; _inlinePlaceholder = _getEl(_hiddenClass); _hiddenClass = 'mfp-' + _hiddenClass } _lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass) } mfp.updateStatus('ready') } else { mfp.updateStatus('error', inlineSt.tNotFound); el = $('<div>') }
3157 item.inlineElement = el; return el } mfp.updateStatus('ready'); mfp._parseMarkup(template, {}, item); return template } } }); var AJAX_NS = 'ajax', _ajaxCur, _removeAjaxCursor = function () { if (_ajaxCur) { _body.removeClass(_ajaxCur) } }, _destroyAjaxRequest = function () { _removeAjaxCursor(); if (mfp.req) { mfp.req.abort() } }; $.magnificPopup.registerModule(AJAX_NS, { options: { settings: null, cursor: 'mfp-ajax-cur', tError: '<a href="%url%">The content</a> could not be loaded.' }, proto: { initAjax: function () { mfp.types.push(AJAX_NS); _ajaxCur = mfp.st.ajax.cursor; _mfpOn(CLOSE_EVENT + '.' + AJAX_NS, _destroyAjaxRequest); _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest) }, getAjax: function (item) { if (_ajaxCur) _body.addClass(_ajaxCur); mfp.updateStatus('loading'); var opts = $.extend({ url: item.src, success: function (data, textStatus, jqXHR) { var temp = { data: data, xhr: jqXHR }; _mfpTrigger('ParseAjax', temp); mfp.appendContent($(temp.data), AJAX_NS); item.finished = true; _removeAjaxCursor(); mfp._setFocus(); setTimeout(function () { mfp.wrap.addClass(READY_CLASS) }, 16); mfp.updateStatus('ready'); _mfpTrigger('AjaxContentAdded') }, error: function () { _removeAjaxCursor(); item.finished = item.loadError = true; mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src)) } }, mfp.st.ajax.settings); mfp.req = $.ajax(opts); return '' } } }); var _imgInterval, _getTitle = function (item) { if (item.data && item.data.title !== undefined) return item.data.title; var src = mfp.st.image.titleSrc; if (src) { if ($.isFunction(src)) { return src.call(mfp, item) } else if (item.el) { return item.el.attr(src) || '' } } return '' }; $.magnificPopup.registerModule('image', { options: { markup: '<div class="mfp-figure">' + '<div class="mfp-close"></div>' + '<figure>' + '<div class="mfp-img"></div>' + '<figcaption>' + '<div class="mfp-bottom-bar">' + '<div class="mfp-title"></div>' + '<div class="mfp-counter"></div>' + '</div>' + '</figcaption>' + '</figure>' + '</div>', cursor: 'mfp-zoom-out-cur', titleSrc: 'title', verticalFit: true, tError: '<a href="%url%">The image</a> could not be loaded.' }, proto: { initImage: function () { var imgSt = mfp.st.image, ns = '.image'; mfp.types.push('image'); _mfpOn(OPEN_EVENT + ns, function () { if (mfp.currItem.type === 'image' && imgSt.cursor) { _body.addClass(imgSt.cursor) } }); _mfpOn(CLOSE_EVENT + ns, function () { if (imgSt.cursor) { _body.removeClass(imgSt.cursor) } _window.off('resize' + EVENT_NS) }); _mfpOn('Resize' + ns, mfp.resizeImage); if (mfp.isLowIE) { _mfpOn('AfterChange', mfp.resizeImage) } }, resizeImage: function () { var item = mfp.currItem; if (!item || !item.img) return; if (mfp.st.image.verticalFit) { var decr = 0; if (mfp.isLowIE) { decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'), 10) } item.img.css('max-height', mfp.wH - decr) } }, _onImageHasSize: function (item) { if (item.img) { item.hasSize = true; if (_imgInterval) { clearInterval(_imgInterval) } item.isCheckingImgSize = false; _mfpTrigger('ImageHasSize', item); if (item.imgHidden) { if (mfp.content) mfp.content.removeClass('mfp-loading'); item.imgHidden = false } } }, findImageSize: function (item) { var counter = 0, img = item.img[0], mfpSetInterval = function (delay) { if (_imgInterval) { clearInterval(_imgInterval) } _imgInterval = setInterval(function () { if (img.naturalWidth > 0) { mfp._onImageHasSize(item); return } if (counter > 200) { clearInterval(_imgInterval) } counter++; if (counter === 3) { mfpSetInterval(10) } else if (counter === 40) { mfpSetInterval(50) } else if (counter === 100) { mfpSetInterval(500) } }, delay) }; mfpSetInterval(1) }, getImage: function (item, template) { var guard = 0, onLoadComplete = function () { if (item) { if (item.img[0].complete) { item.img.off('.mfploader'); if (item === mfp.currItem) { mfp._onImageHasSize(item); mfp.updateStatus('ready') } item.hasSize = true; item.loaded = true; _mfpTrigger('ImageLoadComplete') } else { guard++; if (guard < 200) { setTimeout(onLoadComplete, 100) } else { onLoadError() } } } }, onLoadError = function () { if (item) { item.img.off('.mfploader'); if (item === mfp.currItem) { mfp._onImageHasSize(item); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)) } item.hasSize = true; item.loaded = true; item.loadError = true } }, imgSt = mfp.st.image; var el = template.find('.mfp-img'); if (el.length) { var img = document.createElement('img'); img.className = 'mfp-img'; if (item.el && item.el.find('img').length) { img.alt = item.el.find('img').attr('alt') } item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError); img.src = item.src; if (el.is('img')) { item.img = item.img.clone() } img = item.img[0];
3157 if (img.naturalWidth > 0) { item.hasSize = true } else if (!img.width) { item.hasSize = false } } mfp._parseMarkup(template, { title: _getTitle(item), img_replaceWith: item.img }, item); mfp.resizeImage(); if (item.hasSize) { if (_imgInterval) clearInterval(_imgInterval); if (item.loadError) { template.addClass('mfp-loading'); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)) } else { template.removeClass('mfp-loading'); mfp.updateStatus('ready') } return template } mfp.updateStatus('loading'); item.loading = true; if (!item.hasSize) { item.imgHidden = true; template.addClass('mfp-loading'); mfp.findImageSize(item) } return template } } }); var hasMozTransform, getHasMozTransform = function () { if (hasMozTransform === undefined) { hasMozTransform = document.createElement('p').style.MozTransform !== undefined } return hasMozTransform }; $.magnificPopup.registerModule('zoom', { options: { enabled: false, easing: 'ease-in-out', duration: 300, opener: function (element) { return element.is('img') ? element : element.find('img') } }, proto: { initZoom: function () { var zoomSt = mfp.st.zoom, ns = '.zoom', image; if (!zoomSt.enabled || !mfp.supportsTransition) { return } var duration = zoomSt.duration, getElToAnimate = function (image) { var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'), transition = 'all ' + (zoomSt.duration / 1000) + 's ' + zoomSt.easing, cssObj = { position: 'fixed', zIndex: 9999, left: 0, top: 0, '-webkit-backface-visibility': 'hidden' }, t = 'transition'; cssObj['-webkit-' + t] = cssObj['-moz-' + t] = cssObj['-o-' + t] = cssObj[t] = transition; newImg.css(cssObj); return newImg }, showMainContent = function () { mfp.content.css('visibility', 'visible') }, openTimeout, animatedImg; _mfpOn('BuildControls' + ns, function () { if (mfp._allowZoom()) { clearTimeout(openTimeout); mfp.content.css('visibility', 'hidden'); image = mfp._getItemToZoom(); if (!image) { showMainContent(); return } animatedImg = getElToAnimate(image); animatedImg.css(mfp._getOffset()); mfp.wrap.append(animatedImg); openTimeout = setTimeout(function () { animatedImg.css(mfp._getOffset(true)); openTimeout = setTimeout(function () { showMainContent(); setTimeout(function () { animatedImg.remove(); image = animatedImg = null; _mfpTrigger('ZoomAnimationEnded') }, 16) }, duration) }, 16) } }); _mfpOn(BEFORE_CLOSE_EVENT + ns, function () { if (mfp._allowZoom()) { clearTimeout(openTimeout); mfp.st.removalDelay = duration; if (!image) { image = mfp._getItemToZoom(); if (!image) { return } animatedImg = getElToAnimate(image) } animatedImg.css(mfp._getOffset(true)); mfp.wrap.append(animatedImg); mfp.content.css('visibility', 'hidden'); setTimeout(function () { animatedImg.css(mfp._getOffset()) }, 16) } }); _mfpOn(CLOSE_EVENT + ns, function () { if (mfp._allowZoom()) { showMainContent(); if (animatedImg) { animatedImg.remove() } image = null } }) }, _allowZoom: function () { return mfp.currItem.type === 'image' }, _getItemToZoom: function () { if (mfp.currItem.hasSize) { return mfp.currItem.img } else { return false } }, _getOffset: function (isLarge) { var el; if (isLarge) { el = mfp.currItem.img } else { el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem) } var offset = el.offset(); var paddingTop = parseInt(el.css('padding-top'), 10); var paddingBottom = parseInt(el.css('padding-bottom'), 10); offset.top -= ($(window).scrollTop() - paddingTop); var obj = { width: el.width(), height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop }; if (getHasMozTransform()) { obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)' } else { obj.left = offset.left; obj.top = offset.top } return obj } } }); var IFRAME_NS = 'iframe', _emptyPage = '//about:blank', _fixIframeBugs = function (isShowing) { if (mfp.currTemplate[IFRAME_NS]) { var el = mfp.currTemplate[IFRAME_NS].find('iframe'); if (el.length) { if (!isShowing) { el[0].src = _emptyPage } if (mfp.isIE8) { el.css('display', isShowing ? 'block' : 'none') } } } }; $.magnificPopup.registerModule(IFRAME_NS, { options: { markup: '<div class="mfp-iframe-scaler">' + '<div class="mfp-close"></div>' + '<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>' + '</div>', srcAction: 'iframe_src', patterns: { youtube: { index: 'youtube.com', id: 'v=', src: '//www.youtube.com/embed/%id%?autoplay=1' }, vimeo: { index: 'vimeo.com/', id: '/', src: '//player.vimeo.com/video/%id%?autoplay=1' }, gmaps: { index: '//maps.google.', src: '%id%&output=embed' } } }, proto: { initIframe: function () { mfp.types.push(IFRAME_NS); _mfpOn('BeforeChange', function (e, prevType, newType) { if (prevType !== newType) { if (prevType === IFRAME_NS) { _fixIframeBugs() } else if (newType === IFRAME_NS) { _fixIframeBugs(true) } } }); _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function () { _fixIframeBugs() }) }, getIframe: function (item, template) { var embedSrc = item.src; var iframeSt = mfp.st.iframe; $.each(iframeSt.patterns, function () { if (embedSrc.indexOf(this.index) >
3157 -1) { if (this.id) { if (typeof this.id === 'string') { embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id) + this.id.length, embedSrc.length) } else { embedSrc = this.id.call(this, embedSrc) } } embedSrc = this.src.replace('%id%', embedSrc); return false } }); var dataObj = {}; if (iframeSt.srcAction) { dataObj[iframeSt.srcAction] = embedSrc } mfp._parseMarkup(template, dataObj, item); mfp.updateStatus('ready'); return template } } }); var _getLoopedId = function (index) { var numSlides = mfp.items.length; if (index > numSlides - 1) { return index - numSlides } else if (index < 0) { return numSlides + index } return index }, _replaceCurrTotal = function (text, curr, total) { return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total) }; $.magnificPopup.registerModule('gallery', { options: { enabled: false, arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', preload: [0, 2], navigateByImgClick: true, arrows: true, tPrev: 'Previous (Left arrow key)', tNext: 'Next (Right arrow key)', tCounter: '%curr% of %total%' }, proto: { initGallery: function () { var gSt = mfp.st.gallery, ns = '.mfp-gallery', supportsFastClick = Boolean($.fn.mfpFastClick); mfp.direction = true; if (!gSt || !gSt.enabled) return false; _wrapClasses += ' mfp-gallery'; _mfpOn(OPEN_EVENT + ns, function () { if (gSt.navigateByImgClick) { mfp.wrap.on('click' + ns, '.mfp-img', function () { if (mfp.items.length > 1) { mfp.next(); return false } }) } _document.on('keydown' + ns, function (e) { if (e.keyCode === 37) { mfp.prev() } else if (e.keyCode === 39) { mfp.next() } }) }); _mfpOn('UpdateStatus' + ns, function (e, data) { if (data.text) { data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length) } }); _mfpOn(MARKUP_PARSE_EVENT + ns, function (e, element, values, item) { var l = mfp.items.length; values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '' }); _mfpOn('BuildControls' + ns, function () { if (mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) { var markup = gSt.arrowMarkup, arrowLeft = mfp.arrowLeft = $(markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left')).addClass(PREVENT_CLOSE_CLASS), arrowRight = mfp.arrowRight = $(markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right')).addClass(PREVENT_CLOSE_CLASS); var eName = supportsFastClick ? 'mfpFastClick' : 'click'; arrowLeft[eName](function () { mfp.prev() }); arrowRight[eName](function () { mfp.next() }); if (mfp.isIE7) { _getEl('b', arrowLeft[0], false, true); _getEl('a', arrowLeft[0], false, true); _getEl('b', arrowRight[0], false, true); _getEl('a', arrowRight[0], false, true) } mfp.container.append(arrowLeft.add(arrowRight)) } }); _mfpOn(CHANGE_EVENT + ns, function () { if (mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout); mfp._preloadTimeout = setTimeout(function () { mfp.preloadNearbyImages(); mfp._preloadTimeout = null }, 16) }); _mfpOn(CLOSE_EVENT + ns, function () { _document.off(ns); mfp.wrap.off('click' + ns); if (mfp.arrowLeft && supportsFastClick) { mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick() } mfp.arrowRight = mfp.arrowLeft = null }) }, next: function () { mfp.direction = true; mfp.index = _getLoopedId(mfp.index + 1); mfp.updateItemHTML() }, prev: function () { mfp.direction = false; mfp.index = _getLoopedId(mfp.index - 1); mfp.updateItemHTML() }, goTo: function (newIndex) { mfp.direction = (newIndex >= mfp.index); mfp.index = newIndex; mfp.updateItemHTML() }, preloadNearbyImages: function () { var p = mfp.st.gallery.preload, preloadBefore = Math.min(p[0], mfp.items.length), preloadAfter = Math.min(p[1], mfp.items.length), i; for (i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore) ; i++) { mfp._preloadItem(mfp.index + i) } for (i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter) ; i++) { mfp._preloadItem(mfp.index - i) } }, _preloadItem: function (index) { index = _getLoopedId(index); if (mfp.items[index].preloaded) { return } var item = mfp.items[index]; if (!item.parsed) { item = mfp.parseEl(index) } _mfpTrigger('LazyLoad', item); if (item.type === 'image') { item.img = $('<img class="mfp-img" />').on('load.mfploader', function () { item.hasSize = true }).on('error.mfploader', function () { item.hasSize = true; item.loadError = true; _mfpTrigger('LazyLoadError', item) }).attr('src', item.src) } item.preloaded = true } } }); var RETINA_NS = 'retina'; $.magnificPopup.registerModule(RETINA_NS, { options: { replaceSrc: function (item) { return item.src.replace(/\.\w+$/, function (m) { return '@2x' + m }) }, ratio: 1 }, proto: { initRetina: function () { if (window.devicePixelRatio > 1) { var st = mfp.st.retina, ratio = st.ratio;
3157 ratio = !isNaN(ratio) ? ratio : ratio(); if (ratio > 1) { _mfpOn('ImageHasSize' + '.' + RETINA_NS, function (e, item) { item.img.css({ 'max-width': item.img[0].naturalWidth / ratio, 'width': '100%' }) }); _mfpOn('ElementParse' + '.' + RETINA_NS, function (e, item) { item.src = st.replaceSrc(item, ratio) }) } } } } }); (function () { var ghostClickDelay = 1000, supportsTouch = 'ontouchstart' in window, unbindTouchMove = function () { _window.off('touchmove' + ns + ' touchend' + ns) }, eName = 'mfpFastClick', ns = '.' + eName; $.fn.mfpFastClick = function (callback) { return $(this).each(function () { var elem = $(this), lock; if (supportsTouch) { var timeout, startX, startY, pointerMoved, point, numPointers; elem.on('touchstart' + ns, function (e) { pointerMoved = false; numPointers = 1; point = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0]; startX = point.clientX; startY = point.clientY; _window.on('touchmove' + ns, function (e) { point = e.originalEvent ? e.originalEvent.touches : e.touches; numPointers = point.length; point = point[0]; if (Math.abs(point.clientX - startX) > 10 || Math.abs(point.clientY - startY) > 10) { pointerMoved = true; unbindTouchMove() } }).on('touchend' + ns, function (e) { unbindTouchMove(); if (pointerMoved || numPointers > 1) { return } lock = true; e.preventDefault(); clearTimeout(timeout); timeout = setTimeout(function () { lock = false }, ghostClickDelay); callback() }) }) } elem.on('click' + ns, function () { if (!lock) { callback() } }) }) }; $.fn.destroyMfpFastClick = function () { $(this).off('touchstart' + ns + ' click' + ns); if (supportsTouch) _window.off('touchmove' + ns + ' touchend' + ns) } })(); _checkInstance() }));!function (n) { "function" == typeof define && define.amd ? define(["jquery"], function (e) { return n(e) }) : "object" == typeof module && "object" == typeof module.exports ? exports = n(require("jquery")) : n(jQuery) }(function (n) { function e(n) { var e = 7.5625, t = 2.75; return n < 1 / t ? e * n * n : n < 2 / t ? e * (n -= 1.5 / t) * n + .75 : n < 2.5 / t ? e * (n -= 2.25 / t) * n + .9375 : e * (n -= 2.625 / t) * n + .984375 } void 0 !== n.easing && (n.easing.jswing = n.easing.swing); var t = Math.pow, u = Math.sqrt, r = Math.sin, i = Math.cos, a = Math.PI, c = 1.70158, o = 1.525 * c, s = 2 * a / 3, f = 2 * a / 4.5; n.extend(n.easing, { def: "easeOutQuad", swing: function (e) { return n.easing[n.easing.def](e) }, easeInQuad: function (n) { return n * n }, easeOutQuad: function (n) { return 1 - (1 - n) * (1 - n) }, easeInOutQuad: function (n) { return n < .5 ? 2 * n * n : 1 - t(-2 * n + 2, 2) / 2 }, easeInCubic: function (n) { return n * n * n }, easeOutCubic: function (n) { return 1 - t(1 - n, 3) }, easeInOutCubic: function (n) { return n < .5 ? 4 * n * n * n : 1 - t(-2 * n + 2, 3) / 2 }, easeInQuart: function (n) { return n * n * n * n }, easeOutQuart: function (n) { return 1 - t(1 - n, 4) }, easeInOutQuart: function (n) { return n < .5 ? 8 * n * n * n * n : 1 - t(-2 * n + 2, 4) / 2 }, easeInQuint: function (n) { return n * n * n * n * n }, easeOutQuint: function (n) { return 1 - t(1 - n, 5) }, easeInOutQuint: function (n) { return n < .5 ? 16 * n * n * n * n * n : 1 - t(-2 * n + 2, 5) / 2 }, easeInSine: function (n) { return 1 - i(n * a / 2) }, easeOutSine: function (n) { return r(n * a / 2) }, easeInOutSine: function (n) { return -(i(a * n) - 1) / 2 }, easeInExpo: function (n) { return 0 === n ? 0 : t(2, 10 * n - 10) }, easeOutExpo: function (n) { return 1 === n ? 1 : 1 - t(2, -10 * n) }, easeInOutExpo: function (n) { return 0 === n ? 0 : 1 === n ? 1 : n < .5 ? t(2, 20 * n - 10) / 2 : (2 - t(2, -20 * n + 10)) / 2 }, easeInCirc: function (n) { return 1 - u(1 - t(n, 2)) }, easeOutCirc: function (n) { return u(1 - t(n - 1, 2)) }, easeInOutCirc: function (n) { return n < .5 ? (1 - u(1 - t(2 * n, 2))) / 2 : (u(1 - t(-2 * n + 2, 2)) + 1) / 2 }, easeInElastic: function (n) { return 0 === n ? 0 : 1 === n ? 1 : -t(2, 10 * n - 10) * r((10 * n - 10.75) * s) }, easeOutElastic: function (n) { return 0 === n ? 0 : 1 === n ? 1 : t(2, -10 * n) * r((10 * n - .75) * s) + 1 }, easeInOutElastic: function (n) { return 0 === n ? 0 : 1 === n ? 1 : n < .5 ? -(t(2, 20 * n - 10) * r((20 * n - 11.125) * f)) / 2 : t(2, -20 *
3157n + 10) * r((20 * n - 11.125) * f) / 2 + 1 }, easeInBack: function (n) { return (c + 1) * n * n * n - c * n * n }, easeOutBack: function (n) { return 1 + (c + 1) * t(n - 1, 3) + c * t(n - 1, 2) }, easeInOutBack: function (n) { return n < .5 ? t(2 * n, 2) * (7.189819 * n - o) / 2 : (t(2 * n - 2, 2) * ((o + 1) * (2 * n - 2) + o) + 2) / 2 }, easeInBounce: function (n) { return 1 - e(1 - n) }, easeOutBounce: e, easeInOutBounce: function (n) { return n < .5 ? (1 - e(1 - 2 * n)) / 2 : (1 + e(2 * n - 1)) / 2 } }) });(function ($) { $.fn.appear = function (fn, options) { var settings = $.extend({ data: undefined, one: true, accX: 0, accY: 0 }, options); return this.each(function () { var t = $(this); t.appeared = false; if (!fn) { t.trigger('appear', settings.data); return } var w = $(window); var check = function () { if (!t.is(':visible')) { t.appeared = false; return } var a = w.scrollLeft(); var b = w.scrollTop(); var o = t.offset(); var x = o.left; var y = o.top; var ax = settings.accX; var ay = settings.accY; var th = t.height(); var wh = w.height(); var tw = t.width(); var ww = w.width(); if (y + th + ay >= b && y <= b + wh + ay && x + tw + ax >= a && x <= a + ww + ax) { if (!t.appeared) t.trigger('appear', settings.data) } else { t.appeared = false } }; var modifiedFn = function () { t.appeared = true; if (settings.one) { w.unbind('scroll', check); var i = $.inArray(check, $.fn.appear.checks); if (i >= 0) $.fn.appear.checks.splice(i, 1) } fn.apply(this, arguments) }; if (settings.one) t.one('appear', settings.data, modifiedFn); else t.bind('appear', settings.data, modifiedFn); w.scroll(check); $.fn.appear.checks.push(check); (check)() }) }; $.extend($.fn.appear, { checks: [], timeout: null, checkAll: function () { var length = $.fn.appear.checks.length; if (length > 0) while (length--) ($.fn.appear.checks[length])() }, run: function () { if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout); $.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20) } }); $.each(['append', 'prepend', 'after', 'before', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'remove', 'css', 'show', 'hide'], function (i, n) { var old = $.fn[n]; if (old) { $.fn[n] = function () { var r = old.apply(this, arguments); $.fn.appear.run(); return r } } }) })(jQuery);(function ($) { $.fn.gMap = function (options, methods_options) { switch (options) { case 'addMarker': return $(this).trigger('gMap.addMarker', [methods_options.latitude, methods_options.longitude, methods_options.content, methods_options.icon, methods_options.popup]); case 'centerAt': return $(this).trigger('gMap.centerAt', [methods_options.latitude, methods_options.longitude, methods_options.zoom]); case 'clearMarkers': return $(this).trigger('gMap.clearMarkers') } var opts = $.extend({}, $.fn.gMap.defaults, options); return this.each(function () { var $gmap = new google.maps.Map(this); $(this).data('gMap.reference', $gmap); var $geocoder = new google.maps.Geocoder(); if (opts.address) { $geocoder.geocode({ address: opts.address }, function (gresult, status) { if (gresult && gresult.length) { $gmap.setCenter(gresult[0].geometry.location) } }) } else { if (opts.latitude && opts.longitude) { $gmap.setCenter(new google.maps.LatLng(opts.latitude, opts.longitude)) } else { if ($.isArray(opts.markers) && opts.markers.length > 0) { if (opts.markers[0].address) { $geocoder.geocode({ address: opts.markers[0].address }, function (gresult, status) { if (gresult && gresult.length > 0) { $gmap.setCenter(gresult[0].geometry.location) } }) } else { $gmap.setCenter(new google.maps.LatLng(opts.markers[0].latitude, opts.markers[0].longitude)) } } else { $gmap.setCenter(new google.maps.LatLng(34.885931, 9.84375)) } } } $gmap.setZoom(opts.zoom); $gmap.setMapTypeId(google.maps.MapTypeId[opts.maptype]); var map_options = { scrollwheel: opts.scrollwheel, disableDoubleClickZoom: !opts.doubleclickzoom }; if (opts.controls === false) { $.extend(map_options, { disableDefaultUI: true }) } else if (opts.controls.length !== 0) { $.extend(map_options, opts.controls, { disableDefaultUI: true }) } $gmap.setOptions(map_options); var gicon = new google.maps.Marker(); var marker_icon; var marker_shadow; marker_icon = new google.maps.MarkerImage(opts.icon.image); marker_icon.size = new google.maps.Size(opts.icon.iconsize[0], opts.icon.iconsize[1]);
3157 marker_icon.anchor = new google.maps.Point(opts.icon.iconanchor[0], opts.icon.iconanchor[1]); gicon.setIcon(marker_icon); if (opts.icon.shadow) { marker_shadow = new google.maps.MarkerImage(opts.icon.shadow); marker_shadow.size = new google.maps.Size(opts.icon.shadowsize[0], opts.icon.shadowsize[1]); marker_shadow.anchor = new google.maps.Point(opts.icon.shadowanchor[0], opts.icon.shadowanchor[1]); gicon.setShadow(marker_shadow) } $(this).bind('gMap.centerAt', function (e, latitude, longitude, zoom) { if (zoom) { $gmap.setZoom(zoom) } $gmap.panTo(new google.maps.LatLng(parseFloat(latitude), parseFloat(longitude))) }); var overlays = []; $(this).bind('gMap.clearMarkers', function () { while (overlays[0]) { overlays.pop().setMap(null) } }); var last_infowindow; $(this).bind('gMap.addMarker', function (e, latitude, longitude, content, icon, popup) { var marker_icon; var marker_shadow; var glatlng = new google.maps.LatLng(parseFloat(latitude), parseFloat(longitude)); var gmarker = new google.maps.Marker({ position: glatlng }); if (icon) { marker_icon = new google.maps.MarkerImage(icon.image); marker_icon.size = new google.maps.Size(icon.iconsize[0], icon.iconsize[1]);
3157 marker_icon.anchor = new google.maps.Point(icon.iconanchor[0], icon.iconanchor[1]); gmarker.setIcon(marker_icon); if (icon.shadow) { marker_shadow = new google.maps.MarkerImage(icon.shadow); marker_shadow.size = new google.maps.Size(icon.shadowsize[0], icon.shadowsize[1]); marker_shadow.anchor = new google.maps.Point(icon.shadowanchor[0], icon.shadowanchor[1]); gicon.setShadow(marker_shadow) } } else { gmarker.setIcon(gicon.getIcon()); gmarker.setShadow(gicon.getShadow()) } if (content) { if (content === '_latlng') { content = latitude + ', ' + longitude } var infowindow = new google.maps.InfoWindow({ content: opts.html_prepend + content + opts.html_append }); google.maps.event.addListener(gmarker, 'click', function () { if (last_infowindow) { last_infowindow.close() } infowindow.open($gmap, gmarker); last_infowindow = infowindow }); if (popup) { google.maps.event.addListenerOnce($gmap, 'tilesloaded', function () { infowindow.open($gmap, gmarker) }) } } gmarker.setMap($gmap); overlays.push(gmarker) }); var marker; var self = this; var geocode_callback = function (marker) { return function (gresult, status) { if (gresult && gresult.length > 0) { $(self).trigger('gMap.addMarker', [gresult[0].geometry.location.lat(), gresult[0].geometry.location.lng(), marker.html, marker.icon, marker.popup]) } } }; for (var j = 0; j < opts.markers.length; j++) { marker = opts.markers[j]; if (marker.address) { if (marker.html === '_address') { marker.html = marker.address } $geocoder.geocode({ address: marker.address }, geocode_callback(marker)) } else { $(this).trigger('gMap.addMarker', [marker.latitude, marker.longitude, marker.html, marker.icon, marker.popup]) } } }) }; $.fn.gMap.defaults = { address: '', latitude: 0, longitude: 0, zoom: 1, markers: [], controls: [], scrollwheel: false, doubleclickzoom: true, maptype: 'ROADMAP', html_prepend: '<div class="gmap_marker">', html_append: '</div>', icon: { image: "https://www.google.com/mapfiles/marker.png", shadow: "https://www.google.com/mapfiles/shadow50.png", iconsize: [20, 34], shadowsize: [37, 34], iconanchor: [9, 34], shadowanchor: [6, 34] } } })(jQuery);!function (t) { t.extend({ browserSelector: function () { var e; e = navigator.userAgent || navigator.vendor || window.opera, (jQuery.browser = jQuery.browser || {}).mobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0, 4)); var o = navigator.userAgent.toLowerCase(), i = function (t) { return o.indexOf(t) > -1 }, a = "gecko", n = "webkit", r = "safari", s = "opera", l = document.documentElement, p = [!/
3157opera|webtv/i.test(o) && /msie\s(\d)/.test(o) ? "ie ie" + parseFloat(navigator.appVersion.split("MSIE")[1]) : i("firefox/2") ? a + " ff2" : i("firefox/3.5") ? a + " ff3 ff3_5" : i("firefox/3") ? a + " ff3" : i("gecko/") ? a : i("opera") ? s + (/version\/(\d+)/.test(o) ? " " + s + RegExp.jQuery1 : /opera(\s|\/)(\d+)/.test(o) ? " " + s + RegExp.jQuery2 : "") : i("konqueror") ? "konqueror" : i("chrome") ? n + " chrome" : i("iron") ? n + " iron" : i("applewebkit/") ? n + " " + r + (/version\/(\d+)/.test(o) ? " " + r + RegExp.jQuery1 : "") : i("mozilla/") ? a : "", i("j2me") ? "mobile" : i("iphone") ? "iphone" : i("ipod") ? "ipod" : i("mac") ? "mac" : i("darwin") ? "mac" : i("webtv") ? "webtv" : i("win") ? "win" : i("freebsd") ? "freebsd" : i("x11") || i("linux") ? "linux" : "", "js"]; c = p.join(" "), t.browser.mobile && (c += " mobile"), l.className += " " + c, !window.ActiveXObject && "ActiveXObject" in window ? t("html").removeClass("gecko").addClass("ie ie11") : (t("body").hasClass("dark") && t("html").addClass("dark"), t("body").hasClass("boxed") && t("html").addClass("boxed")) } }), t.browserSelector() }(jQuery), function (t) { "function" == typeof define && define.amd ? define(["jquery"], t) : "object" == typeof exports ? module.exports = t(require("jquery")) : t(jQuery) }(function (t) { t.waitForImages = { hasImageProperties: ["backgroundImage", "listStyleImage", "borderImage", "borderCornerImage", "cursor"], hasImageAttributes: ["srcset"] }, t.expr[":"].uncached = function (e) { return !!t(e).is('img[src][src!=""]') && !e.complete }, t.fn.waitForImages = function () { var e, o, i, a = 0, n = 0, r = t.Deferred(); if (t.isPlainObject(arguments[0]) ? (i = arguments[0].waitForAll, o = arguments[0].each, e = arguments[0].finished) : 1 === arguments.length && "boolean" === t.type(arguments[0]) ? i = arguments[0] : (e = arguments[0], o = arguments[1], i = arguments[2]), e = e || t.noop, o = o || t.noop, i = !!i, !t.isFunction(e) || !t.isFunction(o)) throw new TypeError("An invalid callback was supplied."); return this.each(function () { var s = t(this), c = [], l = t.waitForImages.hasImageProperties || [], p = t.waitForImages.hasImageAttributes || [], d = /url\(\s*(['"]?)(.*?)\1\s*\)/g; i ? s.find("*").addBack().each(function () { var e = t(this); e.is("img:uncached") && c.push({ src: e.attr("src"), element: e[0] }), t.each(l, function (t, o) { var i, a = e.css(o); if (!a) return !0; for (; i = d.exec(a) ;) c.push({ src: i[2], element: e[0] }) }), t.each(p, function (o, i) { var a, n = e.attr(i); if (!n) return !0; a = n.split(","), t.each(a, function (o, i) { i = t.trim(i).split(" ")[0], c.push({ src: i, element: e[0] }) }) }) }) : s.find("img:uncached").each(function () { c.push({ src: this.src, element: this }) }), a = c.length, n = 0, 0 === a && (e.call(s[0]), r.resolveWith(s[0])), t.each(c, function (i, c) { var l = new Image, p = "load.waitForImages error.waitForImages"; t(l).one(p, function i(l) { var d = [n, a, "load" == l.type]; if (n++, o.apply(c.element, d), r.notifyWith(c.element, d), t(this).off(p, i), n == a) return e.call(s[0]), r.resolveWith(s[0]), !1 }), l.src = c.src }) }), r.promise() } }), function (t) { t.fn.countTo = function (e) { return e = e || {}, t(this).each(function () { var o = t.extend({}, t.fn.countTo.defaults, { from: t(this).data("from"), to: t(this).data("to"), speed: t(this).data("speed"), refreshInterval: t(this).data("refresh-interval"), decimals: t(this).data("decimals") }, e), i = Math.ceil(o.speed / o.refreshInterval), a = (o.to - o.from) / i, n = this, r = t(this), s = 0, c = o.from, l = r.data("countTo") || {}; function p(t) { var e = o.formatter.call(n, t, o); r.html(e) } r.data("countTo", l), l.interval && clearInterval(l.interval), l.interval = setInterval(function () { s++, p(c += a), "function" == typeof o.onUpdate && o.onUpdate.call(n, c); s >= i && (r.removeData("countTo"), clearInterval(l.interval), c = o.to, "function" == typeof o.onComplete && o.onComplete.call(n, c)) }, o.refreshInterval), p(c) }) }, t.fn.countTo.defaults = { from: 0, to: 0, speed: 1e3, refreshInterval: 100, decimals: 0, formatter: function (t, e) { return t.toFixed(e.decimals) }, onUpdate: null, onComplete: null } }(jQuery), function (t) { "use strict"; var e, o = { action: function () { }, runOnLoad: !1, duration: 500 }, i = !1, a = { init: function () { for (var e = 0; e <= arguments.length; e++) { var i = arguments[e]; switch (typeof i) { case "function": o.action = i; break; case "boolean": o.runOnLoad = i; break; case "number": o.duration = i } } return this.each(function () { o.runOnLoad && o.action(), t(this).resize(function () { a.timedAction.call(this) }) }) }, timedAction: function (t, a) { var n = function () { var t = o.duration; if (i) { var a = new Date - e; if ((t = o.duration - a) <= 0) return clearTimeout(i), i = !1, void o.action() } r(t) }, r = function (t) { i = setTimeout(n, t) }; e = new Date, "number" == typeof a && (o.duration = a), "function" == typeof t && (o.action = t), i || n() } }; t.fn.afterResize = function (t) { return a[t] ? a[t].apply(this, Array.prototype.slice.call(arguments, 1)) : a.init.apply(this, arguments) } }(jQuery), function (t) { var e = -1, o = -1, i = function (t) { return parseFloat(t) || 0 }, a = function (e) { var o = { byRow: !0, remove: !1, property: "height" }; return "object" == typeof e ? t.extend(o, e) : ("boolean" == typeof e ? o.byRow = e : "remove" === e && (o.remove = !0), o) }, n = t.fn.matchHeight = function (e) { var o = a(e); if (o.remove) { var i = this; return this.css(o.property, ""), t.each(n._groups, function (t, e) { e.elements = e.elements.not(i) }), this }
3157 return this.length <= 1 ? this : (n._groups.push({ elements: this, options: o }), n._apply(this, o), this) }; n._groups = [], n._throttle = 80, n._maintainScroll = !1, n._beforeUpdate = null, n._afterUpdate = null, n._apply = function (e, o) { var r = a(o), s = t(e), c = [s], l = t(window).scrollTop(), p = t("html").outerHeight(!0), d = s.parents().filter(":hidden"); return d.each(function () { var e = t(this); e.data("style-cache", e.attr("style")) }), d.css("display", "block"), r.byRow && (s.each(function () { var e = t(this), o = "inline-block" === e.css("display") ? "inline-block" : "block"; e.data("style-cache", e.attr("style")), e.css({ display: o, "padding-top": "0", "padding-bottom": "0", "margin-top": "0", "margin-bottom": "0", "border-top-width": "0", "border-bottom-width": "0", height: "100px" }) }), c = function (e) { var o = t(e), a = null, n = []; return o.each(function () { var e = t(this), o = e.offset().top - i(e.css("margin-top")), r = n.length > 0 ? n[n.length - 1] : null; null === r ? n.push(e) : Math.floor(Math.abs(a - o)) <= 1 ? n[n.length - 1] = r.add(e) : n.push(e), a = o }), n }(s), s.each(function () { var e = t(this); e.attr("style", e.data("style-cache") || "") })), t.each(c, function (e, o) { var a = t(o), n = 0; r.byRow && a.length <= 1 ? a.css(r.property, "") : (a.each(function () { var e = t(this), o = { display: "inline-block" === e.css("display") ? "inline-block" : "block" }; o[r.property] = "", e.css(o), e.outerHeight(!1) > n && (n = e.outerHeight(!1)), e.css("display", "") }), a.each(function () { var e = t(this), o = 0; "border-box" !== e.css("box-sizing") && (o += i(e.css("border-top-width")) + i(e.css("border-bottom-width")), o += i(e.css("padding-top")) + i(e.css("padding-bottom"))), e.css(r.property, n - o) })) }), d.each(function () { var e = t(this); e.attr("style", e.data("style-cache") || null) }), n._maintainScroll && t(window).scrollTop(l / p * t("html").outerHeight(!0)), this }, n._applyDataApi = function () { var e = {}; t("[data-match-height], [data-mh]").each(function () { var o = t(this), i = o.attr("data-match-height") || o.attr("data-mh"); e[i] = i in e ? e[i].add(o) : o }), t.each(e, function () { this.matchHeight(!0) }) }; var r = function (e) { n._beforeUpdate && n._beforeUpdate(e, n._groups), t.each(n._groups, function () { n._apply(this.elements, this.options) }), n._afterUpdate && n._afterUpdate(e, n._groups) }; n._update = function (i, a) { if (a && "resize" === a.type) { var s = t(window).width(); if (s === e) return; e = s } i ? -1 === o && (o = setTimeout(function () { r(a), o = -1 }, n._throttle)) : r(a) }, t(n._applyDataApi), t(window).bind("load", function (t) { n._update(!1, t) }), t(window).bind("resize orientationchange", function (t) { n._update(!0, t) }) }(jQuery), function (t) { "use strict"; t.fn.pin = function (e) { var o = 0, i = [], a = !1, n = t(window); e = e || {}; var r = function () { for (var o = 0, r = i.length; o < r; o++) { var s = i[o]; if (e.minWidth && n.width() <= e.minWidth) s.parent().is(".pin-wrapper") && s.unwrap(), s.css({ width: "", left: "", top: "", position: "" }), e.activeClass && s.removeClass(e.activeClass), a = !0; else { a = !1; var c = e.containerSelector ? s.closest(e.containerSelector) : t(document.body), l = s.offset(), p = c.offset(), d = s.parent().offset(); s.parent().is(".pin-wrapper") || s.wrap("<div class='pin-wrapper'>"); var u = t.extend({ top: 0, bottom: 0 }, e.padding || {}); s.data("pin", { pad: u, from: (e.containerSelector ? p.top : l.top) - u.top, to: p.top + c.height() - s.outerHeight() - u.bottom, end: p.top + c.height(), parentTop: d.top }), s.css({ width: s.outerWidth() }), s.parent().css("height", s.outerHeight()) } } }, s = function () { if (!a) { o = n.scrollTop(); for (var r = [], s = 0, c = i.length; s < c; s++) { var l = t(i[s]), p = l.data("pin"); if (p) { r.push(l); var d = p.from - p.pad.bottom, u = p.to - p.pad.top; d + l.outerHeight() > p.end ? l.css("position", "") : d < o && u > o ? ("fixed" != l.css("position") && l.css({ left: l.offset().left, top: p.pad.top }).css("position", "fixed"), e.activeClass && l.addClass(e.activeClass)) : o >= u ? (l.css({ left: "", top: u - p.parentTop + p.pad.top }).css("position", "absolute"), e.activeClass && l.addClass(e.activeClass)) : (l.css({ position: "", top: "", left: "" }), e.activeClass && l.removeClass(e.activeClass)) } }
3157 i = r } }, c = function () { r(), s() }; return this.each(function () { var e = t(this), o = t(this).data("pin") || {}; o && o.update || (i.push(e), t("img", this).one("load", r), o.update = c, t(this).data("pin", o)) }), n.scroll(s), n.resize(function () { r() }), r(), n.load(c), t(window).on("stickyMenu.active stickyMenu.deactive", function () { c() }), this } }(jQuery);/*! 3158 * Stellar.js v0.6.2 3159 * http://markdalgleish.com/projects/stellar.js 3160 * 3161 * Copyright 2013, Mark Dalgleish 3162 * This content is released under the MIT license 3163 * http://markdalgleish.mit-license.org 3164 */ 3165!function (a, b, c, d) { function e(b, c) { this.element = b, this.options = a.extend({}, g, c), this._defaults = g, this._name = f, this.init() } var f = "stellar", g = { scrollProperty: "scroll", positionProperty: "position", horizontalScrolling: !0, verticalScrolling: !0, horizontalOffset: 0, verticalOffset: 0, responsive: !1, parallaxBackgrounds: !0, parallaxElements: !0, hideDistantElements: !0, hideElement: function (a) { a.hide() }, showElement: function (a) { a.show() } }, h = { scroll: { getLeft: function (a) { return a.scrollLeft() }, setLeft: function (a, b) { a.scrollLeft(b) }, getTop: function (a) { return a.scrollTop() }, setTop: function (a, b) { a.scrollTop(b) } }, position: { getLeft: function (a) { return -1 * parseInt(a.css("left"), 10) }, getTop: function (a) { return -1 * parseInt(a.css("top"), 10) } }, margin: { getLeft: function (a) { return -1 * parseInt(a.css("margin-left"), 10) }, getTop: function (a) { return -1 * parseInt(a.css("margin-top"), 10) } }, transform: { getLeft: function (a) { var b = getComputedStyle(a[0])[k]; return "none" !== b ? -1 * parseInt(b.match(/(-?[0-9]+)/g)[4], 10) : 0 }, getTop: function (a) { var b = getComputedStyle(a[0])[k]; return "none" !== b ? -1 * parseInt(b.match(/(-?[0-9]+)/g)[5], 10) : 0 } } }, i = { position: { setLeft: function (a, b) { a.css("left", b) }, setTop: function (a, b) { a.css("top", b) } }, transform: { setPosition: function (a, b, c, d, e) { a[0].style[k] = "translate3d(" + (b - c) + "px, " + (d - e) + "px, 0)" } } }, j = function () { var b, c = /^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/, d = a("script")[0].style, e = ""; for (b in d) if (c.test(b)) { e = b.match(c)[0]; break } return "WebkitOpacity" in d && (e = "Webkit"), "KhtmlOpacity" in d && (e = "Khtml"), function (a) { return e + (e.length > 0 ? a.charAt(0).toUpperCase() + a.slice(1) : a) } }(), k = j("transform"), l = a("<div />", { style: "background:#fff" }).css("background-position-x") !== d, m = l ? function (a, b, c) { a.css({ "background-position-x": b, "background-position-y": c }) } : function (a, b, c) { a.css("background-position", b + " " + c) }, n = l ? function (a) { return [a.css("background-position-x"), a.css("background-position-y")] } : function (a) { return a.css("background-position").split(" ") }, o = b.requestAnimationFrame || b.webkitRequestAnimationFrame || b.mozRequestAnimationFrame || b.oRequestAnimationFrame || b.msRequestAnimationFrame || function (a) { setTimeout(a, 1e3 / 60) }; e.prototype = { init: function () { this.options.name = f + "_" + Math.floor(1e9 * Math.random()), this._defineElements(), this._defineGetters(), this._defineSetters(), this._handleWindowLoadAndResize(), this._detectViewport(), this.refresh({ firstLoad: !0 }), "scroll" === this.options.scrollProperty ? this._handleScrollEvent() : this._startAnimationLoop() }, _defineElements: function () { this.element === c.body && (this.element = b), this.$scrollElement = a(this.element), this.$element = this.element === b ? a("body") : this.$scrollElement, this.$viewportElement = this.options.viewportElement !== d ? a(this.options.viewportElement) : this.$scrollElement[0] === b || "scroll" === this.options.scrollProperty ? this.$scrollElement : this.$scrollElement.parent() }, _defineGetters: function () { var a = this, b = h[a.options.scrollProperty]; this._getScrollLeft = function () { return b.getLeft(a.$scrollElement) }, this._getScrollTop = function () { return b.getTop(a.$scrollElement) } }, _defineSetters: function () { var b = this, c = h[b.options.scrollProperty], d = i[b.options.positionProperty], e = c.setLeft, f = c.setTop; this._setScrollLeft = "function" == typeof e ? function (a) { e(b.$scrollElement, a) } : a.noop, this._setScrollTop = "function" == typeof f ? function (a) { f(b.$scrollElement, a) } : a.noop, this._setPosition = d.setPosition || function (a, c, e, f, g) { b.options.horizontalScrolling && d.setLeft(a, c, e), b.options.verticalScrolling && d.setTop(a, f, g) } }
3165, _handleWindowLoadAndResize: function () { var c = this, d = a(b); c.options.responsive && d.bind("load." + this.name, function () { c.refresh() }), d.bind("resize." + this.name, function () { c._detectViewport(), c.options.responsive && c.refresh() }) }, refresh: function (c) { var d = this, e = d._getScrollLeft(), f = d._getScrollTop(); c && c.firstLoad || this._reset(), this._setScrollLeft(0), this._setScrollTop(0), this._setOffsets(), this._findParticles(), this._findBackgrounds(), c && c.firstLoad && /WebKit/.test(navigator.userAgent) && a(b).load(function () { var a = d._getScrollLeft(), b = d._getScrollTop(); d._setScrollLeft(a + 1), d._setScrollTop(b + 1), d._setScrollLeft(a), d._setScrollTop(b) }), this._setScrollLeft(e), this._setScrollTop(f) }, _detectViewport: function () { var a = this.$viewportElement.offset(), b = null !== a && a !== d; this.viewportWidth = this.$viewportElement.width(), this.viewportHeight = this.$viewportElement.height(), this.viewportOffsetTop = b ? a.top : 0, this.viewportOffsetLeft = b ? a.left : 0 }, _findParticles: function () { var b = this; this._getScrollLeft(), this._getScrollTop(); if (this.particles !== d) for (var c = this.particles.length - 1; c >= 0; c--) this.particles[c].$element.data("stellar-elementIsActive", d); this.particles = [], this.options.parallaxElements && this.$element.find("[data-stellar-ratio]").each(function (c) { var e, f, g, h, i, j, k, l, m, n = a(this), o = 0, p = 0, q = 0, r = 0; if (n.data("stellar-elementIsActive")) { if (n.data("stellar-elementIsActive") !== this) return } else n.data("stellar-elementIsActive", this); b.options.showElement(n), n.data("stellar-startingLeft") ? (n.css("left", n.data("stellar-startingLeft")), n.css("top", n.data("stellar-startingTop"))) : (n.data("stellar-startingLeft", n.css("left")), n.data("stellar-startingTop", n.css("top"))), g = n.position().left, h = n.position().top, i = "auto" === n.css("margin-left") ? 0 : parseInt(n.css("margin-left"), 10), j = "auto" === n.css("margin-top") ? 0 : parseInt(n.css("margin-top"), 10), l = n.offset().left - i, m = n.offset().top - j, n.parents().each(function () { var b = a(this); return b.data("stellar-offset-parent") === !0 ? (o = q, p = r, k = b, !1) : (q += b.position().left, void (r += b.position().top)) }), e = n.data("stellar-horizontal-offset") !== d ? n.data("stellar-horizontal-offset") : k !== d && k.data("stellar-horizontal-offset") !== d ? k.data("stellar-horizontal-offset") : b.horizontalOffset, f = n.data("stellar-vertical-offset") !== d ? n.data("stellar-vertical-offset") : k !== d && k.data("stellar-vertical-offset") !== d ? k.data("stellar-vertical-offset") : b.verticalOffset, b.particles.push({ $element: n, $offsetParent: k, isFixed: "fixed" === n.css("position"), horizontalOffset: e, verticalOffset: f, startingPositionLeft: g, startingPositionTop: h, startingOffsetLeft: l, startingOffsetTop: m, parentOffsetLeft: o, parentOffsetTop: p, stellarRatio: n.data("stellar-ratio") !== d ? n.data("stellar-ratio") : 1, width: n.outerWidth(!0), height: n.outerHeight(!0), isHidden: !1 }) }) }, _findBackgrounds: function () { var b, c = this, e = this._getScrollLeft(), f = this._getScrollTop(); this.backgrounds = [], this.options.parallaxBackgrounds && (b = this.$element.find("[data-stellar-background-ratio]"), this.$element.data("stellar-background-ratio") && (b = b.add(this.$element)), b.each(function () { var b, g, h, i, j, k, l, o = a(this), p = n(o), q = 0, r = 0, s = 0, t = 0; if (o.data("stellar-backgroundIsActive")) { if (o.data("stellar-backgroundIsActive") !== this) return } else o.data("stellar-backgroundIsActive", this); o.data("stellar-backgroundStartingLeft") ? m(o, o.data("stellar-backgroundStartingLeft"), o.data("stellar-backgroundStartingTop")) : (o.data("stellar-backgroundStartingLeft", p[0]), o.data("stellar-backgroundStartingTop", p[1])), h = "auto" === o.css("margin-left") ? 0 : parseInt(o.css("margin-left"), 10), i = "auto" === o.css("margin-top") ? 0 : parseInt(o.css("margin-top"), 10), j = o.offset().left - h - e, k = o.offset().top - i - f, o.parents().each(function () { var b = a(this); return b.data("stellar-offset-parent") === !0 ? (q = s, r = t, l = b, !1) : (s += b.position().left, void (t += b.position().top)) }), b = o.data("stellar-horizontal-offset") !== d ? o.data("stellar-horizontal-offset") : l !== d && l.data("stellar-horizontal-offset") !== d ? l.data("stellar-horizontal-offset") : c.horizontalOffset, g = o.data("stellar-vertical-offset") !== d ? o.data("stellar-vertical-offset") : l !== d && l.data("stellar-vertical-offset") !== d ? l.data("stellar-vertical-offset") : c.verticalOffset, c.backgrounds.push({ $element: o, $offsetParent: l, isFixed: "fixed" === o.css("background-attachment"), horizontalOffset: b, verticalOffset: g, startingValueLeft: p[0], startingValueTop: p[1], startingBackgroun
3165dPositionLeft: isNaN(parseInt(p[0], 10)) ? 0 : parseInt(p[0], 10), startingBackgroundPositionTop: isNaN(parseInt(p[1], 10)) ? 0 : parseInt(p[1], 10), startingPositionLeft: o.position().left, startingPositionTop: o.position().top, startingOffsetLeft: j, startingOffsetTop: k, parentOffsetLeft: q, parentOffsetTop: r, stellarRatio: o.data("stellar-background-ratio") === d ? 1 : o.data("stellar-background-ratio") }) })) }, _reset: function () { var a, b, c, d, e; for (e = this.particles.length - 1; e >= 0; e--) a = this.particles[e], b = a.$element.data("stellar-startingLeft"), c = a.$element.data("stellar-startingTop"), this._setPosition(a.$element, b, b, c, c), this.options.showElement(a.$element), a.$element.data("stellar-startingLeft", null).data("stellar-elementIsActive", null).data("stellar-backgroundIsActive", null); for (e = this.backgrounds.length - 1; e >= 0; e--) d = this.backgrounds[e], d.$element.data("stellar-backgroundStartingLeft", null).data("stellar-backgroundStartingTop", null), m(d.$element, d.startingValueLeft, d.startingValueTop) }, destroy: function () { this._reset(), this.$scrollElement.unbind("resize." + this.name).unbind("scroll." + this.name), this._animationLoop = a.noop, a(b).unbind("load." + this.name).unbind("resize." + this.name) }, _setOffsets: function () { var c = this, d = a(b); d.unbind("resize.horizontal-" + this.name).unbind("resize.vertical-" + this.name), "function" == typeof this.options.horizontalOffset ? (this.horizontalOffset = this.options.horizontalOffset(), d.bind("resize.horizontal-" + this.name, function () { c.horizontalOffset = c.options.horizontalOffset() })) : this.horizontalOffset = this.options.horizontalOffset, "function" == typeof this.options.verticalOffset ? (this.verticalOffset = this.options.verticalOffset(), d.bind("resize.vertical-" + this.name, function () { c.verticalOffset = c.options.verticalOffset() })) : this.verticalOffset = this.options.verticalOffset }, _repositionElements: function () { var a, b, c, d, e, f, g, h, i, j, k = this._getScrollLeft(), l = this._getScrollTop(), n = !0, o = !0; if (this.currentScrollLeft !== k || this.currentScrollTop !== l || this.currentWidth !== this.viewportWidth || this.currentHeight !== this.viewportHeight) { for (this.currentScrollLeft = k, this.currentScrollTop = l, this.currentWidth = this.viewportWidth, this.currentHeight = this.viewportHeight, j = this.particles.length - 1; j >= 0; j--) a = this.particles[j], b = a.isFixed ? 1 : 0, this.options.horizontalScrolling ? (f = (k + a.horizontalOffset + this.viewportOffsetLeft + a.startingPositionLeft - a.startingOffsetLeft + a.parentOffsetLeft) * -(a.stellarRatio + b - 1) + a.startingPositionLeft, h = f - a.startingPositionLeft + a.startingOffsetLeft) : (f = a.startingPositionLeft, h = a.startingOffsetLeft), this.options.verticalScrolling ? (g = (l + a.verticalOffset + this.viewportOffsetTop + a.startingPositionTop - a.startingOffsetTop + a.parentOffsetTop) * -(a.stellarRatio + b - 1) + a.startingPositionTop, i = g - a.startingPositionTop + a.startingOffsetTop) : (g = a.startingPositionTop, i = a.startingOffsetTop), this.options.hideDistantElements && (o = !this.options.horizontalScrolling || h + a.width > (a.isFixed ? 0 : k) && h < (a.isFixed ? 0 : k) + this.viewportWidth + this.viewportOffsetLeft, n = !this.options.verticalScrolling || i + a.height > (a.isFixed ? 0 : l) && i < (a.isFixed ? 0 : l) + this.viewportHeight + this.viewportOffsetTop), o && n ? (a.isHidden && (this.options.showElement(a.$element), a.isHidden = !1), this._setPosition(a.$element, f, a.startingPositionLeft, g, a.startingPositionTop)) : a.isHidden || (this.options.hideElement(a.$element), a.isHidden = !0); for (j = this.backgrounds.length - 1; j >= 0; j--) c = this.backgrounds[j], b = c.isFixed ? 0 : 1, d = this.options.horizontalScrolling ? (k + c.horizontalOffset - this.viewportOffsetLeft - c.startingOffsetLeft + c.parentOffsetLeft - c.startingBackgroun
3165dPositionLeft) * (b - c.stellarRatio) + "px" : c.startingValueLeft, e = this.options.verticalScrolling ? (l + c.verticalOffset - this.viewportOffsetTop - c.startingOffsetTop + c.parentOffsetTop - c.startingBackgroundPositionTop) * (b - c.stellarRatio) + "px" : c.startingValueTop, m(c.$element, d, e) } }, _handleScrollEvent: function () { var a = this, b = !1, c = function () { a._repositionElements(), b = !1 }, d = function () { b || (o(c), b = !0) }; this.$scrollElement.bind("scroll." + this.name, d), d() }, _startAnimationLoop: function () { var a = this; this._animationLoop = function () { o(a._animationLoop), a._repositionElements() }, this._animationLoop() } }, a.fn[f] = function (b) { var c = arguments; return b === d || "object" == typeof b ? this.each(function () { a.data(this, "plugin_" + f) || a.data(this, "plugin_" + f, new e(this, b)) }) : "string" == typeof b && "_" !== b[0] && "init" !== b ? this.each(function () { var d = a.data(this, "plugin_" + f); d instanceof e && "function" == typeof d[b] && d[b].apply(d, Array.prototype.slice.call(c, 1)), "destroy" === b && a.data(this, "plugin_" + f, null) }) : void 0 }, a[f] = function (c) { var d = a(b); return d.stellar.apply(d, Array.prototype.slice.call(arguments, 0)) }, a[f].scrollProperty = h, a[f].positionProperty = i, b.Stellar = e }(jQuery, this, document);/* 3166 * Vide - v0.5.1 3167 * Easy as hell jQuery plugin for video backgrounds. 3168 * http://vodkabears.github.io/vide/ 3169 * 3170 * Made by Ilya Makarov 3171 * Under MIT License 3172 */ 3173!function (a, b) { "function" == typeof define && define.amd ? define(["jquery"], b) : b("object" == typeof exports ? require("jquery") : a.jQuery) }(this, function (a) { "use strict"; function b(a) { var b, c, d, e, f, g, h, i = {}; for (f = a.replace(/\s*:\s*/g, ":").replace(/\s*,\s*/g, ",").split(","), h = 0, g = f.length; h < g && (c = f[h], c.search(/^(http|https|ftp):\/\//) === -1 && c.search(":") !== -1); h++)b = c.indexOf(":"), d = c.substring(0, b), e = c.substring(b + 1), e || (e = void 0), "string" == typeof e && (e = "true" === e || "false" !== e && e), "string" == typeof e && (e = isNaN(e) ? e : +e), i[d] = e; return null == d && null == e ? a : i } function c(a) { a = "" + a; var b, c, d, e = a.split(/\s+/), f = "50%", g = "50%"; for (d = 0, b = e.length; d < b; d++)c = e[d], "left" === c ? f = "0%" : "right" === c ? f = "100%" : "top" === c ? g = "0%" : "bottom" === c ? g = "100%" : "center" === c ? 0 === d ? f = "50%" : g = "50%" : 0 === d ? f = c : g = c; return { x: f, y: g } } function d(b, c) { var d = function () { c(this.src) }; a('<img src="' + b + '.gif">').on("load", d), a('<img src="' + b + '.jpg">').on("load", d), a('<img src="' + b + '.jpeg">').on("load", d), a('<img src="' + b + '.png">').on("load", d) } function e(c, d, e) { if (this.$element = a(c), "string" == typeof d && (d = b(d)), e ? "string" == typeof e && (e = b(e)) : e = {}, "string" == typeof d) d = d.replace(/\.\w*$/, ""); else if ("object" == typeof d) for (var f in d) d.hasOwnProperty(f) && (d[f] = d[f].replace(/\.\w*$/, "")); this.settings = a.extend({}, g, e), this.path = d; try { this.init() } catch (i) { if (i.message !== h) throw i } } var f = "vide", g = { volume: 1, playbackRate: 1, muted: !0, loop: !0, autoplay: !0, position: "50% 50%", posterType: "detect", resizing: !0, bgColor: "transparent", className: "" }, h = "Not implemented"; e.prototype.init = function () { var b, e, f = this, g = f.path, i = g, j = "", k = f.$element, l = f.settings, m = c(l.position), n = l.posterType; e = f.$wrapper = a("<div>").addClass(l.className).css({ position: "absolute", "z-index": -1, top: 0, left: 0, bottom: 0, right: 0, overflow: "hidden", "-webkit-background-size": "cover", "-moz-background-size": "cover", "-o-background-size": "cover", "background-size": "cover", "background-color": l.bgColor, "background-repeat": "no-repeat", "background-position": m.x + " " + m.y }), "object" == typeof g && (g.poster ? i = g.poster : g.mp4 ? i = g.mp4 : g.webm ? i = g.webm : g.ogv && (i = g.ogv)), "detect" === n ? d(i, function (a) { e.css("background-image", "url(" + a + ")") }) : "none" !== n && e.css("background-image", "url(" + i + "." + n + ")"), "static" === k.css("position") && k.css("position", "relative"), k.prepend(e), "object" == typeof g ? (g.mp4 && (j += '<source src="' + g.mp4 + '.mp4" type="video/mp4">'), g.webm && (j += '<source src="' + g.webm + '.webm" type="video/webm">
3173'), g.ogv && (j += '<source src="' + g.ogv + '.ogv" type="video/ogg">'), b = f.$video = a("<video>" + j + "</video>")) : b = f.$video = a('<video><source src="' + g + '.mp4" type="video/mp4"><source src="' + g + '.webm" type="video/webm"><source src="' + g + '.ogv" type="video/ogg"></video>'); try { b.prop({ autoplay: l.autoplay, loop: l.loop, volume: l.volume, muted: l.muted, defaultMuted: l.muted, playbackRate: l.playbackRate, defaultPlaybackRate: l.playbackRate }) } catch (o) { throw new Error(h) } b.css({ margin: "auto", position: "absolute", "z-index": -1, top: m.y, left: m.x, "-webkit-transform": "translate(-" + m.x + ", -" + m.y + ")", "-ms-transform": "translate(-" + m.x + ", -" + m.y + ")", "-moz-transform": "translate(-" + m.x + ", -" + m.y + ")", transform: "translate(-" + m.x + ", -" + m.y + ")", visibility: "hidden", opacity: 0 }).one("canplaythrough.vide", function () { f.resize() }).one("playing.vide", function () { b.css({ visibility: "visible", opacity: 1 }), e.css("background-image", "none") }), k.on("resize.vide", function () { l.resizing && f.resize() }), e.append(b) }, e.prototype.getVideoObject = function () { return this.$video[0] }, e.prototype.resize = function () { if (this.$video) { var a = this.$wrapper, b = this.$video, c = b[0], d = c.videoHeight, e = c.videoWidth, f = a.height(), g = a.width(); g / e > f / d ? b.css({ width: g + 2, height: "auto" }) : b.css({ width: "auto", height: f + 2 }) } }, e.prototype.destroy = function () { delete a[f].lookup[this.index], this.$video && this.$video.off(f), this.$element.off(f).removeData(f), this.$wrapper.remove() }, a[f] = { lookup: [] }, a.fn[f] = function (b, c) { var d; return this.each(function () { d = a.data(this, f), d && d.destroy(), d = new e(this, b, c), d.index = a[f].lookup.push(d) - 1, a.data(this, f, d) }), this }, a(document).ready(function () { var b = a(window); b.on("resize.vide", function () { for (var b, c = a[f].lookup.length, d = 0; d < c; d++)b = a[f].lookup[d], b && b.settings.resizing && b.resize() }), b.on("unload.vide", function () { return !1 }), a(document).find("[data-vide-bg]").each(function (b, c) { var d = a(c), e = d.data("vide-options"), g = d.data("vide-bg"); d[f](g, e) }) }) });(function (root, factory) { if (typeof exports === 'object') { module.exports = factory(require('jquery')) } else if (typeof define === 'function' && define.amd) { define(['jquery'], factory) } else { factory(root.jQuery) } }(this, function ($) { var CanvasRenderer = function (el, options) { var cachedBackground; var canvas = document.createElement('canvas'); el.appendChild(canvas); if (typeof (G_vmlCanvasManager) !== 'undefined') { G_vmlCanvasManager.initElement(canvas) } var ctx = canvas.getContext('2d'); canvas.width = canvas.height = options.size; var scaleBy = 1; if (window.devicePixelRatio > 1) { scaleBy = window.devicePixelRatio; canvas.style.width = canvas.style.height = [options.size, 'px'].join(''); canvas.width = canvas.height = options.size * scaleBy; ctx.scale(scaleBy, scaleBy) } ctx.translate(options.size / 2, options.size / 2); ctx.rotate((-1 / 2 + options.rotate / 180) * Math.PI); var radius = (options.size - options.lineWidth) / 2; if (options.scaleColor && options.scaleLength) { radius -= options.scaleLength + 2 } Date.now = Date.now || function () { return +(new Date()) }; var drawCircle = function (color, lineWidth, percent) { percent = Math.min(Math.max(-1, percent || 0), 1); var isNegative = percent <= 0 ? true : false; ctx.beginPath(); ctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, isNegative); ctx.strokeStyle = color; ctx.lineWidth = lineWidth; ctx.stroke() }; var drawScale = function () { var offset; var length; ctx.lineWidth = 1; ctx.fillStyle = options.scaleColor; ctx.save(); for (var i = 24; i > 0; --i) { if (i % 6 === 0) { length = options.scaleLength; offset = 0 } else { length = options.scaleLength * 0.6; offset = options.scaleLength - length } ctx.fillRect(-options.size / 2 + offset, 0, length, 1); ctx.rotate(Math.PI / 12) } ctx.restore() }; var reqAnimationFrame = (function () { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) { window.setTimeout(callback, 1000 / 60) } }());
3173 var drawBackground = function () { if (options.scaleColor) drawScale(); if (options.trackColor) drawCircle(options.trackColor, options.trackWidth || options.lineWidth, 1) }; this.getCanvas = function () { return canvas }; this.getCtx = function () { return ctx }; this.clear = function () { ctx.clearRect(options.size / -2, options.size / -2, options.size, options.size) }; this.draw = function (percent) { if (!!options.scaleColor || !!options.trackColor) { if (ctx.getImageData && ctx.putImageData) { if (!cachedBackground) { drawBackground(); cachedBackground = ctx.getImageData(0, 0, options.size * scaleBy, options.size * scaleBy) } else { ctx.putImageData(cachedBackground, 0, 0) } } else { this.clear(); drawBackground() } } else { this.clear() } ctx.lineCap = options.lineCap; var color; if (typeof (options.barColor) === 'function') { color = options.barColor(percent) } else { color = options.barColor } drawCircle(color, options.lineWidth, percent / 100) }.bind(this); this.animate = function (from, to) { var startTime = Date.now(); options.onStart(from, to); var animation = function () { var process = Math.min(Date.now() - startTime, options.animate.duration); var currentValue = options.easing(this, process, from, to - from, options.animate.duration); this.draw(currentValue); options.onStep(from, to, currentValue); if (process >= options.animate.duration) { options.onStop(from, to) } else { reqAnimationFrame(animation) } }.bind(this); reqAnimationFrame(animation) }.bind(this) }; var EasyPieChart = function (el, opts) { var defaultOptions = { barColor: '#ef1e25', trackColor: '#f9f9f9', scaleColor: '#dfe0e0', scaleLength: 5, lineCap: 'round', lineWidth: 3, trackWidth: undefined, size: 110, rotate: 0, animate: { duration: 1000, enabled: true }, easing: function (x, t, b, c, d) { t = t / (d / 2); if (t < 1) { return c / 2 * t * t + b } return -c / 2 * ((--t) * (t - 2) - 1) + b }, onStart: function (from, to) { return }, onStep: function (from, to, currentValue) { return }, onStop: function (from, to) { return } }; if (typeof (CanvasRenderer) !== 'undefined') { defaultOptions.renderer = CanvasRenderer } else if (typeof (SVGRenderer) !== 'undefined') { defaultOptions.renderer = SVGRenderer } else { throw new Error('Please load either the SVG- or the CanvasRenderer') } var options = {}; var currentValue = 0; var init = function () { this.el = el; this.options = options; for (var i in defaultOptions) { if (defaultOptions.hasOwnProperty(i)) { options[i] = opts && typeof (opts[i]) !== 'undefined' ? opts[i] : defaultOptions[i]; if (typeof (options[i]) === 'function') { options[i] = options[i].bind(this) } } } if (typeof (options.easing) === 'string' && typeof (jQuery) !== 'undefined' && jQuery.isFunction(jQuery.easing[options.easing])) { options.easing = jQuery.easing[options.easing] } else { options.easing = defaultOptions.easing } if (typeof (options.animate) === 'number') { options.animate = { duration: options.animate, enabled: true } } if (typeof (options.animate) === 'boolean' && !options.animate) { options.animate = { duration: 1000, enabled: options.animate } } this.renderer = new options.renderer(el, options); this.renderer.draw(currentValue); if (el.dataset && el.dataset.percent) { this.update(parseFloat(el.dataset.percent)) } else if (el.getAttribute && el.getAttribute('data-percent')) { this.update(parseFloat(el.getAttribute('data-percent'))) } }.bind(this); this.update = function (newValue) { newValue = parseFloat(newValue); if (options.animate.enabled) { this.renderer.animate(currentValue, newValue) } else { this.renderer.draw(newValue) } currentValue = newValue; return this }.bind(this); this.disableAnimation = function () { options.animate.enabled = false; return this }; this.enableAnimation = function () { options.animate.enabled = true; return this }; init() }; $.fn.easyPieChart = function (options) { return this.each(function () { var instanceOptions; if (!$.data(this, 'easyPieChart')) { instanceOptions = $.extend({}, options, $(this).data()); $.data(this, 'easyPieChart', new EasyPieChart(this, instanceOptions)) } }) } }));/*! 3174 * Isotope PACKAGED v3.0.6 3175 * 3176 * Licensed GPLv3 for open source use 3177 * or Isotope Commercial License for commercial use 3178 * 3179 * https://isotope.metafizzy.co 3180 * Copyright 2010-2018 Metafizzy 3181 */ 3182 3183!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] || {};
vendor: 38,334 bytes, lines 3183-3188
3183 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 (t) { if (Array.isArray(t)) return t; if (null === t || void 0 === t) return []; var e = "object" == typeof t && "number" == typeof t.length; return e ? o.call(t) : [t] }, i.removeFrom = function (t, e) { var i = t.indexOf(e); i != -1 && t.splice(i, 1) }, i.getParent = function (t, i) { for (; t.parentNode && t != document.body;)if (t = t.parentNode, e(t, i)) return t }, i.getQueryElement = function (t) { return "string" == typeof t ? document.querySelector(t) : t }, i.handleEvent = function (t) { var e = "on" + t.type; this[e] && this[e](t) }, i.filterFindElements = function (t, o) { t = i.makeArray(t); var n = []; return t.forEach(function (t) { if (t instanceof HTMLElement) { if (!o) return void n.push(t); e(t, o) && n.push(t); for (var i = t.querySelectorAll(o), s = 0; s < i.length; s++)n.push(i[s]) } }), n }, i.debounceMethod = function (t, e, i) { i = i || 100; var o = t.prototype[e], n = e + "Timeout"; t.prototype[e] = function () { var t = this[n]; clearTimeout(t); var e = arguments, s = this; this[n] = setTimeout(function () { o.apply(s, e), delete s[n] }, i) } }, i.docReady = function (t) { var e = document.readyState; "complete" == e || "interactive" == e ? setTimeout(t) : document.addEventListener("DOMContentLoaded", t) }, i.toDashed = function (t) { return t.replace(/(.)([A-Z])/g, function (t, e, i) { return e + "-" + i }).toLowerCase() }; var n = t.console; return i.htmlInit = function (e, o) { i.docReady(function () { var s = i.toDashed(o), r = "data-" + s, a = document.querySelectorAll("[" + r + "]"), u = document.querySelectorAll(".js-" + s), h = i.makeArray(a).concat(i.makeArray(u)), d = r + "-options", l = t.jQuery; h.forEach(function (t) { var i, s = t.getAttribute(r) || t.getAttribute(d); try { i = s && JSON.parse(s) } catch (a) { return void (n && n.error("Error parsing " + r + " on " + t.className + ": " + a)) } var u = new e(t, i); l && l.data(t, o, u) }) }) }, i }), function (t, e) { "function" == typeof define && define.amd ? define("outlayer/item", ["ev-emitter/ev-emitter", "get-size/get-size"], e) : "object" == typeof module && module.exports ? module.exports = e(require("ev-emitter"), require("get-size")) : (t.Outlayer = {}, t.Outlayer.Item = e(t.EvEmitter, t.getSize)) }(window, function (t, e) { "use strict"; function i(t) { for (var e in t) return !1; return e = null, !0 } function o(t, e) { t && (this.element = t, this.layout = e, this.position = { x: 0, y: 0 }, this._create()) } function n(t) { return t.replace(/([A-Z])/g, function (t) { return "-" + t.toLowerCase() }) } var s = document.documentElement.style, r = "string" == typeof s.transition ? "transition" : "WebkitTransition", a = "string" == typeof s.transform ? "transform" : "WebkitTransform", u = { WebkitTransition: "webkitTransitionEnd", transition: "transitionend" }[r], h = { transform: a, transition: r, transitionDuration: r + "Duration", transitionProperty: r + "Property", transitionDelay: r + "Delay" }, d = o.prototype = Object.create(t.prototype); d.constructor = o, d._create = function () { this._transn = { ingProperties: {}, clean: {}, onEnd: {} }, this.css({ position: "absolute" }) }, d.handleEvent = function (t) { var e = "on" + t.type; this[e] && this[e](t) }, d.getSize = function () { this.size = e(this.element) }, d.css = function (t) { var e = this.element.style; for (var i in t) { var o = h[i] || i; e[o] = t[i] } }, d.getPosition = function () { var t = getComputedStyle(this.element), e = this.layout._getOption("originLeft"), i = this.layout._getOption("originTop"), o = t[e ? "left" : "right"], n = t[i ? "top" : "bottom"], s = parseFloat(o), r = parseFloat(n), a = this.layout.size; o.indexOf("%") != -1 && (s = s / 100 * a.width), n.indexOf("%") != -1 && (r = r / 100 * a.height), s = isNaN(s) ? 0 : s, r = isNaN(r) ? 0 : r, s -= e ? a.paddingLeft : a.paddingRight, r -= i ? a.paddingTop : a.paddingBottom, this.position.x = s, this.position.y = r }, d.layoutPosition = function () { var t = this.layout.size, e = {}, i = this.layout._getOption("originLeft"), o = this.layout._getOption("originTop"), n = i ? "paddingLeft" : "paddingRight", s = i ? "left" : "right", r = i ? "right" : "left", a = this.position.x + t[n]; e[s] = this.getXValue(a), e[r] = ""; var u = o ? "paddingTop" : "paddingBottom", h = o ? "top" : "bottom", d = o ? "bottom" : "top", l = this.position.y + t[u]; e[h] = this.getYValue(l), e[d] = "", this.css(e), this.emitEvent("layout", [this]) }, d.getXValue = function (t) { var e = this.layout._getOption("horizontal"); return this.layout.options.percentPosition && !e ? t / this.layout.size.width * 100 + "%" : t + "px" }, d.getYValue = function (t) { var e = this.layout._getOption("horizontal"); return this.layout.options.percentPosition && e ? t / this.layout.size.height * 100 + "%" : t + "px" }, d._transitionTo = function (t, e) { this.getPosition(); var i = this.position.x, o = this.position.y, n = t == this.position.x && e == this.position.y; if (this.setPosition(t, e), n && !this.isTransitioning) return void this.layoutPosition(); var s = t - i, r = e - o, a = {}; a.transform = this.getTranslate(s, r), this.transition({ to: a, onTransitionEnd: { transform: this.layoutPosition }, isCleaning: !0 }) }, d.getTranslate = function (t, e) { var i = this.layout._getOption("originLeft"), o = this.layout._getOption("originTop"); return t = i ? t : -t, e = o ? e : -e, "translate3d(" + t + "px, " + e + "px, 0)" }, d.goTo = function (t, e) { this.setPosition(t, e), this.layoutPosition() }, d.moveTo = d._transitionTo, d.setPosition = function (t, e) { this.position.x = parseFloat(t), this.position.y = parseFloat(e) }, d._nonTransition = function (t) { this.css(t.to), t.isCleaning && this._removeStyles(t.to); for (var e in t.onTransitionEnd) t.onTransitionEnd[e].call(this) }, d.transition = function (t) { if (!parseFloat(this.layout.options.transitionDuration)) return void this._nonTransition(t); var e = this._transn; for (var i in t.onTransitionEnd) e.onEnd[i] = t.onTransitionEnd[i]; for (i in t.to) e.ingProperties[i] = !0, t.isCleaning && (e.clean[i] = !0); if (t.from) { this.css(t.from); var o = this.element.offsetHeight; o = null } this.enableTransition(t.to), this.css(t.to), this.isTransitioning = !0 }; var l = "opacity," + n(a); d.enableTransition = function () { if (!this.isTransitioning) { var t = this.layout.options.transitionDuration; t = "number" == typeof t ? t + "ms" : t, this.css({ transitionProperty: l, transitionDuration: t, transitionDelay: this.staggerDelay || 0 }), this.element.addEventListener(u, this, !1) } }, d.onwebkitTransitionEnd = function (t) { this.ontransitionend(t) }, d.onotransitionend = function (t) { this.ontransitionend(t) }; var f = { "-webkit-transform": "transform" }; d.ontransitionend = function (t) { if (t.target === this.element) { var e = this._transn, o = f[t.propertyName] || t.propertyName; if (delete e.ingProperties[o], i(e.ingProperties) && this.disableTransition(), o in e.clean && (this.element.style[t.propertyName] = "", delete e.clean[o]), o in e.onEnd) { var n = e.onEnd[o]; n.call(this), delete e.onEnd[o] } this.emitEvent("transitionEnd", [this]) } }, d.disableTransition = function () { this.removeTransitionStyles(), this.element.removeEventListener(u, this, !1), this.isTransitioning = !1 }, d._removeStyles = function (t) { var e = {}; for (var i in t) e[i] = ""; this.css(e) }; var c = { transitionProperty: "", transitionDuration: "", transitionDelay: "" }; return d.removeTransitionStyles = function () { this.css(c) }, d.stagger = function (t) { t = isNaN(t) ? 0 : t, this.staggerDelay = t + "ms" }, d.removeElem = function () { this.element.parentNode.removeChild(this.element), this.css({ display: "" }), this.emitEvent("remove", [this]) }, d.remove = function () { return r && parseFloat(this.layout.options.transitionDuration) ? (this.once("transitionEnd", function () { this.removeElem() }), void this.hide()) : void this.removeElem() }, d.reveal = function () { delete this.isHidden, this.css({ display: "" }); var t = this.layout.options, e = {}, i = this.getHideRevealTransitionEndProperty("visibleStyle"); e[i] = this.onRevealTransitionEnd, this.transition({ from: t.hiddenStyle, to: t.visibleStyle, isCleaning: !0, onTransitionEnd: e }) }, d.onRevealTransitionEnd = function () { this.isHidden || this.emitEvent("reveal") }, d.getHideRevealTransitionEndProperty = function (t) { var e = this.layout.options[t]; if (e.opacity) return "opacity"; for (var i in e) return i }, d.hide = function () { this.isHidden = !0, this.css({ display: "" }); var t = this.layout.options, e = {}, i = this.getHideRevealTransitionEndProperty("hiddenStyle"); e[i] = this.onHideTransitionEnd, this.transition({ from: t.visibleStyle, to: t.hiddenStyle, isCleaning: !0, onTransitionEnd: e }) }, d.onHideTransitionEnd = function () { this.isHidden && (this.css({ display: "none" }), this.emitEvent("hide")) }, d.destroy = function () { this.css({ position: "", left: "", right: "", top: "", bottom: "", transition: "", transform: "" }) }, o }), function (t, e) { "use strict"; "function" == typeof define && define.amd ? define("outlayer/outlayer", ["ev-emitter/ev-emitter", "get-size/get-size", "fizzy-ui-utils/utils", "./item"], function (i, o, n, s) { return e(t, i, o, n, s) }) : "object" == typeof module && module.exports ? module.exports = e(t, require("ev-emitter"), require("get-size"), require("fizzy-ui-utils"), require("./item")) : t.Outlayer = e(t, t.EvEmitter, t.getSize, t.fizzyUIUtils, t.Outlayer.Item) }(window, function (t, e, i, o, n) { "use strict"; function s(t, e) { var i = o.getQueryElement(t); if (!i) return void (u && u.error("Bad element for " + this.constructor.namespace + ": " + (i || t))); this.element = i, h && (this.$element = h(this.element)), this.options = o.extend({}, this.constructor.defaults), this.option(e); var n = ++l; this.element.outlayerGUID = n, f[n] = this, this._create(); var s = this._getOption("initLayout"); s && this.layout() } function r(t) { function e() { t.apply(this, arguments) } return e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e } function a(t) { if ("number" == typeof t) return t; var e = t.match(/(^\d*\.?\d*)(\w*)/), i = e && e[1], o = e && e[2]; if (!i.length) return 0; i = parseFloat(i); var n = m[o] || 1; return i * n } var u = t.console, h = t.jQuery, d = function () { }, l = 0, f = {}; s.namespace = "outlayer", s.Item = n, s.defaults = { containerStyle: { position: "relative" }, initLayout: !0, originLeft: !0, originTop: !0, resize: !0, resizeContainer: !0, transitionDuration: "0.4s", hiddenStyle: { opacity: 0, transform: "scale(0.001)" }, visibleStyle: { opacity: 1, transform: "scale(1)" } }; var c = s.prototype; o.extend(c, e.prototype), c.option = function (t) { o.extend(this.options, t) }, c._getOption = function (t) { var e = this.constructor.compatOptions[t]; return e && void 0 !== this.options[e] ? this.options[e] : this.options[t] }, s.compatOptions = { initLayout: "isInitLayout", horizontal: "isHorizontal", layoutInstant: "isLayoutInstant", originLeft: "isOriginLeft", originTop: "isOriginTop", resize: "isResizeBound", resizeContainer: "isResizingContainer" }, c._create = function () { this.reloadItems(), this.stamps = [], this.stamp(this.options.stamp), o.extend(this.element.style, this.options.containerStyle); var t = this._getOption("resize"); t && this.bindResize() }, c.reloadItems = function () { this.items = this._itemize(this.element.children) }, c._itemize = function (t) { for (var e = this._filterFindItemElements(t), i = this.constructor.Item, o = [], n = 0; n < e.length; n++) { var s = e[n], r = new i(s, this); o.push(r) } return o }, c._filterFindItemElements = function (t) { return o.filterFindElements(t, this.options.itemSelector) }, c.getItemElements = function () { return this.items.map(function (t) { return t.element }) }, c.layout = function () { this._resetLayout(), this._manageStamps(); var t = this._getOption("layoutInstant"), e = void 0 !== t ? t : !this._isLayoutInited; this.layoutItems(this.items, e), this._isLayoutInited = !0 }, c._init = c.layout, c._resetLayout = function () { this.getSize() }, c.getSize = function () { this.size = i(this.element) }, c._getMeasurement = function (t, e) { var o, n = this.options[t]; n ? ("string" == typeof n ? o = this.element.querySelector(n) : n instanceof HTMLElement && (o = n), this[t] = o ? i(o)[e] : n) : this[t] = 0 }, c.layoutItems = function (t, e) { t = this._getItemsForLayout(t), this._layoutItems(t, e), this._postLayout() }, c._getItemsForLayout = function (t) { return t.filter(function (t) { return !t.isIgnored }) }, c._layoutItems = function (t, e) { if (this._emitCompleteOnItems("layout", t), t && t.length) { var i = []; t.forEach(function (t) { var o = this._getItemLayoutPosition(t); o.item = t, o.isInstant = e || t.isLayoutInstant, i.push(o) }, this), this._processLayoutQueue(i) } }, c._getItemLayoutPosition = function () { return { x: 0, y: 0 } }, c._processLayoutQueue = function (t) { this.updateStagger(), t.forEach(function (t, e) { this._positionItem(t.item, t.x, t.y, t.isInstant, e) }, this) }, c.updateStagger = function () { var t = this.options.stagger; return null === t || void 0 === t ? void (this.stagger = 0) : (this.stagger = a(t), this.stagger) }, c._positionItem = function (t, e, i, o, n) { o ? t.goTo(e, i) : (t.stagger(n * this.stagger), t.moveTo(e, i)) }, c._postLayout = function () { this.resizeContainer() }, c.resizeContainer = function () { var t = this._getOption("resizeContainer"); if (t) { var e = this._getContainerSize(); e && (this._setContainerMeasure(e.width, !0), this._setContainerMeasure(e.height, !1)) } }, c._getContainerSize = d, c._setContainerMeasure = function (t, e) { if (void 0 !== t) { var i = this.size; i.isBorderBox && (t += e ? i.paddingLeft + i.paddingRight + i.borderLeftWidth + i.borderRightWidth : i.paddingBottom + i.paddingTop + i.borderTopWidth + i.borderBottomWidth), t = Math.max(t, 0), this.element.style[e ? "width" : "height"] = t + "px" } }, c._emitCompleteOnItems = function (t, e) { function i() { n.dispatchEvent(t + "Complete", null, [e]) } function o() { r++, r == s && i() } var n = this, s = e.length; if (!e || !s) return void i(); var r = 0; e.forEach(function (e) { e.once(t, o) }) }, c.dispatchEvent = function (t, e, i) { var o = e ? [e].concat(i) : i; if (this.emitEvent(t, o), h) if (this.$element = this.$element || h(this.element), e) { var n = h.Event(e); n.type = t, this.$element.trigger(n, i) } else this.$element.trigger(t, i) }, c.ignore = function (t) { var e = this.getItem(t); e && (e.isIgnored = !0) }, c.unignore = function (t) { var e = this.getItem(t); e && delete e.isIgnored }, c.stamp = function (t) { t = this._find(t), t && (this.stamps = this.stamps.concat(t), t.forEach(this.ignore, this)) }, c.unstamp = function (t) { t = this._find(t), t && t.forEach(function (t) { o.removeFrom(this.stamps, t), this.unignore(t) }, this) }, c._find = function (t) { if (t) return "string" == typeof t && (t = this.element.querySelectorAll(t)), t = o.makeArray(t) }, c._manageStamps = function () { this.stamps && this.stamps.length && (this._getBoundingRect(), this.stamps.forEach(this._manageStamp, this)) }, c._getBoundingRect = function () { var t = this.element.getBoundingClientRect(), e = this.size; this._boundingRect = { left: t.left + e.paddingLeft + e.borderLeftWidth, top: t.top + e.paddingTop + e.borderTopWidth, right: t.right - (e.paddingRight + e.borderRightWidth), bottom: t.bottom - (e.paddingBottom + e.borderBottomWidth) } }, c._manageStamp = d, c._getElementOffset = function (t) { var e = t.getBoundingClientRect(), o = this._boundingRect, n = i(t), s = { left: e.left - o.left - n.marginLeft, top: e.top - o.top - n.marginTop, right: o.right - e.right - n.marginRight, bottom: o.bottom - e.bottom - n.marginBottom }; return s }, c.handleEvent = o.handleEvent, c.bindResize = function () { t.addEventListener("resize", this), this.isResizeBound = !0 }, c.unbindResize = function () { t.removeEventListener("resize", this), this.isResizeBound = !1 }, c.onresize = function () { this.resize() }, o.debounceMethod(s, "onresize", 100), c.resize = function () { this.isResizeBound && this.needsResizeLayout() && this.layout() }, c.needsResizeLayout = function () { var t = i(this.element), e = this.size && t; return e && t.innerWidth !== this.size.innerWidth }, c.addItems = function (t) { var e = this._itemize(t); return e.length && (this.items = this.items.concat(e)), e }, c.appended = function (t) { var e = this.addItems(t); e.length && (this.layoutItems(e, !0), this.reveal(e)) }, c.prepended = function (t) { var e = this._itemize(t); if (e.length) { var i = this.items.slice(0); this.items = e.concat(i), this._resetLayout(), this._manageStamps(), this.layoutItems(e, !0), this.reveal(e), this.layoutItems(i) } }, c.reveal = function (t) { if (this._emitCompleteOnItems("reveal", t), t && t.length) { var e = this.updateStagger(); t.forEach(function (t, i) { t.stagger(i * e), t.reveal() }) } }, c.hide = function (t) { if (this._emitCompleteOnItems("hide", t), t && t.length) { var e = this.updateStagger(); t.forEach(function (t, i) { t.stagger(i * e), t.hide() }) } }, c.revealItemElements = function (t) { var e = this.getItems(t); this.reveal(e) }, c.hideItemElements = function (t) { var e = this.getItems(t); this.hide(e) }, c.getItem = function (t) { for (var e = 0; e < this.items.length; e++) { var i = this.items[e]; if (i.element == t) return i } }, c.getItems = function (t) { t = o.makeArray(t); var e = []; return t.forEach(function (t) { var i = this.getItem(t); i && e.push(i) }, this), e }, c.remove = function (t) { var e = this.getItems(t); this._emitCompleteOnItems("remove", e), e && e.length && e.forEach(function (t) { t.remove(), o.removeFrom(this.items, t) }, this) }, c.destroy = function () { var t = this.element.style; t.height = "", t.position = "", t.width = "", this.items.forEach(function (t) { t.destroy() }), this.unbindResize(); var e = this.element.outlayerGUID; delete f[e], delete this.element.outlayerGUID, h && h.removeData(this.element, this.constructor.namespace) }, s.data = function (t) { t = o.getQueryElement(t); var e = t && t.outlayerGUID; return e && f[e] }, s.create = function (t, e) { var i = r(s); return i.defaults = o.extend({}, s.defaults), o.extend(i.defaults, e), i.compatOptions = o.extend({}, s.compatOptions), i.namespace = t, i.data = s.data, i.Item = r(n), o.htmlInit(i, t), h && h.bridget && h.bridget(t, i), i }; var m = { ms: 1, s: 1e3 }; return s.Item = n, s }), function (t, e) { "function" == typeof define && define.amd ? define("isotope-layout/js/item", ["outlayer/outlayer"], e) : "object" == typeof module && module.exports ? module.exports = e(require("outlayer")) : (t.Isotope = t.Isotope || {}, t.Isotope.Item = e(t.Outlayer)) }(window, function (t) { "use strict"; function e() { t.Item.apply(this, arguments) } var i = e.prototype = Object.create(t.Item.prototype), o = i._create; i._create = function () { this.id = this.layout.itemGUID++, o.call(this), this.sortData = {} }, i.updateSortData = function () { if (!this.isIgnored) { this.sortData.id = this.id, this.sortData["original-order"] = this.id, this.sortData.random = Math.random(); var t = this.layout.options.getSortData, e = this.layout._sorters; for (var i in t) { var o = e[i]; this.sortData[i] = o(this.element, this) } } }; var n = i.destroy; return i.destroy = function () { n.apply(this, arguments), this.css({ display: "" }) }, e }), function (t, e) { "function" == typeof define && define.amd ? define("isotope-layout/js/layout-mode", ["get-size/get-size", "outlayer/outlayer"], e) : "object" == typeof module && module.exports ? module.exports = e(require("get-size"), require("outlayer")) : (t.Isotope = t.Isotope || {}, t.Isotope.LayoutMode = e(t.getSize, t.Outlayer)) }(window, function (t, e) { "use strict"; function i(t) { this.isotope = t, t && (this.options = t.options[this.namespace], this.element = t.element, this.items = t.filteredItems, this.size = t.size) } var o = i.prototype, n = ["_resetLayout", "_getItemLayoutPosition", "_manageStamp", "_getContainerSize", "_getElementOffset", "needsResizeLayout", "_getOption"]; return n.forEach(function (t) { o[t] = function () { return e.prototype[t].apply(this.isotope, arguments) } }), o.needsVerticalResizeLayout = function () { var e = t(this.isotope.element), i = this.isotope.size && e; return i && e.innerHeight != this.isotope.size.innerHeight }, o._getMeasurement = function () { this.isotope._getMeasurement.apply(this, arguments) }, o.getColumnWidth = function () { this.getSegmentSize("column", "Width") }, o.getRowHeight = function () { this.getSegmentSize("row", "Height") }, o.getSegmentSize = function (t, e) { var i = t + e, o = "outer" + e; if (this._getMeasurement(i, o), !this[i]) { var n = this.getFirstItemSize(); this[i] = n && n[o] || this.isotope.size["inner" + e] } }, o.getFirstItemSize = function () { var e = this.isotope.filteredItems[0]; return e && e.element && t(e.element) }, o.layout = function () { this.isotope.layout.apply(this.isotope, arguments) }, o.getSize = function () { this.isotope.getSize(), this.size = this.isotope.size }, i.modes = {}, i.create = function (t, e) { function n() { i.apply(this, arguments) } return n.prototype = Object.create(o), n.prototype.constructor = n, e && (n.options = e), n.prototype.namespace = t, i.modes[t] = n, n }, i }), function (t, e) { "function" == typeof define && define.amd ? define("masonry-layout/masonry", ["outlayer/outlayer", "get-size/get-size"], e) : "object" == typeof module && module.exports ? module.exports = e(require("outlayer"), require("get-size")) : t.Masonry = e(t.Outlayer, t.getSize) }(window, function (t, e) { var i = t.create("masonry"); i.compatOptions.fitWidth = "isFitWidth"; var o = i.prototype; return o._resetLayout = function () { this.getSize(), this._getMeasurement("columnWidth", "outerWidth"), this._getMeasurement("gutter", "outerWidth"), this.measureColumns(), this.colYs = []; for (var t = 0; t < this.cols; t++)this.colYs.push(0); this.maxY = 0, this.horizontalColIndex = 0 }, o.measureColumns = function () { if (this.getContainerWidth(), !this.columnWidth) { var t = this.items[0], i = t && t.element; this.columnWidth = i && e(i).outerWidth || this.containerWidth } var o = this.columnWidth += this.gutter, n = this.containerWidth + this.gutter, s = n / o, r = o - n % o, a = r && r < 1 ? "round" : "floor"; s = Math[a](s), this.cols = Math.max(s, 1) }, o.getContainerWidth = function () { var t = this._getOption("fitWidth"), i = t ? this.element.parentNode : this.element, o = e(i); this.containerWidth = o && o.innerWidth }, o._getItemLayoutPosition = function (t) { t.getSize(); var e = t.size.outerWidth % this.columnWidth, i = e && e < 1 ? "round" : "ceil", o = Math[i](t.size.outerWidth / this.columnWidth); o = Math.min(o, this.cols); for (var n = this.options.horizontalOrder ? "_getHorizontalColPosition" : "_getTopColPosition", s = this[n](o, t), r = { x: this.columnWidth * s.col, y: s.y }, a = s.y + t.size.outerHeight, u = o + s.col, h = s.col; h < u; h++)this.colYs[h] = a; return r }, o._getTopColPosition = function (t) { var e = this._getTopColGroup(t), i = Math.min.apply(Math, e); return { col: e.indexOf(i), y: i } }, o._getTopColGroup = function (t) { if (t < 2) return this.colYs; for (var e = [], i = this.cols + 1 - t, o = 0; o < i; o++)e[o] = this._getColGroupY(o, t); return e }, o._getColGroupY = function (t, e) { if (e < 2) return this.colYs[t]; var i = this.colYs.slice(t, t + e); return Math.max.apply(Math, i) }, o._getHorizontalColPosition = function (t, e) { var i = this.horizontalColIndex % this.cols, o = t > 1 && i + t > this.cols; i = o ? 0 : i; var n = e.size.outerWidth && e.size.outerHeight; return this.horizontalColIndex = n ? i + t : this.horizontalColIndex, { col: i, y: this._getColGroupY(i, t) } }, o._manageStamp = function (t) { var i = e(t), o = this._getElementOffset(t), n = this._getOption("originLeft"), s = n ? o.left : o.right, r = s + i.outerWidth, a = Math.floor(s / this.columnWidth); a = Math.max(0, a); var u = Math.floor(r / this.columnWidth); u -= r % this.columnWidth ? 0 : 1, u = Math.min(this.cols - 1, u); for (var h = this._getOption("originTop"), d = (h ? o.top : o.bottom) + i.outerHeight, l = a; l <= u; l++)this.colYs[l] = Math.max(d, this.colYs[l]) }, o._getContainerSize = function () { this.maxY = Math.max.apply(Math, this.colYs); var t = { height: this.maxY }; return this._getOption("fitWidth") && (t.width = this._getContainerFitWidth()), t }, o._getContainerFitWidth = function () { for (var t = 0, e = this.cols; --e && 0 === this.colYs[e];)t++; return (this.cols - t) * this.columnWidth - this.gutter }, o.needsResizeLayout = function () { var t = this.containerWidth; return this.getContainerWidth(), t != this.containerWidth }, i }), function (t, e) { "function" == typeof define && define.amd ? define("isotope-layout/js/layout-modes/masonry", ["../layout-mode", "masonry-layout/masonry"], e) : "object" == typeof module && module.exports ? module.exports = e(require("../layout-mode"), require("masonry-layout")) : e(t.Isotope.LayoutMode, t.Masonry) }(window, function (t, e) { "use strict"; var i = t.create("masonry"), o = i.prototype, n = { _getElementOffset: !0, layout: !0, _getMeasurement: !0 }; for (var s in e.prototype) n[s] || (o[s] = e.prototype[s]); var r = o.measureColumns; o.measureColumns = function () { this.items = this.isotope.filteredItems, r.call(this) }; var a = o._getOption; return o._getOption = function (t) { return "fitWidth" == t ? void 0 !== this.options.isFitWidth ? this.options.isFitWidth : this.options.fitWidth : a.apply(this.isotope, arguments) }, i }), function (t, e) { "function" == typeof define && define.amd ? define("isotope-layout/js/layout-modes/fit-rows", ["../layout-mode"], e) : "object" == typeof exports ? module.exports = e(require("../layout-mode")) : e(t.Isotope.LayoutMode) }(window, function (t) { "use strict"; var e = t.create("fitRows"), i = e.prototype; return i._resetLayout = function () { this.x = 0, this.y = 0, this.maxY = 0, this._getMeasurement("gutter", "outerWidth") }, i._getItemLayoutPosition = function (t) { t.getSize(); var e = t.size.outerWidth + this.gutter, i = this.isotope.size.innerWidth + this.gutter; 0 !== this.x && e + this.x > i && (this.x = 0, this.y = this.maxY); var o = { x: this.x, y: this.y }; return this.maxY = Math.max(this.maxY, this.y + t.size.outerHeight), this.x += e, o }, i._getContainerSize = function () { return { height: this.maxY } }, e }), function (t, e) { "function" == typeof define && define.amd ? define("isotope-layout/js/layout-modes/vertical", ["../layout-mode"], e) : "object" == typeof module && module.exports ? module.exports = e(require("../layout-mode")) : e(t.Isotope.LayoutMode) }(window, function (t) { "use strict"; var e = t.create("vertical", { horizontalAlignment: 0 }), i = e.prototype; return i._resetLayout = function () { this.y = 0 }, i._getItemLayoutPosition = function (t) { t.getSize(); var e = (this.isotope.size.innerWidth - t.size.outerWidth) * this.options.horizontalAlignment, i = this.y; return this.y += t.size.outerHeight, { x: e, y: i } }, i._getContainerSize = function () { return { height: this.y } }, e }), function (t, e) { "function" == typeof define && define.amd ? define(["outlayer/outlayer", "get-size/get-size", "desandro-matches-selector/matches-selector", "fizzy-ui-utils/utils", "isotope-layout/js/item", "isotope-layout/js/layout-mode", "isotope-layout/js/layout-modes/masonry", "isotope-layout/js/layout-modes/fit-rows", "isotope-layout/js/layout-modes/vertical"], function (i, o, n, s, r, a) { return e(t, i, o, n, s, r, a) }) : "object" == typeof module && module.exports ? module.exports = e(t, require("outlayer"), require("get-size"), require("desandro-matches-selector"), require("fizzy-ui-utils"), require("isotope-layout/js/item"), require("isotope-layout/js/layout-mode"), require("isotope-layout/js/layout-modes/masonry"), require("isotope-layout/js/layout-modes/fit-rows"), require("isotope-layout/js/layout-modes/vertical")) : t.Isotope = e(t, t.Outlayer, t.getSize, t.matchesSelector, t.fizzyUIUtils, t.Isotope.Item, t.Isotope.LayoutMode) }(window, function (t, e, i, o, n, s, r) { 3184 function a(t, e) { return function (i, o) { for (var n = 0; n < t.length; n++) { var s = t[n], r = i.sortData[s], a = o.sortData[s]; if (r > a || r < a) { var u = void 0 !== e[s] ? e[s] : e, h = u ? 1 : -1; return (r > a ? 1 : -1) * h } } return 0 } } var u = t.jQuery, h = String.prototype.trim ? function (t) { return t.trim() } : function (t) { return t.replace(/^\s+|\s+$/g, "") }, d = e.create("isotope", { layoutMode: "masonry", isJQueryFiltering: !0, sortAscending: !0 }); d.Item = s, d.LayoutMode = r; var l = d.prototype; l._create = function () { this.itemGUID = 0, this._sorters = {}, this._getSorters(), e.prototype._create.call(this), this.modes = {}, this.filteredItems = this.items, this.sortHistory = ["original-order"]; for (var t in r.modes) this._initLayoutMode(t) }, l.reloadItems = function () { this.itemGUID = 0, e.prototype.reloadItems.call(this) }, l._itemize = function () { for (var t = e.prototype._itemize.apply(this, arguments), i = 0; i < t.length; i++) { var o = t[i]; o.id = this.itemGUID++ } return this._updateItemsSortData(t), t }, l._initLayoutMode = function (t) { var e = r.modes[t], i = this.options[t] || {}; this.options[t] = e.options ? n.extend(e.options, i) : i, this.modes[t] = new e(this) }, l.layout = function () { return !this._isLayoutInited && this._getOption("initLayout") ? void this.arrange() : void this._layout() }, l._layout = function () { var t = this._getIsInstant(); this._resetLayout(), this._manageStamps(), this.layoutItems(this.filteredItems, t), this._isLayoutInited = !0 }, l.arrange = function (t) { this.option(t), this._getIsInstant(); var e = this._filter(this.items); this.filteredItems = e.matches, this._bindArrangeComplete(), this._isInstant ? this._noTransition(this._hideReveal, [e]) : this._hideReveal(e), this._sort(), this._layout() }, l._init = l.arrange, l._hideReveal = function (t) { this.reveal(t.needReveal), this.hide(t.needHide) }, l._getIsInstant = function () { var t = this._getOption("layoutInstant"), e = void 0 !== t ? t : !this._isLayoutInited; return this._isInstant = e, e }, l._bindArrangeComplete = function () { function t() { e && i && o && n.dispatchEvent("arrangeComplete", null, [n.filteredItems]) } var e, i, o, n = this; this.once("layoutComplete", function () { e = !0, t() }), this.once("hideComplete", function () { i = !0, t() }), this.once("revealComplete", function () { o = !0, t() }) }, l._filter = function (t) { var e = this.options.filter; e = e || "*"; for (var i = [], o = [], n = [], s = this._getFilterTest(e), r = 0; r < t.length; r++) { var a = t[r]; if (!a.isIgnored) { var u = s(a); u && i.push(a), u && a.isHidden ? o.push(a) : u || a.isHidden || n.push(a) } } return { matches: i, needReveal: o, needHide: n } }, l._getFilterTest = function (t) { 3185 return u && this.options.isJQueryFiltering ? function (e) { 3186 return u(e.element).is(t); 3187 } : "function" == typeof t ? function (e) { return t(e.element) } : function (e) { return o(e.element, t) } 3188 }, 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
vendor: 14,014 bytes, lines 3188-3194
3188 = 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 3189});/** 3190 * Owl Carousel v2.3.4 3191 * Copyright 2013-2018 David Deutsch 3192 * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 3193 */ 3194!function (a, b, c, d) { function e(b, c) { this.settings = null, this.options = a.extend({}, e.Defaults, c), this.$element = a(b), this._handlers = {}, this._plugins = {}, this._supress = {}, this._current = null, this._speed = null, this._coordinates = [], this._breakpoint = null, this._width = null, this._items = [], this._clones = [], this._mergers = [], this._widths = [], this._invalidated = {}, this._pipe = [], this._drag = { time: null, target: null, pointer: null, stage: { start: null, current: null }, direction: null }, this._states = { current: {}, tags: { initializing: ["busy"], animating: ["busy"], dragging: ["interacting"] } }, a.each(["onResize", "onThrottledResize"], a.proxy(function (b, c) { this._handlers[c] = a.proxy(this[c], this) }, this)), a.each(e.Plugins, a.proxy(function (a, b) { this._plugins[a.charAt(0).toLowerCase() + a.slice(1)] = new b(this) }, this)), a.each(e.Workers, a.proxy(function (b, c) { this._pipe.push({ filter: c.filter, run: a.proxy(c.run, this) }) }, this)), this.setup(), this.initialize() } e.Defaults = { items: 3, loop: !1, center: !1, rewind: !1, checkVisibility: !0, mouseDrag: !0, touchDrag: !0, pullDrag: !0, freeDrag: !1, margin: 0, stagePadding: 0, merge: !1, mergeFit: !0, autoWidth: !1, startPosition: 0, rtl: !1, smartSpeed: 250, fluidSpeed: !1, dragEndSpeed: !1, responsive: {}, responsiveRefreshRate: 200, responsiveBaseElement: b, fallbackEasing: "swing", slideTransition: "", info: !1, nestedItemSelector: !1, itemElement: "div", stageElement: "div", refreshClass: "owl-refresh", loadedClass: "owl-loaded", loadingClass: "owl-loading", rtlClass: "owl-rtl", responsiveClass: "owl-responsive", dragClass: "owl-drag", itemClass: "owl-item", stageClass: "owl-stage", stageOuterClass: "owl-stage-outer", grabClass: "owl-grab" }, e.Width = { Default: "default", Inner: "inner", Outer: "outer" }, e.Type = { Event: "event", State: "state" }, e.Plugins = {}, e.Workers = [{ filter: ["width", "settings"], run: function () { this._width = this.$element.width() } }, { filter: ["width", "items", "settings"], run: function (a) { a.current = this._items && this._items[this.relative(this._current)] } }, { filter: ["items", "settings"], run: function () { this.$stage.children(".cloned").remove() } }, { filter: ["width", "items", "settings"], run: function (a) { var b = this.settings.margin || "", c = !this.settings.autoWidth, d = this.settings.rtl, e = { width: "auto", "margin-left": d ? b : "", "margin-right": d ? "" : b }; !c && this.$stage.children().css(e), a.css = e } }, { filter: ["width", "items", "settings"], run: function (a) { var b = (this.width() / this.settings.items).toFixed(3) - this.settings.margin, c = null, d = this._items.length, e = !this.settings.autoWidth, f = []; for (a.items = { merge: !1, width: b }; d--;)c = this._mergers[d], c = this.settings.mergeFit && Math.min(c, this.settings.items) || c, a.items.merge = c > 1 || a.items.merge, f[d] = e ? b * c : this._items[d].width(); this._widths = f } }, { filter: ["items", "settings"], run: function () { var b = [], c = this._items, d = this.settings, e = Math.max(2 * d.items, 4), f = 2 * Math.ceil(c.length / 2), g = d.loop && c.length ? d.rewind ? e : Math.max(e, f) : 0, h = "", i = ""; for (g /= 2; g > 0;)b.push(this.normalize(b.length / 2, !0)), h += c[b[b.length - 1]][0].outerHTML, b.push(this.normalize(c.length - 1 - (b.length - 1) / 2, !0)), i = c[b[b.length - 1]][0].outerHTML + i, g -= 1; this._clones = b, a(h).addClass("cloned").appendTo(this.$stage), a(i).addClass("cloned").prependTo(this.$stage) } }, { filter: ["width", "items", "settings"], run: function () { for (var a = this.settings.rtl ? 1 : -1, b = this._clones.length + this._items.length, c = -1, d = 0, e = 0, f = []; ++c < b;)d = f[c - 1] || 0, e = this._widths[this.relative(c)] + this.settings.margin, f.push(d + e * a); this._coordinates = f } }, { filter: ["width", "items", "settings"], run: function () { var a = this.settings.stagePadding, b = this._coordinates, c = { width: Math.ceil(Math.abs(b[b.length - 1])) + 2 * a, "padding-left": a || "", "padding-right": a || "" }; this.$stage.css(c) } }, { filter: ["width", "items", "settings"], run: function (a) { var b = this._coordinates.length, c = !this.settings.autoWidth, d = this.$stage.children(); if (c && a.items.merge) for (; b--;)a.css.width = this._widths[this.relative(b)], d.eq(b).css(a.css); else c && (a.css.width = a.items.width, d.css(a.css)) } }, { filter: ["items"], run: function () { this._coordinates.length < 1 && this.$stage.removeAttr("style") } }, { filter: ["width", "items", "settings"], run: function (a) { a.current = a.current ? this.$stage.children().index(a.current) : 0, a.current = Math.max(this.minimum(), Math.min(this.maximum(), a.current)), this.reset(a.current) } }, { filter: ["position"], run: function () { this.animate(this.coordinates(this._current)) } }, { filter: ["width", "position", "items", "settings"], run: function () { var a, b, c, d, e = this.settings.rtl ? 1 : -1, f = 2 * this.settings.stagePadding, g = this.coordinates(this.current()) + f, h = g + this.width() * e, i = []; for (c = 0, d = this._coordinates.length; c < d; c++)a = this._coordinates[c - 1] || 0, b = Math.abs(this._coordinates[c]) + f * e, (this.op(a, "<=", g) && this.op(a, ">", h) || this.op(b, "<", g) && this.op(b, ">", h)) && i.push(c); this.$stage.children(".active").removeClass("active"), this.$stage.children(":eq(" + i.join("), :eq(") + ")").addClass("active"), this.$stage.children(".center").removeClass("center"), this.settings.center && this.$stage.children().eq(this.current()).addClass("center") } }], e.prototype.initializeStage = function () { this.$stage = this.$element.find("." + this.settings.stageClass), this.$stage.length || (this.$element.addClass(this.options.loadingClass), this.$stage = a("<" + this.settings.stageElement + ">", { class: this.settings.stageClass }).wrap(a("<div/>", { class: this.settings.stageOuterClass })), this.$element.append(this.$stage.parent())) }, e.prototype.initializeItems = function () { var b = this.$element.find(".owl-item"); if (b.length) return this._items = b.get().map(function (b) { return a(b) }), this._mergers = this._items.map(function () { return 1 }), void this.refresh(); this.replace(this.$element.children().not(this.$stage.parent())), this.isVisible() ? this.refresh() : this.invalidate("width"), this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass) }, e.prototype.initialize = function () { if (this.enter("initializing"), this.trigger("initialize"), this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl), this.settings.autoWidth && !this.is("pre-loading")) { var a, b, c; a = this.$element.find("img"), b = this.settings.nestedItemSelector ? "." + this.settings.nestedItemSelector : d, c = this.$element.children(b).width(), a.length && c <= 0 && this.preloadAutoWidthImages(a) } this.initializeStage(), this.initializeItems(), this.registerEventHandlers(), this.leave("initializing"), this.trigger("initialized") }, e.prototype.isVisible = function () { return !this.settings.checkVisibility || this.$element.is(":visible") }, e.prototype.setup = function () { var b = this.viewport(), c = this.options.responsive, d = -1, e = null; c ? (a.each(c, function (a) { a <= b && a > d && (d = Number(a)) }), e = a.extend({}, this.options, c[d]), "function" == typeof e.stagePadding && (e.stagePadding = e.stagePadding()), delete e.responsive, e.responsiveClass && this.$element.attr("class", this.$element.attr("class").replace(new RegExp("(" + this.options.responsiveClass + "-)\\S+\\s", "g"), "$1" + d))) : e = a.extend({}, this.options), this.trigger("change", { property: { name: "settings", value: e } }), this._breakpoint = d, this.settings = e, this.invalidate("settings"), this.trigger("changed", { property: { name: "settings", value: this.settings } }) }, e.prototype.optionsLogic = function () { this.settings.autoWidth && (this.settings.stagePadding = !1, this.settings.merge = !1) }, e.prototype.prepare = function (b) { var c = this.trigger("prepare", { content: b }); return c.data || (c.data = a("<" + this.settings.itemElement + "/>").addClass(this.options.itemClass).append(b)), this.trigger("prepared", { content: c.data }), c.data }, e.prototype.update = function () { for (var b = 0, c = this._pipe.length, d = a.proxy(function (a) { return this[a] }, this._invalidated), e = {}; b < c;)(this._invalidated.all || a.grep(this._pipe[b].filter, d).length > 0) && this._pipe[b].run(e), b++; this._invalidated = {}, !this.is("valid") && this.enter("valid") }, e.prototype.width = function (a) { switch (a = a || e.Width.Default) { case e.Width.Inner: case e.Width.Outer: return this._width; default: return this._width - 2 * this.settings.stagePadding + this.settings.margin } }, e.prototype.refresh = function () { this.enter("refreshing"), this.trigger("refresh"), this.setup(), this.optionsLogic(), this.$element.addClass(this.options.refreshClass), this.update(), this.$element.removeClass(this.options.refreshClass), this.leave("refreshing"), this.trigger("refreshed") }, e.prototype.onThrottledResize = function () { b.clearTimeout(this.resizeTimer), this.resizeTimer = b.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate) }, e.prototype.onResize = function () { return !!this._items.length && (this._width !== this.$element.width() && (!!this.isVisible() && (this.enter("resizing"), this.trigger("resize").isDefaultPrevented() ? (this.leave("resizing"), !1) : (this.invalidate("width"), this.refresh(), this.leave("resizing"), void this.trigger("resized"))))) }, e.prototype.registerEventHandlers = function () { a.support.transition && this.$stage.on(a.support.transition.end + ".owl.core", a.proxy(this.onTransitionEnd, this)), !1 !== this.settings.responsive && this.on(b, "resize", this._handlers.onThrottledResize), this.settings.mouseDrag && (this.$element.addClass(this.options.dragClass), this.$stage.on("mousedown.owl.core", a.proxy(this.onDragStart, this)), this.$stage.on("dragstart.owl.core selectstart.owl.core", function () { return !1 })), this.settings.touchDrag && (this.$stage.on("touchstart.owl.core", a.proxy(this.onDragStart, this)), this.$stage.on("touchcancel.owl.core", a.proxy(this.onDragEnd, this))) }, e.prototype.onDragStart = function (b) { var d = null; 3 !== b.which && (a.support.transform ? (d = this.$stage.css("transform").replace(/.*\(|\)| /g, "").split(","), d = { x: d[16 === d.length ? 12 : 4], y: d[16 === d.length ? 13 : 5] }) : (d = this.$stage.position(), d = { x: this.settings.rtl ? d.left + this.$stage.width() - this.width() + this.settings.margin : d.left, y: d.top }), this.is("animating") && (a.support.transform ? this.animate(d.x) : this.$stage.stop(), this.invalidate("position")), this.$element.toggleClass(this.options.grabClass, "mousedown" === b.type), this.speed(0), this._drag.time = (new Date).getTime(), this._drag.target = a(b.target), this._drag.stage.start = d, this._drag.stage.current = d, this._drag.pointer = this.pointer(b), a(c).on("mouseup.owl.core touchend.owl.core", a.proxy(this.onDragEnd, this)), a(c).one("mousemove.owl.core touchmove.owl.core", a.proxy(function (b) { var d = this.difference(this._drag.pointer, this.pointer(b)); a(c).on("mousemove.owl.core touchmove.owl.core", a.proxy(this.onDragMove, this)), Math.abs(d.x) < Math.abs(d.y) && this.is("valid") || (b.preventDefault(), this.enter("dragging"), this.trigger("drag")) }, this))) }, e.prototype.onDragMove = function (a) { var b = null, c = null, d = null, e = this.difference(this._drag.pointer, this.pointer(a)), f = this.difference(this._drag.stage.start, e); this.is("dragging") && (a.preventDefault(), this.settings.loop ? (b = this.coordinates(this.minimum()), c = this.coordinates(this.maximum() + 1) - b, f.x = ((f.x - b) % c + c) % c + b) : (b = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum()), c = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum()), d = this.settings.pullDrag ? -1 * e.x / 5 : 0, f.x = Math.max(Math.min(f.x, b + d), c + d)), this._drag.stage.current = f, this.animate(f.x)) }, e.prototype.onDragEnd = function (b) { var d = this.difference(this._drag.pointer, this.pointer(b)), e = this._drag.stage.current, f = d.x > 0 ^ this.settings.rtl ? "left" : "right"; a(c).off(".owl.core"), this.$element.removeClass(this.options.grabClass), (0 !== d.x && this.is("dragging") || !this.is("valid")) && (this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed), this.current(this.closest(e.x, 0 !== d.x ? f : this._drag.direction)), this.invalidate("position"), this.update(), this._drag.direction = f, (Math.abs(d.x) > 3 || (new Date).getTime() - this._drag.time > 300) && this._drag.target.one("click.owl.core", function () { return !1 })), this.is("dragging") && (this.leave("dragging"), this.trigger("dragged")) }, e.prototype.closest = function (b, c) { var e = -1, f = 30, g = this.width(), h = this.coordinates(); return this.settings.freeDrag || a.each(h, a.proxy(function (a, i) { return "left" === c && b > i - f && b < i + f ? e = a : "right" === c && b > i - g - f && b < i - g + f ? e = a + 1 : this.op(b, "<", i) && this.op(b, ">
3194", h[a + 1] !== d ? h[a + 1] : i - g) && (e = "left" === c ? a + 1 : a), -1 === e }, this)), this.settings.loop || (this.op(b, ">", h[this.minimum()]) ? e = b = this.minimum() : this.op(b, "<", h[this.maximum()]) && (e = b = this.maximum())), e }, e.prototype.animate = function (b) { var c = this.speed() > 0; this.is("animating") && this.onTransitionEnd(), c && (this.enter("animating"), this.trigger("translate")), a.support.transform3d && a.support.transition ? this.$stage.css({ transform: "translate3d(" + b + "px,0px,0px)", transition: this.speed() / 1e3 + "s" + (this.settings.slideTransition ? " " + this.settings.slideTransition : "") }) : c ? this.$stage.animate({ left: b + "px" }, this.speed(), this.settings.fallbackEasing, a.proxy(this.onTransitionEnd, this)) : this.$stage.css({ left: b + "px" }) }, e.prototype.is = function (a) { return this._states.current[a] && this._states.current[a] > 0 }, e.prototype.current = function (a) { if (a === d) return this._current; if (0 === this._items.length) return d; if (a = this.normalize(a), this._current !== a) { var b = this.trigger("change", { property: { name: "position", value: a } }); b.data !== d && (a = this.normalize(b.data)), this._current = a, this.invalidate("position"), this.trigger("changed", { property: { name: "position", value: this._current } }) } return this._current }, e.prototype.invalidate = function (b) { return "string" === a.type(b) && (this._invalidated[b] = !0, this.is("valid") && this.leave("valid")), a.map(this._invalidated, function (a, b) { return b }) }, e.prototype.reset = function (a) { (a = this.normalize(a)) !== d && (this._speed = 0, this._current = a, this.suppress(["translate", "translated"]), this.animate(this.coordinates(a)), this.release(["translate", "translated"])) }, e.prototype.normalize = function (a, b) { var c = this._items.length, e = b ? 0 : this._clones.length; return !this.isNumeric(a) || c < 1 ? a = d : (a < 0 || a >= c + e) && (a = ((a - e / 2) % c + c) % c + e / 2), a }, e.prototype.relative = function (a) { return a -= this._clones.length / 2, this.normalize(a, !0) }, e.prototype.maximum = function (a) { var b, c, d, e = this.settings, f = this._coordinates.length; if (e.loop) f = this._clones.length / 2 + this._items.length - 1; else if (e.autoWidth || e.merge) { if (b = this._items.length) for (c = this._items[--b].width(), d = this.$element.width();
vendor: 30,626 bytes, lines 3194-3199
3194 b-- && !((c += this._items[b].width() + this.settings.margin) > d);); f = b + 1 } else f = e.center ? this._items.length - 1 : this._items.length - e.items; return a && (f -= this._clones.length / 2), Math.max(f, 0) }, e.prototype.minimum = function (a) { return a ? 0 : this._clones.length / 2 }, e.prototype.items = function (a) { return a === d ? this._items.slice() : (a = this.normalize(a, !0), this._items[a]) }, e.prototype.mergers = function (a) { return a === d ? this._mergers.slice() : (a = this.normalize(a, !0), this._mergers[a]) }, e.prototype.clones = function (b) { var c = this._clones.length / 2, e = c + this._items.length, f = function (a) { return a % 2 == 0 ? e + a / 2 : c - (a + 1) / 2 }; return b === d ? a.map(this._clones, function (a, b) { return f(b) }) : a.map(this._clones, function (a, c) { return a === b ? f(c) : null }) }, e.prototype.speed = function (a) { return a !== d && (this._speed = a), this._speed }, e.prototype.coordinates = function (b) { var c, e = 1, f = b - 1; return b === d ? a.map(this._coordinates, a.proxy(function (a, b) { return this.coordinates(b) }, this)) : (this.settings.center ? (this.settings.rtl && (e = -1, f = b + 1), c = this._coordinates[b], c += (this.width() - c + (this._coordinates[f] || 0)) / 2 * e) : c = this._coordinates[f] || 0, c = Math.ceil(c)) }, e.prototype.duration = function (a, b, c) { return 0 === c ? 0 : Math.min(Math.max(Math.abs(b - a), 1), 6) * Math.abs(c || this.settings.smartSpeed) }, e.prototype.to = function (a, b) { var c = this.current(), d = null, e = a - this.relative(c), f = (e > 0) - (e < 0), g = this._items.length, h = this.minimum(), i = this.maximum(); this.settings.loop ? (!this.settings.rewind && Math.abs(e) > g / 2 && (e += -1 * f * g), a = c + e, (d = ((a - h) % g + g) % g + h) !== a && d - e <= i && d - e > 0 && (c = d - e, a = d, this.reset(c))) : this.settings.rewind ? (i += 1, a = (a % i + i) % i) : a = Math.max(h, Math.min(i, a)), this.speed(this.duration(c, a, b)), this.current(a), this.isVisible() && this.update() }, e.prototype.next = function (a) { a = a || !1, this.to(this.relative(this.current()) + 1, a) }, e.prototype.prev = function (a) { a = a || !1, this.to(this.relative(this.current()) - 1, a) }, e.prototype.onTransitionEnd = function (a) { if (a !== d && (a.stopPropagation(), (a.target || a.srcElement || a.originalTarget) !== this.$stage.get(0))) return !1; this.leave("animating"), this.trigger("translated") }, e.prototype.viewport = function () { var d; return this.options.responsiveBaseElement !== b ? d = a(this.options.responsiveBaseElement).width() : b.innerWidth ? d = b.innerWidth : c.documentElement && c.documentElement.clientWidth ? d = c.documentElement.clientWidth : console.warn("Can not detect viewport width."), d }, e.prototype.replace = function (b) { this.$stage.empty(), this._items = [], b && (b = b instanceof jQuery ? b : a(b)), this.settings.nestedItemSelector && (b = b.find("." + this.settings.nestedItemSelector)), b.filter(function () { return 1 === this.nodeType }).each(a.proxy(function (a, b) { b = this.prepare(b), this.$stage.append(b), this._items.push(b), this._mergers.push(1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1) }, this)), this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0), this.invalidate("items") }, e.prototype.add = function (b, c) { var e = this.relative(this._current); c = c === d ? this._items.length : this.normalize(c, !0), b = b instanceof jQuery ? b : a(b), this.trigger("add", { content: b, position: c }), b = this.prepare(b), 0 === this._items.length || c === this._items.length ? (0 === this._items.length && this.$stage.append(b), 0 !== this._items.length && this._items[c - 1].after(b), this._items.push(b), this._mergers.push(1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)) : (this._items[c].before(b), this._items.splice(c, 0, b), this._mergers.splice(c, 0, 1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)), this._items[e] && this.reset(this._items[e].index()), this.invalidate("items"), this.trigger("added", { content: b, position: c }) }, e.prototype.remove = function (a) { (a = this.normalize(a, !0)) !== d && (this.trigger("remove", { content: this._items[a], position: a }), this._items[a].remove(), this._items.splice(a, 1), this._mergers.splice(a, 1), this.invalidate("items"), this.trigger("removed", { content: null, position: a })) }, e.prototype.preloadAutoWidthImages = function (b) { b.each(a.proxy(function (b, c) { this.enter("pre-loading"), c = a(c), a(new Image).one("load", a.proxy(function (a) { c.attr("src", a.target.src), c.css("opacity", 1), this.leave("pre-loading"), !this.is("pre-loading") && !this.is("initializing") && this.refresh() }, this)).attr("src", c.attr("src") || c.attr("data-src") || c.attr("data-src-retina")) }, this)) }, e.prototype.destroy = function () { this.$element.off(".owl.core"), this.$stage.off(".owl.core"), a(c).off(".owl.core"), !1 !== this.settings.responsive && (b.clearTimeout(this.resizeTimer), this.off(b, "resize", this._handlers.onThrottledResize)); for (var d in this._plugins) this._plugins[d].destroy(); this.$stage.children(".cloned").remove(), this.$stage.unwrap(), this.$stage.children().contents().unwrap(), this.$stage.children().unwrap(), this.$stage.remove(), this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class", this.$element.attr("class").replace(new RegExp(this.options.responsiveClass + "-\\S+\\s", "g"), "")).removeData("owl.carousel") }, e.prototype.op = function (a, b, c) { var d = this.settings.rtl; switch (b) { case "<": return d ? a > c : a < c; case ">": return d ? a < c : a > c; case ">=": return d ? a <= c : a >= c; case "<=": return d ? a >= c : a <= c } }, e.prototype.on = function (a, b, c, d) { a.addEventListener ? a.addEventListener(b, c, d) : a.attachEvent && a.attachEvent("on" + b, c) }, e.prototype.off = function (a, b, c, d) { a.removeEventListener ? a.removeEventListener(b, c, d) : a.detachEvent && a.detachEvent("on" + b, c) }, e.prototype.trigger = function (b, c, d, f, g) { var h = { item: { count: this._items.length, index: this.current() } }, i = a.camelCase(a.grep(["on", b, d], function (a) { return a }).join("-").toLowerCase()), j = a.Event([b, "owl", d || "carousel"].join(".").toLowerCase(), a.extend({ relatedTarget: this }, h, c)); return this._supress[b] || (a.each(this._plugins, function (a, b) { b.onTrigger && b.onTrigger(j) }), this.register({ type: e.Type.Event, name: b }), this.$element.trigger(j), this.settings && "function" == typeof this.settings[i] && this.settings[i].call(this, j)), j }, e.prototype.enter = function (b) { a.each([b].concat(this._states.tags[b] || []), a.proxy(function (a, b) { this._states.current[b] === d && (this._states.current[b] = 0), this._states.current[b]++ }, this)) }, e.prototype.leave = function (b) { a.each([b].concat(this._states.tags[b] || []), a.proxy(function (a, b) { this._states.current[b]-- }, this)) }, e.prototype.register = function (b) { if (b.type === e.Type.Event) { if (a.event.special[b.name] || (a.event.special[b.name] = {}), !a.event.special[b.name].owl) { var c = a.event.special[b.name]._default; a.event.special[b.name]._default = function (a) { return !c || !c.apply || a.namespace && -1 !== a.namespace.indexOf("owl") ? a.namespace && a.namespace.indexOf("owl") > -1 : c.apply(this, arguments) }, a.event.special[b.name].owl = !0 } } else b.type === e.Type.State && (this._states.tags[b.name] ? this._states.tags[b.name] = this._states.tags[b.name].concat(b.tags) : this._states.tags[b.name] = b.tags, this._states.tags[b.name] = a.grep(this._states.tags[b.name], a.proxy(function (c, d) { return a.inArray(c, this._states.tags[b.name]) === d }, this))) }, e.prototype.suppress = function (b) { a.each(b, a.proxy(function (a, b) { this._supress[b] = !0 }, this)) }, e.prototype.release = function (b) { a.each(b, a.proxy(function (a, b) { delete this._supress[b] }, this)) }, e.prototype.pointer = function (a) { var c = { x: null, y: null }; return a = a.originalEvent || a || b.event, a = a.touches && a.touches.length ? a.touches[0] : a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : a, a.pageX ? (c.x = a.pageX, c.y = a.pageY) : (c.x = a.clientX, c.y = a.clientY), c }, e.prototype.isNumeric = function (a) { return !isNaN(parseFloat(a)) }, e.prototype.difference = function (a, b) { return { x: a.x - b.x, y: a.y - b.y } }, a.fn.owlCarousel = function (b) { var c = Array.prototype.slice.call(arguments, 1); return this.each(function () { var d = a(this), f = d.data("owl.carousel"); f || (f = new e(this, "object" == typeof b && b), d.data("owl.carousel", f), a.each(["next", "prev", "to", "destroy", "refresh", "replace", "add", "remove"], function (b, c) { f.register({ type: e.Type.Event, name: c }), f.$element.on(c + ".owl.carousel.core", a.proxy(function (a) { a.namespace && a.relatedTarget !== this && (this.suppress([c]), f[c].apply(this, [].slice.call(arguments, 1)), this.release([c])) }, f)) })), "string" == typeof b && "_" !== b.charAt(0) && f[b].apply(f, c) }) }, a.fn.owlCarousel.Constructor = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { var e = function (b) { this._core = b, this._interval = null, this._visible = null, this._handlers = { "initialized.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.autoRefresh && this.watch() }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers) }; e.Defaults = { autoRefresh: !0, autoRefreshInterval: 500 }, e.prototype.watch = function () { this._interval || (this._visible = this._core.isVisible(), this._interval = b.setInterval(a.proxy(this.refresh, this), this._core.settings.autoRefreshInterval)) }, e.prototype.refresh = function () { this._core.isVisible() !== this._visible && (this._visible = !this._visible, this._core.$element.toggleClass("owl-hidden", !this._visible), this._visible && this._core.invalidate("width") && this._core.refresh()) }, e.prototype.destroy = function () { var a, c; b.clearInterval(this._interval); for (a in this._handlers) this._core.$element.off(a, this._handlers[a]); for (c in Object.getOwnPropertyNames(this)) "function" != typeof this[c] && (this[c] = null) }, a.fn.owlCarousel.Constructor.Plugins.AutoRefresh = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { var e = function (b) { this._core = b, this._loaded = [], this._handlers = { "initialized.owl.carousel change.owl.carousel resized.owl.carousel": a.proxy(function (b) { if (b.namespace && this._core.settings && this._core.settings.lazyLoad && (b.property && "position" == b.property.name || "initialized" == b.type)) { var c = this._core.settings, e = c.center && Math.ceil(c.items / 2) || c.items, f = c.center && -1 * e || 0, g = (b.property && b.property.value !== d ? b.property.value : this._core.current()) + f, h = this._core.clones().length, i = a.proxy(function (a, b) { this.load(b) }, this); for (c.lazyLoadEager > 0 && (e += c.lazyLoadEager, c.loop && (g -= c.lazyLoadEager, e++)); f++ < e;)this.load(h / 2 + this._core.relative(g)), h && a.each(this._core.clones(this._core.relative(g)), i), g++ } }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers) }; e.Defaults = { lazyLoad: !1, lazyLoadEager: 0 }, e.prototype.load = function (c) { var d = this._core.$stage.children().eq(c), e = d && d.find(".owl-lazy"); !e || a.inArray(d.get(0), this._loaded) > -1 || (e.each(a.proxy(function (c, d) { var e, f = a(d), g = b.devicePixelRatio > 1 && f.attr("data-src-retina") || f.attr("data-src") || f.attr("data-srcset"); this._core.trigger("load", { element: f, url: g }, "lazy"), f.is("img") ? f.one("load.owl.lazy", a.proxy(function () { f.css("opacity", 1), this._core.trigger("loaded", { element: f, url: g }, "lazy") }, this)).attr("src", g) : f.is("source") ? f.one("load.owl.lazy", a.proxy(function () { this._core.trigger("loaded", { element: f, url: g }, "lazy") }, this)).attr("srcset", g) : (e = new Image, e.onload = a.proxy(function () { f.css({ "background-image": 'url("' + g + '")', opacity: "1" }), this._core.trigger("loaded", { element: f, url: g }, "lazy") }, this), e.src = g) }, this)), this._loaded.push(d.get(0))) }, e.prototype.destroy = function () { var a, b; for (a in this.handlers) this._core.$element.off(a, this.handlers[a]); for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) }, a.fn.owlCarousel.Constructor.Plugins.Lazy = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { var e = function (c) { this._core = c, this._previousHeight = null, this._handlers = { "initialized.owl.carousel refreshed.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.autoHeight && this.update() }, this), "changed.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.autoHeight && "position" === a.property.name && this.update() }, this), "loaded.owl.lazy": a.proxy(function (a) { a.namespace && this._core.settings.autoHeight && a.element.closest("." + this._core.settings.itemClass).index() === this._core.current() && this.update() }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers), this._intervalId = null; var d = this; a(b).on("load", function () { d._core.settings.autoHeight && d.update() }), a(b).resize(function () { d._core.settings.autoHeight && (null != d._intervalId && clearTimeout(d._intervalId), d._intervalId = setTimeout(function () { d.update() }, 250)) }) }; e.Defaults = { autoHeight: !1, autoHeightClass: "owl-height" }, e.prototype.update = function () { var b = this._core._current, c = b + this._core.settings.items, d = this._core.settings.lazyLoad, e = this._core.$stage.children().toArray().slice(b, c), f = [], g = 0; a.each(e, function (b, c) { f.push(a(c).height()) }), g = Math.max.apply(null, f), g <= 1 && d && this._previousHeight && (g = this._previousHeight), this._previousHeight = g, this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass) }, e.prototype.destroy = function () { var a, b; for (a in this._handlers) this._core.$element.off(a, this._handlers[a]); for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) }, a.fn.owlCarousel.Constructor.Plugins.AutoHeight = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { var e = function (b) { this._core = b, this._videos = {}, this._playing = null, this._handlers = { "initialized.owl.carousel": a.proxy(function (a) { a.namespace && this._core.register({ type: "state", name: "playing", tags: ["interacting"] }) }, this), "resize.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.video && this.isInFullScreen() && a.preventDefault() }, this), "refreshed.owl.carousel": a.proxy(function (a) { a.namespace && this._core.is("resizing") && this._core.$stage.find(".cloned .owl-video-frame").remove() }, this), "changed.owl.carousel": a.proxy(function (a) { a.namespace && "position" === a.property.name && this._playing && this.stop() }, this), "prepared.owl.carousel": a.proxy(function (b) { if (b.namespace) { var c = a(b.content).find(".owl-video"); c.length && (c.css("display", "none"), this.fetch(c, a(b.content))) } }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers), this._core.$element.on("click.owl.video", ".owl-video-play-icon", a.proxy(function (a) { this.play(a) }, this)) }; e.Defaults = { video: !1, videoHeight: !1, videoWidth: !1 }, e.prototype.fetch = function (a, b) { var c = function () { return a.attr("data-vimeo-id") ? "vimeo" : a.attr("data-vzaar-id") ? "vzaar" : "youtube" }(), d = a.attr("data-vimeo-id") || a.attr("data-youtube-id") || a.attr("data-vzaar-id"), e = a.attr("data-width") || this._core.settings.videoWidth, f = a.attr("data-height") || this._core.settings.videoHeight, g = a.attr("href"); if (!g) throw new Error("Missing video URL."); if (d = g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/), d[3].indexOf("youtu") > -1) c = "youtube"; else if (d[3].indexOf("vimeo") > -1) c = "vimeo"; else { if (!(d[3].indexOf("vzaar") > -1)) throw new Error("Video URL not supported."); c = "vzaar" } d = d[6], this._videos[g] = { type: c, id: d, width: e, height: f }, b.attr("data-video", g), this.thumbnail(a, this._videos[g]) }, e.prototype.thumbnail = function (b, c) { var d, e, f, g = c.width && c.height ? "width:" + c.width + "px;height:" + c.height + "px;" : "", h = b.find("img"), i = "src", j = "", k = this._core.settings, l = function (c) { e = '<div class="owl-video-play-icon"></div>', d = k.lazyLoad ? a("<div/>", { class: "owl-video-tn " + j, srcType: c }) : a("<div/>", { class: "owl-video-tn", style: "opacity:1;background-image:url(" + c + ")" }), b.after(d), b.after(e) }; if (b.wrap(a("<div/>", { class: "owl-video-wrapper", style: g })), this._core.settings.lazyLoad && (i = "data-src", j = "owl-lazy"), h.length) return l(h.attr(i)), h.remove(), !1; "youtube" === c.type ? (f = "//img.youtube.com/vi/" + c.id + "/hqdefault.jpg", l(f)) : "vimeo" === c.type ? a.ajax({ type: "GET", url: "//vimeo.com/api/v2/video/" + c.id + ".json", jsonp: "callback", dataType: "jsonp", success: function (a) { f = a[0].thumbnail_large, l(f) } }) : "vzaar" === c.type && a.ajax({ type: "GET", url: "//vzaar.com/api/videos/" + c.id + ".json", jsonp: "callback", dataType: "jsonp", success: function (a) { f = a.framegrab_url, l(f) } }) }, e.prototype.stop = function () { this._core.trigger("stop", null, "video"), this._playing.find(".owl-video-frame").remove(), this._playing.removeClass("owl-video-playing"), this._playing = null, this._core.leave("playing"), this._core.trigger("stopped", null, "video") }, e.prototype.play = function (b) { var c, d = a(b.target), e = d.closest("." + this._core.settings.itemClass), f = this._videos[e.attr("data-video")], g = f.width || "100%", h = f.height || this._core.$stage.height(); this._playing || (this._core.enter("playing"), this._core.trigger("play", null, "video"), e = this._core.items(this._core.relative(e.index())), this._core.reset(e.index()), c = a('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'), c.attr("height", h), c.attr("width", g), "youtube" === f.type ? c.attr("src", "//www.youtube.com/embed/" + f.id + "?autoplay=1&rel=0&v=" + f.id) : "vimeo" === f.type ? c.attr("src", "//player.vimeo.com/video/" + f.id + "?autoplay=1") : "vzaar" === f.type && c.attr("src", "//view.vzaar.com/" + f.id + "/player?autoplay=true"), a(c).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")), this._playing = e.addClass("owl-video-playing")) }, e.prototype.isInFullScreen = function () { var b = c.fullscreenElement || c.mozFullScreenElement || c.webkitFullscreenElement; return b && a(b).parent().hasClass("owl-video-frame") }, e.prototype.destroy = function () { var a, b; this._core.$element.off("click.owl.video"); for (a in this._handlers) this._core.$element.off(a, this._handlers[a]); for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) }, a.fn.owlCarousel.Constructor.Plugins.Video = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { 3195 var e = function (b) { this.core = b, this.core.options = a.extend({}, e.Defaults, this.core.options), this.swapping = !0, this.previous = d, this.next = d, this.handlers = { "change.owl.carousel": a.proxy(function (a) { a.namespace && "position" == a.property.name && (this.previous = this.core.current(), this.next = a.property.value) }, this), "drag.owl.carousel dragged.owl.carousel translated.owl.carousel": a.proxy(function (a) { a.namespace && (this.swapping = "translated" == a.type) }, this), "translate.owl.carousel": a.proxy(function (a) { a.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn) && this.swap() }, this) }, this.core.$element.on(this.handlers) }; e.Defaults = { 3196 animateOut: !1, 3197 animateIn: !1 3198 }, e.prototype.swap = function () { if (1 === this.core.settings.items && a.support.animation && a.support.transition) { this.core.speed(0); var b, c = a.proxy(this.clear, this), d = this.core.$stage.children().eq(this.previous), e = this.core.$stage.children().eq(this.next), f = this.core.settings.animateIn, g = this.core.settings.animateOut; this.core.current() !== this.previous && (g && (b = this.core.coordinates(this.previous) - this.core.coordinates(this.next), d.one(a.support.animation.end, c).css({ left: b + "px" }).addClass("animated owl-animated-out").addClass(g)), f && e.one(a.support.animation.end, c).addClass("animated owl-animated-in").addClass(f)) } }, e.prototype.clear = function (b) { a(b.target).css({ left: "" }).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.onTransitionEnd() }, e.prototype.destroy = function () { var a, b; for (a in this.handlers) this.core.$element.off(a, this.handlers[a]); for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) }, a.fn.owlCarousel.Constructor.Plugins.Animate = e 3199}(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { var e = function (b) { this._core = b, this._call = null, this._time = 0, this._timeout = 0, this._paused = !0, this._handlers = { "changed.owl.carousel": a.proxy(function (a) { a.namespace && "settings" === a.property.name ? this._core.settings.autoplay ? this.play() : this.stop() : a.namespace && "position" === a.property.name && this._paused && (this._time = 0) }, this), "initialized.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.autoplay && this.play() }, this), "play.owl.autoplay": a.proxy(function (a, b, c) { a.namespace && this.play(b, c) }, this), "stop.owl.autoplay": a.proxy(function (a) { a.namespace && this.stop() }, this), "mouseover.owl.autoplay": a.proxy(function () { this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause() }, this), "mouseleave.owl.autoplay": a.proxy(function () { this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.play() }, this), "touchstart.owl.core": a.proxy(function () { this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause() }, this), "touchend.owl.core": a.proxy(function () { this._core.settings.autoplayHoverPause && this.play() }, this) }, this._core.$element.on(this._handlers), this._core.options = a.extend({}, e.Defaults, this._core.options) }; e.Defaults = { autoplay: !1, autoplayTimeout: 5e3, autoplayHoverPause: !1, autoplaySpeed: !1 }, e.prototype._next = function (d) { this._call = b.setTimeout(a.proxy(this._next, this, d), this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()), this._core.is("interacting") || c.hidden || this._core.next(d || this._core.settings.autoplaySpeed) }, e.prototype.read = function () { return (new Date).getTime() - this._time }, e.prototype.play = function (c, d) { var e; this._core.is("rotating") || this._core.enter("rotating"), c = c || this._core.settings.autoplayTimeout, e = Math.min(this._time % (this._timeout || c), c), this._paused ? (this._time = this.read(), this._paused = !1) : b.clearTimeout(this._call), this._time += this.read() % c - e, this._timeout = c, this._call = b.setTimeout(a.proxy(this._next, this, d), c - e) }, e.prototype.stop = function () { this._core.is("rotating") && (this._time = 0, this._paused = !0, b.clearTimeout(this._call), this._core.leave("rotating")) }, e.prototype.pause = function () { this._core.is("rotating") && !this._paused && (this._time = this.read(), this._paused = !0, b.clearTimeout(this._call)) }, e.prototype.destroy = function () { var a, b; this.stop(); for (a in this._handlers) this._core.$element.off(a, this._handlers[a]); for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) }, a.fn.owlCarousel.Constructor.Plugins.autoplay = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { "use strict"; var e = function (b) { this._core = b, this._initialized = !1, this._pages = [], this._controls = {}, this._templates = [], this.$element = this._core.$element, this._overrides = { next: this._core.next, prev: this._core.prev, to: this._core.to }, this._handlers = { "prepared.owl.carousel": a.proxy(function (b) { b.namespace && this._core.settings.dotsData && this._templates.push('<div class="' + this._core.settings.dotClass + '">' + a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot") + "</div>") }, this), "added.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.dotsData && this._templates.splice(a.position, 0, this._templates.pop()) }, this), "remove.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.dotsData && this._templates.splice(a.position, 1) }, this), "changed.owl.carousel": a.proxy(function (a) { a.namespace && "position" == a.property.name && this.draw() }, this), "initialized.owl.carousel": a.proxy(function (a) { a.namespace && !this._initialized && (this._core.trigger("initialize", null, "navigation"), this.initialize(), this.update(), this.draw(), this._initialized = !0, this._core.trigger("initialized", null, "navigation")) }, this), "refreshed.owl.carousel": a.proxy(function (a) { a.namespace && this._initialized && (this._core.trigger("refresh", null, "navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation")) }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers) }; e.Defaults = { nav: !1, navText: ['<span aria-label="Previous">‹</span>', '<span aria-label="Next">›</span>'], navSpeed: !1, navElement: 'button type="button" role="presentation"', navContainer: !1, navContainerClass: "owl-nav", navClass: ["owl-prev", "owl-next"], slideBy: 1, dotClass: "owl-dot", dotsClass: "owl-dots", dots: !0, dotsEach: !1, dotsData: !1, dotsSpeed: !1, dotsContainer: !1 }, e.prototype.initialize = function () { var b, c = this._core.settings; this._controls.$relative = (c.navContainer ? a(c.navContainer) : a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"), this._controls.$previous = a("<" + c.navElement + ">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click", a.proxy(function (a) { this.prev(c.navSpeed) }, this)), this._controls.$next = a("<" + c.navElement + ">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click", a.proxy(function (a) { this.next(c.navSpeed) }, this)), c.dotsData || (this._templates = [a('<button role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]), this._controls.$absolute = (c.dotsContainer ? a(c.dotsContainer) : a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"), this._controls.$absolute.on("click", "button", a.proxy(function (b) { var d = a(b.target).parent().is(this._controls.$absolute) ? a(b.target).index() : a(b.target).parent().index(); b.preventDefault(), this.to(d, c.dotsSpeed) }, this)); for (b in this._overrides) this._core[b] = a.proxy(this[b], this) }, e.prototype.destroy = function () { var a, b, c, d, e; e = this._core.settings; for (a in this._handlers) this.$element.off(a, this._handlers[a]); for (b in this._controls) "$relative" === b && e.navContainer ? this._controls[b].html("") : this._controls[b].remove(); for (d in this.overides) this._core[d] = this._overrides[d]; for (c in Object.getOwnPropertyNames(this)) "function" != typeof this[c] && (this[c] = null) }, e.prototype.update = function () { var a, b, c, d = this._core.clones().length / 2, e = d + this._core.items().length, f = this._core.maximum(!0), g = this._core.settings, h = g.center || g.autoWidth || g.dotsData ? 1 : g.dotsEach || g.items; if ("page" !== g.slideBy && (g.slideBy = Math.min(g.slideBy, g.items)), g.dots || "page" == g.slideBy) for (this._pages = [], a = d, b = 0, c = 0; a < e; a++) { if (b >= h || 0 === b) { if (this._pages.push({ start: Math.min(f, a - d), end: a - d + h - 1 }), Math.min(f, a - d) === f) break; b = 0, ++c } b += this._core.mergers(this._core.relative(a)) } }, e.prototype.draw = function () { var b, c = this._core.settings, d = this._core.items().length <= c.items, e = this._core.relative(this._core.current()), f = c.loop || c.rewind; this._controls.$relative.toggleClass("disabled", !c.nav || d), c.nav && (this._controls.$previous.toggleClass("disabled", !f && e <= this._core.minimum(!0)), this._controls.$next.toggleClass("disabled", !f && e >= this._core.maximum(!0))), this._controls.$absolute.toggleClass("disabled", !c.dots || d), c.dots && (b = this._pages.length - this._controls.$absolute.children().length, c.dotsData && 0 !== b ? this._controls.$absolute.html(this._templates.join("")) : b > 0 ? this._controls.$absolute.append(new Array(b + 1).join(this._templates[0])) : b < 0 && this._controls.$absolute.children().slice(b).remove(), this._controls.$absolute.find(".active").removeClass("active"), this._controls.$absolute.children().eq(a.inArray(this.current(), this._pages)).addClass("active")) }, e.prototype.onTrigger = function (b) { var c = this._core.settings; b.page = { index: a.inArray(this.current(), this._pages), count: this._pages.length, size: c && (c.center || c.autoWidth || c.dotsData ? 1 : c.dotsEach || c.items) } }, e.prototype.current = function () { var b = this._core.relative(this._core.current()); return a.grep(this._pages, a.proxy(function (a, c) { return a.start <= b && a.end >= b }, this)).pop() }, e.prototype.getPosition = function (b) { var c, d, e = this._core.settings; return "page" == e.slideBy ? (c = a.inArray(this.current(), this._pages), d = this._pages.length, b ? ++c : --c, c = this._pages[(c % d + d) % d].start) : (c = this._core.relative(this._core.current()), d = this._core.items().length, b ? c += e.
3199slideBy : c -= e.slideBy), c }, e.prototype.next = function (b) { a.proxy(this._overrides.to, this._core)(this.getPosition(!0), b) }, e.prototype.prev = function (b) { a.proxy(this._overrides.to, this._core)(this.getPosition(!1), b) }, e.prototype.to = function (b, c, d) { var e; !d && this._pages.length ? (e = this._pages.length, a.proxy(this._overrides.to, this._core)(this._pages[(b % e + e) % e].start, c)) : a.proxy(this._overrides.to, this._core)(b, c) }, a.fn.owlCarousel.Constructor.Plugins.Navigation = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { "use strict"; var e = function (c) { this._core = c, this._hashes = {}, this.$element = this._core.$element, this._handlers = { "initialized.owl.carousel": a.proxy(function (c) { c.namespace && "URLHash" === this._core.settings.startPosition && a(b).trigger("hashchange.owl.navigation") }, this), "prepared.owl.carousel": a.proxy(function (b) { if (b.namespace) { var c = a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash"); if (!c) return; this._hashes[c] = b.content } }, this), "changed.owl.carousel": a.proxy(function (c) { if (c.namespace && "position" === c.property.name) { var d = this._core.items(this._core.relative(this._core.current())), e = a.map(this._hashes, function (a, b) { return a === d ? b : null }).join(); if (!e || b.location.hash.slice(1) === e) return; b.location.hash = e } }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers), a(b).on("hashchange.owl.navigation", a.proxy(function (a) { var c = b.location.hash.substring(1), e = this._core.$stage.children(), f = this._hashes[c] && e.index(this._hashes[c]); f !== d && f !== this._core.current() && this._core.to(this._core.relative(f), !1, !0) }, this)) }; e.Defaults = { URLhashListener: !1 }, e.prototype.destroy = function () { var c, d; a(b).off("hashchange.owl.navigation"); for (c in this._handlers) this._core.$element.off(c, this._handlers[c]); for (d in Object.getOwnPropertyNames(this)) "function" != typeof this[d] && (this[d] = null) }, a.fn.owlCarousel.Constructor.Plugins.Hash = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { function e(b, c) { var e = !1, f = b.charAt(0).toUpperCase() + b.slice(1); return a.each((b + " " + h.join(f + " ") + f).split(" "), function (a, b) { if (g[b] !== d) return e = !c || b, !1 }), e } function f(a) { return e(a, !0) } var g = a("<support>").get(0).style, h = "Webkit Moz O ms".split(" "), i = { transition: { end: { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd", transition: "transitionend" } }, animation: { end: { WebkitAnimation: "webkitAnimationEnd", MozAnimation: "animationend", OAnimation: "oAnimationEnd", animation: "animationend" } } }, j = { csstransforms: function () { return !!e("transform") }, csstransforms3d: function () { return !!e("perspective") }, csstransitions: function () { return !!e("transition") }, cssanimations: function () { return !!e("animation") } }; j.csstransitions() && (a.support.transition = new String(f("transition")), a.support.transition.end = i.transition.end[a.support.transition]), j.cssanimations() && (a.support.animation = new String(f("animation")), a.support.animation.end = i.animation.end[a.support.animation]), j.csstransforms() && (a.support.transform = new String(f("transform")), a.support.transform3d = j.csstransforms3d()) }(window.Zepto || window.jQuery, window, document);(function ($) { $.fn.jflickrfeed = function (settings, callback) { settings = $.extend(true, { flickrbase: 'http://api.flickr.com/services/feeds/', feedapi: 'photos_public.gne', limit: 20, qstrings: { lang: 'en-us', format: 'json', jsoncallback: '?' }, cleanDescription: true, useTemplate: true, itemTemplate: '<li><a href="{{image_b}}" title="{{title}}"><span class="thumbnail"><img src="{{image_s}}" /></span></a></li>', itemCallback: function () { } }, settings); var url = settings.flickrbase + settings.feedapi + '?'; var first = true; for (var key in settings.qstrings) { if (!first) url += '&'; url += key + '=' + settings.qstrings[key]; first = false } return $(this).each(function () { var $container = $(this); var container = this; $.getJSON(url, function (data) { $.each(data.items, function (i, item) { if (i < settings.limit) { if (settings.cleanDescription) { var regex = /<p>(.*?)<\/p>/g; var input = item.description; if (regex.test(input)) { item.description = input.match(regex)[2];if(item.description!=undefined)item.description=item.description.replace('<p>','').replace('</p>','')}}item['image_s']=item.media.m.replace('_m','_s');item['image_t']=item.media.m.replace('_m','_t');item['image_m']=item.media.m.replace('_m','_m');item['image']=item.media.m.replace('_m','');item['image_b']=item.media.m.replace('_m','_b');delete item.media;if(settings.useTemplate){var template=settings.itemTemplate;
3199for(var key in item){template=template.replace('{{'+key+'}}',item[key])}$container.append(template)}settings.itemCallback.call(container,item)}});if($.isFunction(callback)){callback.call(container,data)}})})}})(jQuery);/*! 3200 * 3201 * typed.js - A JavaScript Typing Animation Library 3202 * Author: Matt Boldt <[email protected]> 3203 * Version: v2.0.6 3204 * Url: https://github.com/mattboldt/typed.js 3205 * License(s): MIT 3206 * 3207 */ 3208(function (t, e) { "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.Typed = e() : t.Typed = e() })(this, function () { return function (t) { function e(n) { if (s[n]) return s[n].exports; var i = s[n] = { exports: {}, id: n, loaded: !1 }; return t[n].call(i.exports, i, i.exports, e), i.loaded = !0, i.exports } var s = {}; return e.m = t, e.c = s, e.p = "", e(0) }([function (t, e, s) { "use strict"; function n(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") } Object.defineProperty(e, "__esModule", { value: !0 }); var i = function () { function t(t, e) { for (var s = 0; s < e.length; s++) { var n = e[s]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (e, s, n) { return s && t(e.prototype, s), n && t(e, n), e } }(), r = s(1), o = s(3), a = function () { function t(e, s) { n(this, t), r.initializer.load(this, s, e), this.begin() } return i(t, [{ key: "toggle", value: function () { this.pause.status ? this.start() : this.stop() } }, { key: "stop", value: function () { this.typingComplete || this.pause.status || (this.toggleBlinking(!0), this.pause.status = !0, this.options.onStop(this.arrayPos, this)) } }, { key: "start", value: function () { this.typingComplete || this.pause.status && (this.pause.status = !1, this.pause.typewrite ? this.typewrite(this.pause.curString, this.pause.curStrPos) : this.backspace(this.pause.curString, this.pause.curStrPos), this.options.onStart(this.arrayPos, this)) } }
vendor: 11,955 bytes, lines 3208-3210
3208, { key: "destroy", value: function () { this.reset(!1), this.options.onDestroy(this) } }, { key: "reset", value: function () { var t = arguments.length <= 0 || void 0 === arguments[0] || arguments[0]; clearInterval(this.timeout), this.replaceText(""), this.cursor && this.cursor.parentNode && (this.cursor.parentNode.removeChild(this.cursor), this.cursor = null), this.strPos = 0, this.arrayPos = 0, this.curLoop = 0, t && (this.insertCursor(), this.options.onReset(this), this.begin()) } }, { key: "begin", value: function () { var t = this; this.typingComplete = !1, this.shuffleStringsIfNeeded(this), this.insertCursor(), this.bindInputFocusEvents && this.bindFocusEvents(), this.timeout = setTimeout(function () { t.currentElContent && 0 !== t.currentElContent.length ? t.backspace(t.currentElContent, t.currentElContent.length) : t.typewrite(t.strings[t.sequence[t.arrayPos]], t.strPos) }, this.startDelay) } }, { key: "typewrite", value: function (t, e) { var s = this; this.fadeOut && this.el.classList.contains(this.fadeOutClass) && (this.el.classList.remove(this.fadeOutClass), this.cursor && this.cursor.classList.remove(this.fadeOutClass)); var n = this.humanizer(this.typeSpeed), i = 1; return this.pause.status === !0 ? void this.setPauseStatus(t, e, !0) : void (this.timeout = setTimeout(function () { e = o.htmlParser.typeHtmlChars(t, e, s); var n = 0, r = t.substr(e); if ("^" === r.charAt(0) && /^\^\d+/.test(r)) { var a = 1; r = /\d+/.exec(r)[0], a += r.length, n = parseInt(r), s.temporaryPause = !0, s.options.onTypingPaused(s.arrayPos, s), t = t.substring(0, e) + t.substring(e + a), s.toggleBlinking(!0) } if ("`" === r.charAt(0)) { for (; "`" !== t.substr(e + i).charAt(0) && (i++, !(e + i > t.length)) ;); var u = t.substring(0, e), l = t.substring(u.length + 1, e + i), c = t.substring(e + i + 1); t = u + l + c, i-- } s.timeout = setTimeout(function () { s.toggleBlinking(!1), e === t.length ? s.doneTyping(t, e) : s.keepTyping(t, e, i), s.temporaryPause && (s.temporaryPause = !1, s.options.onTypingResumed(s.arrayPos, s)) }, n) }, n)) } }, { key: "keepTyping", value: function (t, e, s) { 0 === e && (this.toggleBlinking(!1), this.options.preStringTyped(this.arrayPos, this)), e += s; var n = t.substr(0, e); this.replaceText(n), this.typewrite(t, e) } }, { key: "doneTyping", value: function (t, e) { var s = this; this.options.onStringTyped(this.arrayPos, this), this.toggleBlinking(!0), this.arrayPos === this.strings.length - 1 && (this.complete(), this.loop === !1 || this.curLoop === this.loopCount) || (this.timeout = setTimeout(function () { s.backspace(t, e) }, this.backDelay)) } }, { key: "backspace", value: function (t, e) { var s = this; if (this.pause.status === !0) return void this.setPauseStatus(t, e, !0); if (this.fadeOut) return this.initFadeOut(); this.toggleBlinking(!1); var n = this.humanizer(this.backSpeed); this.timeout = setTimeout(function () { e = o.htmlParser.backSpaceHtmlChars(t, e, s); var n = t.substr(0, e); if (s.replaceText(n), s.smartBackspace) { var i = s.strings[s.arrayPos + 1]; i && n === i.substr(0, e) ? s.stopNum = e : s.stopNum = 0 } e > s.stopNum ? (e--, s.backspace(t, e)) : e <= s.stopNum && (s.arrayPos++, s.arrayPos === s.strings.length ? (s.arrayPos = 0, s.options.onLastStringBackspaced(), s.shuffleStringsIfNeeded(), s.begin()) : s.typewrite(s.strings[s.sequence[s.arrayPos]], e)) }, n) } }, { key: "complete", value: function () { this.options.onComplete(this), this.loop ? this.curLoop++ : this.typingComplete = !0 } }, { key: "setPauseStatus", value: function (t, e, s) { this.pause.typewrite = s, this.pause.curString = t, this.pause.curStrPos = e } }, { key: "toggleBlinking", value: function (t) { if (this.cursor && !this.pause.status && this.cursorBlinking !== t) { this.cursorBlinking = t; var e = t ? "infinite" : 0; this.cursor.style.animationIterationCount = e } } }, { key: "humanizer", value: function (t) { return Math.round(Math.random() * t / 2) + t } }, { key: "shuffleStringsIfNeeded", value: function () { this.shuffle && (this.sequence = this.sequence.sort(function () { return Math.random() - .5 })) } }, { key: "initFadeOut", value: function () { var t = this; return this.el.className += " " + this.fadeOutClass, this.cursor && (this.cursor.className += " " + this.fadeOutClass), setTimeout(function () { t.arrayPos++, t.replaceText(""), t.strings.length > t.arrayPos ? t.typewrite(t.strings[t.sequence[t.arrayPos]], 0) : (t.typewrite(t.strings[0], 0), t.arrayPos = 0) }, this.fadeOutDelay) } }, { key: "replaceText", value: function (t) { this.attr ? this.el.setAttribute(this.attr, t) : this.isInput ? this.el.value = t : "html" === this.contentType ? this.el.innerHTML = t : this.el.textContent = t } }, { key: "bindFocusEvents", value: function () { var t = this; this.isInput && (this.el.addEventListener("focus", function (e) { t.stop() }), this.el.addEventListener("blur", function (e) { t.el.value && 0 !== t.el.value.length || t.start() })) } }, { key: "insertCursor", value: function () { this.showCursor && (this.cursor || (this.cursor = document.createElement("span"), this.cursor.className = "typed-cursor", this.cursor.innerHTML = this.cursorChar, this.el.parentNode && this.el.parentNode.insertBefore(this.cursor, this.el.nextSibling))) } }]), t }(); e["default"] = a, t.exports = e["default"] }, function (t, e, s) { "use strict"; function n(t) { return t && t.__esModule ? t : { "default": t } } function i(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") } Object.defineProperty(e, "__esModule", { value: !0 }); var r = Object.assign || function (t) { for (var e = 1; e < arguments.length; e++) { var s = arguments[e]; for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (t[n] = s[n]) } return t }, o = function () { function t(t, e) { for (var s = 0; s < e.length; s++) { var n = e[s]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (e, s, n) { return s && t(e.prototype, s), n && t(e, n), e } }(), a = s(2), u = n(a), l = function () { function t() { i(this, t) } return o(t, [{ key: "load", value: function (t, e, s) { if ("string" == typeof s ? t.el = document.querySelector(s) : t.el = s, t.options = r({}, u["default"], e), t.isInput = "input" === t.el.tagName.toLowerCase(), t.attr = t.options.attr, t.bindInputFocusEvents = t.options.bindInputFocusEvents, t.showCursor = !t.isInput && t.options.showCursor, t.cursorChar = t.options.cursorChar, t.cursorBlinking = !0, t.elContent = t.attr ? t.el.getAttribute(t.attr) : t.el.textContent, t.contentType = t.options.contentType, t.typeSpeed = t.options.typeSpeed, t.startDelay = t.options.startDelay, t.backSpeed = t.options.backSpeed, t.smartBackspace = t.options.smartBackspace, t.backDelay = t.options.backDelay, t.fadeOut = t.options.fadeOut, t.fadeOutClass = t.options.fadeOutClass, t.fadeOutDelay = t.options.fadeOutDelay, t.isPaused = !1, t.strings = t.options.strings.map(function (t) { return t.trim() }), "string" == typeof t.options.stringsElement ? t.stringsElement = document.querySelector(t.options.stringsElement) : t.stringsElement = t.options.stringsElement, t.stringsElement) { t.strings = [], t.stringsElement.style.display = "none"; var n = Array.prototype.slice.apply(t.stringsElement.children), i = n.length; if (i) for (var o = 0; o < i; o += 1) { var a = n[o]; t.strings.push(a.innerHTML.trim()) } } t.strPos = 0, t.arrayPos = 0, t.stopNum = 0, t.loop = t.options.loop, t.loopCount = t.options.loopCount, t.curLoop = 0, t.shuffle = t.options.shuffle, t.sequence = [], t.pause = { status: !1, typewrite: !0, curString: "", curStrPos: 0 }, t.typingComplete = !1; for (var o in t.strings) t.sequence[o] = o; t.currentElContent = this.getCurrentElContent(t), t.autoInsertCss = t.options.autoInsertCss, this.appendAnimationCss(t) } }, { key: "getCurrentElContent", value: function (t) { var e = ""; return e = t.attr ? t.el.getAttribute(t.attr) : t.isInput ? t.el.value : "html" === t.contentType ? t.el.innerHTML : t.el.textContent } }, { key: "appendAnimationCss", value: function (t) { if (t.autoInsertCss && t.showCursor && t.fadeOut) { var e = document.createElement("style"); e.type = "text/css"; var s = ""; t.showCursor && (s += "\n .typed-cursor{\n opacity: 1;\n animation: typedjsBlink 0.7s infinite;\n -webkit-animation: typedjsBlink 0.7s infinite;\n animation: typedjsBlink 0.7s infinite;\n }\n @keyframes typedjsBlink{\n 50% { opacity: 0.0; }\n }\n @-webkit-keyframes typedjsBlink{\n 0% { opacity: 1; }\n 50% { opacity: 0.0; }\n 100% { opacity: 1; }\n }\n "), t.fadeOut && (s += "\n .typed-fade-out{\n opacity: 0;\n transition: opacity .25s;\n -webkit-animation: 0;\n animation: 0;\n }\n "), 0 !== e.length && (e.innerHTML = s, document.head.appendChild(e)) } } }]), t }(); e["default"] = l; var c = new l; e.initializer = c }, function (t, e) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var s = { strings: ["These are the default values...", "You know what you should do?", "Use your own!", "Have a great day!"], stringsElement: null, typeSpeed: 0, startDelay: 0, backSpeed: 0, smartBackspace: !0, shuffle: !1, backDelay: 700, fadeOut: !1, fadeOutClass: "typed-fade-out", fadeOutDelay: 500, loop: !1, loopCount: 1 / 0, showCursor: !0, cursorChar: "|", autoInsertCss: !0, attr: null, bindInputFocusEvents: !1, contentType: "html", onComplete: function (t) { }, preStringTyped: function (t, e) { }, onStringTyped: function (t, e) { }, onLastStringBackspaced: function (t) { }, onTypingPaused: function (t, e) { }, onTypingResumed: function (t, e) { }, onReset: function (t) { }, onStop: function (t, e) { }, onStart: function (t, e) { }, onDestroy: function (t) { } }; e["default"] = s, t.exports = e["default"] }, function (t, e) { "use strict"; function s(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") } Object.defineProperty(e, "__esModule", { value: !0 }); var n = function () { function t(t, e) { for (var s = 0; s < e.length; s++) { var n = e[s]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (e, s, n) { return s && t(e.prototype, s), n && t(e, n), e } }(), i = function () { function t() { s(this, t) } return n(t, [{ key: "typeHtmlChars", value: function (t, e, s) { if ("html" !== s.contentType) return e; var n = t.substr(e).charAt(0); if ("<" === n || "&" === n) { var i = ""; for (i = "<" === n ? ">" : ";"; t.substr(e + 1).charAt(0) !== i && (e++, !(e + 1 > t.length)) ;); e++ } return e } }, { key: "backSpaceHtmlChars", value: function (t, e, s) { if ("html" !== s.contentType) return e; var n = t.substr(e).charAt(0); if (">" === n || ";" === n) { var i = ""; for (i = ">" === n ? "<" : "&"; t.substr(e - 1).charAt(0) !== i && (e--, !(e < 0)) ;); e-- } return e } }]), t }(); e["default"] = i; var r = new i; e.htmlParser = r }]) }); 3209//# sourceMappingURL=typed.min.js.map 3210; (function ($, window, undefined) { 'use strict'; var BLANK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=='; $.fn.imagesLoaded = function (callback) { var $this = this, deferred = $.isFunction($.Deferred) ? $.Deferred() : 0, hasNotify = $.isFunction(deferred.notify), $images = $this.find('img').add($this.filter('img')), loaded = [], proper = [], broken = []; if ($.isPlainObject(callback)) { $.each(callback, function (key, value) { if (key === 'callback') { callback = value } else if (deferred) { deferred[key](value) } }) } function doneLoading() { var $proper = $(proper), $broken = $(broken); if (deferred) { if (broken.length) { deferred.reject($images, $proper, $broken) } else { deferred.resolve($images) } }
3210 if ($.isFunction(callback)) { callback.call($this, $images, $proper, $broken) } } function imgLoadedHandler(event) { imgLoaded(event.target, event.type === 'error') } function imgLoaded(img, isBroken) { if (img.src === BLANK || $.inArray(img, loaded) !== -1) { return } loaded.push(img); if (isBroken) { broken.push(img) } else { proper.push(img) } $.data(img, 'imagesLoaded', { isBroken: isBroken, src: img.src }); if (hasNotify) { deferred.notifyWith($(img), [isBroken, $images, $(proper), $(broken)]) } if ($images.length === loaded.length) { setTimeout(doneLoading); $images.unbind('.imagesLoaded', imgLoadedHandler) } } if (!$images.length) { doneLoading() } else { $images.bind('load.imagesLoaded error.imagesLoaded', imgLoadedHandler).each(function (i, el) { var src = el.src; var cached = $.data(el, 'imagesLoaded'); if (cached && cached.src === src) { imgLoaded(el, cached.isBroken); return } if (el.complete && el.naturalWidth !== undefined) { imgLoaded(el, el.naturalWidth === 0 || el.naturalHeight === 0); return } if (el.readyState || el.complete) { el.src = BLANK; el.src = src } }) } return deferred ? deferred.promise($this) : $this }; var Modernizr = window.Modernizr; $.Flipshow = function (options, element) { this.$el = $(element); this._init(options) }; $.Flipshow.defaults = { speed: 700, easing: 'ease-out' }; $.Flipshow.prototype = { _init: function (options) { this.options = $.extend(true, {}, $.Flipshow.defaults, options); this.support = Modernizr.csstransitions && Modernizr.csstransforms3d && !(/MSIE (\d+\.\d+);/.test(navigator.userAgent)); var transEndEventNames = { 'WebkitTransition': 'webkitTransitionEnd', 'MozTransition': 'transitionend', 'OTransition': 'oTransitionEnd', 'msTransition': 'MSTransitionEnd', 'transition': 'transitionend' }, transformNames = { 'WebkitTransform': '-webkit-transform', 'MozTransform': '-moz-transform', 'OTransform': '-o-transform', 'msTransform': '-ms-transform', 'transform': 'transform' }; if (this.support) { this.transEndEventName = transEndEventNames[Modernizr.prefixed('transition')] + '.cbpFWSlider'; this.transformName = transformNames[Modernizr.prefixed('transform')] } this.transitionProperties = this.transformName + ' ' + this.options.speed + 'ms ' + this.options.easing; this.$listItems = this.$el.children('ul.fc-slides'); this.$items = this.$listItems.children('li').hide(); this.itemsCount = this.$items.length; this.current = 0; this.$listItems.imagesLoaded($.proxy(function () { this.$items.eq(this.current).show(); if (this.itemsCount > 0) { this._addNav(); if (this.support) { this._layout() } } }, this)) }, _addNav: function () { var self = this, $navLeft = $('<div class="fc-left"><span></span><span></span><span></span><i class="fa fa-arrow-left"></i></div>'), $navRight = $('<div class="fc-right"><span></span><span></span><span></span><i class="fa fa-arrow-right"></i></div>'); $('<nav></nav>').append($navLeft, $navRight).appendTo(this.$el); $navLeft.find('span').on('click.flipshow touchstart.flipshow', function () { self._navigate($(this), 'left') }); $navRight.find('span').on('click.flipshow touchstart.flipshow', function () { self._navigate($(this), 'right') }) }, _layout: function ($current, $next) { this.$flipFront = $('<div class="fc-front"><div></div></div>'); this.$frontContent = this.$flipFront.children('div:first'); this.$flipBack = $('<div class="fc-back"><div></div></div>'); this.$backContent = this.$flipBack.children('div:first'); this.$flipEl = $('<div class="fc-flip"></div>').append(this.$flipFront, this.$flipBack).hide().appendTo(this.$el) }, _navigate: function ($nav, dir) { if (this.isAnimating && this.support) { return false } this.isAnimating = true; var $currentItem = this.$items.eq(this.current).hide(); if (dir === 'right') { this.current < this.itemsCount - 1 ? ++this.current : this.current = 0 } else if (dir === 'left') { this.current > 0 ? --this.current : this.current = this.itemsCount - 1 } var $nextItem = this.$items.eq(this.current); if (this.support) { this._flip($currentItem, $nextItem, dir, $nav.index()) } else { $nextItem.show() } }, _flip: function ($currentItem, $nextItem, dir, angle) { var transformProperties = '', $overlayLight = $('<div class="fc-overlay-light"></div>'), $overlayDark = $('<div class="fc-overlay-dark"></div>'); this.$flipEl.css('transition', this.transitionProperties); this.$flipFront.find('div.fc-overlay-light, div.fc-overlay-dark').remove(); this.$flipBack.find('div.fc-overlay-light, div.fc-overlay-dark').remove(); if (dir === 'right') { this.$flipFront.append($overlayLight); this.$flipBack.append($overlayDark); $overlayDark.css('opacity', 1) } else if (dir === 'left') { this.$flipFront.append($overlayDark); this.$flipBack.append($overlayLight); $overlayLight.css('opacity', 1) } var overlayStyle = { transition: 'opacity ' + (this.options.speed / 1.3) + 'ms' }; $overlayLight.css(overlayStyle); $overlayDark.css(overlayStyle); switch (angle) { case 0: transformProperties = dir === 'left' ? 'rotate3d(-1,1,0,-179deg) rotate3d(-1,1,0,-1deg)' : 'rotate3d(1,1,0,180deg)'; break; case 1: transformProperties = dir === 'left' ? 'rotate3d(0,1,0,-179deg) rotate3d(0,1,0,-1deg)' : 'rotate3d(0,1,0,180deg)'; break; case 2: transformProperties = dir === 'left' ? 'rotate3d(1,1,0,-179deg) rotate3d(1,1,0,-1deg)' : 'rotate3d(-1,1,0,179deg) rotate3d(-1,1,0,1deg)'; break } this.$flipBack.css('transform', transformProperties); this.$frontContent.empty().html($currentItem.html()); this.$backContent.empty().html($nextItem.html()); this.$flipEl.show(); var self = this; setTimeout(function () { self.$flipEl.css('transform', transformProperties); $overlayLight.css('opacity', dir === 'right' ? 1 : 0); $overlayDark.css('opacity', dir === 'right' ? 0 : 1); self.$flipEl.on(self.transEndEventName, function (event) { if (event.target.className === 'fc-overlay-light' || event.target.className === 'fc-overlay-dark') return; self._ontransitionend($nextItem) }) }, 25) }, _ontransitionend: function ($nextItem) { $nextItem.show(); this.$flipEl.off(this.transEndEventName).css({ transition: 'none', transform: 'none' }).hide(); this.isAnimating = false } }; var logError = function (message) { if (window.console) { window.console.error(message) } }; $.fn.flipshow = function (options) { if (typeof options === 'string') { var args = Array.prototype.slice.call(arguments, 1); this.each(function () { var instance = $.data(this, 'flipshow'); if (!instance) { logError("cannot call methods on flipshow prior to initialization; " + "attempted to call method '" + options + "'"); return } if (!$.isFunction(instance[options]) || options.charAt(0) === "_") { logError("no such method '" + options + "' for flipshow instance"); return } instance[options].apply(instance, args) }) } else { this.each(function () { var instance = $.data(this, 'flipshow'); if (instance) { instance._init() } else { instance = $.data(this, 'flipshow', new $.Flipshow(options, this)) } }) } return this } })(jQuery, window);/*! 3211 * Slidebars - A jQuery Framework for Off-Canvas Menus and Sidebars 3212 * Version: 2.0.2 3213 * Url: http://www.adchsm.com/slidebars/ 3214 * Author: Adam Charles Smith 3215 * Author url: http://www.adchsm.com/ 3216 * License: MIT 3217 * License url: http://www.adchsm.com/slidebars/license/ 3218 */ 3219 3220var slidebars=function(){var t=$("[canvas]"),e={},i=!1,n=!1,s=["top","right","bottom","left"],r=["reveal","push","overlay","shift"],o=function(i){var n=$(),s="0px, 0px",r=1e3*parseFloat(e[i].element.css("transitionDuration"),10);return("reveal"===e[i].style||"push"===e[i].style||"shift"===e[i].style)&&(n=n.add(t)),("push"===e[i].style||"overlay"===e[i].style||"shift"===e[i].style)&&(n=n.add(e[i].element)),e[i].active&&("top"===e[i].side?s="0px, "+e[i].element.css("height"):"right"===e[i].side?s="-"+e[i].element.css("width")+", 0px":"bottom"===e[i].side?s="0px, -"+e[i].element.css("height"):"left"===e[i].side&&(s=e[i].element.css("width")+", 0px")),{elements:n,amount:s,duration:r}},c=function(t,i,n,s){return a(t)?!1:void(e[t]={id:t,side:i,style:n,element:s,active:!1})},a=function(t){return e.hasOwnProperty(t)?!0:!1};this.init=function(t){return i?!1:(n||($("[off-canvas]").each(function(){var t=$(this).attr("off-canvas").split(" ",3);return t&&t[0]&&-1!==s.indexOf(t[1])&&-1!==r.indexOf(t[2])?void c(t[0],t[1],t[2],$(this)):!1}),n=!0),i=!0,this.css(),$(f).trigger("init"),void("function"==typeof t&&t()))},this.exit=function(t){if(!i)return!1;var e=function(){i=!1,$(f).trigger("exit"),"function"==typeof t&&t()};this.getActiveSlidebar()?this.close(e):e()},this.css=function(t){if(!i)return!1;for(var n in e)if(a(n)){var s;s="top"===e[n].side||"bottom"===e[n].side?e[n].element.css("height"):e[n].element.css("width"),("push"===e[n].style||"overlay"===e[n].style||"shift"===e[n].style)&&e[n].element.css("margin-"+e[n].side,"-"+s)}this.getActiveSlidebar()&&this.open(this.getActiveSlidebar()),$(f).trigger("css"),"function"==typeof t&&t()},this.open=function(t,n){if(!i)return!1;if(!t||!a(t))return!1;var s=function(){e[t].active=!0,e[t].element.css("display","block"),$(f).trigger("opening",[e[t].id]);var i=o(t);i.elements.css({"transition-duration":i.duration+"ms",transform:"translate("+i.amount+")"}),setTimeout(function(){$(f).trigger("opened",[e[t].id]),"function"==typeof n&&n()},i.duration)};this.getActiveSlidebar()&&this.getActiveSlidebar()!==t?this.close(s):s()},this.close=function(t,n){if("function"==typeof t&&(n=t,t=null),!i)return!1;if(t&&!a(t))return!1;if(t||(t=this.getActiveSlidebar()),t&&e[t].active){e[t].active=!1,$(f).trigger("closing",[e[t].id]);var s=o(t);s.elements.css("transform",""),setTimeout(function(){s.elements.css("transition-duration",""),e[t].element.css("display",""),$(f).trigger("closed",[e[t].id]),"function"==typeof n&&n()},s.duration)}},this.toggle=function(t,n){return i&&t&&a(t)?void(e[t].active?this.close(t,function(){"function"==typeof n&&n()}):this.open(t,function(){"function"==typeof n&&n()})):!1},this.isActive=function(){return i},this.isActiveSlidebar=function(t){return i&&t&&a(t)?e[t].active:!1},this.getActiveSlidebar=function(){if(!i)return!1;var t=!1;for(var n in e)if(a(n)&&e[n].active){t=e[n].id;break}return t}
3220,this.getSlidebars=function(){if(!i)return!1;var t=[];for(var n in e)a(n)&&t.push(e[n].id);return t},this.getSlidebar=function(t){return i&&t&&t&&a(t)?e[t]:!1},this.events={};var f=this.events;$(window).on("resize",this.css.bind(this))};// DOM.event.move 3221// 3222// 2.0.0 3223// 3224// Stephen Band 3225// 3226// Triggers 'movestart', 'move' and 'moveend' events after 3227// mousemoves following a mousedown cross a distance threshold, 3228// similar to the native 'dragstart', 'drag' and 'dragend' events. 3229// Move events are throttled to animation frames. Move event objects 3230// have the properties: 3231// 3232// pageX: 3233// pageY: Page coordinates of pointer. 3234// startX: 3235// startY: Page coordinates of pointer at movestart. 3236// distX: 3237// distY: Distance the pointer has moved since movestart. 3238// deltaX: 3239// deltaY: Distance the finger has moved since last event. 3240// velocityX: 3241// velocityY: Average velocity over last few events. 3242 3243 3244(function(fn) { 3245 if (typeof define === 'function' && define.amd) { 3246 define([], fn); 3247 } else if ((typeof module !== "undefined" && module !== null) && module.exports) { 3248 module.exports = fn; 3249 } else { 3250 fn(); 3251 } 3252})(function(){ 3253 var assign = Object.assign || window.jQuery && jQuery.extend; 3254 3255 // Number of pixels a pressed pointer travels before movestart 3256 // event is fired. 3257 var threshold = 8; 3258 3259 // Shim for requestAnimationFrame, falling back to timer. See: 3260 // see http://paulirish.com/2011/requestanimationframe-for-smart-animating/ 3261 var requestFrame = (function(){ 3262 return ( 3263 window.requestAnimationFrame || 3264 window.webkitRequestAnimationFrame || 3265 window.mozRequestAnimationFrame || 3266 window.oRequestAnimationFrame || 3267 window.msRequestAnimationFrame || 3268 function(fn, element){ 3269 return window.setTimeout(function(){ 3270 fn(); 3271 }, 25); 3272 } 3273 ); 3274 })(); 3275 3276 // Shim for customEvent 3277 // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill 3278 (function () { 3279 if ( typeof window.CustomEvent === "function" ) return false; 3280 function CustomEvent ( event, params ) { 3281 params = params || { bubbles: false, cancelable: false, detail: undefined }; 3282 var evt = document.createEvent( 'CustomEvent' ); 3283 evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail ); 3284 return evt; 3285 } 3286 3287 CustomEvent.prototype = window.Event.prototype; 3288 window.CustomEvent = CustomEvent; 3289 })(); 3290 3291 var ignoreTags = { 3292 textarea: true, 3293 input: true, 3294 select: true, 3295 button: true 3296 }; 3297 3298 var mouseevents = { 3299 move: 'mousemove', 3300 cancel: 'mouseup dragstart', 3301 end: 'mouseup' 3302 }; 3303 3304 var touchevents = { 3305 move: 'touchmove', 3306 cancel: 'touchend', 3307 end: 'touchend' 3308 }; 3309 3310 var rspaces = /\s+/; 3311 3312 3313 // DOM Events 3314 3315 var eventOptions = { bubbles: true, cancelable: true }; 3316 3317 var eventsSymbol = typeof Symbol === "function" ? Symbol('events') : {}; 3318 3319 function createEvent(type) { 3320 return new CustomEvent(type, eventOptions); 3321 } 3322 3323 function getEvents(node) { 3324 return node[eventsSymbol] || (node[eventsSymbol] = {}); 3325 } 3326 3327 function on(node, types, fn, data, selector) { 3328 types = types.split(rspaces); 3329 3330 var events = getEvents(node); 3331 var i = types.length; 3332 var handlers, type; 3333 3334 function handler(e) { fn(e, data); } 3335 3336 while (i--) { 3337 type = types[i]; 3338 handlers = events[type] || (events[type] = []); 3339 handlers.push([fn, handler]); 3340 node.addEventListener(type, handler); 3341 } 3342 } 3343 3344 function off(node, types, fn, selector) { 3345 types = types.split(rspaces); 3346 3347 var events = getEvents(node); 3348 var i = types.length;
3349 var type, handlers, k; 3350 3351 if (!events) { return; } 3352 3353 while (i--) { 3354 type = types[i]; 3355 handlers = events[type]; 3356 if (!handlers) { continue; } 3357 k = handlers.length; 3358 while (k--) { 3359 if (handlers[k][0] === fn) { 3360 node.removeEventListener(type, handlers[k][1]); 3361 handlers.splice(k, 1); 3362 } 3363 } 3364 } 3365 } 3366 3367 function trigger(node, type, properties) { 3368 // Don't cache events. It prevents you from triggering an event of a 3369 // given type from inside the handler of another event of that type. 3370 var event = createEvent(type); 3371 if (properties) { assign(event, properties); } 3372 node.dispatchEvent(event); 3373 } 3374 3375 3376 // Constructors 3377 3378 function Timer(fn){ 3379 var callback = fn, 3380 active = false, 3381 running = false; 3382 3383 function trigger(time) { 3384 if (active){ 3385 callback(); 3386 requestFrame(trigger); 3387 running = true; 3388 active = false; 3389 } 3390 else { 3391 running = false; 3392 } 3393 } 3394 3395 this.kick = function(fn) { 3396 active = true; 3397 if (!running) { trigger(); } 3398 }; 3399 3400 this.end = function(fn) { 3401 var cb = callback; 3402 3403 if (!fn) { return; } 3404 3405 // If the timer is not running, simply call the end callback. 3406 if (!running) { 3407 fn(); 3408 } 3409 // If the timer is running, and has been kicked lately, then 3410 // queue up the current callback and the end callback, otherwise 3411 // just the end callback. 3412 else { 3413 callback = active ? 3414 function(){ cb(); fn(); } : 3415 fn ; 3416 3417 active = true; 3418 } 3419 }; 3420 } 3421 3422 3423 // Functions 3424 3425 function noop() {} 3426 3427 function preventDefault(e) { 3428 e.preventDefault(); 3429 } 3430 3431 function isIgnoreTag(e) { 3432 return !!ignoreTags[e.target.tagName.toLowerCase()]; 3433 } 3434 3435 function isPrimaryButton(e) { 3436 // Ignore mousedowns on any button other than the left (or primary) 3437 // mouse button, or when a modifier key is pressed. 3438 return (e.which === 1 && !e.ctrlKey && !e.altKey); 3439 } 3440 3441 function identifiedTouch(touchList, id) { 3442 var i, l; 3443 3444 if (touchList.identifiedTouch) { 3445 return touchList.identifiedTouch(id); 3446 } 3447 3448 // touchList.identifiedTouch() does not exist in 3449 // webkit yet… we must do the search ourselves... 3450 3451 i = -1; 3452 l = touchList.length; 3453 3454 while (++i < l) { 3455 if (touchList[i].identifier === id) { 3456 return touchList[i]; 3457 } 3458 } 3459 } 3460 3461 function changedTouch(e, data) { 3462 var touch = identifiedTouch(e.changedTouches, data.identifier); 3463 3464 // This isn't the touch you're looking for. 3465 if (!touch) { return; } 3466 3467 // Chrome Android (at least) includes touches that have not 3468 // changed in e.changedTouches. That's a bit annoying. Check 3469 // that this touch has changed. 3470 if (touch.pageX === data.pageX && touch.pageY === data.pageY) { return; } 3471 3472 return touch; 3473 } 3474 3475 3476 // Handlers that decide when the first movestart is triggered 3477 3478 function mousedown(e){ 3479 // Ignore non-primary buttons 3480 if (!isPrimaryButton(e)) { return; } 3481 3482 // Ignore form and interactive elements 3483 if (isIgnoreTag(e)) { return; } 3484 3485 on(document, mouseevents.move, mousemove, e); 3486 on(document, mouseevents.cancel, mouseend, e); 3487 } 3488 3489 function mousemove(e, data){ 3490 checkThreshold(e, data, e, removeMouse); 3491 } 3492 3493 function mouseend(e, data) { 3494 removeMouse(); 3495 } 3496 3497 function removeMouse() { 3498 off(document, mouseevents.move, mousemove); 3499 off(document, mouseevents.cancel, mouseend); 3500 } 3501 3502 function touchstart(e) { 3503 // Don't get in the way of interaction with form elements 3504 if (ignoreTags[e.target.tagName.toLowerCase()]) { return; } 3505 3506 var touch = e.changedTouches[0]; 3507 3508 // iOS live updates the touch objects whereas Android gives us copies. 3509 // That means we can't trust the touchstart object to stay the same, 3510 // so we must copy the data. This object acts as a template for 3511 // movestart, move and moveend event objects. 3512 var data = { 3513 target: touch.target, 3514 pageX: touch.pageX, 3515 pageY: touch.pageY, 3516 identifier: touch.identifier, 3517 3518 // The only way to make handlers individually unbindable is by 3519 // making them unique. 3520 touchmove: function(e, data) { touchmove(e, data); }, 3521 touchend: function(e, data) { touchend(e, data); } 3522 }; 3523 3524 on(document, touchevents.move, data.touchmove, data); 3525 on(document, touchevents.cancel, data.touchend, data); 3526 } 3527 3528 function touchmove(e, data) { 3529 var touch = changedTouch(e, data); 3530 if (!touch) { return; } 3531 checkThreshold(e, data, touch, removeTouch); 3532 } 3533 3534 function touchend(e, data) { 3535 var touch = identifiedTouch(e.changedTouches, data.identifier); 3536 if (!touch) { return; } 3537 removeTouch(data); 3538 } 3539 3540 function removeTouch(data) { 3541 off(document, touchevents.move, data.touchmove); 3542 off(document, touchevents.cancel, data.touchend); 3543 } 3544 3545 function checkThreshold(e, data, touch, fn) { 3546 var distX = touch.pageX - data.pageX; 3547 var distY = touch.pageY - data.pageY; 3548
3549 // Do nothing if the threshold has not been crossed. 3550 if ((distX * distX) + (distY * distY) < (threshold * threshold)) { return; } 3551 3552 triggerStart(e, data, touch, distX, distY, fn); 3553 } 3554 3555 function triggerStart(e, data, touch, distX, distY, fn) { 3556 var touches = e.targetTouches; 3557 var time = e.timeStamp - data.timeStamp; 3558 3559 // Create a movestart object with some special properties that 3560 // are passed only to the movestart handlers. 3561 var template = { 3562 altKey: e.altKey, 3563 ctrlKey: e.ctrlKey, 3564 shiftKey: e.shiftKey, 3565 startX: data.pageX, 3566 startY: data.pageY, 3567 distX: distX, 3568 distY: distY, 3569 deltaX: distX, 3570 deltaY: distY, 3571 pageX: touch.pageX, 3572 pageY: touch.pageY, 3573 velocityX: distX / time, 3574 velocityY: distY / time, 3575 identifier: data.identifier, 3576 targetTouches: touches, 3577 finger: touches ? touches.length : 1, 3578 enableMove: function() { 3579 this.moveEnabled = true; 3580 this.enableMove = noop; 3581 e.preventDefault(); 3582 } 3583 }; 3584 3585 // Trigger the movestart event. 3586 trigger(data.target, 'movestart', template); 3587 3588 // Unbind handlers that tracked the touch or mouse up till now. 3589 fn(data); 3590 } 3591 3592 3593 // Handlers that control what happens following a movestart 3594 3595 function activeMousemove(e, data) { 3596 var timer = data.timer; 3597 3598 data.touch = e; 3599 data.timeStamp = e.timeStamp; 3600 timer.kick(); 3601 } 3602 3603 function activeMouseend(e, data) { 3604 var target = data.target; 3605 var event = data.event; 3606 var timer = data.timer; 3607 3608 removeActiveMouse(); 3609 3610 endEvent(target, event, timer, function() { 3611 // Unbind the click suppressor, waiting until after mouseup 3612 // has been handled. 3613 setTimeout(function(){ 3614 off(target, 'click', preventDefault); 3615 }, 0); 3616 }); 3617 } 3618 3619 function removeActiveMouse() { 3620 off(document, mouseevents.move, activeMousemove); 3621 off(document, mouseevents.end, activeMouseend); 3622 } 3623 3624 function activeTouchmove(e, data) { 3625 var event = data.event; 3626 var timer = data.timer; 3627 var touch = changedTouch(e, event); 3628 3629 if (!touch) { return; } 3630 3631 // Stop the interface from gesturing 3632 e.preventDefault(); 3633 3634 event.targetTouches = e.targetTouches; 3635 data.touch = touch; 3636 data.timeStamp = e.timeStamp; 3637 3638 timer.kick(); 3639 } 3640 3641 function activeTouchend(e, data) { 3642 var target = data.target; 3643 var event = data.event; 3644 var timer = data.timer; 3645 var touch = identifiedTouch(e.changedTouches, event.identifier); 3646 3647 // This isn't the touch you're looking for. 3648 if (!touch) { return; } 3649 3650 removeActiveTouch(data); 3651 endEvent(target, event, timer); 3652 } 3653 3654 function removeActiveTouch(data) { 3655 off(document, touchevents.move, data.activeTouchmove); 3656 off(document, touchevents.end, data.activeTouchend); 3657 } 3658 3659 3660 // Logic for triggering move and moveend events 3661 3662 function updateEvent(event, touch, timeStamp) { 3663 var time = timeStamp - event.timeStamp; 3664 3665 event.distX = touch.pageX - event.startX; 3666 event.distY = touch.pageY - event.startY; 3667 event.deltaX = touch.pageX - event.pageX; 3668 event.deltaY = touch.pageY - event.pageY; 3669 3670 // Average the velocity of the last few events using a decay 3671 // curve to even out spurious jumps in values. 3672 event.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time; 3673 event.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time; 3674 event.pageX = touch.pageX; 3675 event.pageY = touch.pageY; 3676 } 3677 3678 function endEvent(target, event, timer, fn) { 3679 timer.end(function(){ 3680 trigger(target, 'moveend', event); 3681 return fn && fn(); 3682 }); 3683 } 3684 3685 3686 // Set up the DOM 3687 3688 function movestart(e) { 3689 if (e.defaultPrevented) { return; } 3690 if (!e.moveEnabled) { return; } 3691 3692 var event = { 3693 startX: e.startX, 3694 startY: e.startY, 3695 pageX: e.pageX, 3696 pageY: e.pageY, 3697 distX: e.distX, 3698 distY: e.distY, 3699 deltaX: e.deltaX, 3700 deltaY: e.deltaY, 3701 velocityX: e.velocityX, 3702 velocityY: e.velocityY, 3703 identifier: e.identifier, 3704 targetTouches: e.targetTouches, 3705 finger: e.finger 3706 }; 3707 3708 var data = { 3709 target: e.target, 3710 event: event, 3711 timer: new Timer(update), 3712 touch: undefined, 3713 timeStamp: e.timeStamp 3714 }; 3715 3716 function update(time) { 3717 updateEvent(event, data.touch, data.timeStamp); 3718 trigger(data.target, 'move', event); 3719 } 3720 3721 if (e.identifier === undefined) { 3722 // We're dealing with a mouse event. 3723 // Stop clicks from propagating during a move 3724 on(e.target, 'click', preventDefault); 3725 on(document, mouseevents.move, activeMousemove, data); 3726 on(document, mouseevents.end, activeMouseend, data); 3727 } 3728 else { 3729 // In order to unbind correct handlers they have to be unique 3730 data.activeTouchmove = function(e, data) { activeTouchmove(e, data); }; 3731 data.activeTouchend = function(e, data) { activeTouchend(e, data); }; 3732 3733 // We're dealing with a touch. 3734 on(document, touchevents.move, data.activeTouchmove, data); 3735 on(document, touchevents.end, data.activeTouchend, data); 3736 } 3737 } 3738 3739 on(document, 'mousedown', mousedown);
3740 on(document, 'touchstart', touchstart); 3741 on(document, 'movestart', movestart); 3742 3743 3744 // jQuery special events 3745 // 3746 // jQuery event objects are copies of DOM event objects. They need 3747 // a little help copying the move properties across. 3748 3749 if (!window.jQuery) { return; } 3750 3751 var properties = ("startX startY pageX pageY distX distY deltaX deltaY velocityX velocityY").split(' '); 3752 3753 function enableMove1(e) { e.enableMove(); } 3754 function enableMove2(e) { e.enableMove(); } 3755 function enableMove3(e) { e.enableMove(); } 3756 3757 function add(handleObj) { 3758 var handler = handleObj.handler; 3759 3760 handleObj.handler = function(e) { 3761 // Copy move properties across from originalEvent 3762 var i = properties.length; 3763 var property; 3764 3765 while(i--) { 3766 property = properties[i]; 3767 e[property] = e.originalEvent[property]; 3768 } 3769 3770 handler.apply(this, arguments); 3771 }; 3772 } 3773 3774 jQuery.event.special.movestart = { 3775 setup: function() { 3776 // Movestart must be enabled to allow other move events 3777 on(this, 'movestart', enableMove1); 3778 3779 // Do listen to DOM events 3780 return false; 3781 }, 3782 3783 teardown: function() { 3784 off(this, 'movestart', enableMove1); 3785 return false; 3786 }, 3787 3788 add: add 3789 }; 3790 3791 jQuery.event.special.move = { 3792 setup: function() { 3793 on(this, 'movestart', enableMove2); 3794 return false; 3795 }, 3796 3797 teardown: function() { 3798 off(this, 'movestart', enableMove2); 3799 return false; 3800 }, 3801 3802 add: add 3803 }; 3804 3805 jQuery.event.special.moveend = { 3806 setup: function() { 3807 on(this, 'movestart', enableMove3); 3808 return false; 3809 }, 3810 3811 teardown: function() { 3812 off(this, 'movestart', enableMove3); 3813 return false; 3814 }, 3815 3816 add: add 3817 }; 3818}); 3819/*! 3820 * Zurb TwentyTwenty PACKAGED v0.1.0 3821 * https://github.com/zurb/twentytwenty 3822 * Author "ZURB" 3823 */ 3824 3825(function ($) { 3826 3827 $.fn.twentytwenty = function(options) { 3828 var options = $.extend({ 3829 default_offset_pct: 0.5, 3830 orientation: 'horizontal', 3831 before_label: 'Before', 3832 after_label: 'After', 3833 no_overlay: false, 3834 move_slider_on_hover: false, 3835 move_with_handle_only: true, 3836 click_to_move: false 3837 }, options); 3838 3839 return this.each(function() { 3840 3841 var sliderPct = options.default_offset_pct; 3842 var container = $(this); 3843 var sliderOrientation = options.orientation; 3844 var beforeDirection = (sliderOrientation === 'vertical') ? 'down' : 'left'; 3845 var afterDirection = (sliderOrientation === 'vertical') ? 'up' : 'right'; 3846 3847 3848 container.wrap("<div class='twentytwenty-wrapper twentytwenty-" + sliderOrientation + "'></div>"); 3849 if(!options.no_overlay) { 3850 container.append("<div class='twentytwenty-overlay'></div>"); 3851 var overlay = container.find(".twentytwenty-overlay"); 3852 overlay.append("<div class='twentytwenty-before-label' data-content='"+options.before_label+"'></div>"); 3853 overlay.append("<div class='twentytwenty-after-label' data-content='"+options.after_label+"'></div>"); 3854 } 3855 var beforeImg = container.find("img:first"); 3856 var afterImg = container.find("img:last"); 3857 container.append("<div class='twentytwenty-handle'></div>"); 3858 var slider = container.find(".twentytwenty-handle"); 3859 slider.append("<span class='twentytwenty-" + beforeDirection + "-arrow'></span>"); 3860 slider.append("<span class='twentytwenty-" + afterDirection + "-arrow'></span>"); 3861 container.addClass("twentytwenty-container"); 3862 beforeImg.addClass("twentytwenty-before"); 3863 afterImg.addClass("twentytwenty-after"); 3864 3865 var calcOffset = function(dimensionPct) { 3866 var w = beforeImg.width(); 3867 var h = beforeImg.height(); 3868 return { 3869 w: w+"px", 3870 h: h+"px", 3871 cw: (dimensionPct*w)+"px", 3872 ch: (dimensionPct*h)+"px" 3873 }; 3874 }; 3875 3876 var adjustContainer = function(offset) { 3877 if (sliderOrientation === 'vertical') { 3878 beforeImg.css("clip", "rect(0,"+offset.w+","+offset.ch+",0)"); 3879 afterImg.css("clip", "rect("+offset.ch+","+offset.w+","+offset.h+",0)"); 3880 } 3881 else { 3882 beforeImg.css("clip", "rect(0,"+offset.cw+","+offset.h+",0)"); 3883 afterImg.css("clip", "rect(0,"+offset.w+","+offset.h+","+offset.cw+")"); 3884 } 3885 container.css("height", offset.h); 3886 }; 3887 3888 var adjustSlider = function(pct) { 3889 var offset = calcOffset(pct); 3890 slider.css((sliderOrientation==="vertical") ? "top" : "left", (sliderOrientation==="vertical") ? offset.ch : offset.cw); 3891 adjustContainer(offset); 3892 }; 3893 3894 // Return the number specified or the min/max number if it outside the range given. 3895 var minMaxNumber = function(num, min, max) { 3896 return Math.max(min, Math.min(max, num)); 3897 }; 3898 3899 // Calculate the slider percentage based on the position. 3900 var getSliderPercentage = function(positionX, positionY) { 3901 var sliderPercentage = (sliderOrientation === 'vertical') ? 3902 (positionY-offsetY)/imgHeight :
3903 (positionX-offsetX)/imgWidth; 3904 3905 return minMaxNumber(sliderPercentage, 0, 1); 3906 }; 3907 3908 3909 $(window).on("resize.twentytwenty", function(e) { 3910 adjustSlider(sliderPct); 3911 }); 3912 3913 var offsetX = 0; 3914 var offsetY = 0; 3915 var imgWidth = 0; 3916 var imgHeight = 0; 3917 var onMoveStart = function(e) { 3918 if (((e.distX > e.distY && e.distX < -e.distY) || (e.distX < e.distY && e.distX > -e.distY)) && sliderOrientation !== 'vertical') { 3919 e.preventDefault(); 3920 } 3921 else if (((e.distX < e.distY && e.distX < -e.distY) || (e.distX > e.distY && e.distX > -e.distY)) && sliderOrientation === 'vertical') { 3922 e.preventDefault(); 3923 } 3924 container.addClass("active"); 3925 offsetX = container.offset().left; 3926 offsetY = container.offset().top; 3927 imgWidth = beforeImg.width(); 3928 imgHeight = beforeImg.height(); 3929 }; 3930 var onMove = function(e) { 3931 if (container.hasClass("active")) { 3932 sliderPct = getSliderPercentage(e.pageX, e.pageY); 3933 adjustSlider(sliderPct); 3934 } 3935 }; 3936 var onMoveEnd = function() { 3937 container.removeClass("active"); 3938 }; 3939 3940 var moveTarget = options.move_with_handle_only ? slider : container; 3941 moveTarget.on("movestart",onMoveStart); 3942 moveTarget.on("move",onMove); 3943 moveTarget.on("moveend",onMoveEnd); 3944 3945 if (options.move_slider_on_hover) { 3946 container.on("mouseenter", onMoveStart); 3947 container.on("mousemove", onMove); 3948 container.on("mouseleave", onMoveEnd); 3949 } 3950 3951 slider.on("touchmove", function(e) { 3952 e.preventDefault(); 3953 }); 3954 3955 container.find("img").on("mousedown", function(event) { 3956 event.preventDefault(); 3957 }); 3958 3959 if (options.click_to_move) { 3960 container.on('click', function(e) { 3961 offsetX = container.offset().left; 3962 offsetY = container.offset().top; 3963 imgWidth = beforeImg.width(); 3964 imgHeight = beforeImg.height(); 3965 3966 sliderPct = getSliderPercentage(e.pageX, e.pageY); 3967 adjustSlider(sliderPct); 3968 }); 3969 } 3970 3971 $(window).trigger("resize.twentytwenty"); 3972 }); 3973 }; 3974 3975})(jQuery); 3976!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;
vendor: 5,333 bytes, lines 3976-3978
3976if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;f<g;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&m<10&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),Math.abs(b)>1?c:d}var f=[],g=[],h={precision:100,elapse:!1,defer:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.options.defer===!1&&this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&b<0?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});/*! lazysizes - v5.3.0 */ 3977 3978!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");
vendor: 5,660 bytes, line 3978
3978if(!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={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(L,2500);V(t,B,true)}if(l){G.call(o.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!l){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||l)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,H.fastLoadedClass)}S(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){M--}},true)});var R=function(e){if(e._lazyRace){return}var t;var a=n.test(e.nodeName);var i=a&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=i=="auto";if((r||!m)&&a&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;M++;s(e,t,r,i,a)};var r=ie(function(){H.loadMode=3;a()});var o=function(){if(H.loadMode==3){H.loadMode=2}r()};var l=function(){if(m){return}if(f.now()-e<999){I(l,999);return}m=true;H.loadMode=3;a();q("scroll",o,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",a,true);q("resize",a,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(a).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",a,true);O[P]("DOMAttrModified",a,true);setInterval(a,999)}q("hashchange",a,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,a,true)});if(/d$|^c/.test(D.readyState)){l()}else{q("load",l);D[P]("DOMContentLoaded",a);I(l,2e4)}if(k.elements.length){t();ee._lsFlush()}else{a()}},checkElems:a,unveil:R,_aLSL:o}}(),re=function(){var a;var n=te(function(e,t,a,i){var r,n,s;e._lazysizesWidth=i;i+="px";e.setAttribute("sizes",i);
vendor: 869 bytes, line 3978
3978if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n<s;n++){r[n].setAttribute("sizes",i)}}if(!a.detail.dataAttr){Y(e,a.detail)}});var i=function(e,t,a){var i;var r=e.parentNode;if(r){a=s(e,r,a);i=X(e,"lazybeforesizes",{width:a,dataAttr:!!t});if(!i.defaultPrevented){a=i.detail.width;if(a&&a!==e._lazysizesWidth){n(e,r,i,a)}}}};var e=function(){var e;var t=a.length;if(t){e=0;for(;e<t;e++){i(a[e])}}};var t=ie(e);return{_:function(){a=D.getElementsByClassName(H.autosizesClass);q("resize",t)},checkElems:t,updateElem:i}}(),t=function(){if(!t.i&&D.getElementsByClassName){t.i=true;re._();e._()}};return I(function(){H.init&&t()}),k={cfg:H,autoSizer:re,loader:e,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:ee}}(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.