function At(n,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}
/*!
 * Splide.js
 * Version  : 3.6.12
 * License  : MIT
 * Copyright: 2022 Naotoshi Fujita
 */
var n,t;n=this,t=function(){"use strict";var m="splide",a="data-"+m,n={CREATED:1,MOUNTED:2,IDLE:3,MOVING:4,DESTROYED:5},R=10;function _(n){n.length=0}function I(n){return!u(n)&&"object"==typeof n}function r(n){return Array.isArray(n)}function D(n){return"string"==typeof n}function O(n){return void 0===n}function u(n){return null===n}function y(n){return n instanceof HTMLElement}function w(n){return r(n)?n:[n]}function b(n,t){w(n).forEach(t)}function x(n,t){return-1<n.indexOf(t)}function k(n,t){return n.push.apply(n,w(t)),n}var o=Array.prototype;function s(n,t,i){return o.slice.call(n,t,i)}function E(t,n,i){t&&b(n,function(n){n&&t.classList[i?"add":"remove"](n)})}function A(n,t){E(n,D(t)?t.split(" "):t,!0)}function L(n,t){b(t,n.appendChild.bind(n))}function S(n,i){b(n,function(n){var t=i.parentNode;t&&t.insertBefore(n,i)})}function W(n,t){return y(n)&&(n.msMatchesSelector||n.matches).call(n,t)}function z(n,t){return n?s(n.children).filter(function(n){return W(n,t)}):[]}function P(n,t){return t?z(n,t)[0]:n.firstElementChild}function e(n,t,i){if(n)for(var r=Object.keys(n),r=i?r.reverse():r,u=0;u<r.length;u++){var o=r[u];if("__proto__"!==o&&!1===t(n[o],o))break}return n}function M(r){return s(arguments,1).forEach(function(i){e(i,function(n,t){r[t]=i[t]})}),r}function l(i,n){return e(n,function(n,t){r(n)?i[t]=n.slice():I(n)?i[t]=l(I(i[t])?i[t]:{},n):i[t]=n}),i}function T(t,n){t&&b(n,function(n){t.removeAttribute(n)})}function j(i,n,t){I(n)?e(n,function(n,t){j(i,t,n)}):u(t)?T(i,n):i.setAttribute(n,String(t))}function F(n,t,i){n=document.createElement(n);return t&&(D(t)?A:j)(n,t),i&&L(i,n),n}function C(n,t,i){if(O(i))return getComputedStyle(n)[t];u(i)||(n=n.style)[t]!==(i=""+i)&&(n[t]=i)}function N(n,t){C(n,"display",t)}function X(n,t){return n.getAttribute(t)}function B(n,t){return n&&n.classList.contains(t)}function G(n){return n.getBoundingClientRect()}function H(n){b(n,function(n){n&&n.parentNode&&n.parentNode.removeChild(n)})}function Y(n){return P((new DOMParser).parseFromString(n,"text/html").body)}function U(n,t){n.preventDefault(),t&&(n.stopPropagation(),n.stopImmediatePropagation())}function q(n,t){return n&&n.querySelector(t)}function J(n,t){return s(n.querySelectorAll(t))}function K(n,t){E(n,t,!1)}function V(n){return D(n)?n:n?n+"px":""}function Q(n,t){if(void 0===t&&(t=""),!n)throw new Error("["+m+"] "+t)}function g(n){setTimeout(n)}function Z(){}function v(n){return requestAnimationFrame(n)}var $=Math.min,nn=Math.max,tn=Math.floor,rn=Math.ceil,un=Math.abs;function on(n,t,i,r){var u=$(t,i),i=nn(t,i);return r?u<n&&n<i:u<=n&&n<=i}function en(n,t,i){var r=$(t,i),i=nn(t,i);return $(nn(r,n),i)}function cn(n){return(0<n)-(n<0)}function fn(t,n){return b(n,function(n){t=t.replace("%s",""+n)}),t}function an(n){return n<10?"0"+n:""+n}var sn={};function c(){var o={};function r(n,r){t(n,function(n,t){var i=o[n];o[n]=i&&i.filter(function(n){return n.n?n.n!==r:r||n.t!==t})})}function t(n,t){w(n).join(" ").split(" ").forEach(function(n){n=n.split(".");t(n[0],n[1])})}return{on:function(n,i,r,u){void 0===u&&(u=R),t(n,function(n,t){o[n]=o[n]||[],k(o[n],{i:n,r:i,t:t,u:u,n:r}).sort(function(n,t){return n.u-t.u})})},off:r,offBy:function(i){e(o,function(n,t){r(t,i)})},emit:function(n){var t=arguments;(o[n]||[]).forEach(function(n){n.r.apply(n,s(t,1))})},destroy:function(){o={}}}}var ln="mounted",dn="move",vn="moved",hn="shifted",pn="click",gn="active",mn="inactive",yn="visible",wn="hidden",_n="slide:keydown",bn="refresh",xn="updated",kn="resize",An="resized",Ln="repositioned",En="scrolled",f="destroy",Sn="navigation:mounted",zn="lazyload:loaded";function Pn(n){var r=n.event,u={},o=[];function t(n,t,r){e(n,t,function(t,i){o=o.filter(function(n){return!!(n[0]!==t||n[1]!==i||r&&n[2]!==r)||(t.removeEventListener(i,n[2],n[3]),!1)})})}function e(n,t,i){b(n,function(n){n&&t.split(" ").forEach(i.bind(null,n))})}function i(){o=o.filter(function(n){return t(n[0],n[1])}),r.offBy(u)}return r.on(f,i,u),{on:function(n,t,i){r.on(n,t,u,i)},off:function(n){r.off(n,u)},emit:r.emit,bind:function(n,t,i,r){e(n,t,function(n,t){o.push([n,t,i,r]),n.addEventListener(t,i,r)})},unbind:t,destroy:i}}function Rn(t,i,r,u){var o,n,e=Date.now,c=0,f=!0,a=0;function s(){if(!f){var n=e()-o;if(t<=n?(c=1,o=e()):c=n/t,r&&r(c),1===c&&(i(),u&&++a>=u))return l();v(s)}}function l(){f=!0}function d(){cancelAnimationFrame(n),f=!(n=c=0)}return{start:function(n){n||d(),o=e()-(n?c*t:0),f=!1,v(s)},rewind:function(){o=e(),c=0,r&&r(c)},pause:l,cancel:d,set:function(n){t=n},isPaused:function(){return f}}}function d(n){var t=n;return{set:function(n){t=n},is:function(n){return x(w(n),t)}}}function Dn(i,r){var u;return function(){var n=arguments,t=this;u||(u=Rn(r||0,function(){i.apply(t,n),u=null},null,1)).start()}}var h={marginRight:["marginBottom","marginLeft"],autoWidth:["autoHeight"],fixedWidth:["fixedHeight"],paddingLeft:["paddingTop","paddingRight"],paddingRight:["paddingBottom","paddingLeft"],width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:["ArrowUp","ArrowRight"],ArrowRight:["ArrowDown","ArrowLeft"]};var On=m,Mn=m+"__slider",Tn=m+"__track",jn=m+"__list",Fn=m+"__slide",In=Fn+"--clone",Wn=Fn+"__container",Cn=m+"__arrows",t=m+"__arrow",Nn=t+"--prev",Xn=t+"--next",i=m+"__pagination",Bn=m+"__progress",Gn=Bn+"__bar",Hn=m+"__autoplay",Yn=m+"__play",Un=m+"__pause",qn="is-active",Jn="is-prev",Kn="is-next",Vn="is-visible",Qn="is-loading",Zn=[qn,Vn,Jn,Kn,Qn];var $n="role",nt="aria-controls",tt="aria-current",it="aria-label",rt="aria-hidden",ut="tabindex",p="aria-orientation",ot=[$n,nt,tt,it,rt,p,ut,"disabled"],et="slide",ct="loop",ft="fade";function at(u,i,r,o){var t,n=Pn(u),e=n.on,c=n.emit,f=n.bind,a=n.destroy,s=u.Components,l=u.root,d=u.options,v=d.isNavigation,h=d.updateOnMove,p=s.Direction.resolve,g=X(o,"style"),m=-1<r,y=P(o,"."+Wn),w=d.focusableNodes&&J(o,d.focusableNodes);function _(){var n=m?r:i,t=fn(d.i18n.slideX,n+1),n=u.splides.map(function(n){return n.splide.root.id}).join(" ");j(o,it,t),j(o,nt,n),j(o,$n,"menuitem"),k(A())}function b(){t||x()}function x(){var n;t||(n=u.index,k(A()),function(n){var t=!n&&(!A()||m);j(o,rt,t||null),j(o,ut,!t&&d.slideFocus?0:null),w&&w.forEach(function(n){j(n,ut,t?-1:null)});n!==B(o,Vn)&&(E(o,Vn,n),c(n?yn:wn,L))}(function(){if(u.is(ft))return A();var n=G(s.Elements.track),t=G(o),i=p("left"),r=p("right");return tn(n[i])<=rn(t[i])&&tn(t[r])<=rn(n[r])}()),E(o,Jn,i===n-1),E(o,Kn,i===n+1))}function k(n){n!==B(o,qn)&&(E(o,qn,n),v&&j(o,tt,n||null),c(n?gn:mn,L))}function A(){var n=u.index;return n===i||d.cloneStatus&&n===r}var L={index:i,slideIndex:r,slide:o,container:y,isClone:m,mount:function(){m||(o.id=l.id+"-slide"+an(i+1)),f(o,"click keydown",function(n){c("click"===n.type?pn:_n,L,n)}),e([bn,Ln,hn,vn,En],x),e(Sn,_),h&&e(dn,b)},destroy:function(){t=!0,a(),K(o,Zn),T(o,ot),j(o,"style",g)},update:x,style:function(n,t,i){C(i&&y||o,n,t)},isWithin:function(n,t){return n=un(n-i),(n=!m&&(d.rewind||u.is(ct))?$(n,u.length-n):n)<=t}};return L}var st=a+"-interval";var lt={passive:!1,capture:!0},dt="touchmove mousemove",vt="touchend touchcancel mouseup";var ht=["Left","Right","Up","Down"],pt="keydown";var gt=a+"-lazy",mt=gt+"-srcset",yt="["+gt+"], ["+mt+"]";var wt=[" ","Enter","Spacebar"];var _t=Object.freeze({__proto__:null,Options:function(t,n,r){var u,o,i,e=Dn(f);function c(n){n&&removeEventListener("resize",e)}function f(){var n=(n=function(n){return n[1].matches},s(o).filter(n)[0]||[]);n[0]!==i&&function(n){n=r.breakpoints[n]||u;n.destroy?(t.options=u,t.destroy("completely"===n.destroy)):(t.state.is(5)&&(c(!0),t.mount()),t.options=n)}(i=n[0])}return{setup:function(){try{l(r,JSON.parse(X(t.root,a)))}catch(n){Q(!1,n.message)}u=l({},r);var i,n=r.breakpoints;n&&(i="min"===r.mediaQuery,o=Object.keys(n).sort(function(n,t){return i?+t-+n:+n-+t}).map(function(n){return[n,matchMedia("("+(i?"min":"max")+"-width:"+n+"px)")]}),f())},mount:function(){o&&addEventListener("resize",e)},destroy:c}},Direction:function(n,t,r){return{resolve:function(n,t){var i=r.direction;return h[n]["rtl"!==i||t?"ttb"===i?0:-1:1]||n},orient:function(n){return n*("rtl"===r.direction?1:-1)}}},Elements:function(n,t,i){var r,u,o,e,c=Pn(n).on,f=n.root,a={},s=[];function l(){var n;!function(){u=P(f,"."+Mn),o=q(f,"."+Tn),e=P(o,"."+jn),Q(o&&e,"A track/list element is missing."),k(s,z(e,"."+Fn+":not(."+In+")"));var n=p("."+Hn),t=p("."+Cn);M(a,{root:f,slider:u,track:o,list:e,slides:s,arrows:t,autoplay:n,prev:q(t,"."+Nn),next:q(t,"."+Xn),bar:q(p("."+Bn),"."+Gn),play:q(n,"."+Yn),pause:q(n,"."+Un)})}(),n=f.id||function(n){return""+n+an(sn[n]=(sn[n]||0)+1)}(m),f.id=n,o.id=o.id||n+"-track",e.id=e.id||n+"-list",A(f,r=g())}function d(){[f,o,e].forEach(function(n){T(n,"style")}),_(s),K(f,r)}function v(){d(),l()}function h(){K(f,r),A(f,r=g())}function p(n){return P(f,n)||P(u,n)}function g(){return[On+"--"+i.type,On+"--"+i.direction,i.drag&&On+"--draggable",i.isNavigation&&On+"--nav",qn]}return M(a,{setup:l,mount:function(){c(bn,v,R-2),c(xn,h)},destroy:d})},Slides:function(r,u,o){var n=Pn(r),t=n.on,e=n.emit,c=n.bind,f=(n=u.Elements).slides,a=n.list,s=[];function i(){f.forEach(function(n,t){v(n,t,-1)})}function l(){p(function(n){n.destroy()}),_(s)}function d(){l(),i()}function v(n,t,i){n=at(r,t,i,n);n.mount(),s.push(n)}function h(n){return n?g(function(n){return!n.isClone}):s}function p(n,t){h(t).forEach(n)}function g(t){return s.filter("function"==typeof t?t:function(n){return D(t)?W(n.slide,t):x(w(t),n.index)})}return{mount:function(){i(),t(bn,d),t([ln,bn],function(){s.sort(function(n,t){return n.index-t.index})})},destroy:l,update:function(){p(function(n){n.update()})},register:v,get:h,getIn:function(n){var t=u.Controller,i=t.toIndex(n),r=t.hasFocus()?1:o.perPage;return g(function(n){return on(n.index,i,i+r-1)})},getAt:function(n){return g(n)[0]},add:function(n,u){b(n,function(n){var t,i,r;y(n=D(n)?Y(n):n)&&((t=f[u])?S(n,t):L(a,n),A(n,o.classes.slide),n=n,i=e.bind(null,kn),n=J(n,"img"),(r=n.length)?n.forEach(function(n){c(n,"load error",function(){--r||i()})}):i())}),e(bn)},remove:function(n){H(g(n).map(function(n){return n.slide})),e(bn)},forEach:p,filter:g,style:function(t,i,r){p(function(n){n.style(t,i,r)})},getLength:function(n){return(n?f:s).length},isEnough:function(){return s.length>o.perPage}}},Layout:function(n,t,i){var r,u,o=Pn(n),e=o.on,c=o.bind,f=o.emit,a=t.Slides,s=t.Direction.resolve,l=(t=t.Elements).root,d=t.track,v=t.list,h=a.getAt;function p(){u=null,r="ttb"===i.direction,C(l,"maxWidth",V(i.width)),C(d,s("paddingLeft"),m(!1)),C(d,s("paddingRight"),m(!0)),g()}function g(){var n=G(l);u&&u.width===n.width&&u.height===n.height||(C(d,"height",function(){var n="";r&&(Q(n=y(),"height or heightRatio is missing."),n="calc("+n+" - "+m(!1)+" - "+m(!0)+")");return n}()),a.style(s("marginRight"),V(i.gap)),a.style("width",(i.autoWidth?"":V(i.fixedWidth)||(r?"":w()))||null),a.style("height",V(i.fixedHeight)||(r?i.autoHeight?"":w():y())||null,!0),u=n,f(An))}function m(n){var t=i.padding,n=s(n?"right":"left");return t&&V(t[n]||(I(t)?0:t))||"0px"}function y(){return V(i.height||G(v).width*i.heightRatio)}function w(){var n=V(i.gap);return"calc((100%"+(n&&" + "+n)+")/"+(i.perPage||1)+(n&&" - "+n)+")"}function _(n,t){var i=h(n);if(i){n=G(i.slide)[s("right")],i=G(v)[s("left")];return un(n-i)+(t?0:b())}return 0}function b(){var n=h(0);return n&&parseFloat(C(n.slide,s("marginRight")))||0}return{mount:function(){p(),c(window,"resize load",Dn(f.bind(this,kn))),e([xn,bn],p),e(kn,g)},listSize:function(){return G(v)[s("width")]},slideSize:function(n,t){return(n=h(n||0))?G(n.slide)[s("width")]+(t?0:b()):0},sliderSize:function(){return _(n.length-1,!0)-_(-1,!0)},totalSize:_,getPadding:function(n){return parseFloat(C(d,s("padding"+(n?"Right":"Left"))))||0}}},Clones:function(c,n,f){var t,i=Pn(c),r=i.on,u=i.emit,a=n.Elements,s=n.Slides,o=n.Direction.resolve,l=[];function e(){(t=p())&&(function(u){var o=s.get().slice(),e=o.length;if(e){for(;o.length<u;)k(o,o);k(o.slice(-u),o.slice(0,u)).forEach(function(n,t){var i=t<u,r=function(n,t){n=n.cloneNode(!0);return A(n,f.classes.clone),n.id=c.root.id+"-clone"+an(t+1),n}(n.slide,t);i?S(r,o[0].slide):L(a.list,r),k(l,r),s.register(r,t-u+(i?0:e),n.index)})}}(t),u(kn))}function d(){H(l),_(l)}function v(){d(),e()}function h(){t<p()&&u(bn)}function p(){var n,t,i=f.clones;return c.is(ct)?i||(n=a.list,D(t=f[o("fixedWidth")])&&(t=G(n=F("div",{style:"width: "+t+"; position: absolute;"},n)).width,H(n)),i=((t=t)&&rn(G(a.track)[o("width")]/t)||f[o("autoWidth")]&&c.length||f.perPage)*(f.drag?(f.flickMaxPages||1)+1:2)):i=0,i}return{mount:function(){e(),r(bn,v),r([xn,kn],h)},destroy:d}},Move:function(e,c,f){var a,n=Pn(e),t=n.on,s=n.emit,r=(n=c.Layout).slideSize,i=n.getPadding,u=n.totalSize,o=n.listSize,l=n.sliderSize,d=(n=c.Direction).resolve,v=n.orient,h=(n=c.Elements).list,p=n.track;function g(){k()||(c.Scroll.cancel(),m(e.index),s(Ln))}function m(n){y(_(n,!0))}function y(n,t){e.is(ft)||(t=t?n:function(n){{var t,i;e.is(ct)&&(i=v(n-b()),t=A(!1,n)&&i<0,i=A(!0,n)&&0<i,(t||i)&&(n=w(n,i)))}return n}(n),h.style.transform="translate"+d("X")+"("+t+"px)",n!==t&&s(hn))}function w(n,t){var i=n-x(t),r=l();return n-=v(r*(rn(un(i)/r)||1))*(t?1:-1)}function _(n,t){var i=v(u(n-1)-(i=n,"center"===(n=f.focus)?(o()-r(i,!0))/2:+n*r(i)||0));return t?function(n){f.trimSpace&&e.is(et)&&(n=en(n,0,v(l()-o())));return n}(i):i}function b(){var n=d("left");return G(h)[n]-G(p)[n]+v(i(!1))}function x(n){return _(n?c.Controller.getEnd():0,!!f.trimSpace)}function k(){return e.state.is(4)&&f.waitForTransition}function A(n,t){t=O(t)?b():t;var i=!0!==n&&v(t)<v(x(!1)),t=!1!==n&&v(t)>v(x(!0));return i||t}return{mount:function(){a=c.Transition,t([ln,An,xn,bn],g)},destroy:function(){T(h,"style")},move:function(n,t,i,r){var u,o;k()||(u=e.state.set,o=b(),n!==t&&(a.cancel(),y(w(o,t<n),!0)),u(4),s(dn,t,i,n),a.start(t,function(){u(3),s(vn,t,i,n),"move"===f.trimSpace&&n!==i&&o===b()?c.Controller.go(i<n?">":"<",!1,r):r&&r()}))},jump:m,translate:y,shift:w,cancel:function(){y(b()),a.cancel()},toIndex:function(n){for(var t=c.Slides.get(),i=0,r=1/0,u=0;u<t.length;u++){var o=t[u].index,e=un(_(o,!0)-n);if(!(e<=r))break;r=e,i=o}return i},toPosition:_,getPosition:b,getLimit:x,isBusy:k,exceededLimit:A}},Controller:function(n,e,u){var o,c,f,t=Pn(n).on,a=e.Move,s=a.getPosition,l=a.getLimit,i=e.Slides,d=i.isEnough,r=i.getLength,v=n.is(ct),h=n.is(et),p=u.start||0,g=p;function m(){o=r(!0),c=u.perMove,f=u.perPage,p=en(p,0,o-1)}function y(n,t,i,r,u){var o=t?n:S(n);e.Scroll.scroll(t||i?a.toPosition(o,!0):n,r,function(){z(a.toIndex(a.getPosition())),u&&u()})}function w(n){return b(!1,n)}function _(n){return b(!0,n)}function b(n,t){var i,r,u=c||(P()?1:f),o=x(p+u*(n?-1:1),p);return-1!==o||!h||(i=s(),r=l(!n),u=1,un(i-r)<u)?t?o:A(o):n?0:k()}function x(n,t,i){var r;return d()?(r=k(),n<0||r<n?n=on(0,n,t,!0)||on(r,t,n,!0)?L(E(n)):v?c||P()?n:n<0?-(o%f||f):o:u.rewind?n<0?r:0:-1:i||n===t||(n=c?n:L(E(t)+(n<t?-1:1)))):n=-1,n}function k(){var n=o-f;return(P()||v&&c)&&(n=o-1),nn(n,0)}function A(n){return v?d()?n%o+(n<0?o:0):-1:n}function L(n){return en(P()?n:f*n,0,k())}function E(n){return P()||(n=on(n,o-f,o-1)?o-1:n,n=tn(n/f)),n}function S(n){n=a.toIndex(n);return h?en(n,0,k()):n}function z(n){n!==p&&(g=p,p=n)}function P(){return!O(u.focus)||u.isNavigation}return{mount:function(){m(),t([xn,bn],m,R-1)},go:function(n,t,i){var r=function(n){var t=p;{var i,r;D(n)?(r=n.match(/([+\-<>])(\d+)?/)||[],i=r[1],r=r[2],"+"===i||"-"===i?t=x(p+ +(""+i+(+r||1)),p,!0):">"===i?t=r?L(+r):w(!0):"<"===i&&(t=_(!0))):t=v?n:en(n,0,k())}return t}(n);u.useScroll?y(r,!0,!0,u.speed,i):-1<(n=A(r))&&!a.isBusy()&&(t||n!==p)&&(z(n),a.move(r,n,g,i))},scroll:y,getNext:w,getPrev:_,getAdjacent:b,getEnd:k,setIndex:z,getIndex:function(n){return n?g:p},toIndex:L,toPage:E,toDest:S,hasFocus:P}},Arrows:function(u,n,i){var r,t=Pn(u),o=t.on,e=t.bind,c=t.emit,f=i.classes,a=i.i18n,s=n.Elements,l=n.Controller,d=s.arrows,v=s.prev,h=s.next,p={};function g(){var n,t;i.arrows&&(v&&h||(d=F("div",f.arrows),v=m(!0),h=m(!1),r=!0,L(d,[v,h]),S(d,P("slider"===i.arrows&&s.slider||u.root)))),v&&h&&(p.prev?N(d,!1===i.arrows?"none":""):(n=s.track.id,j(v,nt,n),j(h,nt,n),p.prev=v,p.next=h,t=l.go,o([ln,vn,xn,bn,En],y),e(h,"click",function(){t(">",!0)}),e(v,"click",function(){t("<",!0)}),c("arrows:mounted",v,h)))}function m(n){return Y('<button class="'+f.arrow+" "+(n?f.prev:f.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40"><path d="'+(i.arrowPath||"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z")+'" />')}function y(){var n=u.index,t=l.getPrev(),i=l.getNext(),r=-1<t&&n<t?a.last:a.prev,n=-1<i&&i<n?a.first:a.next;v.disabled=t<0,h.disabled=i<0,j(v,it,r),j(h,it,n),c("arrows:updated",v,h,t,i)}return{arrows:p,mount:function(){g(),o(xn,g)},destroy:function(){r?H(d):(T(v,ot),T(h,ot))}}},Autoplay:function(t,i,r){var u,o,e,n=Pn(t),c=n.on,f=n.bind,a=n.emit,s=Rn(r.interval,t.go.bind(t,">"),function(n){var t=d.bar;t&&C(t,"width",100*n+"%"),a("autoplay:playing",n)}),l=s.isPaused,d=i.Elements;function v(n){var t=n?"pause":"play",i=d[t];i&&(j(i,nt,d.track.id),j(i,it,r.i18n[t]),f(i,"click",n?p:h))}function h(){l()&&i.Slides.isEnough()&&(s.start(!r.resetProgress),o=u=e=!1,a("autoplay:play"))}function p(n){void 0===n&&(n=!0),l()||(s.pause(),a("autoplay:pause")),e=n}function g(){e||(u||o?p(!1):h())}function m(){var n=i.Slides.getAt(t.index);s.set(n&&+X(n.slide,st)||r.interval)}return{mount:function(){var n=r.autoplay;n&&(v(!0),v(!1),function(){var n=d.root;r.pauseOnHover&&f(n,"mouseenter mouseleave",function(n){u="mouseenter"===n.type,g()});r.pauseOnFocus&&f(n,"focusin focusout",function(n){o="focusin"===n.type,g()});c([dn,"scroll",bn],s.rewind),c(dn,m)}(),"pause"!==n&&h())},destroy:s.cancel,play:h,pause:p,isPaused:l}},Cover:function(n,t,i){var r=Pn(n).on;function u(i){t.Slides.forEach(function(n){var t=P(n.container||n.slide,"img");t&&t.src&&o(i,t,n)})}function o(n,t,i){i.style("background",n?'center/cover no-repeat url("'+t.src+'")':"",!0),N(t,n?"none":"")}return{mount:function(){i.cover&&(r(zn,function(n,t){o(!0,n,t)}),r([ln,xn,bn],u.bind(null,!0)))},destroy:function(){u(!1)}}},Scroll:function(c,n,f){var a,s,t=Pn(c),i=t.on,l=t.emit,d=n.Move,v=d.getPosition,h=d.getLimit,p=d.exceededLimit;function g(r,n,t,u){var i,o=v(),e=1;n=n||(i=un(r-o),nn(i/1.5,800)),s=t,y(),a=Rn(n,m,function(n){var t=v(),i=(o+(r-o)*(i=n,(n=f.easingFunc)?n(i):1-Math.pow(1-i,4))-v())*e;d.translate(t+i),c.is(et)&&!u&&p()&&(e*=.6,un(i)<10&&(i=p(!1),g(h(!i),600,null,!0)))},1),l("scroll"),a.start()}function m(){var n=v(),t=d.toIndex(n);on(t,0,c.length-1)||d.translate(d.shift(n,0<t),!0),s&&s(),l(En)}function y(){a&&a.cancel()}function r(){a&&!a.isPaused()&&(y(),m())}return{mount:function(){i(dn,y),i([xn,bn],r)},destroy:y,scroll:g,cancel:r}},Drag:function(u,o,e){var c,f,a,s,l,d,v,r,h,n=Pn(u),t=n.on,p=n.emit,g=n.bind,m=n.unbind,y=o.Move,w=o.Scroll,_=o.Controller,b=o.Elements.track,i=(n=o.Direction).resolve,x=n.orient,k=y.getPosition,A=y.exceededLimit,L=!1;function E(){var n=e.drag;F(!n),l="free"===n}function S(n){var t,i;r||(i=e.noDrag,t=j(n),i=!i||!W(n.target,i),v=!1,!i||!t&&n.button||(y.isBusy()?U(n,!0):(h=t?b:window,s=a=null,g(h,dt,z,lt),g(h,vt,P,lt),y.cancel(),w.cancel(),R(n))))}function z(n){var t,i,r;s||p("drag"),(s=n).cancelable&&(t=M(n)-M(f),d?(y.translate(c+t/(L&&u.is(et)?5:1)),i=200<T(n)-T(f),r=L!==(L=A()),(i||r)&&R(n),p("dragging"),v=!0,U(n)):(r=I(r=e.dragMinThreshold)?r:{mouse:0,touch:+r||10},d=un(t)>(j(n)?r.touch:r.mouse),O()&&U(n)))}function P(n){m(h,dt,z),m(h,vt,P);var t,i,r=u.index;s?((d||n.cancelable&&O())&&(t=function(n){if(u.is(ct)||!L){var t=f===s&&a||f,i=M(s)-M(t),t=T(n)-T(t),n=T(n)-T(s)<200;if(t&&n)return i/t}return 0}(n),i=t,i=k()+cn(i)*$(un(i)*(e.flickPower||600),l?1/0:o.Layout.listSize()*(e.flickMaxPages||1)),l?_.scroll(i):u.is(ft)?_.go(r+x(cn(t))):_.go(_.toDest(i),!0),U(n)),p("dragged")):l||k()===y.toPosition(r)||_.go(r,!0),d=!1}function R(n){a=f,f=n,c=k()}function D(n){!r&&v&&U(n,!0)}function O(){var n=un(M(s)-M(f));return un(M(s,!0)-M(f,!0))<n}function M(n,t){return(j(n)?n.touches[0]:n)["page"+i(t?"Y":"X")]}function T(n){return n.timeStamp}function j(n){return"undefined"!=typeof TouchEvent&&n instanceof TouchEvent}function F(n){r=n}return{mount:function(){g(b,dt,Z,lt),g(b,vt,Z,lt),g(b,"touchstart mousedown",S,lt),g(b,"click",D,{capture:!0}),g(b,"dragstart",U),t([ln,xn],E)},disable:F,isDragging:function(){return d}}},Keyboard:function(t,n,i){var r,u,o=Pn(t),e=o.on,c=o.bind,f=o.unbind,a=t.root,s=n.Direction.resolve;function l(){var n=i.keyboard;n&&("focused"===n?j(r=a,ut,0):r=window,c(r,pt,p))}function d(){f(r,pt),y(r)&&T(r,ut)}function v(){var n=u;u=!0,g(function(){u=n})}function h(){d(),l()}function p(n){u||(n=n.key,(n=x(ht,n)?"Arrow"+n:n)===s("ArrowLeft")?t.go("<"):n===s("ArrowRight")&&t.go(">"))}return{mount:function(){l(),e(xn,h),e(dn,v)},destroy:d,disable:function(n){u=n}}},LazyLoad:function(i,n,e){var t=Pn(i),r=t.on,u=t.off,o=t.bind,c=t.emit,f="sequential"===e.lazyLoad,a=[],s=0;function l(){v(),d()}function d(){n.Slides.forEach(function(o){J(o.slide,yt).forEach(function(n){var t,i,r=X(n,gt),u=X(n,mt);r===n.src&&u===n.srcset||(t=e.classes.spinner,j(i=P(i=n.parentElement,"."+t)||F("span",t,i),$n,"presentation"),a.push({o:n,e:o,src:r,srcset:u,c:i}),n.src||N(n,"none"))})}),f&&g()}function v(){s=0,a=[]}function h(){(a=a.filter(function(n){var t=e.perPage*((e.preloadPages||1)+1)-1;return!n.e.isWithin(i.index,t)||p(n)})).length||u(vn)}function p(t){var i=t.o;A(t.e.slide,Qn),o(i,"load error",function(n){!function(n,t){var i=n.e;K(i.slide,Qn),t||(H(n.c),N(n.o,""),c(zn,n.o,i),c(kn));f&&g()}(t,"error"===n.type)}),["srcset","src"].forEach(function(n){t[n]&&(j(i,n,t[n]),T(i,"src"===n?gt:mt))})}function g(){s<a.length&&p(a[s++])}return{mount:function(){e.lazyLoad&&(d(),r(bn,l),f||r([ln,bn,vn,En],h))},destroy:v}},Pagination:function(l,n,d){var v,t=Pn(l),i=t.on,r=t.emit,h=t.bind,u=t.unbind,p=n.Slides,g=n.Elements,o=n.Controller,m=o.hasFocus,e=o.getIndex,y=[];function c(){f(),d.pagination&&p.isEnough()&&(function(){var n=l.length,t=d.classes,i=d.i18n,r=d.perPage,u="slider"===d.pagination&&g.slider||g.root,o=m()?n:rn(n/r);v=F("ul",t.pagination,u);for(var e=0;e<o;e++){var c=F("li",null,v),f=F("button",{class:t.page,type:"button"},c),a=p.getIn(e).map(function(n){return n.slide.id}),s=!m()&&1<r?i.pageX:i.slideX;h(f,"click",w.bind(null,e)),j(f,nt,a.join(" ")),j(f,it,fn(s,e+1)),y.push({li:c,button:f,page:e})}}(),r("pagination:mounted",{list:v,items:y},a(l.index)),s())}function f(){v&&(H(v),y.forEach(function(n){u(n.button,"click")}),_(y),v=null)}function w(t){o.go(">"+t,!0,function(){var n=p.getAt(o.toIndex(t));n&&((n=n.slide).setActive&&n.setActive()||n.focus({preventScroll:!0}))})}function a(n){return y[o.toPage(n)]}function s(){var n=a(e(!0)),t=a(e());n&&(K(n.button,qn),T(n.button,tt)),t&&(A(t.button,qn),j(t.button,tt,!0)),r("pagination:updated",{list:v,items:y},n,t)}return{items:y,mount:function(){c(),i([xn,bn],c),i([dn,En],s)},destroy:f,getAt:a,update:s}},Sync:function(u,n,i){var r=n.Elements.list,o=[];function t(){var n,t;u.splides.forEach(function(n){var i;n.isParent||(i=n.splide,[u,i].forEach(function(n){var t=Pn(n),r=n===u?i:u;t.on(dn,function(n,t,i){r.go(r.is(ct)?i:n)}),o.push(t)}))}),i.isNavigation&&(n=Pn(u),(t=n.on)(pn,f),t(_n,a),t([ln,xn],c),j(r,$n,"menu"),o.push(n),n.emit(Sn,u.splides))}function e(){T(r,ot),o.forEach(function(n){n.destroy()}),_(o)}function c(){j(r,p,"ttb"!==i.direction?"horizontal":null)}function f(n){u.go(n.index)}function a(n,t){x(wt,t.key)&&(f(n),U(t))}return{mount:t,destroy:e,remount:function(){e(),t()}}},Wheel:function(i,r,u){var n=Pn(i).bind;function t(n){var t;!n.cancelable||(t=n.deltaY)&&(i.go((t=t<0)?"<":">"),t=t,u.releaseWheel&&!i.state.is(4)&&-1===r.Controller.getAdjacent(t)||U(n))}return{mount:function(){u.wheel&&n(r.Elements.track,"wheel",t,lt)}}}}),bt={type:"slide",speed:400,waitForTransition:!0,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,keyboard:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",slideFocus:!0,trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",classes:{slide:Fn,clone:In,arrows:Cn,arrow:t,prev:Nn,next:Xn,pagination:i,page:i+"__page",spinner:m+"__spinner"},i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay"}};function xt(n,r,t){var i=Pn(n).on;return{mount:function(){i([ln,bn],function(){g(function(){r.Slides.style("transition","opacity "+t.speed+"ms "+t.easing)})})},start:function(n,t){var i=r.Elements.track;C(i,"height",V(G(i).height)),g(function(){t(),C(i,"height","")})},cancel:Z}}function kt(o,n,e){var c,t=Pn(o).bind,f=n.Move,a=n.Controller,i=n.Elements.list;function r(){s("")}function s(n){C(i,"transition",n)}return{mount:function(){t(i,"transitionend",function(n){n.target===i&&c&&(r(),c())})},start:function(n,t){var i=f.toPosition(n,!0),r=f.getPosition(),u=function(n){var t=e.rewindSpeed;if(o.is(et)&&t){var i=a.getIndex(!0),r=a.getEnd();if(0===i&&r<=n||r<=i&&0===n)return t}return e.speed}(n);1<=un(i-r)&&1<=u?(s("transform "+u+"ms "+e.easing),f.translate(i,!0),c=t):(f.jump(n),t())},cancel:r}}i=function(){function i(n,t){this.event=c(),this.Components={},this.state=d(1),this.splides=[],this.f={},this.a={};n=D(n)?q(document,n):n;Q(n,n+" is invalid."),this.root=n,l(bt,i.defaults),l(l(this.f,bt),t||{})}var n,t,r=i.prototype;return r.mount=function(n,t){var i=this,r=this.state,u=this.Components;return Q(r.is([1,5]),"Already mounted!"),r.set(1),this.s=u,this.l=t||this.l||(this.is(ft)?xt:kt),this.a=n||this.a,e(M({},_t,this.a,{Transition:this.l}),function(n,t){n=n(i,u,i.f);(u[t]=n).setup&&n.setup()}),e(u,function(n){n.mount&&n.mount()}),this.emit(ln),A(this.root,"is-initialized"),r.set(3),this.emit("ready"),this},r.sync=function(n){return this.splides.push({splide:n}),n.splides.push({splide:this,isParent:!0}),this.state.is(3)&&(this.s.Sync.remount(),n.Components.Sync.remount()),this},r.go=function(n){return this.s.Controller.go(n),this},r.on=function(n,t){return this.event.on(n,t,null,20),this},r.off=function(n){return this.event.off(n),this},r.emit=function(n){var t;return(t=this.event).emit.apply(t,[n].concat(s(arguments,1))),this},r.add=function(n,t){return this.s.Slides.add(n,t),this},r.remove=function(n){return this.s.Slides.remove(n),this},r.is=function(n){return this.f.type===n},r.refresh=function(){return this.emit(bn),this},r.destroy=function(t){void 0===t&&(t=!0);var n=this.event,i=this.state;return i.is(1)?n.on("ready",this.destroy.bind(this,t),this):(e(this.s,function(n){n.destroy&&n.destroy(t)},!0),n.emit(f),n.destroy(),t&&_(this.splides),i.set(5)),this},n=i,(r=[{key:"options",get:function(){return this.f},set:function(n){var t=this.f;l(t,n),this.state.is(1)||this.emit(xn,t)}},{key:"length",get:function(){return this.s.Slides.getLength(!0)}},{key:"index",get:function(){return this.s.Controller.getIndex()}}])&&At(n.prototype,r),t&&At(n,t),Object.defineProperty(n,"prototype",{writable:!1}),i}();return i.defaults={},i.STATES=n,i},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).Splide=t();;
if (!window['YT']) { var YT = { loading: 0, loaded: 0 }; } if (!window['YTConfig']) { var YTConfig = { 'host': 'http://www.youtube.com' }; } if (!YT.loading) { YT.loading = 1; (function () { var l = []; YT.ready = function (f) { if (YT.loaded) { f(); } else { l.push(f); } }; window.onYTReady = function () { YT.loaded = 1; for (var i = 0; i < l.length; i++) { try { l[i](); } catch (e) { } } }; YT.setConfig = function (c) { for (var k in c) { if (c.hasOwnProperty(k)) { YTConfig[k] = c[k]; } } }; var a = document.createElement('script'); a.type = 'text/javascript'; a.id = 'www-widgetapi-script'; a.src = 'https://s.ytimg.com/yts/jsbin/www-widgetapi-vflkAsU_-/www-widgetapi.js'; a.async = true; var c = document.currentScript; if (c) { var n = c.nonce || c.getAttribute('nonce'); if (n) { a.setAttribute('nonce', n); } } var b = document.getElementsByTagName('script')[0]; b.parentNode.insertBefore(a, b); })(); };
/*! @vimeo/player v2.16.2 | (c) 2021 Vimeo | MIT License | https://github.com/vimeo/player.js */
!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).Vimeo=e.Vimeo||{},e.Vimeo.Player=t())}(this,function(){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var e="undefined"!=typeof global&&"[object global]"==={}.toString.call(global);function i(e,t){return 0===e.indexOf(t.toLowerCase())?e:"".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function c(e){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(e)}function s(e){var t,n=0<arguments.length&&void 0!==e?e:{},r=n.id,o=n.url,i=r||o;if(!i)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(t=i,!isNaN(parseFloat(t))&&isFinite(t)&&Math.floor(t)==t)return"https://vimeo.com/".concat(i);if(c(i))return i.replace("http:","https:");if(r)throw new TypeError("“".concat(r,"” is not a valid video id."));throw new TypeError("“".concat(i,"” is not a vimeo.com url."))}var t=void 0!==Array.prototype.indexOf,n="undefined"!=typeof window&&void 0!==window.postMessage;if(!(e||t&&n))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var o,a,u,l,f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(l(this,"_id","_WeakMap_"+v()+"."+v()),0<arguments.length)throw new TypeError("WeakMap iterable is not supported")}function h(e,t){if(!m(e)||!a.call(e,"_id"))throw new TypeError(t+" method called on incompatible receiver "+typeof e)}function v(){return Math.random().toString().substring(2)}function m(e){return Object(e)===e}(o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:f).WeakMap||(a=Object.prototype.hasOwnProperty,u=Object.defineProperty&&function(){try{return 1===Object.defineProperty({},"x",{value:1}).x}catch(e){}}(),l=function(e,t,n){u?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}):e[t]=n},o.WeakMap=(l(d.prototype,"delete",function(e){if(h(this,"delete"),!m(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)}),l(d.prototype,"get",function(e){if(h(this,"get"),m(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}}),l(d.prototype,"has",function(e){if(h(this,"has"),!m(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)}),l(d.prototype,"set",function(e,t){if(h(this,"set"),!m(e))throw new TypeError("Invalid value used as weak map key");var n=e[this._id];return n&&n[0]===e?n[1]=t:l(e,this._id,[e,t]),this}),l(d,"_polyfill",!0),d));var p,y=(function(e){var t,n,r;r=function(){var t,n,r,o,i,a,e=Object.prototype.toString,u="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(e){t=function(e,t,n){return e[t]=n,e}}function l(e,t){this.fn=e,this.self=t,this.next=void 0}function c(e,t){r.add(e,t),n=n||u(r.drain)}function s(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function f(){for(var e=0;e<this.chain.length;e++)!function(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=s(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function d(e){var n,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(n=s(e))?c(function(){var t=new m(r);try{n.call(e,function(){d.apply(t,arguments)},function(){h.apply(t,arguments)})}catch(e){h.call(t,e)}}):(r.msg=e,r.state=1,0<r.chain.length&&c(f,r))}catch(e){h.call(new m(r),e)}}}function h(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,0<t.chain.length&&c(f,t))}function v(e,n,r,o){for(var t=0;t<n.length;t++)!function(t){e.resolve(n[t]).then(function(e){r(t,e)},o)}(t)}function m(e){this.def=e,this.triggered=!1}function p(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function y(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var r=new p(this);this.then=function(e,t){var n={success:"function"!=typeof e||e,failure:"function"==typeof t&&t};return n.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");n.resolve=e,n.reject=t}),r.chain.push(n),0!==r.state&&c(f,r),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){d.call(r,e)},function(e){h.call(r,e)})}catch(e){h.call(r,e)}}var g=t({},"constructor",y,!(r={add:function(e,t){a=new l(e,t),i?i.next=a:o=a,i=a,a=void 0},drain:function(){var e=o;for(o=i=n=void 0;e;)e.fn.call(e.self),e=e.next}}));return t(y.prototype=g,"__NPO__",0,!1),t(y,"resolve",function(n){return n&&"object"==typeof n&&1===n.__NPO__?n:new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");e(n)})}),t(y,"reject",function(n){return new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");t(n)})}),t(y,"all",function(t){var a=this;return"[object Array]"!=e.call(t)?a.reject(TypeError("Not an array")):0===t.length?a.resolve([]):new a(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");var r=t.length,o=Array(r),i=0;v(a,t,function(e,t){o[e]=t,++i===r&&n(o)},e)})}),t(y,"race",function(t){var r=this;return"[object Array]"!=e.call(t)?r.reject(TypeError("Not an array")):new r(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");v(r,t,function(e,t){n(t)},e)})}),y},(n=f)[t="Promise"]=n[t]||r(),e.exports&&(e.exports=n[t])}(p={exports:{}}),p.exports),g=new WeakMap;function w(e,t,n){var r=g.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),g.set(e.element,r)}function b(e,t){return(g.get(e.element)||{})[t]||[]}function k(e,t,n){var r=g.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],g.set(e.element,r),!0;var o=r[t].indexOf(n);return-1!==o&&r[t].splice(o,1),g.set(e.element,r),r[t]&&0===r[t].length}var E=["autopause","autoplay","background","byline","color","controls","dnt","height","id","keyboard","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"];function T(r,e){var t=1<arguments.length&&void 0!==e?e:{};return E.reduce(function(e,t){var n=r.getAttribute("data-vimeo-".concat(t));return!n&&""!==n||(e[t]=""===n?1:n),e},t)}function P(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function _(i,e,t){var a=1<arguments.length&&void 0!==e?e:{},u=2<arguments.length?t:void 0;return new Promise(function(t,n){if(!c(i))throw new TypeError("“".concat(i,"” is not a vimeo.com url."));var e="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(i));for(var r in a)a.hasOwnProperty(r)&&(e+="&".concat(r,"=").concat(encodeURIComponent(a[r])));var o=new("XDomainRequest"in window?XDomainRequest:XMLHttpRequest);o.open("GET",e,!0),o.onload=function(){if(404!==o.status)if(403!==o.status)try{var e=JSON.parse(o.responseText);if(403===e.domain_status_code)return P(e,u),void n(new Error("“".concat(i,"” is not embeddable.")));t(e)}catch(e){n(e)}else n(new Error("“".concat(i,"” is not embeddable.")));else n(new Error("“".concat(i,"” was not found.")))},o.onerror=function(){var e=o.status?" (".concat(o.status,")"):"";n(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},o.send()})}function M(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function N(e,t,n){var r,o;e.element.contentWindow&&e.element.contentWindow.postMessage&&(r={method:t},void 0!==n&&(r.value=n),8<=(o=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1")))&&o<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin))}function F(n,r){var t,e,o=[];(r=M(r)).event?("error"===r.event&&b(n,r.data.method).forEach(function(e){var t=new Error(r.data.message);t.name=r.data.name,e.reject(t),k(n,r.data.method,e)}),o=b(n,"event:".concat(r.event)),t=r.data):!r.method||(e=function(e,t){var n=b(e,t);if(n.length<1)return!1;var r=n.shift();return k(e,t,r),r}(n,r.method))&&(o.push(e),t=r.value),o.forEach(function(e){try{if("function"==typeof e)return void e.call(n,t);e.resolve(t)}catch(e){}})}var x,C,j,A=new WeakMap,q=new WeakMap,S={},Player=function(){function Player(u){var e,t,l=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Player),window.jQuery&&u instanceof jQuery&&(1<u.length&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),u=u[0]),"undefined"!=typeof document&&"string"==typeof u&&(u=document.getElementById(u)),e=u,!Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"===u.nodeName||(t=u.querySelector("iframe"))&&(u=t),"IFRAME"===u.nodeName&&!c(u.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(A.has(u))return A.get(u);this._window=u.ownerDocument.defaultView,this.element=u,this.origin="*";var r,o=new y(function(i,a){var e;l._onMessage=function(e){if(c(e.origin)&&l.element.contentWindow===e.source){"*"===l.origin&&(l.origin=e.origin);var t=M(e.data);if(t&&"error"===t.event&&t.data&&"ready"===t.data.method){var n=new Error(t.data.message);return n.name=t.data.name,void a(n)}var r=t&&"ready"===t.event,o=t&&"ping"===t.method;if(r||o)return l.element.setAttribute("data-ready","true"),void i();F(l,t)}},l._window.addEventListener("message",l._onMessage),"IFRAME"!==l.element.nodeName&&_(s(e=T(u,n)),e,u).then(function(e){var t,n,r,o=P(e,u);return l.element=o,l._originalElement=u,t=u,n=o,r=g.get(t),g.set(n,r),g.delete(t),A.set(l.element,l),e}).catch(a)});return q.set(this,o),A.set(this.element,this),"IFRAME"===this.element.nodeName&&N(this,"ping"),S.isEnabled&&(r=function(){return S.exit()},this.fullscreenchangeHandler=function(){(S.isFullscreen?w:k)(l,"event:exitFullscreen",r),l.ready().then(function(){N(l,"fullscreenchange",S.isFullscreen)})},S.on("fullscreenchange",this.fullscreenchangeHandler)),this}var e,t,n;return e=Player,(t=[{key:"callMethod",value:function(n,e){var r=this,o=1<arguments.length&&void 0!==e?e:{};return new y(function(e,t){return r.ready().then(function(){w(r,n,{resolve:e,reject:t}),N(r,n,o)}).catch(t)})}},{key:"get",value:function(n){var r=this;return new y(function(e,t){return n=i(n,"get"),r.ready().then(function(){w(r,n,{resolve:e,reject:t}),N(r,n)}).catch(t)})}},{key:"set",value:function(n,r){var o=this;return new y(function(e,t){if(n=i(n,"set"),null==r)throw new TypeError("There must be a value to set.");return o.ready().then(function(){w(o,n,{resolve:e,reject:t}),N(o,n,r)}).catch(t)})}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===b(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch(function(){}),w(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");k(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch(function(e){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=q.get(this)||new y(function(e,t){t(new Error("Unknown player. Probably unloaded."))});return y.resolve(e)}},{key:"addCuePoint",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{};return this.callMethod("addCuePoint",{time:e,data:n})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return S.isEnabled?S.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return S.isEnabled?S.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return S.isEnabled?y.resolve(S.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var n=this;return new y(function(e){var t;q.delete(n),A.delete(n.element),n._originalElement&&(A.delete(n._originalElement),n._originalElement.removeAttribute("data-vimeo-initialized")),n.element&&"IFRAME"===n.element.nodeName&&n.element.parentNode&&(n.element.parentNode.parentNode&&n._originalElement&&n._originalElement!==n.element.parentNode?n.element.parentNode.parentNode.removeChild(n.element.parentNode):n.element.parentNode.removeChild(n.element)),n.element&&"DIV"===n.element.nodeName&&n.element.parentNode&&(n.element.removeAttribute("data-vimeo-initialized"),(t=n.element.querySelector("iframe"))&&t.parentNode&&(t.parentNode.parentNode&&n._originalElement&&n._originalElement!==t.parentNode?t.parentNode.parentNode.removeChild(t.parentNode):t.parentNode.removeChild(t))),n._window.removeEventListener("message",n._onMessage),S.isEnabled&&S.off("fullscreenchange",n.fullscreenchangeHandler),e()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(e){return this.set("cameraProps",e)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(e){return this.set("quality",e)}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}])&&r(e.prototype,t),n&&r(e,n),Player}();return e||(x=function(){for(var e,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,r=t.length,o={};n<r;n++)if((e=t[n])&&e[1]in document){for(n=0;n<e.length;n++)o[t[0][n]]=e[n];return o}return!1}(),C={fullscreenchange:x.fullscreenchange,fullscreenerror:x.fullscreenerror},j={request:function(o){return new Promise(function(e,t){function n(){j.off("fullscreenchange",n),e()}j.on("fullscreenchange",n);var r=(o=o||document.documentElement)[x.requestFullscreen]();r instanceof Promise&&r.then(n).catch(t)})},exit:function(){return new Promise(function(t,e){var n,r;j.isFullscreen?(n=function e(){j.off("fullscreenchange",e),t()},j.on("fullscreenchange",n),(r=document[x.exitFullscreen]())instanceof Promise&&r.then(n).catch(e)):t()})},on:function(e,t){var n=C[e];n&&document.addEventListener(n,t)},off:function(e,t){var n=C[e];n&&document.removeEventListener(n,t)}},Object.defineProperties(j,{isFullscreen:{get:function(){return Boolean(document[x.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[x.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[x.fullscreenEnabled])}}}),S=j,function(e){function n(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))}var t=0<arguments.length&&void 0!==e?e:document;[].slice.call(t.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")).forEach(function(t){try{if(null!==t.getAttribute("data-vimeo-defer"))return;var e=T(t);_(s(e),e,t).then(function(e){return P(e,t)}).catch(n)}catch(e){n(e)}})}(),function(e){var r=0<arguments.length&&void 0!==e?e:document;window.VimeoPlayerResizeEmbeds_||(window.VimeoPlayerResizeEmbeds_=!0,window.addEventListener("message",function(e){if(c(e.origin)&&e.data&&"spacechange"===e.data.event)for(var t=r.querySelectorAll("iframe"),n=0;n<t.length;n++)if(t[n].contentWindow===e.source){t[n].parentElement.style.paddingBottom="".concat(e.data.data[0].bottom,"px");break}}))}()),Player});;
function initCarousel(carousel){const options=carousel.closest('.arch-banner')?{}:{breakpoints:{992:{perPage:2,perMove:1},600:{perPage:1,perMove:1}}};new Splide(carousel,options).mount();}
function terminateCarousel(carousel){if(!carousel)return;carousel.destroy(true);}
function refreshCarousel(carousel){if(!carousel)return;if(carousel.hasClass("is-initialized")){carousel.refresh();}else{initCarousel(carousel);}}
document.addEventListener('DOMContentLoaded',function(){let carousels=document.getElementsByClassName('splide');if(carousels.length>0){for(let i=0;i<carousels.length;i++){initCarousel(carousels[i]);}}});;;
;;
$(document).ready(function(){$('.custom-select select').each(function(){var $this=$(this),numberOfOptions=$(this).children('option').length;$this.addClass('select-hidden');$this.wrap('<div class="select"></div>');$this.after('<div class="select-styled"></div>');var $styledSelect=$this.next('div.select-styled');$styledSelect.text($this.children('option').eq(0).text());var $list=$('<ul />',{'class':'select-options'}).insertAfter($styledSelect);for(var i=0;i<numberOfOptions;i++){$('<li />',{text:$this.children('option').eq(i).text(),rel:$this.children('option').eq(i).val(),'data-delivery':$this.children('option').eq(i).data("delivery")}).appendTo($list);if($this.children('option').eq(i).is(':selected')){$('li[rel="'+$this.children('option').eq(i).val()+'"]').addClass('is-selected')}}
var $listItems=$list.children('li');$styledSelect.click(function(e){e.stopPropagation();$('div.select-styled.active').not(this).each(function(){$(this).removeClass('active').next('ul.select-options').hide();});$(this).toggleClass('active').next('ul.select-options').toggle();});$listItems.click(function(e){e.stopPropagation();$styledSelect.text($(this).text()).removeClass('active');$this.val($(this).attr('rel'));$list.hide();var selectedArea=$this.val();var selectedText=$(this).text();var dataDelivery=$(this).data("delivery");showData(selectedArea,selectedText,dataDelivery);});$(document).click(function(){$styledSelect.removeClass('active');$list.hide();});geo().then(area=>{$(this).siblings('.select-options').find(`[rel="AREA${area.Id}"]`).click()}).catch(x=>{})});$(document).on('click','.delivery-area',function(e){e.preventDefault();var selectedArea=$(this).data('location-area');var selectedText=$(this).data('location-name');var dataDelivery=$(this).data("delivery");showData(selectedArea,selectedText,dataDelivery);});function showData(selectedArea,selectedText,dataDelivery){if(selectedArea){clearSelections();if(selectedArea==="0"){$(".title .text-location").text("the world");if(dataDelivery=="True"){$(".title .text-location").text("deliver worldwide");}}else{if($("#LocationsCarousel").length>0){$("#Restaurants").append('<div id="RestaurantsCarousel" class="carousel splide" data-splide=\''+$("#LocationsCarousel").attr("data-splide")+'\'><div class="splide__track"><ul class="splide__list"></ul></div></div>');$("#"+selectedArea+" .restaurant-item").each(function(){$(this).clone().appendTo('#RestaurantsCarousel ul').wrap('<li class="splide__slide"></li>');});$("#LocationsCarousel").addClass('d-none');const splide=new Splide('#RestaurantsCarousel',{breakpoints:{992:{perPage:2,perMove:1},600:{perPage:1,perMove:1}}});splide.on('pagination:mounted',function(){updatePagination('#RestaurantsCarousel')});splide.mount();}else{$("#Restaurants").addClass("area-active").addClass(selectedArea);$("#"+selectedArea).addClass("active");}
if(dataDelivery=="True"){$(".title .text-location").text("deliver in "+selectedText);}else{$(".title .text-location").text(selectedText);}}}
clearSelectOptions();$('.select-options li[rel="'+selectedArea+'"]').addClass("is-selected");}
function clearSelections(){$("#Restaurants").removeClass("area-active");$("#RestaurantsCarousel").remove();$("#LocationsCarousel").removeClass('d-none')
$(".location-area").each(function(){$(this).removeClass("active");});}
function clearSelectOptions(){$(".select-options li").removeClass("is-selected");}
function updatePagination(selector){const carousel=$(selector)
const pages=carousel.find('.splide__pagination li').length
carousel.attr('style',`--carousel-pages:${pages};`)}
updatePagination('#LocationsCarousel')
let timeout=null
window.onresize=function(){if(timeout!==null){clearTimeout(timeout)}
timeout=setTimeout(()=>{updatePagination('#LocationsCarousel')},100)}});;;
function initVideo(){let videoWrappers=$('.vw');if(videoWrappers.length){let vimeoVideos=videoWrappers.filter('.vimeo');let youtubeVideos=videoWrappers.filter('.youtube');if(vimeoVideos.length){vimeoVideos.each(function(){let vimeoVideoWrapper=$(this);let vimeoVideo=vimeoVideoWrapper.find('.video').first();if(vimeoVideo.length){let playPauseTrigger=vimeoVideoWrapper.find('.play-pause-trigger').first();let player=new Vimeo.Player(vimeoVideo);player.on('play',function(){vimeoVideoWrapper.addClass('playing');playPauseTrigger.text('Pause');});player.on('pause',function(){vimeoVideoWrapper.removeClass('playing');playPauseTrigger.text('Play');});playPauseTrigger.click(function(){if(vimeoVideoWrapper.hasClass('playing')){player.pause();}
else{player.play();}});vimeoVideoWrapper.on('mousemove',function(){if(!vimeoVideoWrapper.hasClass('hover')){vimeoVideoWrapper.addClass('hover');setTimeout(function(){vimeoVideoWrapper.removeClass('hover');},2000);}});}});}
if(youtubeVideos.length){window.onYouTubeIframeAPIReady=function(){youtubeVideos.each(function(){let youtubeVideoWrapper=$(this);let youtubeVideo=youtubeVideoWrapper.find('.video').first();if(youtubeVideo.length){let playPauseTrigger=youtubeVideoWrapper.find('.play-pause-trigger').first();let youtubeVideoId=Math.random().toString(20).substr(2,10);youtubeVideo.attr('id',youtubeVideoId);let player=new window.YT.Player(youtubeVideoId,{playerVars:{},events:{'onReady':function(event){playPauseTrigger.click(function(){if(youtubeVideoWrapper.hasClass('playing')){event.target.pauseVideo();}
else{event.target.playVideo();}});},'onStateChange':function(event){if(event.data==YT.PlayerState.PLAYING){youtubeVideoWrapper.addClass('playing');playPauseTrigger.text('Pause');}
else if(event.data==YT.PlayerState.PAUSED){youtubeVideoWrapper.removeClass('playing');playPauseTrigger.text('Play');}
else if(event.data==YT.PlayerState.ENDED){youtubeVideoWrapper.removeClass('playing');playPauseTrigger.text('Play');}}}});youtubeVideoWrapper.on('mousemove',function(){if(!youtubeVideoWrapper.hasClass('hover')){youtubeVideoWrapper.addClass('hover');setTimeout(function(){youtubeVideoWrapper.removeClass('hover');},2000);}});}});}}}}
$(document).ready(function(){initVideo();});;;
!function (e, t) { "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.sal = t() : e.sal = t() }(this, (function () { return (() => { "use strict"; var e = { d: (t, n) => { for (var r in n) e.o(n, r) && !e.o(t, r) && Object.defineProperty(t, r, { enumerable: !0, get: n[r] }) }, o: (e, t) => Object.prototype.hasOwnProperty.call(e, t) }, t = {}; function n(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(e); t && (r = r.filter((function (t) { return Object.getOwnPropertyDescriptor(e, t).enumerable }))), n.push.apply(n, r) } return n } function r(e) { for (var t = 1; t < arguments.length; t++) { var r = null != arguments[t] ? arguments[t] : {}; t % 2 ? n(Object(r), !0).forEach((function (t) { o(e, t, r[t]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : n(Object(r)).forEach((function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t)) })) } return e } function o(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e } e.d(t, { default: () => j }); var a = "Sal was not initialised! Probably it is used in SSR.", s = "Your browser does not support IntersectionObserver!\nGet a polyfill from here:\nhttps://github.com/w3c/IntersectionObserver/tree/master/polyfill", i = { root: null, rootMargin: "0% 50%", threshold: .5, animateClassName: "sal-animate", disabledClassName: "sal-disabled", enterEventName: "sal:in", exitEventName: "sal:out", selector: "[data-sal]", once: !0, disabled: !1 }, l = [], c = null, u = function (e) { e && e !== i && (i = r(r({}, i), e)) }, d = function (e) { e.classList.remove(i.animateClassName) }, f = function (e, t) { var n = new CustomEvent(e, { bubbles: !0, detail: t }); t.target.dispatchEvent(n) }, b = function () { document.body.classList.add(i.disabledClassName) }, p = function () { c.disconnect(), c = null }, m = function () { return i.disabled || "function" == typeof i.disabled && i.disabled() }, v = function (e, t) { e.forEach((function (e) { var n = e.target, r = void 0 !== n.dataset.salRepeat, o = void 0 !== n.dataset.salOnce, a = r || !(o || i.once); e.intersectionRatio >= i.threshold ? (function (e) { e.target.classList.add(i.animateClassName), f(i.enterEventName, e) }(e), a || t.unobserve(n)) : a && function (e) { d(e.target), f(i.exitEventName, e) }(e) })) }, y = function () { var e = [].filter.call(document.querySelectorAll(i.selector), (function (e) { return !function (e) { return e.classList.contains(i.animateClassName) }(e, i.animateClassName) })); return e.forEach((function (e) { return c.observe(e) })), e }, O = function () { b(), p() }, h = function () { document.body.classList.remove(i.disabledClassName), c = new IntersectionObserver(v, { root: i.root, rootMargin: i.rootMargin, threshold: i.threshold }), l = y() }, g = function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; p(), Array.from(document.querySelectorAll(i.selector)).forEach(d), u(e), h() }, w = function () { var e = y(); l.push(e) }; const j = function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : i; if (u(e), "undefined" == typeof window) return console.warn(a), { elements: l, disable: O, enable: h, reset: g, update: w }; if (!window.IntersectionObserver) throw b(), Error(s); return m() ? b() : h(), { elements: l, disable: O, enable: h, reset: g, update: w } }; return t.default })() }));
//# sourceMappingURL=/js/default/libs/sal.js.map;;
$(document).ready(function(){sal();});;;
(function(root,factory){if(typeof define==="function"&&define.amd){define("bloodhound",["jquery"],function(a0){return root["Bloodhound"]=factory(a0);});}else if(typeof exports==="object"){module.exports=factory(require("jquery"));}else{root["Bloodhound"]=factory(jQuery);}})(this,function($){var _=function(){"use strict";return{isMsie:function(){return /(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:false;},isBlankString:function(str){return!str||/^\s*$/.test(str);},escapeRegExChars:function(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");},isString:function(obj){return typeof obj==="string";},isNumber:function(obj){return typeof obj==="number";},isArray:$.isArray,isFunction:$.isFunction,isObject:$.isPlainObject,isUndefined:function(obj){return typeof obj==="undefined";},isElement:function(obj){return!!(obj&&obj.nodeType===1);},isJQuery:function(obj){return obj instanceof $;},toStr:function toStr(s){return _.isUndefined(s)||s===null?"":s+"";},bind:$.proxy,each:function(collection,cb){$.each(collection,reverseArgs);function reverseArgs(index,value){return cb(value,index);}},map:$.map,filter:$.grep,every:function(obj,test){var result=true;if(!obj){return result;}
$.each(obj,function(key,val){if(!(result=test.call(null,val,key,obj))){return false;}});return!!result;},some:function(obj,test){var result=false;if(!obj){return result;}
$.each(obj,function(key,val){if(result=test.call(null,val,key,obj)){return false;}});return!!result;},mixin:$.extend,identity:function(x){return x;},clone:function(obj){return $.extend(true,{},obj);},getIdGenerator:function(){var counter=0;return function(){return counter++;};},templatify:function templatify(obj){return $.isFunction(obj)?obj:template;function template(){return String(obj);}},defer:function(fn){setTimeout(fn,0);},debounce:function(func,wait,immediate){var timeout,result;return function(){var context=this,args=arguments,later,callNow;later=function(){timeout=null;if(!immediate){result=func.apply(context,args);}};callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow){result=func.apply(context,args);}
return result;};},throttle:function(func,wait){var context,args,timeout,result,previous,later;previous=0;later=function(){previous=new Date();timeout=null;result=func.apply(context,args);};return function(){var now=new Date(),remaining=wait-(now-previous);context=this;args=arguments;if(remaining<=0){clearTimeout(timeout);timeout=null;previous=now;result=func.apply(context,args);}else if(!timeout){timeout=setTimeout(later,remaining);}
return result;};},stringify:function(val){return _.isString(val)?val:JSON.stringify(val);},noop:function(){}};}();var VERSION="0.11.1";var tokenizers=function(){"use strict";return{nonword:nonword,whitespace:whitespace,obj:{nonword:getObjTokenizer(nonword),whitespace:getObjTokenizer(whitespace)}};function whitespace(str){str=_.toStr(str);return str?str.split(/\s+/):[];}
function nonword(str){str=_.toStr(str);return str?str.split(/\W+/):[];}
function getObjTokenizer(tokenizer){return function setKey(keys){keys=_.isArray(keys)?keys:[].slice.call(arguments,0);return function tokenize(o){var tokens=[];_.each(keys,function(k){tokens=tokens.concat(tokenizer(_.toStr(o[k])));});return tokens;};};}}();var LruCache=function(){"use strict";function LruCache(maxSize){this.maxSize=_.isNumber(maxSize)?maxSize:100;this.reset();if(this.maxSize<=0){this.set=this.get=$.noop;}}
_.mixin(LruCache.prototype,{set:function set(key,val){var tailItem=this.list.tail,node;if(this.size>=this.maxSize){this.list.remove(tailItem);delete this.hash[tailItem.key];this.size--;}
if(node=this.hash[key]){node.val=val;this.list.moveToFront(node);}else{node=new Node(key,val);this.list.add(node);this.hash[key]=node;this.size++;}},get:function get(key){var node=this.hash[key];if(node){this.list.moveToFront(node);return node.val;}},reset:function reset(){this.size=0;this.hash={};this.list=new List();}});function List(){this.head=this.tail=null;}
_.mixin(List.prototype,{add:function add(node){if(this.head){node.next=this.head;this.head.prev=node;}
this.head=node;this.tail=this.tail||node;},remove:function remove(node){node.prev?node.prev.next=node.next:this.head=node.next;node.next?node.next.prev=node.prev:this.tail=node.prev;},moveToFront:function(node){this.remove(node);this.add(node);}});function Node(key,val){this.key=key;this.val=val;this.prev=this.next=null;}
return LruCache;}();var PersistentStorage=function(){"use strict";var LOCAL_STORAGE;try{LOCAL_STORAGE=window.localStorage;LOCAL_STORAGE.setItem("~~~","!");LOCAL_STORAGE.removeItem("~~~");}catch(err){LOCAL_STORAGE=null;}
function PersistentStorage(namespace,override){this.prefix=["__",namespace,"__"].join("");this.ttlKey="__ttl__";this.keyMatcher=new RegExp("^"+_.escapeRegExChars(this.prefix));this.ls=override||LOCAL_STORAGE;!this.ls&&this._noop();}
_.mixin(PersistentStorage.prototype,{_prefix:function(key){return this.prefix+key;},_ttlKey:function(key){return this._prefix(key)+this.ttlKey;},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=_.noop;},_safeSet:function(key,val){try{this.ls.setItem(key,val);}catch(err){if(err.name==="QuotaExceededError"){this.clear();this._noop();}}},get:function(key){if(this.isExpired(key)){this.remove(key);}
return decode(this.ls.getItem(this._prefix(key)));},set:function(key,val,ttl){if(_.isNumber(ttl)){this._safeSet(this._ttlKey(key),encode(now()+ttl));}else{this.ls.removeItem(this._ttlKey(key));}
return this._safeSet(this._prefix(key),encode(val));},remove:function(key){this.ls.removeItem(this._ttlKey(key));this.ls.removeItem(this._prefix(key));return this;},clear:function(){var i,keys=gatherMatchingKeys(this.keyMatcher);for(i=keys.length;i--;){this.remove(keys[i]);}
return this;},isExpired:function(key){var ttl=decode(this.ls.getItem(this._ttlKey(key)));return _.isNumber(ttl)&&now()>ttl?true:false;}});return PersistentStorage;function now(){return new Date().getTime();}
function encode(val){return JSON.stringify(_.isUndefined(val)?null:val);}
function decode(val){return $.parseJSON(val);}
function gatherMatchingKeys(keyMatcher){var i,key,keys=[],len=LOCAL_STORAGE.length;for(i=0;i<len;i++){if((key=LOCAL_STORAGE.key(i)).match(keyMatcher)){keys.push(key.replace(keyMatcher,""));}}
return keys;}}();var Transport=function(){"use strict";var pendingRequestsCount=0,pendingRequests={},maxPendingRequests=6,sharedCache=new LruCache(10);function Transport(o){o=o||{};this.cancelled=false;this.lastReq=null;this._send=o.transport;this._get=o.limiter?o.limiter(this._get):this._get;this._cache=o.cache===false?new LruCache(0):sharedCache;}
Transport.setMaxPendingRequests=function setMaxPendingRequests(num){maxPendingRequests=num;};Transport.resetCache=function resetCache(){sharedCache.reset();};_.mixin(Transport.prototype,{_fingerprint:function fingerprint(o){o=o||{};return o.url+o.type+$.param(o.data||{});},_get:function(o,cb){var that=this,fingerprint,jqXhr;fingerprint=this._fingerprint(o);if(this.cancelled||fingerprint!==this.lastReq){return;}
if(jqXhr=pendingRequests[fingerprint]){jqXhr.done(done).fail(fail);}else if(pendingRequestsCount<maxPendingRequests){pendingRequestsCount++;pendingRequests[fingerprint]=this._send(o).done(done).fail(fail).always(always);}else{this.onDeckRequestArgs=[].slice.call(arguments,0);}
function done(resp){cb(null,resp);that._cache.set(fingerprint,resp);}
function fail(){cb(true);}
function always(){pendingRequestsCount--;delete pendingRequests[fingerprint];if(that.onDeckRequestArgs){that._get.apply(that,that.onDeckRequestArgs);that.onDeckRequestArgs=null;}}},get:function(o,cb){var resp,fingerprint;cb=cb||$.noop;o=_.isString(o)?{url:o}:o||{};fingerprint=this._fingerprint(o);this.cancelled=false;this.lastReq=fingerprint;if(resp=this._cache.get(fingerprint)){cb(null,resp);}else{this._get(o,cb);}},cancel:function(){this.cancelled=true;}});return Transport;}();var SearchIndex=window.SearchIndex=function(){"use strict";var CHILDREN="c",IDS="i";function SearchIndex(o){o=o||{};if(!o.datumTokenizer||!o.queryTokenizer){$.error("datumTokenizer and queryTokenizer are both required");}
this.identify=o.identify||_.stringify;this.datumTokenizer=o.datumTokenizer;this.queryTokenizer=o.queryTokenizer;this.reset();}
_.mixin(SearchIndex.prototype,{bootstrap:function bootstrap(o){this.datums=o.datums;this.trie=o.trie;},add:function(data){var that=this;data=_.isArray(data)?data:[data];_.each(data,function(datum){var id,tokens;that.datums[id=that.identify(datum)]=datum;tokens=normalizeTokens(that.datumTokenizer(datum));_.each(tokens,function(token){var node,chars,ch;node=that.trie;chars=token.split("");while(ch=chars.shift()){node=node[CHILDREN][ch]||(node[CHILDREN][ch]=newNode());node[IDS].push(id);}});});},get:function get(ids){var that=this;return _.map(ids,function(id){return that.datums[id];});},search:function search(query){var that=this,tokens,matches;tokens=normalizeTokens(this.queryTokenizer(query));_.each(tokens,function(token){var node,chars,ch,ids;if(matches&&matches.length===0){return false;}
node=that.trie;chars=token.split("");while(node&&(ch=chars.shift())){node=node[CHILDREN][ch];}
if(node&&chars.length===0){ids=node[IDS].slice(0);matches=matches?getIntersection(matches,ids):ids;}else{matches=[];return false;}});return matches?_.map(unique(matches),function(id){return that.datums[id];}):[];},all:function all(){var values=[];for(var key in this.datums){values.push(this.datums[key]);}
return values;},reset:function reset(){this.datums={};this.trie=newNode();},serialize:function serialize(){return{datums:this.datums,trie:this.trie};}});return SearchIndex;function normalizeTokens(tokens){tokens=_.filter(tokens,function(token){return!!token;});tokens=_.map(tokens,function(token){return token.toLowerCase();});return tokens;}
function newNode(){var node={};node[IDS]=[];node[CHILDREN]={};return node;}
function unique(array){var seen={},uniques=[];for(var i=0,len=array.length;i<len;i++){if(!seen[array[i]]){seen[array[i]]=true;uniques.push(array[i]);}}
return uniques;}
function getIntersection(arrayA,arrayB){var ai=0,bi=0,intersection=[];arrayA=arrayA.sort();arrayB=arrayB.sort();var lenArrayA=arrayA.length,lenArrayB=arrayB.length;while(ai<lenArrayA&&bi<lenArrayB){if(arrayA[ai]<arrayB[bi]){ai++;}else if(arrayA[ai]>arrayB[bi]){bi++;}else{intersection.push(arrayA[ai]);ai++;bi++;}}
return intersection;}}();var Prefetch=function(){"use strict";var keys;keys={data:"data",protocol:"protocol",thumbprint:"thumbprint"};function Prefetch(o){this.url=o.url;this.ttl=o.ttl;this.cache=o.cache;this.prepare=o.prepare;this.transform=o.transform;this.transport=o.transport;this.thumbprint=o.thumbprint;this.storage=new PersistentStorage(o.cacheKey);}
_.mixin(Prefetch.prototype,{_settings:function settings(){return{url:this.url,type:"GET",dataType:"json"};},store:function store(data){if(!this.cache){return;}
this.storage.set(keys.data,data,this.ttl);this.storage.set(keys.protocol,location.protocol,this.ttl);this.storage.set(keys.thumbprint,this.thumbprint,this.ttl);},fromCache:function fromCache(){var stored={},isExpired;if(!this.cache){return null;}
stored.data=this.storage.get(keys.data);stored.protocol=this.storage.get(keys.protocol);stored.thumbprint=this.storage.get(keys.thumbprint);isExpired=stored.thumbprint!==this.thumbprint||stored.protocol!==location.protocol;return stored.data&&!isExpired?stored.data:null;},fromNetwork:function(cb){var that=this,settings;if(!cb){return;}
settings=this.prepare(this._settings());this.transport(settings).fail(onError).done(onResponse);function onError(){cb(true);}
function onResponse(resp){cb(null,that.transform(resp));}},clear:function clear(){this.storage.clear();return this;}});return Prefetch;}();var Remote=function(){"use strict";function Remote(o){this.url=o.url;this.prepare=o.prepare;this.transform=o.transform;this.transport=new Transport({cache:o.cache,limiter:o.limiter,transport:o.transport});}
_.mixin(Remote.prototype,{_settings:function settings(){return{url:this.url,type:"GET",dataType:"json"};},get:function get(query,cb){var that=this,settings;if(!cb){return;}
query=query||"";settings=this.prepare(query,this._settings());return this.transport.get(settings,onResponse);function onResponse(err,resp){err?cb([]):cb(that.transform(resp));}},cancelLastRequest:function cancelLastRequest(){this.transport.cancel();}});return Remote;}();var oParser=function(){"use strict";return function parse(o){var defaults,sorter;defaults={initialize:true,identify:_.stringify,datumTokenizer:null,queryTokenizer:null,sufficient:5,sorter:null,local:[],prefetch:null,remote:null};o=_.mixin(defaults,o||{});!o.datumTokenizer&&$.error("datumTokenizer is required");!o.queryTokenizer&&$.error("queryTokenizer is required");sorter=o.sorter;o.sorter=sorter?function(x){return x.sort(sorter);}:_.identity;o.local=_.isFunction(o.local)?o.local():o.local;o.prefetch=parsePrefetch(o.prefetch);o.remote=parseRemote(o.remote);return o;};function parsePrefetch(o){var defaults;if(!o){return null;}
defaults={url:null,ttl:24*60*60*1e3,cache:true,cacheKey:null,thumbprint:"",prepare:_.identity,transform:_.identity,transport:null};o=_.isString(o)?{url:o}:o;o=_.mixin(defaults,o);!o.url&&$.error("prefetch requires url to be set");o.transform=o.filter||o.transform;o.cacheKey=o.cacheKey||o.url;o.thumbprint=VERSION+o.thumbprint;o.transport=o.transport?callbackToDeferred(o.transport):$.ajax;return o;}
function parseRemote(o){var defaults;if(!o){return;}
defaults={url:null,cache:true,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:_.identity,transport:null};o=_.isString(o)?{url:o}:o;o=_.mixin(defaults,o);!o.url&&$.error("remote requires url to be set");o.transform=o.filter||o.transform;o.prepare=toRemotePrepare(o);o.limiter=toLimiter(o);o.transport=o.transport?callbackToDeferred(o.transport):$.ajax;delete o.replace;delete o.wildcard;delete o.rateLimitBy;delete o.rateLimitWait;return o;}
function toRemotePrepare(o){var prepare,replace,wildcard;prepare=o.prepare;replace=o.replace;wildcard=o.wildcard;if(prepare){return prepare;}
if(replace){prepare=prepareByReplace;}else if(o.wildcard){prepare=prepareByWildcard;}else{prepare=idenityPrepare;}
return prepare;function prepareByReplace(query,settings){settings.url=replace(settings.url,query);return settings;}
function prepareByWildcard(query,settings){settings.url=settings.url.replace(wildcard,encodeURIComponent(query));return settings;}
function idenityPrepare(query,settings){return settings;}}
function toLimiter(o){var limiter,method,wait;limiter=o.limiter;method=o.rateLimitBy;wait=o.rateLimitWait;if(!limiter){limiter=/^throttle$/i.test(method)?throttle(wait):debounce(wait);}
return limiter;function debounce(wait){return function debounce(fn){return _.debounce(fn,wait);};}
function throttle(wait){return function throttle(fn){return _.throttle(fn,wait);};}}
function callbackToDeferred(fn){return function wrapper(o){var deferred=$.Deferred();fn(o,onSuccess,onError);return deferred;function onSuccess(resp){_.defer(function(){deferred.resolve(resp);});}
function onError(err){_.defer(function(){deferred.reject(err);});}};}}();var Bloodhound=function(){"use strict";var old;old=window&&window.Bloodhound;function Bloodhound(o){o=oParser(o);this.sorter=o.sorter;this.identify=o.identify;this.sufficient=o.sufficient;this.local=o.local;this.remote=o.remote?new Remote(o.remote):null;this.prefetch=o.prefetch?new Prefetch(o.prefetch):null;this.index=new SearchIndex({identify:this.identify,datumTokenizer:o.datumTokenizer,queryTokenizer:o.queryTokenizer});o.initialize!==false&&this.initialize();}
Bloodhound.noConflict=function noConflict(){window&&(window.Bloodhound=old);return Bloodhound;};Bloodhound.tokenizers=tokenizers;_.mixin(Bloodhound.prototype,{__ttAdapter:function ttAdapter(){var that=this;return this.remote?withAsync:withoutAsync;function withAsync(query,sync,async){return that.search(query,sync,async);}
function withoutAsync(query,sync){return that.search(query,sync);}},_loadPrefetch:function loadPrefetch(){var that=this,deferred,serialized;deferred=$.Deferred();if(!this.prefetch){deferred.resolve();}else if(serialized=this.prefetch.fromCache()){this.index.bootstrap(serialized);deferred.resolve();}else{this.prefetch.fromNetwork(done);}
return deferred.promise();function done(err,data){if(err){return deferred.reject();}
that.add(data);that.prefetch.store(that.index.serialize());deferred.resolve();}},_initialize:function initialize(){var that=this,deferred;this.clear();(this.initPromise=this._loadPrefetch()).done(addLocalToIndex);return this.initPromise;function addLocalToIndex(){that.add(that.local);}},initialize:function initialize(force){return!this.initPromise||force?this._initialize():this.initPromise;},add:function add(data){this.index.add(data);return this;},get:function get(ids){ids=_.isArray(ids)?ids:[].slice.call(arguments);return this.index.get(ids);},search:function search(query,sync,async){var that=this,local;local=this.sorter(this.index.search(query));sync(this.remote?local.slice():local);if(this.remote&&local.length<this.sufficient){this.remote.get(query,processRemote);}else if(this.remote){this.remote.cancelLastRequest();}
return this;function processRemote(remote){var nonDuplicates=[];_.each(remote,function(r){!_.some(local,function(l){return that.identify(r)===that.identify(l);})&&nonDuplicates.push(r);});async&&async(nonDuplicates);}},all:function all(){return this.index.all();},clear:function clear(){this.index.reset();return this;},clearPrefetchCache:function clearPrefetchCache(){this.prefetch&&this.prefetch.clear();return this;},clearRemoteCache:function clearRemoteCache(){Transport.resetCache();return this;},ttAdapter:function ttAdapter(){return this.__ttAdapter();}});return Bloodhound;}();return Bloodhound;});(function(root,factory){if(typeof define==="function"&&define.amd){define("typeahead.js",["jquery"],function(a0){return factory(a0);});}else if(typeof exports==="object"){module.exports=factory(require("jquery"));}else{factory(jQuery);}})(this,function($){var _=function(){"use strict";return{isMsie:function(){return /(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:false;},isBlankString:function(str){return!str||/^\s*$/.test(str);},escapeRegExChars:function(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");},isString:function(obj){return typeof obj==="string";},isNumber:function(obj){return typeof obj==="number";},isArray:$.isArray,isFunction:$.isFunction,isObject:$.isPlainObject,isUndefined:function(obj){return typeof obj==="undefined";},isElement:function(obj){return!!(obj&&obj.nodeType===1);},isJQuery:function(obj){return obj instanceof $;},toStr:function toStr(s){return _.isUndefined(s)||s===null?"":s+"";},bind:$.proxy,each:function(collection,cb){$.each(collection,reverseArgs);function reverseArgs(index,value){return cb(value,index);}},map:$.map,filter:$.grep,every:function(obj,test){var result=true;if(!obj){return result;}
$.each(obj,function(key,val){if(!(result=test.call(null,val,key,obj))){return false;}});return!!result;},some:function(obj,test){var result=false;if(!obj){return result;}
$.each(obj,function(key,val){if(result=test.call(null,val,key,obj)){return false;}});return!!result;},mixin:$.extend,identity:function(x){return x;},clone:function(obj){return $.extend(true,{},obj);},getIdGenerator:function(){var counter=0;return function(){return counter++;};},templatify:function templatify(obj){return $.isFunction(obj)?obj:template;function template(){return String(obj);}},defer:function(fn){setTimeout(fn,0);},debounce:function(func,wait,immediate){var timeout,result;return function(){var context=this,args=arguments,later,callNow;later=function(){timeout=null;if(!immediate){result=func.apply(context,args);}};callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow){result=func.apply(context,args);}
return result;};},throttle:function(func,wait){var context,args,timeout,result,previous,later;previous=0;later=function(){previous=new Date();timeout=null;result=func.apply(context,args);};return function(){var now=new Date(),remaining=wait-(now-previous);context=this;args=arguments;if(remaining<=0){clearTimeout(timeout);timeout=null;previous=now;result=func.apply(context,args);}else if(!timeout){timeout=setTimeout(later,remaining);}
return result;};},stringify:function(val){return _.isString(val)?val:JSON.stringify(val);},noop:function(){}};}();var WWW=function(){"use strict";var defaultClassNames={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return build;function build(o){var www,classes;classes=_.mixin({},defaultClassNames,o);www={css:buildCss(),classes:classes,html:buildHtml(classes),selectors:buildSelectors(classes)};return{css:www.css,html:www.html,classes:www.classes,selectors:www.selectors,mixin:function(o){_.mixin(o,www);}};}
function buildHtml(c){return{wrapper:'<span class="'+c.wrapper+'"></span>',menu:'<div class="'+c.menu+'"></div>'};}
function buildSelectors(classes){var selectors={};_.each(classes,function(v,k){selectors[k]="."+v;});return selectors;}
function buildCss(){var css={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};if(_.isMsie()){_.mixin(css.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"});}
return css;}}();var EventBus=function(){"use strict";var namespace,deprecationMap;namespace="typeahead:";deprecationMap={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"};function EventBus(o){if(!o||!o.el){$.error("EventBus initialized without el");}
this.$el=$(o.el);}
_.mixin(EventBus.prototype,{_trigger:function(type,args){var $e;$e=$.Event(namespace+type);(args=args||[]).unshift($e);this.$el.trigger.apply(this.$el,args);return $e;},before:function(type){var args,$e;args=[].slice.call(arguments,1);$e=this._trigger("before"+type,args);return $e.isDefaultPrevented();},trigger:function(type){var deprecatedType;this._trigger(type,[].slice.call(arguments,1));if(deprecatedType=deprecationMap[type]){this._trigger(deprecatedType,[].slice.call(arguments,1));}}});return EventBus;}();var EventEmitter=function(){"use strict";var splitter=/\s+/,nextTick=getNextTick();return{onSync:onSync,onAsync:onAsync,off:off,trigger:trigger};function on(method,types,cb,context){var type;if(!cb){return this;}
types=types.split(splitter);cb=context?bindContext(cb,context):cb;this._callbacks=this._callbacks||{};while(type=types.shift()){this._callbacks[type]=this._callbacks[type]||{sync:[],async:[]};this._callbacks[type][method].push(cb);}
return this;}
function onAsync(types,cb,context){return on.call(this,"async",types,cb,context);}
function onSync(types,cb,context){return on.call(this,"sync",types,cb,context);}
function off(types){var type;if(!this._callbacks){return this;}
types=types.split(splitter);while(type=types.shift()){delete this._callbacks[type];}
return this;}
function trigger(types){var type,callbacks,args,syncFlush,asyncFlush;if(!this._callbacks){return this;}
types=types.split(splitter);args=[].slice.call(arguments,1);while((type=types.shift())&&(callbacks=this._callbacks[type])){syncFlush=getFlush(callbacks.sync,this,[type].concat(args));asyncFlush=getFlush(callbacks.async,this,[type].concat(args));syncFlush()&&nextTick(asyncFlush);}
return this;}
function getFlush(callbacks,context,args){return flush;function flush(){var cancelled;for(var i=0,len=callbacks.length;!cancelled&&i<len;i+=1){cancelled=callbacks[i].apply(context,args)===false;}
return!cancelled;}}
function getNextTick(){var nextTickFn;if(window.setImmediate){nextTickFn=function nextTickSetImmediate(fn){setImmediate(function(){fn();});};}else{nextTickFn=function nextTickSetTimeout(fn){setTimeout(function(){fn();},0);};}
return nextTickFn;}
function bindContext(fn,context){return fn.bind?fn.bind(context):function(){fn.apply(context,[].slice.call(arguments,0));};}}();var highlight=function(doc){"use strict";var defaults={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:false,caseSensitive:false};return function hightlight(o){var regex;o=_.mixin({},defaults,o);if(!o.node||!o.pattern){return;}
o.pattern=_.isArray(o.pattern)?o.pattern:[o.pattern];regex=getRegex(o.pattern,o.caseSensitive,o.wordsOnly);traverse(o.node,hightlightTextNode);function hightlightTextNode(textNode){var match,patternNode,wrapperNode;if(match=regex.exec(textNode.data)){wrapperNode=doc.createElement(o.tagName);o.className&&(wrapperNode.className=o.className);patternNode=textNode.splitText(match.index);patternNode.splitText(match[0].length);wrapperNode.appendChild(patternNode.cloneNode(true));textNode.parentNode.replaceChild(wrapperNode,patternNode);}
return!!match;}
function traverse(el,hightlightTextNode){var childNode,TEXT_NODE_TYPE=3;for(var i=0;i<el.childNodes.length;i++){childNode=el.childNodes[i];if(childNode.nodeType===TEXT_NODE_TYPE){i+=hightlightTextNode(childNode)?1:0;}else{traverse(childNode,hightlightTextNode);}}}};function getRegex(patterns,caseSensitive,wordsOnly){var escapedPatterns=[],regexStr;for(var i=0,len=patterns.length;i<len;i++){escapedPatterns.push(_.escapeRegExChars(patterns[i]));}
regexStr=wordsOnly?"\\b("+escapedPatterns.join("|")+")\\b":"("+escapedPatterns.join("|")+")";return caseSensitive?new RegExp(regexStr):new RegExp(regexStr,"i");}}(window.document);var Input=function(){"use strict";var specialKeyCodeMap;specialKeyCodeMap={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"};function Input(o,www){o=o||{};if(!o.input){$.error("input is missing");}
www.mixin(this);this.$hint=$(o.hint);this.$input=$(o.input);this.query=this.$input.val();this.queryWhenFocused=this.hasFocus()?this.query:null;this.$overflowHelper=buildOverflowHelper(this.$input);this._checkLanguageDirection();if(this.$hint.length===0){this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=_.noop;}}
Input.normalizeQuery=function(str){return _.toStr(str).replace(/^\s*/g,"").replace(/\s{2,}/g," ");};_.mixin(Input.prototype,EventEmitter,{_onBlur:function onBlur(){this.resetInputValue();this.trigger("blurred");},_onFocus:function onFocus(){this.queryWhenFocused=this.query;this.trigger("focused");},_onKeydown:function onKeydown($e){var keyName=specialKeyCodeMap[$e.which||$e.keyCode];this._managePreventDefault(keyName,$e);if(keyName&&this._shouldTrigger(keyName,$e)){this.trigger(keyName+"Keyed",$e);}},_onInput:function onInput(){this._setQuery(this.getInputValue());this.clearHintIfInvalid();this._checkLanguageDirection();},_managePreventDefault:function managePreventDefault(keyName,$e){var preventDefault;switch(keyName){case"up":case"down":preventDefault=!withModifier($e);break;default:preventDefault=false;}
preventDefault&&$e.preventDefault();},_shouldTrigger:function shouldTrigger(keyName,$e){var trigger;switch(keyName){case"tab":trigger=!withModifier($e);break;default:trigger=true;}
return trigger;},_checkLanguageDirection:function checkLanguageDirection(){var dir=(this.$input.css("direction")||"ltr").toLowerCase();if(this.dir!==dir){this.dir=dir;this.$hint.attr("dir",dir);this.trigger("langDirChanged",dir);}},_setQuery:function setQuery(val,silent){var areEquivalent,hasDifferentWhitespace;areEquivalent=areQueriesEquivalent(val,this.query);hasDifferentWhitespace=areEquivalent?this.query.length!==val.length:false;this.query=val;if(!silent&&!areEquivalent){this.trigger("queryChanged",this.query);}else if(!silent&&hasDifferentWhitespace){this.trigger("whitespaceChanged",this.query);}},bind:function(){var that=this,onBlur,onFocus,onKeydown,onInput;onBlur=_.bind(this._onBlur,this);onFocus=_.bind(this._onFocus,this);onKeydown=_.bind(this._onKeydown,this);onInput=_.bind(this._onInput,this);this.$input.on("blur.tt",onBlur).on("focus.tt",onFocus).on("keydown.tt",onKeydown);if(!_.isMsie()||_.isMsie()>9){this.$input.on("input.tt",onInput);}else{this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function($e){if(specialKeyCodeMap[$e.which||$e.keyCode]){return;}
_.defer(_.bind(that._onInput,that,$e));});}
return this;},focus:function focus(){this.$input.focus();},blur:function blur(){this.$input.blur();},getLangDir:function getLangDir(){return this.dir;},getQuery:function getQuery(){return this.query||"";},setQuery:function setQuery(val,silent){this.setInputValue(val);this._setQuery(val,silent);},hasQueryChangedSinceLastFocus:function hasQueryChangedSinceLastFocus(){return this.query!==this.queryWhenFocused;},getInputValue:function getInputValue(){return this.$input.val();},setInputValue:function setInputValue(value){this.$input.val(value);this.clearHintIfInvalid();this._checkLanguageDirection();},resetInputValue:function resetInputValue(){this.setInputValue(this.query);},getHint:function getHint(){return this.$hint.val();},setHint:function setHint(value){this.$hint.val(value);},clearHint:function clearHint(){this.setHint("");},clearHintIfInvalid:function clearHintIfInvalid(){var val,hint,valIsPrefixOfHint,isValid;val=this.getInputValue();hint=this.getHint();valIsPrefixOfHint=val!==hint&&hint.indexOf(val)===0;isValid=val!==""&&valIsPrefixOfHint&&!this.hasOverflow();!isValid&&this.clearHint();},hasFocus:function hasFocus(){return this.$input.is(":focus");},hasOverflow:function hasOverflow(){var constraint=this.$input.width()-2;this.$overflowHelper.text(this.getInputValue());return this.$overflowHelper.width()>=constraint;},isCursorAtEnd:function(){var valueLength,selectionStart,range;valueLength=this.$input.val().length;selectionStart=this.$input[0].selectionStart;if(_.isNumber(selectionStart)){return selectionStart===valueLength;}else if(document.selection){range=document.selection.createRange();range.moveStart("character",-valueLength);return valueLength===range.text.length;}
return true;},destroy:function destroy(){this.$hint.off(".tt");this.$input.off(".tt");this.$overflowHelper.remove();this.$hint=this.$input=this.$overflowHelper=$("<div>");}});return Input;function buildOverflowHelper($input){return $('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:$input.css("font-family"),fontSize:$input.css("font-size"),fontStyle:$input.css("font-style"),fontVariant:$input.css("font-variant"),fontWeight:$input.css("font-weight"),wordSpacing:$input.css("word-spacing"),letterSpacing:$input.css("letter-spacing"),textIndent:$input.css("text-indent"),textRendering:$input.css("text-rendering"),textTransform:$input.css("text-transform")}).insertAfter($input);}
function areQueriesEquivalent(a,b){return Input.normalizeQuery(a)===Input.normalizeQuery(b);}
function withModifier($e){return $e.altKey||$e.ctrlKey||$e.metaKey||$e.shiftKey;}}();var Dataset=function(){"use strict";var keys,nameGenerator;keys={val:"tt-selectable-display",obj:"tt-selectable-object"};nameGenerator=_.getIdGenerator();function Dataset(o,www){o=o||{};o.templates=o.templates||{};o.templates.notFound=o.templates.notFound||o.templates.empty;if(!o.source){$.error("missing source");}
if(!o.node){$.error("missing node");}
if(o.name&&!isValidName(o.name)){$.error("invalid dataset name: "+o.name);}
www.mixin(this);this.highlight=!!o.highlight;this.name=o.name||nameGenerator();this.limit=o.limit||5;this.displayFn=getDisplayFn(o.display||o.displayKey);this.templates=getTemplates(o.templates,this.displayFn);this.source=o.source.__ttAdapter?o.source.__ttAdapter():o.source;this.async=_.isUndefined(o.async)?this.source.length>2:!!o.async;this._resetLastSuggestion();this.$el=$(o.node).addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name);}
Dataset.extractData=function extractData(el){var $el=$(el);if($el.data(keys.obj)){return{val:$el.data(keys.val)||"",obj:$el.data(keys.obj)||null};}
return null;};_.mixin(Dataset.prototype,EventEmitter,{_overwrite:function overwrite(query,suggestions){suggestions=suggestions||[];if(suggestions.length){this._renderSuggestions(query,suggestions);}else if(this.async&&this.templates.pending){this._renderPending(query);}else if(!this.async&&this.templates.notFound){this._renderNotFound(query);}else{this._empty();}
this.trigger("rendered",this.name,suggestions,false);},_append:function append(query,suggestions){suggestions=suggestions||[];if(suggestions.length&&this.$lastSuggestion.length){this._appendSuggestions(query,suggestions);}else if(suggestions.length){this._renderSuggestions(query,suggestions);}else if(!this.$lastSuggestion.length&&this.templates.notFound){this._renderNotFound(query);}
this.trigger("rendered",this.name,suggestions,true);},_renderSuggestions:function renderSuggestions(query,suggestions){var $fragment;$fragment=this._getSuggestionsFragment(query,suggestions);this.$lastSuggestion=$fragment.children().last();this.$el.html($fragment).prepend(this._getHeader(query,suggestions)).append(this._getFooter(query,suggestions));},_appendSuggestions:function appendSuggestions(query,suggestions){var $fragment,$lastSuggestion;$fragment=this._getSuggestionsFragment(query,suggestions);$lastSuggestion=$fragment.children().last();this.$lastSuggestion.after($fragment);this.$lastSuggestion=$lastSuggestion;},_renderPending:function renderPending(query){var template=this.templates.pending;this._resetLastSuggestion();template&&this.$el.html(template({query:query,dataset:this.name}));},_renderNotFound:function renderNotFound(query){var template=this.templates.notFound;this._resetLastSuggestion();template&&this.$el.html(template({query:query,dataset:this.name}));},_empty:function empty(){this.$el.empty();this._resetLastSuggestion();},_getSuggestionsFragment:function getSuggestionsFragment(query,suggestions){var that=this,fragment;fragment=document.createDocumentFragment();_.each(suggestions,function getSuggestionNode(suggestion){var $el,context;context=that._injectQuery(query,suggestion);$el=$(that.templates.suggestion(context)).data(keys.obj,suggestion).data(keys.val,that.displayFn(suggestion)).addClass(that.classes.suggestion+" "+that.classes.selectable);fragment.appendChild($el[0]);});this.highlight&&highlight({className:this.classes.highlight,node:fragment,pattern:query});return $(fragment);},_getFooter:function getFooter(query,suggestions){return this.templates.footer?this.templates.footer({query:query,suggestions:suggestions,dataset:this.name}):null;},_getHeader:function getHeader(query,suggestions){return this.templates.header?this.templates.header({query:query,suggestions:suggestions,dataset:this.name}):null;},_resetLastSuggestion:function resetLastSuggestion(){this.$lastSuggestion=$();},_injectQuery:function injectQuery(query,obj){return _.isObject(obj)?_.mixin({_query:query},obj):obj;},update:function update(query){var that=this,canceled=false,syncCalled=false,rendered=0;this.cancel();this.cancel=function cancel(){canceled=true;that.cancel=$.noop;that.async&&that.trigger("asyncCanceled",query);};this.source(query,sync,async);!syncCalled&&sync([]);function sync(suggestions){if(syncCalled){return;}
syncCalled=true;suggestions=(suggestions||[]).slice(0,that.limit);rendered=suggestions.length;that._overwrite(query,suggestions);if(rendered<that.limit&&that.async){that.trigger("asyncRequested",query);}}
function async(suggestions){suggestions=suggestions||[];if(!canceled&&rendered<that.limit){that.cancel=$.noop;rendered+=suggestions.length;that._append(query,suggestions.slice(0,that.limit-rendered));that.async&&that.trigger("asyncReceived",query);}}},cancel:$.noop,clear:function clear(){this._empty();this.cancel();this.trigger("cleared");},isEmpty:function isEmpty(){return this.$el.is(":empty");},destroy:function destroy(){this.$el=$("<div>");}});return Dataset;function getDisplayFn(display){display=display||_.stringify;return _.isFunction(display)?display:displayFn;function displayFn(obj){return obj[display];}}
function getTemplates(templates,displayFn){return{notFound:templates.notFound&&_.templatify(templates.notFound),pending:templates.pending&&_.templatify(templates.pending),header:templates.header&&_.templatify(templates.header),footer:templates.footer&&_.templatify(templates.footer),suggestion:templates.suggestion||suggestionTemplate};function suggestionTemplate(context){return $("<div>").text(displayFn(context));}}
function isValidName(str){return /^[_a-zA-Z0-9-]+$/.test(str);}}();var Menu=function(){"use strict";function Menu(o,www){var that=this;o=o||{};if(!o.node){$.error("node is required");}
www.mixin(this);this.$node=$(o.node);this.query=null;this.datasets=_.map(o.datasets,initializeDataset);function initializeDataset(oDataset){var node=that.$node.find(oDataset.node).first();oDataset.node=node.length?node:$("<div>").appendTo(that.$node);return new Dataset(oDataset,www);}}
_.mixin(Menu.prototype,EventEmitter,{_onSelectableClick:function onSelectableClick($e){this.trigger("selectableClicked",$($e.currentTarget));},_onRendered:function onRendered(type,dataset,suggestions,async){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty());this.trigger("datasetRendered",dataset,suggestions,async);},_onCleared:function onCleared(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty());this.trigger("datasetCleared");},_propagate:function propagate(){this.trigger.apply(this,arguments);},_allDatasetsEmpty:function allDatasetsEmpty(){return _.every(this.datasets,isDatasetEmpty);function isDatasetEmpty(dataset){return dataset.isEmpty();}},_getSelectables:function getSelectables(){return this.$node.find(this.selectors.selectable);},_removeCursor:function _removeCursor(){var $selectable=this.getActiveSelectable();$selectable&&$selectable.removeClass(this.classes.cursor);},_ensureVisible:function ensureVisible($el){var elTop,elBottom,nodeScrollTop,nodeHeight;elTop=$el.position().top;elBottom=elTop+$el.outerHeight(true);nodeScrollTop=this.$node.scrollTop();nodeHeight=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10);if(elTop<0){this.$node.scrollTop(nodeScrollTop+elTop);}else if(nodeHeight<elBottom){this.$node.scrollTop(nodeScrollTop+(elBottom-nodeHeight));}},bind:function(){var that=this,onSelectableClick;onSelectableClick=_.bind(this._onSelectableClick,this);this.$node.on("click.tt",this.selectors.selectable,onSelectableClick);_.each(this.datasets,function(dataset){dataset.onSync("asyncRequested",that._propagate,that).onSync("asyncCanceled",that._propagate,that).onSync("asyncReceived",that._propagate,that).onSync("rendered",that._onRendered,that).onSync("cleared",that._onCleared,that);});return this;},isOpen:function isOpen(){return this.$node.hasClass(this.classes.open);},open:function open(){this.$node.addClass(this.classes.open);},close:function close(){this.$node.removeClass(this.classes.open);this._removeCursor();},setLanguageDirection:function setLanguageDirection(dir){this.$node.attr("dir",dir);},selectableRelativeToCursor:function selectableRelativeToCursor(delta){var $selectables,$oldCursor,oldIndex,newIndex;$oldCursor=this.getActiveSelectable();$selectables=this._getSelectables();oldIndex=$oldCursor?$selectables.index($oldCursor):-1;newIndex=oldIndex+delta;newIndex=(newIndex+1)%($selectables.length+1)-1;newIndex=newIndex<-1?$selectables.length-1:newIndex;return newIndex===-1?null:$selectables.eq(newIndex);},setCursor:function setCursor($selectable){this._removeCursor();if($selectable=$selectable&&$selectable.first()){$selectable.addClass(this.classes.cursor);this._ensureVisible($selectable);}},getSelectableData:function getSelectableData($el){return $el&&$el.length?Dataset.extractData($el):null;},getActiveSelectable:function getActiveSelectable(){var $selectable=this._getSelectables().filter(this.selectors.cursor).first();return $selectable.length?$selectable:null;},getTopSelectable:function getTopSelectable(){var $selectable=this._getSelectables().first();return $selectable.length?$selectable:null;},update:function update(query){var isValidUpdate=query!==this.query;if(isValidUpdate){this.query=query;_.each(this.datasets,updateDataset);}
return isValidUpdate;function updateDataset(dataset){dataset.update(query);}},empty:function empty(){_.each(this.datasets,clearDataset);this.query=null;this.$node.addClass(this.classes.empty);function clearDataset(dataset){dataset.clear();}},destroy:function destroy(){this.$node.off(".tt");this.$node=$("<div>");_.each(this.datasets,destroyDataset);function destroyDataset(dataset){dataset.destroy();}}});return Menu;}();var DefaultMenu=function(){"use strict";var s=Menu.prototype;function DefaultMenu(){Menu.apply(this,[].slice.call(arguments,0));}
_.mixin(DefaultMenu.prototype,Menu.prototype,{open:function open(){!this._allDatasetsEmpty()&&this._show();return s.open.apply(this,[].slice.call(arguments,0));},close:function close(){this._hide();return s.close.apply(this,[].slice.call(arguments,0));},_onRendered:function onRendered(){if(this._allDatasetsEmpty()){this._hide();}else{this.isOpen()&&this._show();}
return s._onRendered.apply(this,[].slice.call(arguments,0));},_onCleared:function onCleared(){if(this._allDatasetsEmpty()){this._hide();}else{this.isOpen()&&this._show();}
return s._onCleared.apply(this,[].slice.call(arguments,0));},setLanguageDirection:function setLanguageDirection(dir){this.$node.css(dir==="ltr"?this.css.ltr:this.css.rtl);return s.setLanguageDirection.apply(this,[].slice.call(arguments,0));},_hide:function hide(){this.$node.hide();},_show:function show(){this.$node.css("display","block");}});return DefaultMenu;}();var Typeahead=function(){"use strict";function Typeahead(o,www){var onFocused,onBlurred,onEnterKeyed,onTabKeyed,onEscKeyed,onUpKeyed,onDownKeyed,onLeftKeyed,onRightKeyed,onQueryChanged,onWhitespaceChanged;o=o||{};if(!o.input){$.error("missing input");}
if(!o.menu){$.error("missing menu");}
if(!o.eventBus){$.error("missing event bus");}
www.mixin(this);this.eventBus=o.eventBus;this.minLength=_.isNumber(o.minLength)?o.minLength:1;this.input=o.input;this.menu=o.menu;this.enabled=true;this.active=false;this.input.hasFocus()&&this.activate();this.dir=this.input.getLangDir();this._hacks();this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this);onFocused=c(this,"activate","open","_onFocused");onBlurred=c(this,"deactivate","_onBlurred");onEnterKeyed=c(this,"isActive","isOpen","_onEnterKeyed");onTabKeyed=c(this,"isActive","isOpen","_onTabKeyed");onEscKeyed=c(this,"isActive","_onEscKeyed");onUpKeyed=c(this,"isActive","open","_onUpKeyed");onDownKeyed=c(this,"isActive","open","_onDownKeyed");onLeftKeyed=c(this,"isActive","isOpen","_onLeftKeyed");onRightKeyed=c(this,"isActive","isOpen","_onRightKeyed");onQueryChanged=c(this,"_openIfActive","_onQueryChanged");onWhitespaceChanged=c(this,"_openIfActive","_onWhitespaceChanged");this.input.bind().onSync("focused",onFocused,this).onSync("blurred",onBlurred,this).onSync("enterKeyed",onEnterKeyed,this).onSync("tabKeyed",onTabKeyed,this).onSync("escKeyed",onEscKeyed,this).onSync("upKeyed",onUpKeyed,this).onSync("downKeyed",onDownKeyed,this).onSync("leftKeyed",onLeftKeyed,this).onSync("rightKeyed",onRightKeyed,this).onSync("queryChanged",onQueryChanged,this).onSync("whitespaceChanged",onWhitespaceChanged,this).onSync("langDirChanged",this._onLangDirChanged,this);}
_.mixin(Typeahead.prototype,{_hacks:function hacks(){var $input,$menu;$input=this.input.$input||$("<div>");$menu=this.menu.$node||$("<div>");$input.on("blur.tt",function($e){var active,isActive,hasActive;active=document.activeElement;isActive=$menu.is(active);hasActive=$menu.has(active).length>0;if(_.isMsie()&&(isActive||hasActive)){$e.preventDefault();$e.stopImmediatePropagation();_.defer(function(){$input.focus();});}});$menu.on("mousedown.tt",function($e){$e.preventDefault();});},_onSelectableClicked:function onSelectableClicked(type,$el){this.select($el);},_onDatasetCleared:function onDatasetCleared(){this._updateHint();},_onDatasetRendered:function onDatasetRendered(type,dataset,suggestions,async){this._updateHint();this.eventBus.trigger("render",suggestions,async,dataset);},_onAsyncRequested:function onAsyncRequested(type,dataset,query){this.eventBus.trigger("asyncrequest",query,dataset);},_onAsyncCanceled:function onAsyncCanceled(type,dataset,query){this.eventBus.trigger("asynccancel",query,dataset);},_onAsyncReceived:function onAsyncReceived(type,dataset,query){this.eventBus.trigger("asyncreceive",query,dataset);},_onFocused:function onFocused(){this._minLengthMet()&&this.menu.update(this.input.getQuery());},_onBlurred:function onBlurred(){if(this.input.hasQueryChangedSinceLastFocus()){this.eventBus.trigger("change",this.input.getQuery());}},_onEnterKeyed:function onEnterKeyed(type,$e){var $selectable;if($selectable=this.menu.getActiveSelectable()){this.select($selectable)&&$e.preventDefault();}},_onTabKeyed:function onTabKeyed(type,$e){var $selectable;if($selectable=this.menu.getActiveSelectable()){this.select($selectable)&&$e.preventDefault();}else if($selectable=this.menu.getTopSelectable()){this.autocomplete($selectable)&&$e.preventDefault();}},_onEscKeyed:function onEscKeyed(){this.close();},_onUpKeyed:function onUpKeyed(){this.moveCursor(-1);},_onDownKeyed:function onDownKeyed(){this.moveCursor(+1);},_onLeftKeyed:function onLeftKeyed(){if(this.dir==="rtl"&&this.input.isCursorAtEnd()){this.autocomplete(this.menu.getTopSelectable());}},_onRightKeyed:function onRightKeyed(){if(this.dir==="ltr"&&this.input.isCursorAtEnd()){this.autocomplete(this.menu.getTopSelectable());}},_onQueryChanged:function onQueryChanged(e,query){this._minLengthMet(query)?this.menu.update(query):this.menu.empty();},_onWhitespaceChanged:function onWhitespaceChanged(){this._updateHint();},_onLangDirChanged:function onLangDirChanged(e,dir){if(this.dir!==dir){this.dir=dir;this.menu.setLanguageDirection(dir);}},_openIfActive:function openIfActive(){this.isActive()&&this.open();},_minLengthMet:function minLengthMet(query){query=_.isString(query)?query:this.input.getQuery()||"";return query.length>=this.minLength;},_updateHint:function updateHint(){var $selectable,data,val,query,escapedQuery,frontMatchRegEx,match;$selectable=this.menu.getTopSelectable();data=this.menu.getSelectableData($selectable);val=this.input.getInputValue();if(data&&!_.isBlankString(val)&&!this.input.hasOverflow()){query=Input.normalizeQuery(val);escapedQuery=_.escapeRegExChars(query);frontMatchRegEx=new RegExp("^(?:"+escapedQuery+")(.+$)","i");match=frontMatchRegEx.exec(data.val);match&&this.input.setHint(val+match[1]);}else{this.input.clearHint();}},isEnabled:function isEnabled(){return this.enabled;},enable:function enable(){this.enabled=true;},disable:function disable(){this.enabled=false;},isActive:function isActive(){return this.active;},activate:function activate(){if(this.isActive()){return true;}else if(!this.isEnabled()||this.eventBus.before("active")){return false;}else{this.active=true;this.eventBus.trigger("active");return true;}},deactivate:function deactivate(){if(!this.isActive()){return true;}else if(this.eventBus.before("idle")){return false;}else{this.active=false;this.close();this.eventBus.trigger("idle");return true;}},isOpen:function isOpen(){return this.menu.isOpen();},open:function open(){if(!this.isOpen()&&!this.eventBus.before("open")){this.menu.open();this._updateHint();this.eventBus.trigger("open");}
return this.isOpen();},close:function close(){if(this.isOpen()&&!this.eventBus.before("close")){this.menu.close();this.input.clearHint();this.input.resetInputValue();this.eventBus.trigger("close");}
return!this.isOpen();},setVal:function setVal(val){this.input.setQuery(_.toStr(val));},getVal:function getVal(){return this.input.getQuery();},select:function select($selectable){var data=this.menu.getSelectableData($selectable);if(data&&!this.eventBus.before("select",data.obj)){this.input.setQuery(data.val,true);this.eventBus.trigger("select",data.obj);this.close();return true;}
return false;},autocomplete:function autocomplete($selectable){var query,data,isValid;query=this.input.getQuery();data=this.menu.getSelectableData($selectable);isValid=data&&query!==data.val;if(isValid&&!this.eventBus.before("autocomplete",data.obj)){this.input.setQuery(data.val);this.eventBus.trigger("autocomplete",data.obj);return true;}
return false;},moveCursor:function moveCursor(delta){var query,$candidate,data,payload,cancelMove;query=this.input.getQuery();$candidate=this.menu.selectableRelativeToCursor(delta);data=this.menu.getSelectableData($candidate);payload=data?data.obj:null;cancelMove=this._minLengthMet()&&this.menu.update(query);if(!cancelMove&&!this.eventBus.before("cursorchange",payload)){this.menu.setCursor($candidate);if(data){this.input.setInputValue(data.val);}else{this.input.resetInputValue();this._updateHint();}
this.eventBus.trigger("cursorchange",payload);return true;}
return false;},destroy:function destroy(){this.input.destroy();this.menu.destroy();}});return Typeahead;function c(ctx){var methods=[].slice.call(arguments,1);return function(){var args=[].slice.call(arguments);_.each(methods,function(method){return ctx[method].apply(ctx,args);});};}}();(function(){"use strict";var old,keys,methods;old=$.fn.typeahead;keys={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"};methods={initialize:function initialize(o,datasets){var www;datasets=_.isArray(datasets)?datasets:[].slice.call(arguments,1);o=o||{};www=WWW(o.classNames);return this.each(attach);function attach(){var $input,$wrapper,$hint,$menu,defaultHint,defaultMenu,eventBus,input,menu,typeahead,MenuConstructor;_.each(datasets,function(d){d.highlight=!!o.highlight;});$input=$(this);$wrapper=$(www.html.wrapper);$hint=$elOrNull(o.hint);$menu=$elOrNull(o.menu);defaultHint=o.hint!==false&&!$hint;defaultMenu=o.menu!==false&&!$menu;defaultHint&&($hint=buildHintFromInput($input,www));defaultMenu&&($menu=$(www.html.menu).css(www.css.menu));$hint&&$hint.val("");$input=prepInput($input,www);if(defaultHint||defaultMenu){$wrapper.css(www.css.wrapper);$input.css(defaultHint?www.css.input:www.css.inputWithNoHint);$input.wrap($wrapper).parent().prepend(defaultHint?$hint:null).append(defaultMenu?$menu:null);}
MenuConstructor=defaultMenu?DefaultMenu:Menu;eventBus=new EventBus({el:$input});input=new Input({hint:$hint,input:$input},www);menu=new MenuConstructor({node:$menu,datasets:datasets},www);typeahead=new Typeahead({input:input,menu:menu,eventBus:eventBus,minLength:o.minLength},www);$input.data(keys.www,www);$input.data(keys.typeahead,typeahead);}},isEnabled:function isEnabled(){var enabled;ttEach(this.first(),function(t){enabled=t.isEnabled();});return enabled;},enable:function enable(){ttEach(this,function(t){t.enable();});return this;},disable:function disable(){ttEach(this,function(t){t.disable();});return this;},isActive:function isActive(){var active;ttEach(this.first(),function(t){active=t.isActive();});return active;},activate:function activate(){ttEach(this,function(t){t.activate();});return this;},deactivate:function deactivate(){ttEach(this,function(t){t.deactivate();});return this;},isOpen:function isOpen(){var open;ttEach(this.first(),function(t){open=t.isOpen();});return open;},open:function open(){ttEach(this,function(t){t.open();});return this;},close:function close(){ttEach(this,function(t){t.close();});return this;},select:function select(el){var success=false,$el=$(el);ttEach(this.first(),function(t){success=t.select($el);});return success;},autocomplete:function autocomplete(el){var success=false,$el=$(el);ttEach(this.first(),function(t){success=t.autocomplete($el);});return success;},moveCursor:function moveCursoe(delta){var success=false;ttEach(this.first(),function(t){success=t.moveCursor(delta);});return success;},val:function val(newVal){var query;if(!arguments.length){ttEach(this.first(),function(t){query=t.getVal();});return query;}else{ttEach(this,function(t){t.setVal(newVal);});return this;}},destroy:function destroy(){ttEach(this,function(typeahead,$input){revert($input);typeahead.destroy();});return this;}};$.fn.typeahead=function(method){if(methods[method]){return methods[method].apply(this,[].slice.call(arguments,1));}else{return methods.initialize.apply(this,arguments);}};$.fn.typeahead.noConflict=function noConflict(){$.fn.typeahead=old;return this;};function ttEach($els,fn){$els.each(function(){var $input=$(this),typeahead;(typeahead=$input.data(keys.typeahead))&&fn(typeahead,$input);});}
function buildHintFromInput($input,www){return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop("readonly",true).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1});}
function prepInput($input,www){$input.data(keys.attrs,{dir:$input.attr("dir"),autocomplete:$input.attr("autocomplete"),spellcheck:$input.attr("spellcheck"),style:$input.attr("style")});$input.addClass(www.classes.input).attr({autocomplete:"off",spellcheck:false});try{!$input.attr("dir")&&$input.attr("dir","auto");}catch(e){}
return $input;}
function getBackgroundStyles($el){return{backgroundAttachment:$el.css("background-attachment"),backgroundClip:$el.css("background-clip"),backgroundColor:$el.css("background-color"),backgroundImage:$el.css("background-image"),backgroundOrigin:$el.css("background-origin"),backgroundPosition:$el.css("background-position"),backgroundRepeat:$el.css("background-repeat"),backgroundSize:$el.css("background-size")};}
function revert($input){var www,$wrapper;www=$input.data(keys.www);$wrapper=$input.parent().filter(www.selectors.wrapper);_.each($input.data(keys.attrs),function(val,key){_.isUndefined(val)?$input.removeAttr(key):$input.attr(key,val);});$input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input);if($wrapper.length){$input.detach().insertAfter($wrapper);$wrapper.remove();}}
function $elOrNull(obj){var isValid,$el;isValid=_.isJQuery(obj)||_.isElement(obj);$el=isValid?$(obj).first():[];return $el.length?$el:null;}})();});;;
const getQueryParams=(params,url)=>{let href=url;let regexp=new RegExp('[?&]'+params+'=([^&#]*)','i');let qString=regexp.exec(href);return qString?qString[1]:"";};function removeHash(){var scrollV,scrollH,loc=window.location;if("pushState" in history)
history.replaceState("",document.title,loc.pathname+loc.search);else{scrollV=document.body.scrollTop;scrollH=document.body.scrollLeft;loc.hash="";document.body.scrollTop=scrollV;document.body.scrollLeft=scrollH;}};;
$(document).ready(function(){var locations={url:'/Umbraco/Api/LocationsApi/Locations',prepare:function(query,settings){settings.url+='?q='+query;return settings;},filter:function(data){return $.map(data,function(obj){return{Id:obj.id,Value:obj.name};});}};var taSource=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace('Value'),queryTokenizer:Bloodhound.tokenizers.whitespace,identify:function(obj){return obj.Value;},remote:locations});taSource.initialize(true);$('#SearchInput').typeahead({hint:true,highlight:true,minLength:3},{name:'myMatches',source:taSource,display:'Value',limit:15}).on("typeahead:selected",function(e,datum){$("input[name='SearchInputId']").val(datum.Id);});$('.search-input').keypress(function(e){var p=e.which;if(p==13){}});});;;
$(document).ready(function(){function addScriptTag(src,callback){if(document.querySelector('script[src="'+src+'"]')===null){const head=document.getElementsByTagName('body')[0]
const script=document.createElement('script')
script.type='text/javascript'
script.onload=()=>callback()
script.src=src
head.appendChild(script)}else{callback()}}
const sr_type="reservations";const $links=$('a[href^="https://www.sevenrooms.com/reservations/"][id]:not(.no-popup)')
function callback(){$links.each(function(){$(this).click(function(e){e.preventDefault()})
let restaurantVenueId="";let restaurantOtherVenueIds="";const restaurantTriggerId=$(this).attr('id');if(restaurantVenueId.length==0){var urlParts=$(this).attr('href').split("?")[0].split("/");if(urlParts.length>0){restaurantVenueId=urlParts[urlParts.length-1];restaurantOtherVenueIds=getQueryParams("venues",$(this).attr('href'));}}
if(restaurantVenueId.length>0){var sr_othervenueArray=null;if(restaurantVenueId.length){sr_othervenueArray=restaurantVenueId.split(',');sr_othervenueArray.splice(0,0,restaurantVenueId);}
$(this).addClass('sr-sm sr-#324654');SevenroomsWidget.init({venueId:restaurantVenueId,triggerId:restaurantTriggerId,type:sr_type,styleButton:false,clientToken:"",allVenues:restaurantOtherVenueIds});}});}
if($links.length>0){addScriptTag('https://www.sevenrooms.com/widget/embed.js',callback)}});;;
function setCookie(cname,cvalue,exdays){var d=new Date();d.setTime(d.getTime()+(exdays*24*60*60*1000));var expires="expires="+d.toUTCString();document.cookie=cname+"="+cvalue+";"+expires+";secure;path=/";}
function getCookie(cname){var name=cname+"=";var decodedCookie=decodeURIComponent(document.cookie);var ca=decodedCookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' '){c=c.substring(1);}
if(c.indexOf(name)==0){return c.substring(name.length,c.length);}}
return"";};;
$(document).ready(function(){let openTableWidgetTriggers=$('a[href^="https://www.opentable.com/"][data-booking-id]')
function addScriptTag(src,callback){if(document.querySelector('script[src="'+src+'"]')===null){const head=document.getElementsByTagName('body')[0]
const script=document.createElement('script')
script.type='text/javascript'
script.onload=()=>callback()
script.src=src
head.appendChild(script)}else{callback()}}
if(openTableWidgetTriggers.length>0){let ids=[]
openTableWidgetTriggers.each(function(){ids.push($(this).data('booking-id'))})
let widgetAdded=false
let openTableWidget=null
ids=[...new Set(ids.map((x)=>x))]
addScriptTag(`//www.opentable.com/widget/reservation/loader?rid=${ids.join(',')}&type=standard&theme=standard&iframe=true&domain=com&lang=en-US&newtab=false&ot_source=Restaurant%20website`,function(){widgetAdded=true})
function checkForWidget(){if(widgetAdded===false){return false}
if(openTableWidget!==null&&openTableWidget.length>0){return true}
openTableWidget=$('[id^="ot-widget-container"]')
openTableWidget.click(function(e){if(checkForWidget()&&openTableWidget.hasClass('active')){openTableWidget.removeClass('active')}})
return openTableWidget.length>0}
openTableWidgetTriggers.click(function(e){if(checkForWidget()){e.preventDefault()
openTableWidget.addClass('active')}})
$(document).keydown(function(e){if(e.keyCode==27&&checkForWidget()&&openTableWidget.hasClass('active')){openTableWidget.removeClass('active')}})}});;;
function geo(){let area=null
function find(code){code=code==='United Kingdom'?'GB':code
return areas.find(x=>x.CountryCodes.find(s=>s===code))}
function request(resolve,reject){const loc=getCookie('location');if(loc==''){$.getJSON('https://ipv4.jsonip.com/?callback=?',function(ipLookup){if(ipLookup.ip.length){$.getJSON('/umbraco/api/locationsapi/countrycode/?ip='+ipLookup.ip,function(locationLookup){area=find(locationLookup.country_code)
if(area){setCookie('location',locationLookup.country_code,1)
resolve(area)}else{reject('Area not found')}})}else{reject('IP not found')}})}else{area=find(loc)
if(area){resolve(area)}else{reject('Area not found')}}}
return new Promise((resolve,reject)=>{if(area){resolve(area);}else{request(resolve,reject)}});};;
$(document).ready(function(){var coverManagerBookingEngineInitalised=false;if(!coverManagerBookingEngineInitalised){initaliseCoverManagerBookingEngine(false);}
$('a[href*="www.covermanager.com"]').on('click',function(e){if(e.target.id){e.preventDefault();var targetHref=e.target.href.replace(new RegExp('.*'+'www.covermanager.com/'),'').split('/');;if(targetHref.length>0){const restaurant=targetHref[2];showmodalcover(restaurant);}}});$('.nav-book-link a[href^="https://www.covermanager.com"]').each(function(e){$(this).attr('id',"CMBookATable");if(location.hash.substr(1)=="booknow"){if(document.getElementById('CMBookATable')){removeHash();$('#CMBookATable')[0].click(function(r){});}}});});function initaliseCoverManagerBookingEngine(openBookingEngineOnLoad){var coverManagerLinks=$('a[href*="www.covermanager.com"]');if(coverManagerLinks.length>0){for(var i=0;i<coverManagerLinks.length;i++){var coverManagerLink=coverManagerLinks[i];var coverManagerLinksHref=coverManagerLink.href;let coverManagerLinksHrefUrlPath=coverManagerLinksHref.replace(new RegExp('.*'+'www.covermanager.com/'),'').split('/');if(coverManagerLinksHrefUrlPath.length>0){const type=coverManagerLinksHrefUrlPath[0];const restaurant=coverManagerLinksHrefUrlPath[2];const language=coverManagerLinksHrefUrlPath[3];var restId="cover_"+restaurant;var restElement=document.getElementById(restId);if(!restElement){$('#main-content').append('<div id="'+restId+'"></div>');module_restaurant(restaurant,language,type,'#028a78');$.getScript("https://www.covermanager.com/js/iframeResizer.min.js",function(data,textStatus,jqxhr){if(textStatus=='success'){setTimeout(function(){iFrameResize();},250);}});if(openBookingEngineOnLoad){setTimeout(function(){showmodalcover(restaurant);},1000);}}}}}}
function module_restaurant(restaurant,language,textbutton,color_button){var cover=document.getElementById("cover_"+restaurant);var div_first_cover=document.createElement("div");div_first_cover.setAttribute("id","div_first_cover_"+restaurant);div_first_cover.setAttribute("style","bottom: 0px; left: 0px; position: fixed; overflow-y:auto; right: 0px; top: 0px; z-index: 999999; display: none;");var div_second_modal_cover=document.createElement("div");div_second_modal_cover.setAttribute("id","div_second_modal_cover_"+restaurant);div_second_modal_cover.setAttribute("style","margin: 40px auto 10px; position: relative; max-width: 992px; opacity: 1; transform: translate3d(0px, 0px, 0px); display: none;");var div_second_cover=document.createElement("div");div_second_cover.setAttribute("id","div_second_cover_"+restaurant);div_second_cover.setAttribute("style","background: #404040eb;left: 0px;min-height: 100%;opacity: 1;position: absolute;right: 0px;top: 0px;");div_second_cover.setAttribute("onClick","closemodalcover('"+restaurant+"')");var button_close_cover=document.createElement("div");button_close_cover.setAttribute("id","button_close_cover_"+restaurant);button_close_cover.setAttribute("style","color: white; cursor: pointer; font-family: Helvetica; font-size: 45px; font-weight: 220; line-height: 48px; position: absolute; left: 100px; top: -45px;");button_close_cover.setAttribute("onClick","closemodalcover('"+restaurant+"')");var button_open_cover=document.createElement("input");button_open_cover.setAttribute("id","button_open_cover_"+restaurant);button_open_cover.setAttribute("type","button");button_open_cover.setAttribute("value",textbutton);button_open_cover.setAttribute("onClick","showmodalcover('"+restaurant+"')");button_open_cover.setAttribute("style","position: static; display: block; width: 200px; height: 34px; padding:6px 12px; font-size:14px; line-height:1.42857143; cursor: pointer; -webkit-appearance: button; font-weight: 400; letter-spacing: 1px; text-transform: uppercase;     border-radius: 0; box-shadow: none;     border: none; background: "+color_button+" !important; color: #ffffff; margin: auto;");cover.insertBefore(div_first_cover,cover.childNodes[0]);cover.insertBefore(button_open_cover,cover.childNodes[0]);div_first_cover.insertBefore(div_second_modal_cover,div_first_cover.childNodes[0]);div_first_cover.insertBefore(div_second_cover,div_first_cover.childNodes[0]);var iframe_cover=document.createElement('iframe');iframe_cover.frameBorder=0;iframe_cover.width="100%";iframe_cover.scrolling="no";iframe_cover.setAttribute("src",'https://www.covermanager.com/reserve/module_restaurant/'+restaurant+'/'+language+'/');div_second_modal_cover.insertBefore(button_close_cover,div_second_modal_cover.childNodes[0]);div_second_modal_cover.insertBefore(iframe_cover,div_second_modal_cover.childNodes[0]);document.getElementById('button_close_cover_'+restaurant).innerHTML='x';onElementHeightChange(document.getElementById('div_second_modal_cover_'+restaurant),function(){if(document.getElementById('div_second_modal_cover_'+restaurant).clientHeight+100>document.getElementById('div_second_cover_'+restaurant).clientHeight){document.getElementById('div_second_cover_'+restaurant).style.height=document.getElementById('div_second_modal_cover_'+restaurant).clientHeight+80+'px';}});}
function showmodalcover(restaurant){var dialog=document.getElementById("div_first_cover_"+restaurant);dialog.style.display='initial';var dialog2=document.getElementById("div_second_modal_cover_"+restaurant);dialog2.style.display='block';if(typeof ga==="undefined"){}else{setTimeout(function(){ga(function(tracker){var clientId=tracker.get('clientId');var frameWindow=document.getElementById('iFrameResizer0').contentWindow;frameWindow.postMessage(clientId,'*');console.log('enviamos');console.log(clientId);});},5000);}}
function closemodalcover(restaurant){var dialog=document.getElementById("div_first_cover_"+restaurant);dialog.style.display='none';var dialog2=document.getElementById("div_second_modal_cover_"+restaurant);dialog2.style.display='none';}
function onElementHeightChange(elm,callback){var lastHeight=elm.clientHeight,newHeight;(function run(){newHeight=elm.clientHeight;if(lastHeight!=newHeight)
callback();lastHeight=newHeight;if(elm.onElementHeightChangeTimer)
clearTimeout(elm.onElementHeightChangeTimer);elm.onElementHeightChangeTimer=setTimeout(run,200);})();};;
$(document).ready(function(){const links=$('a[href^="https://book.chope.co/"],a[href^="https://cho.pe/"]')
if(links.length>0){links.on('click',function(e){if(e.target){e.preventDefault()
open(e.target.href)}})
$(document).keydown(function(e){if(e.keyCode=='27'){close($('.chope-modal')[0])}})}})
function open(src){const modal=document.createElement('div')
modal.setAttribute('class','modal modal-active chope-modal')
const mw=document.createElement('div')
mw.setAttribute('class','mw')
const button=document.createElement('button')
button.setAttribute('type','button')
button.setAttribute('class','modal-exit')
button.setAttribute('title','Exit')
button.addEventListener('click',function(e){e.preventDefault()
close(modal)})
mw.appendChild(button)
const iframe=document.createElement('iframe')
iframe.setAttribute('src',src)
mw.appendChild(iframe)
modal.appendChild(mw)
document.body.appendChild(modal)}
function close(modal){modal?.remove()};;
