/* Minification failed. Returning unminified contents.
(20,15324-15325): run-time error JS1009: Expected '}': [
(20,15332-15333): run-time error JS1006: Expected ')': :
(20,15333-15334): run-time error JS1006: Expected ')': t
(20,15333-15334): run-time error JS1006: Expected ')': t
(20,15335-15336): run-time error JS1009: Expected '}': )
(20,15175): run-time error JS1004: Expected ';'
(20,15335-15336): run-time error JS1195: Expected expression: )
(20,15336-15337): run-time error JS1195: Expected expression: )
(20,15337-15338): run-time error JS1195: Expected expression: ,
(20,15340-15341): run-time error JS1195: Expected expression: )
(20,15350): run-time error JS1004: Expected ';'
(20,15350-15351): run-time error JS1195: Expected expression: :
(20,15359-15360): run-time error JS1010: Expected identifier: (
(20,15766-15767): run-time error JS1006: Expected ')': ;
(20,15766-15767): run-time error JS1006: Expected ')': ;
(20,15766): run-time error JS1004: Expected ';'
(20,17828-17829): run-time error JS1002: Syntax error: }
(20,17860-17861): run-time error JS1002: Syntax error: }
(20,17861-17862): run-time error JS1195: Expected expression: )
(20,17862-17863): run-time error JS1195: Expected expression: )
(4820,11-12): run-time error JS1010: Expected identifier: .
(4820,11-12): run-time error JS1195: Expected expression: .
(5987,10-11): run-time error JS1010: Expected identifier: =
(5987,10-11): run-time error JS1195: Expected expression: =
(5989,10-11): run-time error JS1010: Expected identifier: =
(5989,10-11): run-time error JS1195: Expected expression: =
(5991,8-9): run-time error JS1010: Expected identifier: .
(5991,8-9): run-time error JS1195: Expected expression: .
(20,17829-17860): run-time error JS1018: 'return' statement outside of function: return k.globalOptions=void 0,k
(20,17778-17828): run-time error JS1018: 'return' statement outside of function: return A(e,r),setTimeout((()=>a.emit("init")),0),V
 */
/*! lazysizes - v4.1.6 */
!function (a, b) { var c = b(a, a.document); a.lazySizes = c, "object" == typeof module && module.exports && (module.exports = c) }(window, function (a, b) { "use strict"; if (b.getElementsByClassName) { var c, d, e = b.documentElement, f = a.Date, g = a.HTMLPictureElement, h = "addEventListener", i = "getAttribute", j = a[h], k = a.setTimeout, l = a.requestAnimationFrame || k, m = a.requestIdleCallback, n = /^picture$/i, o = ["load", "error", "lazyincluded", "_lazyloaded"], p = {}, q = Array.prototype.forEach, r = function (a, b) { return p[b] || (p[b] = new RegExp("(\\s|^)" + b + "(\\s|$)")), p[b].test(a[i]("class") || "") && p[b] }, s = function (a, b) { r(a, b) || a.setAttribute("class", (a[i]("class") || "").trim() + " " + b) }, t = function (a, b) { var c; (c = r(a, b)) && a.setAttribute("class", (a[i]("class") || "").replace(c, " ")) }, u = function (a, b, c) { var d = c ? h : "removeEventListener"; c && u(a, b), o.forEach(function (c) { a[d](c, b) }) }, v = function (a, d, e, f, g) { var h = b.createEvent("Event"); return e || (e = {}), e.instance = c, h.initEvent(d, !f, !g), h.detail = e, a.dispatchEvent(h), h }, w = function (b, c) { var e; !g && (e = a.picturefill || d.pf) ? (c && c.src && !b[i]("srcset") && b.setAttribute("srcset", c.src), e({ reevaluate: !0, elements: [b] })) : c && c.src && (b.src = c.src) }, x = function (a, b) { return (getComputedStyle(a, null) || {})[b] }, y = function (a, b, c) { for (c = c || a.offsetWidth; c < d.minSize && b && !a._lazysizesWidth;)c = b.offsetWidth, b = b.parentNode; return c }, z = function () { var a, c, d = [], e = [], f = d, g = function () { var b = f; for (f = d.length ? e : d, a = !0, c = !1; b.length;)b.shift()(); a = !1 }, h = function (d, e) { a && !e ? d.apply(this, arguments) : (f.push(d), c || (c = !0, (b.hidden ? k : l)(g))) }; return h._lsFlush = g, h }(), A = function (a, b) { return b ? function () { z(a) } : function () { var b = this, c = arguments; z(function () { a.apply(b, c) }) } }, B = function (a) { var b, c = 0, e = d.throttleDelay, g = d.ricTimeout, h = function () { b = !1, c = f.now(), a() }, i = m && g > 49 ? function () { m(h, { timeout: g }), g !== d.ricTimeout && (g = d.ricTimeout) } : A(function () { k(h) }, !0); return function (a) { var d; (a = !0 === a) && (g = 33), b || (b = !0, d = e - (f.now() - c), d < 0 && (d = 0), a || d < 9 ? i() : k(i, d)) } }, C = function (a) { var b, c, d = 99, e = function () { b = null, a() }, g = function () { var a = f.now() - c; a < d ? k(g, d - a) : (m || e)(e) }; return function () { c = f.now(), b || (b = k(g, d)) } }; !function () { var b, c = { lazyClass: "lazyload", loadedClass: "lazyloaded", loadingClass: "lazyloading", preloadClass: "lazypreload", errorClass: "lazyerror", autosizesClass: "lazyautosizes", srcAttr: "data-src", srcsetAttr: "data-srcset", sizesAttr: "data-sizes", minSize: 40, customMedia: {}, init: !0, expFactor: 1.5, hFac: .8, loadMode: 2, loadHidden: !0, ricTimeout: 0, throttleDelay: 125 }; d = a.lazySizesConfig || a.lazysizesConfig || {}; for (b in c) b in d || (d[b] = c[b]); a.lazySizesConfig = d, k(function () { d.init && F() }) }(); var D = function () { var g, l, m, o, p, y, D, F, G, H, I, J, K = /^img$/i, L = /^iframe$/i, M = "onscroll" in a && !/(gle|ing)bot/.test(navigator.userAgent), N = 0, O = 0, P = 0, Q = -1, R = function (a) { P-- , a && a.target && u(a.target, R), (!a || P < 0 || !a.target) && (P = 0) }, S = function (a) { return null == J && (J = "hidden" == x(b.body, "visibility")), J || "hidden" != x(a.parentNode, "visibility") && "hidden" != x(a, "visibility") }, T = function (a, c) { var d, f = a, g = S(a); for (F -= c, I += c, G -= c, H += c; g && (f = f.offsetParent) && f != b.body && f != e;)(g = (x(f, "opacity") || 1) > 0) && "visible" != x(f, "overflow") && (d = f.getBoundingClientRect(), g = H > d.left && G < d.right && I > d.top - 1 && F < d.bottom + 1); return g }, U = function () { var a, f, h, j, k, m, n, p, q, r, s, t, u = c.elements; if ((o = d.loadMode) && P < 8 && (a = u.length)) { for (f = 0, Q++ , r = !d.expand || d.expand < 1 ? e.clientHeight > 500 && e.clientWidth > 500 ? 500 : 370 : d.expand, s = r * d.expFactor, t = d.hFac, J = null, O < s && P < 1 && Q > 2 && o > 2 && !b.hidden ? (O = s, Q = 0) : O = o > 1 && Q > 1 && P < 6 ? r : N; f < a; f++)if (u[f] && !u[f]._lazyRace) if (M) if ((p = u[f][i]("data-expand")) && (m = 1 * p) || (m = O), q !== m && (y = innerWidth + m * t, D = innerHeight + m, n = -1 * m, q = m), h = u[f].getBoundingClientRect(), (I = h.bottom) >= n && (F = h.top) <= D && (H = h.right) >= n * t && (G = h.left) <= y && (I || H || G || F) && (d.loadHidden || S(u[f])) && (l && P < 3 && !p && (o < 3 || Q < 4) || T(u[f], m))) { if (aa(u[f]), k = !0, P > 9) break } else !k && l && !j && P < 4 && Q < 4 && o > 2 && (g[0] || d.preloadAfterLoad) && (g[0] || !p && (I || H || G || F || "auto" != u[f][i](d.sizesAttr))) && (j = g[0] || u[f]); else aa(u[f]); j && !k && aa(j) } }, V = B(U), W = function (a) { s(a.target, d.loadedClass), t(a.target, d.loadingClass), u(a.target, Y), v(a.target, "lazyloaded") }, X = A(W), Y = function (a) { X({ target: a.target }) }, Z = function (a, b) { try { a.contentWindow.location.replace(b) } catch (c) { a.src = b } }, $ = function (a) { var b, c = a[i](d.srcsetAttr); (b = d.customMedia[a[i]("data-media") || a[i]("media")]) && a.setAttribute("media", b), c && a.setAttribute("srcset", c) }, _ = A(function (a, b, c, e, f) { var g, h, j, l, o, p; (o = v(a, "lazybeforeunveil", b)).defaultPrevented || (e && (c ? s(a, d.autosizesClass) : a.setAttribute("sizes", e)), h = a[i](d.srcsetAttr), g = a[i](d.srcAttr), f && (j = a.parentNode, l = j && n.test(j.nodeName || "")), p = b.firesLoad || "src" in a && (h || g || l), o = { target: a }, p && (u(a, R, !0), clearTimeout(m), m = k(R, 2500), s(a, d.loadingClass), u(a, Y, !0)), l && q.call(j.getElementsByTagName("source"), $), h ? a.setAttribute("srcset", h) : g && !l && (L.test(a.nodeName) ? Z(a, g) : a.src = g), f && (h || l) && w(a, { src: g })), a._lazyRace && delete a._lazyRace, t(a, d.lazyClass), z(function () { (!p || a.complete && a.naturalWidth > 1) && (p ? R(o) : P-- , W(o)) }, !0) }), aa = function (a) { var b, c = K.test(a.nodeName), e = c && (a[i](d.sizesAttr) || a[i]("sizes")), f = "auto" == e; (!f && l || !c || !a[i]("src") && !a.srcset || a.complete || r(a, d.errorClass) || !r(a, d.lazyClass)) && (b = v(a, "lazyunveilread").detail, f && E.updateElem(a, !0, a.offsetWidth), a._lazyRace = !0, P++ , _(a, b, f, e, c)) }, ba = function () { if (!l) { if (f.now() - p < 999) return void k(ba, 999); var a = C(function () { d.loadMode = 3, V() }); l = !0, d.loadMode = 3, V(), j("scroll", function () { 3 == d.loadMode && (d.loadMode = 2), a() }, !0) } }; return { _: function () { p = f.now(), c.elements = b.getElementsByClassName(d.lazyClass), g = b.getElementsByClassName(d.lazyClass + " " + d.preloadClass), j("scroll", V, !0), j("resize", V, !0), a.MutationObserver ? new MutationObserver(V).observe(e, { childList: !0, subtree: !0, attributes: !0 }) : (e[h]("DOMNodeInserted", V, !0), e[h]("DOMAttrModified", V, !0), setInterval(V, 999)), j("hashchange", V, !0), ["focus", "mouseover", "click", "load", "transitionend", "animationend", "webkitAnimationEnd"].forEach(function (a) { b[h](a, V, !0) }), /d$|^c/.test(b.readyState) ? ba() : (j("load", ba), b[h]("DOMContentLoaded", V), k(ba, 2e4)), c.elements.length ? (U(), z._lsFlush()) : V() }, checkElems: V, unveil: aa } }(), E = function () { var a, c = A(function (a, b, c, d) { var e, f, g; if (a._lazysizesWidth = d, d += "px", a.setAttribute("sizes", d), n.test(b.nodeName || "")) for (e = b.getElementsByTagName("source"), f = 0, g = e.length; f < g; f++)e[f].setAttribute("sizes", d); c.detail.dataAttr || w(a, c.detail) }), e = function (a, b, d) { var e, f = a.parentNode; f && (d = y(a, f, d), e = v(a, "lazybeforesizes", { width: d, dataAttr: !!b }), e.defaultPrevented || (d = e.detail.width) && d !== a._lazysizesWidth && c(a, f, e, d)) }, f = function () { var b, c = a.length; if (c) for (b = 0; b < c; b++)e(a[b]) }, g = C(f); return { _: function () { a = b.getElementsByClassName(d.autosizesClass), j("resize", g) }, checkElems: g, updateElem: e } }(), F = function () { F.i || (F.i = !0, E._(), D._()) }; return c = { cfg: d, autoSizer: E, loader: D, init: F, uP: w, aC: s, rC: t, hC: r, fire: v, gW: y, rAF: z } } });
;
!function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.SignaturePad=b()}):"object"==typeof exports?module.exports=b():a.SignaturePad=b()}(this,function(){/*!
 * Signature Pad v1.5.3 | https://github.com/szimek/signature_pad
 * (c) 2016 Szymon Nowak | Released under the MIT license
 */
var a=function(a){"use strict";var b=function(a,b){var c=this,d=b||{};this.velocityFilterWeight=d.velocityFilterWeight||.7,this.minWidth=d.minWidth||.5,this.maxWidth=d.maxWidth||2.5,this.dotSize=d.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=d.penColor||"black",this.backgroundColor=d.backgroundColor||"rgba(0,0,0,0)",this.onEnd=d.onEnd,this.onBegin=d.onBegin,this._canvas=a,this._ctx=a.getContext("2d"),this.clear(),this._handleMouseDown=function(a){1===a.which&&(c._mouseButtonDown=!0,c._strokeBegin(a))},this._handleMouseMove=function(a){c._mouseButtonDown&&c._strokeUpdate(a)},this._handleMouseUp=function(a){1===a.which&&c._mouseButtonDown&&(c._mouseButtonDown=!1,c._strokeEnd(a))},this._handleTouchStart=function(a){if(1==a.targetTouches.length){var b=a.changedTouches[0];c._strokeBegin(b)}},this._handleTouchMove=function(a){a.preventDefault();var b=a.targetTouches[0];c._strokeUpdate(b)},this._handleTouchEnd=function(a){var b=a.target===c._canvas;b&&(a.preventDefault(),c._strokeEnd(a))},this._handleMouseEvents(),this._handleTouchEvents()};b.prototype.clear=function(){var a=this._ctx,b=this._canvas;a.fillStyle=this.backgroundColor,a.clearRect(0,0,b.width,b.height),a.fillRect(0,0,b.width,b.height),this._reset()},b.prototype.toDataURL=function(){var a=this._canvas;return a.toDataURL.apply(a,arguments)},b.prototype.fromDataURL=function(a){var b=this,c=new Image,d=window.devicePixelRatio||1,e=this._canvas.width/d,f=this._canvas.height/d;this._reset(),c.src=a,c.onload=function(){b._ctx.drawImage(c,0,0,e,f)},this._isEmpty=!1},b.prototype._strokeUpdate=function(a){var b=this._createPoint(a);this._addPoint(b)},b.prototype._strokeBegin=function(a){this._reset(),this._strokeUpdate(a),"function"==typeof this.onBegin&&this.onBegin(a)},b.prototype._strokeDraw=function(a){var b=this._ctx,c="function"==typeof this.dotSize?this.dotSize():this.dotSize;b.beginPath(),this._drawPoint(a.x,a.y,c),b.closePath(),b.fill()},b.prototype._strokeEnd=function(a){var b=this.points.length>2,c=this.points[0];!b&&c&&this._strokeDraw(c),"function"==typeof this.onEnd&&this.onEnd(a)},b.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),a.addEventListener("mouseup",this._handleMouseUp)},b.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},b.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},b.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),a.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},b.prototype.isEmpty=function(){return this._isEmpty},b.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._isEmpty=!0,this._ctx.fillStyle=this.penColor},b.prototype._createPoint=function(a){var b=this._canvas.getBoundingClientRect();return new c(a.clientX-b.left,a.clientY-b.top)},b.prototype._addPoint=function(a){var b,c,e,f,g=this.points;g.push(a),g.length>2&&(3===g.length&&g.unshift(g[0]),f=this._calculateCurveControlPoints(g[0],g[1],g[2]),b=f.c2,f=this._calculateCurveControlPoints(g[1],g[2],g[3]),c=f.c1,e=new d(g[1],b,c,g[2]),this._addCurve(e),g.shift())},b.prototype._calculateCurveControlPoints=function(a,b,d){var e=a.x-b.x,f=a.y-b.y,g=b.x-d.x,h=b.y-d.y,i={x:(a.x+b.x)/2,y:(a.y+b.y)/2},j={x:(b.x+d.x)/2,y:(b.y+d.y)/2},k=Math.sqrt(e*e+f*f),l=Math.sqrt(g*g+h*h),m=i.x-j.x,n=i.y-j.y,o=l/(k+l),p={x:j.x+m*o,y:j.y+n*o},q=b.x-p.x,r=b.y-p.y;return{c1:new c(i.x+q,i.y+r),c2:new c(j.x+q,j.y+r)}},b.prototype._addCurve=function(a){var b,c,d=a.startPoint,e=a.endPoint;b=e.velocityFrom(d),b=this.velocityFilterWeight*b+(1-this.velocityFilterWeight)*this._lastVelocity,c=this._strokeWidth(b),this._drawCurve(a,this._lastWidth,c),this._lastVelocity=b,this._lastWidth=c},b.prototype._drawPoint=function(a,b,c){var d=this._ctx;d.moveTo(a,b),d.arc(a,b,c,0,2*Math.PI,!1),this._isEmpty=!1},b.prototype._drawCurve=function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o=this._ctx,p=c-b;for(d=Math.floor(a.length()),o.beginPath(),f=0;d>f;f++)g=f/d,h=g*g,i=h*g,j=1-g,k=j*j,l=k*j,m=l*a.startPoint.x,m+=3*k*g*a.control1.x,m+=3*j*h*a.control2.x,m+=i*a.endPoint.x,n=l*a.startPoint.y,n+=3*k*g*a.control1.y,n+=3*j*h*a.control2.y,n+=i*a.endPoint.y,e=b+i*p,this._drawPoint(m,n,e);o.closePath(),o.fill()},b.prototype._strokeWidth=function(a){return Math.max(this.maxWidth/(a+1),this.minWidth)};var c=function(a,b,c){this.x=a,this.y=b,this.time=c||(new Date).getTime()};c.prototype.velocityFrom=function(a){return this.time!==a.time?this.distanceTo(a)/(this.time-a.time):1},c.prototype.distanceTo=function(a){return Math.sqrt(Math.pow(this.x-a.x,2)+Math.pow(this.y-a.y,2))};var d=function(a,b,c,d){this.startPoint=a,this.control1=b,this.control2=c,this.endPoint=d};return d.prototype.length=function(){var a,b,c,d,e,f,g,h,i=10,j=0;for(a=0;i>=a;a++)b=a/i,c=this._point(b,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),d=this._point(b,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y),a>0&&(g=c-e,h=d-f,j+=Math.sqrt(g*g+h*h)),e=c,f=d;return j},d.prototype._point=function(a,b,c,d,e){return b*(1-a)*(1-a)*(1-a)+3*c*(1-a)*(1-a)*a+3*d*(1-a)*a*a+e*a*a*a},b}(document);return a});;
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).EmblaCarouselAutoHeight=t()}(this,(function(){"use strict";function e(e={}){let t,n=[];const o=["select","slideFocus"];function i(){t.containerNode().style.height=`${function(){const{slideRegistry:e}=t.internalEngine();return e[t.selectedScrollSnap()].map((e=>n[e])).reduce(((e,t)=>Math.max(e,t)),0)}()}px`}return{name:"autoHeight",options:e,init:function(e){t=e;const{options:{axis:s},slideRects:l}=t.internalEngine();"y"!==s&&(n=l.map((e=>e.height)),o.forEach((e=>t.on(e,i))),i())},destroy:function(){o.forEach((e=>t.off(e,i)));const e=t.containerNode();e.style.height="",e.getAttribute("style")||e.removeAttribute("style")}}}return e.globalOptions=void 0,e}));
;
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t="undefined"!=typeof globalThis?globalThis:t||self).EmblaCarouselAutoScroll=o()}(this,(function(){"use strict";const t={direction:"forward",speed:2,startDelay:1e3,active:!0,breakpoints:{},playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,rootNode:null};function o(n={}){let e,i,s,r,c,a=!1,l=!0,u=0;function d(){if(s||a)return;if(!l)return;i.emit("autoScroll:play");const t=i.internalEngine(),{ownerWindow:o}=t;u=o.setTimeout((()=>{t.scrollBody=function(t){const{location:o,previousLocation:n,offsetLocation:s,target:r,scrollTarget:c,index:a,indexPrevious:l,limit:{reachedMin:u,reachedMax:d,constrain:p},options:{loop:g}}=t,y="forward"===e.direction?-1:1,m=()=>h;let O=0,w=0,b=o.get(),v=0,I=!1;function S(t){const m=t/1e3;let S=0;n.set(o),O=y*e.speed*55,b+=O,o.add(O*m),r.set(o),S=b-v,w=Math.sign(S),v=b;const D=c.byDistance(0,!1).index;a.get()!==D&&(l.set(a.get()),a.set(D),i.emit("select"));const E="forward"===e.direction?u(s.get()):d(s.get());if(!g&&E){I=!0;const t=p(o.get());o.set(t),r.set(o),f()}return h}const h={direction:()=>w,duration:()=>-1,velocity:()=>O,settled:()=>I,seek:S,useBaseFriction:m,useBaseDuration:m,useFriction:m,useDuration:m};return h}(t),t.animation.start()}),r),a=!0}function f(){if(s||!a)return;i.emit("autoScroll:stop");const t=i.internalEngine(),{ownerWindow:o}=t;t.scrollBody=c,o.clearTimeout(u),u=0,a=!1}function p(){l&&d(),i.off("settle",p)}function g(){i.on("settle",p)}return{name:"autoScroll",options:n,init:function(a,u){i=a;const{mergeOptions:p,optionsAtMedia:y}=u,m=p(t,o.globalOptions),O=p(m,n);if(e=y(O),i.scrollSnapList().length<=1)return;r=e.startDelay,s=!1,c=i.internalEngine().scrollBody;const{eventStore:w}=i.internalEngine(),b=i.rootNode(),v=e.rootNode&&e.rootNode(b)||b,I=i.containerNode();i.on("pointerDown",f),e.stopOnInteraction||i.on("pointerUp",g),e.stopOnMouseEnter&&(w.add(v,"mouseenter",(()=>{l=!1,f()})),e.stopOnInteraction||w.add(v,"mouseleave",(()=>{l=!0,d()}))),e.stopOnFocusIn&&(i.on("slideFocusStart",f),e.stopOnInteraction||w.add(I,"focusout",d)),e.playOnInit&&d()},destroy:function(){i.off("pointerDown",f).off("pointerUp",g).off("slideFocusStart",f).off("settle",p),f(),s=!0,a=!1},play:function(t){void 0!==t&&(r=t),l=!0,d()},stop:function(){a&&f()},reset:function(){a&&(f(),g())},isPlaying:function(){return a}}}return o.globalOptions=void 0,o}));
;
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselAutoplay=t()}(this,(function(){"use strict";const n={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function t(o={}){let e,i,r,s=!1,a=!0,l=!1,u=0;function c(){if(r)return;if(!a)return;s||i.emit("autoplay:play");const{ownerWindow:n}=i.internalEngine();n.clearInterval(u),u=n.setInterval(g,e.delay),s=!0}function p(){if(r)return;s&&i.emit("autoplay:stop");const{ownerWindow:n}=i.internalEngine();n.clearInterval(u),u=0,s=!1}function d(){if(f())return a=s,p();a&&c()}function f(){const{ownerDocument:n}=i.internalEngine();return"hidden"===n.visibilityState}function y(n){void 0!==n&&(l=n),a=!0,c()}function g(){const{index:n}=i.internalEngine(),t=n.clone().add(1).get(),o=i.scrollSnapList().length-1;e.stopOnLastSnap&&t===o&&p(),i.canScrollNext()?i.scrollNext(l):i.scrollTo(0,l)}return{name:"autoplay",options:o,init:function(s,u){i=s;const{mergeOptions:y,optionsAtMedia:g}=u,O=y(n,t.globalOptions),m=y(O,o);if(e=g(m),i.scrollSnapList().length<=1)return;l=e.jump,r=!1;const{eventStore:I,ownerDocument:v}=i.internalEngine(),b=i.rootNode(),S=e.rootNode&&e.rootNode(b)||b,w=i.containerNode();i.on("pointerDown",p),e.stopOnInteraction||i.on("pointerUp",c),e.stopOnMouseEnter&&(I.add(S,"mouseenter",(()=>{a=!1,p()})),e.stopOnInteraction||I.add(S,"mouseleave",(()=>{a=!0,c()}))),e.stopOnFocusIn&&(i.on("slideFocusStart",p),e.stopOnInteraction||I.add(w,"focusout",c)),I.add(v,"visibilitychange",d),e.playOnInit&&!f()&&c()},destroy:function(){i.off("pointerDown",p).off("pointerUp",c).off("slideFocusStart",p),p(),r=!0,s=!1},play:y,stop:function(){s&&p()},reset:function(){s&&y()},isPlaying:function(){return s}}}return t.globalOptions=void 0,t}));
;
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).EmblaCarouselWheelGestures=t()}(this,(function(){"use strict";function e(){return(e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function t(e,t){if(e.length!==t.length)throw new Error("vectors must be same length");return e.map((function(e,n){return e+t[n]}))}function n(e){return Math.max.apply(Math,e.map(Math.abs))}function i(e){return Object.freeze(e),Object.values(e).forEach((function(e){null===e||"object"!=typeof e||Object.isFrozen(e)||i(e)})),e}var o=[1,18,"undefined"!=typeof window&&window.innerHeight||800],r=[-1,-1,-1],a=i({preventWheelAction:!0,reverseSign:[!0,!0,!1]}),s={active:!0,breakpoints:{},wheelDraggingClass:"is-wheel-dragging",forceWheelAxis:void 0,target:void 0};function u(c){var l;void 0===c&&(c={});var m=function(){};return{name:"wheelGestures",options:c,init:function(f,d){var v,h,p=d.mergeOptions,M=d.optionsAtMedia,g=p(s,u.globalOptions),x=p(g,c);l=M(x);var b,E=f.internalEngine(),w=null!=(v=l.target)?v:f.containerNode().parentNode,y=null!=(h=l.forceWheelAxis)?h:E.options.axis,S=function(s){void 0===s&&(s={});var u,c,l,m=function(){var e={};function t(t,n){e[t]=(e[t]||[]).filter((function(e){return e!==n}))}return i({on:function(n,i){return e[n]=(e[n]||[]).concat(i),function(){return t(n,i)}},off:t,dispatch:function(t,n){t in e&&e[t].forEach((function(e){return e(n)}))}})}(),f=m.on,d=m.off,v=m.dispatch,h=a,p={isStarted:!1,isStartPublished:!1,isMomentum:!1,startTime:0,lastAbsDelta:Infinity,axisMovement:[0,0,0],axisVelocity:[0,0,0],accelerationFactors:[],scrollPoints:[],scrollPointsToMerge:[],willEndTimeout:400},M=!1,g=function(e){Array.isArray(e)?e.forEach((function(e){return E(e)})):E(e)},x=function(t){return void 0===t&&(t={}),Object.values(t).some((function(e){return null==e}))?h:h=i(e({},a,h,t))},b=function(n){var i=e({event:u,isStart:!1,isEnding:!1,isMomentumCancel:!1,isMomentum:p.isMomentum,axisDelta:[0,0,0],axisVelocity:p.axisVelocity,axisMovement:p.axisMovement,get axisMovementProjection(){return t(i.axisMovement,i.axisVelocity.map((function(e){return void 0===t&&(t=.996),e*t/(1-t);var t})))}},n);v("wheel",e({},i,{previous:c})),c=i},E=function(i){var a,s=function(t){return e({},t,{axisDelta:t.axisDelta.map((function(e){return Math.min(Math.max(-700,e),700)}))})}(function(t,n){if(!n)return t;var i=!0===n?r:n.map((function(e){return e?-1:1}));return e({},t,{axisDelta:t.axisDelta.map((function(e,t){return e*i[t]}))})}({timeStamp:(a=i).timeStamp,axisDelta:[a.deltaX*o[a.deltaMode],a.deltaY*o[a.deltaMode],(a.deltaZ||0)*o[a.deltaMode]]},h.reverseSign)),c=s.axisDelta,l=s.timeStamp,m=n(c);i.preventDefault&&function(e,t){var n=h.preventWheelAction,i=t[0],o=t[1],r=t[2];if("boolean"==typeof n)return n;switch(n){case"x":return Math.abs(i)>=e;case"y":return Math.abs(o)>=e;case"z":return Math.abs(r)>=e;default:return!1}}(m,c)&&i.preventDefault(),p.isStarted?p.isMomentum&&m>Math.max(2,2*p.lastAbsDelta)&&(L(!0),A()):A(),0===m&&Object.is&&Object.is(i.deltaX,-0)?M=!0:(u=i,p.axisMovement=t(p.axisMovement,c),p.lastAbsDelta=m,p.scrollPointsToMerge.push({axisDelta:c,timeStamp:l}),w(),b({axisDelta:c,isStart:!p.isStartPublished}),p.isStartPublished=!0,j())},w=function(){var e;2===p.scrollPointsToMerge.length?(p.scrollPoints.unshift({axisDeltaSum:p.scrollPointsToMerge.map((function(e){return e.axisDelta})).reduce(t),timeStamp:(e=p.scrollPointsToMerge.map((function(e){return e.timeStamp})),e.reduce((function(e,t){return e+t}))/e.length)}),S(),p.scrollPointsToMerge.length=0,p.scrollPoints.length=1,p.isMomentum||T()):p.isStartPublished||y()},y=function(){var e;p.axisVelocity=(e=p.scrollPointsToMerge,e[e.length-1]).axisDelta.map((function(e){return e/p.willEndTimeout}))},S=function(){var e=p.scrollPoints,t=e[0],n=e[1];if(n&&t){var i=t.timeStamp-n.timeStamp;if(!(i<=0)){var o=t.axisDeltaSum.map((function(e){return e/i})),r=o.map((function(e,t){return e/(p.axisVelocity[t]||1)}));p.axisVelocity=o,p.accelerationFactors.push(r),D(i)}}},D=function(e){var t=10*Math.ceil(e/10)*1.2;p.isMomentum||(t=Math.max(100,2*t)),p.willEndTimeout=Math.min(1e3,Math.round(t))},P=function(e){return 0===e||e<=.96&&e>=.6},T=function(){if(p.accelerationFactors.length>=5){if(M&&(M=!1,n(p.axisVelocity)>=.2))return void O();var e=p.accelerationFactors.slice(-5);e.every((function(e){var t=!!e.reduce((function(e,t){return e&&e<1&&e===t?1:0})),n=e.filter(P).length===e.length;return t||n}))&&O(),p.accelerationFactors=e}},O=function(){p.isMomentum=!0},A=function(){(p={isStarted:!1,isStartPublished:!1,isMomentum:!1,startTime:0,lastAbsDelta:Infinity,axisMovement:[0,0,0],axisVelocity:[0,0,0],accelerationFactors:[],scrollPoints:[],scrollPointsToMerge:[],willEndTimeout:400}).isStarted=!0,p.startTime=Date.now(),c=void 0,M=!1},j=function(){clearTimeout(l),l=setTimeout(L,p.willEndTimeout)},L=function(e){void 0===e&&(e=!1),p.isStarted&&(b(p.isMomentum&&e?{isEnding:!0,isMomentumCancel:!0}:{isEnding:!0}),p.isMomentum=!1,p.isStarted=!1)},V=function(e){var t=[],n=function(n){n.removeEventListener("wheel",e),t=t.filter((function(e){return e!==n}))};return i({observe:function(i){return i.addEventListener("wheel",e,{passive:!1}),t.push(i),function(){return n(i)}},unobserve:n,disconnect:function(){t.forEach(n)}})}(g),C=V.observe,F=V.unobserve,W=V.disconnect;return x(s),i({on:f,off:d,observe:C,unobserve:F,disconnect:W,feedWheel:g,updateOptions:x})}({preventWheelAction:y,reverseSign:[!0,!0,!1]}),D=S.observe(w),P=S.on("wheel",(function(e){var t=e.axisDelta,n=t[0],i=t[1],o="x"===y?i:n,r=e.isEnding&&!e.isMomentum||e.isMomentum&&e.previous&&!e.previous.isMomentum;Math.abs("x"===y?n:i)>Math.abs(o)&&!T&&!e.isMomentum&&function(e){try{L(b=new MouseEvent("mousedown",e.event))}catch(e){return m()}T=!0,document.documentElement.addEventListener("mousemove",A,!0),document.documentElement.addEventListener("mouseup",A,!0),document.documentElement.addEventListener("mousedown",A,!0),l.wheelDraggingClass&&w.classList.add(l.wheelDraggingClass)}(e),T&&(r?function(e){T=!1,L(j("mouseup",e)),O(),l.wheelDraggingClass&&w.classList.remove(l.wheelDraggingClass)}(e):L(j("mousemove",e)))})),T=!1;function O(){document.documentElement.removeEventListener("mousemove",A,!0),document.documentElement.removeEventListener("mouseup",A,!0),document.documentElement.removeEventListener("mousedown",A,!0)}function A(e){T&&e.isTrusted&&e.stopImmediatePropagation()}function j(e,t){var n,i;if(y===E.options.axis){var o=t.axisMovement;n=o[0],i=o[1]}else{var r=t.axisMovement;i=r[0],n=r[1]}if(!E.options.skipSnaps&&!E.options.dragFree){var a=E.containerRect.width,s=E.containerRect.height;n=n<0?Math.max(n,-a):Math.min(n,a),i=i<0?Math.max(i,-s):Math.min(i,s)}return new MouseEvent(e,{clientX:b.clientX+n,clientY:b.clientY+i,screenX:b.screenX+n,screenY:b.screenY+i,movementX:n,movementY:i,button:0,bubbles:!0,cancelable:!0,composed:!0})}function L(e){f.containerNode().dispatchEvent(e)}m=function(){D(),P(),O()}},destroy:function(){return m()}}}return u.globalOptions=void 0,u}));
;
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselFade=t()}(this,(function(){"use strict";function n(n,t,e){return Math.min(Math.max(n,t),e)}function t(n){return"number"==typeof n&&!isNaN(n)}function e(e={}){const o=1,i=0,r=.68,s=1e3/60;let l,c,a,f,d=[],u=0,p=0,g=0,y=!1;function E(){v(l.selectedScrollSnap(),o)}function S(){y=!1}function h(){y=!1,u=0,p=0}function m(){const n=l.internalEngine().scrollBody.duration();p=n?0:o,y=!0,n||E()}function b(n){const{scrollSnaps:e,location:o,target:i}=l.internalEngine();!t(n)||d[n]<.5||(o.set(e[n]),i.set(o))}function v(t,e){l.scrollSnapList().forEach(((r,s)=>{const c=Math.abs(e),a=d[s],f=s===t,p=n(f?a+c:a-c,i,o);d[s]=p;const E=f&&y,S=l.previousScrollSnap();E&&(d[S]=1-p),f&&function(n,t){const{index:e,dragHandler:o,scrollSnaps:i}=l.internalEngine(),r=o.pointerDown(),s=1/(i.length-1);let c=n,a=r?l.selectedScrollSnap():l.previousScrollSnap();if(r&&c===a){const n=-1*Math.sign(u);c=a,a=e.clone().set(a).add(n).get()}const f=a*s,d=(c-a)*s;g=f+d*t}(t,p),function(n){const t=l.internalEngine().slideRegistry[n],{scrollSnaps:e,containerRect:o}=l.internalEngine(),r=d[n];t.forEach((t=>{const s=l.slideNodes()[t].style,c=parseFloat(r.toFixed(2)),a=c>i,f=function(n){const{axis:t}=l.internalEngine();return`translate${t.scroll.toUpperCase()}(${t.direction(n)}px)`}(a?e[n]:o.width+2);a&&(s.transform=f),s.opacity=c.toString(),s.pointerEvents=r>.5?"auto":"none",a||(s.transform=f)}))}(s)}))}function x(){const{dragHandler:n,index:t,scrollBody:e}=l.internalEngine(),o=l.selectedScrollSnap();if(!n.pointerDown())return o;const i=Math.sign(e.velocity()),r=Math.sign(u),s=t.clone().set(o).add(-1*i).get();return i&&r?r===i?s:o:null}function M(){const{target:n,location:e}=l.internalEngine(),i=n.get()-e.get(),a=Math.abs(i)>=1,f=x(),g=!t(f);return function(n){const{dragHandler:e,scrollBody:i}=n.internalEngine(),l=s/1e3,a=e.pointerDown(),f=i.velocity()*l,g=i.duration(),y=x(),E=!t(y);if(a){if(!f)return;u+=f,p=Math.abs(f/c),b(y)}if(!a){if(!g||E)return;p+=(o-d[y])/g,p*=r}E||v(y,p)}(l),!g&&!a&&d[f]>.999}function w(){return g}return{name:"fade",options:e,init:function(t){l=t;const e=l.selectedScrollSnap(),{scrollBody:r,containerRect:s,axis:u}=l.internalEngine(),p=u.measureSize(s);c=n(.75*p,200,500),y=!1,d=l.scrollSnapList().map(((n,t)=>t===e?o:i)),a=r.settled,f=l.scrollProgress,r.settled=M,l.scrollProgress=w,l.on("select",m).on("slideFocus",E).on("pointerDown",h).on("pointerUp",S),function(){const{translate:n,slideLooper:t}=l.internalEngine();n.clear(),n.toggleActive(!1),t.loopPoints.forEach((({translate:n})=>{n.clear(),n.toggleActive(!1)}))}(),E()},destroy:function(){const{scrollBody:n}=l.internalEngine();n.settled=a,l.scrollProgress=f,l.off("select",m).off("slideFocus",E).off("pointerDown",h).off("pointerUp",S),l.slideNodes().forEach((n=>{const t=n.style;t.opacity="",t.transform="",t.pointerEvents="",n.getAttribute("style")||n.removeAttribute("style")}))}}}return e.globalOptions=void 0,e}));
;
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).EmblaCarouselWheelGestures=t()}(this,(function(){"use strict";function e(){return(e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function t(e,t){if(e.length!==t.length)throw new Error("vectors must be same length");return e.map((function(e,n){return e+t[n]}))}function n(e){return Math.max.apply(Math,e.map(Math.abs))}function i(e){return Object.freeze(e),Object.values(e).forEach((function(e){null===e||"object"!=typeof e||Object.isFrozen(e)||i(e)})),e}var o=[1,18,"undefined"!=typeof window&&window.innerHeight||800],r=[-1,-1,-1],a=i({preventWheelAction:!0,reverseSign:[!0,!0,!1]}),s={active:!0,breakpoints:{},wheelDraggingClass:"is-wheel-dragging",forceWheelAxis:void 0,target:void 0};function u(c){var l;void 0===c&&(c={});var m=function(){};return{name:"wheelGestures",options:c,init:function(f,d){var v,h,p=d.mergeOptions,g=d.optionsAtMedia,M=p(s,u.globalOptions),x=p(M,c);l=g(x);var b,E=f.internalEngine(),w=null!=(v=l.target)?v:f.containerNode().parentNode,y=null!=(h=l.forceWheelAxis)?h:E.options.axis,D=function(s){void 0===s&&(s={});var u,c,l,m=function(){var e={};function t(t,n){e[t]=(e[t]||[]).filter((function(e){return e!==n}))}return i({on:function(n,i){return e[n]=(e[n]||[]).concat(i),function(){return t(n,i)}},off:t,dispatch:function(t,n){t in e&&e[t].forEach((function(e){return e(n)}))}})}(),f=m.on,d=m.off,v=m.dispatch,h=a,p={isStarted:!1,isStartPublished:!1,isMomentum:!1,startTime:0,lastAbsDelta:Infinity,axisMovement:[0,0,0],axisVelocity:[0,0,0],accelerationFactors:[],scrollPoints:[],scrollPointsToMerge:[],willEndTimeout:400},g=!1,M=function(e){Array.isArray(e)?e.forEach((function(e){return E(e)})):E(e)},x=function(t){return void 0===t&&(t={}),Object.values(t).some((function(e){return null==e}))?h:h=i(e({},a,h,t))},b=function(n){var i=e({event:u,isStart:!1,isEnding:!1,isMomentumCancel:!1,isMomentum:p.isMomentum,axisDelta:[0,0,0],axisVelocity:p.axisVelocity,axisMovement:p.axisMovement,get axisMovementProjection(){return t(i.axisMovement,i.axisVelocity.map((function(e){return void 0===t&&(t=.996),e*t/(1-t);var t})))}},n);v("wheel",e({},i,{previous:c})),c=i},E=function(i){var a,s=function(t){return e({},t,{axisDelta:t.axisDelta.map((function(e){return Math.min(Math.max(-700,e),700)}))})}(function(t,n){if(!n)return t;var i=!0===n?r:n.map((function(e){return e?-1:1}));return e({},t,{axisDelta:t.axisDelta.map((function(e,t){return e*i[t]}))})}({timeStamp:(a=i).timeStamp,axisDelta:[a.deltaX*o[a.deltaMode],a.deltaY*o[a.deltaMode],(a.deltaZ||0)*o[a.deltaMode]]},h.reverseSign)),c=s.axisDelta,l=s.timeStamp,m=n(c);i.preventDefault&&function(e,t){var n=h.preventWheelAction,i=t[0],o=t[1],r=t[2];if("boolean"==typeof n)return n;switch(n){case"x":return Math.abs(i)>=e;case"y":return Math.abs(o)>=e;case"z":return Math.abs(r)>=e;default:return!1}}(m,c)&&i.preventDefault(),p.isStarted?p.isMomentum&&m>Math.max(2,2*p.lastAbsDelta)&&(L(!0),A()):A(),0===m&&Object.is&&Object.is(i.deltaX,-0)?g=!0:(u=i,p.axisMovement=t(p.axisMovement,c),p.lastAbsDelta=m,p.scrollPointsToMerge.push({axisDelta:c,timeStamp:l}),w(),b({axisDelta:c,isStart:!p.isStartPublished}),p.isStartPublished=!0,j())},w=function(){var e;2===p.scrollPointsToMerge.length?(p.scrollPoints.unshift({axisDeltaSum:p.scrollPointsToMerge.map((function(e){return e.axisDelta})).reduce(t),timeStamp:(e=p.scrollPointsToMerge.map((function(e){return e.timeStamp})),e.reduce((function(e,t){return e+t}))/e.length)}),D(),p.scrollPointsToMerge.length=0,p.scrollPoints.length=1,p.isMomentum||T()):p.isStartPublished||y()},y=function(){var e;p.axisVelocity=(e=p.scrollPointsToMerge,e[e.length-1]).axisDelta.map((function(e){return e/p.willEndTimeout}))},D=function(){var e=p.scrollPoints,t=e[0],n=e[1];if(n&&t){var i=t.timeStamp-n.timeStamp;if(!(i<=0)){var o=t.axisDeltaSum.map((function(e){return e/i})),r=o.map((function(e,t){return e/(p.axisVelocity[t]||1)}));p.axisVelocity=o,p.accelerationFactors.push(r),S(i)}}},S=function(e){var t=10*Math.ceil(e/10)*1.2;p.isMomentum||(t=Math.max(100,2*t)),p.willEndTimeout=Math.min(1e3,Math.round(t))},P=function(e){return 0===e||e<=.96&&e>=.6},T=function(){if(p.accelerationFactors.length>=5){if(g&&(g=!1,n(p.axisVelocity)>=.2))return void O();var e=p.accelerationFactors.slice(-5);e.every((function(e){var t=!!e.reduce((function(e,t){return e&&e<1&&e===t?1:0})),n=e.filter(P).length===e.length;return t||n}))&&O(),p.accelerationFactors=e}},O=function(){p.isMomentum=!0},A=function(){(p={isStarted:!1,isStartPublished:!1,isMomentum:!1,startTime:0,lastAbsDelta:Infinity,axisMovement:[0,0,0],axisVelocity:[0,0,0],accelerationFactors:[],scrollPoints:[],scrollPointsToMerge:[],willEndTimeout:400}).isStarted=!0,p.startTime=Date.now(),c=void 0,g=!1},j=function(){clearTimeout(l),l=setTimeout(L,p.willEndTimeout)},L=function(e){void 0===e&&(e=!1),p.isStarted&&(b(p.isMomentum&&e?{isEnding:!0,isMomentumCancel:!0}:{isEnding:!0}),p.isMomentum=!1,p.isStarted=!1)},V=function(e){var t=[],n=function(n){n.removeEventListener("wheel",e),t=t.filter((function(e){return e!==n}))};return i({observe:function(i){return i.addEventListener("wheel",e,{passive:!1}),t.push(i),function(){return n(i)}},unobserve:n,disconnect:function(){t.forEach(n)}})}(M),C=V.observe,F=V.unobserve,W=V.disconnect;return x(s),i({on:f,off:d,observe:C,unobserve:F,disconnect:W,feedWheel:M,updateOptions:x})}({preventWheelAction:y,reverseSign:[!0,!0,!1]}),S=D.observe(w),P=D.on("wheel",(function(e){var t=e.axisDelta,n=t[0],i=t[1],o="x"===y?i:n,r=e.isEnding&&!e.isMomentum||e.isMomentum&&e.previous&&!e.previous.isMomentum;Math.abs("x"===y?n:i)>Math.abs(o)&&!T&&!e.isMomentum&&function(e){try{L(b=new MouseEvent("mousedown",e.event))}catch(e){return m()}T=!0,document.documentElement.addEventListener("mousemove",A,!0),document.documentElement.addEventListener("mouseup",A,!0),document.documentElement.addEventListener("mousedown",A,!0),l.wheelDraggingClass&&w.classList.add(l.wheelDraggingClass)}(e),T&&(r?function(e){T=!1,L(j("mouseup",e)),O(),l.wheelDraggingClass&&w.classList.remove(l.wheelDraggingClass)}(e):L(j("mousemove",e)))})),T=!1;function O(){document.documentElement.removeEventListener("mousemove",A,!0),document.documentElement.removeEventListener("mouseup",A,!0),document.documentElement.removeEventListener("mousedown",A,!0)}function A(e){T&&e.isTrusted&&e.stopImmediatePropagation()}function j(e,t){var n,i;if(y===E.options.axis){var o=t.axisMovement;n=o[0],i=o[1]}else{var r=t.axisMovement;i=r[0],n=r[1]}return new MouseEvent(e,{clientX:b.clientX+n,clientY:b.clientY+i,screenX:b.screenX+n,screenY:b.screenY+i,movementX:n,movementY:i,button:0,bubbles:!0,cancelable:!0,composed:!0})}function L(e){f.containerNode().dispatchEvent(e)}m=function(){S(),P(),O()}},destroy:function(){return m()}}}return u.globalOptions=void 0,u}));;
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarousel=t()}(this,(function(){"use strict";function n(n){return"number"==typeof n}function t(n){return"string"==typeof n}function e(n){return"boolean"==typeof n}function r(n){return"[object Object]"===Object.prototype.toString.call(n)}function o(n){return Math.abs(n)}function i(n){return Math.sign(n)}function c(n,t){return o(n-t)}function u(n){return f(n).map(Number)}function s(n){return n[a(n)]}function a(n){return Math.max(0,n.length-1)}function d(n,t){return t===a(n)}function l(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function f(n){return Object.keys(n)}function p(n,t){return[n,t].reduce(((n,t)=>(f(t).forEach((e=>{const o=n[e],i=t[e],c=r(o)&&r(i);n[e]=c?p(o,i):i})),n)),{})}function m(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function g(){let n=[];const t={add:function(e,r,o,i={passive:!0}){let c;if("addEventListener"in e)e.addEventListener(r,o,i),c=()=>e.removeEventListener(r,o,i);else{const n=e;n.addListener(o),c=()=>n.removeListener(o)}return n.push(c),t},clear:function(){n=n.filter((n=>n()))}};return t}function h(n,t,e,r){const o=g(),i=1e3/60;let c=null,u=0,s=0;function a(n){if(!s)return;c||(c=n);const o=n-c;for(c=n,u+=o;u>=i;)e(i),u-=i;r(u/i),s&&t.requestAnimationFrame(a)}function d(){t.cancelAnimationFrame(s),c=null,u=0,s=0}return{init:function(){o.add(n,"visibilitychange",(()=>{n.hidden&&(c=null,u=0)}))},destroy:function(){d(),o.clear()},start:function(){s||(s=t.requestAnimationFrame(a))},stop:d,update:()=>e(i),render:r}}function x(n=0,t=0){const e=o(n-t);function r(t){return t<n}function i(n){return n>t}function c(n){return r(n)||i(n)}return{length:e,max:t,min:n,constrain:function(e){return c(e)?r(e)?n:t:e},reachedAny:c,reachedMax:i,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function y(n,t,e){const{constrain:r}=x(0,n),i=n+1;let c=u(t);function u(n){return e?o((i+n)%i):r(n)}function s(){return c}function a(){return y(n,s(),e)}const d={get:s,set:function(n){return c=u(n),d},add:function(n){return a().set(s()+n)},clone:a};return d}function v(n,t,r,u,s,a,d,l,f,p,h,y,v,b,S,w,E,L,D){const{cross:I,direction:A}=n,F=["INPUT","SELECT","TEXTAREA"],M={passive:!1},T=g(),O=g(),P=x(50,225).constrain(b.measure(20)),z={mouse:300,touch:400},H={mouse:500,touch:600},k=S?43:25;let V=!1,B=0,C=0,N=!1,R=!1,j=!1,G=!1;function q(n){if(!m(n,u)&&n.touches.length>=2)return U(n);const t=a.readPoint(n),e=a.readPoint(n,I),r=c(t,B),o=c(e,C);if(!R&&!G){if(!n.cancelable)return U(n);if(R=r>o,!R)return U(n)}const i=a.pointerMove(n);r>w&&(j=!0),p.useFriction(.3).useDuration(.75),l.start(),s.add(A(i)),n.preventDefault()}function U(n){const t=h.byDistance(0,!1).index!==y.get(),e=a.pointerUp(n)*(S?H:z)[G?"mouse":"touch"],r=function(n,t){const e=y.add(-1*i(n)),r=h.byDistance(n,!S).distance;return S||o(n)<P?r:E&&t?.5*r:h.byIndex(e.get(),0).distance}(A(e),t),u=function(n,t){if(0===n||0===t)return 0;if(o(n)<=o(t))return 0;const e=c(o(n),o(t));return o(e/n)}(e,r),s=k-10*u,d=L+u/50;R=!1,N=!1,O.clear(),p.useDuration(s).useFriction(d),f.distance(r,!S),G=!1,v.emit("pointerUp")}function W(n){j&&(n.stopPropagation(),n.preventDefault(),j=!1)}return{init:function(n){if(!D)return;function o(o){(e(D)||D(n,o))&&function(n){const e=m(n,u);if(G=e,j=S&&e&&!n.buttons&&V,V=c(s.get(),d.get())>=2,e&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return F.includes(t)}(n.target))return;N=!0,a.pointerDown(n),p.useFriction(0).useDuration(0),s.set(d),function(){const n=G?r:t;O.add(n,"touchmove",q,M).add(n,"touchend",U).add(n,"mousemove",q,M).add(n,"mouseup",U)}(),B=a.readPoint(n),C=a.readPoint(n,I),v.emit("pointerDown")}(o)}const i=t;T.add(i,"dragstart",(n=>n.preventDefault()),M).add(i,"touchmove",(()=>{}),M).add(i,"touchend",(()=>{})).add(i,"touchstart",o).add(i,"mousedown",o).add(i,"touchcancel",U).add(i,"contextmenu",U).add(i,"click",W,!0)},destroy:function(){T.clear(),O.clear()},pointerDown:function(){return N}}}function b(n,t){let e,r;function i(n){return n.timeStamp}function c(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(m(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,c(n)},pointerMove:function(n){const t=c(n)-c(r),o=i(n)-i(e)>170;return r=n,o&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=c(r)-c(e),u=i(n)-i(e),s=i(n)-i(r)>170,a=t/u;return u&&!s&&o(a)>.1?a:0},readPoint:c}}function S(n,t,r,i,c,u,s){const a=[n].concat(i);let d,l,f=[],p=!1;function m(n){return c.measureSize(s.measure(n))}return{init:function(c){u&&(l=m(n),f=i.map(m),d=new ResizeObserver((r=>{(e(u)||u(c,r))&&function(e){for(const r of e){if(p)return;const e=r.target===n,u=i.indexOf(r.target),s=e?l:f[u];if(o(m(e?n:i[u])-s)>=.5){c.reInit(),t.emit("resize");break}}}(r)})),r.requestAnimationFrame((()=>{a.forEach((n=>d.observe(n)))})))},destroy:function(){p=!0,d&&d.disconnect()}}}function w(n,t,e,r,i){const c=i.measure(10),u=i.measure(50),s=x(.1,.99);let a=!1;function d(){return!a&&(!!n.reachedAny(e.get())&&!!n.reachedAny(t.get()))}return{shouldConstrain:d,constrain:function(i){if(!d())return;const a=n.reachedMin(t.get())?"min":"max",l=o(n[a]-t.get()),f=e.get()-t.get(),p=s.constrain(l/u);e.subtract(f*p),!i&&o(f)<c&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){a=!n}}}function E(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:c,reachedMax:u}=x(o,i);return{loop:function(t){if(!function(n){return 1===n?u(e.get()):-1===n&&c(e.get())}(t))return;const o=n*(-1*t);r.forEach((n=>n.add(o)))}}}function L(n,t,e,r,c){const{reachedAny:u,removeOffset:a,constrain:d}=r;function l(n){return n.concat().sort(((n,t)=>o(n)-o(t)))[0]}function f(t,r){const o=[t,t+e,t-e];if(!n)return t;if(!r)return l(o);const c=o.filter((n=>i(n)===r));return c.length?l(c):s(o)-e}return{byDistance:function(e,r){const i=c.get()+e,{index:s,distance:l}=function(e){const r=n?a(e):d(e),i=t.map(((n,t)=>({diff:f(n-r,0),index:t}))).sort(((n,t)=>o(n.diff)-o(t.diff))),{index:c}=i[0];return{index:c,distance:r}}(i),p=!n&&u(i);return!r||p?{index:s,distance:e}:{index:s,distance:e+f(t[s]-l,0)}},byIndex:function(n,e){return{index:n,distance:f(t[n]-c.get(),e)}},shortcut:f}}function D(t,r,o,i,c,u,s,a){const d={passive:!0,capture:!0};let l=0;function f(n){"Tab"===n.code&&(l=(new Date).getTime())}return{init:function(p){a&&(u.add(document,"keydown",f,!1),r.forEach(((r,f)=>{u.add(r,"focus",(r=>{(e(a)||a(p,r))&&function(e){if((new Date).getTime()-l>10)return;s.emit("slideFocusStart"),t.scrollLeft=0;const r=o.findIndex((n=>n.includes(e)));n(r)&&(c.useDuration(0),i.index(r,0),s.emit("slideFocus"))}(f)}),d)})))}}}function I(t){let e=t;function r(t){return n(t)?t:t.get()}return{get:function(){return e},set:function(n){e=r(n)},add:function(n){e+=r(n)},subtract:function(n){e-=r(n)}}}function A(n,t){const e="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},r=t.style;let o=!1;return{clear:function(){o||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){o||(r.transform=e(n.direction(t)))},toggleActive:function(n){o=!n}}}function F(n,t,e,r,o,i,c,s,a){const d=.5,l=u(o),f=u(o).reverse(),p=function(){const n=c[0];return h(g(f,n),e,!1)}().concat(function(){const n=t-c[0]-1;return h(g(l,n),-e,!0)}());function m(n,t){return n.reduce(((n,t)=>n-o[t]),t)}function g(n,t){return n.reduce(((n,e)=>m(n,t)>0?n.concat([e]):n),[])}function h(o,c,u){const l=function(n){return i.map(((e,o)=>({start:e-r[o]+d+n,end:e+t-d+n})))}(c);return o.map((t=>{const r=u?0:-e,o=u?e:0,i=u?"end":"start",c=l[t][i];return{index:t,loopPoint:c,slideLocation:I(-1),translate:A(n,a[t]),target:()=>s.get()>c?r:o}}))}return{canLoop:function(){return p.every((({index:n})=>m(l.filter((t=>t!==n)),t)<=.1))},clear:function(){p.forEach((n=>n.translate.clear()))},loop:function(){p.forEach((n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))}))},loopPoints:p}}function M(n,t,r){let o,i=!1;return{init:function(c){r&&(o=new MutationObserver((n=>{i||(e(r)||r(c,n))&&function(n){for(const e of n)if("childList"===e.type){c.reInit(),t.emit("slidesChanged");break}}(n)})),o.observe(n,{childList:!0}))},destroy:function(){o&&o.disconnect(),i=!0}}}function T(n,t,e,r){const o={};let i,c=null,u=null,s=!1;return{init:function(){i=new IntersectionObserver((n=>{s||(n.forEach((n=>{const e=t.indexOf(n.target);o[e]=n})),c=null,u=null,e.emit("slidesInView"))}),{root:n.parentElement,threshold:r}),t.forEach((n=>i.observe(n)))},destroy:function(){i&&i.disconnect(),s=!0},get:function(n=!0){if(n&&c)return c;if(!n&&u)return u;const t=function(n){return f(o).reduce(((t,e)=>{const r=parseInt(e),{isIntersecting:i}=o[r];return(n&&i||!n&&!i)&&t.push(r),t}),[])}(n);return n&&(c=t),n||(u=t),t}}}function O(t,e,r,i,c,d,l,f,p){const{startEdge:m,endEdge:g,direction:h}=t,x=n(r);return{groupSlides:function(n){return x?function(n,t){return u(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,r):function(n){return n.length?u(n).reduce(((t,r,u)=>{const x=s(t)||0,y=0===x,v=r===a(n),b=c[m]-d[x][m],S=c[m]-d[r][g],w=!i&&y?h(l):0,E=o(S-(!i&&v?h(f):0)-(b+w));return u&&E>e+p&&t.push(r),v&&t.push(n.length),t}),[]).map(((t,e,r)=>{const o=Math.max(r[e-1]||0);return n.slice(o,t)})):[]}(n)}}}function P(n,e,r,f,p,m,P){const{align:z,axis:H,direction:k,startIndex:V,loop:B,duration:C,dragFree:N,dragThreshold:R,inViewThreshold:j,slidesToScroll:G,skipSnaps:q,containScroll:U,watchResize:W,watchSlides:$,watchDrag:Q,watchFocus:X}=m,Y={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:r,offsetHeight:o}=n;return{top:t,right:e+r,bottom:t+o,left:e,width:r,height:o}}},J=Y.measure(e),K=r.map(Y.measure),Z=function(n,t){const e="rtl"===t,r="y"===n,o=!r&&e?-1:1;return{scroll:r?"y":"x",cross:r?"x":"y",startEdge:r?"top":e?"right":"left",endEdge:r?"bottom":e?"left":"right",measureSize:function(n){const{height:t,width:e}=n;return r?t:e},direction:function(n){return n*o}}}(H,k),_=Z.measureSize(J),nn=function(n){return{measure:function(t){return n*(t/100)}}}(_),tn=function(n,e){const r={start:function(){return 0},center:function(n){return o(n)/2},end:o};function o(n){return e-n}return{measure:function(o,i){return t(n)?r[n](o):n(e,o,i)}}}(z,_),en=!B&&!!U,rn=B||!!U,{slideSizes:on,slideSizesWithGaps:cn,startGap:un,endGap:sn}=function(n,t,e,r,i,c){const{measureSize:u,startEdge:a,endEdge:l}=n,f=e[0]&&i,p=function(){if(!f)return 0;const n=e[0];return o(t[a]-n[a])}(),m=function(){if(!f)return 0;const n=c.getComputedStyle(s(r));return parseFloat(n.getPropertyValue(`margin-${l}`))}(),g=e.map(u),h=e.map(((n,t,e)=>{const r=!t,o=d(e,t);return r?g[t]+p:o?g[t]+m:e[t+1][a]-n[a]})).map(o);return{slideSizes:g,slideSizesWithGaps:h,startGap:p,endGap:m}}(Z,J,K,r,rn,p),an=O(Z,_,G,B,J,K,un,sn,2),{snaps:dn,snapsAligned:ln}=function(n,t,e,r,i){const{startEdge:c,endEdge:u}=n,{groupSlides:a}=i,d=a(r).map((n=>s(n)[u]-n[0][c])).map(o).map(t.measure),l=r.map((n=>e[c]-n[c])).map((n=>-o(n))),f=a(l).map((n=>n[0])).map(((n,t)=>n+d[t]));return{snaps:l,snapsAligned:f}}(Z,tn,J,K,an),fn=-s(dn)+s(cn),{snapsContained:pn,scrollContainLimit:mn}=function(n,t,e,r,o){const i=x(-t+n,0),u=e.map(((n,t)=>{const{min:r,max:o}=i,c=i.constrain(n),u=!t,s=d(e,t);return u?o:s||l(r,c)?r:l(o,c)?o:c})).map((n=>parseFloat(n.toFixed(3)))),a=function(){const n=u[0],t=s(u);return x(u.lastIndexOf(n),u.indexOf(t)+1)}();function l(n,t){return c(n,t)<1}return{snapsContained:function(){if(t<=n+o)return[i.max];if("keepSnaps"===r)return u;const{min:e,max:c}=a;return u.slice(e,c)}(),scrollContainLimit:a}}(_,fn,ln,U,2),gn=en?pn:ln,{limit:hn}=function(n,t,e){const r=t[0];return{limit:x(e?r-n:s(t),r)}}(fn,gn,B),xn=y(a(gn),V,B),yn=xn.clone(),vn=u(r),bn=h(f,p,(n=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:r}},o)=>{r||e.constrain(n.pointerDown()),t.seek(o)})(Hn,n)),(n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,scrollLooper:o,slideLooper:i,dragHandler:c,animation:u,eventHandler:s,scrollBounds:a,options:{loop:d}},l)=>{const f=n.settled(),p=!a.shouldConstrain(),m=d?f:f&&p;m&&!c.pointerDown()&&(u.stop(),s.emit("settle")),m||s.emit("scroll");const g=e.get()*l+En.get()*(1-l);r.set(g),d&&(o.loop(n.direction()),i.loop()),t.to(r.get())})(Hn,n))),Sn=gn[xn.get()],wn=I(Sn),En=I(Sn),Ln=I(Sn),Dn=I(Sn),In=function(n,t,e,r,c,u){let s=0,a=0,d=c,l=u,f=n.get(),p=0;function m(n){return d=n,h}function g(n){return l=n,h}const h={direction:function(){return a},duration:function(){return d},velocity:function(){return s},seek:function(t){const o=t/1e3,c=d*o,u=r.get()-n.get();let m=0;return d?(e.set(n),s+=u/c,s*=l,f+=s,n.add(s*o),m=f-p):(s=0,e.set(r),n.set(r),m=u),a=i(m),p=f,h},settled:function(){return o(r.get()-t.get())<.001},useBaseFriction:function(){return g(u)},useBaseDuration:function(){return m(c)},useFriction:g,useDuration:m};return h}(wn,Ln,En,Dn,C,.68),An=L(B,gn,fn,hn,Dn),Fn=function(n,t,e,r,o,i,c){function u(o){const u=o.distance,s=o.index!==t.get();i.add(u),u&&(r.duration()?n.start():(n.update(),n.render(1),n.update())),s&&(e.set(t.get()),t.set(o.index),c.emit("select"))}return{distance:function(n,t){u(o.byDistance(n,t))},index:function(n,e){const r=t.clone().set(n);u(o.byIndex(r.get(),e))}}}(bn,xn,yn,In,An,Dn,P),Mn=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(hn),Tn=g(),On=T(e,r,P,j),{slideRegistry:Pn}=function(n,t,e,r,o,i){const{groupSlides:c}=o,{min:u,max:f}=r;return{slideRegistry:function(){const r=c(i),o=!n||"keepSnaps"===t;return 1===e.length?[i]:o?r:r.slice(u,f).map(((n,t,e)=>{const r=!t,o=d(e,t);return r?l(s(e[0])+1):o?l(a(i)-s(e)[0]+1,s(e)[0]):n}))}()}}(en,U,gn,mn,an,vn),zn=D(n,r,Pn,Fn,In,Tn,P,X),Hn={ownerDocument:f,ownerWindow:p,eventHandler:P,containerRect:J,slideRects:K,animation:bn,axis:Z,dragHandler:v(Z,n,f,p,Dn,b(Z,p),wn,bn,Fn,In,An,xn,P,nn,N,R,q,.68,Q),eventStore:Tn,percentOfView:nn,index:xn,indexPrevious:yn,limit:hn,location:wn,offsetLocation:Ln,previousLocation:En,options:m,resizeHandler:S(e,P,p,r,Z,W,Y),scrollBody:In,scrollBounds:w(hn,Ln,Dn,In,nn),scrollLooper:E(fn,hn,Ln,[wn,Ln,En,Dn]),scrollProgress:Mn,scrollSnapList:gn.map(Mn.get),scrollSnaps:gn,scrollTarget:An,scrollTo:Fn,slideLooper:F(Z,_,fn,on,cn,dn,gn,Ln,r),slideFocus:zn,slidesHandler:M(e,P,$),slidesInView:On,slideIndexes:vn,slideRegistry:Pn,slidesToScroll:an,target:Dn,translate:A(Z,e)};return Hn}const z={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function H(n){function t(n,t){return p(n,t||{})}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=f(r).filter((t=>n.matchMedia(t).matches)).map((n=>r[n])).reduce(((n,e)=>t(n,e)),{});return t(e,o)},optionsMediaQueries:function(t){return t.map((n=>f(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}};return e}function k(n,e,r){const o=n.ownerDocument,i=o.defaultView,c=H(i),u=function(n){let t=[];return{init:function(e,r){return t=r.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(e,n))),r.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(c),s=g(),a=function(){let n,t={};function e(n){return t[n]||[]}const r={init:function(t){n=t},emit:function(t){return e(t).forEach((e=>e(n,t))),r},off:function(n,o){return t[n]=e(n).filter((n=>n!==o)),r},on:function(n,o){return t[n]=e(n).concat([o]),r},clear:function(){t={}}};return r}(),{mergeOptions:d,optionsAtMedia:l,optionsMediaQueries:f}=c,{on:p,off:m,emit:h}=a,x=F;let y,v,b,S,w=!1,E=d(z,k.globalOptions),L=d(E),D=[];function I(t){const e=P(n,b,S,o,i,t,a);if(t.loop&&!e.slideLooper.canLoop()){return I(Object.assign({},t,{loop:!1}))}return e}function A(e,r){w||(E=d(E,e),L=l(E),D=r||D,function(){const{container:e,slides:r}=L,o=t(e)?n.querySelector(e):e;b=o||n.children[0];const i=t(r)?b.querySelectorAll(r):r;S=[].slice.call(i||b.children)}(),y=I(L),f([E,...D.map((({options:n})=>n))]).forEach((n=>s.add(n,"change",F))),L.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(V),y.eventHandler.init(V),y.resizeHandler.init(V),y.slidesHandler.init(V),y.options.loop&&y.slideLooper.loop(),b.offsetParent&&S.length&&y.dragHandler.init(V),v=u.init(V,D)))}function F(n,t){const e=O();M(),A(d({startIndex:e},n),t),a.emit("reInit")}function M(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),u.destroy(),s.clear()}function T(n,t,e){L.active&&!w&&(y.scrollBody.useBaseFriction().useDuration(!0===t?0:L.duration),y.scrollTo.index(n,e||0))}function O(){return y.index.get()}const V={canScrollNext:function(){return y.index.add(1).get()!==O()},canScrollPrev:function(){return y.index.add(-1).get()!==O()},containerNode:function(){return b},internalEngine:function(){return y},destroy:function(){w||(w=!0,s.clear(),M(),a.emit("destroy"),a.clear())},off:m,on:p,emit:h,plugins:function(){return v},previousScrollSnap:function(){return y.indexPrevious.get()},reInit:x,rootNode:function(){return n},scrollNext:function(n){T(y.index.add(1).get(),n,-1)},scrollPrev:function(n){T(y.index.add(-1).get(),n,1)},scrollProgress:function(){return y.scrollProgress.get(y.location.get())},scrollSnapList:function(){return y.scrollSnapList},scrollTo:T,selectedScrollSnap:O,slideNodes:function(){return S},slidesInView:function(){return y.slidesInView.get()},slidesNotInView:function(){return y.slidesInView.get(!1)}};return A(e,r),setTimeout((()=>a.emit("init")),0),V}return k.globalOptions=void 0,k}));
;
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";function e(e){var t=!0,n=!1,o=null,d={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function i(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function u(e){t=!1}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",function(n){n.metaKey||n.altKey||n.ctrlKey||(i(e.activeElement)&&s(e.activeElement),t=!0)},!0),document.addEventListener("mousedown",u,!0),document.addEventListener("pointerdown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("visibilitychange",function(e){"hidden"===document.visibilityState&&(n&&(t=!0),a())},!0),a(),e.addEventListener("focus",function(e){var n,o,u;i(e.target)&&(t||(n=e.target,o=n.type,"INPUT"===(u=n.tagName)&&d[o]&&!n.readOnly||"TEXTAREA"===u&&!n.readOnly||n.isContentEditable))&&s(e.target)},!0),e.addEventListener("blur",function(e){var t;i(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(o),o=window.setTimeout(function(){n=!1},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))},!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)});
//# sourceMappingURL=focus-visible.min.js.map
;

/**
 * Cloudinary's JavaScript library - Version 2.5.0
 * Copyright Cloudinary
 * see https://github.com/cloudinary/cloudinary_js
 *
 */
var slice = [].slice,
	extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
	hasProp = {}.hasOwnProperty;

(function(root, factory) {
	var name, ref, results, value;
	if ((typeof define === 'function') && define.amd) {
		return define(['jquery'], factory);
	} else if (typeof exports === 'object') {
		return module.exports = factory(require('jquery'));
	} else {
		root.cloudinary || (root.cloudinary = {});
		ref = factory(jQuery);
		results = [];
		for (name in ref) {
			value = ref[name];
			results.push(root.cloudinary[name] = value);
		}
		return results;
	}
})(this, function(jQuery) {
	
	/*
   * Includes common utility methods and shims
   */
	
	/**
	 * Return true if all items in list are strings
	 * @function Util.allString
	 * @param {Array} list - an array of items
	 */
	var ArrayParam, BaseUtil, ClientHintsMetaTag, Cloudinary, CloudinaryJQuery, Condition, Configuration, Expression, ExpressionParam, FetchLayer, HtmlTag, ImageTag, Layer, LayerParam, Param, RangeParam, RawParam, SubtitlesLayer, TextLayer, Transformation, TransformationBase, TransformationParam, Util, VideoTag, addClass, allStrings, base64Encode, base64EncodeURL, camelCase, cloneDeep, cloudinary, compact, contains, convertKeys, crc32, defaults, difference, funcTag, functions, getAttribute, getData, hasClass, identity, isEmpty, isFunction, isNumberLike, isObject, isString, m, merge, objToString, objectProto, parameters, reWords, removeAttribute, setAttribute, setAttributes, setData, smartEscape, snakeCase, utf8_encode, webp, width, withCamelCaseKeys, withSnakeCaseKeys, without;
	allStrings = function(list) {
		var item, j, len;
		for (j = 0, len = list.length; j < len; j++) {
			item = list[j];
			if (!Util.isString(item)) {
				return false;
			}
		}
		return true;
	};
	
	/**
	 * Creates a new array without the given item.
	 * @function Util.without
	 * @param {Array} array - original array
	 * @param {*} item - the item to exclude from the new array
	 * @return {Array} a new array made of the original array's items except for `item`
	 */
	without = function(array, item) {
		var i, length, newArray;
		newArray = [];
		i = -1;
		length = array.length;
		while (++i < length) {
			if (array[i] !== item) {
				newArray.push(array[i]);
			}
		}
		return newArray;
	};
	
	/**
	 * Return true is value is a number or a string representation of a number.
	 * @function Util.isNumberLike
	 * @param {*} value
	 * @returns {boolean} true if value is a number
	 * @example
	 *    Util.isNumber(0) // true
	 *    Util.isNumber("1.3") // true
	 *    Util.isNumber("") // false
	 *    Util.isNumber(undefined) // false
	 */
	isNumberLike = function(value) {
		return (value != null) && !isNaN(parseFloat(value));
	};
	
	/**
	 * Escape all characters matching unsafe in the given string
	 * @function Util.smartEscape
	 * @param {string} string - source string to escape
	 * @param {RegExp} unsafe - characters that must be escaped
	 * @return {string} escaped string
	 */
	smartEscape = function(string, unsafe) {
		if (unsafe == null) {
			unsafe = /([^a-zA-Z0-9_.\-\/:]+)/g;
		}
		return string.replace(unsafe, function(match) {
			return match.split("").map(function(c) {
				return "%" + c.charCodeAt(0).toString(16).toUpperCase();
			}).join("");
		});
	};
	
	/**
	 * Assign values from sources if they are not defined in the destination.
	 * Once a value is set it does not change
	 * @function Util.defaults
	 * @param {Object} destination - the object to assign defaults to
	 * @param {...Object} source - the source object(s) to assign defaults from
	 * @return {Object} destination after it was modified
	 */
	defaults = function() {
		var destination, sources;
		destination = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : [];
		return sources.reduce(function(dest, source) {
			var key, value;
			for (key in source) {
				value = source[key];
				if (dest[key] === void 0) {
					dest[key] = value;
				}
			}
			return dest;
		}, destination);
	};
	
	/*********** lodash functions */
	objectProto = Object.prototype;
	
	/**
	 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
	 * of values.
	 */
	objToString = objectProto.toString;
	
	/**
	 * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
	 * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
	 *
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
	 * @example
	 *
  #isObject({});
	 * // => true
	 *
  #isObject([1, 2, 3]);
	 * // => true
	 *
  #isObject(1);
	 * // => false
	 */
	isObject = function(value) {
		var type;
		type = typeof value;
		return !!value && (type === 'object' || type === 'function');
	};
	funcTag = '[object Function]';
	
	/**
	 * Checks if `value` is classified as a `Function` object.
	 * @function Util.isFunction
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
	 * @example
	 *
	 * function Foo(){};
	 * isFunction(Foo);
	 * // => true
	 *
	 * isFunction(/abc/);
	 * // => false
	 */
	isFunction = function(value) {
		return isObject(value) && objToString.call(value) === funcTag;
	};
	
	/*********** lodash functions */
	
	/** Used to match words to create compound words. */
	reWords = (function() {
		var lower, upper;
		upper = '[A-Z]';
		lower = '[a-z]+';
		return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g');
	})();
	
	/**
	 * Convert string to camelCase
	 * @function Util.camelCase
	 * @param {string} string - the string to convert
	 * @return {string} in camelCase format
	 */
	camelCase = function(source) {
		var i, word, words;
		words = source.match(reWords);
		words = (function() {
			var j, len, results;
			results = [];
			for (i = j = 0, len = words.length; j < len; i = ++j) {
				word = words[i];
				word = word.toLocaleLowerCase();
				if (i) {
					results.push(word.charAt(0).toLocaleUpperCase() + word.slice(1));
				} else {
					results.push(word);
				}
			}
			return results;
		})();
		return words.join('');
	};
	
	/**
	 * Convert string to snake_case
	 * @function Util.snakeCase
	 * @param {string} string - the string to convert
	 * @return {string} in snake_case format
	 */
	snakeCase = function(source) {
		var i, word, words;
		words = source.match(reWords);
		words = (function() {
			var j, len, results;
			results = [];
			for (i = j = 0, len = words.length; j < len; i = ++j) {
				word = words[i];
				results.push(word.toLocaleLowerCase());
			}
			return results;
		})();
		return words.join('_');
	};
	convertKeys = function(source, converter) {
		var key, result, value;
		if (converter == null) {
			converter = Util.identity;
		}
		result = {};
		for (key in source) {
			value = source[key];
			key = converter(key);
			if (!Util.isEmpty(key)) {
				result[key] = value;
			}
		}
		return result;
	};
	
	/**
	 * Create a copy of the source object with all keys in camelCase
	 * @function Util.withCamelCaseKeys
	 * @param {Object} value - the object to copy
	 * @return {Object} a new object
	 */
	withCamelCaseKeys = function(source) {
		return convertKeys(source, Util.camelCase);
	};
	
	/**
	 * Create a copy of the source object with all keys in snake_case
	 * @function Util.withSnakeCaseKeys
	 * @param {Object} value - the object to copy
	 * @return {Object} a new object
	 */
	withSnakeCaseKeys = function(source) {
		return convertKeys(source, Util.snakeCase);
	};
	base64Encode = typeof btoa !== 'undefined' && isFunction(btoa) ? btoa : typeof Buffer !== 'undefined' && isFunction(Buffer) ? function(input) {
		if (!(input instanceof Buffer)) {
			input = new Buffer.from(String(input), 'binary');
		}
		return input.toString('base64');
	} : function(input) {
		throw new Error("No base64 encoding function found");
	};
	
	/**
	 * Returns the Base64-decoded version of url.<br>
	 * This method delegates to `btoa` if present. Otherwise it tries `Buffer`.
	 * @function Util.base64EncodeURL
	 * @param {string} url - the url to encode. the value is URIdecoded and then re-encoded before converting to base64 representation
	 * @return {string} the base64 representation of the URL
	 */
	base64EncodeURL = function(input) {
		var error1, ignore;
		try {
			input = decodeURI(input);
		} catch (error1) {
			ignore = error1;
		}
		input = encodeURI(input);
		return base64Encode(input);
	};
	BaseUtil = {
		allStrings: allStrings,
		camelCase: camelCase,
		convertKeys: convertKeys,
		defaults: defaults,
		snakeCase: snakeCase,
		without: without,
		isFunction: isFunction,
		isNumberLike: isNumberLike,
		smartEscape: smartEscape,
		withCamelCaseKeys: withCamelCaseKeys,
		withSnakeCaseKeys: withSnakeCaseKeys,
		base64EncodeURL: base64EncodeURL
	};
	
	/**
	 * Includes utility methods and lodash / jQuery shims
	 */
	
	/**
	 * Get data from the DOM element.
	 *
	 * This method will use jQuery's `data()` method if it is available, otherwise it will get the `data-` attribute
	 * @param {Element} element - the element to get the data from
	 * @param {string} name - the name of the data item
	 * @returns the value associated with the `name`
	 * @function Util.getData
	 */
	getData = function(element, name) {
		return jQuery(element).data(name);
	};
	
	/**
	 * Set data in the DOM element.
	 *
	 * This method will use jQuery's `data()` method if it is available, otherwise it will set the `data-` attribute
	 * @function Util.setData
	 * @param {Element} element - the element to set the data in
	 * @param {string} name - the name of the data item
	 * @param {*} value - the value to be set
	 *
	 */
	setData = function(element, name, value) {
		return jQuery(element).data(name, value);
	};
	
	/**
	 * Get attribute from the DOM element.
	 *
	 * This method will use jQuery's `attr()` method if it is available, otherwise it will get the attribute directly
	 * @function Util.getAttribute
	 * @param {Element} element - the element to set the attribute for
	 * @param {string} name - the name of the attribute
	 * @returns {*} the value of the attribute
	 *
	 */
	getAttribute = function(element, name) {
		return jQuery(element).attr(name);
	};
	
	/**
	 * Set attribute in the DOM element.
	 *
	 * This method will use jQuery's `attr()` method if it is available, otherwise it will set the attribute directly
	 * @function Util.setAttribute
	 * @param {Element} element - the element to set the attribute for
	 * @param {string} name - the name of the attribute
	 * @param {*} value - the value to be set
	 */
	setAttribute = function(element, name, value) {
		return jQuery(element).attr(name, value);
	};
	
	/**
	 * Remove an attribute in the DOM element.
	 *
	 * @function Util.removeAttribute
	 * @param {Element} element - the element to set the attribute for
	 * @param {string} name - the name of the attribute
	 */
	removeAttribute = function(element, name) {
		return jQuery(element).removeAttr(name);
	};
	
	/**
	 * Set a group of attributes to the element
	 * @function Util.setAttributes
	 * @param {Element} element - the element to set the attributes for
	 * @param {Object} attributes - a hash of attribute names and values
	 */
	setAttributes = function(element, attributes) {
		return jQuery(element).attr(attributes);
	};
	
	/**
	 * Checks if element has a css class
	 * @function Util.hasClass
	 * @param {Element} element - the element to check
	 * @param {string} name - the class name
    @returns {boolean} true if the element has the class
	 */
	hasClass = function(element, name) {
		return jQuery(element).hasClass(name);
	};
	
	/**
	 * Add class to the element
	 * @function Util.addClass
	 * @param {Element} element - the element
	 * @param {string} name - the class name to add
	 */
	addClass = function(element, name) {
		return jQuery(element).addClass(name);
	};
	width = function(element) {
		return jQuery(element).width();
	};
	
	/**
	 * Returns true if item is empty:
	 * <ul>
	 *   <li>item is null or undefined</li>
	 *   <li>item is an array or string of length 0</li>
	 *   <li>item is an object with no keys</li>
	 * </ul>
	 * @function Util.isEmpty
	 * @param item
	 * @returns {boolean} true if item is empty
	 */
	isEmpty = function(item) {
		return (item == null) || (jQuery.isArray(item) || Util.isString(item)) && item.length === 0 || (jQuery.isPlainObject(item) && jQuery.isEmptyObject(item));
	};
	
	/**
	 * Returns true if item is a string
	 * @param item
	 * @returns {boolean} true if item is a string
	 */
	isString = function(item) {
		return typeof item === 'string' || (item != null ? item.toString() : void 0) === '[object String]';
	};
	
	/**
	 * Recursively assign source properties to destination
	 * @function Util.merge
	 * @param {Object} destination - the object to assign to
	 * @param {...Object} [sources] The source objects.
	 */
	merge = function() {
		var args, i;
		args = (function() {
			var j, len, results;
			results = [];
			for (j = 0, len = arguments.length; j < len; j++) {
				i = arguments[j];
				results.push(i);
			}
			return results;
		}).apply(this, arguments);
		args.unshift(true);
		return jQuery.extend.apply(this, args);
	};
	
	/**
	 * Creates a new array from the parameter with "falsey" values removed
	 * @function Util.compact
	 * @param {Array} array - the array to remove values from
	 * @return {Array} a new array without falsey values
	 */
	compact = function(arr) {
		var item, j, len, results;
		results = [];
		for (j = 0, len = arr.length; j < len; j++) {
			item = arr[j];
			if (item) {
				results.push(item);
			}
		}
		return results;
	};
	
	/**
	 * Create a new copy of the given object, including all internal objects.
	 * @function Util.cloneDeep
	 * @param {Object} value - the object to clone
	 * @return {Object} a new deep copy of the object
	 */
	cloneDeep = function() {
		var args;
		args = jQuery.makeArray(arguments);
		args.unshift({});
		args.unshift(true);
		return jQuery.extend.apply(this, args);
	};
	
	/**
	 * Check if a given item is included in the given array
	 * @function Util.contains
	 * @param {Array} array - the array to search in
	 * @param {*} item - the item to search for
	 * @return {boolean} true if the item is included in the array
	 */
	contains = function(arr, item) {
		var i, j, len;
		for (j = 0, len = arr.length; j < len; j++) {
			i = arr[j];
			if (i === item) {
				return true;
			}
		}
		return false;
	};
	
	/**
	 * Returns values in the given array that are not included in the other array
	 * @function Util.difference
	 * @param {Array} arr - the array to select from
	 * @param {Array} values - values to filter from arr
	 * @return {Array} the filtered values
	 */
	difference = function(arr, values) {
		var item, j, len, results;
		results = [];
		for (j = 0, len = arr.length; j < len; j++) {
			item = arr[j];
			if (!contains(values, item)) {
				results.push(item);
			}
		}
		return results;
	};
	
	/**
	 * Returns a list of all the function names in obj
	 * @function Util.functions
	 * @param {Object} object - the object to inspect
	 * @return {Array} a list of functions of object
	 */
	functions = function(object) {
		var i, results;
		results = [];
		for (i in object) {
			if (jQuery.isFunction(object[i])) {
				results.push(i);
			}
		}
		return results;
	};
	
	/**
	 * Returns the provided value. This functions is used as a default predicate function.
	 * @function Util.identity
	 * @param {*} value
	 * @return {*} the provided value
	 */
	identity = function(value) {
		return value;
	};
	
	/**
	 * @class Util
	 */
	Util = jQuery.extend(BaseUtil, {
		hasClass: hasClass,
		addClass: addClass,
		getAttribute: getAttribute,
		setAttribute: setAttribute,
		removeAttribute: removeAttribute,
		setAttributes: setAttributes,
		getData: getData,
		setData: setData,
		width: width,
		isString: isString,
		isArray: jQuery.isArray,
		isEmpty: isEmpty,
		
		/**
		 * Assign source properties to destination.
		 * If the property is an object it is assigned as a whole, overriding the destination object.
		 * @function Util.assign
		 * @param {Object} destination - the object to assign to
		 */
		assign: jQuery.extend,
		merge: merge,
		cloneDeep: cloneDeep,
		compact: compact,
		contains: contains,
		difference: difference,
		functions: functions,
		identity: identity,
		isPlainObject: jQuery.isPlainObject,
		
		/**
		 * Remove leading or trailing spaces from text
		 * @function Util.trim
		 * @param {string} text
		 * @return {string} the `text` without leading or trailing spaces
		 */
		trim: jQuery.trim
	});
	
	/**
	 * UTF8 encoder
	 *
	 */
	utf8_encode = function(argString) {
		var c1, enc, end, n, start, string, stringl, utftext;
		if (argString === null || typeof argString === 'undefined') {
			return '';
		}
		string = argString + '';
		utftext = '';
		start = void 0;
		end = void 0;
		stringl = 0;
		start = end = 0;
		stringl = string.length;
		n = 0;
		while (n < stringl) {
			c1 = string.charCodeAt(n);
			enc = null;
			if (c1 < 128) {
				end++;
			} else if (c1 > 127 && c1 < 2048) {
				enc = String.fromCharCode(c1 >> 6 | 192, c1 & 63 | 128);
			} else {
				enc = String.fromCharCode(c1 >> 12 | 224, c1 >> 6 & 63 | 128, c1 & 63 | 128);
			}
			if (enc !== null) {
				if (end > start) {
					utftext += string.slice(start, end);
				}
				utftext += enc;
				start = end = n + 1;
			}
			n++;
		}
		if (end > start) {
			utftext += string.slice(start, stringl);
		}
		return utftext;
	};
	
	/**
	 * CRC32 calculator
	 * Depends on 'utf8_encode'
	 */
	crc32 = function(str) {
		var crc, i, iTop, table, x, y;
		str = utf8_encode(str);
		table = '00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D';
		crc = 0;
		x = 0;
		y = 0;
		crc = crc ^ -1;
		i = 0;
		iTop = str.length;
		while (i < iTop) {
			y = (crc ^ str.charCodeAt(i)) & 0xFF;
			x = '0x' + table.substr(y * 9, 8);
			crc = crc >>> 8 ^ x;
			i++;
		}
		crc = crc ^ -1;
		if (crc < 0) {
			crc += 4294967296;
		}
		return crc;
	};
	Layer = (function() {
		
		/**
		 * Layer
		 * @constructor Layer
		 * @param {Object} options - layer parameters
		 */
		function Layer(options) {
			this.options = {};
			if (options != null) {
				["resourceType", "type", "publicId", "format"].forEach((function(_this) {
					return function(key) {
						var ref;
						return _this.options[key] = (ref = options[key]) != null ? ref : options[Util.snakeCase(key)];
					};
				})(this));
			}
		}
		
		Layer.prototype.resourceType = function(value) {
			this.options.resourceType = value;
			return this;
		};
		
		Layer.prototype.type = function(value) {
			this.options.type = value;
			return this;
		};
		
		Layer.prototype.publicId = function(value) {
			this.options.publicId = value;
			return this;
		};
		
		
		/**
		 * Get the public ID, formatted for layer parameter
		 * @function Layer#getPublicId
		 * @return {String} public ID
		 */
		
		Layer.prototype.getPublicId = function() {
			var ref;
			return (ref = this.options.publicId) != null ? ref.replace(/\//g, ":") : void 0;
		};
		
		
		/**
		 * Get the public ID, with format if present
		 * @function Layer#getFullPublicId
		 * @return {String} public ID
		 */
		
		Layer.prototype.getFullPublicId = function() {
			if (this.options.format != null) {
				return this.getPublicId() + "." + this.options.format;
			} else {
				return this.getPublicId();
			}
		};
		
		Layer.prototype.format = function(value) {
			this.options.format = value;
			return this;
		};
		
		
		/**
		 * generate the string representation of the layer
		 * @function Layer#toString
		 */
		
		Layer.prototype.toString = function() {
			var components;
			components = [];
			if (this.options.publicId == null) {
				throw "Must supply publicId";
			}
			if (!(this.options.resourceType === "image")) {
				components.push(this.options.resourceType);
			}
			if (!(this.options.type === "upload")) {
				components.push(this.options.type);
			}
			components.push(this.getFullPublicId());
			return Util.compact(components).join(":");
		};
		
		return Layer;
		
	})();
	FetchLayer = (function(superClass) {
		extend(FetchLayer, superClass);
		
		
		/**
		 * @constructor FetchLayer
		 * @param {Object|string} options - layer parameters or a url
		 * @param {string} options.url the url of the image to fetch
		 */
		
		function FetchLayer(options) {
			FetchLayer.__super__.constructor.call(this, options);
			if (Util.isString(options)) {
				this.options.url = options;
			} else if (options != null ? options.url : void 0) {
				this.options.url = options.url;
			}
		}
		
		FetchLayer.prototype.url = function(url) {
			this.options.url = url;
			return this;
		};
		
		
		/**
		 * generate the string representation of the layer
		 * @function FetchLayer#toString
		 * @return {String}
		 */
		
		FetchLayer.prototype.toString = function() {
			return "fetch:" + (cloudinary.Util.base64EncodeURL(this.options.url));
		};
		
		return FetchLayer;
		
	})(Layer);
	TextLayer = (function(superClass) {
		extend(TextLayer, superClass);
		
		
		/**
		 * @constructor TextLayer
		 * @param {Object} options - layer parameters
		 */
		
		function TextLayer(options) {
			var keys;
			TextLayer.__super__.constructor.call(this, options);
			keys = ["resourceType", "resourceType", "fontFamily", "fontSize", "fontWeight", "fontStyle", "textDecoration", "textAlign", "stroke", "letterSpacing", "lineSpacing", "fontHinting", "fontAntialiasing", "text", "textStyle"];
			if (options != null) {
				keys.forEach((function(_this) {
					return function(key) {
						var ref;
						return _this.options[key] = (ref = options[key]) != null ? ref : options[Util.snakeCase(key)];
					};
				})(this));
			}
			this.options.resourceType = "text";
		}
		
		TextLayer.prototype.resourceType = function(resourceType) {
			throw "Cannot modify resourceType for text layers";
		};
		
		TextLayer.prototype.type = function(type) {
			throw "Cannot modify type for text layers";
		};
		
		TextLayer.prototype.format = function(format) {
			throw "Cannot modify format for text layers";
		};
		
		TextLayer.prototype.fontFamily = function(fontFamily) {
			this.options.fontFamily = fontFamily;
			return this;
		};
		
		TextLayer.prototype.fontSize = function(fontSize) {
			this.options.fontSize = fontSize;
			return this;
		};
		
		TextLayer.prototype.fontWeight = function(fontWeight) {
			this.options.fontWeight = fontWeight;
			return this;
		};
		
		TextLayer.prototype.fontStyle = function(fontStyle) {
			this.options.fontStyle = fontStyle;
			return this;
		};
		
		TextLayer.prototype.textDecoration = function(textDecoration) {
			this.options.textDecoration = textDecoration;
			return this;
		};
		
		TextLayer.prototype.textAlign = function(textAlign) {
			this.options.textAlign = textAlign;
			return this;
		};
		
		TextLayer.prototype.stroke = function(stroke) {
			this.options.stroke = stroke;
			return this;
		};
		
		TextLayer.prototype.letterSpacing = function(letterSpacing) {
			this.options.letterSpacing = letterSpacing;
			return this;
		};
		
		TextLayer.prototype.lineSpacing = function(lineSpacing) {
			this.options.lineSpacing = lineSpacing;
			return this;
		};
		
		TextLayer.prototype.fontAntialiasing = function(fontAntialiasing){
			this.options.fontAntialiasing = fontAntialiasing;
			return this;
		};
		
		TextLayer.prototype.fontHinting = function(fontHinting ){
			this.options.fontHinting  = fontHinting ;
			return this;
		};
		
		TextLayer.prototype.text = function(text) {
			this.options.text = text;
			return this;
		};
		
		TextLayer.prototype.textStyle = function(textStyle) {
			this.options.textStyle = textStyle;
			return this;
		};
		
		
		/**
		 * generate the string representation of the layer
		 * @function TextLayer#toString
		 * @return {String}
		 */
		
		TextLayer.prototype.toString = function() {
			var components, hasPublicId, hasStyle, publicId, re, res, start, style, text, textSource;
			style = this.textStyleIdentifier();
			if (this.options.publicId != null) {
				publicId = this.getFullPublicId();
			}
			if (this.options.text != null) {
				hasPublicId = !Util.isEmpty(publicId);
				hasStyle = !Util.isEmpty(style);
				if (hasPublicId && hasStyle || !hasPublicId && !hasStyle) {
					throw "Must supply either style parameters or a public_id when providing text parameter in a text overlay/underlay, but not both!";
				}
				re = /\$\([a-zA-Z]\w*\)/g;
				start = 0;
				textSource = Util.smartEscape(this.options.text, /[,\/]/g);
				text = "";
				while (res = re.exec(textSource)) {
					text += Util.smartEscape(textSource.slice(start, res.index));
					text += res[0];
					start = res.index + res[0].length;
				}
				text += Util.smartEscape(textSource.slice(start));
			}
			components = [this.options.resourceType, style, publicId, text];
			return Util.compact(components).join(":");
		};
		
		TextLayer.prototype.textStyleIdentifier = function() {
			// Note: if a text-style argument is provided as a whole, it overrides everything else, no mix and match.
			if (!Util.isEmpty(this.options.textStyle)) {
				return this.options.textStyle;
			}
			var components;
			components = [];
			if (this.options.fontWeight !== "normal") {
				components.push(this.options.fontWeight);
			}
			if (this.options.fontStyle !== "normal") {
				components.push(this.options.fontStyle);
			}
			if (this.options.textDecoration !== "none") {
				components.push(this.options.textDecoration);
			}
			components.push(this.options.textAlign);
			if (this.options.stroke !== "none") {
				components.push(this.options.stroke);
			}
			if (!(Util.isEmpty(this.options.letterSpacing) && !Util.isNumberLike(this.options.letterSpacing))) {
				components.push("letter_spacing_" + this.options.letterSpacing);
			}
			if (!(Util.isEmpty(this.options.lineSpacing) && !Util.isNumberLike(this.options.lineSpacing))) {
				components.push("line_spacing_" + this.options.lineSpacing);
			}
			if (this.options.fontAntialiasing !== "none") {
				components.push("antialias_"+this.options.fontAntialiasing);
			}
			if (this.options.fontHinting !== "none") {
				components.push("hinting_"+this.options.fontHinting);
			}
			if (!Util.isEmpty(Util.compact(components))) {
				if (Util.isEmpty(this.options.fontFamily)) {
					throw "Must supply fontFamily. " + components;
				}
				if (Util.isEmpty(this.options.fontSize) && !Util.isNumberLike(this.options.fontSize)) {
					throw "Must supply fontSize.";
				}
			}
			components.unshift(this.options.fontFamily, this.options.fontSize);
			components = Util.compact(components).join("_");
			return components;
		};
		
		return TextLayer;
		
	})(Layer);
	SubtitlesLayer = (function(superClass) {
		extend(SubtitlesLayer, superClass);
		
		
		/**
		 * Represent a subtitles layer
		 * @constructor SubtitlesLayer
		 * @param {Object} options - layer parameters
		 */
		
		function SubtitlesLayer(options) {
			SubtitlesLayer.__super__.constructor.call(this, options);
			this.options.resourceType = "subtitles";
		}
		
		return SubtitlesLayer;
		
	})(TextLayer);
	
	/**
	 * Transformation parameters
	 * Depends on 'util', 'transformation'
	 */
	Param = (function() {
		
		/**
		 * Represents a single parameter
		 * @class Param
		 * @param {string} name - The name of the parameter in snake_case
		 * @param {string} shortName - The name of the serialized form of the parameter.
		 *                         If a value is not provided, the parameter will not be serialized.
		 * @param {function} [process=cloudinary.Util.identity ] - Manipulate origValue when value is called
		 * @ignore
		 */
		function Param(name, shortName, process) {
			if (process == null) {
				process = cloudinary.Util.identity;
			}
			
			/**
			 * The name of the parameter in snake_case
			 * @member {string} Param#name
			 */
			this.name = name;
			
			/**
			 * The name of the serialized form of the parameter
			 * @member {string} Param#shortName
			 */
			this.shortName = shortName;
			
			/**
			 * Manipulate origValue when value is called
			 * @member {function} Param#process
			 */
			this.process = process;
		}
		
		
		/**
		 * Set a (unprocessed) value for this parameter
		 * @function Param#set
		 * @param {*} origValue - the value of the parameter
		 * @return {Param} self for chaining
		 */
		
		Param.prototype.set = function(origValue) {
			this.origValue = origValue;
			return this;
		};
		
		
		/**
		 * Generate the serialized form of the parameter
		 * @function Param#serialize
		 * @return {string} the serialized form of the parameter
		 */
		
		Param.prototype.serialize = function() {
			var val, valid;
			val = this.value();
			valid = cloudinary.Util.isArray(val) || cloudinary.Util.isPlainObject(val) || cloudinary.Util.isString(val) ? !cloudinary.Util.isEmpty(val) : val != null;
			if ((this.shortName != null) && valid) {
				return this.shortName + "_" + val;
			} else {
				return '';
			}
		};
		
		
		/**
		 * Return the processed value of the parameter
		 * @function Param#value
		 */
		
		Param.prototype.value = function() {
			return this.process(this.origValue);
		};
		
		Param.norm_color = function(value) {
			return value != null ? value.replace(/^#/, 'rgb:') : void 0;
		};
		
		Param.prototype.build_array = function(arg) {
			if (arg == null) {
				arg = [];
			}
			if (cloudinary.Util.isArray(arg)) {
				return arg;
			} else {
				return [arg];
			}
		};
		
		
		/**
		 * Covert value to video codec string.
		 *
		 * If the parameter is an object,
		 * @param {(string|Object)} param - the video codec as either a String or a Hash
		 * @return {string} the video codec string in the format codec:profile:level:b_frames
		 * @example
		 * vc_[ :profile : [level : [b_frames]]]
		 * or
      { codec: 'h264', profile: 'basic', level: '3.1', b_frames: false }
		 * @ignore
		 */
		
		Param.process_video_params = function(param) {
			var video;
			switch (param.constructor) {
				case Object:
					video = "";
					if ('codec' in param) {
						video = param['codec'];
						if ('profile' in param) {
							video += ":" + param['profile'];
							if ('level' in param) {
								video += ":" + param['level'];
								if ('b_frames' in param && param['b_frames'] === false) {
									video += ":bframes_no";
								}
							}
						}
					}
					return video;
				case String:
					return param;
				default:
					return null;
			}
		};
		
		return Param;
		
	})();
	ArrayParam = (function(superClass) {
		extend(ArrayParam, superClass);
		
		
		/**
		 * A parameter that represents an array
		 * @param {string} name - The name of the parameter in snake_case
		 * @param {string} shortName - The name of the serialized form of the parameter
		 *                         If a value is not provided, the parameter will not be serialized.
		 * @param {string} [sep='.'] - The separator to use when joining the array elements together
		 * @param {function} [process=cloudinary.Util.identity ] - Manipulate origValue when value is called
		 * @class ArrayParam
		 * @extends Param
		 * @ignore
		 */
		
		function ArrayParam(name, shortName, sep, process) {
			if (sep == null) {
				sep = '.';
			}
			this.sep = sep;
			ArrayParam.__super__.constructor.call(this, name, shortName, process);
		}
		
		ArrayParam.prototype.serialize = function() {
			var arrayValue, flat, t;
			if (this.shortName != null) {
				arrayValue = this.value();
				if (cloudinary.Util.isEmpty(arrayValue)) {
					return '';
				} else if (cloudinary.Util.isString(arrayValue)) {
					return this.shortName + "_" + arrayValue;
				} else {
					flat = (function() {
						var j, len, results;
						results = [];
						for (j = 0, len = arrayValue.length; j < len; j++) {
							t = arrayValue[j];
							if (cloudinary.Util.isFunction(t.serialize)) {
								results.push(t.serialize());
							} else {
								results.push(t);
							}
						}
						return results;
					})();
					return this.shortName + "_" + (flat.join(this.sep));
				}
			} else {
				return '';
			}
		};
		
		ArrayParam.prototype.value = function() {
			var j, len, ref, results, v;
			if (cloudinary.Util.isArray(this.origValue)) {
				ref = this.origValue;
				results = [];
				for (j = 0, len = ref.length; j < len; j++) {
					v = ref[j];
					results.push(this.process(v));
				}
				return results;
			} else {
				return this.process(this.origValue);
			}
		};
		
		ArrayParam.prototype.set = function(origValue) {
			if ((origValue == null) || cloudinary.Util.isArray(origValue)) {
				return ArrayParam.__super__.set.call(this, origValue);
			} else {
				return ArrayParam.__super__.set.call(this, [origValue]);
			}
		};
		
		return ArrayParam;
		
	})(Param);
	TransformationParam = (function(superClass) {
		extend(TransformationParam, superClass);
		
		
		/**
		 * A parameter that represents a transformation
		 * @param {string} name - The name of the parameter in snake_case
		 * @param {string} [shortName='t'] - The name of the serialized form of the parameter
		 * @param {string} [sep='.'] - The separator to use when joining the array elements together
		 * @param {function} [process=cloudinary.Util.identity ] - Manipulate origValue when value is called
		 * @class TransformationParam
		 * @extends Param
		 * @ignore
		 */
		
		function TransformationParam(name, shortName, sep, process) {
			if (shortName == null) {
				shortName = "t";
			}
			if (sep == null) {
				sep = '.';
			}
			this.sep = sep;
			TransformationParam.__super__.constructor.call(this, name, shortName, process);
		}
		
		TransformationParam.prototype.serialize = function() {
			var joined, result, t;
			if (cloudinary.Util.isEmpty(this.value())) {
				return '';
			} else if (cloudinary.Util.allStrings(this.value())) {
				joined = this.value().join(this.sep);
				if (!cloudinary.Util.isEmpty(joined)) {
					return this.shortName + "_" + joined;
				} else {
					return '';
				}
			} else {
				result = (function() {
					var j, len, ref, results;
					ref = this.value();
					results = [];
					for (j = 0, len = ref.length; j < len; j++) {
						t = ref[j];
						if (t != null) {
							if (cloudinary.Util.isString(t) && !cloudinary.Util.isEmpty(t)) {
								results.push(this.shortName + "_" + t);
							} else if (cloudinary.Util.isFunction(t.serialize)) {
								results.push(t.serialize());
							} else if (cloudinary.Util.isPlainObject(t) && !cloudinary.Util.isEmpty(t)) {
								results.push(new Transformation(t).serialize());
							} else {
								results.push(void 0);
							}
						}
					}
					return results;
				}).call(this);
				return cloudinary.Util.compact(result);
			}
		};
		
		TransformationParam.prototype.set = function(origValue1) {
			this.origValue = origValue1;
			if (cloudinary.Util.isArray(this.origValue)) {
				return TransformationParam.__super__.set.call(this, this.origValue);
			} else {
				return TransformationParam.__super__.set.call(this, [this.origValue]);
			}
		};
		
		return TransformationParam;
		
	})(Param);
	RangeParam = (function(superClass) {
		extend(RangeParam, superClass);
		
		
		/**
		 * A parameter that represents a range
		 * @param {string} name - The name of the parameter in snake_case
		 * @param {string} shortName - The name of the serialized form of the parameter
		 *                         If a value is not provided, the parameter will not be serialized.
		 * @param {function} [process=norm_range_value ] - Manipulate origValue when value is called
		 * @class RangeParam
		 * @extends Param
		 * @ignore
		 */
		
		function RangeParam(name, shortName, process) {
			if (process == null) {
				process = this.norm_range_value;
			}
			RangeParam.__super__.constructor.call(this, name, shortName, process);
		}
		
		RangeParam.norm_range_value = function(value) {
			var modifier, offset;
			offset = String(value).match(new RegExp('^' + offset_any_pattern + '$'));
			if (offset) {
				modifier = offset[5] != null ? 'p' : '';
				value = (offset[1] || offset[4]) + modifier;
			}
			return value;
		};
		
		return RangeParam;
		
	})(Param);
	RawParam = (function(superClass) {
		extend(RawParam, superClass);
		
		function RawParam(name, shortName, process) {
			if (process == null) {
				process = cloudinary.Util.identity;
			}
			RawParam.__super__.constructor.call(this, name, shortName, process);
		}
		
		RawParam.prototype.serialize = function() {
			return this.value();
		};
		
		return RawParam;
		
	})(Param);
	LayerParam = (function(superClass) {
		var LAYER_KEYWORD_PARAMS;
		
		extend(LayerParam, superClass);
		
		function LayerParam() {
			return LayerParam.__super__.constructor.apply(this, arguments);
		}
		
		LayerParam.prototype.value = function() {
			var layerOptions, result;
			layerOptions = this.origValue;
			if (cloudinary.Util.isPlainObject(layerOptions)) {
				layerOptions = Util.withCamelCaseKeys(layerOptions);
				if (layerOptions.resourceType === "text" || (layerOptions.text != null)) {
					result = new cloudinary.TextLayer(layerOptions).toString();
				} else if (layerOptions.resourceType === "subtitles") {
					result = new cloudinary.SubtitlesLayer(layerOptions).toString();
				} else if (layerOptions.resourceType === "fetch" || (layerOptions.url != null)) {
					result = new cloudinary.FetchLayer(layerOptions).toString();
				} else {
					result = new cloudinary.Layer(layerOptions).toString();
				}
			} else if (/^fetch:.+/.test(layerOptions)) {
				result = new FetchLayer(layerOptions.substr(6)).toString();
			} else {
				result = layerOptions;
			}
			return result;
		};
		
		LAYER_KEYWORD_PARAMS = [["font_weight", "normal"], ["font_style", "normal"], ["text_decoration", "none"], ["text_align", null], ["stroke", "none"], ["letter_spacing", null], ["line_spacing", null]];
		
		LayerParam.prototype.textStyle = function(layer) {
			return (new cloudinary.TextLayer(layer)).textStyleIdentifier();
		};
		
		return LayerParam;
		
	})(Param);
	ExpressionParam = (function(superClass) {
		extend(ExpressionParam, superClass);
		
		function ExpressionParam() {
			return ExpressionParam.__super__.constructor.apply(this, arguments);
		}
		
		ExpressionParam.prototype.serialize = function() {
			return Expression.normalize(ExpressionParam.__super__.serialize.call(this));
		};
		
		return ExpressionParam;
		
	})(Param);
	parameters = {};
	parameters.Param = Param;
	parameters.ArrayParam = ArrayParam;
	parameters.RangeParam = RangeParam;
	parameters.RawParam = RawParam;
	parameters.TransformationParam = TransformationParam;
	parameters.LayerParam = LayerParam;
	parameters.ExpressionParam = ExpressionParam;
	Expression = (function() {
		
		/**
		 * @internal
		 */
		var faceCount;
		
		Expression.OPERATORS = {
			"=": 'eq',
			"!=": 'ne',
			"<": 'lt',
			">": 'gt',
			"<=": 'lte',
			">=": 'gte',
			"&&": 'and',
			"||": 'or',
			"*": "mul",
			"/": "div",
			"+": "add",
			"-": "sub",
			"^": "pow",
		};
		
		
		/**
		 * @internal
		 */
		
		Expression.PREDEFINED_VARS = {
			"aspect_ratio": "ar",
			"aspectRatio": "ar",
			"current_page": "cp",
			"currentPage": "cp",
			"face_count": "fc",
			"faceCount": "fc",
			"height": "h",
			"initial_aspect_ratio": "iar",
			"initial_height": "ih",
			"initial_width": "iw",
			"initialAspectRatio": "iar",
			"initialHeight": "ih",
			"initialWidth": "iw",
			"page_count": "pc",
			"page_x": "px",
			"page_y": "py",
			"pageCount": "pc",
			"pageX": "px",
			"pageY": "py",
			"tags": "tags",
			"width": "w"
		};
		
		
		/**
		 * @internal
		 */
		
		Expression.BOUNDRY = "[ _]+";
		
		
		/**
		 * Represents a transformation expression
		 * @param {string} expressionStr - a expression in string format
		 * @class Expression
		 *
		 */
		
		function Expression(expressionStr) {
			
			/**
			 * @protected
			 * @inner Expression-expressions
			 */
			this.expressions = [];
			if (expressionStr != null) {
				this.expressions.push(Expression.normalize(expressionStr));
			}
		}
		
		
		/**
		 * Convenience constructor method
		 * @function Expression.new
		 */
		
		Expression["new"] = function(expressionStr) {
			return new this(expressionStr);
		};
		
		/**
		 * Normalize a string expression
		 * @function Cloudinary#normalize
		 * @param {string} expression a expression, e.g. "w gt 100", "width_gt_100", "width > 100"
		 * @return {string} the normalized form of the value expression, e.g. "w_gt_100"
		 */
		Expression.normalize = function(expression) {
			var operators, operatorsPattern, operatorsReplaceRE, predefinedVarsPattern, predefinedVarsReplaceRE;
			if (expression == null) {
				return expression;
			}
			expression = String(expression);
			operators = "\\|\\||>=|<=|&&|!=|>|=|<|/|-|\\+|\\*|\\^";
			
			// operators
			operatorsPattern = "((" + operators + ")(?=[ _]))";
			operatorsReplaceRE = new RegExp(operatorsPattern, "g");
			expression = expression.replace(operatorsReplaceRE, function (match) {
				return Expression.OPERATORS[match];
			});
			
			// predefined variables
			predefinedVarsPattern = "(" + Object.keys(Expression.PREDEFINED_VARS).join("|") + ")";
			predefinedVarsReplaceRE = new RegExp(predefinedVarsPattern, "g");
			expression = expression.replace(predefinedVarsReplaceRE, function(match, p1, offset){
				return (expression[offset - 1] === '$' ? match : Expression.PREDEFINED_VARS[match]);
			});
			
			return expression.replace(/[ _]+/g, '_');
		};
		
		/**
		 * Serialize the expression
		 * @return {string} the expression as a string
		 */
		
		Expression.prototype.serialize = function() {
			return Expression.normalize(this.expressions.join("_"));
		};
		
		Expression.prototype.toString = function() {
			return this.serialize();
		};
		
		
		/**
		 * Get the parent transformation of this expression
		 * @return Transformation
		 */
		
		Expression.prototype.getParent = function() {
			return this.parent;
		};
		
		
		/**
		 * Set the parent transformation of this expression
		 * @param {Transformation} the parent transformation
		 * @return {Expression} this expression
		 */
		
		Expression.prototype.setParent = function(parent) {
			this.parent = parent;
			return this;
		};
		
		
		/**
		 * Add a expression
		 * @function Expression#predicate
		 * @internal
		 */
		
		Expression.prototype.predicate = function(name, operator, value) {
			if (Expression.OPERATORS[operator] != null) {
				operator = Expression.OPERATORS[operator];
			}
			this.expressions.push(name + "_" + operator + "_" + value);
			return this;
		};
		
		
		/**
		 * @function Expression#and
		 */
		
		Expression.prototype.and = function() {
			this.expressions.push("and");
			return this;
		};
		
		
		/**
		 * @function Expression#or
		 */
		
		Expression.prototype.or = function() {
			this.expressions.push("or");
			return this;
		};
		
		
		/**
		 * Conclude expression
		 * @function Expression#then
		 * @return {Transformation} the transformation this expression is defined for
		 */
		
		Expression.prototype.then = function() {
			return this.getParent()["if"](this.toString());
		};
		
		
		/**
		 * @function Expression#height
		 * @param {string} operator the comparison operator (e.g. "<", "lt")
		 * @param {string|number} value the right hand side value
		 * @return {Expression} this expression
		 */
		
		Expression.prototype.height = function(operator, value) {
			return this.predicate("h", operator, value);
		};
		
		
		/**
		 * @function Expression#width
		 * @param {string} operator the comparison operator (e.g. "<", "lt")
		 * @param {string|number} value the right hand side value
		 * @return {Expression} this expression
		 */
		
		Expression.prototype.width = function(operator, value) {
			return this.predicate("w", operator, value);
		};
		
		
		/**
		 * @function Expression#aspectRatio
		 * @param {string} operator the comparison operator (e.g. "<", "lt")
		 * @param {string|number} value the right hand side value
		 * @return {Expression} this expression
		 */
		
		Expression.prototype.aspectRatio = function(operator, value) {
			return this.predicate("ar", operator, value);
		};
		
		
		/**
		 * @function Expression#pages
		 * @param {string} operator the comparison operator (e.g. "<", "lt")
		 * @param {string|number} value the right hand side value
		 * @return {Expression} this expression
		 */
		
		Expression.prototype.pageCount = function(operator, value) {
			return this.predicate("pc", operator, value);
		};
		
		
		/**
		 * @function Expression#faces
		 * @param {string} operator the comparison operator (e.g. "<", "lt")
		 * @param {string|number} value the right hand side value
		 * @return {Expression} this expression
		 */
		
		Expression.prototype.faceCount = function(operator, value) {
			return this.predicate("fc", operator, value);
		};
		
		Expression.prototype.value = function(value) {
			this.expressions.push(value);
			return this;
		};
		
		
		/**
		 */
		
		Expression.variable = function(name, value) {
			return new this(name).value(value);
		};
		
		
		/**
		 * @returns a new expression with the predefined variable "width"
		 * @function Expression.width
		 */
		
		Expression.width = function() {
			return new this("width");
		};
		
		
		/**
		 * @returns a new expression with the predefined variable "height"
		 * @function Expression.height
		 */
		
		Expression.height = function() {
			return new this("height");
		};
		
		
		/**
		 * @returns a new expression with the predefined variable "initialWidth"
		 * @function Expression.initialWidth
		 */
		
		Expression.initialWidth = function() {
			return new this("initialWidth");
		};
		
		
		/**
		 * @returns a new expression with the predefined variable "initialHeight"
		 * @function Expression.initialHeight
		 */
		
		Expression.initialHeight = function() {
			return new this("initialHeight");
		};
		
		
		/**
		 * @returns a new expression with the predefined variable "aspectRatio"
		 * @function Expression.aspectRatio
		 */
		
		Expression.aspectRatio = function() {
			return new this("aspectRatio");
		};
		
		
		/**
		 * @returns a new expression with the predefined variable "initialAspectRatio"
		 * @function Expression.initialAspectRatio
		 */
		
		Expression.initialAspectRatio = function() {
			return new this("initialAspectRatio");
		};
		
		
		/**
		 * @returns a new expression with the predefined variable "pageCount"
		 * @function Expression.pageCount
		 */
		
		Expression.pageCount = function() {
			return new this("pageCount");
		};
		
		
		/**
		 * @returns a new expression with the predefined variable "faceCount"
		 * @function Expression.faceCount
		 */
		
		faceCount = function() {
			return new this("faceCount");
		};
		
		
		/**
		 * @returns a new expression with the predefined variable "currentPage"
		 * @function Expression.currentPage
		 */
		
		Expression.currentPage = function() {
			return new this("currentPage");
		};
		
		
		/**
		 * @returns a new expression with the predefined variable "tags"
		 * @function Expression.tags
		 */
		
		Expression.tags = function() {
			return new this("tags");
		};
		
		
		/**
		 * @returns a new expression with the predefined variable "pageX"
		 * @function Expression.pageX
		 */
		
		Expression.pageX = function() {
			return new this("pageX");
		};
		
		
		/**
		 * @returns a new expression with the predefined variable "pageY"
		 * @function Expression.pageY
		 */
		
		Expression.pageY = function() {
			return new this("pageY");
		};
		
		return Expression;
		
	})();
	Condition = (function(superClass) {
		extend(Condition, superClass);
		
		
		/**
		 * Represents a transformation condition
		 * @param {string} conditionStr - a condition in string format
		 * @class Condition
		 * @example
		 * // normally this class is not instantiated directly
		 * var tr = cloudinary.Transformation.new()
		 *    .if().width( ">", 1000).and().aspectRatio("<", "3:4").then()
		 *      .width(1000)
		 *      .crop("scale")
		 *    .else()
		 *      .width(500)
		 *      .crop("scale")
		 *
		 * var tr = cloudinary.Transformation.new()
		 *    .if("w > 1000 and aspectRatio < 3:4")
		 *      .width(1000)
		 *      .crop("scale")
		 *    .else()
		 *      .width(500)
		 *      .crop("scale")
		 *
		 */
		
		function Condition(conditionStr) {
			Condition.__super__.constructor.call(this, conditionStr);
		}
		
		
		/**
		 * @function Condition#height
		 * @param {string} operator the comparison operator (e.g. "<", "lt")
		 * @param {string|number} value the right hand side value
		 * @return {Condition} this condition
		 */
		
		Condition.prototype.height = function(operator, value) {
			return this.predicate("h", operator, value);
		};
		
		
		/**
		 * @function Condition#width
		 * @param {string} operator the comparison operator (e.g. "<", "lt")
		 * @param {string|number} value the right hand side value
		 * @return {Condition} this condition
		 */
		
		Condition.prototype.width = function(operator, value) {
			return this.predicate("w", operator, value);
		};
		
		
		/**
		 * @function Condition#aspectRatio
		 * @param {string} operator the comparison operator (e.g. "<", "lt")
		 * @param {string|number} value the right hand side value
		 * @return {Condition} this condition
		 */
		
		Condition.prototype.aspectRatio = function(operator, value) {
			return this.predicate("ar", operator, value);
		};
		
		
		/**
		 * @function Condition#pages
		 * @param {string} operator the comparison operator (e.g. "<", "lt")
		 * @param {string|number} value the right hand side value
		 * @return {Condition} this condition
		 */
		
		Condition.prototype.pageCount = function(operator, value) {
			return this.predicate("pc", operator, value);
		};
		
		
		/**
		 * @function Condition#faces
		 * @param {string} operator the comparison operator (e.g. "<", "lt")
		 * @param {string|number} value the right hand side value
		 * @return {Condition} this condition
		 */
		
		Condition.prototype.faceCount = function(operator, value) {
			return this.predicate("fc", operator, value);
		};
		
		return Condition;
		
	})(Expression);
	
	/**
	 * Cloudinary configuration class
	 * Depends on 'utils'
	 */
	Configuration = (function() {
		
		/**
		 * Defaults configuration.
		 */
		var DEFAULT_CONFIGURATION_PARAMS, ref;
		
		DEFAULT_CONFIGURATION_PARAMS = {
			responsive_class: 'cld-responsive',
			responsive_use_breakpoints: true,
			round_dpr: true,
			secure: (typeof window !== "undefined" && window !== null ? (ref = window.location) != null ? ref.protocol : void 0 : void 0) === 'https:'
		};
		
		Configuration.CONFIG_PARAMS = ["api_key", "api_secret", "callback", "cdn_subdomain", "cloud_name", "cname", "private_cdn", "protocol", "resource_type", "responsive", "responsive_class", "responsive_use_breakpoints", "responsive_width", "round_dpr", "secure", "secure_cdn_subdomain", "secure_distribution", "shorten", "type", "upload_preset", "url_suffix", "use_root_path", "version"];
		
		
		/**
		 * Cloudinary configuration class
		 * @constructor Configuration
		 * @param {Object} options - configuration parameters
		 */
		
		function Configuration(options) {
			if (options == null) {
				options = {};
			}
			this.configuration = Util.cloneDeep(options);
			Util.defaults(this.configuration, DEFAULT_CONFIGURATION_PARAMS);
		}
		
		
		/**
		 * Initialize the configuration.
		 * The function first tries to retrieve the configuration form the environment and then from the document.
		 * @function Configuration#init
		 * @return {Configuration} returns this for chaining
		 * @see fromDocument
		 * @see fromEnvironment
		 */
		
		Configuration.prototype.init = function() {
			this.fromEnvironment();
			this.fromDocument();
			return this;
		};
		
		
		/**
		 * Set a new configuration item
		 * @function Configuration#set
		 * @param {string} name - the name of the item to set
		 * @param {*} value - the value to be set
		 * @return {Configuration}
		 *
		 */
		
		Configuration.prototype.set = function(name, value) {
			this.configuration[name] = value;
			return this;
		};
		
		
		/**
		 * Get the value of a configuration item
		 * @function Configuration#get
		 * @param {string} name - the name of the item to set
		 * @return {*} the configuration item
		 */
		
		Configuration.prototype.get = function(name) {
			return this.configuration[name];
		};
		
		Configuration.prototype.merge = function(config) {
			if (config == null) {
				config = {};
			}
			Util.assign(this.configuration, Util.cloneDeep(config));
			return this;
		};
		
		
		/**
		 * Initialize Cloudinary from HTML meta tags.
		 * @function Configuration#fromDocument
		 * @return {Configuration}
		 * @example <meta name="cloudinary_cloud_name" content="mycloud">
		 *
		 */
		
		Configuration.prototype.fromDocument = function() {
			var el, j, len, meta_elements;
			meta_elements = typeof document !== "undefined" && document !== null ? document.querySelectorAll('meta[name^="cloudinary_"]') : void 0;
			if (meta_elements) {
				for (j = 0, len = meta_elements.length; j < len; j++) {
					el = meta_elements[j];
					this.configuration[el.getAttribute('name').replace('cloudinary_', '')] = el.getAttribute('content');
				}
			}
			return this;
		};
		
		
		/**
		 * Initialize Cloudinary from the `CLOUDINARY_URL` environment variable.
		 *
		 * This function will only run under Node.js environment.
		 * @function Configuration#fromEnvironment
		 * @requires Node.js
		 */
		
		Configuration.prototype.fromEnvironment = function() {
			var cloudinary_url, j, k, len, query, ref1, ref2, ref3, uri, uriRegex, v, value;
			cloudinary_url = typeof process !== "undefined" && process !== null ? (ref1 = process.env) != null ? ref1.CLOUDINARY_URL : void 0 : void 0;
			if (cloudinary_url != null) {
				uriRegex = /cloudinary:\/\/(?:(\w+)(?:\:([\w-]+))?@)?([\w\.-]+)(?:\/([^?]*))?(?:\?(.+))?/;
				uri = uriRegex.exec(cloudinary_url);
				if (uri) {
					if (uri[3] != null) {
						this.configuration['cloud_name'] = uri[3];
					}
					if (uri[1] != null) {
						this.configuration['api_key'] = uri[1];
					}
					if (uri[2] != null) {
						this.configuration['api_secret'] = uri[2];
					}
					if (uri[4] != null) {
						this.configuration['private_cdn'] = uri[4] != null;
					}
					if (uri[4] != null) {
						this.configuration['secure_distribution'] = uri[4];
					}
					query = uri[5];
					if (query != null) {
						ref2 = query.split('&');
						for (j = 0, len = ref2.length; j < len; j++) {
							value = ref2[j];
							ref3 = value.split('='), k = ref3[0], v = ref3[1];
							if (v == null) {
								v = true;
							}
							this.configuration[k] = v;
						}
					}
				}
			}
			return this;
		};
		
		
		/**
		 * Create or modify the Cloudinary client configuration
		 *
		 * Warning: `config()` returns the actual internal configuration object. modifying it will change the configuration.
		 *
		 * This is a backward compatibility method. For new code, use get(), merge() etc.
		 * @function Configuration#config
		 * @param {hash|string|boolean} new_config
		 * @param {string} new_value
		 * @returns {*} configuration, or value
		 *
		 * @see {@link fromEnvironment} for initialization using environment variables
		 * @see {@link fromDocument} for initialization using HTML meta tags
		 */
		
		Configuration.prototype.config = function(new_config, new_value) {
			switch (false) {
				case new_value === void 0:
					this.set(new_config, new_value);
					return this.configuration;
				case !Util.isString(new_config):
					return this.get(new_config);
				case !Util.isPlainObject(new_config):
					this.merge(new_config);
					return this.configuration;
				default:
					return this.configuration;
			}
		};
		
		
		/**
		 * Returns a copy of the configuration parameters
		 * @function Configuration#toOptions
		 * @returns {Object} a key:value collection of the configuration parameters
		 */
		
		Configuration.prototype.toOptions = function() {
			return Util.cloneDeep(this.configuration);
		};
		
		return Configuration;
		
	})();
	
	/**
	 * TransformationBase
	 * Depends on 'configuration', 'parameters','util'
	 * @internal
	 */
	TransformationBase = (function() {
		var VAR_NAME_RE, lastArgCallback, processVar;
		
		VAR_NAME_RE = /^\$[a-zA-Z0-9]+$/;
		
		TransformationBase.prototype.trans_separator = '/';
		
		TransformationBase.prototype.param_separator = ',';
		
		lastArgCallback = function(args) {
			var callback;
			callback = args != null ? args[args.length - 1] : void 0;
			if (Util.isFunction(callback)) {
				return callback;
			} else {
				return void 0;
			}
		};
		
		
		/**
		 * The base class for transformations.
		 * Members of this class are documented as belonging to the {@link Transformation} class for convenience.
		 * @class TransformationBase
		 */
		
		function TransformationBase(options) {
			var parent, trans;
			if (options == null) {
				options = {};
			}
			
			/** @private */
			parent = void 0;
			
			/** @private */
			trans = {};
			
			/**
			 * Return an options object that can be used to create an identical Transformation
			 * @function Transformation#toOptions
			 * @return {Object} Returns a plain object representing this transformation
			 */
			this.toOptions || (this.toOptions = function(withChain) {
				var key, list, opt, ref, ref1, tr, value;
				if (withChain == null) {
					withChain = true;
				}
				opt = {};
				for (key in trans) {
					value = trans[key];
					opt[key] = value.origValue;
				}
				ref = this.otherOptions;
				for (key in ref) {
					value = ref[key];
					if (value !== void 0) {
						opt[key] = value;
					}
				}
				if (withChain && !Util.isEmpty(this.chained)) {
					list = (function() {
						var j, len, ref1, results;
						ref1 = this.chained;
						results = [];
						for (j = 0, len = ref1.length; j < len; j++) {
							tr = ref1[j];
							results.push(tr.toOptions());
						}
						return results;
					}).call(this);
					list.push(opt);
					opt = {};
					ref1 = this.otherOptions;
					for (key in ref1) {
						value = ref1[key];
						if (value !== void 0) {
							opt[key] = value;
						}
					}
					opt.transformation = list;
				}
				return opt;
			});
			
			/**
			 * Set a parent for this object for chaining purposes.
			 *
			 * @function Transformation#setParent
			 * @param {Object} object - the parent to be assigned to
			 * @returns {Transformation} Returns this instance for chaining purposes.
			 */
			this.setParent || (this.setParent = function(object) {
				parent = object;
				if (object != null) {
					this.fromOptions(typeof object.toOptions === "function" ? object.toOptions() : void 0);
				}
				return this;
			});
			
			/**
			 * Returns the parent of this object in the chain
			 * @function Transformation#getParent
			 * @protected
			 * @return {Object} Returns the parent of this object if there is any
			 */
			this.getParent || (this.getParent = function() {
				return parent;
			});
			
			/** @protected */
			this.param || (this.param = function(value, name, abbr, defaultValue, process) {
				if (process == null) {
					if (Util.isFunction(defaultValue)) {
						process = defaultValue;
					} else {
						process = Util.identity;
					}
				}
				trans[name] = new Param(name, abbr, process).set(value);
				return this;
			});
			
			/** @protected */
			this.rawParam || (this.rawParam = function(value, name, abbr, defaultValue, process) {
				if (process == null) {
					process = Util.identity;
				}
				process = lastArgCallback(arguments);
				trans[name] = new RawParam(name, abbr, process).set(value);
				return this;
			});
			
			/** @protected */
			this.rangeParam || (this.rangeParam = function(value, name, abbr, defaultValue, process) {
				if (process == null) {
					process = Util.identity;
				}
				process = lastArgCallback(arguments);
				trans[name] = new RangeParam(name, abbr, process).set(value);
				return this;
			});
			
			/** @protected */
			this.arrayParam || (this.arrayParam = function(value, name, abbr, sep, defaultValue, process) {
				if (sep == null) {
					sep = ":";
				}
				if (defaultValue == null) {
					defaultValue = [];
				}
				if (process == null) {
					process = Util.identity;
				}
				process = lastArgCallback(arguments);
				trans[name] = new ArrayParam(name, abbr, sep, process).set(value);
				return this;
			});
			
			/** @protected */
			this.transformationParam || (this.transformationParam = function(value, name, abbr, sep, defaultValue, process) {
				if (sep == null) {
					sep = ".";
				}
				if (process == null) {
					process = Util.identity;
				}
				process = lastArgCallback(arguments);
				trans[name] = new TransformationParam(name, abbr, sep, process).set(value);
				return this;
			});
			this.layerParam || (this.layerParam = function(value, name, abbr) {
				trans[name] = new LayerParam(name, abbr).set(value);
				return this;
			});
			
			/**
			 * Get the value associated with the given name.
			 * @function Transformation#getValue
			 * @param {string} name - the name of the parameter
			 * @return {*} the processed value associated with the given name
			 * @description Use {@link get}.origValue for the value originally provided for the parameter
			 */
			this.getValue || (this.getValue = function(name) {
				var ref, ref1;
				return (ref = (ref1 = trans[name]) != null ? ref1.value() : void 0) != null ? ref : this.otherOptions[name];
			});
			
			/**
			 * Get the parameter object for the given parameter name
			 * @function Transformation#get
			 * @param {string} name the name of the transformation parameter
			 * @returns {Param} the param object for the given name, or undefined
			 */
			this.get || (this.get = function(name) {
				return trans[name];
			});
			
			/**
			 * Remove a transformation option from the transformation.
			 * @function Transformation#remove
			 * @param {string} name - the name of the option to remove
			 * @return {*} Returns the option that was removed or null if no option by that name was found. The type of the
			 *              returned value depends on the value.
			 */
			this.remove || (this.remove = function(name) {
				var temp;
				switch (false) {
					case trans[name] == null:
						temp = trans[name];
						delete trans[name];
						return temp.origValue;
					case this.otherOptions[name] == null:
						temp = this.otherOptions[name];
						delete this.otherOptions[name];
						return temp;
					default:
						return null;
				}
			});
			
			/**
			 * Return an array of all the keys (option names) in the transformation.
			 * @return {Array<string>} the keys in snakeCase format
			 */
			this.keys || (this.keys = function() {
				var key;
				return ((function() {
					var results;
					results = [];
					for (key in trans) {
						if (key != null) {
							results.push(key.match(VAR_NAME_RE) ? key : Util.snakeCase(key));
						}
					}
					return results;
				})()).sort();
			});
			
			/**
			 * Returns a plain object representation of the transformation. Values are processed.
			 * @function Transformation#toPlainObject
			 * @return {Object} the transformation options as plain object
			 */
			this.toPlainObject || (this.toPlainObject = function() {
				var hash, key, list, tr;
				hash = {};
				for (key in trans) {
					hash[key] = trans[key].value();
					if (Util.isPlainObject(hash[key])) {
						hash[key] = Util.cloneDeep(hash[key]);
					}
				}
				if (!Util.isEmpty(this.chained)) {
					list = (function() {
						var j, len, ref, results;
						ref = this.chained;
						results = [];
						for (j = 0, len = ref.length; j < len; j++) {
							tr = ref[j];
							results.push(tr.toPlainObject());
						}
						return results;
					}).call(this);
					list.push(hash);
					hash = {
						transformation: list
					};
				}
				return hash;
			});
			
			/**
			 * Complete the current transformation and chain to a new one.
			 * In the URL, transformations are chained together by slashes.
			 * @function Transformation#chain
			 * @return {Transformation} Returns this transformation for chaining
			 * @example
			 * var tr = cloudinary.Transformation.new();
			 * tr.width(10).crop('fit').chain().angle(15).serialize()
			 * // produces "c_fit,w_10/a_15"
			 */
			this.chain || (this.chain = function() {
				var names, tr;
				names = Object.getOwnPropertyNames(trans);
				if (names.length !== 0) {
					tr = new this.constructor(this.toOptions(false));
					this.resetTransformations();
					this.chained.push(tr);
				}
				return this;
			});
			this.resetTransformations || (this.resetTransformations = function() {
				trans = {};
				return this;
			});
			this.otherOptions || (this.otherOptions = {});
			this.chained = [];
			if (!Util.isEmpty(options)) {
				this.fromOptions(options);
			}
		}
		
		
		/**
		 * Merge the provided options with own's options
		 * @param {Object} [options={}] key-value list of options
		 * @returns {Transformation} Returns this instance for chaining
		 */
		
		TransformationBase.prototype.fromOptions = function(options) {
			var key, opt;
			if (options instanceof TransformationBase) {
				this.fromTransformation(options);
			} else {
				options || (options = {});
				if (Util.isString(options) || Util.isArray(options)) {
					options = {
						transformation: options
					};
				}
				options = Util.cloneDeep(options, function(value) {
					if (value instanceof TransformationBase) {
						return new value.constructor(value.toOptions());
					}
				});
				if (options["if"]) {
					this.set("if", options["if"]);
					delete options["if"];
				}
				for (key in options) {
					opt = options[key];
					if (key.match(VAR_NAME_RE)) {
						if (key !== '$attr') {
							this.set('variable', key, opt);
						}
					} else {
						this.set(key, opt);
					}
				}
			}
			return this;
		};
		
		TransformationBase.prototype.fromTransformation = function(other) {
			var j, key, len, ref;
			if (other instanceof TransformationBase) {
				ref = other.keys();
				for (j = 0, len = ref.length; j < len; j++) {
					key = ref[j];
					this.set(key, other.get(key).origValue);
				}
			}
			return this;
		};
		
		
		/**
		 * Set a parameter.
		 * The parameter name `key` is converted to
		 * @param {string} key - the name of the parameter
		 * @param {*} value - the value of the parameter
		 * @returns {Transformation} Returns this instance for chaining
		 */
		
		TransformationBase.prototype.set = function() {
			var camelKey, key, values;
			key = arguments[0], values = 2 <= arguments.length ? slice.call(arguments, 1) : [];
			camelKey = Util.camelCase(key);
			if (Util.contains(Transformation.methods, camelKey)) {
				this[camelKey].apply(this, values);
			} else {
				this.otherOptions[key] = values[0];
			}
			return this;
		};
		
		TransformationBase.prototype.hasLayer = function() {
			return this.getValue("overlay") || this.getValue("underlay");
		};
		
		
		/**
		 * Generate a string representation of the transformation.
		 * @function Transformation#serialize
		 * @return {string} Returns the transformation as a string
		 */
		
		TransformationBase.prototype.serialize = function() {
			var ifParam, j, len, paramList, ref, ref1, ref2, ref3, ref4, resultArray, t, tr, transformationList, transformationString, transformations, value, variables, vars;
			resultArray = (function() {
				var j, len, ref, results;
				ref = this.chained;
				results = [];
				for (j = 0, len = ref.length; j < len; j++) {
					tr = ref[j];
					results.push(tr.serialize());
				}
				return results;
			}).call(this);
			paramList = this.keys();
			transformations = (ref = this.get("transformation")) != null ? ref.serialize() : void 0;
			ifParam = (ref1 = this.get("if")) != null ? ref1.serialize() : void 0;
			variables = processVar((ref2 = this.get("variables")) != null ? ref2.value() : void 0);
			paramList = Util.difference(paramList, ["transformation", "if", "variables"]);
			vars = [];
			transformationList = [];
			for (j = 0, len = paramList.length; j < len; j++) {
				t = paramList[j];
				if (t.match(VAR_NAME_RE)) {
					vars.push(t + "_" + Expression.normalize((ref3 = this.get(t)) != null ? ref3.value() : void 0));
				} else {
					transformationList.push((ref4 = this.get(t)) != null ? ref4.serialize() : void 0);
				}
			}
			switch (false) {
				case !Util.isString(transformations):
					transformationList.push(transformations);
					break;
				case !Util.isArray(transformations):
					resultArray = resultArray.concat(transformations);
			}
			transformationList = (function() {
				var l, len1, results;
				results = [];
				for (l = 0, len1 = transformationList.length; l < len1; l++) {
					value = transformationList[l];
					if (Util.isArray(value) && !Util.isEmpty(value) || !Util.isArray(value) && value) {
						results.push(value);
					}
				}
				return results;
			})();
			transformationList = vars.sort().concat(variables).concat(transformationList.sort());
			if (ifParam === "if_end") {
				transformationList.push(ifParam);
			} else if (!Util.isEmpty(ifParam)) {
				transformationList.unshift(ifParam);
			}
			transformationString = Util.compact(transformationList).join(this.param_separator);
			if (!Util.isEmpty(transformationString)) {
				resultArray.push(transformationString);
			}
			return Util.compact(resultArray).join(this.trans_separator);
		};
		
		
		/**
		 * Provide a list of all the valid transformation option names
		 * @function Transformation#listNames
		 * @private
		 * @return {Array<string>} a array of all the valid option names
		 */
		
		TransformationBase.prototype.listNames = function() {
			return Transformation.methods;
		};
		
		
		/**
		 * Returns attributes for an HTML tag.
		 * @function Cloudinary.toHtmlAttributes
		 * @return PlainObject
		 */
		
		TransformationBase.prototype.toHtmlAttributes = function() {
			var attrName, height, j, key, len, options, ref, ref1, ref2, ref3, value;
			options = {};
			ref = this.otherOptions;
			for (key in ref) {
				value = ref[key];
				if (!(!Util.contains(Transformation.PARAM_NAMES, Util.snakeCase(key)))) {
					continue;
				}
				attrName = /^html_/.test(key) ? key.slice(5) : key;
				options[attrName] = value;
			}
			ref1 = this.keys();
			for (j = 0, len = ref1.length; j < len; j++) {
				key = ref1[j];
				if (/^html_/.test(key)) {
					options[Util.camelCase(key.slice(5))] = this.getValue(key);
				}
			}
			if (!(this.hasLayer() || this.getValue("angle") || Util.contains(["fit", "limit", "lfill"], this.getValue("crop")))) {
				width = (ref2 = this.get("width")) != null ? ref2.origValue : void 0;
				height = (ref3 = this.get("height")) != null ? ref3.origValue : void 0;
				if (parseFloat(width) >= 1.0) {
					if (options['width'] == null) {
						options['width'] = width;
					}
				}
				if (parseFloat(height) >= 1.0) {
					if (options['height'] == null) {
						options['height'] = height;
					}
				}
			}
			return options;
		};
		
		TransformationBase.prototype.isValidParamName = function(name) {
			return Transformation.methods.indexOf(Util.camelCase(name)) >= 0;
		};
		
		
		/**
		 * Delegate to the parent (up the call chain) to produce HTML
		 * @function Transformation#toHtml
		 * @return {string} HTML representation of the parent if possible.
		 * @example
		 * tag = cloudinary.ImageTag.new("sample", {cloud_name: "demo"})
		 * // ImageTag {name: "img", publicId: "sample"}
		 * tag.toHtml()
		 * // <img src="http://res.cloudinary.com/demo/image/upload/sample">
		 * tag.transformation().crop("fit").width(300).toHtml()
		 * // <img src="http://res.cloudinary.com/demo/image/upload/c_fit,w_300/sample">
		 */
		
		TransformationBase.prototype.toHtml = function() {
			var ref;
			return (ref = this.getParent()) != null ? typeof ref.toHtml === "function" ? ref.toHtml() : void 0 : void 0;
		};
		
		TransformationBase.prototype.toString = function() {
			return this.serialize();
		};
		
		processVar = function(varArray) {
			var j, len, name, ref, results, v;
			if (Util.isArray(varArray)) {
				results = [];
				for (j = 0, len = varArray.length; j < len; j++) {
					ref = varArray[j], name = ref[0], v = ref[1];
					results.push(name + "_" + (Expression.normalize(v)));
				}
				return results;
			} else {
				return varArray;
			}
			
			/**
			 * Transformation Class methods.
			 * This is a list of the parameters defined in Transformation.
			 * Values are camelCased.
			 * @const Transformation.methods
			 * @private
			 * @ignore
			 * @type {Array<string>}
			 */
			
			/**
			 * Parameters that are filtered out before passing the options to an HTML tag.
			 *
			 * The list of parameters is a combination of `Transformation::methods` and `Configuration::CONFIG_PARAMS`
			 * @const {Array<string>} Transformation.PARAM_NAMES
			 * @private
			 * @ignore
			 * @see toHtmlAttributes
			 */
		};
		
		return TransformationBase;
		
	})();
	Transformation = (function(superClass) {
		extend(Transformation, superClass);
		
		
		/**
		 *  Represents a single transformation.
		 *  @class Transformation
		 *  @example
		 *  t = new cloudinary.Transformation();
		 * t.angle(20).crop("scale").width("auto");
		 *
		 * // or
		 *
		 * t = new cloudinary.Transformation( {angle: 20, crop: "scale", width: "auto"});
		 */
		
		function Transformation(options) {
			if (options == null) {
				options = {};
			}
			Transformation.__super__.constructor.call(this, options);
			this;
		}
		
		
		/**
		 * Convenience constructor
		 * @param {Object} options
		 * @return {Transformation}
		 * @example cl = cloudinary.Transformation.new( {angle: 20, crop: "scale", width: "auto"})
		 */
		
		Transformation["new"] = function(args) {
			return new Transformation(args);
		};
		
		
		/*
      Transformation Parameters
     */
		
		Transformation.prototype.angle = function(value) {
			return this.arrayParam(value, "angle", "a", ".", Expression.normalize);
		};
		
		Transformation.prototype.audioCodec = function(value) {
			return this.param(value, "audio_codec", "ac");
		};
		
		Transformation.prototype.audioFrequency = function(value) {
			return this.param(value, "audio_frequency", "af");
		};
		
		Transformation.prototype.aspectRatio = function(value) {
			return this.param(value, "aspect_ratio", "ar", Expression.normalize);
		};
		
		Transformation.prototype.background = function(value) {
			return this.param(value, "background", "b", Param.norm_color);
		};
		
		Transformation.prototype.bitRate = function(value) {
			return this.param(value, "bit_rate", "br");
		};
		
		Transformation.prototype.border = function(value) {
			return this.param(value, "border", "bo", function(border) {
				if (Util.isPlainObject(border)) {
					border = Util.assign({}, {
						color: "black",
						width: 2
					}, border);
					return border.width + "px_solid_" + (Param.norm_color(border.color));
				} else {
					return border;
				}
			});
		};
		
		Transformation.prototype.color = function(value) {
			return this.param(value, "color", "co", Param.norm_color);
		};
		
		Transformation.prototype.colorSpace = function(value) {
			return this.param(value, "color_space", "cs");
		};
		
		Transformation.prototype.crop = function(value) {
			return this.param(value, "crop", "c");
		};
		
		Transformation.prototype.defaultImage = function(value) {
			return this.param(value, "default_image", "d");
		};
		
		Transformation.prototype.delay = function(value) {
			return this.param(value, "delay", "dl");
		};
		
		Transformation.prototype.density = function(value) {
			return this.param(value, "density", "dn");
		};
		
		Transformation.prototype.duration = function(value) {
			return this.rangeParam(value, "duration", "du");
		};
		
		Transformation.prototype.dpr = function(value) {
			return this.param(value, "dpr", "dpr", (function(_this) {
				return function(dpr) {
					dpr = dpr.toString();
					if (dpr != null ? dpr.match(/^\d+$/) : void 0) {
						return dpr + ".0";
					} else {
						return Expression.normalize(dpr);
					}
				};
			})(this));
		};
		
		Transformation.prototype.effect = function(value) {
			return this.arrayParam(value, "effect", "e", ":", Expression.normalize);
		};
		
		Transformation.prototype["else"] = function() {
			return this["if"]('else');
		};
		
		Transformation.prototype.endIf = function() {
			return this["if"]('end');
		};
		
		Transformation.prototype.endOffset = function(value) {
			return this.rangeParam(value, "end_offset", "eo");
		};
		
		Transformation.prototype.fallbackContent = function(value) {
			return this.param(value, "fallback_content");
		};
		
		Transformation.prototype.fetchFormat = function(value) {
			return this.param(value, "fetch_format", "f");
		};
		
		Transformation.prototype.format = function(value) {
			return this.param(value, "format");
		};
		
		Transformation.prototype.flags = function(value) {
			return this.arrayParam(value, "flags", "fl", ".");
		};
		
		Transformation.prototype.gravity = function(value) {
			return this.param(value, "gravity", "g");
		};
		
		Transformation.prototype.fps = function(value) {
			return this.param(value, "fps", "fps", (function(_this) {
				return function(fps) {
					if (Util.isString(fps)) {
						return fps;
					} else if (Util.isArray(fps)) {
						return fps.join("-");
					} else {
						return fps;
					}
				};
			})(this));
		};
		
		Transformation.prototype.height = function(value) {
			return this.param(value, "height", "h", (function(_this) {
				return function() {
					if (_this.getValue("crop") || _this.getValue("overlay") || _this.getValue("underlay")) {
						return Expression.normalize(value);
					} else {
						return null;
					}
				};
			})(this));
		};
		
		Transformation.prototype.htmlHeight = function(value) {
			return this.param(value, "html_height");
		};
		
		Transformation.prototype.htmlWidth = function(value) {
			return this.param(value, "html_width");
		};
		
		Transformation.prototype["if"] = function(value) {
			var i, ifVal, j, ref, trIf, trRest;
			if (value == null) {
				value = "";
			}
			switch (value) {
				case "else":
					this.chain();
					return this.param(value, "if", "if");
				case "end":
					this.chain();
					for (i = j = ref = this.chained.length - 1; j >= 0; i = j += -1) {
						ifVal = this.chained[i].getValue("if");
						if (ifVal === "end") {
							break;
						} else if (ifVal != null) {
							trIf = Transformation["new"]()["if"](ifVal);
							this.chained[i].remove("if");
							trRest = this.chained[i];
							this.chained[i] = Transformation["new"]().transformation([trIf, trRest]);
							if (ifVal !== "else") {
								break;
							}
						}
					}
					return this.param(value, "if", "if");
				case "":
					return Condition["new"]().setParent(this);
				default:
					return this.param(value, "if", "if", function(value) {
						return Condition["new"](value).toString();
					});
			}
		};
		
		Transformation.prototype.keyframeInterval = function(value) {
			return this.param(value, "keyframe_interval", "ki");
		};
		
		Transformation.prototype.offset = function(value) {
			var end_o, ref, start_o;
			ref = Util.isFunction(value != null ? value.split : void 0) ? value.split('..') : Util.isArray(value) ? value : [null, null], start_o = ref[0], end_o = ref[1];
			if (start_o != null) {
				this.startOffset(start_o);
			}
			if (end_o != null) {
				return this.endOffset(end_o);
			}
		};
		
		Transformation.prototype.opacity = function(value) {
			return this.param(value, "opacity", "o", Expression.normalize);
		};
		
		Transformation.prototype.overlay = function(value) {
			return this.layerParam(value, "overlay", "l");
		};
		
		Transformation.prototype.page = function(value) {
			return this.param(value, "page", "pg");
		};
		
		Transformation.prototype.poster = function(value) {
			return this.param(value, "poster");
		};
		
		Transformation.prototype.prefix = function(value) {
			return this.param(value, "prefix", "p");
		};
		
		Transformation.prototype.quality = function(value) {
			return this.param(value, "quality", "q", Expression.normalize);
		};
		
		Transformation.prototype.radius = function(value) {
			return this.param(value, "radius", "r", Expression.normalize);
		};
		
		Transformation.prototype.rawTransformation = function(value) {
			return this.rawParam(value, "raw_transformation");
		};
		
		Transformation.prototype.size = function(value) {
			var height, ref;
			if (Util.isFunction(value != null ? value.split : void 0)) {
				ref = value.split('x'), width = ref[0], height = ref[1];
				this.width(width);
				return this.height(height);
			}
		};
		
		Transformation.prototype.sourceTypes = function(value) {
			return this.param(value, "source_types");
		};
		
		Transformation.prototype.sourceTransformation = function(value) {
			return this.param(value, "source_transformation");
		};
		
		Transformation.prototype.startOffset = function(value) {
			return this.rangeParam(value, "start_offset", "so");
		};
		
		Transformation.prototype.streamingProfile = function(value) {
			return this.param(value, "streaming_profile", "sp");
		};
		
		Transformation.prototype.transformation = function(value) {
			return this.transformationParam(value, "transformation", "t");
		};
		
		Transformation.prototype.underlay = function(value) {
			return this.layerParam(value, "underlay", "u");
		};
		
		Transformation.prototype.variable = function(name, value) {
			return this.param(value, name, name);
		};
		
		Transformation.prototype.variables = function(values) {
			return this.arrayParam(values, "variables");
		};
		
		Transformation.prototype.videoCodec = function(value) {
			return this.param(value, "video_codec", "vc", Param.process_video_params);
		};
		
		Transformation.prototype.videoSampling = function(value) {
			return this.param(value, "video_sampling", "vs");
		};
		
		Transformation.prototype.width = function(value) {
			return this.param(value, "width", "w", (function(_this) {
				return function() {
					if (_this.getValue("crop") || _this.getValue("overlay") || _this.getValue("underlay")) {
						return Expression.normalize(value);
					} else {
						return null;
					}
				};
			})(this));
		};
		
		Transformation.prototype.x = function(value) {
			return this.param(value, "x", "x", Expression.normalize);
		};
		
		Transformation.prototype.y = function(value) {
			return this.param(value, "y", "y", Expression.normalize);
		};
		
		Transformation.prototype.zoom = function(value) {
			return this.param(value, "zoom", "z", Expression.normalize);
		};
		
		return Transformation;
		
	})(TransformationBase);
	
	/**
	 * Transformation Class methods.
	 * This is a list of the parameters defined in Transformation.
	 * Values are camelCased.
	 */
	Transformation.methods || (Transformation.methods = Util.difference(Util.functions(Transformation.prototype), Util.functions(TransformationBase.prototype)));
	
	/**
	 * Parameters that are filtered out before passing the options to an HTML tag.
	 *
	 * The list of parameters is a combination of `Transformation::methods` and `Configuration::CONFIG_PARAMS`
	 */
	Transformation.PARAM_NAMES || (Transformation.PARAM_NAMES = ((function() {
		var j, len, ref, results;
		ref = Transformation.methods;
		results = [];
		for (j = 0, len = ref.length; j < len; j++) {
			m = ref[j];
			results.push(Util.snakeCase(m));
		}
		return results;
	})()).concat(Configuration.CONFIG_PARAMS));
	
	/**
	 * Generic HTML tag
	 * Depends on 'transformation', 'util'
	 */
	HtmlTag = (function() {
		
		/**
		 * Represents an HTML (DOM) tag
		 * @constructor HtmlTag
		 * @param {string} name - the name of the tag
		 * @param {string} [publicId]
		 * @param {Object} options
		 * @example tag = new HtmlTag( 'div', { 'width': 10})
		 */
		var toAttribute;
		
		function HtmlTag(name, publicId, options) {
			var transformation;
			this.name = name;
			this.publicId = publicId;
			if (options == null) {
				if (Util.isPlainObject(publicId)) {
					options = publicId;
					this.publicId = void 0;
				} else {
					options = {};
				}
			}
			transformation = new Transformation(options);
			transformation.setParent(this);
			this.transformation = function() {
				return transformation;
			};
		}
		
		
		/**
		 * Convenience constructor
		 * Creates a new instance of an HTML (DOM) tag
		 * @function HtmlTag.new
		 * @param {string} name - the name of the tag
		 * @param {string} [publicId]
		 * @param {Object} options
		 * @return {HtmlTag}
		 * @example tag = HtmlTag.new( 'div', { 'width': 10})
		 */
		
		HtmlTag["new"] = function(name, publicId, options) {
			return new this(name, publicId, options);
		};
		
		
		/**
		 * Represent the given key and value as an HTML attribute.
		 * @function HtmlTag#toAttribute
		 * @protected
		 * @param {string} key - attribute name
		 * @param {*|boolean} value - the value of the attribute. If the value is boolean `true`, return the key only.
		 * @returns {string} the attribute
		 *
		 */
		
		toAttribute = function(key, value) {
			if (!value) {
				return void 0;
			} else if (value === true) {
				return key;
			} else {
				return key + "=\"" + value + "\"";
			}
		};
		
		
		/**
		 * combine key and value from the `attr` to generate an HTML tag attributes string.
		 * `Transformation::toHtmlTagOptions` is used to filter out transformation and configuration keys.
		 * @protected
		 * @param {Object} attrs
		 * @return {string} the attributes in the format `'key1="value1" key2="value2"'`
		 * @ignore
		 */
		
		HtmlTag.prototype.htmlAttrs = function(attrs) {
			var key, pairs, value;
			return pairs = ((function() {
				var results;
				results = [];
				for (key in attrs) {
					value = attrs[key];
					if (value) {
						results.push(toAttribute(key, value));
					}
				}
				return results;
			})()).sort().join(' ');
		};
		
		
		/**
		 * Get all options related to this tag.
		 * @function HtmlTag#getOptions
		 * @returns {Object} the options
		 *
		 */
		
		HtmlTag.prototype.getOptions = function() {
			return this.transformation().toOptions();
		};
		
		
		/**
		 * Get the value of option `name`
		 * @function HtmlTag#getOption
		 * @param {string} name - the name of the option
		 * @returns {*} Returns the value of the option
		 *
		 */
		
		HtmlTag.prototype.getOption = function(name) {
			return this.transformation().getValue(name);
		};
		
		
		/**
		 * Get the attributes of the tag.
		 * @function HtmlTag#attributes
		 * @returns {Object} attributes
		 */
		
		HtmlTag.prototype.attributes = function() {
			return this.transformation().toHtmlAttributes();
		};
		
		
		/**
		 * Set a tag attribute named `name` to `value`
		 * @function HtmlTag#setAttr
		 * @param {string} name - the name of the attribute
		 * @param {string} value - the value of the attribute
		 */
		
		HtmlTag.prototype.setAttr = function(name, value) {
			this.transformation().set("html_" + name, value);
			return this;
		};
		
		
		/**
		 * Get the value of the tag attribute `name`
		 * @function HtmlTag#getAttr
		 * @param {string} name - the name of the attribute
		 * @returns {*}
		 */
		
		HtmlTag.prototype.getAttr = function(name) {
			return this.attributes()["html_" + name] || this.attributes()[name];
		};
		
		
		/**
		 * Remove the tag attributed named `name`
		 * @function HtmlTag#removeAttr
		 * @param {string} name - the name of the attribute
		 * @returns {*}
		 */
		
		HtmlTag.prototype.removeAttr = function(name) {
			var ref;
			return (ref = this.transformation().remove("html_" + name)) != null ? ref : this.transformation().remove(name);
		};
		
		
		/**
		 * @function HtmlTag#content
		 * @protected
		 * @ignore
		 */
		
		HtmlTag.prototype.content = function() {
			return "";
		};
		
		
		/**
		 * @function HtmlTag#openTag
		 * @protected
		 * @ignore
		 */
		
		HtmlTag.prototype.openTag = function() {
			return "<" + this.name + " " + (this.htmlAttrs(this.attributes())) + ">";
		};
		
		
		/**
		 * @function HtmlTag#closeTag
		 * @protected
		 * @ignore
		 */
		
		HtmlTag.prototype.closeTag = function() {
			return "</" + this.name + ">";
		};
		
		
		/**
		 * Generates an HTML representation of the tag.
		 * @function HtmlTag#toHtml
		 * @returns {string} Returns HTML in string format
		 */
		
		HtmlTag.prototype.toHtml = function() {
			return this.openTag() + this.content() + this.closeTag();
		};
		
		
		/**
		 * Creates a DOM object representing the tag.
		 * @function HtmlTag#toDOM
		 * @returns {Element}
		 */
		
		HtmlTag.prototype.toDOM = function() {
			var element, name, ref, value;
			if (!Util.isFunction(typeof document !== "undefined" && document !== null ? document.createElement : void 0)) {
				throw "Can't create DOM if document is not present!";
			}
			element = document.createElement(this.name);
			ref = this.attributes();
			for (name in ref) {
				value = ref[name];
				element[name] = value;
			}
			return element;
		};
		
		HtmlTag.isResponsive = function(tag, responsiveClass) {
			var dataSrc;
			dataSrc = Util.getData(tag, 'src-cache') || Util.getData(tag, 'src');
			return Util.hasClass(tag, responsiveClass) && /\bw_auto\b/.exec(dataSrc);
		};
		
		return HtmlTag;
		
	})();
	
	/**
	 * Image Tag
	 * Depends on 'tags/htmltag', 'cloudinary'
	 */
	ImageTag = (function(superClass) {
		extend(ImageTag, superClass);
		
		
		/**
		 * Creates an HTML (DOM) Image tag using Cloudinary as the source.
		 * @constructor ImageTag
		 * @extends HtmlTag
		 * @param {string} [publicId]
		 * @param {Object} [options]
		 */
		
		function ImageTag(publicId, options) {
			if (options == null) {
				options = {};
			}
			ImageTag.__super__.constructor.call(this, "img", publicId, options);
		}
		
		
		/** @override */
		
		ImageTag.prototype.closeTag = function() {
			return "";
		};
		
		
		/** @override */
		
		ImageTag.prototype.attributes = function() {
			var attr, options, srcAttribute;
			attr = ImageTag.__super__.attributes.call(this) || [];
			options = this.getOptions();
			srcAttribute = options.responsive && !options.client_hints ? 'data-src' : 'src';
			if (attr[srcAttribute] == null) {
				attr[srcAttribute] = new Cloudinary(this.getOptions()).url(this.publicId);
			}
			return attr;
		};
		
		return ImageTag;
		
	})(HtmlTag);
	
	/**
	 * Video Tag
	 * Depends on 'tags/htmltag', 'util', 'cloudinary'
	 */
	VideoTag = (function(superClass) {
		var DEFAULT_POSTER_OPTIONS, DEFAULT_VIDEO_SOURCE_TYPES, VIDEO_TAG_PARAMS;
		
		extend(VideoTag, superClass);
		
		VIDEO_TAG_PARAMS = ['source_types', 'source_transformation', 'fallback_content', 'poster'];
		
		DEFAULT_VIDEO_SOURCE_TYPES = ['webm', 'mp4', 'ogv'];
		
		DEFAULT_POSTER_OPTIONS = {
			format: 'jpg',
			resource_type: 'video'
		};
		
		
		/**
		 * Creates an HTML (DOM) Video tag using Cloudinary as the source.
		 * @constructor VideoTag
		 * @extends HtmlTag
		 * @param {string} [publicId]
		 * @param {Object} [options]
		 */
		
		function VideoTag(publicId, options) {
			if (options == null) {
				options = {};
			}
			options = Util.defaults({}, options, Cloudinary.DEFAULT_VIDEO_PARAMS);
			VideoTag.__super__.constructor.call(this, "video", publicId.replace(/\.(mp4|ogv|webm)$/, ''), options);
		}
		
		
		/**
		 * Set the transformation to apply on each source
		 * @function VideoTag#setSourceTransformation
		 * @param {Object} an object with pairs of source type and source transformation
		 * @returns {VideoTag} Returns this instance for chaining purposes.
		 */
		
		VideoTag.prototype.setSourceTransformation = function(value) {
			this.transformation().sourceTransformation(value);
			return this;
		};
		
		
		/**
		 * Set the source types to include in the video tag
		 * @function VideoTag#setSourceTypes
		 * @param {Array<string>} an array of source types
		 * @returns {VideoTag} Returns this instance for chaining purposes.
		 */
		
		VideoTag.prototype.setSourceTypes = function(value) {
			this.transformation().sourceTypes(value);
			return this;
		};
		
		
		/**
		 * Set the poster to be used in the video tag
		 * @function VideoTag#setPoster
		 * @param {string|Object} value
		 * - string: a URL to use for the poster
		 * - Object: transformation parameters to apply to the poster. May optionally include a public_id to use instead of the video public_id.
		 * @returns {VideoTag} Returns this instance for chaining purposes.
		 */
		
		VideoTag.prototype.setPoster = function(value) {
			this.transformation().poster(value);
			return this;
		};
		
		
		/**
		 * Set the content to use as fallback in the video tag
		 * @function VideoTag#setFallbackContent
		 * @param {string} value - the content to use, in HTML format
		 * @returns {VideoTag} Returns this instance for chaining purposes.
		 */
		
		VideoTag.prototype.setFallbackContent = function(value) {
			this.transformation().fallbackContent(value);
			return this;
		};
		
		VideoTag.prototype.content = function() {
			var cld, fallback, innerTags, mimeType, sourceTransformation, sourceTypes, src, srcType, transformation, videoType;
			sourceTypes = this.transformation().getValue('source_types');
			sourceTransformation = this.transformation().getValue('source_transformation');
			fallback = this.transformation().getValue('fallback_content');
			if (Util.isArray(sourceTypes)) {
				cld = new Cloudinary(this.getOptions());
				innerTags = (function() {
					var j, len, results;
					results = [];
					for (j = 0, len = sourceTypes.length; j < len; j++) {
						srcType = sourceTypes[j];
						transformation = sourceTransformation[srcType] || {};
						src = cld.url("" + this.publicId, Util.defaults({}, transformation, {
							resource_type: 'video',
							format: srcType
						}));
						videoType = srcType === 'ogv' ? 'ogg' : srcType;
						mimeType = 'video/' + videoType;
						results.push("<source " + (this.htmlAttrs({
							src: src,
							type: mimeType
						})) + ">");
					}
					return results;
				}).call(this);
			} else {
				innerTags = [];
			}
			return innerTags.join('') + fallback;
		};
		
		VideoTag.prototype.attributes = function() {
			var a, attr, j, len, poster, ref, ref1, sourceTypes;
			sourceTypes = this.getOption('source_types');
			poster = (ref = this.getOption('poster')) != null ? ref : {};
			if (Util.isPlainObject(poster)) {
				defaults = poster.public_id != null ? Cloudinary.DEFAULT_IMAGE_PARAMS : DEFAULT_POSTER_OPTIONS;
				poster = new Cloudinary(this.getOptions()).url((ref1 = poster.public_id) != null ? ref1 : this.publicId, Util.defaults({}, poster, defaults));
			}
			attr = VideoTag.__super__.attributes.call(this) || [];
			for (j = 0, len = attr.length; j < len; j++) {
				a = attr[j];
				if (!Util.contains(VIDEO_TAG_PARAMS)) {
					attr = a;
				}
			}
			if (!Util.isArray(sourceTypes)) {
				attr["src"] = new Cloudinary(this.getOptions()).url(this.publicId, {
					resource_type: 'video',
					format: sourceTypes
				});
			}
			if (poster != null) {
				attr["poster"] = poster;
			}
			return attr;
		};
		
		return VideoTag;
		
	})(HtmlTag);
	
	/**
	 * Image Tag
	 * Depends on 'tags/htmltag', 'cloudinary'
	 */
	ClientHintsMetaTag = (function(superClass) {
		extend(ClientHintsMetaTag, superClass);
		
		
		/**
		 * Creates an HTML (DOM) Meta tag that enables client-hints.
		 * @constructor ClientHintsMetaTag
		 * @extends HtmlTag
		 */
		
		function ClientHintsMetaTag(options) {
			ClientHintsMetaTag.__super__.constructor.call(this, 'meta', void 0, Util.assign({
				"http-equiv": "Accept-CH",
				content: "DPR, Viewport-Width, Width"
			}, options));
		}
		
		
		/** @override */
		
		ClientHintsMetaTag.prototype.closeTag = function() {
			return "";
		};
		
		return ClientHintsMetaTag;
		
	})(HtmlTag);
	Cloudinary = (function() {
		var AKAMAI_SHARED_CDN, CF_SHARED_CDN, DEFAULT_POSTER_OPTIONS, DEFAULT_VIDEO_SOURCE_TYPES, OLD_AKAMAI_SHARED_CDN, SEO_TYPES, SHARED_CDN, VERSION, absolutize, applyBreakpoints, cdnSubdomainNumber, closestAbove, cloudinaryUrlPrefix, defaultBreakpoints, finalizeResourceType, findContainerWidth, maxWidth, updateDpr;
		
		VERSION = "2.5.0";
		
		CF_SHARED_CDN = "d3jpl91pxevbkh.cloudfront.net";
		
		OLD_AKAMAI_SHARED_CDN = "cloudinary-a.akamaihd.net";
		
		AKAMAI_SHARED_CDN = "res.cloudinary.com";
		
		SHARED_CDN = AKAMAI_SHARED_CDN;
		
		DEFAULT_POSTER_OPTIONS = {
			format: 'jpg',
			resource_type: 'video'
		};
		
		DEFAULT_VIDEO_SOURCE_TYPES = ['webm', 'mp4', 'ogv'];
		
		SEO_TYPES = {
			"image/upload": "images",
			"image/private": "private_images",
			"image/authenticated": "authenticated_images",
			"raw/upload": "files",
			"video/upload": "videos"
		};
		
		
		/**
		 * @const {Object} Cloudinary.DEFAULT_IMAGE_PARAMS
		 * Defaults values for image parameters.
		 *
		 * (Previously defined using option_consume() )
		 */
		
		Cloudinary.DEFAULT_IMAGE_PARAMS = {
			resource_type: "image",
			transformation: [],
			type: 'upload'
		};
		
		
		/**
		 * Defaults values for video parameters.
		 * @const {Object} Cloudinary.DEFAULT_VIDEO_PARAMS
		 * (Previously defined using option_consume() )
		 */
		
		Cloudinary.DEFAULT_VIDEO_PARAMS = {
			fallback_content: '',
			resource_type: "video",
			source_transformation: {},
			source_types: DEFAULT_VIDEO_SOURCE_TYPES,
			transformation: [],
			type: 'upload'
		};
		
		
		/**
		 * Main Cloudinary class
		 * @class Cloudinary
		 * @param {Object} options - options to configure Cloudinary
		 * @see Configuration for more details
		 * @example
		 *    var cl = new cloudinary.Cloudinary( { cloud_name: "mycloud"});
		 *    var imgTag = cl.image("myPicID");
		 */
		
		function Cloudinary(options) {
			var configuration;
			this.devicePixelRatioCache = {};
			this.responsiveConfig = {};
			this.responsiveResizeInitialized = false;
			configuration = new Configuration(options);
			this.config = function(newConfig, newValue) {
				return configuration.config(newConfig, newValue);
			};
			
			/**
			 * Use \<meta\> tags in the document to configure this Cloudinary instance.
			 * @return {Cloudinary} this for chaining
			 */
			this.fromDocument = function() {
				configuration.fromDocument();
				return this;
			};
			
			/**
			 * Use environment variables to configure this Cloudinary instance.
			 * @return {Cloudinary} this for chaining
			 */
			this.fromEnvironment = function() {
				configuration.fromEnvironment();
				return this;
			};
			
			/**
			 * Initialize configuration.
			 * @function Cloudinary#init
			 * @see Configuration#init
			 * @return {Cloudinary} this for chaining
			 */
			this.init = function() {
				configuration.init();
				return this;
			};
		}
		
		
		/**
		 * Convenience constructor
		 * @param {Object} options
		 * @return {Cloudinary}
		 * @example cl = cloudinary.Cloudinary.new( { cloud_name: "mycloud"})
		 */
		
		Cloudinary["new"] = function(options) {
			return new this(options);
		};
		
		
		/**
		 * Return the resource type and action type based on the given configuration
		 * @function Cloudinary#finalizeResourceType
		 * @param {Object|string} resourceType
		 * @param {string} [type='upload']
		 * @param {string} [urlSuffix]
		 * @param {boolean} [useRootPath]
		 * @param {boolean} [shorten]
		 * @returns {string} resource_type/type
		 * @ignore
		 */
		
		finalizeResourceType = function(resourceType, type, urlSuffix, useRootPath, shorten) {
			var key, options;
			if (resourceType == null) {
				resourceType = "image";
			}
			if (type == null) {
				type = "upload";
			}
			if (Util.isPlainObject(resourceType)) {
				options = resourceType;
				resourceType = options.resource_type;
				type = options.type;
				urlSuffix = options.url_suffix;
				useRootPath = options.use_root_path;
				shorten = options.shorten;
			}
			if (type == null) {
				type = 'upload';
			}
			if (urlSuffix != null) {
				resourceType = SEO_TYPES[resourceType + "/" + type];
				type = null;
				if (resourceType == null) {
					throw new Error("URL Suffix only supported for " + (((function() {
						var results;
						results = [];
						for (key in SEO_TYPES) {
							results.push(key);
						}
						return results;
					})()).join(', ')));
				}
			}
			if (useRootPath) {
				if (resourceType === 'image' && type === 'upload' || resourceType === "images") {
					resourceType = null;
					type = null;
				} else {
					throw new Error("Root path only supported for image/upload");
				}
			}
			if (shorten && resourceType === 'image' && type === 'upload') {
				resourceType = 'iu';
				type = null;
			}
			return [resourceType, type].join("/");
		};
		
		absolutize = function(url) {
			var prefix;
			if (!url.match(/^https?:\//)) {
				prefix = document.location.protocol + '//' + document.location.host;
				if (url[0] === '?') {
					prefix += document.location.pathname;
				} else if (url[0] !== '/') {
					prefix += document.location.pathname.replace(/\/[^\/]*$/, '/');
				}
				url = prefix + url;
			}
			return url;
		};
		
		
		/**
		 * Generate an resource URL.
		 * @function Cloudinary#url
		 * @param {string} publicId - the public ID of the resource
		 * @param {Object} [options] - options for the tag and transformations, possible values include all {@link Transformation} parameters
		 *                          and {@link Configuration} parameters
		 * @param {string} [options.type='upload'] - the classification of the resource
		 * @param {Object} [options.resource_type='image'] - the type of the resource
		 * @return {string} The resource URL
		 */
		
		Cloudinary.prototype.url = function(publicId, options) {
			var error, error1, prefix, ref, resourceTypeAndType, transformation, transformationString, url, version;
			if (options == null) {
				options = {};
			}
			if (!publicId) {
				return publicId;
			}
			if (options instanceof Transformation) {
				options = options.toOptions();
			}
			options = Util.defaults({}, options, this.config(), Cloudinary.DEFAULT_IMAGE_PARAMS);
			if (options.type === 'fetch') {
				options.fetch_format = options.fetch_format || options.format;
				publicId = absolutize(publicId);
			}
			transformation = new Transformation(options);
			transformationString = transformation.serialize();
			if (!options.cloud_name) {
				throw 'Unknown cloud_name';
			}
			if (publicId.search('/') >= 0 && !publicId.match(/^v[0-9]+/) && !publicId.match(/^https?:\//) && !((ref = options.version) != null ? ref.toString() : void 0)) {
				options.version = 1;
			}
			if (publicId.match(/^https?:/)) {
				if (options.type === 'upload' || options.type === 'asset') {
					url = publicId;
				} else {
					publicId = encodeURIComponent(publicId).replace(/%3A/g, ':').replace(/%2F/g, '/');
				}
			} else {
				try {
					publicId = decodeURIComponent(publicId);
				} catch (error1) {
					error = error1;
				}
				publicId = encodeURIComponent(publicId).replace(/%3A/g, ':').replace(/%2F/g, '/');
				if (options.url_suffix) {
					if (options.url_suffix.match(/[\.\/]/)) {
						throw 'url_suffix should not include . or /';
					}
					publicId = publicId + '/' + options.url_suffix;
				}
				if (options.format) {
					if (!options.trust_public_id) {
						publicId = publicId.replace(/\.(jpg|png|gif|webp)$/, '');
					}
					publicId = publicId + '.' + options.format;
				}
			}
			prefix = cloudinaryUrlPrefix(publicId, options);
			resourceTypeAndType = finalizeResourceType(options.resource_type, options.type, options.url_suffix, options.use_root_path, options.shorten);
			version = options.version ? 'v' + options.version : '';
			return url || Util.compact([prefix, resourceTypeAndType, transformationString, version, publicId]).join('/').replace(/([^:])\/+/g, '$1/');
		};
		
		
		/**
		 * Generate an video resource URL.
		 * @function Cloudinary#video_url
		 * @param {string} publicId - the public ID of the resource
		 * @param {Object} [options] - options for the tag and transformations, possible values include all {@link Transformation} parameters
		 *                          and {@link Configuration} parameters
		 * @param {string} [options.type='upload'] - the classification of the resource
		 * @return {string} The video URL
		 */
		
		Cloudinary.prototype.video_url = function(publicId, options) {
			options = Util.assign({
				resource_type: 'video'
			}, options);
			return this.url(publicId, options);
		};
		
		
		/**
		 * Generate an video thumbnail URL.
		 * @function Cloudinary#video_thumbnail_url
		 * @param {string} publicId - the public ID of the resource
		 * @param {Object} [options] - options for the tag and transformations, possible values include all {@link Transformation} parameters
		 *                          and {@link Configuration} parameters
		 * @param {string} [options.type='upload'] - the classification of the resource
		 * @return {string} The video thumbnail URL
		 */
		
		Cloudinary.prototype.video_thumbnail_url = function(publicId, options) {
			options = Util.assign({}, DEFAULT_POSTER_OPTIONS, options);
			return this.url(publicId, options);
		};
		
		
		/**
		 * Generate a string representation of the provided transformation options.
		 * @function Cloudinary#transformation_string
		 * @param {Object} options - the transformation options
		 * @returns {string} The transformation string
		 */
		
		Cloudinary.prototype.transformation_string = function(options) {
			return new Transformation(options).serialize();
		};
		
		
		/**
		 * Generate an image tag.
		 * @function Cloudinary#image
		 * @param {string} publicId - the public ID of the image
		 * @param {Object} [options] - options for the tag and transformations
		 * @return {HTMLImageElement} an image tag element
		 */
		
		Cloudinary.prototype.image = function(publicId, options) {
			var client_hints, img, ref, ref1;
			if (options == null) {
				options = {};
			}
			img = this.imageTag(publicId, options);
			client_hints = (ref = (ref1 = options.client_hints) != null ? ref1 : this.config('client_hints')) != null ? ref : false;
			if (!((options.src != null) || client_hints)) {
				img.setAttr("src", '');
			}
			img = img.toDOM();
			if (!client_hints) {
				Util.setData(img, 'src-cache', this.url(publicId, options));
				this.cloudinary_update(img, options);
			}
			return img;
		};
		
		
		/**
		 * Creates a new ImageTag instance, configured using this own's configuration.
		 * @function Cloudinary#imageTag
		 * @param {string} publicId - the public ID of the resource
		 * @param {Object} options - additional options to pass to the new ImageTag instance
		 * @return {ImageTag} An ImageTag that is attached (chained) to this Cloudinary instance
		 */
		
		Cloudinary.prototype.imageTag = function(publicId, options) {
			var tag;
			tag = new ImageTag(publicId, this.config());
			tag.transformation().fromOptions(options);
			return tag;
		};
		
		
		/**
		 * Generate an image tag for the video thumbnail.
		 * @function Cloudinary#video_thumbnail
		 * @param {string} publicId - the public ID of the video
		 * @param {Object} [options] - options for the tag and transformations
		 * @return {HTMLImageElement} An image tag element
		 */
		
		Cloudinary.prototype.video_thumbnail = function(publicId, options) {
			return this.image(publicId, Util.merge({}, DEFAULT_POSTER_OPTIONS, options));
		};
		
		
		/**
		 * @function Cloudinary#facebook_profile_image
		 * @param {string} publicId - the public ID of the image
		 * @param {Object} [options] - options for the tag and transformations
		 * @return {HTMLImageElement} an image tag element
		 */
		
		Cloudinary.prototype.facebook_profile_image = function(publicId, options) {
			return this.image(publicId, Util.assign({
				type: 'facebook'
			}, options));
		};
		
		
		/**
		 * @function Cloudinary#twitter_profile_image
		 * @param {string} publicId - the public ID of the image
		 * @param {Object} [options] - options for the tag and transformations
		 * @return {HTMLImageElement} an image tag element
		 */
		
		Cloudinary.prototype.twitter_profile_image = function(publicId, options) {
			return this.image(publicId, Util.assign({
				type: 'twitter'
			}, options));
		};
		
		
		/**
		 * @function Cloudinary#twitter_name_profile_image
		 * @param {string} publicId - the public ID of the image
		 * @param {Object} [options] - options for the tag and transformations
		 * @return {HTMLImageElement} an image tag element
		 */
		
		Cloudinary.prototype.twitter_name_profile_image = function(publicId, options) {
			return this.image(publicId, Util.assign({
				type: 'twitter_name'
			}, options));
		};
		
		
		/**
		 * @function Cloudinary#gravatar_image
		 * @param {string} publicId - the public ID of the image
		 * @param {Object} [options] - options for the tag and transformations
		 * @return {HTMLImageElement} an image tag element
		 */
		
		Cloudinary.prototype.gravatar_image = function(publicId, options) {
			return this.image(publicId, Util.assign({
				type: 'gravatar'
			}, options));
		};
		
		
		/**
		 * @function Cloudinary#fetch_image
		 * @param {string} publicId - the public ID of the image
		 * @param {Object} [options] - options for the tag and transformations
		 * @return {HTMLImageElement} an image tag element
		 */
		
		Cloudinary.prototype.fetch_image = function(publicId, options) {
			return this.image(publicId, Util.assign({
				type: 'fetch'
			}, options));
		};
		
		
		/**
		 * @function Cloudinary#video
		 * @param {string} publicId - the public ID of the image
		 * @param {Object} [options] - options for the tag and transformations
		 * @return {HTMLImageElement} an image tag element
		 */
		
		Cloudinary.prototype.video = function(publicId, options) {
			if (options == null) {
				options = {};
			}
			return this.videoTag(publicId, options).toHtml();
		};
		
		
		/**
		 * Creates a new VideoTag instance, configured using this own's configuration.
		 * @function Cloudinary#videoTag
		 * @param {string} publicId - the public ID of the resource
		 * @param {Object} options - additional options to pass to the new VideoTag instance
		 * @return {VideoTag} A VideoTag that is attached (chained) to this Cloudinary instance
		 */
		
		Cloudinary.prototype.videoTag = function(publicId, options) {
			options = Util.defaults({}, options, this.config());
			return new VideoTag(publicId, options);
		};
		
		
		/**
		 * Generate the URL of the sprite image
		 * @function Cloudinary#sprite_css
		 * @param {string} publicId - the public ID of the resource
		 * @param {Object} [options] - options for the tag and transformations
		 * @see {@link http://cloudinary.com/documentation/sprite_generation Sprite generation}
		 */
		
		Cloudinary.prototype.sprite_css = function(publicId, options) {
			options = Util.assign({
				type: 'sprite'
			}, options);
			if (!publicId.match(/.css$/)) {
				options.format = 'css';
			}
			return this.url(publicId, options);
		};
		
		
		/**
		 * Initialize the responsive behaviour.<br>
		 * Calls {@link Cloudinary#cloudinary_update} to modify image tags.
		 * @function Cloudinary#responsive
		 * @param {Object} options
		 * @param {String} [options.responsive_class='cld-responsive'] - provide an alternative class used to locate img tags
		 * @param {number} [options.responsive_debounce=100] - the debounce interval in milliseconds.
		 * @param {boolean} [bootstrap=true] if true processes the img tags by calling cloudinary_update. When false the tags will be processed only after a resize event.
		 * @see {@link Cloudinary#cloudinary_update} for additional configuration parameters
		 */
		
		Cloudinary.prototype.responsive = function(options, bootstrap) {
			var ref, ref1, ref2, responsiveClass, responsiveResize, timeout;
			if (bootstrap == null) {
				bootstrap = true;
			}
			this.responsiveConfig = Util.merge(this.responsiveConfig || {}, options);
			responsiveClass = (ref = this.responsiveConfig['responsive_class']) != null ? ref : this.config('responsive_class');
			if (bootstrap) {
				this.cloudinary_update("img." + responsiveClass + ", img.cld-hidpi", this.responsiveConfig);
			}
			responsiveResize = (ref1 = (ref2 = this.responsiveConfig['responsive_resize']) != null ? ref2 : this.config('responsive_resize')) != null ? ref1 : true;
			if (responsiveResize && !this.responsiveResizeInitialized) {
				this.responsiveConfig.resizing = this.responsiveResizeInitialized = true;
				timeout = null;
				return window.addEventListener('resize', (function(_this) {
					return function() {
						var debounce, ref3, ref4, reset, run, wait, waitFunc;
						debounce = (ref3 = (ref4 = _this.responsiveConfig['responsive_debounce']) != null ? ref4 : _this.config('responsive_debounce')) != null ? ref3 : 100;
						reset = function() {
							if (timeout) {
								clearTimeout(timeout);
								return timeout = null;
							}
						};
						run = function() {
							return _this.cloudinary_update("img." + responsiveClass, _this.responsiveConfig);
						};
						waitFunc = function() {
							reset();
							return run();
						};
						wait = function() {
							reset();
							return timeout = setTimeout(waitFunc, debounce);
						};
						if (debounce) {
							return wait();
						} else {
							return run();
						}
					};
				})(this));
			}
		};
		
		
		/**
		 * @function Cloudinary#calc_breakpoint
		 * @private
		 * @ignore
		 */
		
		Cloudinary.prototype.calc_breakpoint = function(element, width, steps) {
			var breakpoints, point;
			breakpoints = Util.getData(element, 'breakpoints') || Util.getData(element, 'stoppoints') || this.config('breakpoints') || this.config('stoppoints') || defaultBreakpoints;
			if (Util.isFunction(breakpoints)) {
				return breakpoints(width, steps);
			} else {
				if (Util.isString(breakpoints)) {
					breakpoints = ((function() {
						var j, len, ref, results;
						ref = breakpoints.split(',');
						results = [];
						for (j = 0, len = ref.length; j < len; j++) {
							point = ref[j];
							results.push(parseInt(point));
						}
						return results;
					})()).sort(function(a, b) {
						return a - b;
					});
				}
				return closestAbove(breakpoints, width);
			}
		};
		
		
		/**
		 * @function Cloudinary#calc_stoppoint
		 * @deprecated Use {@link calc_breakpoint} instead.
		 * @private
		 * @ignore
		 */
		
		Cloudinary.prototype.calc_stoppoint = Cloudinary.prototype.calc_breakpoint;
		
		
		/**
		 * @function Cloudinary#device_pixel_ratio
		 * @private
		 */
		
		Cloudinary.prototype.device_pixel_ratio = function(roundDpr) {
			var dpr, dprString;
			if (roundDpr == null) {
				roundDpr = true;
			}
			dpr = (typeof window !== "undefined" && window !== null ? window.devicePixelRatio : void 0) || 1;
			if (roundDpr) {
				dpr = Math.ceil(dpr);
			}
			if (dpr <= 0 || dpr === NaN) {
				dpr = 1;
			}
			dprString = dpr.toString();
			if (dprString.match(/^\d+$/)) {
				dprString += '.0';
			}
			return dprString;
		};
		
		defaultBreakpoints = function(width, steps) {
			if (steps == null) {
				steps = 100;
			}
			return steps * Math.ceil(width / steps);
		};
		
		closestAbove = function(list, value) {
			var i;
			i = list.length - 2;
			while (i >= 0 && list[i] >= value) {
				i--;
			}
			return list[i + 1];
		};
		
		cdnSubdomainNumber = function(publicId) {
			return crc32(publicId) % 5 + 1;
		};
		
		cloudinaryUrlPrefix = function(publicId, options) {
			var cdnPart, host, path, protocol, ref, subdomain;
			if (((ref = options.cloud_name) != null ? ref.indexOf("/") : void 0) === 0) {
				return '/res' + options.cloud_name;
			}
			protocol = "http://";
			cdnPart = "";
			subdomain = "res";
			host = ".cloudinary.com";
			path = "/" + options.cloud_name;
			if (options.protocol) {
				protocol = options.protocol + '//';
			}
			if (options.private_cdn) {
				cdnPart = options.cloud_name + "-";
				path = "";
			}
			if (options.cdn_subdomain) {
				subdomain = "res-" + cdnSubdomainNumber(publicId);
			}
			if (options.secure) {
				protocol = "https://";
				if (options.secure_cdn_subdomain === false) {
					subdomain = "res";
				}
				if ((options.secure_distribution != null) && options.secure_distribution !== OLD_AKAMAI_SHARED_CDN && options.secure_distribution !== SHARED_CDN) {
					cdnPart = "";
					subdomain = "";
					host = options.secure_distribution;
				}
			} else if (options.cname) {
				protocol = "http://";
				cdnPart = "";
				subdomain = options.cdn_subdomain ? 'a' + ((crc32(publicId) % 5) + 1) + '.' : '';
				host = options.cname;
			}
			return [protocol, cdnPart, subdomain, host, path].join("");
		};
		
		
		/**
		 * Finds all `img` tags under each node and sets it up to provide the image through Cloudinary
		 * @param {Element[]} nodes the parent nodes to search for img under
		 * @param {Object} [options={}] options and transformations params
		 * @function Cloudinary#processImageTags
		 */
		
		Cloudinary.prototype.processImageTags = function(nodes, options) {
			var images, imgOptions, node, publicId, url;
			if (options == null) {
				options = {};
			}
			if (Util.isEmpty(nodes)) {
				return this;
			}
			options = Util.defaults({}, options, this.config());
			images = (function() {
				var j, len, ref, results;
				results = [];
				for (j = 0, len = nodes.length; j < len; j++) {
					node = nodes[j];
					if (!(((ref = node.tagName) != null ? ref.toUpperCase() : void 0) === 'IMG')) {
						continue;
					}
					imgOptions = Util.assign({
						width: node.getAttribute('width'),
						height: node.getAttribute('height'),
						src: node.getAttribute('src')
					}, options);
					publicId = imgOptions['source'] || imgOptions['src'];
					delete imgOptions['source'];
					delete imgOptions['src'];
					url = this.url(publicId, imgOptions);
					imgOptions = new Transformation(imgOptions).toHtmlAttributes();
					Util.setData(node, 'src-cache', url);
					node.setAttribute('width', imgOptions.width);
					node.setAttribute('height', imgOptions.height);
					results.push(node);
				}
				return results;
			}).call(this);
			this.cloudinary_update(images, options);
			return this;
		};
		
		applyBreakpoints = function(tag, width, steps, options) {
			var ref, ref1, ref2, responsive_use_breakpoints;
			responsive_use_breakpoints = (ref = (ref1 = (ref2 = options['responsive_use_breakpoints']) != null ? ref2 : options['responsive_use_stoppoints']) != null ? ref1 : this.config('responsive_use_breakpoints')) != null ? ref : this.config('responsive_use_stoppoints');
			if ((!responsive_use_breakpoints) || (responsive_use_breakpoints === 'resize' && !options.resizing)) {
				return width;
			} else {
				return this.calc_breakpoint(tag, width, steps);
			}
		};
		
		findContainerWidth = function(element) {
			var containerWidth, style;
			containerWidth = 0;
			while (((element = element != null ? element.parentNode : void 0) instanceof Element) && !containerWidth) {
				style = window.getComputedStyle(element);
				if (!/^inline/.test(style.display)) {
					containerWidth = Util.width(element);
				}
			}
			return containerWidth;
		};
		
		updateDpr = function(dataSrc, roundDpr) {
			return dataSrc.replace(/\bdpr_(1\.0|auto)\b/g, 'dpr_' + this.device_pixel_ratio(roundDpr));
		};
		
		maxWidth = function(requiredWidth, tag) {
			var imageWidth;
			imageWidth = Util.getData(tag, 'width') || 0;
			if (requiredWidth > imageWidth) {
				imageWidth = requiredWidth;
				Util.setData(tag, 'width', requiredWidth);
			}
			return imageWidth;
		};
		
		
		/**
		 * Update hidpi (dpr_auto) and responsive (w_auto) fields according to the current container size and the device pixel ratio.
		 * Only images marked with the cld-responsive class have w_auto updated.
		 * @function Cloudinary#cloudinary_update
		 * @param {(Array|string|NodeList)} elements - the elements to modify
		 * @param {Object} options
		 * @param {boolean|string} [options.responsive_use_breakpoints=true]
		 *  - when `true`, always use breakpoints for width
		 * - when `"resize"` use exact width on first render and breakpoints on resize
		 * - when `false` always use exact width
		 * @param {boolean} [options.responsive] - if `true`, enable responsive on this element. Can be done by adding cld-responsive.
		 * @param {boolean} [options.responsive_preserve_height] - if set to true, original css height is preserved.
		 *   Should only be used if the transformation supports different aspect ratios.
		 */
		
		Cloudinary.prototype.cloudinary_update = function(elements, options) {
			var containerWidth, dataSrc, j, len, match, ref, ref1, ref2, ref3, ref4, ref5, requiredWidth, responsive, responsiveClass, roundDpr, setUrl, tag;
			if (options == null) {
				options = {};
			}
			if (elements === null) {
				return this;
			}
			responsive = (ref = (ref1 = options.responsive) != null ? ref1 : this.config('responsive')) != null ? ref : false;
			elements = (function() {
				switch (false) {
					case !Util.isArray(elements):
						return elements;
					case elements.constructor.name !== "NodeList":
						return elements;
					case !Util.isString(elements):
						return document.querySelectorAll(elements);
					default:
						return [elements];
				}
			})();
			responsiveClass = (ref2 = (ref3 = this.responsiveConfig['responsive_class']) != null ? ref3 : options['responsive_class']) != null ? ref2 : this.config('responsive_class');
			roundDpr = (ref4 = options['round_dpr']) != null ? ref4 : this.config('round_dpr');
			for (j = 0, len = elements.length; j < len; j++) {
				tag = elements[j];
				if (!((ref5 = tag.tagName) != null ? ref5.match(/img/i) : void 0)) {
					continue;
				}
				setUrl = true;
				if (responsive) {
					Util.addClass(tag, responsiveClass);
				}
				dataSrc = Util.getData(tag, 'src-cache') || Util.getData(tag, 'src');
				if (!Util.isEmpty(dataSrc)) {
					dataSrc = updateDpr.call(this, dataSrc, roundDpr);
					if (HtmlTag.isResponsive(tag, responsiveClass)) {
						containerWidth = findContainerWidth(tag);
						if (containerWidth !== 0) {
							switch (false) {
								case !/w_auto:breakpoints/.test(dataSrc):
									requiredWidth = maxWidth(containerWidth, tag);
									if (requiredWidth) {
										dataSrc = dataSrc.replace(/w_auto:breakpoints([_0-9]*)(:[0-9]+)?/, "w_auto:breakpoints$1:" + requiredWidth);
									} else {
										setUrl = false;
									}
									break;
								case !(match = /w_auto(:(\d+))?/.exec(dataSrc)):
									requiredWidth = applyBreakpoints.call(this, tag, containerWidth, match[2], options);
									requiredWidth = maxWidth(requiredWidth, tag);
									if (requiredWidth) {
										dataSrc = dataSrc.replace(/w_auto[^,\/]*/g, "w_" + requiredWidth);
									} else {
										setUrl = false;
									}
							}
							Util.removeAttribute(tag, 'width');
							if (!options.responsive_preserve_height) {
								Util.removeAttribute(tag, 'height');
							}
						} else {
							setUrl = false;
						}
					}
					if (setUrl) {
						Util.setAttribute(tag, 'src', dataSrc);
					}
				}
			}
			return this;
		};
		
		
		/**
		 * Provide a transformation object, initialized with own's options, for chaining purposes.
		 * @function Cloudinary#transformation
		 * @param {Object} options
		 * @return {Transformation}
		 */
		
		Cloudinary.prototype.transformation = function(options) {
			return Transformation["new"](this.config()).fromOptions(options).setParent(this);
		};
		
		return Cloudinary;
		
	})();
	
	/**
	 * Cloudinary jQuery plugin
	 * Depends on 'jquery', 'util', 'transformation', 'cloudinary'
	 */
	CloudinaryJQuery = (function(superClass) {
		extend(CloudinaryJQuery, superClass);
		
		
		/**
		 * Cloudinary class with jQuery support
		 * @constructor CloudinaryJQuery
		 * @extends Cloudinary
		 */
		
		function CloudinaryJQuery(options) {
			CloudinaryJQuery.__super__.constructor.call(this, options);
		}
		
		
		/**
		 * @override
		 */
		
		CloudinaryJQuery.prototype.image = function(publicId, options) {
			var client_hints, img, ref, ref1;
			if (options == null) {
				options = {};
			}
			img = this.imageTag(publicId, options);
			client_hints = (ref = (ref1 = options.client_hints) != null ? ref1 : this.config('client_hints')) != null ? ref : false;
			if (!((options.src != null) || client_hints)) {
				img.setAttr("src", '');
			}
			img = jQuery(img.toHtml());
			if (!client_hints) {
				img.data('src-cache', this.url(publicId, options)).cloudinary_update(options);
			}
			return img;
		};
		
		
		/**
		 * @override
		 */
		
		CloudinaryJQuery.prototype.responsive = function(options) {
			var ref, ref1, ref2, responsiveClass, responsiveConfig, responsiveResizeInitialized, responsive_resize, timeout;
			responsiveConfig = jQuery.extend(responsiveConfig || {}, options);
			responsiveClass = (ref = this.responsiveConfig['responsive_class']) != null ? ref : this.config('responsive_class');
			jQuery("img." + responsiveClass + ", img.cld-hidpi").cloudinary_update(responsiveConfig);
			responsive_resize = (ref1 = (ref2 = responsiveConfig['responsive_resize']) != null ? ref2 : this.config('responsive_resize')) != null ? ref1 : true;
			if (responsive_resize && !responsiveResizeInitialized) {
				responsiveConfig.resizing = responsiveResizeInitialized = true;
				timeout = null;
				return jQuery(window).on('resize', (function(_this) {
					return function() {
						var debounce, ref3, ref4, reset, run, wait;
						debounce = (ref3 = (ref4 = responsiveConfig['responsive_debounce']) != null ? ref4 : _this.config('responsive_debounce')) != null ? ref3 : 100;
						reset = function() {
							if (timeout) {
								clearTimeout(timeout);
								return timeout = null;
							}
						};
						run = function() {
							return jQuery("img." + responsiveClass).cloudinary_update(responsiveConfig);
						};
						wait = function() {
							reset();
							return setTimeout((function() {
								reset();
								return run();
							}), debounce);
						};
						if (debounce) {
							return wait();
						} else {
							return run();
						}
					};
				})(this));
			}
		};
		
		return CloudinaryJQuery;
		
	})(Cloudinary);
	
	/**
	 * The following methods are provided through the jQuery class
	 * @class jQuery
	 */
	
	/**
	 * Convert all img tags in the collection to utilize Cloudinary.
	 * @function jQuery#cloudinary
	 * @param {Object} [options] - options for the tag and transformations
	 * @returns {jQuery}
	 */
	jQuery.fn.cloudinary = function(options) {
		this.filter('img').each(function() {
			var img_options, public_id, url;
			img_options = jQuery.extend({
				width: jQuery(this).attr('width'),
				height: jQuery(this).attr('height'),
				src: jQuery(this).attr('src')
			}, jQuery(this).data(), options);
			public_id = img_options.source || img_options.src;
			delete img_options.source;
			delete img_options.src;
			url = jQuery.cloudinary.url(public_id, img_options);
			img_options = new Transformation(img_options).toHtmlAttributes();
			return jQuery(this).data('src-cache', url).attr({
				width: img_options.width,
				height: img_options.height
			});
		}).cloudinary_update(options);
		return this;
	};
	
	/**
	 * Update hidpi (dpr_auto) and responsive (w_auto) fields according to the current container size and the device pixel ratio.
	 * Only images marked with the cld-responsive class have w_auto updated.
	 * options:
	 * - responsive_use_stoppoints:
	 *   - true - always use stoppoints for width
	 *   - "resize" - use exact width on first render and stoppoints on resize (default)
	 *   - false - always use exact width
	 * - responsive:
	 *   - true - enable responsive on this element. Can be done by adding cld-responsive.
	 *            Note that jQuery.cloudinary.responsive() should be called once on the page.
	 * - responsive_preserve_height: if set to true, original css height is perserved. Should only be used if the transformation supports different aspect ratios.
	 */
	jQuery.fn.cloudinary_update = function(options) {
		if (options == null) {
			options = {};
		}
		jQuery.cloudinary.cloudinary_update(this.filter('img').toArray(), options);
		return this;
	};
	webp = null;
	
	/**
	 * @function jQuery#webpify
	 */
	jQuery.fn.webpify = function(options, webp_options) {
		var that, webp_canary;
		if (options == null) {
			options = {};
		}
		that = this;
		webp_options = webp_options != null ? webp_options : options;
		if (!webp) {
			webp = jQuery.Deferred();
			webp_canary = new Image;
			webp_canary.onerror = webp.reject;
			webp_canary.onload = webp.resolve;
			webp_canary.src = 'data:image/webp;base64,UklGRi4AAABXRUJQVlA4TCEAAAAvAUAAEB8wAiMwAgSSNtse/cXjxyCCmrYNWPwmHRH9jwMA';
		}
		jQuery(function() {
			return webp.done(function() {
				return jQuery(that).cloudinary(jQuery.extend({}, webp_options, {
					format: 'webp'
				}));
			}).fail(function() {
				return jQuery(that).cloudinary(options);
			});
		});
		return this;
	};
	jQuery.fn.fetchify = function(options) {
		return this.cloudinary(jQuery.extend(options, {
			'type': 'fetch'
		}));
	};
	jQuery.cloudinary = new CloudinaryJQuery();
	jQuery.cloudinary.fromDocument();
	
	/**
	 * This module extends CloudinaryJquery to support jQuery File Upload
	 * Depends on 'jquery', 'util', 'cloudinaryjquery', 'jquery.ui.widget', 'jquery.iframe-transport','jquery.fileupload'
	 */
	
	/**
	 * Delete a resource using the upload token
	 * @function CloudinaryJQuery#delete_by_token
	 * @param {string} delete_token - the delete token
	 * @param {Object} [options]
	 * @param {string} [options.url] - an alternative URL to use for the API
	 * @param {string} [options.cloud_name] - an alternative cloud_name to use. This parameter is ignored if `options.url` is provided.
	 */
	CloudinaryJQuery.prototype.delete_by_token = function(delete_token, options) {
		var cloud_name, dataType, url;
		options = options || {};
		url = options.url;
		if (!url) {
			cloud_name = options.cloud_name || jQuery.cloudinary.config().cloud_name;
			url = 'https://api.cloudinary.com/v1_1/' + cloud_name + '/delete_by_token';
		}
		dataType = jQuery.support.xhrFileUpload ? 'json' : 'iframe json';
		return jQuery.ajax({
			url: url,
			method: 'POST',
			data: {
				token: delete_token
			},
			headers: {
				'X-Requested-With': 'XMLHttpRequest'
			},
			dataType: dataType
		});
	};
	
	/**
	 * Creates an `input` tag and sets it up to upload files to cloudinary
	 * @function CloudinaryJQuery#unsigned_upload_tag
	 * @param {string}
	 */
	CloudinaryJQuery.prototype.unsigned_upload_tag = function(upload_preset, upload_params, options) {
		return jQuery('<input/>').attr({
			type: 'file',
			name: 'file'
		}).unsigned_cloudinary_upload(upload_preset, upload_params, options);
	};
	
	/**
	 * Initialize the jQuery File Upload plugin to upload to Cloudinary
	 * @function jQuery#cloudinary_fileupload
	 * @param {Object} options
	 * @returns {jQuery}
	 */
	jQuery.fn.cloudinary_fileupload = function(options) {
		var cloud_name, initializing, resource_type, type, upload_url;
		if (!Util.isFunction(jQuery.fn.fileupload)) {
			return this;
		}
		initializing = !this.data('blueimpFileupload');
		if (initializing) {
			options = jQuery.extend({
				maxFileSize: 20000000,
				dataType: 'json',
				headers: {
					'X-Requested-With': 'XMLHttpRequest'
				}
			}, options);
		}
		this.fileupload(options);
		if (initializing) {
			this.bind('fileuploaddone', function(e, data) {
				var add_field, field, multiple, upload_info;
				if (data.result.error) {
					return;
				}
				data.result.path = ['v', data.result.version, '/', data.result.public_id, data.result.format ? '.' + data.result.format : ''].join('');
				if (data.cloudinaryField && data.form.length > 0) {
					upload_info = [data.result.resource_type, data.result.type, data.result.path].join('/') + '#' + data.result.signature;
					multiple = jQuery(e.target).prop('multiple');
					add_field = function() {
						return jQuery('<input/>').attr({
							type: 'hidden',
							name: data.cloudinaryField
						}).val(upload_info).appendTo(data.form);
					};
					if (multiple) {
						add_field();
					} else {
						field = jQuery(data.form).find('input[name="' + data.cloudinaryField + '"]');
						if (field.length > 0) {
							field.val(upload_info);
						} else {
							add_field();
						}
					}
				}
				return jQuery(e.target).trigger('cloudinarydone', data);
			});
			this.bind('fileuploadsend', function(e, data) {
				data.headers = jQuery.extend({}, data.headers, {
					'X-Unique-Upload-Id': (Math.random() * 10000000000).toString(16)
				});
				return true;
			});
			this.bind('fileuploadstart', function(e) {
				return jQuery(e.target).trigger('cloudinarystart');
			});
			this.bind('fileuploadstop', function(e) {
				return jQuery(e.target).trigger('cloudinarystop');
			});
			this.bind('fileuploadprogress', function(e, data) {
				return jQuery(e.target).trigger('cloudinaryprogress', data);
			});
			this.bind('fileuploadprogressall', function(e, data) {
				return jQuery(e.target).trigger('cloudinaryprogressall', data);
			});
			this.bind('fileuploadfail', function(e, data) {
				return jQuery(e.target).trigger('cloudinaryfail', data);
			});
			this.bind('fileuploadalways', function(e, data) {
				return jQuery(e.target).trigger('cloudinaryalways', data);
			});
			if (!this.fileupload('option').url) {
				cloud_name = options.cloud_name || jQuery.cloudinary.config().cloud_name;
				resource_type = options.resource_type || 'auto';
				type = options.type || 'upload';
				upload_url = 'https://api.cloudinary.com/v1_1/' + cloud_name + '/' + resource_type + '/' + type;
				this.fileupload('option', 'url', upload_url);
			}
		}
		return this;
	};
	
	/**
	 * Add a file to upload
	 * @function jQuery#cloudinary_upload_url
	 * @param {string} remote_url - the url to add
	 * @returns {jQuery}
	 */
	jQuery.fn.cloudinary_upload_url = function(remote_url) {
		if (!Util.isFunction(jQuery.fn.fileupload)) {
			return this;
		}
		this.fileupload('option', 'formData').file = remote_url;
		this.fileupload('add', {
			files: [remote_url]
		});
		delete this.fileupload('option', 'formData').file;
		return this;
	};
	
	/**
	 * Initialize the jQuery File Upload plugin to upload to Cloudinary using unsigned upload
	 * @function jQuery#unsigned_cloudinary_upload
	 * @param {string} upload_preset - the upload preset to use
	 * @param {Object} [upload_params] - parameters that should be past to the server
	 * @param {Object} [options]
	 * @returns {jQuery}
	 */
	jQuery.fn.unsigned_cloudinary_upload = function(upload_preset, upload_params, options) {
		var attr, attrs_to_move, html_options, i, key, value;
		if (upload_params == null) {
			upload_params = {};
		}
		if (options == null) {
			options = {};
		}
		upload_params = Util.cloneDeep(upload_params);
		options = Util.cloneDeep(options);
		attrs_to_move = ['cloud_name', 'resource_type', 'type'];
		i = 0;
		while (i < attrs_to_move.length) {
			attr = attrs_to_move[i];
			if (upload_params[attr]) {
				options[attr] = upload_params[attr];
				delete upload_params[attr];
			}
			i++;
		}
		for (key in upload_params) {
			value = upload_params[key];
			if (Util.isPlainObject(value)) {
				upload_params[key] = jQuery.map(value, function(v, k) {
					if (Util.isString(v)) {
						v = v.replace(/[\|=]/g, "\\$&");
					}
					return k + '=' + v;
				}).join('|');
			} else if (Util.isArray(value)) {
				if (value.length > 0 && jQuery.isArray(value[0])) {
					upload_params[key] = jQuery.map(value, function(array_value) {
						return array_value.join(',');
					}).join('|');
				} else {
					upload_params[key] = value.join(',');
				}
			}
		}
		if (!upload_params.callback) {
			upload_params.callback = '/cloudinary_cors.html';
		}
		upload_params.upload_preset = upload_preset;
		options.formData = upload_params;
		if (options.cloudinary_field) {
			options.cloudinaryField = options.cloudinary_field;
			delete options.cloudinary_field;
		}
		html_options = options.html || {};
		html_options["class"] = Util.trim("cloudinary_fileupload " + (html_options["class"] || ''));
		if (options.multiple) {
			html_options.multiple = true;
		}
		this.attr(html_options).cloudinary_fileupload(options);
		return this;
	};
	jQuery.cloudinary = new CloudinaryJQuery();
	cloudinary = {
		utf8_encode: utf8_encode,
		crc32: crc32,
		Util: Util,
		Condition: Condition,
		Transformation: Transformation,
		Configuration: Configuration,
		HtmlTag: HtmlTag,
		ImageTag: ImageTag,
		VideoTag: VideoTag,
		ClientHintsMetaTag: ClientHintsMetaTag,
		Layer: Layer,
		FetchLayer: FetchLayer,
		TextLayer: TextLayer,
		SubtitlesLayer: SubtitlesLayer,
		Cloudinary: Cloudinary,
		VERSION: "2.5.0",
		CloudinaryJQuery: CloudinaryJQuery
	};
	return cloudinary;
});;
/*!
 * Masonry PACKAGED v4.2.2
 * Cascading grid layout library
 * https://masonry.desandro.com
 * MIT License
 * by David DeSandro
 */

!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,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.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=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(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||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,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 n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.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=-1==t.indexOf("%")&&!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;u>e;e++){var i=h[e];t[i]=0}return t}function n(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 o(){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 o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),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 n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();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 n=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?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&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,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},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 o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,n,h)})})},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 n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,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 n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=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,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),o&&!this.isTransitioning)return void this.layoutPosition();var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?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 n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(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(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},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 s&&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:""})},n}),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,n,o,r){return e(t,i,n,o,r)}):"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,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(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],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.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 f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.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},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._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"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._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)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.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)}},f.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()})}},f.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()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.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 c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["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 n=i.prototype;return n._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},n.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 n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});;
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
 * @license MIT */

;(function(root, factory) {

  if (typeof define === 'function' && define.amd) {
    define(factory);
  } else if (typeof exports === 'object') {
    module.exports = factory();
  } else {
    root.NProgress = factory();
  }

})(this, function() {
  var NProgress = {};

  NProgress.version = '0.1.6';

  var Settings = NProgress.settings = {
    minimum: 0.08,
    easing: 'ease',
    positionUsing: '',
    speed: 200,
    trickle: true,
    trickleRate: 0.02,
    trickleSpeed: 800,
    showSpinner: true,
    barSelector: '[role="bar"]',
    spinnerSelector: '[role="spinner"]',
    parent: 'body',
    template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
  };

  /**
   * Updates configuration.
   *
   *     NProgress.configure({
   *       minimum: 0.1
   *     });
   */
  NProgress.configure = function(options) {
    var key, value;
    for (key in options) {
      value = options[key];
      if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;
    }

    return this;
  };

  /**
   * Last number.
   */

  NProgress.status = null;

  /**
   * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
   *
   *     NProgress.set(0.4);
   *     NProgress.set(1.0);
   */

  NProgress.set = function(n) {
    var started = NProgress.isStarted();

    n = clamp(n, Settings.minimum, 1);
    NProgress.status = (n === 1 ? null : n);

    var progress = NProgress.render(!started),
        bar      = progress.querySelector(Settings.barSelector),
        speed    = Settings.speed,
        ease     = Settings.easing;

    progress.offsetWidth; /* Repaint */

    queue(function(next) {
      // Set positionUsing if it hasn't already been set
      if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();

      // Add transition
      css(bar, barPositionCSS(n, speed, ease));

      if (n === 1) {
        // Fade out
        css(progress, { 
          transition: 'none', 
          opacity: 1 
        });
        progress.offsetWidth; /* Repaint */

        setTimeout(function() {
          css(progress, { 
            transition: 'all ' + speed + 'ms linear', 
            opacity: 0 
          });
          setTimeout(function() {
            NProgress.remove();
            next();
          }, speed);
        }, speed);
      } else {
        setTimeout(next, speed);
      }
    });

    return this;
  };

  NProgress.isStarted = function() {
    return typeof NProgress.status === 'number';
  };

  /**
   * Shows the progress bar.
   * This is the same as setting the status to 0%, except that it doesn't go backwards.
   *
   *     NProgress.start();
   *
   */
  NProgress.start = function() {
    if (!NProgress.status) NProgress.set(0);

    var work = function() {
      setTimeout(function() {
        if (!NProgress.status) return;
        NProgress.trickle();
        work();
      }, Settings.trickleSpeed);
    };

    if (Settings.trickle) work();

    return this;
  };

  /**
   * Hides the progress bar.
   * This is the *sort of* the same as setting the status to 100%, with the
   * difference being `done()` makes some placebo effect of some realistic motion.
   *
   *     NProgress.done();
   *
   * If `true` is passed, it will show the progress bar even if its hidden.
   *
   *     NProgress.done(true);
   */

  NProgress.done = function(force) {
    if (!force && !NProgress.status) return this;

    return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
  };

  /**
   * Increments by a random amount.
   */

  NProgress.inc = function(amount) {
    var n = NProgress.status;

    if (!n) {
      return NProgress.start();
    } else {
      if (typeof amount !== 'number') {
        amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95);
      }

      n = clamp(n + amount, 0, 0.994);
      return NProgress.set(n);
    }
  };

  NProgress.trickle = function() {
    return NProgress.inc(Math.random() * Settings.trickleRate);
  };

  /**
   * Waits for all supplied jQuery promises and
   * increases the progress as the promises resolve.
   * 
   * @param $promise jQUery Promise
   */
  (function() {
    var initial = 0, current = 0;
    
    NProgress.promise = function($promise) {
      if (!$promise || $promise.state() == "resolved") {
        return this;
      }
      
      if (current == 0) {
        NProgress.start();
      }
      
      initial++;
      current++;
      
      $promise.always(function() {
        current--;
        if (current == 0) {
            initial = 0;
            NProgress.done();
        } else {
            NProgress.set((initial - current) / initial);
        }
      });
      
      return this;
    };
    
  })();

  /**
   * (Internal) renders the progress bar markup based on the `template`
   * setting.
   */

  NProgress.render = function(fromStart) {
    if (NProgress.isRendered()) return document.getElementById('nprogress');

    addClass(document.documentElement, 'nprogress-busy');
    
    var progress = document.createElement('div');
    progress.id = 'nprogress';
    progress.innerHTML = Settings.template;

    var bar      = progress.querySelector(Settings.barSelector),
        perc     = fromStart ? '-100' : toBarPerc(NProgress.status || 0),
        parent   = document.querySelector(Settings.parent),
        spinner;
    
    css(bar, {
      transition: 'all 0 linear',
      transform: 'translate3d(' + perc + '%,0,0)'
    });

    if (!Settings.showSpinner) {
      spinner = progress.querySelector(Settings.spinnerSelector);
      spinner && removeElement(spinner);
    }

    if (parent != document.body) {
      addClass(parent, 'nprogress-custom-parent');
    }

    parent.appendChild(progress);
    return progress;
  };

  /**
   * Removes the element. Opposite of render().
   */

  NProgress.remove = function() {
    removeClass(document.documentElement, 'nprogress-busy');
    removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent')
    var progress = document.getElementById('nprogress');
    progress && removeElement(progress);
  };

  /**
   * Checks if the progress bar is rendered.
   */

  NProgress.isRendered = function() {
    return !!document.getElementById('nprogress');
  };

  /**
   * Determine which positioning CSS rule to use.
   */

  NProgress.getPositioningCSS = function() {
    // Sniff on document.body.style
    var bodyStyle = document.body.style;

    // Sniff prefixes
    var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :
                       ('MozTransform' in bodyStyle) ? 'Moz' :
                       ('msTransform' in bodyStyle) ? 'ms' :
                       ('OTransform' in bodyStyle) ? 'O' : '';

    if (vendorPrefix + 'Perspective' in bodyStyle) {
      // Modern browsers with 3D support, e.g. Webkit, IE10
      return 'translate3d';
    } else if (vendorPrefix + 'Transform' in bodyStyle) {
      // Browsers without 3D support, e.g. IE9
      return 'translate';
    } else {
      // Browsers without translate() support, e.g. IE7-8
      return 'margin';
    }
  };

  /**
   * Helpers
   */

  function clamp(n, min, max) {
    if (n < min) return min;
    if (n > max) return max;
    return n;
  }

  /**
   * (Internal) converts a percentage (`0..1`) to a bar translateX
   * percentage (`-100%..0%`).
   */

  function toBarPerc(n) {
    return (-1 + n) * 100;
  }


  /**
   * (Internal) returns the correct CSS for changing the bar's
   * position given an n percentage, and speed and ease from Settings
   */

  function barPositionCSS(n, speed, ease) {
    var barCSS;

    if (Settings.positionUsing === 'translate3d') {
      barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };
    } else if (Settings.positionUsing === 'translate') {
      barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' };
    } else {
      barCSS = { 'margin-left': toBarPerc(n)+'%' };
    }

    barCSS.transition = 'all '+speed+'ms '+ease;

    return barCSS;
  }

  /**
   * (Internal) Queues a function to be executed.
   */

  var queue = (function() {
    var pending = [];
    
    function next() {
      var fn = pending.shift();
      if (fn) {
        fn(next);
      }
    }

    return function(fn) {
      pending.push(fn);
      if (pending.length == 1) next();
    };
  })();

  /**
   * (Internal) Applies css properties to an element, similar to the jQuery 
   * css method.
   *
   * While this helper does assist with vendor prefixed property names, it 
   * does not perform any manipulation of values prior to setting styles.
   */

  var css = (function() {
    var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],
        cssProps    = {};

    function camelCase(string) {
      return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function(match, letter) {
        return letter.toUpperCase();
      });
    }

    function getVendorProp(name) {
      var style = document.body.style;
      if (name in style) return name;

      var i = cssPrefixes.length,
          capName = name.charAt(0).toUpperCase() + name.slice(1),
          vendorName;
      while (i--) {
        vendorName = cssPrefixes[i] + capName;
        if (vendorName in style) return vendorName;
      }

      return name;
    }

    function getStyleProp(name) {
      name = camelCase(name);
      return cssProps[name] || (cssProps[name] = getVendorProp(name));
    }

    function applyCss(element, prop, value) {
      prop = getStyleProp(prop);
      element.style[prop] = value;
    }

    return function(element, properties) {
      var args = arguments,
          prop, 
          value;

      if (args.length == 2) {
        for (prop in properties) {
          value = properties[prop];
          if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);
        }
      } else {
        applyCss(element, args[1], args[2]);
      }
    }
  })();

  /**
   * (Internal) Determines if an element or space separated list of class names contains a class name.
   */

  function hasClass(element, name) {
    var list = typeof element == 'string' ? element : classList(element);
    return list.indexOf(' ' + name + ' ') >= 0;
  }

  /**
   * (Internal) Adds a class to an element.
   */

  function addClass(element, name) {
    var oldList = classList(element),
        newList = oldList + name;

    if (hasClass(oldList, name)) return; 

    // Trim the opening space.
    element.className = newList.substring(1);
  }

  /**
   * (Internal) Removes a class from an element.
   */

  function removeClass(element, name) {
    var oldList = classList(element),
        newList;

    if (!hasClass(element, name)) return;

    // Replace the class name.
    newList = oldList.replace(' ' + name + ' ', ' ');

    // Trim the opening and closing spaces.
    element.className = newList.substring(1, newList.length - 1);
  }

  /**
   * (Internal) Gets a space separated list of the class names on the element. 
   * The list is wrapped with a single space on each end to facilitate finding 
   * matches within the list.
   */

  function classList(element) {
    return (' ' + (element.className || '') + ' ').replace(/\s+/gi, ' ');
  }

  /**
   * (Internal) Removes an element from the DOM.
   */

  function removeElement(element) {
    element && element.parentNode && element.parentNode.removeChild(element);
  }

  return NProgress;
});

;
!function () { var e = function (t, i) { function s() { this.q = [], this.add = function (e) { this.q.push(e) }; var e, t; this.call = function () { for (e = 0, t = this.q.length; e < t; e++) this.q[e].call() } } function o(e, t) { return e.currentStyle ? e.currentStyle[t] : window.getComputedStyle ? window.getComputedStyle(e, null).getPropertyValue(t) : e.style[t] } function n(e, t) { if (e.resizedAttached) { if (e.resizedAttached) return void e.resizedAttached.add(t) } else e.resizedAttached = new s, e.resizedAttached.add(t); e.resizeSensor = document.createElement("div"), e.resizeSensor.className = "resize-sensor"; var i = "position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;", n = "position: absolute; left: 0; top: 0; transition: 0s;"; e.resizeSensor.style.cssText = i, e.resizeSensor.innerHTML = '<div class="resize-sensor-expand" style="' + i + '"><div style="' + n + '"></div></div><div class="resize-sensor-shrink" style="' + i + '"><div style="' + n + ' width: 200%; height: 200%"></div></div>', e.appendChild(e.resizeSensor), { fixed: 1, absolute: 1 }[o(e, "position")] || (e.style.position = "relative"); var d, r, l = e.resizeSensor.childNodes[0], c = l.childNodes[0], h = e.resizeSensor.childNodes[1], a = (h.childNodes[0], function () { c.style.width = l.offsetWidth + 10 + "px", c.style.height = l.offsetHeight + 10 + "px", l.scrollLeft = l.scrollWidth, l.scrollTop = l.scrollHeight, h.scrollLeft = h.scrollWidth, h.scrollTop = h.scrollHeight, d = e.offsetWidth, r = e.offsetHeight }); a(); var f = function () { e.resizedAttached && e.resizedAttached.call() }, u = function (e, t, i) { e.attachEvent ? e.attachEvent("on" + t, i) : e.addEventListener(t, i) }, p = function () { e.offsetWidth == d && e.offsetHeight == r || f(), a() }; u(l, "scroll", p), u(h, "scroll", p) } var d = Object.prototype.toString.call(t), r = "[object Array]" === d || "[object NodeList]" === d || "[object HTMLCollection]" === d || "undefined" != typeof jQuery && t instanceof jQuery || "undefined" != typeof Elements && t instanceof Elements; if (r) for (var l = 0, c = t.length; l < c; l++) n(t[l], i); else n(t, i); this.detach = function () { if (r) for (var i = 0, s = t.length; i < s; i++) e.detach(t[i]); else e.detach(t) } }; e.detach = function (e) { e.resizeSensor && (e.removeChild(e.resizeSensor), delete e.resizeSensor, delete e.resizedAttached) }, "undefined" != typeof module && "undefined" != typeof module.exports ? module.exports = e : window.ResizeSensor = e }();
//# sourceMappingURL=maps/ResizeSensor.min.js.map;
/*
     _ _      _       _
 ___| (_) ___| | __  (_)___
/ __| | |/ __| |/ /  | / __|
\__ \ | | (__|   < _ | \__ \
|___/_|_|\___|_|\_(_)/ |___/
                   |__/

 Version: 1.5.9
  Author: Ken Wheeler
 Website: http://kenwheeler.github.io
    Docs: http://kenwheeler.github.io/slick
    Repo: http://github.com/kenwheeler/slick
  Issues: http://github.com/kenwheeler/slick/issues

 */
!function (a) { "use strict"; "function" == typeof define && define.amd ? define(["jquery"], a) : "undefined" != typeof exports ? module.exports = a(require("jquery")) : a(jQuery) }(function (a) {
	"use strict"; var b = window.Slick || {}; b = function () { function c(c, d) { var f, e = this; e.defaults = { accessibility: !0, adaptiveHeight: !1, appendArrows: a(c), appendDots: a(c), arrows: !0, asNavFor: null, prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>', nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>', autoplay: !1, autoplaySpeed: 3e3, centerMode: !1, centerPadding: "50px", cssEase: "ease", customPaging: function (a, b) { return '<button type="button" data-role="none" role="button" aria-required="false" tabindex="0">' + (b + 1) + "</button>" }, dots: !1, dotsClass: "slick-dots", draggable: !0, easing: "linear", edgeFriction: .35, fade: !1, focusOnSelect: !1, infinite: !0, initialSlide: 0, lazyLoad: "ondemand", mobileFirst: !1, pauseOnHover: !0, pauseOnDotsHover: !1, respondTo: "window", responsive: null, rows: 1, rtl: !1, slide: "", slidesPerRow: 1, slidesToShow: 1, slidesToScroll: 1, speed: 500, swipe: !0, swipeToSlide: !1, touchMove: !0, touchThreshold: 5, useCSS: !0, useTransform: !1, variableWidth: !1, vertical: !1, verticalSwiping: !1, waitForAnimate: !0, zIndex: 1e3 }, e.initials = { animating: !1, dragging: !1, autoPlayTimer: null, currentDirection: 0, currentLeft: null, currentSlide: 0, direction: 1, $dots: null, listWidth: null, listHeight: null, loadIndex: 0, $nextArrow: null, $prevArrow: null, slideCount: null, slideWidth: null, $slideTrack: null, $slides: null, sliding: !1, slideOffset: 0, swipeLeft: null, $list: null, touchObject: {}, transformsEnabled: !1, unslicked: !1 }, a.extend(e, e.initials), e.activeBreakpoint = null, e.animType = null, e.animProp = null, e.breakpoints = [], e.breakpointSettings = [], e.cssTransitions = !1, e.hidden = "hidden", e.paused = !1, e.positionProp = null, e.respondTo = null, e.rowCount = 1, e.shouldClick = !0, e.$slider = a(c), e.$slidesCache = null, e.transformType = null, e.transitionType = null, e.visibilityChange = "visibilitychange", e.windowWidth = 0, e.windowTimer = null, f = a(c).data("slick") || {}, e.options = a.extend({}, e.defaults, f, d), e.currentSlide = e.options.initialSlide, e.originalSettings = e.options, "undefined" != typeof document.mozHidden ? (e.hidden = "mozHidden", e.visibilityChange = "mozvisibilitychange") : "undefined" != typeof document.webkitHidden && (e.hidden = "webkitHidden", e.visibilityChange = "webkitvisibilitychange"), e.autoPlay = a.proxy(e.autoPlay, e), e.autoPlayClear = a.proxy(e.autoPlayClear, e), e.changeSlide = a.proxy(e.changeSlide, e), e.clickHandler = a.proxy(e.clickHandler, e), e.selectHandler = a.proxy(e.selectHandler, e), e.setPosition = a.proxy(e.setPosition, e), e.swipeHandler = a.proxy(e.swipeHandler, e), e.dragHandler = a.proxy(e.dragHandler, e), e.keyHandler = a.proxy(e.keyHandler, e), e.autoPlayIterator = a.proxy(e.autoPlayIterator, e), e.instanceUid = b++, e.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/, e.registerBreakpoints(), e.init(!0), e.checkResponsive(!0) } var b = 0; return c }(), b.prototype.addSlide = b.prototype.slickAdd = function (b, c, d) { var e = this; if ("boolean" == typeof c) d = c, c = null; else if (0 > c || c >= e.slideCount) return !1; e.unload(), "number" == typeof c ? 0 === c && 0 === e.$slides.length ? a(b).appendTo(e.$slideTrack) : d ? a(b).insertBefore(e.$slides.eq(c)) : a(b).insertAfter(e.$slides.eq(c)) : d === !0 ? a(b).prependTo(e.$slideTrack) : a(b).appendTo(e.$slideTrack), e.$slides = e.$slideTrack.children(this.options.slide), e.$slideTrack.children(this.options.slide).detach(), e.$slideTrack.append(e.$slides), e.$slides.each(function (b, c) { a(c).attr("data-slick-index", b) }), e.$slidesCache = e.$slides, e.reinit() }, b.prototype.animateHeight = function () { var a = this; if (1 === a.options.slidesToShow && a.options.adaptiveHeight === !0 && a.options.vertical === !1) { var b = a.$slides.eq(a.currentSlide).outerHeight(!0); a.$list.animate({ height: b }, a.options.speed) } }, b.prototype.animateSlide = function (b, c) { var d = {}, e = this; e.animateHeight(), e.options.rtl === !0 && e.options.vertical === !1 && (b = -b), e.transformsEnabled === !1 ? e.options.vertical === !1 ? e.$slideTrack.animate({ left: b }, e.options.speed, e.options.easing, c) : e.$slideTrack.animate({ top: b }, e.options.speed, e.options.easing, c) : e.cssTransitions === !1 ? (e.options.rtl === !0 && (e.currentLeft = -e.currentLeft), a({ animStart: e.currentLeft }).animate({ animStart: b }, { duration: e.options.speed, easing: e.options.easing, step: function (a) { a = Math.ceil(a), e.options.vertical === !1 ? (d[e.animType] = "translate(" + a + "px, 0px)", e.$slideTrack.css(d)) : (d[e.animType] = "translate(0px," + a + "px)", e.$slideTrack.css(d)) }, complete: function () { c && c.call() } })) : (e.applyTransition(), b = Math.ceil(b), e.options.vertical === !1 ? d[e.animType] = "translate3d(" + b + "px, 0px, 0px)" : d[e.animType] = "translate3d(0px," + b + "px, 0px)", e.$slideTrack.css(d), c && setTimeout(function () { e.disableTransition(), c.call() }, e.options.speed)) }, b.prototype.asNavFor = function (b) { var c = this, d = c.options.asNavFor; d && null !== d && (d = a(d).not(c.$slider)), null !== d && "object" == typeof d && d.each(function () { var c = a(this).slick("getSlick"); c.unslicked || c.slideHandler(b, !0) }) }, b.prototype.applyTransition = function (a) { var b = this, c = {}; b.options.fade === !1 ? c[b.transitionType] = b.transformType + " " + b.options.speed + "ms " + b.options.cssEase : c[b.transitionType] = "opacity " + b.options.speed + "ms " + b.options.cssEase, b.options.fade === !1 ? b.$slideTrack.css(c) : b.$slides.eq(a).css(c) }, b.prototype.autoPlay = function () { var a = this; a.autoPlayTimer && clearInterval(a.autoPlayTimer), a.slideCount > a.options.slidesToShow && a.paused !== !0 && (a.autoPlayTimer = setInterval(a.autoPlayIterator, a.options.autoplaySpeed)) }, b.prototype.autoPlayClear = function () { var a = this; a.autoPlayTimer && clearInterval(a.autoPlayTimer) }, b.prototype.autoPlayIterator = function () { var a = this; a.options.infinite === !1 ? 1 === a.direction ? (a.currentSlide + 1 === a.slideCount - 1 && (a.direction = 0), a.slideHandler(a.currentSlide + a.options.slidesToScroll)) : (a.currentSlide - 1 === 0 && (a.direction = 1), a.slideHandler(a.currentSlide - a.options.slidesToScroll)) : a.slideHandler(a.currentSlide + a.options.slidesToScroll) }, b.prototype.buildArrows = function () { var b = this; b.options.arrows === !0 && (b.$prevArrow = a(b.options.prevArrow).addClass("slick-arrow"), b.$nextArrow = a(b.options.nextArrow).addClass("slick-arrow"), b.slideCount > b.options.slidesToShow ? (b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"), b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"), b.htmlExpr.test(b.options.prevArrow) && b.$prevArrow.prependTo(b.options.appendArrows), b.htmlExpr.test(b.options.nextArrow) && b.$nextArrow.appendTo(b.options.appendArrows), b.options.infinite !== !0 && b.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true")) : b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({ "aria-disabled": "true", tabindex: "-1" })) }, b.prototype.buildDots = function () { var c, d, b = this; if (b.options.dots === !0 && b.slideCount > b.options.slidesToShow) { for (d = '<ul class="' + b.options.dotsClass + '">', c = 0; c <= b.getDotCount() ; c += 1) d += "<li>" + b.options.customPaging.call(this, b, c) + "</li>"; d += "</ul>", b.$dots = a(d).appendTo(b.options.appendDots), b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden", "false") } }, b.prototype.buildOut = function () { var b = this; b.$slides = b.$slider.children(b.options.slide + ":not(.slick-cloned)").addClass("slick-slide"), b.slideCount = b.$slides.length, b.$slides.each(function (b, c) { a(c).attr("data-slick-index", b).data("originalStyling", a(c).attr("style") || "") }), b.$slider.addClass("slick-slider"), b.$slideTrack = 0 === b.slideCount ? a('<div class="slick-track"/>').appendTo(b.$slider) : b.$slides.wrapAll('<div class="slick-track"/>').parent(), b.$list = b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(), b.$slideTrack.css("opacity", 0), (b.options.centerMode === !0 || b.options.swipeToSlide === !0) && (b.options.slidesToScroll = 1), a("img[data-lazy]", b.$slider).not("[src]").addClass("slick-loading"), b.setupInfinite(), b.buildArrows(), b.buildDots(), b.updateDots(), b.setSlideClasses("number" == typeof b.currentSlide ? b.currentSlide : 0), b.options.draggable === !0 && b.$list.addClass("draggable") }, b.prototype.buildRows = function () { var b, c, d, e, f, g, h, a = this; if (e = document.createDocumentFragment(), g = a.$slider.children(), a.options.rows > 1) { for (h = a.options.slidesPerRow * a.options.rows, f = Math.ceil(g.length / h), b = 0; f > b; b++) { var i = document.createElement("div"); for (c = 0; c < a.options.rows; c++) { var j = document.createElement("div"); for (d = 0; d < a.options.slidesPerRow; d++) { var k = b * h + (c * a.options.slidesPerRow + d); g.get(k) && j.appendChild(g.get(k)) } i.appendChild(j) } e.appendChild(i) } a.$slider.html(e), a.$slider.children().children().children().css({ width: 100 / a.options.slidesPerRow + "%", display: "inline-block" }) } }, b.prototype.checkResponsive = function (b, c) { var e, f, g, d = this, h = !1, i = d.$slider.width(), j = window.innerWidth || a(window).width(); if ("window" === d.respondTo ? g = j : "slider" === d.respondTo ? g = i : "min" === d.respondTo && (g = Math.min(j, i)), d.options.responsive && d.options.responsive.length && null !== d.options.responsive) { f = null; for (e in d.breakpoints) d.breakpoints.hasOwnProperty(e) && (d.originalSettings.mobileFirst === !1 ? g < d.breakpoints[e] && (f = d.breakpoints[e]) : g > d.breakpoints[e] && (f = d.breakpoints[e])); null !== f ? null !== d.activeBreakpoint ? (f !== d.activeBreakpoint || c) && (d.activeBreakpoint = f, "unslick" === d.breakpointSettings[f] ? d.unslick(f) : (d.options = a.extend({}, d.originalSettings, d.breakpointSettings[f]), b === !0 && (d.currentSlide = d.options.initialSlide), d.refresh(b)), h = f) : (d.activeBreakpoint = f, "unslick" === d.breakpointSettings[f] ? d.unslick(f) : (d.options = a.extend({}, d.originalSettings, d.breakpointSettings[f]), b === !0 && (d.currentSlide = d.options.initialSlide), d.refresh(b)), h = f) : null !== d.activeBreakpoint && (d.activeBreakpoint = null, d.options = d.originalSettings, b === !0 && (d.currentSlide = d.options.initialSlide), d.refresh(b), h = f), b || h === !1 || d.$slider.trigger("breakpoint", [d, h]) } }, b.prototype.changeSlide = function (b, c) { var f, g, h, d = this, e = a(b.target); switch (e.is("a") && b.preventDefault(), e.is("li") || (e = e.closest("li")), h = d.slideCount % d.options.slidesToScroll !== 0, f = h ? 0 : (d.slideCount - d.currentSlide) % d.options.slidesToScroll, b.data.message) { case "previous": g = 0 === f ? d.options.slidesToScroll : d.options.slidesToShow - f, d.slideCount > d.options.slidesToShow && d.slideHandler(d.currentSlide - g, !1, c); break; case "next": g = 0 === f ? d.options.slidesToScroll : f, d.slideCount > d.options.slidesToShow && d.slideHandler(d.currentSlide + g, !1, c); break; case "index": var i = 0 === b.data.index ? 0 : b.data.index || e.index() * d.options.slidesToScroll; d.slideHandler(d.checkNavigable(i), !1, c), e.children().trigger("focus"); break; default: return } }, b.prototype.checkNavigable = function (a) { var c, d, b = this; if (c = b.getNavigableIndexes(), d = 0, a > c[c.length - 1]) a = c[c.length - 1]; else for (var e in c) { if (a < c[e]) { a = d; break } d = c[e] } return a }, b.prototype.cleanUpEvents = function () { var b = this; b.options.dots && null !== b.$dots && (a("li", b.$dots).off("click.slick", b.changeSlide), b.options.pauseOnDotsHover === !0 && b.options.autoplay === !0 && a("li", b.$dots).off("mouseenter.slick", a.proxy(b.setPaused, b, !0)).off("mouseleave.slick", a.proxy(b.setPaused, b, !1))), b.options.arrows === !0 && b.slideCount > b.options.slidesToShow && (b.$prevArrow && b.$prevArrow.off("click.slick", b.changeSlide), b.$nextArrow && b.$nextArrow.off("click.slick", b.changeSlide)), b.$list.off("touchstart.slick mousedown.slick", b.swipeHandler), b.$list.off("touchmove.slick mousemove.slick", b.swipeHandler), b.$list.off("touchend.slick mouseup.slick", b.swipeHandler), b.$list.off("touchcancel.slick mouseleave.slick", b.swipeHandler), b.$list.off("click.slick", b.clickHandler), a(document).off(b.visibilityChange, b.visibility), b.$list.off("mouseenter.slick", a.proxy(b.setPaused, b, !0)), b.$list.off("mouseleave.slick", a.proxy(b.setPaused, b, !1)), b.options.accessibility === !0 && b.$list.off("keydown.slick", b.keyHandler), b.options.focusOnSelect === !0 && a(b.$slideTrack).children().off("click.slick", b.selectHandler), a(window).off("orientationchange.slick.slick-" + b.instanceUid, b.orientationChange), a(window).off("resize.slick.slick-" + b.instanceUid, b.resize), a("[draggable!=true]", b.$slideTrack).off("dragstart", b.preventDefault), a(window).off("load.slick.slick-" + b.instanceUid, b.setPosition), a(document).off("ready.slick.slick-" + b.instanceUid, b.setPosition) }, b.prototype.cleanUpRows = function () { var b, a = this; a.options.rows > 1 && (b = a.$slides.children().children(), b.removeAttr("style"), a.$slider.html(b)) }, b.prototype.clickHandler = function (a) { var b = this; b.shouldClick === !1 && (a.stopImmediatePropagation(), a.stopPropagation(), a.preventDefault()) }, b.prototype.destroy = function (b) { var c = this; c.autoPlayClear(), c.touchObject = {}, c.cleanUpEvents(), a(".slick-cloned", c.$slider).detach(), c.$dots && c.$dots.remove(), c.$prevArrow && c.$prevArrow.length && (c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""), c.htmlExpr.test(c.options.prevArrow) && c.$prevArrow.remove()), c.$nextArrow && c.$nextArrow.length && (c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""), c.htmlExpr.test(c.options.nextArrow) && c.$nextArrow.remove()), c.$slides && (c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function () { a(this).attr("style", a(this).data("originalStyling")) }), c.$slideTrack.children(this.options.slide).detach(), c.$slideTrack.detach(), c.$list.detach(), c.$slider.append(c.$slides)), c.cleanUpRows(), c.$slider.removeClass("slick-slider"), c.$slider.removeClass("slick-initialized"), c.unslicked = !0, b || c.$slider.trigger("destroy", [c]) }, b.prototype.disableTransition = function (a) { var b = this, c = {}; c[b.transitionType] = "", b.options.fade === !1 ? b.$slideTrack.css(c) : b.$slides.eq(a).css(c) }, b.prototype.fadeSlide = function (a, b) { var c = this; c.cssTransitions === !1 ? (c.$slides.eq(a).css({ zIndex: c.options.zIndex }), c.$slides.eq(a).animate({ opacity: 1 }, c.options.speed, c.options.easing, b)) : (c.applyTransition(a), c.$slides.eq(a).css({ opacity: 1, zIndex: c.options.zIndex }), b && setTimeout(function () { c.disableTransition(a), b.call() }, c.options.speed)) }, b.prototype.fadeSlideOut = function (a) { var b = this; b.cssTransitions === !1 ? b.$slides.eq(a).animate({ opacity: 0, zIndex: b.options.zIndex - 2 }, b.options.speed, b.options.easing) : (b.applyTransition(a), b.$slides.eq(a).css({ opacity: 0, zIndex: b.options.zIndex - 2 })) }, b.prototype.filterSlides = b.prototype.slickFilter = function (a) { var b = this; null !== a && (b.$slidesCache = b.$slides, b.unload(), b.$slideTrack.children(this.options.slide).detach(), b.$slidesCache.filter(a).appendTo(b.$slideTrack), b.reinit()) }, b.prototype.getCurrent = b.prototype.slickCurrentSlide = function () { var a = this; return a.currentSlide }, b.prototype.getDotCount = function () { var a = this, b = 0, c = 0, d = 0; if (a.options.infinite === !0) for (; b < a.slideCount;)++d, b = c + a.options.slidesToScroll, c += a.options.slidesToScroll <= a.options.slidesToShow ? a.options.slidesToScroll : a.options.slidesToShow; else if (a.options.centerMode === !0) d = a.slideCount; else for (; b < a.slideCount;)++d, b = c + a.options.slidesToScroll, c += a.options.slidesToScroll <= a.options.slidesToShow ? a.options.slidesToScroll : a.options.slidesToShow; return d - 1 }, b.prototype.getLeft = function (a) { var c, d, f, b = this, e = 0; return b.slideOffset = 0, d = b.$slides.first().outerHeight(!0), b.options.infinite === !0 ? (b.slideCount > b.options.slidesToShow && (b.slideOffset = b.slideWidth * b.options.slidesToShow * -1, e = d * b.options.slidesToShow * -1), b.slideCount % b.options.slidesToScroll !== 0 && a + b.options.slidesToScroll > b.slideCount && b.slideCount > b.options.slidesToShow && (a > b.slideCount ? (b.slideOffset = (b.options.slidesToShow - (a - b.slideCount)) * b.slideWidth * -1, e = (b.options.slidesToShow - (a - b.slideCount)) * d * -1) : (b.slideOffset = b.slideCount % b.options.slidesToScroll * b.slideWidth * -1, e = b.slideCount % b.options.slidesToScroll * d * -1))) : a + b.options.slidesToShow > b.slideCount && (b.slideOffset = (a + b.options.slidesToShow - b.slideCount) * b.slideWidth, e = (a + b.options.slidesToShow - b.slideCount) * d), b.slideCount <= b.options.slidesToShow && (b.slideOffset = 0, e = 0), b.options.centerMode === !0 && b.options.infinite === !0 ? b.slideOffset += b.slideWidth * Math.floor(b.options.slidesToShow / 2) - b.slideWidth : b.options.centerMode === !0 && (b.slideOffset = 0, b.slideOffset += b.slideWidth * Math.floor(b.options.slidesToShow / 2)), c = b.options.vertical === !1 ? a * b.slideWidth * -1 + b.slideOffset : a * d * -1 + e, b.options.variableWidth === !0 && (f = b.slideCount <= b.options.slidesToShow || b.options.infinite === !1 ? b.$slideTrack.children(".slick-slide").eq(a) : b.$slideTrack.children(".slick-slide").eq(a + b.options.slidesToShow), c = b.options.rtl === !0 ? f[0] ? -1 * (b.$slideTrack.width() - f[0].offsetLeft - f.width()) : 0 : f[0] ? -1 * f[0].offsetLeft : 0, b.options.centerMode === !0 && (f = b.slideCount <= b.options.slidesToShow || b.options.infinite === !1 ? b.$slideTrack.children(".slick-slide").eq(a) : b.$slideTrack.children(".slick-slide").eq(a + b.options.slidesToShow + 1), c = b.options.rtl === !0 ? f[0] ? -1 * (b.$slideTrack.width() - f[0].offsetLeft - f.width()) : 0 : f[0] ? -1 * f[0].offsetLeft : 0, c += (b.$list.width() - f.outerWidth()) / 2)), c }, b.prototype.getOption = b.prototype.slickGetOption = function (a) { var b = this; return b.options[a] }, b.prototype.getNavigableIndexes = function () { var e, a = this, b = 0, c = 0, d = []; for (a.options.infinite === !1 ? e = a.slideCount : (b = -1 * a.options.slidesToScroll, c = -1 * a.options.slidesToScroll, e = 2 * a.slideCount) ; e > b;) d.push(b), b = c + a.options.slidesToScroll, c += a.options.slidesToScroll <= a.options.slidesToShow ? a.options.slidesToScroll : a.options.slidesToShow; return d }, b.prototype.getSlick = function () { return this }, b.prototype.getSlideCount = function () { var c, d, e, b = this; return e = b.options.centerMode === !0 ? b.slideWidth * Math.floor(b.options.slidesToShow / 2) : 0, b.options.swipeToSlide === !0 ? (b.$slideTrack.find(".slick-slide").each(function (c, f) { return f.offsetLeft - e + a(f).outerWidth() / 2 > -1 * b.swipeLeft ? (d = f, !1) : void 0 }), c = Math.abs(a(d).attr("data-slick-index") - b.currentSlide) || 1) : b.options.slidesToScroll }, b.prototype.goTo = b.prototype.slickGoTo = function (a, b) { var c = this; c.changeSlide({ data: { message: "index", index: parseInt(a) } }, b) }, b.prototype.init = function (b) { var c = this; a(c.$slider).hasClass("slick-initialized") || (a(c.$slider).addClass("slick-initialized"), c.buildRows(), c.buildOut(), c.setProps(), c.startLoad(), c.loadSlider(), c.initializeEvents(), c.updateArrows(), c.updateDots()), b && c.$slider.trigger("init", [c]), c.options.accessibility === !0 && c.initADA() }, b.prototype.initArrowEvents = function () { var a = this; a.options.arrows === !0 && a.slideCount > a.options.slidesToShow && (a.$prevArrow.on("click.slick", { message: "previous" }, a.changeSlide), a.$nextArrow.on("click.slick", { message: "next" }, a.changeSlide)) }, b.prototype.initDotEvents = function () { var b = this; b.options.dots === !0 && b.slideCount > b.options.slidesToShow && a("li", b.$dots).on("click.slick", { message: "index" }, b.changeSlide), b.options.dots === !0 && b.options.pauseOnDotsHover === !0 && b.options.autoplay === !0 && a("li", b.$dots).on("mouseenter.slick", a.proxy(b.setPaused, b, !0)).on("mouseleave.slick", a.proxy(b.setPaused, b, !1)) }, b.prototype.initializeEvents = function () { var b = this; b.initArrowEvents(), b.initDotEvents(), b.$list.on("touchstart.slick mousedown.slick", { action: "start" }, b.swipeHandler), b.$list.on("touchmove.slick mousemove.slick", { action: "move" }, b.swipeHandler), b.$list.on("touchend.slick mouseup.slick", { action: "end" }, b.swipeHandler), b.$list.on("touchcancel.slick mouseleave.slick", { action: "end" }, b.swipeHandler), b.$list.on("click.slick", b.clickHandler), a(document).on(b.visibilityChange, a.proxy(b.visibility, b)), b.$list.on("mouseenter.slick", a.proxy(b.setPaused, b, !0)), b.$list.on("mouseleave.slick", a.proxy(b.setPaused, b, !1)), b.options.accessibility === !0 && b.$list.on("keydown.slick", b.keyHandler), b.options.focusOnSelect === !0 && a(b.$slideTrack).children().on("click.slick", b.selectHandler), a(window).on("orientationchange.slick.slick-" + b.instanceUid, a.proxy(b.orientationChange, b)), a(window).on("resize.slick.slick-" + b.instanceUid, a.proxy(b.resize, b)), a("[draggable!=true]", b.$slideTrack).on("dragstart", b.preventDefault), a(window).on("load.slick.slick-" + b.instanceUid, b.setPosition), a(document).on("ready.slick.slick-" + b.instanceUid, b.setPosition) }, b.prototype.initUI = function () { var a = this; a.options.arrows === !0 && a.slideCount > a.options.slidesToShow && (a.$prevArrow.show(), a.$nextArrow.show()), a.options.dots === !0 && a.slideCount > a.options.slidesToShow && a.$dots.show(), a.options.autoplay === !0 && a.autoPlay() }, b.prototype.keyHandler = function (a) { var b = this; a.target.tagName.match("TEXTAREA|INPUT|SELECT") || (37 === a.keyCode && b.options.accessibility === !0 ? b.changeSlide({ data: { message: "previous" } }) : 39 === a.keyCode && b.options.accessibility === !0 && b.changeSlide({ data: { message: "next" } })) }, b.prototype.lazyLoad = function () { function g(b) { a("img[data-lazy]", b).each(function () { var b = a(this), c = a(this).attr("data-lazy"), d = document.createElement("img"); d.onload = function () { b.animate({ opacity: 0 }, 100, function () { b.attr("src", c).animate({ opacity: 1 }, 200, function () { b.removeAttr("data-lazy").removeClass("slick-loading") }) }) }, d.src = c }) } var c, d, e, f, b = this; b.options.centerMode === !0 ? b.options.infinite === !0 ? (e = b.currentSlide + (b.options.slidesToShow / 2 + 1), f = e + b.options.slidesToShow + 2) : (e = Math.max(0, b.currentSlide - (b.options.slidesToShow / 2 + 1)), f = 2 + (b.options.slidesToShow / 2 + 1) + b.currentSlide) : (e = b.options.infinite ? b.options.slidesToShow + b.currentSlide : b.currentSlide, f = e + b.options.slidesToShow, b.options.fade === !0 && (e > 0 && e--, f <= b.slideCount && f++)), c = b.$slider.find(".slick-slide").slice(e, f), g(c), b.slideCount <= b.options.slidesToShow ? (d = b.$slider.find(".slick-slide"), g(d)) : b.currentSlide >= b.slideCount - b.options.slidesToShow ? (d = b.$slider.find(".slick-cloned").slice(0, b.options.slidesToShow), g(d)) : 0 === b.currentSlide && (d = b.$slider.find(".slick-cloned").slice(-1 * b.options.slidesToShow), g(d)) }, b.prototype.loadSlider = function () { var a = this; a.setPosition(), a.$slideTrack.css({ opacity: 1 }), a.$slider.removeClass("slick-loading"), a.initUI(), "progressive" === a.options.lazyLoad && a.progressiveLazyLoad() }, b.prototype.next = b.prototype.slickNext = function () { var a = this; a.changeSlide({ data: { message: "next" } }) }, b.prototype.orientationChange = function () { var a = this; a.checkResponsive(), a.setPosition() }, b.prototype.pause = b.prototype.slickPause = function () { var a = this; a.autoPlayClear(), a.paused = !0 }, b.prototype.play = b.prototype.slickPlay = function () { var a = this; a.paused = !1, a.autoPlay() }, b.prototype.postSlide = function (a) { var b = this; b.$slider.trigger("afterChange", [b, a]), b.animating = !1, b.setPosition(), b.swipeLeft = null, b.options.autoplay === !0 && b.paused === !1 && b.autoPlay(), b.options.accessibility === !0 && b.initADA() }, b.prototype.prev = b.prototype.slickPrev = function () { var a = this; a.changeSlide({ data: { message: "previous" } }) }, b.prototype.preventDefault = function (a) { a.preventDefault() }, b.prototype.progressiveLazyLoad = function () { var c, d, b = this; c = a("img[data-lazy]", b.$slider).length, c > 0 && (d = a("img[data-lazy]", b.$slider).first(), d.attr("src", null), d.attr("src", d.attr("data-lazy")).removeClass("slick-loading").load(function () { d.removeAttr("data-lazy"), b.progressiveLazyLoad(), b.options.adaptiveHeight === !0 && b.setPosition() }).error(function () { d.removeAttr("data-lazy"), b.progressiveLazyLoad() })) }, b.prototype.refresh = function (b) { var d, e, c = this; e = c.slideCount - c.options.slidesToShow, c.options.infinite || (c.slideCount <= c.options.slidesToShow ? c.currentSlide = 0 : c.currentSlide > e && (c.currentSlide = e)), d = c.currentSlide, c.destroy(!0), a.extend(c, c.initials, { currentSlide: d }), c.init(), b || c.changeSlide({ data: { message: "index", index: d } }, !1) }, b.prototype.registerBreakpoints = function () { var c, d, e, b = this, f = b.options.responsive || null; if ("array" === a.type(f) && f.length) { b.respondTo = b.options.respondTo || "window"; for (c in f) if (e = b.breakpoints.length - 1, d = f[c].breakpoint, f.hasOwnProperty(c)) { for (; e >= 0;) b.breakpoints[e] && b.breakpoints[e] === d && b.breakpoints.splice(e, 1), e--; b.breakpoints.push(d), b.breakpointSettings[d] = f[c].settings } b.breakpoints.sort(function (a, c) { return b.options.mobileFirst ? a - c : c - a }) } }, b.prototype.reinit = function () { var b = this; b.$slides = b.$slideTrack.children(b.options.slide).addClass("slick-slide"), b.slideCount = b.$slides.length, b.currentSlide >= b.slideCount && 0 !== b.currentSlide && (b.currentSlide = b.currentSlide - b.options.slidesToScroll), b.slideCount <= b.options.slidesToShow && (b.currentSlide = 0), b.registerBreakpoints(), b.setProps(), b.setupInfinite(), b.buildArrows(), b.updateArrows(), b.initArrowEvents(), b.buildDots(), b.updateDots(), b.initDotEvents(), b.checkResponsive(!1, !0), b.options.focusOnSelect === !0 && a(b.$slideTrack).children().on("click.slick", b.selectHandler), b.setSlideClasses(0), b.setPosition(), b.$slider.trigger("reInit", [b]), b.options.autoplay === !0 && b.focusHandler() }, b.prototype.resize = function () { var b = this; a(window).width() !== b.windowWidth && (clearTimeout(b.windowDelay), b.windowDelay = window.setTimeout(function () { b.windowWidth = a(window).width(), b.checkResponsive(), b.unslicked || b.setPosition() }, 50)) }, b.prototype.removeSlide = b.prototype.slickRemove = function (a, b, c) { var d = this; return "boolean" == typeof a ? (b = a, a = b === !0 ? 0 : d.slideCount - 1) : a = b === !0 ? --a : a, d.slideCount < 1 || 0 > a || a > d.slideCount - 1 ? !1 : (d.unload(), c === !0 ? d.$slideTrack.children().remove() : d.$slideTrack.children(this.options.slide).eq(a).remove(), d.$slides = d.$slideTrack.children(this.options.slide), d.$slideTrack.children(this.options.slide).detach(), d.$slideTrack.append(d.$slides), d.$slidesCache = d.$slides, void d.reinit()) }, b.prototype.setCSS = function (a) { var d, e, b = this, c = {}; b.options.rtl === !0 && (a = -a), d = "left" == b.positionProp ? Math.ceil(a) + "px" : "0px", e = "top" == b.positionProp ? Math.ceil(a) + "px" : "0px", c[b.positionProp] = a, b.transformsEnabled === !1 ? b.$slideTrack.css(c) : (c = {}, b.cssTransitions === !1 ? (c[b.animType] = "translate(" + d + ", " + e + ")", b.$slideTrack.css(c)) : (c[b.animType] = "translate3d(" + d + ", " + e + ", 0px)", b.$slideTrack.css(c))) }, b.prototype.setDimensions = function () { var a = this; a.options.vertical === !1 ? a.options.centerMode === !0 && a.$list.css({ padding: "0px " + a.options.centerPadding }) : (a.$list.height(a.$slides.first().outerHeight(!0) * a.options.slidesToShow), a.options.centerMode === !0 && a.$list.css({ padding: a.options.centerPadding + " 0px" })), a.listWidth = a.$list.width(), a.listHeight = a.$list.height(), a.options.vertical === !1 && a.options.variableWidth === !1 ? (a.slideWidth = Math.ceil(a.listWidth / a.options.slidesToShow), a.$slideTrack.width(Math.ceil(a.slideWidth * a.$slideTrack.children(".slick-slide").length))) : a.options.variableWidth === !0 ? a.$slideTrack.width(5e3 * a.slideCount) : (a.slideWidth = Math.ceil(a.listWidth), a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0) * a.$slideTrack.children(".slick-slide").length))); var b = a.$slides.first().outerWidth(!0) - a.$slides.first().width(); a.options.variableWidth === !1 && a.$slideTrack.children(".slick-slide").width(a.slideWidth - b) }, b.prototype.setFade = function () { var c, b = this; b.$slides.each(function (d, e) { c = b.slideWidth * d * -1, b.options.rtl === !0 ? a(e).css({ position: "relative", right: c, top: 0, zIndex: b.options.zIndex - 2, opacity: 0 }) : a(e).css({ position: "relative", left: c, top: 0, zIndex: b.options.zIndex - 2, opacity: 0 }) }), b.$slides.eq(b.currentSlide).css({ zIndex: b.options.zIndex - 1, opacity: 1 }) }, b.prototype.setHeight = function () { var a = this; if (1 === a.options.slidesToShow && a.options.adaptiveHeight === !0 && a.options.vertical === !1) { var b = a.$slides.eq(a.currentSlide).outerHeight(!0); a.$list.css("height", b) } }, b.prototype.setOption = b.prototype.slickSetOption = function (b, c, d) { var f, g, e = this; if ("responsive" === b && "array" === a.type(c)) for (g in c) if ("array" !== a.type(e.options.responsive)) e.options.responsive = [c[g]]; else { for (f = e.options.responsive.length - 1; f >= 0;) e.options.responsive[f].breakpoint === c[g].breakpoint && e.options.responsive.splice(f, 1), f--; e.options.responsive.push(c[g]) } else e.options[b] = c; d === !0 && (e.unload(), e.reinit()) }, b.prototype.setPosition = function () { var a = this; a.setDimensions(), a.setHeight(), a.options.fade === !1 ? a.setCSS(a.getLeft(a.currentSlide)) : a.setFade(), a.$slider.trigger("setPosition", [a]) }, b.prototype.setProps = function () { var a = this, b = document.body.style; a.positionProp = a.options.vertical === !0 ? "top" : "left", "top" === a.positionProp ? a.$slider.addClass("slick-vertical") : a.$slider.removeClass("slick-vertical"), (void 0 !== b.WebkitTransition || void 0 !== b.MozTransition || void 0 !== b.msTransition) && a.options.useCSS === !0 && (a.cssTransitions = !0), a.options.fade && ("number" == typeof a.options.zIndex ? a.options.zIndex < 3 && (a.options.zIndex = 3) : a.options.zIndex = a.defaults.zIndex), void 0 !== b.OTransform && (a.animType = "OTransform", a.transformType = "-o-transform", a.transitionType = "OTransition", void 0 === b.perspectiveProperty && void 0 === b.webkitPerspective && (a.animType = !1)), void 0 !== b.MozTransform && (a.animType = "MozTransform", a.transformType = "-moz-transform", a.transitionType = "MozTransition", void 0 === b.perspectiveProperty && void 0 === b.MozPerspective && (a.animType = !1)), void 0 !== b.webkitTransform && (a.animType = "webkitTransform", a.transformType = "-webkit-transform", a.transitionType = "webkitTransition", void 0 === b.perspectiveProperty && void 0 === b.webkitPerspective && (a.animType = !1)), void 0 !== b.msTransform && (a.animType = "msTransform", a.transformType = "-ms-transform", a.transitionType = "msTransition", void 0 === b.msTransform && (a.animType = !1)), void 0 !== b.transform && a.animType !== !1 && (a.animType = "transform", a.transformType = "transform", a.transitionType = "transition"), a.transformsEnabled = a.options.useTransform && null !== a.animType && a.animType !== !1 }, b.prototype.setSlideClasses = function (a) { var c, d, e, f, b = this; d = b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden", "true"), b.$slides.eq(a).addClass("slick-current"), b.options.centerMode === !0 ? (c = Math.floor(b.options.slidesToShow / 2), b.options.infinite === !0 && (a >= c && a <= b.slideCount - 1 - c ? b.$slides.slice(a - c, a + c + 1).addClass("slick-active").attr("aria-hidden", "false") : (e = b.options.slidesToShow + a, d.slice(e - c + 1, e + c + 2).addClass("slick-active").attr("aria-hidden", "false")), 0 === a ? d.eq(d.length - 1 - b.options.slidesToShow).addClass("slick-center") : a === b.slideCount - 1 && d.eq(b.options.slidesToShow).addClass("slick-center")), b.$slides.eq(a).addClass("slick-center")) : a >= 0 && a <= b.slideCount - b.options.slidesToShow ? b.$slides.slice(a, a + b.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false") : d.length <= b.options.slidesToShow ? d.addClass("slick-active").attr("aria-hidden", "false") : (f = b.slideCount % b.options.slidesToShow, e = b.options.infinite === !0 ? b.options.slidesToShow + a : a, b.options.slidesToShow == b.options.slidesToScroll && b.slideCount - a < b.options.slidesToShow ? d.slice(e - (b.options.slidesToShow - f), e + f).addClass("slick-active").attr("aria-hidden", "false") : d.slice(e, e + b.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false")), "ondemand" === b.options.lazyLoad && b.lazyLoad() }, b.prototype.setupInfinite = function () { var c, d, e, b = this; if (b.options.fade === !0 && (b.options.centerMode = !1), b.options.infinite === !0 && b.options.fade === !1 && (d = null, b.slideCount > b.options.slidesToShow)) { for (e = b.options.centerMode === !0 ? b.options.slidesToShow + 1 : b.options.slidesToShow, c = b.slideCount; c > b.slideCount - e; c -= 1) d = c - 1, a(b.$slides[d]).clone(!0).attr("id", "").attr("data-slick-index", d - b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned"); for (c = 0; e > c; c += 1) d = c, a(b.$slides[d]).clone(!0).attr("id", "").attr("data-slick-index", d + b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned"); b.$slideTrack.find(".slick-cloned").find("[id]").each(function () { a(this).attr("id", "") }) } }, b.prototype.setPaused = function (a) { var b = this; b.options.autoplay === !0 && b.options.pauseOnHover === !0 && (b.paused = a, a ? b.autoPlayClear() : b.autoPlay()) }, b.prototype.selectHandler = function (b) { var c = this, d = a(b.target).is(".slick-slide") ? a(b.target) : a(b.target).parents(".slick-slide"), e = parseInt(d.attr("data-slick-index")); return e || (e = 0), c.slideCount <= c.options.slidesToShow ? (c.setSlideClasses(e), void c.asNavFor(e)) : void c.slideHandler(e) }, b.prototype.slideHandler = function (a, b, c) {
		var d, e, f, g, h = null, i = this; return b = b || !1, i.animating === !0 && i.options.waitForAnimate === !0 || i.options.fade === !0 && i.currentSlide === a || i.slideCount <= i.options.slidesToShow ? void 0 : (b === !1 && i.asNavFor(a), d = a, h = i.getLeft(d), g = i.getLeft(i.currentSlide), i.currentLeft = null === i.swipeLeft ? g : i.swipeLeft, i.options.infinite === !1 && i.options.centerMode === !1 && (0 > a || a > i.getDotCount() * i.options.slidesToScroll) ? void (i.options.fade === !1 && (d = i.currentSlide, c !== !0 ? i.animateSlide(g, function () {
			i.postSlide(d);
		}) : i.postSlide(d))) : i.options.infinite === !1 && i.options.centerMode === !0 && (0 > a || a > i.slideCount - i.options.slidesToScroll) ? void (i.options.fade === !1 && (d = i.currentSlide, c !== !0 ? i.animateSlide(g, function () { i.postSlide(d) }) : i.postSlide(d))) : (i.options.autoplay === !0 && clearInterval(i.autoPlayTimer), e = 0 > d ? i.slideCount % i.options.slidesToScroll !== 0 ? i.slideCount - i.slideCount % i.options.slidesToScroll : i.slideCount + d : d >= i.slideCount ? i.slideCount % i.options.slidesToScroll !== 0 ? 0 : d - i.slideCount : d, i.animating = !0, i.$slider.trigger("beforeChange", [i, i.currentSlide, e]), f = i.currentSlide, i.currentSlide = e, i.setSlideClasses(i.currentSlide), i.updateDots(), i.updateArrows(), i.options.fade === !0 ? (c !== !0 ? (i.fadeSlideOut(f), i.fadeSlide(e, function () { i.postSlide(e) })) : i.postSlide(e), void i.animateHeight()) : void (c !== !0 ? i.animateSlide(h, function () { i.postSlide(e) }) : i.postSlide(e))))
	}, b.prototype.startLoad = function () { var a = this; a.options.arrows === !0 && a.slideCount > a.options.slidesToShow && (a.$prevArrow.hide(), a.$nextArrow.hide()), a.options.dots === !0 && a.slideCount > a.options.slidesToShow && a.$dots.hide(), a.$slider.addClass("slick-loading") }, b.prototype.swipeDirection = function () { var a, b, c, d, e = this; return a = e.touchObject.startX - e.touchObject.curX, b = e.touchObject.startY - e.touchObject.curY, c = Math.atan2(b, a), d = Math.round(180 * c / Math.PI), 0 > d && (d = 360 - Math.abs(d)), 45 >= d && d >= 0 ? e.options.rtl === !1 ? "left" : "right" : 360 >= d && d >= 315 ? e.options.rtl === !1 ? "left" : "right" : d >= 135 && 225 >= d ? e.options.rtl === !1 ? "right" : "left" : e.options.verticalSwiping === !0 ? d >= 35 && 135 >= d ? "left" : "right" : "vertical" }, b.prototype.swipeEnd = function (a) { var c, b = this; if (b.dragging = !1, b.shouldClick = b.touchObject.swipeLength > 10 ? !1 : !0, void 0 === b.touchObject.curX) return !1; if (b.touchObject.edgeHit === !0 && b.$slider.trigger("edge", [b, b.swipeDirection()]), b.touchObject.swipeLength >= b.touchObject.minSwipe) switch (b.swipeDirection()) { case "left": c = b.options.swipeToSlide ? b.checkNavigable(b.currentSlide + b.getSlideCount()) : b.currentSlide + b.getSlideCount(), b.slideHandler(c), b.currentDirection = 0, b.touchObject = {}, b.$slider.trigger("swipe", [b, "left"]); break; case "right": c = b.options.swipeToSlide ? b.checkNavigable(b.currentSlide - b.getSlideCount()) : b.currentSlide - b.getSlideCount(), b.slideHandler(c), b.currentDirection = 1, b.touchObject = {}, b.$slider.trigger("swipe", [b, "right"]) } else b.touchObject.startX !== b.touchObject.curX && (b.slideHandler(b.currentSlide), b.touchObject = {}) }, b.prototype.swipeHandler = function (a) { var b = this; if (!(b.options.swipe === !1 || "ontouchend" in document && b.options.swipe === !1 || b.options.draggable === !1 && -1 !== a.type.indexOf("mouse"))) switch (b.touchObject.fingerCount = a.originalEvent && void 0 !== a.originalEvent.touches ? a.originalEvent.touches.length : 1, b.touchObject.minSwipe = b.listWidth / b.options.touchThreshold, b.options.verticalSwiping === !0 && (b.touchObject.minSwipe = b.listHeight / b.options.touchThreshold), a.data.action) { case "start": b.swipeStart(a); break; case "move": b.swipeMove(a); break; case "end": b.swipeEnd(a) } }, b.prototype.swipeMove = function (a) { var d, e, f, g, h, b = this; return h = void 0 !== a.originalEvent ? a.originalEvent.touches : null, !b.dragging || h && 1 !== h.length ? !1 : (d = b.getLeft(b.currentSlide), b.touchObject.curX = void 0 !== h ? h[0].pageX : a.clientX, b.touchObject.curY = void 0 !== h ? h[0].pageY : a.clientY, b.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(b.touchObject.curX - b.touchObject.startX, 2))), b.options.verticalSwiping === !0 && (b.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(b.touchObject.curY - b.touchObject.startY, 2)))), e = b.swipeDirection(), "vertical" !== e ? (void 0 !== a.originalEvent && b.touchObject.swipeLength > 4 && a.preventDefault(), g = (b.options.rtl === !1 ? 1 : -1) * (b.touchObject.curX > b.touchObject.startX ? 1 : -1), b.options.verticalSwiping === !0 && (g = b.touchObject.curY > b.touchObject.startY ? 1 : -1), f = b.touchObject.swipeLength, b.touchObject.edgeHit = !1, b.options.infinite === !1 && (0 === b.currentSlide && "right" === e || b.currentSlide >= b.getDotCount() && "left" === e) && (f = b.touchObject.swipeLength * b.options.edgeFriction, b.touchObject.edgeHit = !0), b.options.vertical === !1 ? b.swipeLeft = d + f * g : b.swipeLeft = d + f * (b.$list.height() / b.listWidth) * g, b.options.verticalSwiping === !0 && (b.swipeLeft = d + f * g), b.options.fade === !0 || b.options.touchMove === !1 ? !1 : b.animating === !0 ? (b.swipeLeft = null, !1) : void b.setCSS(b.swipeLeft)) : void 0) }, b.prototype.swipeStart = function (a) { var c, b = this; return 1 !== b.touchObject.fingerCount || b.slideCount <= b.options.slidesToShow ? (b.touchObject = {}, !1) : (void 0 !== a.originalEvent && void 0 !== a.originalEvent.touches && (c = a.originalEvent.touches[0]), b.touchObject.startX = b.touchObject.curX = void 0 !== c ? c.pageX : a.clientX, b.touchObject.startY = b.touchObject.curY = void 0 !== c ? c.pageY : a.clientY, void (b.dragging = !0)) }, b.prototype.unfilterSlides = b.prototype.slickUnfilter = function () { var a = this; null !== a.$slidesCache && (a.unload(), a.$slideTrack.children(this.options.slide).detach(), a.$slidesCache.appendTo(a.$slideTrack), a.reinit()) }, b.prototype.unload = function () { var b = this; a(".slick-cloned", b.$slider).remove(), b.$dots && b.$dots.remove(), b.$prevArrow && b.htmlExpr.test(b.options.prevArrow) && b.$prevArrow.remove(), b.$nextArrow && b.htmlExpr.test(b.options.nextArrow) && b.$nextArrow.remove(), b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden", "true").css("width", "") }, b.prototype.unslick = function (a) { var b = this; b.$slider.trigger("unslick", [b, a]), b.destroy() }, b.prototype.updateArrows = function () { var b, a = this; b = Math.floor(a.options.slidesToShow / 2), a.options.arrows === !0 && a.slideCount > a.options.slidesToShow && !a.options.infinite && (a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"), a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false"), 0 === a.currentSlide ? (a.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true"), a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false")) : a.currentSlide >= a.slideCount - a.options.slidesToShow && a.options.centerMode === !1 ? (a.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"), a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false")) : a.currentSlide >= a.slideCount - 1 && a.options.centerMode === !0 && (a.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"), a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"))) }, b.prototype.updateDots = function () { var a = this; null !== a.$dots && (a.$dots.find("li").removeClass("slick-active").attr("aria-hidden", "true"), a.$dots.find("li").eq(Math.floor(a.currentSlide / a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden", "false")) }, b.prototype.visibility = function () { var a = this; document[a.hidden] ? (a.paused = !0, a.autoPlayClear()) : a.options.autoplay === !0 && (a.paused = !1, a.autoPlay()) }, b.prototype.initADA = function () { var b = this; b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({ "aria-hidden": "true", tabindex: "-1" }).find("a, input, button, select").attr({ tabindex: "-1" }), b.$slideTrack.attr("role", "listbox"), b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function (c) { a(this).attr({ role: "option", "aria-describedby": "slick-slide" + b.instanceUid + c }) }), null !== b.$dots && b.$dots.attr("role", "tablist").find("li").each(function (c) { a(this).attr({ role: "presentation", "aria-selected": "false", "aria-controls": "navigation" + b.instanceUid + c, id: "slick-slide" + b.instanceUid + c }) }).first().attr("aria-selected", "true").end().find("button").attr("role", "button").end().closest("div").attr("role", "toolbar"), b.activateADA() }, b.prototype.activateADA = function () { var a = this; a.$slideTrack.find(".slick-active").attr({ "aria-hidden": "false" }).find("a, input, button, select").attr({ tabindex: "0" }) }, b.prototype.focusHandler = function () { var b = this; b.$slider.on("focus.slick blur.slick", "*", function (c) { c.stopImmediatePropagation(); var d = a(this); setTimeout(function () { b.isPlay && (d.is(":focus") ? (b.autoPlayClear(), b.paused = !0) : (b.paused = !1, b.autoPlay())) }, 0) }) }, a.fn.slick = function () { var f, g, a = this, c = arguments[0], d = Array.prototype.slice.call(arguments, 1), e = a.length; for (f = 0; e > f; f++) if ("object" == typeof c || "undefined" == typeof c ? a[f].slick = new b(a[f], c) : g = a[f].slick[c].apply(a[f].slick, d), "undefined" != typeof g) return g; return a }
});;
!function (i) { i.fn.theiaStickySidebar = function (t) { function o(t, o) { var a = e(t, o); a || (console.log("TSS: Body width smaller than options.minWidth. Init is delayed."), i(document).scroll(function (t, o) { return function (a) { var n = e(t, o); n && i(this).unbind(a) } }(t, o)), i(window).resize(function (t, o) { return function (a) { var n = e(t, o); n && i(this).unbind(a) } }(t, o))) } function e(t, o) { return t.initialized === !0 || !(i("body").width() < t.minWidth) && (a(t, o), !0) } function a(t, o) { t.initialized = !0, i("head").append(i('<style>.theiaStickySidebar:after {content: ""; display: table; clear: both;}</style>')), o.each(function () { function o() { a.fixedScrollTop = 0, a.sidebar.css({ "min-height": "1px" }), a.stickySidebar.css({ position: "static", width: "", transform: "none" }) } function e(t) { var o = t.height(); return t.children().each(function () { o = Math.max(o, i(this).height()) }), o } var a = {}; if (a.sidebar = i(this), a.options = t || {}, a.container = i(a.options.containerSelector), 0 == a.container.length && (a.container = a.sidebar.parent()), a.sidebar.parents().css("-webkit-transform", "none"), a.sidebar.css({ position: "relative", overflow: "visible", "-webkit-box-sizing": "border-box", "-moz-box-sizing": "border-box", "box-sizing": "border-box" }), a.stickySidebar = a.sidebar.find(".theiaStickySidebar"), 0 == a.stickySidebar.length) { var r = /(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i; a.sidebar.find("script").filter(function (i, t) { return 0 === t.type.length || t.type.match(r) }).remove(), a.stickySidebar = i("<div>").addClass("theiaStickySidebar").append(a.sidebar.children()), a.sidebar.append(a.stickySidebar) } a.marginBottom = parseInt(a.sidebar.css("margin-bottom")), a.paddingTop = parseInt(a.sidebar.css("padding-top")), a.paddingBottom = parseInt(a.sidebar.css("padding-bottom")); var d = a.stickySidebar.offset().top, s = a.stickySidebar.outerHeight(); a.stickySidebar.css("padding-top", 1), a.stickySidebar.css("padding-bottom", 1), d -= a.stickySidebar.offset().top, s = a.stickySidebar.outerHeight() - s - d, 0 == d ? (a.stickySidebar.css("padding-top", 0), a.stickySidebarPaddingTop = 0) : a.stickySidebarPaddingTop = 1, 0 == s ? (a.stickySidebar.css("padding-bottom", 0), a.stickySidebarPaddingBottom = 0) : a.stickySidebarPaddingBottom = 1, a.previousScrollTop = null, a.fixedScrollTop = 0, o(), a.onScroll = function (a) { if (a.stickySidebar.is(":visible")) { if (i("body").width() < a.options.minWidth) return void o(); if (a.options.disableOnResponsiveLayouts) { var r = a.sidebar.outerWidth("none" == a.sidebar.css("float")); if (r + 50 > a.container.width()) return void o() } var d = i(document).scrollTop(), s = "static"; if (d >= a.sidebar.offset().top + (a.paddingTop - a.options.additionalMarginTop)) { var c, p = a.paddingTop + t.additionalMarginTop, b = a.paddingBottom + a.marginBottom + t.additionalMarginBottom, l = a.sidebar.offset().top, f = a.sidebar.offset().top + e(a.container), h = 0 + t.additionalMarginTop, g = a.stickySidebar.outerHeight() + p + b < i(window).height(); c = g ? h + a.stickySidebar.outerHeight() : i(window).height() - a.marginBottom - a.paddingBottom - t.additionalMarginBottom; var u = l - d + a.paddingTop, S = f - d - a.paddingBottom - a.marginBottom, y = a.stickySidebar.offset().top - d, m = a.previousScrollTop - d; "fixed" == a.stickySidebar.css("position") && "modern" == a.options.sidebarBehavior && (y += m), "stick-to-top" == a.options.sidebarBehavior && (y = t.additionalMarginTop), "stick-to-bottom" == a.options.sidebarBehavior && (y = c - a.stickySidebar.outerHeight()), y = m > 0 ? Math.min(y, h) : Math.max(y, c - a.stickySidebar.outerHeight()), y = Math.max(y, u), y = Math.min(y, S - a.stickySidebar.outerHeight()); var k = a.container.height() == a.stickySidebar.outerHeight(); s = (k || y != h) && (k || y != c - a.stickySidebar.outerHeight()) ? d + y - a.sidebar.offset().top - a.paddingTop <= t.additionalMarginTop ? "static" : "absolute" : "fixed" } if ("fixed" == s) { var v = i(document).scrollLeft(); a.stickySidebar.css({ position: "fixed", width: n(a.stickySidebar) + "px", transform: "translateY(" + y + "px)", left: a.sidebar.offset().left + parseInt(a.sidebar.css("padding-left")) - v + "px", top: "0px" }) } else if ("absolute" == s) { var x = {}; "absolute" != a.stickySidebar.css("position") && (x.position = "absolute", x.transform = "translateY(" + (d + y - a.sidebar.offset().top - a.stickySidebarPaddingTop - a.stickySidebarPaddingBottom) + "px)", x.top = "0px"), x.width = n(a.stickySidebar) + "px", x.left = "", a.stickySidebar.css(x) } else "static" == s && o(); "static" != s && 1 == a.options.updateSidebarHeight && a.sidebar.css({ "min-height": a.stickySidebar.outerHeight() + a.stickySidebar.offset().top - a.sidebar.offset().top + a.paddingBottom }), a.previousScrollTop = d } }, a.onScroll(a), i(document).scroll(function (i) { return function () { i.onScroll(i) } }(a)), i(window).resize(function (i) { return function () { i.stickySidebar.css({ position: "static" }), i.onScroll(i) } }(a)), "undefined" != typeof ResizeSensor && new ResizeSensor(a.stickySidebar[0], function (i) { return function () { i.onScroll(i) } }(a)) }) } function n(i) { var t; try { t = i[0].getBoundingClientRect().width } catch (i) { } return "undefined" == typeof t && (t = i.width()), t } var r = { containerSelector: "", additionalMarginTop: 0, additionalMarginBottom: 0, updateSidebarHeight: !0, minWidth: 0, disableOnResponsiveLayouts: !0, sidebarBehavior: "modern" }; t = i.extend(r, t), t.additionalMarginTop = parseInt(t.additionalMarginTop) || 0, t.additionalMarginBottom = parseInt(t.additionalMarginBottom) || 0, o(t, this) } }(jQuery);
//# sourceMappingURL=maps/theia-sticky-sidebar.min.js.map;
'use strict';

(function (angular) {
	// Create all modules and define dependencies to make sure they exist
	// and are loaded in the correct order to satisfy dependency injection
	// before all nested files are concatenated by Gulp

	// Config
	angular.module('ui.carousel.config', []).value('ui.carousel.config', {
		debug: true
	});

	// Modules
	angular.module('ui.carousel.providers', []);
	angular.module('ui.carousel.controllers', []);
	angular.module('ui.carousel.directives', []);
	angular.module('ui.carousel', ['ui.carousel.config', 'ui.carousel.directives', 'ui.carousel.controllers', 'ui.carousel.providers']);
})(angular);
'use strict';

/**
 * angular-ui-carousel
 * for example:
 * length = 8, show = 4, scroll = 3, current = 0
 *          ---------
 *          |       |
 *  |4|5|6|7|0|1|2|3|4|5|6|7|1|2|3|4
 *          |       |
 *          ---------
 * rectangle is visible for users
 */
angular.module('ui.carousel.controllers').controller('CarouselController', ['$scope', '$element', '$timeout', '$q', 'Carousel', function ($scope, $element, $timeout, $q, Carousel) {
	var _this = this;

	/**
	 * Initial carousel
	 *
	 * Mirgate to angularjs 1.6
	 * @see https://docs.angularjs.org/guide/migration#commit-bcd0d4
	 */
	this.$onInit = function () {
		_this.initOptions();
		_this.initRanges();
		_this.setProps();
		_this.setupInfinite();
	};

	/**
	 * Init option based on directive config
	 */
	this.initOptions = function () {
		_this.options = angular.extend({}, Carousel.getOptions());

		// TODO customize attribute from directive
		if (_this.initialSlide !== undefined) {
			_this.options.initialSlide = _this.initialSlide;
		}
		if (_this.fade !== undefined) {
			_this.options.fade = _this.fade;
		}
		if (_this.autoplay !== undefined) {
			_this.options.autoplay = _this.autoplay;
		}
		if (_this.autoplaySpeed !== undefined) {
			_this.options.autoplaySpeed = _this.autoplaySpeed;
		}
		if (_this.cssEase !== undefined) {
			_this.options.cssEase = _this.cssEase;
		}
		if (_this.speed !== undefined) {
			_this.options.speed = _this.speed;
		}
		if (_this.infinite !== undefined) {
			_this.options.infinite = _this.infinite;
		}
		if (_this.arrows !== undefined) {
			_this.options.arrows = _this.arrows;
		}
		if (_this.dots !== undefined) {
			_this.options.dots = _this.dots;
		}

		// TODO write more options for fade mode
		// In fade mode we have to setting slides-to-show and slides-to-scroll
		// to 1 slide
		if (_this.options.fade) {
			_this.options.slidesToShow = 1;
			_this.options.slidesToScroll = 1;
		} else {
			if (_this.show) {
				_this.options.slidesToShow = _this.show;
			}
			if (_this.scroll) {
				_this.options.slidesToScroll = _this.scroll;
			}
		}
	};

	/**
	 * init variables, slides, ..
	 */
	this.initRanges = function () {
		if (!_this.slides) {
			_this.slides = [];
		}

		_this.isCarouselReady = false;
		_this.isTrackMoving = false;
		_this.track = $element.find('.track');
		_this.width = 1; // Fake width
		_this.currentSlide = _this.options.initialSlide;
		_this.trackStyle = {};
		_this.slideStyle = {};

		_this.isVisibleDots = false;
		_this.isVisiblePrev = false;
		_this.isVisibleNext = false;

		_this.isClickablePrev = false;
		_this.isClickableNext = false;

		_this.animType = null;
		_this.transformType = null;
		_this.transitionType = null;

		_this.slidesInTrack = angular.copy(_this.slides);
	};

	/**
	 * Init UI and carousel track
	 */
	this.initUI = function () {
		$timeout(function () {
			_this.width = $element[0].clientWidth;
			_this.updateItemStyle();
			_this.initTrack();
		});
	};

	/**
	 * update common style for each carousel item
	 */
	this.updateItemStyle = function () {
		_this.itemWidth = _this.width / _this.options.slidesToShow;
		_this.slideStyle = {
			'width': _this.itemWidth + 'px'
		};
	};

	/**
	 * init carousel track
	 * also make Carousel is Ready
	 */
	this.initTrack = function () {
		var itemWidth = _this.width / _this.options.slidesToShow;
		var trackWidth = itemWidth * _this.slidesInTrack.length;

		_this.trackStyle.width = trackWidth + 'px';

		_this.slideHandler(_this.currentSlide).finally(function () {
			_this.isCarouselReady = true;

			if (!_this.options.fade) {
				_this.refreshTrackStyle();
			}

			// onInit callback
			if (_this.onInit) {
				_this.onInit();
			}
		}).catch(function () {
			// Catch err
		});
	};

	/**
	 * @see https://github.com/kenwheeler/slick/blob/master/slick/slick.js#L680
	 *
	 * Sync slide to place it should be
	 * for example:
	 * - 9 total, 3 show, 3 scroll, current 1
	 *   => next index = 3 (previous index counted = 0)
	 *
	 * and scroll to next page:
	 * - 6 total, 1 show, 1 scroll, current 0 => next index = 1
	 * - 9 total, 3 show, 3 scroll, current 1 => next index = 3
	 * - 9 total, 3 show, 3 scroll, current 3 => next index = 6
	 * - 9 total, 3 show, 3 scroll, current 8 => next index = 3
	 * - 8 total, 4 show, 3 scroll, current 1 => next index = 4
	 */
	this.next = function () {
		if (!_this.isClickableNext) {
			return false;
		}

		var indexOffset = _this.getIndexOffset();
		var slideOffset = indexOffset === 0 ? _this.options.slidesToScroll : indexOffset;

		_this.slideHandler(_this.currentSlide + slideOffset).catch(function () {
			// Catch err
		});
	};

	/**
	 * move to previous slide
	 * same calculate with next
	 * @see next function
	 */
	this.prev = function () {
		if (!_this.isClickablePrev) {
			return false;
		}

		var indexOffset = _this.getIndexOffset();
		var slideOffset = indexOffset === 0 ? _this.options.slidesToScroll : _this.options.slidesToShow - indexOffset;

		_this.slideHandler(_this.currentSlide - slideOffset).catch(function () {
			// Catch err
		});
	};

	/**
	 * Get index offset
	 */
	this.getIndexOffset = function () {
		var scrollOffset = _this.slides.length % _this.options.slidesToScroll !== 0;
		var indexOffset = scrollOffset ? 0 : (_this.slides.length - _this.currentSlide) % _this.options.slidesToScroll;

		return indexOffset;
	};

	/**
	 * move to page
	 * @params int page
	 * Page counter from 0 (start = 0)
	 */
	this.movePage = function (page) {
		var target = _this.options.slidesToScroll * page;
		_this.slideHandler(target).catch(function () {
			// Catch err
		});
	};

	/**
	 * hanlder carousel
	 * @description move carousel to correct page
	 *
	 * @params int index
	 */
	this.slideHandler = function (index) {
		// TODO prevent when slides not exists
		if (!_this.slides) {
			return $q.reject('Carousel not fully setup');
		}

		// TODO Prevent when track is moving
		if (_this.isTrackMoving) {
			return $q.reject('Track is moving');
		}

		var len = _this.slides.length;
		var show = _this.options.slidesToShow;

		if (len <= show) {
			return $q.reject('Length of slides smaller than slides to show');
		}

		// We need target to destination
		// and a anim slide to translate track
		//
		// anim = animSlide (which we use to move)
		// target = targetSlide
		var anim = index;
		var target = null;

		if (anim < 0) {
			if (len % _this.options.slidesToScroll !== 0) {
				target = len - len % _this.options.slidesToScroll;
			} else {
				target = len + anim;
			}
		} else if (anim >= len) {
			if (len % _this.options.slidesToScroll !== 0) {
				target = 0;
			} else {
				target = anim - len;
			}
		} else {
			target = anim;
		}

		if (_this.onBeforeChange) {
			_this.onBeforeChange(_this.currentSlide, target);
		}

		// Fade handler
		if (_this.options.fade) {
			_this.currentSlide = target;

			// XXX
			// afterChange method
			// fire after faded
			// Should be revised
			$timeout(function () {
				if (_this.onAfterChange) {
					_this.onAfterChange(_this.currentSlide);
				}
			}, _this.options.speed);
			return $q.resolve('Handler fade');
		}

		// No-fade handler
		var left = -1 * target * _this.itemWidth;
		if (_this.options.infinite) {
			left = -1 * (anim + show) * _this.itemWidth;
		}

		_this.isTrackMoving = true;
		return _this.moveTrack(left).then(function () {
			_this.isTrackMoving = false;
			_this.currentSlide = target;
			_this.autoplayTrack();

			if (target !== anim) {
				_this.correctTrack();
			}

			if (!_this.options.infinite) {
				if (_this.currentSlide === 0) {
					_this.isClickablePrev = false;
				} else if (_this.currentSlide === _this.slidesInTrack.length - 1) {
					_this.isClickableNext = false;
				} else {
					_this.isClickablePrev = true;
					_this.isClickableNext = true;
				}
			}

			// XXX
			// afterChange method
			// fire after 200ms wakeup and correct track
			// Should be revised
			$timeout(function () {
				if (_this.onAfterChange) {
					_this.onAfterChange(_this.currentSlide);
				}
			}, 200);
		});
	};

	/**
	 * moveTrack
	 * move track to left position using css3 translate
	 * for example left: -1000px
	 */
	this.moveTrack = function (left) {
		var deferred = $q.defer();
		if (_this.options.vertical === false) {
			_this.trackStyle[_this.animType] = 'translate3d(' + left + 'px, 0px, 0px)';
		} else {
			_this.trackStyle[_this.animType] = 'translate3d(0px, ' + left + 'px, 0px)';
		}

		$timeout(function () {
			deferred.resolve('Track moved');
		}, _this.options.speed);

		return deferred.promise;
	};

	/**
	 * correctTrack
	 * @description correct track after move to animSlide we have to move track
	 * to exactly its position
	 */
	this.correctTrack = function () {
		if (_this.options.infinite) {
			(function () {
				var left = -1 * (_this.currentSlide + _this.options.slidesToShow) * _this.itemWidth;

				// Move without anim
				_this.trackStyle[_this.transitionType] = _this.transformType + ' ' + 0 + 'ms ' + _this.options.cssEase;

				_this.isTrackMoving = true;
				$timeout(function () {
					_this.trackStyle[_this.animType] = 'translate3d(' + left + 'px, 0, 0px)';

					// Revert animation
					$timeout(function () {
						_this.refreshTrackStyle();
						_this.isTrackMoving = false;
					}, 200);
				});
			})();
		}
	};

	/**
	 * Refresh track style
	 */
	this.refreshTrackStyle = function () {
		_this.trackStyle[_this.transitionType] = _this.transformType + ' ' + _this.options.speed + 'ms ' + _this.options.cssEase;
	};

	/**
	 * autoplay track
	 * @description autoplay = true
	 */
	this.autoplayTrack = function () {
		if (_this.options.autoplay) {
			if (_this.timeout) {
				$timeout.cancel(_this.timeout);
			}

			_this.timeout = $timeout(function () {
				_this.next();

				$timeout.cancel(_this.timeout);
				_this.timeout = null;
			}, _this.options.autoplaySpeed);
		}
	};

	this.getSlideStyle = function (index) {
		var style = _this.slideStyle;
		if (_this.options.fade) {
			var left = -1 * index * _this.itemWidth;
			var uniqueStyle = {
				position: 'relative',
				top: '0px',
				left: left + 'px',
				'z-index': index === _this.currentSlide ? 10 : 9,
				opacity: index === _this.currentSlide ? 1 : 0
			};

			if (index >= _this.currentSlide - 1 && index <= _this.currentSlide + 1) {
				uniqueStyle.transition = 'opacity 250ms linear';
			}

			style = angular.extend(style, uniqueStyle);
		}

		return style;
	};

	/**
	 * setupInfinite
	 * To make carouse infinite we need close number of slidesToShow elements to
	 * previous elements and to after elements
	 *
	 * length = 8, show = 4, scroll = 3, current = 0
	 *          ---------
	 *          |       |
	 *  |4|5|6|7|0|1|2|3|4|5|6|7|1|2|3|4
	 *          |       |
	 *          ---------
	 */
	this.setupInfinite = function () {
		// Clone
		var len = _this.slides.length;
		var show = _this.options.slidesToShow;

		if (_this.options.infinite && _this.options.fade === false) {
			if (len > show) {
				var number = show;
				for (var i = 0; i < number; i++) {
					_this.slidesInTrack.push(angular.copy(_this.slides[i]));
				}
				for (var _i = len - 1; _i >= len - show; _i--) {
					_this.slidesInTrack.unshift(angular.copy(_this.slides[_i]));
				}
			}
		}
	};

	/**
	 * get number of dosts
	 *
	 * @return Array
	 */
	this.getDots = function () {
		if (!_this.slides) {
			return [];
		}

		var dots = Math.ceil(_this.slides.length / _this.options.slidesToScroll);

		var res = [];
		for (var i = 0; i < dots; i++) {
			res.push(i);
		}
		return res;
	};

	/**
	 * set carousel property
	 *
	 * - animType
	 * - transformType
	 * - transitionType
	 */
	this.setProps = function () {
		var bodyStyle = document.body.style;

		/* eslint-disable */
		if (bodyStyle.OTransform !== undefined) {
			_this.animType = 'OTransform';
			_this.transformType = '-o-transform';
			_this.transitionType = 'OTransition';
		}
		if (bodyStyle.MozTransform !== undefined) {
			_this.animType = 'MozTransform';
			_this.transformType = '-moz-transform';
			_this.transitionType = 'MozTransition';
		}
		if (bodyStyle.webkitTransform !== undefined) {
			_this.animType = 'webkitTransform';
			_this.transformType = '-webkit-transform';
			_this.transitionType = 'webkitTransition';
		}
		if (bodyStyle.msTransform !== undefined) {
			_this.animType = 'msTransform';
			_this.transformType = '-ms-transform';
			_this.transitionType = 'msTransition';
		}
		if (bodyStyle.transform !== undefined && _this.animType !== false) {
			_this.animType = 'transform';
			_this.transformType = 'transform';
			_this.transitionType = 'transition';
		}
		/* eslint-enable */

		_this.transformsEnabled = true;
	};

	this.refreshCarousel = function () {
		if (_this.slides && _this.slides.length && _this.slides.length > _this.options.slidesToShow) {
			_this.isVisibleDots = true;
			_this.isVisiblePrev = true;
			_this.isVisibleNext = true;
			_this.isClickablePrev = true;
			_this.isClickableNext = true;
		}

		// Re-init UI
		_this.initUI();
	};

	/**
	 * refresh model
	 */
	$scope.$watch('ctrl.slides', function () {
		_this.refreshCarousel();
	});

	// Prior to v1.5, we need to call `$onInit()` manually.
	// (Bindings will always be pre-assigned in these versions.)
	if (angular.version.major === 1 && angular.version.minor < 5) {
		this.$onInit();
	}
}]);
'use strict';

angular.module('ui.carousel.directives').directive('uiCarousel', ['$compile', '$templateCache', '$sce', function ($compile, $templateCache, $sce) {

	return {
		restrict: 'AE',
		scope: true,
		bindToController: {
			name: '=?',
			slides: '=',
			show: '=?slidesToShow',
			scroll: '=?slidesToScroll',
			classes: '@',
			fade: '=?',
			onChange: '=?',
			disableArrow: '=?',
			autoplay: '=?',
			autoplaySpeed: '=?',
			cssEase: '=?',
			speed: '=?',
			infinite: '=?',
			arrows: '=?',
			dots: '=?',
			initialSlide: '=?',

			// Method
			onBeforeChange: '&',
			onAfterChange: '&',
			onInit: '&'
		},
		compile: function compile(el) {
			var template = angular.element($templateCache.get('ui-carousel/carousel.template.html'));

			// dynamic injections to override the inner layers' components
			var injectComponentMap = {
				'carousel-item': '.carousel-item',
				'carousel-prev': '.carousel-prev',
				'carousel-next': '.carousel-next'
			};

			var templateInstance = template.clone();
			angular.forEach(injectComponentMap, function (innerSelector, outerSelector) {
				var outerElement = el[0].querySelector(outerSelector);
				if (outerElement) {
					angular.element(templateInstance[0].querySelector(innerSelector)).html(outerElement.innerHTML);
				}
			});

			return function ($scope, el) {
				// Compile
				var compiledElement = $compile(templateInstance)($scope);
				el.addClass('ui-carousel').html('').append(compiledElement);
			};
		},


		controller: 'CarouselController',
		controllerAs: 'ctrl'
	};
}]);
'use strict';

angular.module('ui.carousel.providers').provider('Carousel', function () {
	var _this = this;

	this.options = {
		// Init like Slick carousel
		// XXX Should be revised
		arrows: true,
		autoplay: false,
		autoplaySpeed: 3000,
		cssEase: 'ease',
		dots: false,

		easing: 'linear',
		fade: false,
		infinite: true,
		initialSlide: 0,

		slidesToShow: 1,
		slidesToScroll: 1,
		speed: 500,

		// Not available right now
		draggable: true,

		lazyLoad: 'ondemand',

		swipe: true,
		swipeToSlide: false,
		touchMove: true,

		vertical: false,
		verticalSwiping: false
	};
	this.$get = [function () {
		return {
			setOptions: function setOptions(options) {
				_this.options = angular.extend(_this.options, options);
			},
			getOptions: function getOptions() {
				return _this.options;
			}
		};
	}];
});
'use strict';

(function (module) {
	try {
		module = angular.module('ui.carousel');
	} catch (e) {
		module = angular.module('ui.carousel', []);
	}
	module.run(['$templateCache', function ($templateCache) {
		$templateCache.put('ui-carousel/carousel.template.html', '<div class="carousel-wrapper" ng-show="ctrl.isCarouselReady"><div class="track-wrapper"><div class="track" ng-style="ctrl.trackStyle"><div class="slide" ng-repeat="item in ctrl.slidesInTrack track by $index" ng-style="ctrl.getSlideStyle($index)"><div class="carousel-item"></div></div></div></div><div class="carousel-prev" ng-if="!ctrl.disableArrow" ng-show="ctrl.isVisiblePrev &amp;&amp; ctrl.options.arrows" ng-class="{\'carousel-disable\': !ctrl.isClickablePrev}" ng-click="ctrl.prev()"><button class="carousel-btn"><i class="ui-icon-prev"></i></button></div><div class="carousel-next" ng-if="!ctrl.disableArrow" ng-show="ctrl.isVisibleNext &amp;&amp; ctrl.options.arrows" ng-class="{\'carousel-disable\': !ctrl.isClickableNext}" ng-click="ctrl.next()"><button class="carousel-btn"><i class="ui-icon-next"></i></button></div><ul class="carousel-dots" ng-show="ctrl.isVisibleDots &amp;&amp; ctrl.options.dots"><li ng-repeat="dot in ctrl.getDots()" ng-class="{ \'carousel-active\': dot == ctrl.currentSlide/ctrl.options.slidesToScroll }" ng-click="ctrl.movePage(dot)"><button>{{ dot }}</button></li></ul></div>');
	}]);
})();;
/*!
angular-xeditable - 0.1.8
Edit-in-place for angular.js
Build date: 2014-01-10 
*/
angular.module("xeditable",[]).value("editableOptions",{theme:"default",buttons:"right",blurElem:"cancel",blurForm:"ignore",activate:"focus"}),angular.module("xeditable").directive("editableBsdate",["editableDirectiveFactory",function(a){return a({directiveName:"editableBsdate",inputTpl:'<input type="text">'})}]),angular.module("xeditable").directive("editableBstime",["editableDirectiveFactory",function(a){return a({directiveName:"editableBstime",inputTpl:"<timepicker></timepicker>",render:function(){this.parent.render.call(this);var a=angular.element('<div class="well well-small" style="display:inline-block;"></div>');a.attr("ng-model",this.inputEl.attr("ng-model")),this.inputEl.removeAttr("ng-model"),this.attrs.eNgChange&&(a.attr("ng-change",this.inputEl.attr("ng-change")),this.inputEl.removeAttr("ng-change")),this.inputEl.wrap(a)}})}]),angular.module("xeditable").directive("editableCheckbox",["editableDirectiveFactory",function(a){return a({directiveName:"editableCheckbox",inputTpl:'<input type="checkbox">',render:function(){this.parent.render.call(this),this.attrs.eTitle&&(this.inputEl.wrap("<label></label>"),this.inputEl.after(angular.element("<span></span>").text(this.attrs.eTitle)))},autosubmit:function(){var a=this;a.inputEl.bind("change",function(){setTimeout(function(){a.scope.$apply(function(){a.scope.$form.$submit()})},500)})}})}]),angular.module("xeditable").directive("editableChecklist",["editableDirectiveFactory","editableNgOptionsParser",function(a,b){return a({directiveName:"editableChecklist",inputTpl:"<span></span>",useCopy:!0,render:function(){this.parent.render.call(this);var a=b(this.attrs.eNgOptions),c='<label ng-repeat="'+a.ngRepeat+'">'+'<input type="checkbox" checklist-model="$parent.$data" checklist-value="'+a.locals.valueFn+'">'+'<span ng-bind="'+a.locals.displayFn+'"></span></label>';this.inputEl.removeAttr("ng-model"),this.inputEl.removeAttr("ng-options"),this.inputEl.html(c)}})}]),function(){var a="text|email|tel|number|url|search|color|date|datetime|time|month|week".split("|");angular.forEach(a,function(a){var b="editable"+a.charAt(0).toUpperCase()+a.slice(1);angular.module("xeditable").directive(b,["editableDirectiveFactory",function(c){return c({directiveName:b,inputTpl:'<input type="'+a+'">'})}])}),angular.module("xeditable").directive("editableRange",["editableDirectiveFactory",function(a){return a({directiveName:"editableRange",inputTpl:'<input type="range" id="range" name="range">',render:function(){this.parent.render.call(this),this.inputEl.after("<output>{{$data}}</output>")}})}])}(),angular.module("xeditable").directive("editableRadiolist",["editableDirectiveFactory","editableNgOptionsParser",function(a,b){return a({directiveName:"editableRadiolist",inputTpl:"<span></span>",render:function(){this.parent.render.call(this);var a=b(this.attrs.eNgOptions),c='<label ng-repeat="'+a.ngRepeat+'">'+'<input type="radio" ng-model="$parent.$data" value="{{'+a.locals.valueFn+'}}">'+'<span ng-bind="'+a.locals.displayFn+'"></span></label>';this.inputEl.removeAttr("ng-model"),this.inputEl.removeAttr("ng-options"),this.inputEl.html(c)},autosubmit:function(){var a=this;a.inputEl.bind("change",function(){setTimeout(function(){a.scope.$apply(function(){a.scope.$form.$submit()})},500)})}})}]),angular.module("xeditable").directive("editableSelect",["editableDirectiveFactory",function(a){return a({directiveName:"editableSelect",inputTpl:"<select></select>",autosubmit:function(){var a=this;a.inputEl.bind("change",function(){a.scope.$apply(function(){a.scope.$form.$submit()})})}})}]),angular.module("xeditable").directive("editableTextarea",["editableDirectiveFactory",function(a){return a({directiveName:"editableTextarea",inputTpl:"<textarea></textarea>",addListeners:function(){var a=this;a.parent.addListeners.call(a),a.single&&"no"!==a.buttons&&a.autosubmit()},autosubmit:function(){var a=this;a.inputEl.bind("keydown",function(b){(b.ctrlKey||b.metaKey)&&13===b.keyCode&&a.scope.$apply(function(){a.scope.$form.$submit()})})}})}]),angular.module("xeditable").factory("editableController",["$q","editableUtils",function(a,b){function c(a,c,d,e,f,g,h,i,j){var k,l,m=this;m.scope=a,m.elem=d,m.attrs=c,m.inputEl=null,m.editorEl=null,m.single=!0,m.error="",m.theme=f[g.theme]||f["default"],m.parent={},m.inputTpl="",m.directiveName="",m.useCopy=!1,m.single=null,m.buttons="right",m.init=function(b){if(m.single=b,m.name=c.eName||c[m.directiveName],!c[m.directiveName])throw"You should provide value for `"+m.directiveName+"` in editable element!";k=e(c[m.directiveName]),m.buttons=m.single?m.attrs.buttons||g.buttons:"no",c.eName&&m.scope.$watch("$data",function(a){m.scope.$form.$data[c.eName]=a}),c.onshow&&(m.onshow=function(){return m.catchError(e(c.onshow)(a))}),c.onhide&&(m.onhide=function(){return e(c.onhide)(a)}),c.oncancel&&(m.oncancel=function(){return e(c.oncancel)(a)}),c.onbeforesave&&(m.onbeforesave=function(){return m.catchError(e(c.onbeforesave)(a))}),c.onaftersave&&(m.onaftersave=function(){return m.catchError(e(c.onaftersave)(a))}),a.$parent.$watch(c[m.directiveName],function(){m.handleEmpty()})},m.render=function(){var a=m.theme;m.inputEl=angular.element(m.inputTpl),m.controlsEl=angular.element(a.controlsTpl),m.controlsEl.append(m.inputEl),"no"!==m.buttons&&(m.buttonsEl=angular.element(a.buttonsTpl),m.submitEl=angular.element(a.submitTpl),m.cancelEl=angular.element(a.cancelTpl),m.buttonsEl.append(m.submitEl).append(m.cancelEl),m.controlsEl.append(m.buttonsEl),m.inputEl.addClass("editable-has-buttons")),m.errorEl=angular.element(a.errorTpl),m.controlsEl.append(m.errorEl),m.editorEl=angular.element(m.single?a.formTpl:a.noformTpl),m.editorEl.append(m.controlsEl);for(var d in c.$attr)if(!(d.length<=1)){var e=!1,f=d.substring(1,2);if("e"===d.substring(0,1)&&f===f.toUpperCase()&&(e=d.substring(1),"Form"!==e&&"NgSubmit"!==e)){e=e.substring(0,1).toLowerCase()+b.camelToDash(e.substring(1));var h=""===c[d]?e:c[d];m.inputEl.attr(e,h)}}m.inputEl.addClass("editable-input"),m.inputEl.attr("ng-model","$data"),m.editorEl.addClass(b.camelToDash(m.directiveName)),m.single&&(m.editorEl.attr("editable-form","$form"),m.editorEl.attr("blur",m.attrs.blur||("no"===m.buttons?"cancel":g.blurElem))),angular.isFunction(a.postrender)&&a.postrender.call(m)},m.setLocalValue=function(){m.scope.$data=m.useCopy?angular.copy(k(a.$parent)):k(a.$parent)},m.show=function(){return m.setLocalValue(),m.render(),d.after(m.editorEl),i(m.editorEl)(a),m.addListeners(),d.addClass("editable-hide"),m.onshow()},m.hide=function(){return m.editorEl.remove(),d.removeClass("editable-hide"),m.onhide()},m.cancel=function(){m.oncancel()},m.addListeners=function(){m.inputEl.bind("keyup",function(a){if(m.single)switch(a.keyCode){case 27:m.scope.$apply(function(){m.scope.$form.$cancel()})}}),m.single&&"no"===m.buttons&&m.autosubmit(),m.editorEl.bind("click",function(a){1===a.which&&m.scope.$form.$visible&&(m.scope.$form._clicked=!0)})},m.setWaiting=function(a){a?(l=!m.inputEl.attr("disabled")&&!m.inputEl.attr("ng-disabled")&&!m.inputEl.attr("ng-enabled"),l&&(m.inputEl.attr("disabled","disabled"),m.buttonsEl&&m.buttonsEl.find("button").attr("disabled","disabled"))):l&&(m.inputEl.removeAttr("disabled"),m.buttonsEl&&m.buttonsEl.find("button").removeAttr("disabled"))},m.activate=function(){setTimeout(function(){var a=m.inputEl[0];"focus"===g.activate&&a.focus&&a.focus(),"select"===g.activate&&a.select&&a.select()},0)},m.setError=function(b){angular.isObject(b)||(a.$error=b,m.error=b)},m.catchError=function(a,b){return angular.isObject(a)&&b!==!0?j.when(a).then(angular.bind(this,function(a){this.catchError(a,!0)}),angular.bind(this,function(a){this.catchError(a,!0)})):b&&angular.isObject(a)&&a.status&&200!==a.status&&a.data&&angular.isString(a.data)?(this.setError(a.data),a=a.data):angular.isString(a)&&this.setError(a),a},m.save=function(){k.assign(a.$parent,angular.copy(m.scope.$data))},m.handleEmpty=function(){var b=k(a.$parent),c=null===b||void 0===b||""===b||angular.isArray(b)&&0===b.length;d.toggleClass("editable-empty",c)},m.autosubmit=angular.noop,m.onshow=angular.noop,m.onhide=angular.noop,m.oncancel=angular.noop,m.onbeforesave=angular.noop,m.onaftersave=angular.noop}return c.$inject=["$scope","$attrs","$element","$parse","editableThemes","editableOptions","$rootScope","$compile","$q"],c}]),angular.module("xeditable").factory("editableDirectiveFactory",["$parse","$compile","editableThemes","$rootScope","$document","editableController","editableFormController",function(a,b,c,d,e,f,g){return function(b){return{restrict:"A",scope:!0,require:[b.directiveName,"?^form"],controller:f,link:function(c,f,h,i){var j,k=i[0],l=!1;if(i[1])j=i[1],l=!0;else if(h.eForm){var m=a(h.eForm)(c);if(m)j=m,l=!0;else for(var n=0;n<e[0].forms.length;n++)if(e[0].forms[n].name===h.eForm){j=null,l=!0;break}}if(angular.forEach(b,function(a,b){void 0!==k[b]&&(k.parent[b]=k[b])}),angular.extend(k,b),k.init(!l),c.$editable=k,f.addClass("editable"),l)if(j){if(c.$form=j,!c.$form.$addEditable)throw"Form with editable elements should have `editable-form` attribute.";c.$form.$addEditable(k)}else d.$$editableBuffer=d.$$editableBuffer||{},d.$$editableBuffer[h.eForm]=d.$$editableBuffer[h.eForm]||[],d.$$editableBuffer[h.eForm].push(k),c.$form=null;else c.$form=g(),c.$form.$addEditable(k),h.eForm&&(c.$parent[h.eForm]=c.$form),h.eForm||(f.addClass("editable-click"),f.bind("click",function(a){a.preventDefault(),a.editable=k,c.$apply(function(){c.$form.$show()})}))}}}}]),angular.module("xeditable").factory("editableFormController",["$parse","$document","$rootScope","editablePromiseCollection","editableUtils",function(a,b,c,d,e){var f=[];b.bind("click",function(a){if(1===a.which){for(var b=[],d=[],e=0;e<f.length;e++)f[e]._clicked?f[e]._clicked=!1:f[e].$waiting||("cancel"===f[e]._blur&&b.push(f[e]),"submit"===f[e]._blur&&d.push(f[e]));(b.length||d.length)&&c.$apply(function(){angular.forEach(b,function(a){a.$cancel()}),angular.forEach(d,function(a){a.$submit()})})}});var g={$addEditable:function(a){this.$editables.push(a),a.elem.bind("$destroy",angular.bind(this,this.$removeEditable,a)),a.scope.$form||(a.scope.$form=this),this.$visible&&a.catchError(a.show())},$removeEditable:function(a){for(var b=0;b<this.$editables.length;b++)if(this.$editables[b]===a)return this.$editables.splice(b,1),void 0},$show:function(){if(!this.$visible){this.$visible=!0;var a=d();a.when(this.$onshow()),this.$setError(null,""),angular.forEach(this.$editables,function(b){a.when(b.show())}),a.then({onWait:angular.bind(this,this.$setWaiting),onTrue:angular.bind(this,this.$activate),onFalse:angular.bind(this,this.$activate),onString:angular.bind(this,this.$activate)}),setTimeout(angular.bind(this,function(){this._clicked=!1,-1===e.indexOf(f,this)&&f.push(this)}),0)}},$activate:function(a){var b;if(this.$editables.length){if(angular.isString(a))for(b=0;b<this.$editables.length;b++)if(this.$editables[b].name===a)return this.$editables[b].activate(),void 0;for(b=0;b<this.$editables.length;b++)if(this.$editables[b].error)return this.$editables[b].activate(),void 0;this.$editables[0].activate()}},$hide:function(){this.$visible&&(this.$visible=!1,this.$onhide(),angular.forEach(this.$editables,function(a){a.hide()}),e.arrayRemove(f,this))},$cancel:function(){this.$visible&&(this.$oncancel(),angular.forEach(this.$editables,function(a){a.cancel()}),this.$hide())},$setWaiting:function(a){this.$waiting=!!a,angular.forEach(this.$editables,function(b){b.setWaiting(!!a)})},$setError:function(a,b){angular.forEach(this.$editables,function(c){a&&c.name!==a||c.setError(b)})},$submit:function(){function a(a){var b=d();b.when(this.$onbeforesave()),b.then({onWait:angular.bind(this,this.$setWaiting),onTrue:a?angular.bind(this,this.$save):angular.bind(this,this.$hide),onFalse:angular.bind(this,this.$hide),onString:angular.bind(this,this.$activate)})}if(!this.$waiting){this.$setError(null,"");var b=d();angular.forEach(this.$editables,function(a){b.when(a.onbeforesave())}),b.then({onWait:angular.bind(this,this.$setWaiting),onTrue:angular.bind(this,a,!0),onFalse:angular.bind(this,a,!1),onString:angular.bind(this,this.$activate)})}},$save:function(){angular.forEach(this.$editables,function(a){a.save()});var a=d();a.when(this.$onaftersave()),angular.forEach(this.$editables,function(b){a.when(b.onaftersave())}),a.then({onWait:angular.bind(this,this.$setWaiting),onTrue:angular.bind(this,this.$hide),onFalse:angular.bind(this,this.$hide),onString:angular.bind(this,this.$activate)})},$onshow:angular.noop,$oncancel:angular.noop,$onhide:angular.noop,$onbeforesave:angular.noop,$onaftersave:angular.noop};return function(){return angular.extend({$editables:[],$visible:!1,$waiting:!1,$data:{},_clicked:!1,_blur:null},g)}}]),angular.module("xeditable").directive("editableForm",["$rootScope","$parse","editableFormController","editableOptions",function(a,b,c,d){return{restrict:"A",require:["form"],compile:function(){return{pre:function(b,d,e,f){var g,h=f[0];e.editableForm?b[e.editableForm]&&b[e.editableForm].$show?(g=b[e.editableForm],angular.extend(h,g)):(g=c(),b[e.editableForm]=g,angular.extend(g,h)):(g=c(),angular.extend(h,g));var i=a.$$editableBuffer,j=h.$name;j&&i&&i[j]&&(angular.forEach(i[j],function(a){g.$addEditable(a)}),delete i[j])},post:function(a,c,e,f){var g;g=e.editableForm&&a[e.editableForm]&&a[e.editableForm].$show?a[e.editableForm]:f[0],e.onshow&&(g.$onshow=angular.bind(g,b(e.onshow),a)),e.onhide&&(g.$onhide=angular.bind(g,b(e.onhide),a)),e.oncancel&&(g.$oncancel=angular.bind(g,b(e.oncancel),a)),e.shown&&b(e.shown)(a)&&g.$show(),g._blur=e.blur||d.blurForm,e.ngSubmit||e.submit||(e.onbeforesave&&(g.$onbeforesave=function(){return b(e.onbeforesave)(a,{$data:g.$data})}),e.onaftersave&&(g.$onaftersave=function(){return b(e.onaftersave)(a,{$data:g.$data})}),c.bind("submit",function(b){b.preventDefault(),a.$apply(function(){g.$submit()})})),c.bind("click",function(a){1===a.which&&g.$visible&&(g._clicked=!0)})}}}}}]),angular.module("xeditable").factory("editablePromiseCollection",["$q",function(a){function b(){return{promises:[],hasFalse:!1,hasString:!1,when:function(b,c){if(b===!1)this.hasFalse=!0;else if(!c&&angular.isObject(b))this.promises.push(a.when(b));else{if(!angular.isString(b))return;this.hasString=!0}},then:function(b){function c(){h.hasString||h.hasFalse?!h.hasString&&h.hasFalse?e():f():d()}b=b||{};var d=b.onTrue||angular.noop,e=b.onFalse||angular.noop,f=b.onString||angular.noop,g=b.onWait||angular.noop,h=this;this.promises.length?(g(!0),a.all(this.promises).then(function(a){g(!1),angular.forEach(a,function(a){h.when(a,!0)}),c()},function(){g(!1),f()})):c()}}}return b}]),angular.module("xeditable").factory("editableUtils",[function(){return{indexOf:function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;c<a.length;c++)if(b===a[c])return c;return-1},arrayRemove:function(a,b){var c=this.indexOf(a,b);return c>=0&&a.splice(c,1),b},camelToDash:function(a){var b=/[A-Z]/g;return a.replace(b,function(a,b){return(b?"-":"")+a.toLowerCase()})},dashToCamel:function(a){var b=/([\:\-\_]+(.))/g,c=/^moz([A-Z])/;return a.replace(b,function(a,b,c,d){return d?c.toUpperCase():c}).replace(c,"Moz$1")}}}]),angular.module("xeditable").factory("editableNgOptionsParser",[function(){function a(a){var c;if(!(c=a.match(b)))throw"ng-options parse error";var d,e=c[2]||c[1],f=c[4]||c[6],g=c[5],h=(c[3]||"",c[2]?c[1]:f),i=c[7],j=c[8],k=j?c[8]:null;return void 0===g?(d=f+" in "+i,void 0!==j&&(d+=" track by "+k)):d="("+g+", "+f+") in "+i,{ngRepeat:d,locals:{valueName:f,keyName:g,valueFn:h,displayFn:e}}}var b=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/;return a}]),angular.module("xeditable").factory("editableThemes",function(){var a={"default":{formTpl:'<form class="editable-wrap"></form>',noformTpl:'<span class="editable-wrap"></span>',controlsTpl:'<span class="editable-controls"></span>',inputTpl:"",errorTpl:'<div class="editable-error" ng-show="$error" ng-bind="$error"></div>',buttonsTpl:'<span class="editable-buttons"></span>',submitTpl:'<button type="submit">save</button>',cancelTpl:'<button type="button" ng-click="$form.$cancel()">cancel</button>'},bs2:{formTpl:'<form class="form-inline editable-wrap" role="form"></form>',noformTpl:'<span class="editable-wrap"></span>',controlsTpl:'<div class="editable-controls controls control-group" ng-class="{\'error\': $error}"></div>',inputTpl:"",errorTpl:'<div class="editable-error help-block" ng-show="$error" ng-bind="$error"></div>',buttonsTpl:'<span class="editable-buttons"></span>',submitTpl:'<button type="submit" class="btn btn-primary"><span class="icon-ok icon-white"></span></button>',cancelTpl:'<button type="button" class="btn" ng-click="$form.$cancel()"><span class="icon-remove"></span></button>'},bs3:{formTpl:'<form class="form-inline editable-wrap" role="form"></form>',noformTpl:'<span class="editable-wrap"></span>',controlsTpl:'<div class="editable-controls form-group" ng-class="{\'has-error\': $error}"></div>',inputTpl:"",errorTpl:'<div class="editable-error help-block" ng-show="$error" ng-bind="$error"></div>',buttonsTpl:'<span class="editable-buttons"></span>',submitTpl:'<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>',cancelTpl:'<button type="button" class="btn btn-default" ng-click="$form.$cancel()"><span class="glyphicon glyphicon-remove"></span></button>',buttonsClass:"",inputClass:"",postrender:function(){switch(this.directiveName){case"editableText":case"editableSelect":case"editableTextarea":case"editableEmail":case"editableTel":case"editableNumber":case"editableUrl":case"editableSearch":case"editableDate":case"editableDatetime":case"editableTime":case"editableMonth":case"editableWeek":if(this.inputEl.addClass("form-control"),this.theme.inputClass){if(this.inputEl.attr("multiple")&&("input-sm"===this.theme.inputClass||"input-lg"===this.theme.inputClass))break;this.inputEl.addClass(this.theme.inputClass)}}this.buttonsEl&&this.theme.buttonsClass&&this.buttonsEl.find("button").addClass(this.theme.buttonsClass)}}};return a});;
