function ClusterIcon(t,e){t.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView),this.cluster_=t,this.className_=t.getMarkerClusterer().getClusterClass(),this.styles_=e,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(t.getMap())}function Cluster(t){this.markerClusterer_=t,this.map_=t.getMap(),this.gridSize_=t.getGridSize(),this.minClusterSize_=t.getMinimumClusterSize(),this.averageCenter_=t.getAverageCenter(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new ClusterIcon(this,t.getStyles())}function MarkerClusterer(t,e,n){this.extend(MarkerClusterer,google.maps.OverlayView),e=e||[],n=n||{},this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=n.gridSize||60,this.minClusterSize_=n.minimumClusterSize||2,this.maxZoom_=n.maxZoom||null,this.styles_=n.styles||[],this.title_=n.title||"",this.zoomOnClick_=!0,void 0!==n.zoomOnClick&&(this.zoomOnClick_=n.zoomOnClick),this.averageCenter_=!1,void 0!==n.averageCenter&&(this.averageCenter_=n.averageCenter),this.ignoreHidden_=!1,void 0!==n.ignoreHidden&&(this.ignoreHidden_=n.ignoreHidden),this.enableRetinaIcons_=!1,void 0!==n.enableRetinaIcons&&(this.enableRetinaIcons_=n.enableRetinaIcons),this.imagePath_=n.imagePath||MarkerClusterer.IMAGE_PATH,this.imageExtension_=n.imageExtension||MarkerClusterer.IMAGE_EXTENSION,this.imageSizes_=n.imageSizes||MarkerClusterer.IMAGE_SIZES,this.calculator_=n.calculator||MarkerClusterer.CALCULATOR,this.batchSize_=n.batchSize||MarkerClusterer.BATCH_SIZE,this.batchSizeIE_=n.batchSizeIE||MarkerClusterer.BATCH_SIZE_IE,this.clusterClass_=n.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(e,!0),this.setMap(t)}function toNumber(t){if("number"==typeof t)return t;if(isSymbol(t))return NAN;if(isObject(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=isObject(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(reTrim,"");var n=reIsBinary.test(t);return n||reIsOctal.test(t)?freeParseInt(t.slice(2),n?2:8):reIsBadHex.test(t)?NAN:+t}function isObject(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function debounce(t,e,n){function i(e){var n=h,i=p;return h=p=void 0,b=e,m=t.apply(i,n)}function o(t){return b=t,g=setTimeout(s,e),w?i(t):m}function r(t){var n=e-(t-v);return x?_(n,f-(t-b)):n}function a(t){var n=t-v;return void 0===v||n>=e||n<0||x&&t-b>=f}function s(){var t=now();if(a(t))return l(t);g=setTimeout(s,r(t))}function l(t){return g=void 0,k&&h?i(t):(h=p=void 0,m)}function c(){void 0!==g&&clearTimeout(g),b=0,h=v=p=g=void 0}function u(){return void 0===g?m:l(now())}function d(){var t=now(),n=a(t);if(h=arguments,p=this,v=t,n){if(void 0===g)return o(v);if(x)return g=setTimeout(s,e),i(v)}return void 0===g&&(g=setTimeout(s,e)),m}var h,p,f,m,g,v,y=Math.max,_=Math.min,b=0,w=!1,x=!1,k=!0;if("function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);return e=toNumber(e)||0,isObject(n)&&(w=!!n.leading,f=(x="maxWait"in n)?y(toNumber(n.maxWait)||0,e):f,k="trailing"in n?!!n.trailing:k),d.cancel=c,d.flush=u,d}function throttle(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);return isObject(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),debounce(t,e,{leading:i,maxWait:e,trailing:o})}function Atropos(){_animate(),_superslide(),_owl_carousel(),_popover(),_lightbox(),_scrollTo(),_parallax(),_toggle(),_bgimage(),_globalSearch(),_quickCart(),_placeholder(),_htmlEditor(),_mixitup(),jQuery("a[data-toggle=tooltip]").tooltip(),jQuery(".fullwidthbanner iframe").length<1&&jQuery(".fullscreenbanner iframe").length<1&&jQuery(".fullscreenvideo").length<1&&jQuery("body").fitVids(),jQuery().slider&&jQuery(".price-slider").length>0&&jQuery("#Slider2").slider(slider_config),jQuery(document).bind("click",(function(){jQuery("div.navbar-collapse").hasClass("in")&&jQuery("button.btn-mobile").trigger("click")}))}function loadScript(t,e){if(_arr[t])e&&e();else{_arr[t]=!0;var n=document.getElementsByTagName("body")[0],i=document.createElement("script");i.type="text/javascript",i.src=t,i.onload=e,n.appendChild(i)}}function _animate(){jQuery("[data-animation]").each((function(){var t=jQuery(this);jQuery(window).width()>767?t.appear((function(){var e=t.attr("data-animation-delay")?t.attr("data-animation-delay"):1;e>1&&t.css("animation-delay",e+"ms"),t.addClass(t.attr("data-animation")),setTimeout((function(){t.addClass("animation-visible")}),e)}),{accX:0,accY:-150}):t.addClass("animation-visible")})),jQuery(".countTo [data-to]").each((function(){var t=jQuery(this);t.appear((function(){t.countTo()}),{accX:0,accY:-150})})),jQuery().knob&&jQuery(".knob").knob(),jQuery(".animate_from_top").each((function(){jQuery(this).appear((function(){jQuery(this).delay(150).animate({opacity:1,top:"0px"},1e3)}))})),jQuery(".animate_from_bottom").each((function(){jQuery(this).appear((function(){jQuery(this).delay(150).animate({opacity:1,bottom:"0px"},1e3)}))})),jQuery(".animate_from_left").each((function(){jQuery(this).appear((function(){jQuery(this).delay(150).animate({opacity:1,left:"0px"},1e3)}))})),jQuery(".animate_from_right").each((function(){jQuery(this).appear((function(){jQuery(this).delay(150).animate({opacity:1,right:"0px"},1e3)}))})),jQuery(".animate_fade_in").each((function(){jQuery(this).appear((function(){jQuery(this).delay(350).animate({opacity:1,right:"0px"},1e3)}))}))}function _superslide(){if(jQuery("#slider").length>0){var t=jQuery("#slider").attr("data-autoplay"),e=jQuery("#slider").attr("data-mouseover-stop");if(t)if(""==t)t=!1;else t=parseInt(t);else t=!1;t||(e=!1),jQuery("#slider").superslides({animation:"fade",pagination:!0,play:t,animation_speed:600,elements:{preserve:".preserve",nav:".slides-navigation",container:".slides-container",pagination:".slides-pagination"}}),"true"==e&&(jQuery("#slider").on("mouseenter",(function(){jQuery(this).superslides("stop")})),jQuery("#slider").on("mouseleave",(function(){jQuery(this).superslides("start")}))),jQuery(window).load((function(){jQuery("#slider").css({background:"none"})}))}}function _owl_carousel(){jQuery("div.owl-carousel").length;jQuery("div.owl-carousel").each((function(){var t=jQuery(this),e=t.attr("data-plugin-options"),n={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[980,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!0,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1e3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:['<i class="fa fa-chevron-left"></i>','<i class="fa fa-chevron-right"></i>'],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:window,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,transitionStyle:!1,addClassActive:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1},i=jQuery.extend({},n,e,t.data("plugin-options"));t.owlCarousel(i).addClass("owl-carousel-init")}))}function _popover(){jQuery("a[data-toggle=popover]").bind("click",(function(t){jQuery(".popover-title .close").remove(),t.preventDefault()}));var t=!1,e=!1;jQuery("a[data-toggle=popover], button[data-toggle=popover]").popover({html:!0,trigger:"manual"}).click((function(n){jQuery(this).popover("show"),e=!1,t=!0,n.preventDefault()})),jQuery(document).click((function(){t&e?(jQuery("a[data-toggle=popover], button[data-toggle=popover]").popover("hide"),t=e=!1):e=!0})),jQuery("a[data-toggle=popover], button[data-toggle=popover]").popover({html:!0,trigger:"manual"}).click((function(t){$(this).popover("show"),$(".popover-title").append('<button type="button" class="close">&times;</button>'),$(".close").click((function(){jQuery("a[data-toggle=popover], button[data-toggle=popover]").popover("hide")})),t.preventDefault()}))}function _lightbox(){if(void 0===jQuery.magnificPopup)return!1;jQuery.extend(!0,jQuery.magnificPopup.defaults,{tClose:"Close",tLoading:"Loading...",gallery:{tPrev:"Previous",tNext:"Next",tCounter:"%curr% / %total%"},image:{tError:"Image not loaded!"},ajax:{tError:"Content not loaded!"}}),jQuery(".lightbox").each((function(){var t=jQuery(this),e=t.attr("data-plugin-options"),n={},i={type:"image",fixedContentPos:!1,fixedBgPos:!1,mainClass:"mfp-no-margins mfp-with-zoom",image:{verticalFit:!0},zoom:{enabled:!1,duration:300},gallery:{enabled:!1,navigateByImgClick:!0,preload:[0,1],arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',tPrev:"Previou",tNext:"Next",tCounter:'<span class="mfp-counter">%curr% / %total%</span>'}};t.data("plugin-options")&&(n=jQuery.extend({},i,e,t.data("plugin-options"))),jQuery(this).magnificPopup(n)}))}function _scrollTo(){jQuery("a.scrollTo").bind("click",(function(t){t.preventDefault();var e=jQuery(this).attr("href");"#"!=e&&jQuery("html,body").animate({scrollTop:jQuery(e).offset().top-60},1e3,"easeInOutExpo")})),jQuery("a.toTop").bind("click",(function(t){t.preventDefault(),jQuery("html,body").animate({scrollTop:0},1e3,"easeInOutExpo")}))}function _parallax(){if(void 0===jQuery.stellar)return jQuery(".parallax").addClass("parallax-init"),!1;jQuery(window).load((function(){jQuery(".parallax").length>0&&(Modernizr.touch?jQuery(".parallax").addClass("disabled"):jQuery(window).stellar({responsive:!0,scrollProperty:"scroll",parallaxElements:!1,horizontalScrolling:!1,horizontalOffset:0,verticalOffset:0})),jQuery(".parallax").addClass("parallax-init"),jQuery(window).afterResize((function(){jQuery.stellar("refresh")}))}))}function _toggle(){var t=25;jQuery("div.toggle.active > p").addClass("preview-active"),jQuery("div.toggle.active > div.toggle-content").slideDown(400),jQuery("div.toggle > label").click((function(e){var n=jQuery(this).parent(),i=jQuery(this).parents("div.toogle"),o=!1;if(i.hasClass("toogle-accordion")&&void 0!==e.originalEvent&&i.find("div.toggle.active > label").trigger("click"),n.toggleClass("active"),n.find("> p").get(0)){var r=(o=n.find("> p")).css("height"),a=o.css("height");o.css("height","auto"),o.css("height",r)}var s=n.find("> div.toggle-content");n.hasClass("active")?(jQuery(o).animate({height:a},350,(function(){jQuery(this).addClass("preview-active")})),s.slideDown(350)):(jQuery(o).animate({height:t},350,(function(){jQuery(this).removeClass("preview-active")})),s.slideUp(350))}))}function _bgimage(){function t(){var t=jQuery("body").attr("data-background");t&&(jQuery.backstretch(t),jQuery("body").addClass("transparent"))}jQuery("body").hasClass("boxed")&&t()}function _globalSearch(){jQuery("li.search, li.search input").bind("click",(function(t){t.stopPropagation()})),jQuery("li.search input").bind("click",(function(){return!1})),jQuery("li.search").bind("click",(function(){jQuery(this).hasClass("open")?(disable_overlay(),enable_scroll(),jQuery(this).removeClass("open")):(enable_overlay(),disable_scroll(),jQuery(this).addClass("open"),jQuery("li.quick-cart").removeClass("open"))})),jQuery(document).keydown((function(t){27==(t.keyCode?t.keyCode:t.which)&&(jQuery("li.search, li.quick-cart").removeClass("open"),disable_overlay(),enable_scroll())})),jQuery(document).bind("click",(function(){jQuery("li.search").hasClass("open")&&(jQuery("li.search, li.quick-cart").removeClass("open"),disable_overlay(),enable_scroll())}))}function _quickCart(){jQuery("li.quick-cart").bind("click",(function(){return jQuery("li.quick-cart .quick-cart-content").bind("click",(function(t){t.stopPropagation()})),jQuery(this).hasClass("open")?(disable_overlay(),enable_scroll(),jQuery(this).removeClass("open")):(enable_overlay(),disable_scroll(),jQuery(this).addClass("open"),jQuery("li.search").removeClass("open")),!1})),jQuery(document).keydown((function(t){27==(t.keyCode?t.keyCode:t.which)&&(jQuery("li.search, li.quick-cart").removeClass("open"),disable_overlay(),enable_scroll())})),jQuery(document).bind("click",(function(){jQuery("li.quick-cart").hasClass("open")&&(jQuery("li.search, li.quick-cart").removeClass("open"),disable_overlay(),enable_scroll())}))}function _placeholder(){-1!=navigator.appVersion.indexOf("MSIE")&&jQuery("[placeholder]").focus((function(){var t=jQuery(this);t.val()==t.attr("placeholder")&&(t.val(""),t.removeClass("placeholder"))})).blur((function(){var t=jQuery(this);""!=t.val()&&t.val()!=t.attr("placeholder")||(t.addClass("placeholder"),t.val(t.attr("placeholder")))})).blur()}function _htmlEditor(){jQuery("textarea.summernote").length>0&&jQuery().summernote&&jQuery("textarea.summernote").each((function(){jQuery(this).summernote({height:jQuery(this).attr("data-height")||200,toolbar:[["fontsize",["fontsize"]],["style",["bold","italic","underline","strikethrough","clear"]],["para",["ul","ol","paragraph"]],["table",["table"]],["media",["link","picture","video"]],["misc",["codeview"]]]})}))}function _mixitup(){var t=jQuery(".mix-grid");t.length>0&&loadScript(plugin_path+"mixitup/jquery.mixitup.min.js",(function(){jQuery().mixitup&&(t.mixitup(),jQuery("ul.mix-filter a").bind("click",(function(t){t.preventDefault()})))}))}function wheel(t){t.preventDefault()}function disable_scroll(){window.addEventListener&&window.addEventListener("DOMMouseScroll",wheel,!1),window.onmousewheel=document.onmousewheel=wheel}function enable_scroll(){window.removeEventListener&&window.removeEventListener("DOMMouseScroll",wheel,!1),window.onmousewheel=document.onmousewheel=document.onkeydown=null}function enable_overlay(){jQuery("span.global-overlay").remove(),jQuery("body").append('<span class="global-overlay"></span>')}function disable_overlay(){jQuery("span.global-overlay").remove()}function createCookie(t,e,n){var i;if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toGMTString()}else i="";document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+i+"; path=/"}function readCookie(t){for(var e=encodeURIComponent(t)+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(e))return decodeURIComponent(o.substring(e.length,o.length))}return null}function eraseCookie(t){createCookie(t,"",-1)}function scroll_to(t){var e=document.querySelector(t);if(!e)return null;var n=80,i=10,o=$(e).offset().top-n-i;$("html, body").animate({scrollTop:o},500)}function fetchScript(t,e,n){var i=document.createElement("script");e&&(i.readyState?i.onreadystatechange=function(){"loaded"!=i.readyState&&"complete"!=i.readyState||(i.onreadystatechange=null,e())}:i.onload=function(){e()}),i.async=!0,i.charset=n,i.type="application/javascript",i.src=t,document.head.appendChild(i)}function extract_and_parse(t){var e=extract_page_data(t);return e?JSON.parse(e):null}function extract_page_data(t){var e=document.querySelector('meta[name="'+t+'"]');return e?e.content:(console.error('No <meta name="'+t+'"> with data'),null)}function find_or_create_node(t,e,n){if(!t)throw new Error("`id` missing");if(!e)throw new Error("`tag_type` missing");if(!n)throw new Error("`parent` missing");var i=document.getElementById(t);if(i)return i;var o=document.createElement(e);return o.id=t,n.appendChild(o),o}function get_selected_option(t){if(!t)throw new Error("`select` missing");return $(t).find("option:selected")[0]}function insert_or_update_hidden_input(t,e,n){var i=t.querySelector('[name="'+e+'"]');if(!i){var o=document.createElement("input");o.type="hidden",o.name=e,t.prepend(o)}(i||o).value=n}function currency_symbol(){return document.querySelector('meta[name="currency"]').content}function formatted_price(t){return t+currency_symbol()}function date_ISO_to_human(t){if(!t)throw new Error("`date` was not passed");var e=t.split("-");if(3!=e.length)throw new Error("`date` is malformed");return[parseInt(e[2]),["\u044f\u043d\u0432\u0430\u0440\u044f","\u0444\u0435\u0432\u0440\u0430\u043b\u044f","\u043c\u0430\u0440\u0442\u0430","\u0430\u043f\u0440\u0435\u043b\u044f","\u043c\u0430\u044f","\u0438\u044e\u043d\u044f","\u0438\u044e\u043b\u044f","\u0430\u0432\u0433\u0443\u0441\u0442\u0430","\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f","\u043e\u043a\u0442\u044f\u0431\u0440\u044f","\u043d\u043e\u044f\u0431\u0440\u044f","\u0434\u0435\u043a\u0430\u0431\u0440\u044f"][parseInt(e[1])-1]].join("\xa0")}function destructure_db_time(t){return{date:t.substring(0,10),time:t.substring(11,16),tz:t.substring(23,29)}}function getAryFromLocalStorage(t){var e=localStorage.getItem(t);if(null!=e)var n=JSON.parse(e);else n=[];return n}function getTypo(){var t=window.getSelection();if(null!=t){var e,n,i,o,r=t.getRangeAt(0),a=r.toString(),s=80;return(i=document.createRange()).setStartBefore(r.startContainer.ownerDocument.body),i.setEnd(r.startContainer,r.startOffset),e=i.toString(),(o=document.createRange()).setStart(r.endContainer,r.endOffset),o.setEndAfter(r.endContainer.ownerDocument.body),n=o.toString(),{pre:e=e.slice(-s).replace(/[\s\n]+/gm," ").replace(/^[^\s]*\s+/,""),sel:a,post:n=n.slice(0,s).replace(/[\s\n]+/gm," ").replace(/\s+[^\s]*$/,"")}}alert("\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443 \u0432\u0430\u0441 \u043d\u0435\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440")}function is_CtrlEnter(t){return(t.ctrlKey||t.metaKey)&&(13==t.keyCode||10==t.keyCode)}function typo_report_url(t){var e=new URL(window.location.origin);return e.pathname="/typos/new",e.searchParams.set("ref",window.location.href),e.searchParams.set("post",t.post),e.searchParams.set("pre",t.pre),e.searchParams.set("sel",t.sel),e.href}function fetch_pre_filled_typo_modal(){var t=getTypo();t.sel.length>250?alert("\u0422\u0435\u043a\u0441\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u043f\u043e\u043c\u0435\u043d\u044c\u0448\u0435."):$.getScript(typo_report_url(t))}function get_locations_from_page(){var t=extract_and_parse("locations");return t||(console.error("Locations not found or could not be parsed"),null)}function get_map_center_from_page(){var t=extract_and_parse("map-center");return t?{latitude:t.latitude,longitude:t.longitude}:(console.error("Map center not found or could not be parsed"),null)}function get_map_zoom_from_page(){var t=extract_and_parse("map-zoom");return t||(console.error("Map zoom not found or could not be parsed"),null)}function get_map_provider_from_page(){var t=extract_page_data("map-provider");return t||(console.error("Map provider not found or could not be parsed"),null)}function load_lazy_balloon_image(){var t="lazy-map-item",e=document.getElementsByClassName(t);if(0==e.length)return console.warn("Could not find lazy image tag"),null;var n=e[0];n.src=n.dataset.original}function all_required_present(){return!!(document.getElementById(map_container_div_id)&&document.querySelector('meta[name="map-center"]')&&document.querySelector('meta[name="locations"]')&&document.querySelector('meta[name="map-provider"]'))}function tryToRenderAppropriateMap(t){console.log("Trying to load maps"),all_required_present()&&(console.log("All requirements met for map"),"Yandex"==get_map_provider_from_page()?fetchScript(YandexMapsAPIendpoint,(function(){ymaps.ready(renderYandexMap),t&&t()}),"utf-8"):fetchScript(GoogleMapsAPIendpoint,(function(){renderGoogleMap(),t&&t()}),"utf-8"))}function close_all_infoWindows(t){for(var e=0;e<t.length;e++)t[e].infoWindow.close()}function setup_MarkerClusterer(t,e){("undefined"==typeof $googlemap_clusterer||$googlemap_clusterer)&&e.length>0&&new MarkerClusterer(t,e,{imagePath:cluster_icon_path}).setMaxZoom(max_clusterization_zoom)}function buildMapObject(t,e){var n={zoom:e,center:new google.maps.LatLng(t.latitude,t.longitude),disableDefaultUI:!1,navigationControl:!1,scrollwheel:!1,panControl:!1,mapTypeControl:!1,scaleControl:!1,streetViewControl:!1,overviewMapControl:!1,zoomControl:!0,zoomControlOptions:{style:google.maps.ZoomControlStyle.LARGE,position:google.maps.ControlPosition.LEFT_CENTER},mapTypeId:google.maps.MapTypeId.ROADMAP};return new google.maps.Map(document.getElementById(map_container_div_id),n)}function create_marker(t,e){var n=new google.maps.Marker({map:t,position:new google.maps.LatLng(e.latitude,e.longitude),title:$("<div/>").html(e.name).text(),top:e.top});return void 0!==n.top&&n.top&&n.setZIndex(google.maps.Marker.MAX_ZINDEX+1),void 0!==e.icon&&""!=e.icon&&n.setIcon(e.icon),n}function add_infoWindow_to_marker(t,e,n){n.infoWindow=new google.maps.InfoWindow({content:e.content}),google.maps.event.addListener(n,"click",(function(){close_all_infoWindows(markers),this.infoWindow.open(t,this),load_lazy_balloon_image()}))}function add_popOver_to_marker(t,e,n){n.infoWindow=new google.maps.InfoWindow({content:"<div class='map-marker'><h4 class='map-marker__title'>"+e.name+"</h4></div>"}),google.maps.event.addListener(n,"mouseout",(function(){this.infoWindow.close()})),google.maps.event.addListener(n,"mouseover",(function(){this.infoWindow.open(t,this)})),void 0!==e.link&&(n.link=e.link,google.maps.event.addListener(n,"click",(function(){window.location=this.link,t.setCenter(this.getPosition())})))}function create_markers(t,e){var n,i=[];for(n=0;n<t.length;n++){var o=t[n],r=create_marker(e,o);i[n]=r,void 0!==o.content?add_infoWindow_to_marker(e,o,r,i):add_popOver_to_marker(e,o,r)}return i}function renderGoogleMap(){var t=get_map_center_from_page(),e=get_map_zoom_from_page()||default_map_zoom,n=get_locations_from_page(),i=buildMapObject(t,e);google.maps.event.trigger(i,"resize"),i.setZoom(i.getZoom()),markers=create_markers(n,i),google.maps.event.addListener(i,"click",(function(){close_all_infoWindows(markers)})),setup_MarkerClusterer(i,markers)}function js_show_order_info(t){$("#js-bonus-entry-order-info-"+t).show(),$("#js-button-hide-order-"+t).show(),$("#js-button-show-order-"+t).hide()}function js_hide_order_info(t){$("#js-bonus-entry-order-info-"+t).hide(),$("#js-button-show-order-"+t).show(),$("#js-button-hide-order-"+t).hide()}function js_show_phone(){$("#js-phone").show(),$("#js-show-phone-button").hide(),dataLayer.push({event:"clickOnShowQuestPhone"})}function try_opening_modal(t,e,n){if(""===t)throw new Error("A HTML ID of a modal must be passed");if(void 0===window.current_modal_id&&(window.current_modal_id=""),!window.current_modal_id){var i=document.getElementById(t);i?(window.current_modal_id=t,setTimeout((function(){$(i).modal("show"),n&&n()}),e)):console.error("A modal with HTML ID {} was requested but not found in page:",t)}}if(function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,(function(t,e){function n(t){var e=!!t&&"length"in t&&t.length,n=pt.type(t);return"function"!==n&&!pt.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function i(t,e,n){if(pt.isFunction(e))return pt.grep(t,(function(t,i){return!!e.call(t,i,t)!==n}));if(e.nodeType)return pt.grep(t,(function(t){return t===e!==n}));if("string"==typeof e){if(kt.test(e))return pt.filter(e,t,n);e=pt.filter(e,t)}return pt.grep(t,(function(t){return pt.inArray(t,e)>-1!==n}))}function o(t,e){do{t=t[e]}while(t&&1!==t.nodeType);return t}function r(t){var e={};return pt.each(t.match(jt)||[],(function(t,n){e[n]=!0})),e}function a(){it.addEventListener?(it.removeEventListener("DOMContentLoaded",s),t.removeEventListener("load",s)):(it.detachEvent("onreadystatechange",s),t.detachEvent("onload",s))}function s(){(it.addEventListener||"load"===t.event.type||"complete"===it.readyState)&&(a(),pt.ready())}function l(t,e,n){if(void 0===n&&1===t.nodeType){var i="data-"+e.replace(Ot,"-$1").toLowerCase();if("string"==typeof(n=t.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Pt.test(n)?pt.parseJSON(n):n)}catch(t){}pt.data(t,e,n)}else n=void 0}return n}function c(t){var e;for(e in t)if(("data"!==e||!pt.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function u(t,e,n,i){if(It(t)){var o,r,a=pt.expando,s=t.nodeType,l=s?pt.cache:t,c=s?t[a]:t[a]&&a;if(c&&l[c]&&(i||l[c].data)||void 0!==n||"string"!=typeof e)return c||(c=s?t[a]=nt.pop()||pt.guid++:a),l[c]||(l[c]=s?{}:{toJSON:pt.noop}),"object"!=typeof e&&"function"!=typeof e||(i?l[c]=pt.extend(l[c],e):l[c].data=pt.extend(l[c].data,e)),r=l[c],i||(r.data||(r.data={}),r=r.data),void 0!==n&&(r[pt.camelCase(e)]=n),"string"==typeof e?null==(o=r[e])&&(o=r[pt.camelCase(e)]):o=r,o}}function d(t,e,n){if(It(t)){var i,o,r=t.nodeType,a=r?pt.cache:t,s=r?t[pt.expando]:pt.expando;if(a[s]){if(e&&(i=n?a[s]:a[s].data)){o=(e=pt.isArray(e)?e.concat(pt.map(e,pt.camelCase)):e in i||(e=pt.camelCase(e))in i?[e]:e.split(" ")).length;for(;o--;)delete i[e[o]];if(n?!c(i):!pt.isEmptyObject(i))return}(n||(delete a[s].data,c(a[s])))&&(r?pt.cleanData([t],!0):dt.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function h(t,e,n,i){var o,r=1,a=20,s=i?function(){return i.cur()}:function(){return pt.css(t,e,"")},l=s(),c=n&&n[3]||(pt.cssNumber[e]?"":"px"),u=(pt.cssNumber[e]||"px"!==c&&+l)&&qt.exec(pt.css(t,e));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do{u/=r=r||".5",pt.style(t,e,u+c)}while(r!==(r=s()/l)&&1!==r&&--a)}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}function p(t){var e=Gt.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function f(t,e){var n,i,o=0,r=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):void 0;if(!r)for(r=[],n=t.childNodes||t;null!=(i=n[o]);o++)!e||pt.nodeName(i,e)?r.push(i):pt.merge(r,f(i,e));return void 0===e||e&&pt.nodeName(t,e)?pt.merge([t],r):r}function m(t,e){for(var n,i=0;null!=(n=t[i]);i++)pt._data(n,"globalEval",!e||pt._data(e[i],"globalEval"))}function g(t){zt.test(t.type)&&(t.defaultChecked=t.checked)}function v(t,e,n,i,o){for(var r,a,s,l,c,u,d,h=t.length,v=p(e),y=[],_=0;_<h;_++)if((a=t[_])||0===a)if("object"===pt.type(a))pt.merge(y,a.nodeType?[a]:a);else if(Xt.test(a)){for(l=l||v.appendChild(e.createElement("div")),c=(Wt.exec(a)||["",""])[1].toLowerCase(),d=Yt[c]||Yt._default,l.innerHTML=d[1]+pt.htmlPrefilter(a)+d[2],r=d[0];r--;)l=l.lastChild;if(!dt.leadingWhitespace&&Vt.test(a)&&y.push(e.createTextNode(Vt.exec(a)[0])),!dt.tbody)for(r=(a="table"!==c||Kt.test(a)?"<table>"!==d[1]||Kt.test(a)?0:l:l.firstChild)&&a.childNodes.length;r--;)pt.nodeName(u=a.childNodes[r],"tbody")&&!u.childNodes.length&&a.removeChild(u);for(pt.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else y.push(e.createTextNode(a));for(l&&v.removeChild(l),dt.appendChecked||pt.grep(f(y,"input"),g),_=0;a=y[_++];)if(i&&pt.inArray(a,i)>-1)o&&o.push(a);else if(s=pt.contains(a.ownerDocument,a),l=f(v.appendChild(a),"script"),s&&m(l),n)for(r=0;a=l[r++];)Qt.test(a.type||"")&&n.push(a);return l=null,v}function y(){return!0}function _(){return!1}function b(){try{return it.activeElement}catch(t){}}function w(t,e,n,i,o,r){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(i=i||n,n=void 0),e)w(t,s,n,i,e[s],r);return t}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=_;else if(!o)return t;return 1===r&&(a=o,o=function(t){return pt().off(t),a.apply(this,arguments)},o.guid=a.guid||(a.guid=pt.guid++)),t.each((function(){pt.event.add(this,e,o,i,n)}))}function x(t,e){return pt.nodeName(t,"table")&&pt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function k(t){return t.type=(null!==pt.find.attr(t,"type"))+"/"+t.type,t}function C(t){var e=le.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function S(t,e){if(1===e.nodeType&&pt.hasData(t)){var n,i,o,r=pt._data(t),a=pt._data(e,r),s=r.events;if(s)for(n in delete a.handle,a.events={},s)for(i=0,o=s[n].length;i<o;i++)pt.event.add(e,n,s[n][i]);a.data&&(a.data=pt.extend({},a.data))}}function T(t,e){var n,i,o;if(1===e.nodeType){if(n=e.nodeName.toLowerCase(),!dt.noCloneEvent&&e[pt.expando]){for(i in(o=pt._data(e)).events)pt.removeEvent(e,i,o.handle);e.removeAttribute(pt.expando)}"script"===n&&e.text!==t.text?(k(e).text=t.text,C(e)):"object"===n?(e.parentNode&&(e.outerHTML=t.outerHTML),dt.html5Clone&&t.innerHTML&&!pt.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===n&&zt.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===n?e.defaultSelected=e.selected=t.defaultSelected:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}}function E(t,e,n,i){e=rt.apply([],e);var o,r,a,s,l,c,u=0,d=t.length,h=d-1,p=e[0],m=pt.isFunction(p);if(m||d>1&&"string"==typeof p&&!dt.checkClone&&se.test(p))return t.each((function(o){var r=t.eq(o);m&&(e[0]=p.call(this,o,r.html())),E(r,e,n,i)}));if(d&&(o=(c=v(e,t[0].ownerDocument,!1,t,i)).firstChild,1===c.childNodes.length&&(c=o),o||i)){for(a=(s=pt.map(f(c,"script"),k)).length;u<d;u++)r=c,u!==h&&(r=pt.clone(r,!0,!0),a&&pt.merge(s,f(r,"script"))),n.call(t[u],r,u);if(a)for(l=s[s.length-1].ownerDocument,pt.map(s,C),u=0;u<a;u++)r=s[u],Qt.test(r.type||"")&&!pt._data(r,"globalEval")&&pt.contains(l,r)&&(r.src?pt._evalUrl&&pt._evalUrl(r.src):pt.globalEval((r.text||r.textContent||r.innerHTML||"").replace(ce,"")));c=o=null}return t}function $(t,e,n){for(var i,o=e?pt.filter(e,t):t,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||pt.cleanData(f(i)),i.parentNode&&(n&&pt.contains(i.ownerDocument,i)&&m(f(i,"script")),i.parentNode.removeChild(i));return t}function D(t,e){var n=pt(e.createElement(t)).appendTo(e.body),i=pt.css(n[0],"display");return n.detach(),i}function A(t){var e=it,n=he[t];return n||("none"!==(n=D(t,e))&&n||((e=((de=(de||pt("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement))[0].contentWindow||de[0].contentDocument).document).write(),e.close(),n=D(t,e),de.detach()),he[t]=n),n}function j(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}function M(t){if(t in Ee)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=Te.length;n--;)if((t=Te[n]+e)in Ee)return t}function I(t,e){for(var n,i,o,r=[],a=0,s=t.length;a<s;a++)(i=t[a]).style&&(r[a]=pt._data(i,"olddisplay"),n=i.style.display,e?(r[a]||"none"!==n||(i.style.display=""),""===i.style.display&&Ht(i)&&(r[a]=pt._data(i,"olddisplay",A(i.nodeName)))):(o=Ht(i),(n&&"none"!==n||!o)&&pt._data(i,"olddisplay",o?n:pt.css(i,"display"))));for(a=0;a<s;a++)(i=t[a]).style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?r[a]||"":"none"));return t}function P(t,e,n){var i=ke.exec(e);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):e}function O(t,e,n,i,o){for(var r=n===(i?"border":"content")?4:"width"===e?1:0,a=0;r<4;r+=2)"margin"===n&&(a+=pt.css(t,n+Bt[r],!0,o)),i?("content"===n&&(a-=pt.css(t,"padding"+Bt[r],!0,o)),"margin"!==n&&(a-=pt.css(t,"border"+Bt[r]+"Width",!0,o))):(a+=pt.css(t,"padding"+Bt[r],!0,o),"padding"!==n&&(a+=pt.css(t,"border"+Bt[r]+"Width",!0,o)));return a}function N(t,e,n){var i=!0,o="width"===e?t.offsetWidth:t.offsetHeight,r=ve(t),a=dt.boxSizing&&"border-box"===pt.css(t,"boxSizing",!1,r);if(o<=0||null==o){if(((o=ye(t,e,r))<0||null==o)&&(o=t.style[e]),fe.test(o))return o;i=a&&(dt.boxSizingReliable()||o===t.style[e]),o=parseFloat(o)||0}return o+O(t,e,n||(a?"border":"content"),i,r)+"px"}function L(t,e,n,i,o){return new L.prototype.init(t,e,n,i,o)}function F(){return t.setTimeout((function(){$e=void 0})),$e=pt.now()}function R(t,e){var n,i={height:t},o=0;for(e=e?1:0;o<4;o+=2-e)i["margin"+(n=Bt[o])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function q(t,e,n){for(var i,o=(U.tweeners[e]||[]).concat(U.tweeners["*"]),r=0,a=o.length;r<a;r++)if(i=o[r].call(n,e,t))return i}function B(t,e,n){var i,o,r,a,s,l,c,u=this,d={},h=t.style,p=t.nodeType&&Ht(t),f=pt._data(t,"fxshow");for(i in n.queue||(null==(s=pt._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always((function(){u.always((function(){s.unqueued--,pt.queue(t,"fx").length||s.empty.fire()}))}))),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],
"inline"===("none"===(c=pt.css(t,"display"))?pt._data(t,"olddisplay")||A(t.nodeName):c)&&"none"===pt.css(t,"float")&&(dt.inlineBlockNeedsLayout&&"inline"!==A(t.nodeName)?h.zoom=1:h.display="inline-block")),n.overflow&&(h.overflow="hidden",dt.shrinkWrapBlocks()||u.always((function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}))),e)if(o=e[i],Ae.exec(o)){if(delete e[i],r=r||"toggle"===o,o===(p?"hide":"show")){if("show"!==o||!f||void 0===f[i])continue;p=!0}d[i]=f&&f[i]||pt.style(t,i)}else c=void 0;if(pt.isEmptyObject(d))"inline"===("none"===c?A(t.nodeName):c)&&(h.display=c);else for(i in f?"hidden"in f&&(p=f.hidden):f=pt._data(t,"fxshow",{}),r&&(f.hidden=!p),p?pt(t).show():u.done((function(){pt(t).hide()})),u.done((function(){var e;for(e in pt._removeData(t,"fxshow"),d)pt.style(t,e,d[e])})),d)a=q(p?f[i]:0,i,u),i in f||(f[i]=a.start,p&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}function H(t,e){var n,i,o,r,a;for(n in t)if(o=e[i=pt.camelCase(n)],r=t[n],pt.isArray(r)&&(o=r[1],r=t[n]=r[0]),n!==i&&(t[i]=r,delete t[n]),(a=pt.cssHooks[i])&&"expand"in a)for(n in r=a.expand(r),delete t[i],r)n in t||(t[n]=r[n],e[n]=o);else e[i]=o}function U(t,e,n){var i,o,r=0,a=U.prefilters.length,s=pt.Deferred().always((function(){delete l.elem})),l=function(){if(o)return!1;for(var e=$e||F(),n=Math.max(0,c.startTime+c.duration-e),i=1-(n/c.duration||0),r=0,a=c.tweens.length;r<a;r++)c.tweens[r].run(i);return s.notifyWith(t,[c,i,n]),i<1&&a?n:(s.resolveWith(t,[c]),!1)},c=s.promise({elem:t,props:pt.extend({},e),opts:pt.extend(!0,{specialEasing:{},easing:pt.easing._default},n),originalProperties:e,originalOptions:n,startTime:$e||F(),duration:n.duration,tweens:[],createTween:function(e,n){var i=pt.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(i),i},stop:function(e){var n=0,i=e?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return e?(s.notifyWith(t,[c,1,0]),s.resolveWith(t,[c,e])):s.rejectWith(t,[c,e]),this}}),u=c.props;for(H(u,c.opts.specialEasing);r<a;r++)if(i=U.prefilters[r].call(c,t,u,c.opts))return pt.isFunction(i.stop)&&(pt._queueHooks(c.elem,c.opts.queue).stop=pt.proxy(i.stop,i)),i;return pt.map(u,q,c),pt.isFunction(c.opts.start)&&c.opts.start.call(t,c),pt.fx.timer(pt.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function z(t){return pt.attr(t,"class")||""}function W(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,r=e.toLowerCase().match(jt)||[];if(pt.isFunction(n))for(;i=r[o++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Q(t,e,n,i){function o(s){var l;return r[s]=!0,pt.each(t[s]||[],(function(t,s){var c=s(e,n,i);return"string"!=typeof c||a||r[c]?a?!(l=c):void 0:(e.dataTypes.unshift(c),o(c),!1)})),l}var r={},a=t===en;return o(e.dataTypes[0])||!r["*"]&&o("*")}function V(t,e){var n,i,o=pt.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((o[i]?t:n||(n={}))[i]=e[i]);return n&&pt.extend(!0,t,n),t}function G(t,e,n){for(var i,o,r,a,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=t.mimeType||e.getResponseHeader("Content-Type"));if(o)for(a in s)if(s[a]&&s[a].test(o)){l.unshift(a);break}if(l[0]in n)r=l[0];else{for(a in n){if(!l[0]||t.converters[a+" "+l[0]]){r=a;break}i||(i=a)}r=r||i}if(r)return r!==l[0]&&l.unshift(r),n[r]}function Y(t,e,n,i){var o,r,a,s,l,c={},u=t.dataTypes.slice();if(u[1])for(a in t.converters)c[a.toLowerCase()]=t.converters[a];for(r=u.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=c[l+" "+r]||c["* "+r]))for(o in c)if((s=o.split(" "))[1]===r&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[o]:!0!==c[o]&&(r=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}}function X(t){return t.style&&t.style.display||pt.css(t,"display")}function K(t){if(!pt.contains(t.ownerDocument||it,t))return!0;for(;t&&1===t.nodeType;){if("none"===X(t)||"hidden"===t.type)return!0;t=t.parentNode}return!1}function J(t,e,n,i){var o;if(pt.isArray(e))pt.each(e,(function(e,o){n||sn.test(t)?i(t,o):J(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)}));else if(n||"object"!==pt.type(e))i(t,e);else for(o in e)J(t+"["+o+"]",e[o],n,i)}function Z(){try{return new t.XMLHttpRequest}catch(t){}}function tt(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function et(t){return pt.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}var nt=[],it=t.document,ot=nt.slice,rt=nt.concat,at=nt.push,st=nt.indexOf,lt={},ct=lt.toString,ut=lt.hasOwnProperty,dt={},ht="1.12.4",pt=function(t,e){return new pt.fn.init(t,e)},ft=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,mt=/^-ms-/,gt=/-([\da-z])/gi,vt=function(t,e){return e.toUpperCase()};pt.fn=pt.prototype={jquery:ht,constructor:pt,selector:"",length:0,toArray:function(){return ot.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:ot.call(this)},pushStack:function(t){var e=pt.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return pt.each(this,t)},map:function(t){return this.pushStack(pt.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(ot.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:at,sort:nt.sort,splice:nt.splice},pt.extend=pt.fn.extend=function(){var t,e,n,i,o,r,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||pt.isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(o=arguments[s]))for(i in o)t=a[i],a!==(n=o[i])&&(c&&n&&(pt.isPlainObject(n)||(e=pt.isArray(n)))?(e?(e=!1,r=t&&pt.isArray(t)?t:[]):r=t&&pt.isPlainObject(t)?t:{},a[i]=pt.extend(c,r,n)):void 0!==n&&(a[i]=n));return a},pt.extend({expando:"jQuery"+(ht+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===pt.type(t)},isArray:Array.isArray||function(t){return"array"===pt.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){var e=t&&t.toString();return!pt.isArray(t)&&e-parseFloat(e)+1>=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==pt.type(t)||t.nodeType||pt.isWindow(t))return!1;try{if(t.constructor&&!ut.call(t,"constructor")&&!ut.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}if(!dt.ownFirst)for(e in t)return ut.call(t,e);for(e in t);return void 0===e||ut.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?lt[ct.call(t)]||"object":typeof t},globalEval:function(e){e&&pt.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(mt,"ms-").replace(gt,vt)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var i,o=0;if(n(t))for(i=t.length;o<i&&!1!==e.call(t[o],o,t[o]);o++);else for(o in t)if(!1===e.call(t[o],o,t[o]))break;return t},trim:function(t){return null==t?"":(t+"").replace(ft,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(n(Object(t))?pt.merge(i,"string"==typeof t?[t]:t):at.call(i,t)),i},inArray:function(t,e,n){var i;if(e){if(st)return st.call(e,t,n);for(i=e.length,n=n?n<0?Math.max(0,i+n):n:0;n<i;n++)if(n in e&&e[n]===t)return n}return-1},merge:function(t,e){for(var n=+e.length,i=0,o=t.length;i<n;)t[o++]=e[i++];if(n!=n)for(;void 0!==e[i];)t[o++]=e[i++];return t.length=o,t},grep:function(t,e,n){for(var i=[],o=0,r=t.length,a=!n;o<r;o++)!e(t[o],o)!==a&&i.push(t[o]);return i},map:function(t,e,i){var o,r,a=0,s=[];if(n(t))for(o=t.length;a<o;a++)null!=(r=e(t[a],a,i))&&s.push(r);else for(a in t)null!=(r=e(t[a],a,i))&&s.push(r);return rt.apply([],s)},guid:1,proxy:function(t,e){var n,i,o;if("string"==typeof e&&(o=t[e],e=t,t=o),pt.isFunction(t))return n=ot.call(arguments,2),i=function(){return t.apply(e||this,n.concat(ot.call(arguments)))},i.guid=t.guid=t.guid||pt.guid++,i},now:function(){return+new Date},support:dt}),"function"==typeof Symbol&&(pt.fn[Symbol.iterator]=nt[Symbol.iterator]),pt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){lt["[object "+e+"]"]=e.toLowerCase()}));var yt=function(t){function e(t,e,n,i){var o,r,a,s,l,c,d,p,f=e&&e.ownerDocument,m=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==m&&9!==m&&11!==m)return n;if(!i&&((e?e.ownerDocument||e:q)!==M&&j(e),e=e||M,P)){if(11!==m&&(c=vt.exec(t)))if(o=c[1]){if(9===m){if(!(a=e.getElementById(o)))return n;if(a.id===o)return n.push(a),n}else if(f&&(a=f.getElementById(o))&&F(e,a)&&a.id===o)return n.push(a),n}else{if(c[2])return J.apply(n,e.getElementsByTagName(t)),n;if((o=c[3])&&w.getElementsByClassName&&e.getElementsByClassName)return J.apply(n,e.getElementsByClassName(o)),n}if(w.qsa&&!W[t+" "]&&(!O||!O.test(t))){if(1!==m)f=e,p=t;else if("object"!==e.nodeName.toLowerCase()){for((s=e.getAttribute("id"))?s=s.replace(_t,"\\$&"):e.setAttribute("id",s=R),r=(d=S(t)).length,l=ht.test(s)?"#"+s:"[id='"+s+"']";r--;)d[r]=l+" "+h(d[r]);p=d.join(","),f=yt.test(t)&&u(e.parentNode)||e}if(p)try{return J.apply(n,f.querySelectorAll(p)),n}catch(t){}finally{s===R&&e.removeAttribute("id")}}}return E(t.replace(st,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>x.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[R]=!0,t}function o(t){var e=M.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function r(t,e){for(var n=t.split("|"),i=n.length;i--;)x.attrHandle[n[i]]=e}function a(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||V)-(~t.sourceIndex||V);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function s(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function l(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function c(t){return i((function(e){return e=+e,i((function(n,i){for(var o,r=t([],n.length,e),a=r.length;a--;)n[o=r[a]]&&(n[o]=!(i[o]=n[o]))}))}))}function u(t){return t&&void 0!==t.getElementsByTagName&&t}function d(){}function h(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function p(t,e,n){var i=e.dir,o=n&&"parentNode"===i,r=H++;return e.first?function(e,n,r){for(;e=e[i];)if(1===e.nodeType||o)return t(e,n,r)}:function(e,n,a){var s,l,c,u=[B,r];if(a){for(;e=e[i];)if((1===e.nodeType||o)&&t(e,n,a))return!0}else for(;e=e[i];)if(1===e.nodeType||o){if((s=(l=(c=e[R]||(e[R]={}))[e.uniqueID]||(c[e.uniqueID]={}))[i])&&s[0]===B&&s[1]===r)return u[2]=s[2];if(l[i]=u,u[2]=t(e,n,a))return!0}}}function f(t){return t.length>1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function m(t,n,i){for(var o=0,r=n.length;o<r;o++)e(t,n[o],i);return i}function g(t,e,n,i,o){for(var r,a=[],s=0,l=t.length,c=null!=e;s<l;s++)(r=t[s])&&(n&&!n(r,i,o)||(a.push(r),c&&e.push(s)));return a}function v(t,e,n,o,r,a){return o&&!o[R]&&(o=v(o)),r&&!r[R]&&(r=v(r,a)),i((function(i,a,s,l){var c,u,d,h=[],p=[],f=a.length,v=i||m(e||"*",s.nodeType?[s]:s,[]),y=!t||!i&&e?v:g(v,h,t,s,l),_=n?r||(i?t:f||o)?[]:a:y;if(n&&n(y,_,s,l),o)for(c=g(_,p),o(c,[],s,l),u=c.length;u--;)(d=c[u])&&(_[p[u]]=!(y[p[u]]=d));if(i){if(r||t){if(r){for(c=[],u=_.length;u--;)(d=_[u])&&c.push(y[u]=d);r(null,_=[],c,l)}for(u=_.length;u--;)(d=_[u])&&(c=r?tt(i,d):h[u])>-1&&(i[c]=!(a[c]=d))}}else _=g(_===a?_.splice(f,_.length):_),r?r(null,a,_,l):J.apply(a,_)}))}function y(t){for(var e,n,i,o=t.length,r=x.relative[t[0].type],a=r||x.relative[" "],s=r?1:0,l=p((function(t){return t===e}),a,!0),c=p((function(t){return tt(e,t)>-1}),a,!0),u=[function(t,n,i){var o=!r&&(i||n!==$)||((e=n).nodeType?l(t,n,i):c(t,n,i));return e=null,o}];s<o;s++)if(n=x.relative[t[s].type])u=[p(f(u),n)];else{if((n=x.filter[t[s].type].apply(null,t[s].matches))[R]){for(i=++s;i<o&&!x.relative[t[i].type];i++);return v(s>1&&f(u),s>1&&h(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(st,"$1"),n,s<i&&y(t.slice(s,i)),i<o&&y(t=t.slice(i)),i<o&&h(t))}u.push(n)}return f(u)}function _(t,n){var o=n.length>0,r=t.length>0,a=function(i,a,s,l,c){var u,d,h,p=0,f="0",m=i&&[],v=[],y=$,_=i||r&&x.find.TAG("*",c),b=B+=null==y?1:Math.random()||.1,w=_.length;for(c&&($=a===M||a||c);f!==w&&null!=(u=_[f]);f++){if(r&&u){for(d=0,a||u.ownerDocument===M||(j(u),s=!P);h=t[d++];)if(h(u,a||M,s)){l.push(u);break}c&&(B=b)}o&&((u=!h&&u)&&p--,i&&m.push(u))}if(p+=f,o&&f!==p){for(d=0;h=n[d++];)h(m,v,a,s);if(i){if(p>0)for(;f--;)m[f]||v[f]||(v[f]=X.call(l));v=g(v)}J.apply(l,v),c&&!i&&v.length>0&&p+n.length>1&&e.uniqueSort(l)}return c&&(B=b,$=y),m};return o?i(a):a}var b,w,x,k,C,S,T,E,$,D,A,j,M,I,P,O,N,L,F,R="sizzle"+1*new Date,q=t.document,B=0,H=0,U=n(),z=n(),W=n(),Q=function(t,e){return t===e&&(A=!0),0},V=1<<31,G={}.hasOwnProperty,Y=[],X=Y.pop,K=Y.push,J=Y.push,Z=Y.slice,tt=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",it="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot="\\["+nt+"*("+it+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+it+"))|)"+nt+"*\\]",rt=":("+it+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",at=new RegExp(nt+"+","g"),st=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),lt=new RegExp("^"+nt+"*,"+nt+"*"),ct=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),ut=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),dt=new RegExp(rt),ht=new RegExp("^"+it+"$"),pt={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+rt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,gt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,_t=/'|\\/g,bt=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),wt=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},xt=function(){j()};try{J.apply(Y=Z.call(q.childNodes),q.childNodes),Y[q.childNodes.length].nodeType}catch(t){J={apply:Y.length?function(t,e){K.apply(t,Z.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}for(b in w=e.support={},C=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},j=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:q;return i!==M&&9===i.nodeType&&i.documentElement?(I=(M=i).documentElement,P=!C(M),(n=M.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",xt,!1):n.attachEvent&&n.attachEvent("onunload",xt)),w.attributes=o((function(t){return t.className="i",!t.getAttribute("className")})),w.getElementsByTagName=o((function(t){return t.appendChild(M.createComment("")),!t.getElementsByTagName("*").length})),w.getElementsByClassName=gt.test(M.getElementsByClassName),w.getById=o((function(t){return I.appendChild(t).id=R,!M.getElementsByName||!M.getElementsByName(R).length})),w.getById?(x.find.ID=function(t,e){if(void 0!==e.getElementById&&P){var n=e.getElementById(t);return n?[n]:[]}},x.filter.ID=function(t){var e=t.replace(bt,wt);return function(t){return t.getAttribute("id")===e}}):(delete x.find.ID,x.filter.ID=function(t){var e=t.replace(bt,wt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),x.find.TAG=w.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):w.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},x.find.CLASS=w.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&P)return e.getElementsByClassName(t)},N=[],O=[],(w.qsa=gt.test(M.querySelectorAll))&&(o((function(t){I.appendChild(t).innerHTML="<a id='"+R+"'></a><select id='"+R+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||O.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+R+"-]").length||O.push("~="),t.querySelectorAll(":checked").length||O.push(":checked"),t.querySelectorAll("a#"+R+"+*").length||O.push(".#.+[+~]")})),o((function(t){var e=M.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&O.push("name"+nt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||O.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),O.push(",.*:")}))),(w.matchesSelector=gt.test(L=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&o((function(t){w.disconnectedMatch=L.call(t,"div"),L.call(t,"[s!='']:x"),N.push("!=",rt)})),O=O.length&&new RegExp(O.join("|")),N=N.length&&new RegExp(N.join("|")),e=gt.test(I.compareDocumentPosition),F=e||gt.test(I.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},Q=e?function(t,e){if(t===e)return A=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!w.sortDetached&&e.compareDocumentPosition(t)===n?t===M||t.ownerDocument===q&&F(q,t)?-1:e===M||e.ownerDocument===q&&F(q,e)?1:D?tt(D,t)-tt(D,e):0:4&n?-1:1)}:function(t,e){if(t===e)return A=!0,0;var n,i=0,o=t.parentNode,r=e.parentNode,s=[t],l=[e];if(!o||!r)return t===M?-1:e===M?1:o?-1:r?1:D?tt(D,t)-tt(D,e):0;if(o===r)return a(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?a(s[i],l[i]):s[i]===q?-1:l[i]===q?1:0},M):M},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==M&&j(t),n=n.replace(ut,"='$1']"),w.matchesSelector&&P&&!W[n+" "]&&(!N||!N.test(n))&&(!O||!O.test(n)))try{var i=L.call(t,n);if(i||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return e(n,M,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==M&&j(t),F(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==M&&j(t);var n=x.attrHandle[e.toLowerCase()],i=n&&G.call(x.attrHandle,e.toLowerCase())?n(t,e,!P):void 0;return void 0!==i?i:w.attributes||!P?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,o=0;if(A=!w.detectDuplicates,D=!w.sortStable&&t.slice(0),t.sort(Q),A){for(;e=t[o++];)e===t[o]&&(i=n.push(o));for(;i--;)t.splice(n[i],1)}return D=null,t},k=e.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=k(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=k(e);return n},x=e.selectors={cacheLength:50,createPseudo:i,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(bt,wt),t[3]=(t[3]||t[4]||t[5]||"").replace(bt,wt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&dt.test(n)&&(e=S(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(bt,wt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=U[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&U(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,n,i){return function(o){var r=e.attr(o,t);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(at," ")+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,o){var r="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var c,u,d,h,p,f,m=r!==a?"nextSibling":"previousSibling",g=e.parentNode,v=s&&e.nodeName.toLowerCase(),y=!l&&!s,_=!1;if(g){if(r){for(;m;){for(h=e;h=h[m];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[a?g.firstChild:g.lastChild],a&&y){for(_=(p=(c=(u=(d=(h=g)[R]||(h[R]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===B&&c[1])&&c[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(_=p=0)||f.pop();)if(1===h.nodeType&&++_&&h===e){u[t]=[B,p,_];break}}else if(y&&(_=p=(c=(u=(d=(h=e)[R]||(h[R]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===B&&c[1]),!1===_)for(;(h=++p&&h&&h[m]||(_=p=0)||f.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++_||(y&&((u=(d=h[R]||(h[R]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]=[B,_]),h!==e)););return(_-=o)===i||_%i==0&&_/i>=0}}},PSEUDO:function(t,n){var o,r=x.pseudos[t]||x.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return r[R]?r(n):r.length>1?(o=[t,t,"",n],x.setFilters.hasOwnProperty(t.toLowerCase())?i((function(t,e){for(var i,o=r(t,n),a=o.length;a--;)t[i=tt(t,o[a])]=!(e[i]=o[a])})):function(t){return r(t,0,o)}):r}},pseudos:{not:i((function(t){var e=[],n=[],o=T(t.replace(st,"$1"));return o[R]?i((function(t,e,n,i){for(var r,a=o(t,null,i,[]),s=t.length;s--;)(r=a[s])&&(t[s]=!(e[s]=r))})):function(t,i,r){return e[0]=t,o(e,null,r,n),e[0]=null,!n.pop()}})),has:i((function(t){return function(n){return e(t,n).length>0}})),contains:i((function(t){return t=t.replace(bt,wt),function(e){return(e.textContent||e.innerText||k(e)).indexOf(t)>-1}})),lang:i((function(t){return ht.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(bt,wt).toLowerCase(),function(e){var n;do{if(n=P?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===I},focus:function(t){return t===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!x.pseudos.empty(t)},header:function(t){return mt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:c((function(){return[0]})),last:c((function(t,e){return[e-1]})),eq:c((function(t,e,n){return[n<0?n+e:n]})),even:c((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:c((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:c((function(t,e,n){for(var i=n<0?n+e:n;--i>=0;)t.push(i);return t})),gt:c((function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t}))}},x.pseudos.nth=x.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[b]=s(b);for(b in{submit:!0,reset:!0})x.pseudos[b]=l(b);return d.prototype=x.filters=x.pseudos,x.setFilters=new d,S=e.tokenize=function(t,n){var i,o,r,a,s,l,c,u=z[t+" "];if(u)return n?0:u.slice(0);for(s=t,l=[],c=x.preFilter;s;){for(a in i&&!(o=lt.exec(s))||(o&&(s=s.slice(o[0].length)||s),l.push(r=[])),i=!1,(o=ct.exec(s))&&(i=o.shift(),r.push({value:i,type:o[0].replace(st," ")}),s=s.slice(i.length)),x.filter)!(o=pt[a].exec(s))||c[a]&&!(o=c[a](o))||(i=o.shift(),r.push({value:i,type:a,matches:o}),s=s.slice(i.length));if(!i)break}return n?s.length:s?e.error(t):z(t,l).slice(0)},T=e.compile=function(t,e){var n,i=[],o=[],r=W[t+" "];if(!r){for(e||(e=S(t)),n=e.length;n--;)(r=y(e[n]))[R]?i.push(r):o.push(r);(r=W(t,_(o,i))).selector=t}return r},E=e.select=function(t,e,n,i){var o,r,a,s,l,c="function"==typeof t&&t,d=!i&&S(t=c.selector||t);if(n=n||[],1===d.length){if((r=d[0]=d[0].slice(0)).length>2&&"ID"===(a=r[0]).type&&w.getById&&9===e.nodeType&&P&&x.relative[r[1].type]){if(!(e=(x.find.ID(a.matches[0].replace(bt,wt),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(o=pt.needsContext.test(t)?0:r.length;o--&&(a=r[o],!x.relative[s=a.type]);)if((l=x.find[s])&&(i=l(a.matches[0].replace(bt,wt),yt.test(r[0].type)&&u(e.parentNode)||e))){if(r.splice(o,1),!(t=i.length&&h(r)))return J.apply(n,i),n;break}}return(c||T(t,d))(i,e,!P,n,!e||yt.test(t)&&u(e.parentNode)||e),n},w.sortStable=R.split("").sort(Q).join("")===R,w.detectDuplicates=!!A,j(),w.sortDetached=o((function(t){return 1&t.compareDocumentPosition(M.createElement("div"))})),o((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||r("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),w.attributes&&o((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||r("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),o((function(t){return null==t.getAttribute("disabled")}))||r(et,(function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null})),e}(t);pt.find=yt,pt.expr=yt.selectors,pt.expr[":"]=pt.expr.pseudos,pt.uniqueSort=pt.unique=yt.uniqueSort,pt.text=yt.getText,pt.isXMLDoc=yt.isXML,pt.contains=yt.contains;var _t=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&pt(t).is(n))break;i.push(t)}return i},bt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},wt=pt.expr.match.needsContext,xt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,kt=/^.[^:#\[\.,]*$/;pt.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?pt.find.matchesSelector(i,t)?[i]:[]:pt.find.matches(t,pt.grep(e,(function(t){return 1===t.nodeType})))},pt.fn.extend({find:function(t){var e,n=[],i=this,o=i.length;if("string"!=typeof t)return this.pushStack(pt(t).filter((function(){for(e=0;e<o;e++)if(pt.contains(i[e],this))return!0})));for(e=0;e<o;e++)pt.find(t,i[e],n);return(n=this.pushStack(o>1?pt.unique(n):n)).selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&wt.test(t)?pt(t):t||[],!1).length}});var Ct,St=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,Tt=pt.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||Ct,"string"==typeof t){if(!(i="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:St.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof pt?e[0]:e,pt.merge(this,pt.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:it,!0)),xt.test(i[1])&&pt.isPlainObject(e))for(i in e)pt.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}if((o=it.getElementById(i[2]))&&o.parentNode){if(o.id!==i[2])return Ct.find(t);this.length=1,this[0]=o}return this.context=it,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):pt.isFunction(t)?void 0!==n.ready?n.ready(t):t(pt):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),pt.makeArray(t,this))};Tt.prototype=pt.fn,Ct=pt(it);var Et=/^(?:parents|prev(?:Until|All))/,$t={children:!0,contents:!0,next:!0,prev:!0};pt.fn.extend({has:function(t){var e,n=pt(t,this),i=n.length;return this.filter((function(){for(e=0;e<i;e++)if(pt.contains(this,n[e]))return!0}))},closest:function(t,e){for(var n,i=0,o=this.length,r=[],a=wt.test(t)||"string"!=typeof t?pt(t,e||this.context):0;i<o;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&pt.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?pt.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?pt.inArray(this[0],pt(t)):pt.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(pt.uniqueSort(pt.merge(this.get(),pt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),pt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return _t(t,"parentNode")},parentsUntil:function(t,e,n){return _t(t,"parentNode",n)},next:function(t){return o(t,"nextSibling")},prev:function(t){return o(t,"previousSibling")},nextAll:function(t){return _t(t,"nextSibling")},prevAll:function(t){return _t(t,"previousSibling")},nextUntil:function(t,e,n){return _t(t,"nextSibling",n)},prevUntil:function(t,e,n){return _t(t,"previousSibling",n)},siblings:function(t){return bt((t.parentNode||{}).firstChild,t)},children:function(t){return bt(t.firstChild)},contents:function(t){return pt.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:pt.merge([],t.childNodes)}},(function(t,e){pt.fn[t]=function(n,i){var o=pt.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=pt.filter(i,o)),this.length>1&&($t[t]||(o=pt.uniqueSort(o)),Et.test(t)&&(o=o.reverse())),this.pushStack(o)}}));var Dt,At,jt=/\S+/g;for(At in pt.Callbacks=function(t){t="string"==typeof t?r(t):pt.extend({},t);var e,n,i,o,a=[],s=[],l=-1,c=function(){for(o=t.once,i=e=!0;s.length;l=-1)for(n=s.shift();++l<a.length;)!1===a[l].apply(n[0],n[1])&&t.stopOnFalse&&(l=a.length,n=!1);t.memory||(n=!1),e=!1,o&&(a=n?[]:"")},u={add:function(){return a&&(n&&!e&&(l=a.length-1,s.push(n)),function e(n){pt.each(n,(function(n,i){pt.isFunction(i)?t.unique&&u.has(i)||a.push(i):i&&i.length&&"string"!==pt.type(i)&&e(i)}))}(arguments),n&&!e&&c()),this},remove:function(){return pt.each(arguments,(function(t,e){for(var n;(n=pt.inArray(e,a,n))>-1;)a.splice(n,1),n<=l&&l--})),this},has:function(t){return t?pt.inArray(t,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return o=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return o=!0,n||u.disable(),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},pt.extend({Deferred:function(t){var e=[["resolve","done",pt.Callbacks("once memory"),"resolved"],["reject","fail",pt.Callbacks("once memory"),"rejected"],["notify","progress",pt.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return pt.Deferred((function(n){pt.each(e,(function(e,r){var a=pt.isFunction(t[e])&&t[e];o[r[1]]((function(){
var t=a&&a.apply(this,arguments);t&&pt.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this===i?n.promise():this,a?[t]:arguments)}))})),t=null})).promise()},promise:function(t){return null!=t?pt.extend(t,i):i}},o={};return i.pipe=i.then,pt.each(e,(function(t,r){var a=r[2],s=r[3];i[r[1]]=a.add,s&&a.add((function(){n=s}),e[1^t][2].disable,e[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?i:this,arguments),this},o[r[0]+"With"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(t){var e,n,i,o=0,r=ot.call(arguments),a=r.length,s=1!==a||t&&pt.isFunction(t.promise)?a:0,l=1===s?t:pt.Deferred(),c=function(t,n,i){return function(o){n[t]=this,i[t]=arguments.length>1?ot.call(arguments):o,i===e?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(e=new Array(a),n=new Array(a),i=new Array(a);o<a;o++)r[o]&&pt.isFunction(r[o].promise)?r[o].promise().progress(c(o,n,e)).done(c(o,i,r)).fail(l.reject):--s;return s||l.resolveWith(i,r),l.promise()}}),pt.fn.ready=function(t){return pt.ready.promise().done(t),this},pt.extend({isReady:!1,readyWait:1,holdReady:function(t){t?pt.readyWait++:pt.ready(!0)},ready:function(t){(!0===t?--pt.readyWait:pt.isReady)||(pt.isReady=!0,!0!==t&&--pt.readyWait>0||(Dt.resolveWith(it,[pt]),pt.fn.triggerHandler&&(pt(it).triggerHandler("ready"),pt(it).off("ready"))))}}),pt.ready.promise=function(e){if(!Dt)if(Dt=pt.Deferred(),"complete"===it.readyState||"loading"!==it.readyState&&!it.documentElement.doScroll)t.setTimeout(pt.ready);else if(it.addEventListener)it.addEventListener("DOMContentLoaded",s),t.addEventListener("load",s);else{it.attachEvent("onreadystatechange",s),t.attachEvent("onload",s);var n=!1;try{n=null==t.frameElement&&it.documentElement}catch(t){}n&&n.doScroll&&function e(){if(!pt.isReady){try{n.doScroll("left")}catch(n){return t.setTimeout(e,50)}a(),pt.ready()}}()}return Dt.promise(e)},pt.ready.promise(),pt(dt))break;dt.ownFirst="0"===At,dt.inlineBlockNeedsLayout=!1,pt((function(){var t,e,n,i;(n=it.getElementsByTagName("body")[0])&&n.style&&(e=it.createElement("div"),(i=it.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),void 0!==e.style.zoom&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",dt.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(i))})),function(){var t=it.createElement("div");dt.deleteExpando=!0;try{delete t.test}catch(t){dt.deleteExpando=!1}t=null}();var Mt,It=function(t){var e=pt.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return(1===n||9===n)&&(!e||!0!==e&&t.getAttribute("classid")===e)},Pt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ot=/([A-Z])/g;pt.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return!!(t=t.nodeType?pt.cache[t[pt.expando]]:t[pt.expando])&&!c(t)},data:function(t,e,n){return u(t,e,n)},removeData:function(t,e){return d(t,e)},_data:function(t,e,n){return u(t,e,n,!0)},_removeData:function(t,e){return d(t,e,!0)}}),pt.fn.extend({data:function(t,e){var n,i,o,r=this[0],a=r&&r.attributes;if(void 0===t){if(this.length&&(o=pt.data(r),1===r.nodeType&&!pt._data(r,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&0===(i=a[n].name).indexOf("data-")&&l(r,i=pt.camelCase(i.slice(5)),o[i]);pt._data(r,"parsedAttrs",!0)}return o}return"object"==typeof t?this.each((function(){pt.data(this,t)})):arguments.length>1?this.each((function(){pt.data(this,t,e)})):r?l(r,t,pt.data(r,t)):void 0},removeData:function(t){return this.each((function(){pt.removeData(this,t)}))}}),pt.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=pt._data(t,e),n&&(!i||pt.isArray(n)?i=pt._data(t,e,pt.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=pt.queue(t,e),i=n.length,o=n.shift(),r=pt._queueHooks(t,e),a=function(){pt.dequeue(t,e)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,a,r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return pt._data(t,n)||pt._data(t,n,{empty:pt.Callbacks("once memory").add((function(){pt._removeData(t,e+"queue"),pt._removeData(t,n)}))})}}),pt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?pt.queue(this[0],t):void 0===e?this:this.each((function(){var n=pt.queue(this,t,e);pt._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&pt.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){pt.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=pt.Deferred(),r=this,a=this.length,s=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=pt._data(r[a],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),o.promise(e)}}),dt.shrinkWrapBlocks=function(){return null!=Mt?Mt:(Mt=!1,(e=it.getElementsByTagName("body")[0])&&e.style?(t=it.createElement("div"),(n=it.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",e.appendChild(n).appendChild(t),void 0!==t.style.zoom&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(it.createElement("div")).style.width="5px",Mt=3!==t.offsetWidth),e.removeChild(n),Mt):void 0);var t,e,n};var Nt,Lt,Ft,Rt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,qt=new RegExp("^(?:([+-])=|)("+Rt+")([a-z%]*)$","i"),Bt=["Top","Right","Bottom","Left"],Ht=function(t,e){return t=e||t,"none"===pt.css(t,"display")||!pt.contains(t.ownerDocument,t)},Ut=function(t,e,n,i,o,r,a){var s=0,l=t.length,c=null==n;if("object"===pt.type(n))for(s in o=!0,n)Ut(t,e,s,n[s],!0,r,a);else if(void 0!==i&&(o=!0,pt.isFunction(i)||(a=!0),c&&(a?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(pt(t),n)})),e))for(;s<l;s++)e(t[s],n,a?i:i.call(t[s],s,e(t[s],n)));return o?t:c?e.call(t):l?e(t[0],n):r},zt=/^(?:checkbox|radio)$/i,Wt=/<([\w:-]+)/,Qt=/^$|\/(?:java|ecma)script/i,Vt=/^\s+/,Gt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";Nt=it.createElement("div"),Lt=it.createDocumentFragment(),Ft=it.createElement("input"),Nt.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",dt.leadingWhitespace=3===Nt.firstChild.nodeType,dt.tbody=!Nt.getElementsByTagName("tbody").length,dt.htmlSerialize=!!Nt.getElementsByTagName("link").length,dt.html5Clone="<:nav></:nav>"!==it.createElement("nav").cloneNode(!0).outerHTML,Ft.type="checkbox",Ft.checked=!0,Lt.appendChild(Ft),dt.appendChecked=Ft.checked,Nt.innerHTML="<textarea>x</textarea>",dt.noCloneChecked=!!Nt.cloneNode(!0).lastChild.defaultValue,Lt.appendChild(Nt),(Ft=it.createElement("input")).setAttribute("type","radio"),Ft.setAttribute("checked","checked"),Ft.setAttribute("name","t"),Nt.appendChild(Ft),dt.checkClone=Nt.cloneNode(!0).cloneNode(!0).lastChild.checked,dt.noCloneEvent=!!Nt.addEventListener,Nt[pt.expando]=1,dt.attributes=!Nt.getAttribute(pt.expando);var Yt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:dt.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};Yt.optgroup=Yt.option,Yt.tbody=Yt.tfoot=Yt.colgroup=Yt.caption=Yt.thead,Yt.th=Yt.td;var Xt=/<|&#?\w+;/,Kt=/<tbody/i;!function(){var e,n,i=it.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})n="on"+e,(dt[e]=n in t)||(i.setAttribute(n,"t"),dt[e]=!1===i.attributes[n].expando);i=null}();var Jt=/^(?:input|select|textarea)$/i,Zt=/^key/,te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ee=/^(?:focusinfocus|focusoutblur)$/,ne=/^([^.]*)(?:\.(.+)|)/;pt.event={global:{},add:function(t,e,n,i,o){var r,a,s,l,c,u,d,h,p,f,m,g=pt._data(t);if(g){for(n.handler&&(n=(l=n).handler,o=l.selector),n.guid||(n.guid=pt.guid++),(a=g.events)||(a=g.events={}),(u=g.handle)||(u=g.handle=function(t){return void 0===pt||t&&pt.event.triggered===t.type?void 0:pt.event.dispatch.apply(u.elem,arguments)},u.elem=t),s=(e=(e||"").match(jt)||[""]).length;s--;)p=m=(r=ne.exec(e[s])||[])[1],f=(r[2]||"").split(".").sort(),p&&(c=pt.event.special[p]||{},p=(o?c.delegateType:c.bindType)||p,c=pt.event.special[p]||{},d=pt.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&pt.expr.match.needsContext.test(o),namespace:f.join(".")},l),(h=a[p])||((h=a[p]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(t,i,f,u)||(t.addEventListener?t.addEventListener(p,u,!1):t.attachEvent&&t.attachEvent("on"+p,u))),c.add&&(c.add.call(t,d),d.handler.guid||(d.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,d):h.push(d),pt.event.global[p]=!0);t=null}},remove:function(t,e,n,i,o){var r,a,s,l,c,u,d,h,p,f,m,g=pt.hasData(t)&&pt._data(t);if(g&&(u=g.events)){for(c=(e=(e||"").match(jt)||[""]).length;c--;)if(p=m=(s=ne.exec(e[c])||[])[1],f=(s[2]||"").split(".").sort(),p){for(d=pt.event.special[p]||{},h=u[p=(i?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=r=h.length;r--;)a=h[r],!o&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||i&&i!==a.selector&&("**"!==i||!a.selector)||(h.splice(r,1),a.selector&&h.delegateCount--,d.remove&&d.remove.call(t,a));l&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,f,g.handle)||pt.removeEvent(t,p,g.handle),delete u[p])}else for(p in u)pt.event.remove(t,p+e[c],n,i,!0);pt.isEmptyObject(u)&&(delete g.handle,pt._removeData(t,"events"))}},trigger:function(e,n,i,o){var r,a,s,l,c,u,d,h=[i||it],p=ut.call(e,"type")?e.type:e,f=ut.call(e,"namespace")?e.namespace.split("."):[];if(s=u=i=i||it,3!==i.nodeType&&8!==i.nodeType&&!ee.test(p+pt.event.triggered)&&(p.indexOf(".")>-1&&(f=p.split("."),p=f.shift(),f.sort()),a=p.indexOf(":")<0&&"on"+p,(e=e[pt.expando]?e:new pt.Event(p,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:pt.makeArray(n,[e]),c=pt.event.special[p]||{},o||!c.trigger||!1!==c.trigger.apply(i,n))){if(!o&&!c.noBubble&&!pt.isWindow(i)){for(l=c.delegateType||p,ee.test(l+p)||(s=s.parentNode);s;s=s.parentNode)h.push(s),u=s;u===(i.ownerDocument||it)&&h.push(u.defaultView||u.parentWindow||t)}for(d=0;(s=h[d++])&&!e.isPropagationStopped();)e.type=d>1?l:c.bindType||p,(r=(pt._data(s,"events")||{})[e.type]&&pt._data(s,"handle"))&&r.apply(s,n),(r=a&&s[a])&&r.apply&&It(s)&&(e.result=r.apply(s,n),!1===e.result&&e.preventDefault());if(e.type=p,!o&&!e.isDefaultPrevented()&&(!c._default||!1===c._default.apply(h.pop(),n))&&It(i)&&a&&i[p]&&!pt.isWindow(i)){(u=i[a])&&(i[a]=null),pt.event.triggered=p;try{i[p]()}catch(t){}pt.event.triggered=void 0,u&&(i[a]=u)}return e.result}},dispatch:function(t){t=pt.event.fix(t);var e,n,i,o,r,a=[],s=ot.call(arguments),l=(pt._data(this,"events")||{})[t.type]||[],c=pt.event.special[t.type]||{};if(s[0]=t,t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){for(a=pt.event.handlers.call(this,t,l),e=0;(o=a[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(r.namespace)||(t.handleObj=r,t.data=r.data,void 0!==(i=((pt.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,s))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,o,r,a=[],s=e.delegateCount,l=t.target;if(s&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==t.type)){for(i=[],n=0;n<s;n++)void 0===i[o=(r=e[n]).selector+" "]&&(i[o]=r.needsContext?pt(o,this).index(l)>-1:pt.find(o,this,null,[l]).length),i[o]&&i.push(r);i.length&&a.push({elem:l,handlers:i})}return s<e.length&&a.push({elem:this,handlers:e.slice(s)}),a},fix:function(t){if(t[pt.expando])return t;var e,n,i,o=t.type,r=t,a=this.fixHooks[o];for(a||(this.fixHooks[o]=a=te.test(o)?this.mouseHooks:Zt.test(o)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,t=new pt.Event(r),e=i.length;e--;)t[n=i[e]]=r[n];return t.target||(t.target=r.srcElement||it),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,a.filter?a.filter(t,r):t},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,i,o,r=e.button,a=e.fromElement;return null==t.pageX&&null!=e.clientX&&(o=(i=t.target.ownerDocument||it).documentElement,n=i.body,t.pageX=e.clientX+(o&&o.scrollLeft||n&&n.scrollLeft||0)-(o&&o.clientLeft||n&&n.clientLeft||0),t.pageY=e.clientY+(o&&o.scrollTop||n&&n.scrollTop||0)-(o&&o.clientTop||n&&n.clientTop||0)),!t.relatedTarget&&a&&(t.relatedTarget=a===t.target?e.toElement:a),t.which||void 0===r||(t.which=1&r?1:2&r?3:4&r?2:0),t}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==b()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){if(this===b()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(pt.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(t){return pt.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,n){var i=pt.extend(new pt.Event,n,{type:t,isSimulated:!0});pt.event.trigger(i,null,e),i.isDefaultPrevented()&&n.preventDefault()}},pt.removeEvent=it.removeEventListener?function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)}:function(t,e,n){var i="on"+e;t.detachEvent&&(void 0===t[i]&&(t[i]=null),t.detachEvent(i,n))},pt.Event=function(t,e){if(!(this instanceof pt.Event))return new pt.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?y:_):this.type=t,e&&pt.extend(this,e),this.timeStamp=t&&t.timeStamp||pt.now(),this[pt.expando]=!0},pt.Event.prototype={constructor:pt.Event,isDefaultPrevented:_,isPropagationStopped:_,isImmediatePropagationStopped:_,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=y,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=y,t&&!this.isSimulated&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=y,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},pt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){pt.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,o=t.relatedTarget,r=t.handleObj;return o&&(o===i||pt.contains(i,o))||(t.type=r.origType,n=r.handler.apply(this,arguments),t.type=e),n}}})),dt.submit||(pt.event.special.submit={setup:function(){if(pt.nodeName(this,"form"))return!1;pt.event.add(this,"click._submit keypress._submit",(function(t){var e=t.target,n=pt.nodeName(e,"input")||pt.nodeName(e,"button")?pt.prop(e,"form"):void 0;n&&!pt._data(n,"submit")&&(pt.event.add(n,"submit._submit",(function(t){t._submitBubble=!0})),pt._data(n,"submit",!0))}))},postDispatch:function(t){t._submitBubble&&(delete t._submitBubble,this.parentNode&&!t.isTrigger&&pt.event.simulate("submit",this.parentNode,t))},teardown:function(){if(pt.nodeName(this,"form"))return!1;pt.event.remove(this,"._submit")}}),dt.change||(pt.event.special.change={setup:function(){if(Jt.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(pt.event.add(this,"propertychange._change",(function(t){"checked"===t.originalEvent.propertyName&&(this._justChanged=!0)})),pt.event.add(this,"click._change",(function(t){this._justChanged&&!t.isTrigger&&(this._justChanged=!1),pt.event.simulate("change",this,t)}))),!1;pt.event.add(this,"beforeactivate._change",(function(t){var e=t.target;Jt.test(e.nodeName)&&!pt._data(e,"change")&&(pt.event.add(e,"change._change",(function(t){!this.parentNode||t.isSimulated||t.isTrigger||pt.event.simulate("change",this.parentNode,t)})),pt._data(e,"change",!0))}))},handle:function(t){var e=t.target;if(this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type)return t.handleObj.handler.apply(this,arguments)},teardown:function(){return pt.event.remove(this,"._change"),!Jt.test(this.nodeName)}}),dt.focusin||pt.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){pt.event.simulate(e,t.target,pt.event.fix(t))};pt.event.special[e]={setup:function(){var i=this.ownerDocument||this,o=pt._data(i,e);o||i.addEventListener(t,n,!0),pt._data(i,e,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=pt._data(i,e)-1;o?pt._data(i,e,o):(i.removeEventListener(t,n,!0),pt._removeData(i,e))}}})),pt.fn.extend({on:function(t,e,n,i){return w(this,t,e,n,i)},one:function(t,e,n,i){return w(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,pt(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=_),this.each((function(){pt.event.remove(this,t,n,e)}))},trigger:function(t,e){return this.each((function(){pt.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return pt.event.trigger(t,e,n,!0)}});var ie=/ jQuery\d+="(?:null|\d+)"/g,oe=new RegExp("<(?:"+Gt+")[\\s/>]","i"),re=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ae=/<script|<style|<link/i,se=/checked\s*(?:[^=]|=\s*.checked.)/i,le=/^true\/(.*)/,ce=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ue=p(it).appendChild(it.createElement("div"));pt.extend({htmlPrefilter:function(t){return t.replace(re,"<$1></$2>")},clone:function(t,e,n){var i,o,r,a,s,l=pt.contains(t.ownerDocument,t);if(dt.html5Clone||pt.isXMLDoc(t)||!oe.test("<"+t.nodeName+">")?r=t.cloneNode(!0):(ue.innerHTML=t.outerHTML,ue.removeChild(r=ue.firstChild)),!(dt.noCloneEvent&&dt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||pt.isXMLDoc(t)))for(i=f(r),s=f(t),a=0;null!=(o=s[a]);++a)i[a]&&T(o,i[a]);if(e)if(n)for(s=s||f(t),i=i||f(r),a=0;null!=(o=s[a]);a++)S(o,i[a]);else S(t,r);return(i=f(r,"script")).length>0&&m(i,!l&&f(t,"script")),i=s=o=null,r},cleanData:function(t,e){for(var n,i,o,r,a=0,s=pt.expando,l=pt.cache,c=dt.attributes,u=pt.event.special;null!=(n=t[a]);a++)if((e||It(n))&&(r=(o=n[s])&&l[o])){if(r.events)for(i in r.events)u[i]?pt.event.remove(n,i):pt.removeEvent(n,i,r.handle);l[o]&&(delete l[o],c||void 0===n.removeAttribute?n[s]=void 0:n.removeAttribute(s),nt.push(o))}}}),pt.fn.extend({domManip:E,detach:function(t){return $(this,t,!0)},remove:function(t){return $(this,t)},text:function(t){return Ut(this,(function(t){return void 0===t?pt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||it).createTextNode(t))}),null,t,arguments.length)},append:function(){return E(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||x(this,t).appendChild(t)}))},prepend:function(){return E(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=x(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return E(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return E(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&pt.cleanData(f(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&pt.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return pt.clone(this,t,e)}))},html:function(t){return Ut(this,(function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(ie,""):void 0;if("string"==typeof t&&!ae.test(t)&&(dt.htmlSerialize||!oe.test(t))&&(dt.leadingWhitespace||!Vt.test(t))&&!Yt[(Wt.exec(t)||["",""])[1].toLowerCase()]){t=pt.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(pt.cleanData(f(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return E(this,arguments,(function(e){var n=this.parentNode;pt.inArray(this,t)<0&&(pt.cleanData(f(this)),n&&n.replaceChild(e,this))}),t)}}),pt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){pt.fn[t]=function(t){for(var n,i=0,o=[],r=pt(t),a=r.length-1;i<=a;i++)n=i===a?this:this.clone(!0),pt(r[i])[e](n),at.apply(o,n.get());return this.pushStack(o)}}));var de,he={HTML:"block",BODY:"block"},pe=/^margin/,fe=new RegExp("^("+Rt+")(?!px)[a-z%]+$","i"),me=function(t,e,n,i){var o,r,a={};for(r in e)a[r]=t.style[r],t.style[r]=e[r];for(r in o=n.apply(t,i||[]),e)t.style[r]=a[r];return o},ge=it.documentElement;!function(){function e(){var e,u,d=it.documentElement;d.appendChild(l),c.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",n=o=s=!1,i=a=!0,t.getComputedStyle&&(u=t.getComputedStyle(c),n="1%"!==(u||{}).top,s="2px"===(u||{}).marginLeft,o="4px"===(u||{width:"4px"}).width,c.style.marginRight="50%",i="4px"===(u||{marginRight:"4px"}).marginRight,(e=c.appendChild(it.createElement("div"))).style.cssText=c.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",c.style.width="1px",a=!parseFloat((t.getComputedStyle(e)||{}).marginRight),c.removeChild(e)),c.style.display="none",(r=0===c.getClientRects().length)&&(c.style.display="",c.innerHTML="<table><tr><td></td><td>t</td></tr></table>",c.childNodes[0].style.borderCollapse="separate",(e=c.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",(r=0===e[0].offsetHeight)&&(e[0].style.display="",e[1].style.display="none",r=0===e[0].offsetHeight)),d.removeChild(l)}var n,i,o,r,a,s,l=it.createElement("div"),c=it.createElement("div");c.style&&(c.style.cssText="float:left;opacity:.5",dt.opacity="0.5"===c.style.opacity,dt.cssFloat=!!c.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",dt.clearCloneStyle="content-box"===c.style.backgroundClip,(l=it.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",c.innerHTML="",l.appendChild(c),dt.boxSizing=""===c.style.boxSizing||""===c.style.MozBoxSizing||""===c.style.WebkitBoxSizing,pt.extend(dt,{reliableHiddenOffsets:function(){return null==n&&e(),r},boxSizingReliable:function(){return null==n&&e(),o},pixelMarginRight:function(){return null==n&&e(),i},pixelPosition:function(){return null==n&&e(),n},reliableMarginRight:function(){return null==n&&e(),a},reliableMarginLeft:function(){return null==n&&e(),s}}))}();var ve,ye,_e=/^(top|right|bottom|left)$/;t.getComputedStyle?(ve=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},ye=function(t,e,n){var i,o,r,a,s=t.style;return""!==(a=(n=n||ve(t))?n.getPropertyValue(e)||n[e]:void 0)&&void 0!==a||pt.contains(t.ownerDocument,t)||(a=pt.style(t,e)),n&&!dt.pixelMarginRight()&&fe.test(a)&&pe.test(e)&&(i=s.width,o=s.minWidth,r=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=o,s.maxWidth=r),void 0===a?a:a+""}):ge.currentStyle&&(ve=function(t){return t.currentStyle},ye=function(t,e,n){var i,o,r,a,s=t.style;return null==(a=(n=n||ve(t))?n[e]:void 0)&&s&&s[e]&&(a=s[e]),fe.test(a)&&!_e.test(e)&&(i=s.left,(r=(o=t.runtimeStyle)&&o.left)&&(o.left=t.currentStyle.left),s.left="fontSize"===e?"1em":a,a=s.pixelLeft+"px",s.left=i,r&&(o.left=r)),void 0===a?a:a+""||"auto"});var be=/alpha\([^)]*\)/i,we=/opacity\s*=\s*([^)]*)/i,xe=/^(none|table(?!-c[ea]).+)/,ke=new RegExp("^("+Rt+")(.*)$","i"),Ce={position:"absolute",visibility:"hidden",display:"block"},Se={letterSpacing:"0",fontWeight:"400"},Te=["Webkit","O","Moz","ms"],Ee=it.createElement("div").style;pt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=ye(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:dt.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,a,s=pt.camelCase(e),l=t.style;if(e=pt.cssProps[s]||(pt.cssProps[s]=M(s)||s),a=pt.cssHooks[e]||pt.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(o=a.get(t,!1,i))?o:l[e];if(!("string"===(r=typeof n)&&(o=qt.exec(n))&&o[1]&&(n=h(t,e,o),r="number"),null==n||n!=n||("number"===r&&(n+=o&&o[3]||(pt.cssNumber[s]?"":"px")),dt.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,i)))))try{l[e]=n}catch(t){}}},css:function(t,e,n,i){var o,r,a,s=pt.camelCase(e);return e=pt.cssProps[s]||(pt.cssProps[s]=M(s)||s),(a=pt.cssHooks[e]||pt.cssHooks[s])&&"get"in a&&(r=a.get(t,!0,n)),void 0===r&&(r=ye(t,e,i)),"normal"===r&&e in Se&&(r=Se[e]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),pt.each(["height","width"],(function(t,e){pt.cssHooks[e]={get:function(t,n,i){if(n)return xe.test(pt.css(t,"display"))&&0===t.offsetWidth?me(t,Ce,(function(){return N(t,e,i)})):N(t,e,i)},set:function(t,n,i){var o=i&&ve(t);return P(t,n,i?O(t,e,i,dt.boxSizing&&"border-box"===pt.css(t,"boxSizing",!1,o),o):0)}}})),dt.opacity||(pt.cssHooks.opacity={get:function(t,e){return we.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,i=t.currentStyle,o=pt.isNumeric(e)?"alpha(opacity="+100*e+")":"",r=i&&i.filter||n.filter||"";n.zoom=1,(e>=1||""===e)&&""===pt.trim(r.replace(be,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||i&&!i.filter)||(n.filter=be.test(r)?r.replace(be,o):r+" "+o)}}),pt.cssHooks.marginRight=j(dt.reliableMarginRight,(function(t,e){if(e)return me(t,{display:"inline-block"},ye,[t,"marginRight"])})),pt.cssHooks.marginLeft=j(dt.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(ye(t,"marginLeft"))||(pt.contains(t.ownerDocument,t)?t.getBoundingClientRect().left-me(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})):0))+"px"})),pt.each({margin:"",padding:"",border:"Width"},(function(t,e){pt.cssHooks[t+e]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+Bt[i]+e]=r[i]||r[i-2]||r[0];return o}},pe.test(t)||(pt.cssHooks[t+e].set=P)})),pt.fn.extend({css:function(t,e){return Ut(this,(function(t,e,n){var i,o,r={},a=0;if(pt.isArray(e)){for(i=ve(t),o=e.length;a<o;a++)r[e[a]]=pt.css(t,e[a],!1,i);return r}return void 0!==n?pt.style(t,e,n):pt.css(t,e)}),t,e,arguments.length>1)},show:function(){return I(this,!0)},hide:function(){return I(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){Ht(this)?pt(this).show():pt(this).hide()}))}}),pt.Tween=L,L.prototype={constructor:L,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||pt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(pt.cssNumber[n]?"":"px")},cur:function(){var t=L.propHooks[this.prop];return t&&t.get?t.get(this):L.propHooks._default.get(this)},run:function(t){var e,n=L.propHooks[this.prop];return this.options.duration?this.pos=e=pt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):L.propHooks._default.set(this),this}},L.prototype.init.prototype=L.prototype,L.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=pt.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){pt.fx.step[t.prop]?pt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[pt.cssProps[t.prop]]&&!pt.cssHooks[t.prop]?t.elem[t.prop]=t.now:pt.style(t.elem,t.prop,t.now+t.unit)}}},L.propHooks.scrollTop=L.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},pt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},pt.fx=L.prototype.init,pt.fx.step={};var $e,De,Ae=/^(?:toggle|show|hide)$/,je=/queueHooks$/;pt.Animation=pt.extend(U,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return h(n.elem,t,qt.exec(e),n),n}]},tweener:function(t,e){pt.isFunction(t)?(e=t,t=["*"]):t=t.match(jt);for(var n,i=0,o=t.length;i<o;i++)n=t[i],U.tweeners[n]=U.tweeners[n]||[],U.tweeners[n].unshift(e)},prefilters:[B],prefilter:function(t,e){e?U.prefilters.unshift(t):U.prefilters.push(t)}}),pt.speed=function(t,e,n){var i=t&&"object"==typeof t?pt.extend({},t):{complete:n||!n&&e||pt.isFunction(t)&&t,duration:t,easing:n&&e||e&&!pt.isFunction(e)&&e};return i.duration=pt.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in pt.fx.speeds?pt.fx.speeds[i.duration]:pt.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){pt.isFunction(i.old)&&i.old.call(this),i.queue&&pt.dequeue(this,i.queue)},i},pt.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Ht).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var o=pt.isEmptyObject(t),r=pt.speed(e,n,i),a=function(){var e=U(this,pt.extend({},t),r);(o||pt._data(this,"finish"))&&e.stop(!0)};return a.finish=a,o||!1===r.queue?this.each(a):this.queue(r.queue,a)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each((function(){var e=!0,o=null!=t&&t+"queueHooks",r=pt.timers,a=pt._data(this);if(o)a[o]&&a[o].stop&&i(a[o]);else for(o in a)a[o]&&a[o].stop&&je.test(o)&&i(a[o]);for(o=r.length;o--;)r[o].elem!==this||null!=t&&r[o].queue!==t||(r[o].anim.stop(n),e=!1,r.splice(o,1));!e&&n||pt.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=pt._data(this),i=n[t+"queue"],o=n[t+"queueHooks"],r=pt.timers,a=i?i.length:0;for(n.finish=!0,pt.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<a;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish}))}}),pt.each(["toggle","show","hide"],(function(t,e){var n=pt.fn[e];pt.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(R(e,!0),t,i,o)}})),pt.each({slideDown:R("show"),slideUp:R("hide"),slideToggle:R("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){pt.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}})),pt.timers=[],pt.fx.tick=function(){var t,e=pt.timers,n=0;for($e=pt.now();n<e.length;n++)(t=e[n])()||e[n]!==t||e.splice(n--,1);e.length||pt.fx.stop(),$e=void 0},pt.fx.timer=function(t){pt.timers.push(t),t()?pt.fx.start():pt.timers.pop()},pt.fx.interval=13,pt.fx.start=function(){De||(De=t.setInterval(pt.fx.tick,pt.fx.interval))},pt.fx.stop=function(){t.clearInterval(De),De=null},pt.fx.speeds={slow:600,fast:200,_default:400},pt.fn.delay=function(e,n){return e=pt.fx&&pt.fx.speeds[e]||e,n=n||"fx",this.queue(n,(function(n,i){var o=t.setTimeout(n,e);i.stop=function(){t.clearTimeout(o)}}))},function(){
var t,e=it.createElement("input"),n=it.createElement("div"),i=it.createElement("select"),o=i.appendChild(it.createElement("option"));(n=it.createElement("div")).setAttribute("className","t"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",t=n.getElementsByTagName("a")[0],e.setAttribute("type","checkbox"),n.appendChild(e),(t=n.getElementsByTagName("a")[0]).style.cssText="top:1px",dt.getSetAttribute="t"!==n.className,dt.style=/top/.test(t.getAttribute("style")),dt.hrefNormalized="/a"===t.getAttribute("href"),dt.checkOn=!!e.value,dt.optSelected=o.selected,dt.enctype=!!it.createElement("form").enctype,i.disabled=!0,dt.optDisabled=!o.disabled,(e=it.createElement("input")).setAttribute("value",""),dt.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),dt.radioValue="t"===e.value}();var Me=/\r/g,Ie=/[\x20\t\r\n\f]+/g;pt.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=pt.isFunction(t),this.each((function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,pt(this).val()):t)?o="":"number"==typeof o?o+="":pt.isArray(o)&&(o=pt.map(o,(function(t){return null==t?"":t+""}))),(e=pt.valHooks[this.type]||pt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))}))):o?(e=pt.valHooks[o.type]||pt.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(Me,""):null==n?"":n:void 0}}),pt.extend({valHooks:{option:{get:function(t){var e=pt.find.attr(t,"value");return null!=e?e:pt.trim(pt.text(t)).replace(Ie," ")}},select:{get:function(t){for(var e,n,i=t.options,o=t.selectedIndex,r="select-one"===t.type||o<0,a=r?null:[],s=r?o+1:i.length,l=o<0?s:r?o:0;l<s;l++)if(((n=i[l]).selected||l===o)&&(dt.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!pt.nodeName(n.parentNode,"optgroup"))){if(e=pt(n).val(),r)return e;a.push(e)}return a},set:function(t,e){for(var n,i,o=t.options,r=pt.makeArray(e),a=o.length;a--;)if(i=o[a],pt.inArray(pt.valHooks.option.get(i),r)>-1)try{i.selected=n=!0}catch(t){i.scrollHeight}else i.selected=!1;return n||(t.selectedIndex=-1),o}}}}),pt.each(["radio","checkbox"],(function(){pt.valHooks[this]={set:function(t,e){if(pt.isArray(e))return t.checked=pt.inArray(pt(t).val(),e)>-1}},dt.checkOn||(pt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var Pe,Oe,Ne=pt.expr.attrHandle,Le=/^(?:checked|selected)$/i,Fe=dt.getSetAttribute,Re=dt.input;pt.fn.extend({attr:function(t,e){return Ut(this,pt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){pt.removeAttr(this,t)}))}}),pt.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?pt.prop(t,e,n):(1===r&&pt.isXMLDoc(t)||(e=e.toLowerCase(),o=pt.attrHooks[e]||(pt.expr.match.bool.test(e)?Oe:Pe)),void 0!==n?null===n?void pt.removeAttr(t,e):o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:null==(i=pt.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!dt.radioValue&&"radio"===e&&pt.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i,o=0,r=e&&e.match(jt);if(r&&1===t.nodeType)for(;n=r[o++];)i=pt.propFix[n]||n,pt.expr.match.bool.test(n)?Re&&Fe||!Le.test(n)?t[i]=!1:t[pt.camelCase("default-"+n)]=t[i]=!1:pt.attr(t,n,""),t.removeAttribute(Fe?n:i)}}),Oe={set:function(t,e,n){return!1===e?pt.removeAttr(t,n):Re&&Fe||!Le.test(n)?t.setAttribute(!Fe&&pt.propFix[n]||n,n):t[pt.camelCase("default-"+n)]=t[n]=!0,n}},pt.each(pt.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=Ne[e]||pt.find.attr;Re&&Fe||!Le.test(e)?Ne[e]=function(t,e,i){var o,r;return i||(r=Ne[e],Ne[e]=o,o=null!=n(t,e,i)?e.toLowerCase():null,Ne[e]=r),o}:Ne[e]=function(t,e,n){if(!n)return t[pt.camelCase("default-"+e)]?e.toLowerCase():null}})),Re&&Fe||(pt.attrHooks.value={set:function(t,e,n){if(!pt.nodeName(t,"input"))return Pe&&Pe.set(t,e,n);t.defaultValue=e}}),Fe||(Pe={set:function(t,e,n){var i=t.getAttributeNode(n);if(i||t.setAttributeNode(i=t.ownerDocument.createAttribute(n)),i.value=e+="","value"===n||e===t.getAttribute(n))return e}},Ne.id=Ne.name=Ne.coords=function(t,e,n){var i;if(!n)return(i=t.getAttributeNode(e))&&""!==i.value?i.value:null},pt.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);if(n&&n.specified)return n.value},set:Pe.set},pt.attrHooks.contenteditable={set:function(t,e,n){Pe.set(t,""!==e&&e,n)}},pt.each(["width","height"],(function(t,e){pt.attrHooks[e]={set:function(t,n){if(""===n)return t.setAttribute(e,"auto"),n}}}))),dt.style||(pt.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var qe=/^(?:input|select|textarea|button|object)$/i,Be=/^(?:a|area)$/i;pt.fn.extend({prop:function(t,e){return Ut(this,pt.prop,t,e,arguments.length>1)},removeProp:function(t){return t=pt.propFix[t]||t,this.each((function(){try{this[t]=void 0,delete this[t]}catch(t){}}))}}),pt.extend({prop:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&pt.isXMLDoc(t)||(e=pt.propFix[e]||e,o=pt.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=pt.find.attr(t,"tabindex");return e?parseInt(e,10):qe.test(t.nodeName)||Be.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),dt.hrefNormalized||pt.each(["href","src"],(function(t,e){pt.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}})),dt.optSelected||(pt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),pt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){pt.propFix[this.toLowerCase()]=this})),dt.enctype||(pt.propFix.enctype="encoding");var He=/[\t\r\n\f]/g;pt.fn.extend({addClass:function(t){var e,n,i,o,r,a,s,l=0;if(pt.isFunction(t))return this.each((function(e){pt(this).addClass(t.call(this,e,z(this)))}));if("string"==typeof t&&t)for(e=t.match(jt)||[];n=this[l++];)if(o=z(n),i=1===n.nodeType&&(" "+o+" ").replace(He," ")){for(a=0;r=e[a++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(s=pt.trim(i))&&pt.attr(n,"class",s)}return this},removeClass:function(t){var e,n,i,o,r,a,s,l=0;if(pt.isFunction(t))return this.each((function(e){pt(this).removeClass(t.call(this,e,z(this)))}));if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(jt)||[];n=this[l++];)if(o=z(n),i=1===n.nodeType&&(" "+o+" ").replace(He," ")){for(a=0;r=e[a++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");o!==(s=pt.trim(i))&&pt.attr(n,"class",s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):pt.isFunction(t)?this.each((function(n){pt(this).toggleClass(t.call(this,n,z(this),e),e)})):this.each((function(){var e,i,o,r;if("string"===n)for(i=0,o=pt(this),r=t.match(jt)||[];e=r[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=z(this))&&pt._data(this,"__className__",e),pt.attr(this,"class",e||!1===t?"":pt._data(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(He," ").indexOf(e)>-1)return!0;return!1}}),pt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),(function(t,e){pt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}})),pt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}});var Ue=t.location,ze=pt.now(),We=/\?/,Qe=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pt.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var n,i=null,o=pt.trim(e+"");return o&&!pt.trim(o.replace(Qe,(function(t,e,o,r){return n&&e&&(i=0),0===i?t:(n=o||e,i+=!r-!o,"")})))?Function("return "+o)():pt.error("Invalid JSON: "+e)},pt.parseXML=function(e){var n;if(!e||"string"!=typeof e)return null;try{t.DOMParser?n=(new t.DOMParser).parseFromString(e,"text/xml"):((n=new t.ActiveXObject("Microsoft.XMLDOM")).async="false",n.loadXML(e))}catch(t){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pt.error("Invalid XML: "+e),n};var Ve=/#.*$/,Ge=/([?&])_=[^&]*/,Ye=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Xe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ke=/^(?:GET|HEAD)$/,Je=/^\/\//,Ze=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,tn={},en={},nn="*/".concat("*"),on=Ue.href,rn=Ze.exec(on.toLowerCase())||[];pt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:on,type:"GET",isLocal:Xe.test(rn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pt.parseJSON,"text xml":pt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?V(V(t,pt.ajaxSettings),e):V(pt.ajaxSettings,t)},ajaxPrefilter:W(tn),ajaxTransport:W(en),ajax:function(e,n){function i(e,n,i,o){var r,d,y,_,w,k=n;2!==b&&(b=2,l&&t.clearTimeout(l),u=void 0,s=o||"",x.readyState=e>0?4:0,r=e>=200&&e<300||304===e,i&&(_=G(h,x,i)),_=Y(h,_,x,r),r?(h.ifModified&&((w=x.getResponseHeader("Last-Modified"))&&(pt.lastModified[a]=w),(w=x.getResponseHeader("etag"))&&(pt.etag[a]=w)),204===e||"HEAD"===h.type?k="nocontent":304===e?k="notmodified":(k=_.state,d=_.data,r=!(y=_.error))):(y=k,!e&&k||(k="error",e<0&&(e=0))),x.status=e,x.statusText=(n||k)+"",r?m.resolveWith(p,[d,k,x]):m.rejectWith(p,[x,k,y]),x.statusCode(v),v=void 0,c&&f.trigger(r?"ajaxSuccess":"ajaxError",[x,h,r?d:y]),g.fireWith(p,[x,k]),c&&(f.trigger("ajaxComplete",[x,h]),--pt.active||pt.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=void 0),n=n||{};var o,r,a,s,l,c,u,d,h=pt.ajaxSetup({},n),p=h.context||h,f=h.context&&(p.nodeType||p.jquery)?pt(p):pt.event,m=pt.Deferred(),g=pt.Callbacks("once memory"),v=h.statusCode||{},y={},_={},b=0,w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!d)for(d={};e=Ye.exec(s);)d[e[1].toLowerCase()]=e[2];e=d[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return b||(t=_[n]=_[n]||t,y[t]=e),this},overrideMimeType:function(t){return b||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(b<2)for(e in t)v[e]=[v[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||w;return u&&u.abort(e),i(0,e),this}};if(m.promise(x).complete=g.add,x.success=x.done,x.error=x.fail,h.url=((e||h.url||on)+"").replace(Ve,"").replace(Je,rn[1]+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=pt.trim(h.dataType||"*").toLowerCase().match(jt)||[""],null==h.crossDomain&&(o=Ze.exec(h.url.toLowerCase()),h.crossDomain=!(!o||o[1]===rn[1]&&o[2]===rn[2]&&(o[3]||("http:"===o[1]?"80":"443"))===(rn[3]||("http:"===rn[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=pt.param(h.data,h.traditional)),Q(tn,h,n,x),2===b)return x;for(r in(c=pt.event&&h.global)&&0==pt.active++&&pt.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ke.test(h.type),a=h.url,h.hasContent||(h.data&&(a=h.url+=(We.test(a)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=Ge.test(a)?a.replace(Ge,"$1_="+ze++):a+(We.test(a)?"&":"?")+"_="+ze++)),h.ifModified&&(pt.lastModified[a]&&x.setRequestHeader("If-Modified-Since",pt.lastModified[a]),pt.etag[a]&&x.setRequestHeader("If-None-Match",pt.etag[a])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&x.setRequestHeader("Content-Type",h.contentType),x.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+nn+"; q=0.01":""):h.accepts["*"]),h.headers)x.setRequestHeader(r,h.headers[r]);if(h.beforeSend&&(!1===h.beforeSend.call(p,x,h)||2===b))return x.abort();for(r in w="abort",{success:1,error:1,complete:1})x[r](h[r]);if(u=Q(en,h,n,x)){if(x.readyState=1,c&&f.trigger("ajaxSend",[x,h]),2===b)return x;h.async&&h.timeout>0&&(l=t.setTimeout((function(){x.abort("timeout")}),h.timeout));try{b=1,u.send(y,i)}catch(t){if(!(b<2))throw t;i(-1,t)}}else i(-1,"No Transport");return x},getJSON:function(t,e,n){return pt.get(t,e,n,"json")},getScript:function(t,e){return pt.get(t,void 0,e,"script")}}),pt.each(["get","post"],(function(t,e){pt[e]=function(t,n,i,o){return pt.isFunction(n)&&(o=o||i,i=n,n=void 0),pt.ajax(pt.extend({url:t,type:e,dataType:o,data:n,success:i},pt.isPlainObject(t)&&t))}})),pt._evalUrl=function(t){return pt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},pt.fn.extend({wrapAll:function(t){if(pt.isFunction(t))return this.each((function(e){pt(this).wrapAll(t.call(this,e))}));if(this[0]){var e=pt(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t})).append(this)}return this},wrapInner:function(t){return pt.isFunction(t)?this.each((function(e){pt(this).wrapInner(t.call(this,e))})):this.each((function(){var e=pt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=pt.isFunction(t);return this.each((function(n){pt(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(){return this.parent().each((function(){pt.nodeName(this,"body")||pt(this).replaceWith(this.childNodes)})).end()}}),pt.expr.filters.hidden=function(t){return dt.reliableHiddenOffsets()?t.offsetWidth<=0&&t.offsetHeight<=0&&!t.getClientRects().length:K(t)},pt.expr.filters.visible=function(t){return!pt.expr.filters.hidden(t)};var an=/%20/g,sn=/\[\]$/,ln=/\r?\n/g,cn=/^(?:submit|button|image|reset|file)$/i,un=/^(?:input|select|textarea|keygen)/i;pt.param=function(t,e){var n,i=[],o=function(t,e){e=pt.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=pt.ajaxSettings&&pt.ajaxSettings.traditional),pt.isArray(t)||t.jquery&&!pt.isPlainObject(t))pt.each(t,(function(){o(this.name,this.value)}));else for(n in t)J(n,t[n],e,o);return i.join("&").replace(an,"+")},pt.fn.extend({serialize:function(){return pt.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=pt.prop(this,"elements");return t?pt.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!pt(this).is(":disabled")&&un.test(this.nodeName)&&!cn.test(t)&&(this.checked||!zt.test(t))})).map((function(t,e){var n=pt(this).val();return null==n?null:pt.isArray(n)?pt.map(n,(function(t){return{name:e.name,value:t.replace(ln,"\r\n")}})):{name:e.name,value:n.replace(ln,"\r\n")}})).get()}}),pt.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return this.isLocal?tt():it.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||tt()}:Z;var dn=0,hn={},pn=pt.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",(function(){for(var t in hn)hn[t](void 0,!0)})),dt.cors=!!pn&&"withCredentials"in pn,(pn=dt.ajax=!!pn)&&pt.ajaxTransport((function(e){var n;if(!e.crossDomain||dt.cors)return{send:function(i,o){var r,a=e.xhr(),s=++dn;if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)a[r]=e.xhrFields[r];for(r in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)void 0!==i[r]&&a.setRequestHeader(r,i[r]+"");a.send(e.hasContent&&e.data||null),n=function(t,i){var r,l,c;if(n&&(i||4===a.readyState))if(delete hn[s],n=void 0,a.onreadystatechange=pt.noop,i)4!==a.readyState&&a.abort();else{c={},r=a.status,"string"==typeof a.responseText&&(c.text=a.responseText);try{l=a.statusText}catch(t){l=""}r||!e.isLocal||e.crossDomain?1223===r&&(r=204):r=c.text?200:404}c&&o(r,l,c,a.getAllResponseHeaders())},e.async?4===a.readyState?t.setTimeout(n):a.onreadystatechange=hn[s]=n:n()},abort:function(){n&&n(void 0,!0)}}})),pt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return pt.globalEval(t),t}}}),pt.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)})),pt.ajaxTransport("script",(function(t){if(t.crossDomain){var e,n=it.head||pt("head")[0]||it.documentElement;return{send:function(i,o){(e=it.createElement("script")).async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||o(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}}));var fn=[],mn=/(=)\?(?=&|$)|\?\?/;pt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=fn.pop()||pt.expando+"_"+ze++;return this[t]=!0,t}}),pt.ajaxPrefilter("json jsonp",(function(e,n,i){var o,r,a,s=!1!==e.jsonp&&(mn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&mn.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=pt.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(mn,"$1"+o):!1!==e.jsonp&&(e.url+=(We.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return a||pt.error(o+" was not called"),a[0]},e.dataTypes[0]="json",r=t[o],t[o]=function(){a=arguments},i.always((function(){void 0===r?pt(t).removeProp(o):t[o]=r,e[o]&&(e.jsonpCallback=n.jsonpCallback,fn.push(o)),a&&pt.isFunction(r)&&r(a[0]),a=r=void 0})),"script"})),pt.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||it;var i=xt.exec(t),o=!n&&[];return i?[e.createElement(i[1])]:(i=v([t],e,o),o&&o.length&&pt(o).remove(),pt.merge([],i.childNodes))};var gn=pt.fn.load;pt.fn.load=function(t,e,n){if("string"!=typeof t&&gn)return gn.apply(this,arguments);var i,o,r,a=this,s=t.indexOf(" ");return s>-1&&(i=pt.trim(t.slice(s,t.length)),t=t.slice(0,s)),pt.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),a.length>0&&pt.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done((function(t){r=arguments,a.html(i?pt("<div>").append(pt.parseHTML(t)).find(i):t)})).always(n&&function(t,e){a.each((function(){n.apply(this,r||[t.responseText,e,t])}))}),this},pt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){pt.fn[e]=function(t){return this.on(e,t)}})),pt.expr.filters.animated=function(t){return pt.grep(pt.timers,(function(e){return t===e.elem})).length},pt.offset={setOffset:function(t,e,n){var i,o,r,a,s,l,c=pt.css(t,"position"),u=pt(t),d={};"static"===c&&(t.style.position="relative"),s=u.offset(),r=pt.css(t,"top"),l=pt.css(t,"left"),("absolute"===c||"fixed"===c)&&pt.inArray("auto",[r,l])>-1?(a=(i=u.position()).top,o=i.left):(a=parseFloat(r)||0,o=parseFloat(l)||0),pt.isFunction(e)&&(e=e.call(t,n,pt.extend({},s))),null!=e.top&&(d.top=e.top-s.top+a),null!=e.left&&(d.left=e.left-s.left+o),"using"in e?e.using.call(t,d):u.css(d)}},pt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){pt.offset.setOffset(this,t,e)}));var e,n,i={top:0,left:0},o=this[0],r=o&&o.ownerDocument;return r?(e=r.documentElement,pt.contains(e,o)?(void 0!==o.getBoundingClientRect&&(i=o.getBoundingClientRect()),n=et(r),{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):i):void 0},position:function(){if(this[0]){var t,e,n={top:0,left:0},i=this[0];return"fixed"===pt.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),pt.nodeName(t[0],"html")||(n=t.offset()),n.top+=pt.css(t[0],"borderTopWidth",!0),n.left+=pt.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-pt.css(i,"marginTop",!0),left:e.left-n.left-pt.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&!pt.nodeName(t,"html")&&"static"===pt.css(t,"position");)t=t.offsetParent;return t||ge}))}}),pt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n=/Y/.test(e);pt.fn[t]=function(i){return Ut(this,(function(t,i,o){var r=et(t);if(void 0===o)return r?e in r?r[e]:r.document.documentElement[i]:t[i];r?r.scrollTo(n?pt(r).scrollLeft():o,n?o:pt(r).scrollTop()):t[i]=o}),t,i,arguments.length,null)}})),pt.each(["top","left"],(function(t,e){pt.cssHooks[e]=j(dt.pixelPosition,(function(t,n){if(n)return n=ye(t,e),fe.test(n)?pt(t).position()[e]+"px":n}))})),pt.each({Height:"height",Width:"width"},(function(t,e){pt.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,i){pt.fn[i]=function(i,o){var r=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return Ut(this,(function(e,n,i){var o;return pt.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?pt.css(e,n,a):pt.style(e,n,i,a)}),e,r?i:void 0,r,null)}}))})),pt.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),pt.fn.size=function(){return this.length},pt.fn.andSelf=pt.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],(function(){return pt}));var vn=t.jQuery,yn=t.$;return pt.noConflict=function(e){return t.$===pt&&(t.$=yn),e&&t.jQuery===pt&&(t.jQuery=vn),pt},e||(t.jQuery=t.$=pt),pt})),function(){var t=this;(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",formDisableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",formEnableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]"}}).call(this)}).call(t);var e=t.Rails;(function(){(function(){var t;t=null,e.loadCSPNonce=function(){var e;return t=null!=(e=document.querySelector("meta[name=csp-nonce]"))?e.content:void 0},e.cspNonce=function(){return null!=t?t:e.loadCSPNonce()}}).call(this),function(){var t,n;n=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,e.matches=function(t,e){return null!=e.exclude?n.call(t,e.selector)&&!n.call(t,e.exclude):n.call(t,e)},t="_ujsData",e.getData=function(e,n){var i;return null!=(i=e[t])?i[n]:void 0},e.setData=function(e,n,i){return null==e[t]&&(e[t]={}),e[t][n]=i},e.$=function(t){return Array.prototype.slice.call(document.querySelectorAll(t))}}.call(this),function(){var t,n,i;t=e.$,i=e.csrfToken=function(){var t;return(t=document.querySelector("meta[name=csrf-token]"))&&t.content},n=e.csrfParam=function(){var t;return(t=document.querySelector("meta[name=csrf-param]"))&&t.content},e.CSRFProtection=function(t){var e;if(null!=(e=i()))return t.setRequestHeader("X-CSRF-Token",e)},e.refreshCSRFTokens=function(){var e,o;if(o=i(),e=n(),null!=o&&null!=e)return t('form input[name="'+e+'"]').forEach((function(t){return t.value=o}))}}.call(this),function(){var t,n,i,o;i=e.matches,"function"!=typeof(t=window.CustomEvent)&&((t=function(t,e){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}).prototype=window.Event.prototype,o=t.prototype.preventDefault,t.prototype.preventDefault=function(){var t;return t=o.call(this),this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),t}),n=e.fire=function(e,n,i){var o;return o=new t(n,{bubbles:!0,cancelable:!0,detail:i}),e.dispatchEvent(o),!o.defaultPrevented},e.stopEverything=function(t){return n(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},e.delegate=function(t,e,n,o){return t.addEventListener(n,(function(t){var n;for(n=t.target;n instanceof Element&&!i(n,e);)n=n.parentNode;if(n instanceof Element&&!1===o.call(n,t))return t.preventDefault(),t.stopPropagation()}))}}.call(this),function(){var t,n,i,o,r,a;o=e.cspNonce,n=e.CSRFProtection,e.fire,t={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},e.ajax=function(t){var e;return t=r(t),e=i(t,(function(){var n,i;return i=a(null!=(n=e.response)?n:e.responseText,e.getResponseHeader("Content-Type")),2===Math.floor(e.status/100)?"function"==typeof t.success&&t.success(i,e.statusText,e):"function"==typeof t.error&&t.error(i,e.statusText,e),"function"==typeof t.complete?t.complete(e,e.statusText):void 0})),!(null!=t.beforeSend&&!t.beforeSend(e,t))&&(e.readyState===XMLHttpRequest.OPENED?e.send(t.data):void 0)},r=function(e){return e.url=e.url||location.href,e.type=e.type.toUpperCase(),"GET"===e.type&&e.data&&(e.url.indexOf("?")<0?e.url+="?"+e.data:e.url+="&"+e.data),null==t[e.dataType]&&(e.dataType="*"),e.accept=t[e.dataType],"*"!==e.dataType&&(e.accept+=", */*; q=0.01"),e},i=function(t,e){var i;return(i=new XMLHttpRequest).open(t.type,t.url,!0),i.setRequestHeader("Accept",t.accept),"string"==typeof t.data&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),n(i),i.withCredentials=!!t.withCredentials,i.onreadystatechange=function(){if(i.readyState===XMLHttpRequest.DONE)return e(i)},i},a=function(t,e){var n,i;if("string"==typeof t&&"string"==typeof e)if(e.match(/\bjson\b/))try{t=JSON.parse(t)}catch(t){}else if(e.match(/\b(?:java|ecma)script\b/))(i=document.createElement("script")).setAttribute("nonce",o()),i.text=t,document.head.appendChild(i).parentNode.removeChild(i);else if(e.match(/\b(xml|html|svg)\b/)){n=new DOMParser,e=e.replace(/;.+/,"");try{t=n.parseFromString(t,e)}catch(t){}}return t},e.href=function(t){return t.href},e.isCrossDomain=function(t){var e,n;(e=document.createElement("a")).href=location.href,n=document.createElement("a");try{return n.href=t,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(t){return!0}}}.call(this),function(){var t,n;t=e.matches,n=function(t){return Array.prototype.slice.call(t)},e.serializeElement=function(e,i){var o,r;return o=[e],t(e,"form")&&(o=n(e.elements)),r=[],o.forEach((function(e){if(e.name&&!e.disabled)return t(e,"select")?n(e.options).forEach((function(t){if(t.selected)return r.push({name:e.name,value:t.value})})):e.checked||-1===["radio","checkbox","submit"].indexOf(e.type)?r.push({name:e.name,value:e.value}):void 0})),i&&r.push(i),r.map((function(t){return null!=t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(t.value):t})).join("&")},e.formElements=function(e,i){return t(e,"form")?n(e.elements).filter((function(e){return t(e,i)})):n(e.querySelectorAll(i))}}.call(this),function(){var t,n,i;n=e.fire,i=e.stopEverything,e.handleConfirm=function(e){if(!t(this))return i(e)},t=function(t){var e,i,o;if(!(o=t.getAttribute("data-confirm")))return!0;if(e=!1,n(t,"confirm")){try{e=confirm(o)}catch(t){}i=n(t,"confirm:complete",[e])}return e&&i}}.call(this),function(){var t,n,i,o,r,a,s,l,c,u,d;c=e.matches,l=e.getData,u=e.setData,d=e.stopEverything,s=e.formElements,e.handleDisabledElement=function(t){if(this.disabled)return d(t)},e.enableElement=function(t){var n;return n=t instanceof Event?t.target:t,c(n,e.linkDisableSelector)?a(n):c(n,e.buttonDisableSelector)||c(n,e.formEnableSelector)?o(n):c(n,e.formSubmitSelector)?r(n):void 0},e.disableElement=function(o){var r;return r=o instanceof Event?o.target:o,c(r,e.linkDisableSelector)?i(r):c(r,e.buttonDisableSelector)||c(r,e.formDisableSelector)?t(r):c(r,e.formSubmitSelector)?n(r):void 0},i=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(u(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",d),u(t,"ujs:disabled",!0)},a=function(t){var e;return null!=(e=l(t,"ujs:enable-with"))&&(t.innerHTML=e,u(t,"ujs:enable-with",null)),t.removeEventListener("click",d),u(t,"ujs:disabled",null)},n=function(n){return s(n,e.formDisableSelector).forEach(t)},t=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(c(t,"button")?(u(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(u(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,u(t,"ujs:disabled",!0)},r=function(t){return s(t,e.formEnableSelector).forEach(o)},o=function(t){var e;return null!=(e=l(t,"ujs:enable-with"))&&(c(t,"button")?t.innerHTML=e:t.value=e,u(t,"ujs:enable-with",null)),t.disabled=!1,u(t,"ujs:disabled",null)}}.call(this),function(){var t;t=e.stopEverything,e.handleMethod=function(n){var i,o,r,a,s,l,c;if(c=(l=this).getAttribute("data-method"))return s=e.href(l),o=e.csrfToken(),i=e.csrfParam(),r=document.createElement("form"),a="<input name='_method' value='"+c+"' type='hidden' />",null==i||null==o||e.isCrossDomain(s)||(a+="<input name='"+i+"' value='"+o+"' type='hidden' />"),a+='<input type="submit" />',r.method="post",r.action=s,r.target=l.target,r.innerHTML=a,r.style.display="none",document.body.appendChild(r),r.querySelector('[type="submit"]').click(),t(n)}}.call(this),function(){var t,n,i,o,r,a,s,l,c,u=[].slice;a=e.matches,i=e.getData,l=e.setData,n=e.fire,c=e.stopEverything,t=e.ajax,o=e.isCrossDomain,s=e.serializeElement,r=function(t){var e;return null!=(e=t.getAttribute("data-remote"))&&"false"!==e},e.handleRemote=function(d){var h,p,f,m,g,v,y;return!r(m=this)||(n(m,"ajax:before")?(y=m.getAttribute("data-with-credentials"),f=m.getAttribute("data-type")||"script",a(m,e.formSubmitSelector)?(h=i(m,"ujs:submit-button"),g=i(m,"ujs:submit-button-formmethod")||m.method,v=i(m,"ujs:submit-button-formaction")||m.getAttribute("action")||location.href,"GET"===g.toUpperCase()&&(v=v.replace(/\?.*$/,"")),"multipart/form-data"===m.enctype?(p=new FormData(m),null!=h&&p.append(h.name,h.value)):p=s(m,h),l(m,"ujs:submit-button",null),l(m,"ujs:submit-button-formmethod",null),l(m,"ujs:submit-button-formaction",null)):a(m,e.buttonClickSelector)||a(m,e.inputChangeSelector)?(g=m.getAttribute("data-method"),v=m.getAttribute("data-url"),p=s(m,m.getAttribute("data-params"))):(g=m.getAttribute("data-method"),v=e.href(m),p=m.getAttribute("data-params")),t({type:g||"GET",url:v,data:p,dataType:f,beforeSend:function(t,e){return n(m,"ajax:beforeSend",[t,e])?n(m,"ajax:send",[t]):(n(m,"ajax:stopped"),!1)},success:function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],n(m,"ajax:success",t)},error:function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],n(m,"ajax:error",t)},complete:function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],
n(m,"ajax:complete",t)},crossDomain:o(v),withCredentials:null!=y&&"false"!==y}),c(d)):(n(m,"ajax:stopped"),!1))},e.formSubmitButtonClick=function(){var t,e;if(e=(t=this).form)return t.name&&l(e,"ujs:submit-button",{name:t.name,value:t.value}),l(e,"ujs:formnovalidate-button",t.formNoValidate),l(e,"ujs:submit-button-formaction",t.getAttribute("formaction")),l(e,"ujs:submit-button-formmethod",t.getAttribute("formmethod"))},e.preventInsignificantClick=function(t){var e,n,i,o;if(o=((i=this).getAttribute("data-method")||"GET").toUpperCase(),e=i.getAttribute("data-params"),n=(t.metaKey||t.ctrlKey)&&"GET"===o&&!e,!(0===t.button)||n)return t.stopImmediatePropagation()}}.call(this),function(){var t,n,i,o,r,a,s,l,c,u,d,h,p,f,m;if(a=e.fire,i=e.delegate,l=e.getData,t=e.$,m=e.refreshCSRFTokens,n=e.CSRFProtection,p=e.loadCSPNonce,r=e.enableElement,o=e.disableElement,u=e.handleDisabledElement,c=e.handleConfirm,f=e.preventInsignificantClick,h=e.handleRemote,s=e.formSubmitButtonClick,d=e.handleMethod,"undefined"!=typeof jQuery&&null!==jQuery&&null!=jQuery.ajax){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=e,jQuery.ajaxPrefilter((function(t,e,i){if(!t.crossDomain)return n(i)}))}e.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",(function(){return t(e.formEnableSelector).forEach((function(t){if(l(t,"ujs:disabled"))return r(t)})),t(e.linkDisableSelector).forEach((function(t){if(l(t,"ujs:disabled"))return r(t)}))})),i(document,e.linkDisableSelector,"ajax:complete",r),i(document,e.linkDisableSelector,"ajax:stopped",r),i(document,e.buttonDisableSelector,"ajax:complete",r),i(document,e.buttonDisableSelector,"ajax:stopped",r),i(document,e.linkClickSelector,"click",f),i(document,e.linkClickSelector,"click",u),i(document,e.linkClickSelector,"click",c),i(document,e.linkClickSelector,"click",o),i(document,e.linkClickSelector,"click",h),i(document,e.linkClickSelector,"click",d),i(document,e.buttonClickSelector,"click",f),i(document,e.buttonClickSelector,"click",u),i(document,e.buttonClickSelector,"click",c),i(document,e.buttonClickSelector,"click",o),i(document,e.buttonClickSelector,"click",h),i(document,e.inputChangeSelector,"change",u),i(document,e.inputChangeSelector,"change",c),i(document,e.inputChangeSelector,"change",h),i(document,e.formSubmitSelector,"submit",u),i(document,e.formSubmitSelector,"submit",c),i(document,e.formSubmitSelector,"submit",h),i(document,e.formSubmitSelector,"submit",(function(t){return setTimeout((function(){return o(t)}),13)})),i(document,e.formSubmitSelector,"ajax:send",o),i(document,e.formSubmitSelector,"ajax:complete",r),i(document,e.formInputClickSelector,"click",f),i(document,e.formInputClickSelector,"click",u),i(document,e.formInputClickSelector,"click",c),i(document,e.formInputClickSelector,"click",s),document.addEventListener("DOMContentLoaded",m),document.addEventListener("DOMContentLoaded",p),window._rails_loaded=!0},window.Rails===e&&a(document,"rails:attachBindings")&&e.start()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=e:"function"==typeof define&&define.amd&&define(e)}.call(this),jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(t,e,n,i,o){return jQuery.easing[jQuery.easing.def](t,e,n,i,o)},easeInQuad:function(t,e,n,i,o){return i*(e/=o)*e+n},easeOutQuad:function(t,e,n,i,o){return-i*(e/=o)*(e-2)+n},easeInOutQuad:function(t,e,n,i,o){return(e/=o/2)<1?i/2*e*e+n:-i/2*(--e*(e-2)-1)+n},easeInCubic:function(t,e,n,i,o){return i*(e/=o)*e*e+n},easeOutCubic:function(t,e,n,i,o){return i*((e=e/o-1)*e*e+1)+n},easeInOutCubic:function(t,e,n,i,o){return(e/=o/2)<1?i/2*e*e*e+n:i/2*((e-=2)*e*e+2)+n},easeInQuart:function(t,e,n,i,o){return i*(e/=o)*e*e*e+n},easeOutQuart:function(t,e,n,i,o){return-i*((e=e/o-1)*e*e*e-1)+n},easeInOutQuart:function(t,e,n,i,o){return(e/=o/2)<1?i/2*e*e*e*e+n:-i/2*((e-=2)*e*e*e-2)+n},easeInQuint:function(t,e,n,i,o){return i*(e/=o)*e*e*e*e+n},easeOutQuint:function(t,e,n,i,o){return i*((e=e/o-1)*e*e*e*e+1)+n},easeInOutQuint:function(t,e,n,i,o){return(e/=o/2)<1?i/2*e*e*e*e*e+n:i/2*((e-=2)*e*e*e*e+2)+n},easeInSine:function(t,e,n,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+n},easeOutSine:function(t,e,n,i,o){return i*Math.sin(e/o*(Math.PI/2))+n},easeInOutSine:function(t,e,n,i,o){return-i/2*(Math.cos(Math.PI*e/o)-1)+n},easeInExpo:function(t,e,n,i,o){return 0==e?n:i*Math.pow(2,10*(e/o-1))+n},easeOutExpo:function(t,e,n,i,o){return e==o?n+i:i*(1-Math.pow(2,-10*e/o))+n},easeInOutExpo:function(t,e,n,i,o){return 0==e?n:e==o?n+i:(e/=o/2)<1?i/2*Math.pow(2,10*(e-1))+n:i/2*(2-Math.pow(2,-10*--e))+n},easeInCirc:function(t,e,n,i,o){return-i*(Math.sqrt(1-(e/=o)*e)-1)+n},easeOutCirc:function(t,e,n,i,o){return i*Math.sqrt(1-(e=e/o-1)*e)+n},easeInOutCirc:function(t,e,n,i,o){return(e/=o/2)<1?-i/2*(Math.sqrt(1-e*e)-1)+n:i/2*(Math.sqrt(1-(e-=2)*e)+1)+n},easeInElastic:function(t,e,n,i,o){var r=1.70158,a=0,s=i;if(0==e)return n;if(1==(e/=o))return n+i;if(a||(a=.3*o),s<Math.abs(i)){s=i;r=a/4}else r=a/(2*Math.PI)*Math.asin(i/s);return-s*Math.pow(2,10*(e-=1))*Math.sin((e*o-r)*(2*Math.PI)/a)+n},easeOutElastic:function(t,e,n,i,o){var r=1.70158,a=0,s=i;if(0==e)return n;if(1==(e/=o))return n+i;if(a||(a=.3*o),s<Math.abs(i)){s=i;r=a/4}else r=a/(2*Math.PI)*Math.asin(i/s);return s*Math.pow(2,-10*e)*Math.sin((e*o-r)*(2*Math.PI)/a)+i+n},easeInOutElastic:function(t,e,n,i,o){var r=1.70158,a=0,s=i;if(0==e)return n;if(2==(e/=o/2))return n+i;if(a||(a=o*(.3*1.5)),s<Math.abs(i)){s=i;r=a/4}else r=a/(2*Math.PI)*Math.asin(i/s);return e<1?s*Math.pow(2,10*(e-=1))*Math.sin((e*o-r)*(2*Math.PI)/a)*-.5+n:s*Math.pow(2,-10*(e-=1))*Math.sin((e*o-r)*(2*Math.PI)/a)*.5+i+n},easeInBack:function(t,e,n,i,o,r){return null==r&&(r=1.70158),i*(e/=o)*e*((r+1)*e-r)+n},easeOutBack:function(t,e,n,i,o,r){return null==r&&(r=1.70158),i*((e=e/o-1)*e*((r+1)*e+r)+1)+n},easeInOutBack:function(t,e,n,i,o,r){return null==r&&(r=1.70158),(e/=o/2)<1?i/2*(e*e*((1+(r*=1.525))*e-r))+n:i/2*((e-=2)*e*((1+(r*=1.525))*e+r)+2)+n},easeInBounce:function(t,e,n,i,o){return i-jQuery.easing.easeOutBounce(t,o-e,0,i,o)+n},easeOutBounce:function(t,e,n,i,o){return(e/=o)<1/2.75?i*(7.5625*e*e)+n:e<2/2.75?i*(7.5625*(e-=1.5/2.75)*e+.75)+n:e<2.5/2.75?i*(7.5625*(e-=2.25/2.75)*e+.9375)+n:i*(7.5625*(e-=2.625/2.75)*e+.984375)+n},easeInOutBounce:function(t,e,n,i,o){return e<o/2?.5*jQuery.easing.easeInBounce(t,2*e,0,i,o)+n:.5*jQuery.easing.easeOutBounce(t,2*e-o,0,i,o)+.5*i+n}}),function(t){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],t):t(jQuery)}((function(t){function e(t){return t}function n(t){return decodeURIComponent(t.replace(o," "))}function i(t){0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return r.json?JSON.parse(t):t}catch(t){}}var o=/\+/g,r=t.cookie=function(o,a,s){if(void 0!==a){if("number"==typeof(s=t.extend({},r.defaults,s)).expires){var l=s.expires,c=s.expires=new Date;c.setDate(c.getDate()+l)}return a=r.json?JSON.stringify(a):String(a),document.cookie=[encodeURIComponent(o),"=",r.raw?a:encodeURIComponent(a),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("")}for(var u=r.raw?e:n,d=document.cookie.split("; "),h=o?void 0:{},p=0,f=d.length;p<f;p++){var m=d[p].split("="),g=u(m.shift()),v=u(m.join("="));if(o&&o===g){h=i(v);break}o||(h[g]=i(v))}return h};r.defaults={},t.removeCookie=function(e,n){return void 0!==t.cookie(e)&&(t.cookie(e,"",t.extend(n,{expires:-1})),!0)}})),function(t){t.fn.appear=function(e,n){var i=t.extend({data:void 0,one:!0,accX:0,accY:0},n);return this.each((function(){var n=t(this);if(n.appeared=!1,e){var o=t(window),r=function(){if(n.is(":visible")){var t=o.scrollLeft(),e=o.scrollTop(),r=n.offset(),a=r.left,s=r.top,l=i.accX,c=i.accY,u=n.height(),d=o.height(),h=n.width(),p=o.width();s+u+c>=e&&s<=e+d+c&&a+h+l>=t&&a<=t+p+l?n.appeared||n.trigger("appear",i.data):n.appeared=!1}else n.appeared=!1},a=function(){if(n.appeared=!0,i.one){o.unbind("scroll",r);var a=t.inArray(r,t.fn.appear.checks);a>=0&&t.fn.appear.checks.splice(a,1)}e.apply(this,arguments)};i.one?n.one("appear",i.data,a):n.bind("appear",i.data,a),o.scroll(r),t.fn.appear.checks.push(r),r()}else n.trigger("appear",i.data)}))},t.extend(t.fn.appear,{checks:[],timeout:null,checkAll:function(){var e=t.fn.appear.checks.length;if(e>0)for(;e--;)t.fn.appear.checks[e]()},run:function(){t.fn.appear.timeout&&clearTimeout(t.fn.appear.timeout),t.fn.appear.timeout=setTimeout(t.fn.appear.checkAll,20)}}),t.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],(function(e,n){var i=t.fn[n];i&&(t.fn[n]=function(){var e=i.apply(this,arguments);return t.fn.appear.run(),e})}))}(jQuery),function(t){function e(n,i){return this instanceof e?(t.isPlainObject(n)?i=n:(i=i||{}).alias=n,this.el=void 0,this.opts=t.extend(!0,{},this.defaults,i),this.noMasksCache=i&&void 0!==i.definitions,this.userOptions=i||{},this.events={},void o(this.opts.alias,i,this.opts)):new e(n,i)}function n(t){var e=document.createElement("input"),n="on"+t,i=n in e;return i||(e.setAttribute(n,"return;"),i="function"==typeof e[n]),e=null,i}function i(e,n){var i=e.getAttribute("type"),o="INPUT"===e.tagName&&-1!==t.inArray(i,n.supportsInputType)||e.isContentEditable||"TEXTAREA"===e.tagName;if(!o&&"INPUT"===e.tagName){var r=document.createElement("input");r.setAttribute("type",i),o="text"===r.type,r=null}return o}function o(e,n,i){var r=i.aliases[e];return r?(r.alias&&o(r.alias,void 0,i),t.extend(!0,i,r),t.extend(!0,i,n),!0):(null===i.mask&&(i.mask=e),!1)}function r(e,n,i){function r(t,n){null!==(n=void 0!==n?n:e.getAttribute("data-inputmask-"+t))&&("string"==typeof n&&(0===t.indexOf("on")?n=window[n]:"false"===n?n=!1:"true"===n&&(n=!0)),i[t]=n)}var a,s,l,c,u=e.getAttribute("data-inputmask");if(u&&""!==u&&(u=u.replace(new RegExp("'","g"),'"'),s=JSON.parse("{"+u+"}")),s)for(c in l=void 0,s)if("alias"===c.toLowerCase()){l=s[c];break}for(a in r("alias",l),i.alias&&o(i.alias,i,n),n){if(s)for(c in l=void 0,s)if(c.toLowerCase()===a.toLowerCase()){l=s[c];break}r(a,l)}return t.extend(!0,n,i),n}function a(n,i){function o(e){function i(t,e,n,i){this.matches=[],this.isGroup=t||!1,this.isOptional=e||!1,this.isQuantifier=n||!1,this.isAlternator=i||!1,this.quantifier={min:1,max:1}}function o(e,i,o){var r=n.definitions[i];o=void 0!==o?o:e.matches.length;var a=e.matches[o-1];if(r&&!v){r.placeholder=t.isFunction(r.placeholder)?r.placeholder(n):r.placeholder;for(var s=r.prevalidator,l=s?s.length:0,c=1;c<r.cardinality;c++){var u=l>=c?s[c-1]:[],d=u.validator,h=u.cardinality;e.matches.splice(o++,0,{fn:d?"string"==typeof d?new RegExp(d):new function(){this.test=d}:new RegExp("."),cardinality:h||1,optionality:e.isOptional,newBlockMarker:void 0===a||a.def!==(r.definitionSymbol||i),casing:r.casing,def:r.definitionSymbol||i,placeholder:r.placeholder,mask:i}),a=e.matches[o-1]}e.matches.splice(o++,0,{fn:r.validator?"string"==typeof r.validator?new RegExp(r.validator):new function(){this.test=r.validator}:new RegExp("."),cardinality:r.cardinality,optionality:e.isOptional,newBlockMarker:void 0===a||a.def!==(r.definitionSymbol||i),casing:r.casing,def:r.definitionSymbol||i,placeholder:r.placeholder,mask:i})}else e.matches.splice(o++,0,{fn:null,cardinality:0,optionality:e.isOptional,newBlockMarker:void 0===a||a.def!==i,casing:null,def:n.staticDefinitionSymbol||i,placeholder:void 0!==n.staticDefinitionSymbol?i:void 0,mask:i}),v=!1}function r(t,e){t.isGroup&&(t.isGroup=!1,o(t,n.groupmarker.start,0),!0!==e&&o(t,n.groupmarker.end))}function a(t,e,n,i){e.matches.length>0&&(void 0===i||i)&&r(e.matches[e.matches.length-1]),o(e,t)}function s(){if(_.length>0){if(h=_[_.length-1],a(u,h,f,!h.isAlternator),h.isAlternator){p=_.pop();for(var t=0;t<p.matches.length;t++)p.matches[t].isGroup=!1;_.length>0?(h=_[_.length-1]).matches.push(p):y.matches.push(p)}}else a(u,y,f)}function l(t){function e(t){return t===n.optionalmarker.start?t=n.optionalmarker.end:t===n.optionalmarker.end?t=n.optionalmarker.start:t===n.groupmarker.start?t=n.groupmarker.end:t===n.groupmarker.end&&(t=n.groupmarker.start),t}for(var i in t.matches=t.matches.reverse(),t.matches){var o=parseInt(i);if(t.matches[i].isQuantifier&&t.matches[o+1]&&t.matches[o+1].isGroup){var r=t.matches[i];t.matches.splice(i,1),t.matches.splice(o+1,0,r)}void 0!==t.matches[i].matches?t.matches[i]=l(t.matches[i]):t.matches[i]=e(t.matches[i])}return t}for(var c,u,d,h,p,f,m,g=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,v=!1,y=new i,_=[],b=[];c=g.exec(e);)if(u=c[0],v)s();else switch(u.charAt(0)){case n.escapeChar:v=!0;break;case n.optionalmarker.end:case n.groupmarker.end:if(void 0!==(d=_.pop()))if(_.length>0){if((h=_[_.length-1]).matches.push(d),h.isAlternator){p=_.pop();for(var w=0;w<p.matches.length;w++)p.matches[w].isGroup=!1;_.length>0?(h=_[_.length-1]).matches.push(p):y.matches.push(p)}}else y.matches.push(d);else s();break;case n.optionalmarker.start:_.push(new i(!1,!0));break;case n.groupmarker.start:_.push(new i(!0));break;case n.quantifiermarker.start:var x=new i(!1,!1,!0),k=(u=u.replace(/[{}]/g,"")).split(","),C=isNaN(k[0])?k[0]:parseInt(k[0]),S=1===k.length?C:isNaN(k[1])?k[1]:parseInt(k[1]);if(("*"===S||"+"===S)&&(C="*"===S?0:1),x.quantifier={min:C,max:S},_.length>0){var T=_[_.length-1].matches;(c=T.pop()).isGroup||((m=new i(!0)).matches.push(c),c=m),T.push(c),T.push(x)}else(c=y.matches.pop()).isGroup||((m=new i(!0)).matches.push(c),c=m),y.matches.push(c),y.matches.push(x);break;case n.alternatormarker:_.length>0?(h=_[_.length-1],f=h.matches.pop()):f=y.matches.pop(),f.isAlternator?_.push(f):((p=new i(!1,!1,!1,!0)).matches.push(f),_.push(p));break;default:s()}for(;_.length>0;)r(d=_.pop(),!0),y.matches.push(d);return y.matches.length>0&&(r(f=y.matches[y.matches.length-1]),b.push(y)),n.numericInput&&l(b[0]),b}function r(r,a){if(null!==r&&""!==r){if(1===r.length&&!1===n.greedy&&0!==n.repeat&&(n.placeholder=""),n.repeat>0||"*"===n.repeat||"+"===n.repeat){var s="*"===n.repeat?0:"+"===n.repeat?1:n.repeat;r=n.groupmarker.start+r+n.groupmarker.end+n.quantifiermarker.start+s+","+n.repeat+n.quantifiermarker.end}var l;return void 0===e.prototype.masksCache[r]||!0===i?(l={mask:r,maskToken:o(r),validPositions:{},_buffer:void 0,buffer:void 0,tests:{},metadata:a},!0!==i&&(e.prototype.masksCache[n.numericInput?r.split("").reverse().join(""):r]=l,l=t.extend(!0,{},e.prototype.masksCache[n.numericInput?r.split("").reverse().join(""):r]))):l=t.extend(!0,{},e.prototype.masksCache[n.numericInput?r.split("").reverse().join(""):r]),l}}function a(t){return t.toString()}var s;if(t.isFunction(n.mask)&&(n.mask=n.mask(n)),t.isArray(n.mask)){if(n.mask.length>1){n.keepStatic=null===n.keepStatic||n.keepStatic;var l="(";return t.each(n.numericInput?n.mask.reverse():n.mask,(function(e,n){l.length>1&&(l+=")|("),l+=a(void 0===n.mask||t.isFunction(n.mask)?n:n.mask)})),r(l+=")",n.mask)}n.mask=n.mask.pop()}return n.mask&&(s=void 0===n.mask.mask||t.isFunction(n.mask.mask)?r(a(n.mask),n.mask):r(a(n.mask.mask),n.mask)),s}function s(o,r,a){function l(t,e,n){e=e||0;var i,o,r,s=[],l=0,c=f();do{if(!0===t&&h().validPositions[l]){var u=h().validPositions[l];o=u.match,i=u.locator.slice(),s.push(!0===n?u.input:P(l,o))}else o=(r=v(l,i,l-1)).match,i=r.locator.slice(),(!1===a.jitMasking||c>l||isFinite(a.jitMasking)&&a.jitMasking>l)&&s.push(P(l,o));l++}while((void 0===st||st>l-1)&&null!==o.fn||null===o.fn&&""!==o.def||e>=l);return""===s[s.length-1]&&s.pop(),s}function h(){return r}function p(t){var e=h();e.buffer=void 0,!0!==t&&(e.tests={},e._buffer=void 0,e.validPositions={},e.p=0)}function f(t,e,n){var i=-1,o=-1,r=n||h().validPositions;for(var a in void 0===t&&(t=-1),r){var s=parseInt(a);r[s]&&(e||null!==r[s].match.fn)&&(t>=s&&(i=s),s>=t&&(o=s))}return-1!==i&&t-i>1||t>o?i:o}function m(e,n,i,o){if(o||a.insertMode&&void 0!==h().validPositions[e]&&void 0===i){var r,s=t.extend(!0,{},h().validPositions),l=f();for(r=e;l>=r;r++)delete h().validPositions[r];h().validPositions[e]=n;var c,u=!0,d=h().validPositions,m=!1;for(r=c=e;l>=r;r++){var g=s[r];if(void 0!==g)for(var v=c,y=-1;v<D()&&(null==g.match.fn&&d[r]&&(!0===d[r].match.optionalQuantifier||!0===d[r].match.optionality)||null!=g.match.fn);){if(null===g.match.fn||!a.keepStatic&&d[r]&&(void 0!==d[r+1]&&w(r+1,d[r].locator.slice(),r).length>1||void 0!==d[r].alternation)?v++:v=A(c),!1===m&&s[v]&&s[v].match.def===g.match.def){h().validPositions[v]=t.extend(!0,{},s[v]),h().validPositions[v].input=g.input,c=v,u=!0;break}if(_(v,g.match.def)){var b=E(v,g.input,!0,!0);if(u=!1!==b,c=b.caret||b.insert?f():v,m=!0,u)break}else{if(u=null==g.match.fn,y===v)break;y=v}}if(!u)break}if(!u)return h().validPositions=t.extend(!0,{},s),p(!0),!1}else h().validPositions[e]=n;return p(!0),!0}function g(e,n,i,o){function r(t){var e=h().validPositions[t];if(void 0!==e&&null===e.match.fn){var n=h().validPositions[t-1],i=h().validPositions[t+1];return void 0!==n&&void 0!==i}return!1}var s,l=e,c=t.extend(!0,{},h().validPositions),u=!1;for(h().p=e,s=n-1;s>=l;s--)void 0!==h().validPositions[s]&&(!0===i||!r(s)&&!1!==a.canClearPosition(h(),s,f(),o,a))&&delete h().validPositions[s];for(p(!0),s=l+1;s<=f();){for(;void 0!==h().validPositions[l];)l++;var d=h().validPositions[l];if(l>s&&(s=l+1),void 0===h().validPositions[s]&&$(s)||void 0!==d)s++;else{var m=v(s);!1===u&&c[l]&&c[l].match.def===m.match.def?(h().validPositions[l]=t.extend(!0,{},c[l]),h().validPositions[l].input=m.input,delete h().validPositions[s],s++):_(l,m.match.def)?!1!==E(l,m.input||P(s),!0)&&(delete h().validPositions[s],s++,u=!0):$(s)||(s++,l--),l++}}p(!0)}function v(t,e,n){var i=h().validPositions[t];if(void 0===i)for(var o=w(t,e,n),r=f(),s=h().validPositions[r]||w(0)[0],l=void 0!==s.alternation?s.locator[s.alternation].toString().split(","):[],c=0;c<o.length&&!((i=o[c]).match&&(a.greedy&&!0!==i.match.optionalQuantifier||(!1===i.match.optionality||!1===i.match.newBlockMarker)&&!0!==i.match.optionalQuantifier)&&(void 0===s.alternation||s.alternation!==i.alternation||void 0!==i.locator[s.alternation]&&T(i.locator[s.alternation].toString().split(","),l)));c++);return i}function y(t){return h().validPositions[t]?h().validPositions[t].match:w(t)[0].match}function _(t,e){for(var n=!1,i=w(t),o=0;o<i.length;o++)if(i[o].match&&i[o].match.def===e){n=!0;break}return n}function b(e,n){var i,o;return(h().tests[e]||h().validPositions[e])&&t.each(h().tests[e]||[h().validPositions[e]],(function(t,e){var r=e.alternation?e.locator[e.alternation].toString().indexOf(n):-1;(void 0===o||o>r)&&-1!==r&&(i=e,o=r)})),i}function w(e,n,i){function o(n,i,r,s){function c(r,s,f){function m(e,n){var i=0===t.inArray(e,n.matches);return i||t.each(n.matches,(function(t,o){return(!0!==o.isQuantifier||!(i=m(e,n.matches[t-1])))&&void 0})),i}function g(t,e){var n=b(t,e);return n?n.locator.slice(n.alternation+1):[]}if(l>1e4)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+h().mask;if(l===e&&void 0===r.matches)return u.push({match:r,locator:s.reverse(),cd:p}),!0;if(void 0!==r.matches){if(r.isGroup&&f!==r){if(r=c(n.matches[t.inArray(r,n.matches)+1],s))return!0}else if(r.isOptional){var v=r;if(r=o(r,i,s,f)){if(!m(a=u[u.length-1].match,v))return!0;d=!0,l=e}}else if(r.isAlternator){var y,_=r,w=[],x=u.slice(),k=s.length,C=i.length>0?i.shift():-1;if(-1===C||"string"==typeof C){var S,T=l,E=i.slice(),$=[];if("string"==typeof C)$=C.split(",");else for(S=0;S<_.matches.length;S++)$.push(S);for(var D=0;D<$.length;D++){if(S=parseInt($[D]),u=[],i=g(l,S),!0!==(r=c(_.matches[S]||n.matches[S],[S].concat(s),f)||r)&&void 0!==r&&$[$.length-1]<_.matches.length){var A=t.inArray(r,n.matches)+1;n.matches.length>A&&((r=c(n.matches[A],[A].concat(s.slice(1,s.length)),f))&&($.push(A.toString()),t.each(u,(function(t,e){e.alternation=s.length-1}))))}y=u.slice(),l=T,u=[];for(var j=0;j<E.length;j++)i[j]=E[j];for(var M=0;M<y.length;M++){var I=y[M];I.alternation=I.alternation||k;for(var P=0;P<w.length;P++){var O=w[P];if(I.match.def===O.match.def&&("string"!=typeof C||-1!==t.inArray(I.locator[I.alternation].toString(),$))){I.match.mask===O.match.mask&&(y.splice(M,1),M--),-1===O.locator[I.alternation].toString().indexOf(I.locator[I.alternation])&&(O.locator[I.alternation]=O.locator[I.alternation]+","+I.locator[I.alternation],O.alternation=I.alternation);break}}}w=w.concat(y)}"string"==typeof C&&(w=t.map(w,(function(e,n){if(isFinite(n)){var i=e.alternation,o=e.locator[i].toString().split(",");e.locator[i]=void 0,e.alternation=void 0;for(var r=0;r<o.length;r++)-1!==t.inArray(o[r],$)&&(void 0!==e.locator[i]?(e.locator[i]+=",",e.locator[i]+=o[r]):e.locator[i]=parseInt(o[r]),e.alternation=i);if(void 0!==e.locator[i])return e}}))),u=x.concat(w),l=e,d=u.length>0}else r=c(_.matches[C]||n.matches[C],[C].concat(s),f);if(r)return!0}else if(r.isQuantifier&&f!==n.matches[t.inArray(r,n.matches)-1])for(var N=r,L=i.length>0?i.shift():0;L<(isNaN(N.quantifier.max)?L+1:N.quantifier.max)&&e>=l;L++){var F=n.matches[t.inArray(N,n.matches)-1];if(r=c(F,[L].concat(s),F)){if((a=u[u.length-1].match).optionalQuantifier=L>N.quantifier.min-1,m(a,F)){if(L>N.quantifier.min-1){d=!0,l=e;break}return!0}return!0}}else if(r=o(r,i,s,f))return!0}else l++}for(var f=i.length>0?i.shift():0;f<n.matches.length;f++)if(!0!==n.matches[f].isQuantifier){var m=c(n.matches[f],[f].concat(r),s);if(m&&l===e)return m;if(l>e)break}}function r(e){var n=[];return t.isArray(e)||(e=[e]),void 0===e[0].alternation?n=e[0].locator.slice():t.each(e,(function(t,e){if(""!==e.def)if(0===n.length)n=e.locator.slice();else for(var i=0;i<n.length;i++)e.locator[i]&&-1===n[i].toString().indexOf(e.locator[i])&&(n[i]+=","+e.locator[i])})),n}var a,s=h().maskToken,l=n?i:0,c=n||[0],u=[],d=!1,p=n?n.join(""):"";if(e>-1){if(void 0===n){for(var f,m=e-1;void 0===(f=h().validPositions[m]||h().tests[m])&&m>-1;)m--;void 0!==f&&m>-1&&(c=r(f),p=c.join(""),l=m)}if(h().tests[e]&&h().tests[e][0].cd===p)return h().tests[e];for(var g=c.shift();g<s.length;g++){if(o(s[g],c,[g])&&l===e||l>e)break}}return(0===u.length||d)&&u.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:""},locator:[]}),h().tests[e]=t.extend(!0,[],u),h().tests[e]}function x(){return void 0===h()._buffer&&(h()._buffer=l(!1,1)),h()._buffer}function k(t){if(void 0===h().buffer||!0===t){if(!0===t)for(var e in h().tests)void 0===h().validPositions[e]&&delete h().tests[e];h().buffer=l(!0,f(),!0)}return h().buffer}function C(t,e,n){var i;if(!0===t)p(),t=0,e=n.length;else for(i=t;e>i;i++)delete h().validPositions[i],delete h().tests[i];for(i=t;e>i;i++)p(!0),n[i]!==a.skipOptionalPartCharacter&&E(i,n[i],!0,!0)}function S(t,e){switch(e.casing){case"upper":t=t.toUpperCase();break;case"lower":t=t.toLowerCase()}return t}function T(e,n){for(var i=a.greedy?n:n.slice(0,1),o=!1,r=0;r<e.length;r++)if(-1!==t.inArray(e[r],i)){o=!0;break}return o}function E(n,i,o,r){function s(t){return ct?t.begin-t.end>1||t.begin-t.end==1&&a.insertMode:t.end-t.begin>1||t.end-t.begin==1&&a.insertMode}function l(e,i,o,r){var l=!1;return t.each(w(e),(function(c,u){for(var d=u.match,v=i?1:0,y="",_=d.cardinality;_>v;_--)y+=M(e-(_-1));if(i&&(y+=i),k(!0),!1!==(l=null!=d.fn?d.fn.test(y,h(),e,o,a,s(n)):(i===d.def||i===a.skipOptionalPartCharacter)&&""!==d.def&&{c:d.placeholder||d.def,pos:e})){var b=void 0!==l.c?l.c:i;b=b===a.skipOptionalPartCharacter&&null===d.fn?d.placeholder||d.def:b;var w=e,x=k();if(void 0!==l.remove&&(t.isArray(l.remove)||(l.remove=[l.remove]),t.each(l.remove.sort((function(t,e){return e-t})),(function(t,e){g(e,e+1,!0)}))),void 0!==l.insert&&(t.isArray(l.insert)||(l.insert=[l.insert]),t.each(l.insert.sort((function(t,e){return t-e})),(function(t,e){E(e.pos,e.c,!1,r)}))),l.refreshFromBuffer){var T=l.refreshFromBuffer;if(o=!0,C(!0===T?T:T.start,T.end,x),void 0===l.pos&&void 0===l.c)return l.pos=f(),!1;if((w=void 0!==l.pos?l.pos:e)!==e)return l=t.extend(l,E(w,b,!0,r)),!1}else if(!0!==l&&void 0!==l.pos&&l.pos!==e&&(w=l.pos,C(e,w,k().slice()),w!==e))return l=t.extend(l,E(w,b,!0)),!1;return!0!==l&&void 0===l.pos&&void 0===l.c||(c>0&&p(!0),m(w,t.extend({},u,{input:S(b,d)}),r,s(n))||(l=!1)),!1}})),l}function c(e,n,i,o){for(var r,s,l,c,u,d,m=t.extend(!0,{},h().validPositions),g=t.extend(!0,{},h().tests),y=f();y>=0&&(!(c=h().validPositions[y])||void 0===c.alternation||(r=y,s=h().validPositions[r].alternation,v(r).locator[c.alternation]===c.locator[c.alternation]));y--);if(void 0!==s)for(var _ in r=parseInt(r),h().validPositions)if(_=parseInt(_),c=h().validPositions[_],_>=r&&void 0!==c.alternation){var w;0===r?(w=[],t.each(h().tests[r],(function(t,e){void 0!==e.locator[s]&&(w=w.concat(e.locator[s].toString().split(",")))}))):w=h().validPositions[r].locator[s].toString().split(",");var x=void 0!==c.locator[s]?c.locator[s]:w[0];x.length>0&&(x=x.split(",")[0]);for(var k=0;k<w.length;k++){var C=[],S=0,T=0;if(x<w[k]){for(var $,D,A=_;A>=0;A--)if(void 0!==($=h().validPositions[A])){var j=b(A,w[k]);h().validPositions[A].match.def!==j.match.def&&(C.push(h().validPositions[A].input),h().validPositions[A]=j,h().validPositions[A].input=P(A),null===h().validPositions[A].match.fn&&T++,$=j),D=$.locator[s],$.locator[s]=parseInt(w[k]);break}if(x!==$.locator[s]){for(u=_+1;u<f(void 0,!0)+1;u++)(d=h().validPositions[u])&&null!=d.match.fn?C.push(d.input):e>u&&S++,delete h().validPositions[u],delete h().tests[u];for(p(!0),a.keepStatic=!a.keepStatic,l=!0;C.length>0;){var M=C.shift();if(M!==a.skipOptionalPartCharacter&&!(l=E(f(void 0,!0)+1,M,!1,o)))break}if($.alternation=s,$.locator[s]=D,l){var I=f(e)+1;for(u=_+1;u<f()+1;u++)(void 0===(d=h().validPositions[u])||null==d.match.fn)&&e>u&&T++;l=E((e+=T-S)>I?I:e,n,i,o)}if(a.keepStatic=!a.keepStatic,l)return l;p(),h().validPositions=t.extend(!0,{},m),h().tests=t.extend(!0,{},g)}}}break}return!1}function u(e,n){for(var i=h().validPositions[n].locator,o=i.length,r=e;n>r;r++)if(void 0===h().validPositions[r]&&!$(r,!0)){var a=w(r),s=a[0],l=-1;t.each(a,(function(t,e){for(var n=0;o>n&&void 0!==e.locator[n]&&T(e.locator[n].toString().split(","),i[n].toString().split(","));n++)n>l&&(l=n,s=e)})),m(r,t.extend({},s,{input:s.match.placeholder||s.match.def}),!0)}}o=!0===o;var d,y=n;void 0!==n.begin&&(y=ct&&!s(n)?n.end:n.begin);for(var _=!1,x=t.extend(!0,{},h().validPositions),j=y-1;j>-1&&!h().validPositions[j];j--);for(j++;y>j;j++)void 0===h().validPositions[j]&&(!1===a.jitMasking||a.jitMasking>j)&&((d=v(j)).match.def===a.radixPointDefinitionSymbol||!$(j,!0)||t.inArray(a.radixPoint,k())<j&&d.match.fn&&d.match.fn.test(P(j),h(),j,!1,a))&&l(f(j,!0)+1,d.match.placeholder||(null==d.match.fn?d.match.def:""!==P(j)?P(j):k()[j]),!0,r);if(s(n)&&(H(void 0,e.keyCode.DELETE,n),y=h().p),y<D()&&(_=l(y,i,o,r),(!o||!0===r)&&!1===_)){var I=h().validPositions[y];if(!I||null!==I.match.fn||I.match.def!==i&&i!==a.skipOptionalPartCharacter){if((a.insertMode||void 0===h().validPositions[A(y)])&&!$(y,!0)){var O=v(y).match;l(y,O=O.placeholder||O.def,o,r);for(var N=y+1,L=A(y);L>=N;N++)if(!1!==(_=l(N,i,o,r))){u(y,N),y=N;break}}}else _={caret:A(y)}}return!1===_&&a.keepStatic&&(_=c(y,i,o,r)),!0===_&&(_={pos:y}),t.isFunction(a.postValidation)&&!1!==_&&!o&&!0!==r&&(_=!!a.postValidation(k(!0),_,a)&&_),void 0===_.pos&&(_.pos=y),!1===_&&(p(!0),h().validPositions=t.extend(!0,{},x)),_}function $(t,e){var n;return e?""===(n=v(t).match).def&&(n=y(t)):n=y(t),null!=n.fn?n.fn:!0!==e&&t>-1&&!a.keepStatic&&void 0===h().validPositions[t]&&w(t).length>2}function D(){var t;-1===(st=void 0!==rt?rt.maxLength:void 0)&&(st=void 0);var e,n=f(),i=h().validPositions[n],o=void 0!==i?i.locator.slice():void 0;for(e=n+1;void 0===i||null!==i.match.fn||null===i.match.fn&&""!==i.match.def;e++)o=(i=v(e,o,e-1)).locator.slice();return t=""!==y(e-1).def?e:e-1,void 0===st||st>t?t:st}function A(t,e){var n=D();if(t>=n)return n;for(var i=t;++i<n&&(!0===e&&(!0!==y(i).newBlockMarker||!$(i))||!0!==e&&!$(i)&&(!0!==a.nojumps||a.nojumpsThreshold>i)););return i}function j(t,e){var n=t;if(0>=n)return 0;for(;--n>0&&(!0===e&&!0!==y(n).newBlockMarker||!0!==e&&!$(n)););return n}function M(t){return void 0===h().validPositions[t]?P(t):h().validPositions[t].input}function I(e,n,i,o,r){if(o&&t.isFunction(a.onBeforeWrite)){var s=a.onBeforeWrite(o,n,i,a);if(s){if(s.refreshFromBuffer){var l=s.refreshFromBuffer;C(!0===l?l:l.start,l.end,s.buffer||n),n=k(!0)}void 0!==i&&(i=void 0!==s.caret?s.caret:i)}}e.inputmask._valueSet(n.join("")),void 0===i||void 0!==o&&"blur"===o.type||L(e,i),!0===r&&(dt=!0,t(e).trigger("input"))}function P(t,e){if(void 0!==(e=e||y(t)).placeholder)return e.placeholder;if(null===e.fn){if(t>-1&&!a.keepStatic&&void 0===h().validPositions[t]){var n,i=w(t),o=[];if(i.length>2)for(var r=0;r<i.length;r++)if(!0!==i[r].match.optionality&&!0!==i[r].match.optionalQuantifier&&(null===i[r].match.fn||void 0===n||!1!==i[r].match.fn.test(n.match.def,h(),t,!0,a))&&(o.push(i[r]),null===i[r].match.fn&&(n=i[r]),o.length>1))return a.placeholder.charAt(t%a.placeholder.length)}return e.def}return a.placeholder.charAt(t%a.placeholder.length)}function O(n,i,o,r){function s(){var t=!1,e=x().slice(d,A(d)).join("").indexOf(u);if(-1!==e&&!$(d)){t=!0;for(var n=x().slice(d,d+e),i=0;i<n.length;i++)if(" "!==n[i]){t=!1;break}}return t}var l,c=r.slice(),u="",d=0;if(p(),h().p=A(-1),!o)if(!0!==a.autoUnmask){var m=x().slice(0,A(-1)).join(""),g=c.join("").match(new RegExp("^"+e.escapeRegex(m),"g"));g&&g.length>0&&(c.splice(0,g.length*m.length),d=A(d))}else d=A(d);t.each(c,(function(e,i){if(void 0!==i){var r=new t.Event("keypress");r.which=i.charCodeAt(0),u+=i;var c=f(void 0,!0),m=h().validPositions[c],g=v(c+1,m?m.locator.slice():void 0,c);if(!s()||o||a.autoUnmask){var y=o?e:null==g.match.fn&&g.match.optionality&&c+1<h().p?c+1:h().p;l=z.call(n,r,!0,!1,o,y),d=y+1,u=""}else l=z.call(n,r,!0,!1,!0,c+1);if(!o&&t.isFunction(a.onBeforeWrite)&&((l=a.onBeforeWrite(r,k(),l.forwardPosition,a))&&l.refreshFromBuffer)){var _=l.refreshFromBuffer;C(!0===_?_:_.start,_.end,l.buffer),p(!0),l.caret&&(h().p=l.caret)}}})),i&&I(n,k(),document.activeElement===n?A(f(0)):void 0,new t.Event("checkval"))}function N(e){if(e&&void 0===e.inputmask)return e.value;var n=[],i=h().validPositions;for(var o in i)i[o].match&&null!=i[o].match.fn&&n.push(i[o].input);var r=0===n.length?null:(ct?n.reverse():n).join("");if(null!==r){var s=(ct?k().slice().reverse():k()).join("");t.isFunction(a.onUnMask)&&(r=a.onUnMask(s,r,a)||r)}return r}function L(t,e,n,i){function o(t){!0===i||!ct||"number"!=typeof t||a.greedy&&""===a.placeholder||(t=k().join("").length-t);return t}var r;if("number"!=typeof e)return t.setSelectionRange?(e=t.selectionStart,n=t.selectionEnd):window.getSelection?((r=window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode===t||r.commonAncestorContainer===t)&&(e=r.startOffset,n=r.endOffset):document.selection&&document.selection.createRange&&(n=(e=0-(r=document.selection.createRange()).duplicate().moveStart("character",-t.inputmask._valueGet().length))+r.text.length),{begin:o(e),end:o(n)};e=o(e),n="number"==typeof(n=o(n))?n:e;var s=parseInt(((t.ownerDocument.defaultView||window).getComputedStyle?(t.ownerDocument.defaultView||window).getComputedStyle(t,null):t.currentStyle).fontSize)*n;if(t.scrollLeft=s>t.scrollWidth?s:0,c||!1!==a.insertMode||e!==n||n++,t.setSelectionRange)t.selectionStart=e,t.selectionEnd=n;else if(window.getSelection){if(r=document.createRange(),void 0===t.firstChild||null===t.firstChild){var l=document.createTextNode("");t.appendChild(l)}r.setStart(t.firstChild,e<t.inputmask._valueGet().length?e:t.inputmask._valueGet().length),r.setEnd(t.firstChild,n<t.inputmask._valueGet().length?n:t.inputmask._valueGet().length),r.collapse(!0);var u=window.getSelection();u.removeAllRanges(),u.addRange(r)}else t.createTextRange&&((r=t.createTextRange()).collapse(!0),r.moveEnd("character",n),r.moveStart("character",e),r.select())}function F(e){var n,i,o=k(),r=o.length,a=f(),s={},l=h().validPositions[a],c=void 0!==l?l.locator.slice():void 0;for(n=a+1;n<o.length;n++)c=(i=v(n,c,n-1)).locator.slice(),s[n]=t.extend(!0,{},i);var u=l&&void 0!==l.alternation?l.locator[l.alternation]:void 0;for(n=r-1;n>a&&(((i=s[n]).match.optionality||i.match.optionalQuantifier||u&&(u!==s[n].locator[l.alternation]&&null!=i.match.fn||null===i.match.fn&&i.locator[l.alternation]&&T(i.locator[l.alternation].toString().split(","),u.toString().split(","))&&""!==w(n)[0].def))&&o[n]===P(n,i.match));n--)r--;return e?{l:r,def:s[r]?s[r].match:void 0}:r}function R(t){for(var e=F(),n=t.length-1;n>e&&!$(n);n--);return t.splice(e,n+1-e),t}function q(e){if(t.isFunction(a.isComplete))return a.isComplete(e,a);if("*"!==a.repeat){var n=!1,i=F(!0),o=j(i.l)
;if(void 0===i.def||i.def.newBlockMarker||i.def.optionality||i.def.optionalQuantifier){n=!0;for(var r=0;o>=r;r++){var s=v(r).match;if(null!==s.fn&&void 0===h().validPositions[r]&&!0!==s.optionality&&!0!==s.optionalQuantifier||null===s.fn&&e[r]!==P(r,s)){n=!1;break}}}return n}}function B(e){function n(e){if(t.valHooks&&(void 0===t.valHooks[e]||!0!==t.valHooks[e].inputmaskpatch)){var n=t.valHooks[e]&&t.valHooks[e].get?t.valHooks[e].get:function(t){return t.value},i=t.valHooks[e]&&t.valHooks[e].set?t.valHooks[e].set:function(t,e){return t.value=e,t};t.valHooks[e]={get:function(t){if(t.inputmask){if(t.inputmask.opts.autoUnmask)return t.inputmask.unmaskedvalue();var e=n(t);return-1!==f(void 0,void 0,t.inputmask.maskset.validPositions)||!0!==a.nullable?e:""}return n(t)},set:function(e,n){var o,r=t(e);return o=i(e,n),e.inputmask&&r.trigger("setvalue"),o},inputmaskpatch:!0}}}function i(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==f()||!0!==a.nullable?document.activeElement===this&&a.clearMaskOnLostFocus?(ct?R(k().slice()).reverse():R(k().slice())).join(""):s.call(this):"":s.call(this)}function o(e){l.call(this,e),this.inputmask&&t(this).trigger("setvalue")}function r(e){ft.on(e,"mouseenter",(function(){var e=t(this);this.inputmask._valueGet()!==k().join("")&&e.trigger("setvalue")}))}var s,l;if(!e.inputmask.__valueGet){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"==typeof"test".__proto__?function(t){return t.__proto__}:function(t){return t.constructor.prototype});var c=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value"):void 0;c&&c.get&&c.set?(s=c.get,l=c.set,Object.defineProperty(e,"value",{get:i,set:o,configurable:!0})):"INPUT"!==e.tagName&&(s=function(){return this.textContent},l=function(t){this.textContent=t},Object.defineProperty(e,"value",{get:i,set:o,configurable:!0}))}else document.__lookupGetter__&&e.__lookupGetter__("value")&&(s=e.__lookupGetter__("value"),l=e.__lookupSetter__("value"),e.__defineGetter__("value",i),e.__defineSetter__("value",o));e.inputmask.__valueGet=s,e.inputmask._valueGet=function(t){return ct&&!0!==t?s.call(this.el).split("").reverse().join(""):s.call(this.el)},e.inputmask.__valueSet=l,e.inputmask._valueSet=function(t,e){l.call(this.el,null==t?"":!0!==e&&ct?t.split("").reverse().join(""):t)},void 0===s&&(s=function(){return this.value},l=function(t){this.value=t},n(e.type),r(e))}}function H(n,i,o,r){function s(){if(a.keepStatic){p(!0);var e,i=[],o=t.extend(!0,{},h().validPositions);for(e=f();e>=0;e--){var r=h().validPositions[e];if(r&&(null!=r.match.fn&&i.push(r.input),delete h().validPositions[e],void 0!==r.alternation&&r.locator[r.alternation]===v(e).locator[r.alternation]))break}if(e>-1)for(;i.length>0;){h().p=A(f());var s=new t.Event("keypress");s.which=i.pop().charCodeAt(0),z.call(n,s,!0,!1,!1,h().p)}else h().validPositions=t.extend(!0,{},o)}}if((a.numericInput||ct)&&(i===e.keyCode.BACKSPACE?i=e.keyCode.DELETE:i===e.keyCode.DELETE&&(i=e.keyCode.BACKSPACE),ct)){var l=o.end;o.end=o.begin,o.begin=l}i===e.keyCode.BACKSPACE&&(o.end-o.begin<1||!1===a.insertMode)?(o.begin=j(o.begin),void 0===h().validPositions[o.begin]||h().validPositions[o.begin].input!==a.groupSeparator&&h().validPositions[o.begin].input!==a.radixPoint||o.begin--):i===e.keyCode.DELETE&&o.begin===o.end&&(o.end=$(o.end)?o.end+1:A(o.end)+1,void 0===h().validPositions[o.begin]||h().validPositions[o.begin].input!==a.groupSeparator&&h().validPositions[o.begin].input!==a.radixPoint||o.end++),g(o.begin,o.end,!1,r),!0!==r&&s();var c=f(o.begin);c<o.begin?(-1===c&&p(),h().p=A(c)):!0!==r&&(h().p=o.begin)}function U(i){var o=this,r=t(o),s=i.keyCode,l=L(o);if(s===e.keyCode.BACKSPACE||s===e.keyCode.DELETE||d&&s===e.keyCode.BACKSPACE_SAFARI||i.ctrlKey&&s===e.keyCode.X&&!n("cut"))i.preventDefault(),H(o,s,l),I(o,k(),h().p,i,ot!==k().join("")),o.inputmask._valueGet()===x().join("")?r.trigger("cleared"):!0===q(k())&&r.trigger("complete"),a.showTooltip&&(o.title=a.tooltip||h().mask);else if(s===e.keyCode.END||s===e.keyCode.PAGE_DOWN){i.preventDefault();var c=A(f());a.insertMode||c!==D()||i.shiftKey||c--,L(o,i.shiftKey?l.begin:c,c,!0)}else s===e.keyCode.HOME&&!i.shiftKey||s===e.keyCode.PAGE_UP?(i.preventDefault(),L(o,0,i.shiftKey?l.begin:0,!0)):(a.undoOnEscape&&s===e.keyCode.ESCAPE||90===s&&i.ctrlKey)&&!0!==i.altKey?(O(o,!0,!1,ot.split("")),r.trigger("click")):s!==e.keyCode.INSERT||i.shiftKey||i.ctrlKey?!0===a.tabThrough&&s===e.keyCode.TAB?(!0===i.shiftKey?(null===y(l.begin).fn&&(l.begin=A(l.begin)),l.end=j(l.begin,!0),l.begin=j(l.end,!0)):(l.begin=A(l.begin,!0),l.end=A(l.begin,!0),l.end<D()&&l.end--),l.begin<D()&&(i.preventDefault(),L(o,l.begin,l.end))):!1!==a.insertMode||i.shiftKey||(s===e.keyCode.RIGHT?setTimeout((function(){var t=L(o);L(o,t.begin)}),0):s===e.keyCode.LEFT&&setTimeout((function(){var t=L(o);L(o,ct?t.begin+1:t.begin-1)}),0)):(a.insertMode=!a.insertMode,L(o,a.insertMode||l.begin!==D()?l.begin:l.begin-1));a.onKeyDown.call(this,i,k(),L(o).begin,a),ht=-1!==t.inArray(s,a.ignorables)}function z(n,i,o,r,s){var l=this,c=t(l),u=n.which||n.charCode||n.keyCode;if(!(!0===i||n.ctrlKey&&n.altKey)&&(n.ctrlKey||n.metaKey||ht))return u===e.keyCode.ENTER&&ot!==k().join("")&&(ot=k().join(""),setTimeout((function(){c.trigger("change")}),0)),!0;if(u){46===u&&!1===n.shiftKey&&","===a.radixPoint&&(u=44);var d,f=i?{begin:s,end:s}:L(l),m=String.fromCharCode(u);h().writeOutBuffer=!0;var g=E(f,m,r);if(!1!==g){var v=g.pos;if(p(!0),void 0!==g.caret)d=g.caret;else{var y=h().validPositions;d=!a.keepStatic&&(void 0!==y[v+1]&&w(v+1,y[v].locator.slice(),v).length>1||void 0!==y[v].alternation)?v+1:A(v)}h().p=d}if(!1!==o){var _=this;if(setTimeout((function(){a.onKeyValidation.call(_,u,g,a)}),0),h().writeOutBuffer&&!1!==g){var b=k();I(l,b,a.numericInput&&void 0===g.caret?j(d):d,n,!0!==i),!0!==i&&setTimeout((function(){!0===q(b)&&c.trigger("complete")}),0)}}if(a.showTooltip&&(l.title=a.tooltip||h().mask),n.preventDefault(),i)return g.forwardPosition=d,g}}function W(e){var n,i=this,o=e.originalEvent||e,r=t(i),s=i.inputmask._valueGet(!0),l=L(i);ct&&(n=l.end,l.end=l.begin,l.begin=n);var c=s.substr(0,l.begin),u=s.substr(l.end,s.length);c===(ct?x().reverse():x()).slice(0,l.begin).join("")&&(c=""),u===(ct?x().reverse():x()).slice(l.end).join("")&&(u=""),ct&&(n=c,c=u,u=n),window.clipboardData&&window.clipboardData.getData?s=c+window.clipboardData.getData("Text")+u:o.clipboardData&&o.clipboardData.getData&&(s=c+o.clipboardData.getData("text/plain")+u);var d=s;if(t.isFunction(a.onBeforePaste)){if(!1===(d=a.onBeforePaste(s,a)))return e.preventDefault();d||(d=s)}return O(i,!1,!1,ct?d.split("").reverse():d.toString().split("")),I(i,k(),A(f()),e,!0),!0===q(k())&&r.trigger("complete"),e.preventDefault()}function Q(n){var i=this,o=i.inputmask._valueGet();if(k().join("")!==o){var r=L(i);if(o=o.replace(new RegExp("("+e.escapeRegex(x().join(""))+")*"),""),u){var a=o.replace(k().join(""),"");if(1===a.length){var s=new t.Event("keypress");return s.which=a.charCodeAt(0),z.call(i,s,!0,!0,!1,h().validPositions[r.begin-1]?r.begin:r.begin-1),!1}}if(r.begin>o.length&&(L(i,o.length),r=L(i)),k().length-o.length!=1||o.charAt(r.begin)===k()[r.begin]||o.charAt(r.begin+1)===k()[r.begin]||$(r.begin)){for(var l=f()+1,c=k().slice(l).join("");null===o.match(e.escapeRegex(c)+"$");)c=c.slice(1);O(i,!0,!1,o=(o=o.replace(c,"")).split("")),!0===q(k())&&t(i).trigger("complete")}else n.keyCode=e.keyCode.BACKSPACE,U.call(i,n);n.preventDefault()}}function V(){var e=this,n=e.inputmask._valueGet();O(e,!0,!1,(t.isFunction(a.onBeforeMask)&&a.onBeforeMask(n,a)||n).split("")),ot=k().join(""),(a.clearMaskOnLostFocus||a.clearIncomplete)&&e.inputmask._valueGet()===x().join("")&&e.inputmask._valueSet("")}function G(){var t=this,e=t.inputmask._valueGet();a.showMaskOnFocus&&(!a.showMaskOnHover||a.showMaskOnHover&&""===e)?t.inputmask._valueGet()!==k().join("")&&I(t,k(),A(f())):!1===pt&&L(t,A(f())),!0===a.positionCaretOnTab&&setTimeout((function(){L(t,A(f()))}),0),ot=k().join("")}function Y(){var t=this;if(pt=!1,a.clearMaskOnLostFocus&&document.activeElement!==t){var e=k().slice(),n=t.inputmask._valueGet();n!==t.getAttribute("placeholder")&&""!==n&&(-1===f()&&n===x().join("")?e=[]:R(e),I(t,e))}}function X(){function e(e){if(a.radixFocus&&""!==a.radixPoint){var n=h().validPositions;if(void 0===n[e]||n[e].input===P(e)){if(e<A(-1))return!0;var i=t.inArray(a.radixPoint,k());if(-1!==i){for(var o in n)if(o>i&&n[o].input!==P(o))return!1;return!0}}}return!1}var n=this;setTimeout((function(){if(document.activeElement===n){var i=L(n);if(i.begin===i.end)if(e(i.begin))L(n,a.numericInput?A(t.inArray(a.radixPoint,k())):t.inArray(a.radixPoint,k()));else{var o=i.begin,r=A(f(o,!0));if(r>o)L(n,$(o)||$(o-1)?o:A(o));else{var s=P(r);(""!==s&&k()[r]!==s||!$(r,!0)&&y(r).def===s)&&(r=A(r)),L(n,r)}}}}),0)}function K(){var t=this;setTimeout((function(){L(t,0,A(f()))}),0)}function J(n){var i=this,o=t(i),r=L(i),s=n.originalEvent||n,l=window.clipboardData||s.clipboardData,c=ct?k().slice(r.end,r.begin):k().slice(r.begin,r.end);l.setData("text",ct?c.reverse().join(""):c.join("")),document.execCommand&&document.execCommand("copy"),H(i,e.keyCode.DELETE,r),I(i,k(),h().p,n,ot!==k().join("")),i.inputmask._valueGet()===x().join("")&&o.trigger("cleared"),a.showTooltip&&(i.title=a.tooltip||h().mask)}function Z(e){var n=t(this),i=this;if(i.inputmask){var o=i.inputmask._valueGet(),r=k().slice();ot!==r.join("")&&setTimeout((function(){n.trigger("change"),ot=r.join("")}),0),""!==o&&(a.clearMaskOnLostFocus&&(-1===f()&&o===x().join("")?r=[]:R(r)),!1===q(r)&&(setTimeout((function(){n.trigger("incomplete")}),0),a.clearIncomplete&&(p(),r=a.clearMaskOnLostFocus?[]:x().slice())),I(i,r,void 0,e))}}function tt(){var t=this;pt=!0,document.activeElement!==t&&a.showMaskOnHover&&t.inputmask._valueGet()!==k().join("")&&I(t,k())}function et(){ot!==k().join("")&&at.trigger("change"),a.clearMaskOnLostFocus&&-1===f()&&rt.inputmask._valueGet&&rt.inputmask._valueGet()===x().join("")&&rt.inputmask._valueSet(""),a.removeMaskOnSubmit&&(rt.inputmask._valueSet(rt.inputmask.unmaskedvalue(),!0),setTimeout((function(){I(rt,k())}),0))}function nt(){setTimeout((function(){at.trigger("setvalue")}),0)}function it(e){if(at=t(rt=e),a.showTooltip&&(rt.title=a.tooltip||h().mask),("rtl"===rt.dir||a.rightAlign)&&(rt.style.textAlign="right"),("rtl"===rt.dir||a.numericInput)&&(rt.dir="ltr",rt.removeAttribute("dir"),rt.inputmask.isRTL=!0,ct=!0),ft.off(rt),B(rt),i(rt,a)&&(ft.on(rt,"submit",et),ft.on(rt,"reset",nt),ft.on(rt,"mouseenter",tt),ft.on(rt,"blur",Z),ft.on(rt,"focus",G),ft.on(rt,"mouseleave",Y),ft.on(rt,"click",X),ft.on(rt,"dblclick",K),ft.on(rt,"paste",W),ft.on(rt,"dragdrop",W),ft.on(rt,"drop",W),ft.on(rt,"cut",J),ft.on(rt,"complete",a.oncomplete),ft.on(rt,"incomplete",a.onincomplete),ft.on(rt,"cleared",a.oncleared),ft.on(rt,"keydown",U),ft.on(rt,"keypress",z),ft.on(rt,"input",Q)),ft.on(rt,"setvalue",V),""!==rt.inputmask._valueGet()||!1===a.clearMaskOnLostFocus||document.activeElement===rt){var n=t.isFunction(a.onBeforeMask)&&a.onBeforeMask(rt.inputmask._valueGet(),a)||rt.inputmask._valueGet();O(rt,!0,!1,n.split(""));var o=k().slice();ot=o.join(""),!1===q(o)&&a.clearIncomplete&&p(),a.clearMaskOnLostFocus&&document.activeElement!==rt&&(-1===f()?o=[]:R(o)),I(rt,o),document.activeElement===rt&&L(rt,A(f()))}}var ot,rt,at,st,lt,ct=!1,ut=!1,dt=!1,ht=!1,pt=!0,ft={on:function(n,i,o){var r=function(n){if(void 0===this.inputmask&&"FORM"!==this.nodeName){var i=t.data(this,"_inputmask_opts");i?new e(i).mask(this):ft.off(this)}else{if("setvalue"===n.type||!(this.disabled||this.readOnly&&!("keydown"===n.type&&n.ctrlKey&&67===n.keyCode||!1===a.tabThrough&&n.keyCode===e.keyCode.TAB))){switch(n.type){case"input":if(!0===dt)return dt=!1,n.preventDefault();break;case"keydown":ut=!1,dt=!1;break;case"keypress":if(!0===ut)return n.preventDefault();ut=!0;break;case"click":if(u){var r=this;return setTimeout((function(){o.apply(r,arguments)}),0),!1}}var s=o.apply(this,arguments);return!1===s&&(n.preventDefault(),n.stopPropagation()),s}n.preventDefault()}};n.inputmask.events[i]=n.inputmask.events[i]||[],n.inputmask.events[i].push(r),-1!==t.inArray(i,["submit","reset"])?null!=n.form&&t(n.form).on(i,r):t(n).on(i,r)},off:function(e,n){var i;e.inputmask&&e.inputmask.events&&(n?(i=[])[n]=e.inputmask.events[n]:i=e.inputmask.events,t.each(i,(function(n,i){for(;i.length>0;){var o=i.pop();-1!==t.inArray(n,["submit","reset"])?null!=e.form&&t(e.form).off(n,o):t(e).off(n,o)}delete e.inputmask.events[n]})))}};if(void 0!==o)switch(o.action){case"isComplete":return rt=o.el,q(k());case"unmaskedvalue":return void 0!==(rt=o.el)&&void 0!==rt.inputmask?(r=rt.inputmask.maskset,a=rt.inputmask.opts,ct=rt.inputmask.isRTL):(lt=o.value,a.numericInput&&(ct=!0),lt=(t.isFunction(a.onBeforeMask)&&a.onBeforeMask(lt,a)||lt).split(""),O(void 0,!1,!1,ct?lt.reverse():lt),t.isFunction(a.onBeforeWrite)&&a.onBeforeWrite(void 0,k(),0,a)),N(rt);case"mask":rt=o.el,r=rt.inputmask.maskset,a=rt.inputmask.opts,ct=rt.inputmask.isRTL,ot=k().join(""),it(rt);break;case"format":return a.numericInput&&(ct=!0),lt=(t.isFunction(a.onBeforeMask)&&a.onBeforeMask(o.value,a)||o.value).split(""),O(void 0,!1,!1,ct?lt.reverse():lt),t.isFunction(a.onBeforeWrite)&&a.onBeforeWrite(void 0,k(),0,a),o.metadata?{value:ct?k().slice().reverse().join(""):k().join(""),metadata:s({action:"getmetadata"},r,a)}:ct?k().slice().reverse().join(""):k().join("");case"isValid":a.numericInput&&(ct=!0),o.value?(lt=o.value.split(""),O(void 0,!1,!0,ct?lt.reverse():lt)):o.value=k().join("");for(var mt=k(),gt=F(),vt=mt.length-1;vt>gt&&!$(vt);vt--);return mt.splice(gt,vt+1-gt),q(mt)&&o.value===k().join("");case"getemptymask":return x().join("");case"remove":rt=o.el,at=t(rt),r=rt.inputmask.maskset,a=rt.inputmask.opts,rt.inputmask._valueSet(N(rt)),ft.off(rt),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(rt),"value")&&rt.inputmask.__valueGet&&Object.defineProperty(rt,"value",{get:rt.inputmask.__valueGet,set:rt.inputmask.__valueSet,configurable:!0}):document.__lookupGetter__&&rt.__lookupGetter__("value")&&rt.inputmask.__valueGet&&(rt.__defineGetter__("value",rt.inputmask.__valueGet),rt.__defineSetter__("value",rt.inputmask.__valueSet)),rt.inputmask=void 0;break;case"getmetadata":if(t.isArray(r.metadata)){for(var yt,_t=f(void 0,!0);_t>=0;_t--)if(h().validPositions[_t]&&void 0!==h().validPositions[_t].alternation){yt=h().validPositions[_t].alternation;break}return void 0!==yt?r.metadata[h().validPositions[_t].locator[yt]]:[]}return r.metadata}}e.prototype={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,oncomplete:t.noop,onincomplete:t.noop,oncleared:t.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},alias:null,onKeyDown:t.noop,onBeforeMask:null,onBeforePaste:function(e,n){return t.isFunction(n.onBeforeMask)?n.onBeforeMask(e,n):e},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:t.noop,skipOptionalPartCharacter:" ",showTooltip:!1,tooltip:void 0,numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",radixPointDefinitionSymbol:void 0,groupSeparator:"",radixFocus:!1,nojumps:!1,nojumpsThreshold:0,keepStatic:null,positionCaretOnTab:!1,tabThrough:!1,supportsInputType:["text","tel","password"],definitions:{9:{validator:"[0-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",cardinality:1}},ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123],isComplete:null,canClearPosition:t.noop,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0},masksCache:{},mask:function(n){var i=this;return"string"==typeof n&&(n=document.getElementById(n)||document.querySelectorAll(n)),n=n.nodeName?[n]:n,t.each(n,(function(n,o){var l=t.extend(!0,{},i.opts);r(o,l,t.extend(!0,{},i.userOptions));var c=a(l,i.noMasksCache);void 0!==c&&(void 0!==o.inputmask&&o.inputmask.remove(),o.inputmask=new e,o.inputmask.opts=l,o.inputmask.noMasksCache=i.noMasksCache,o.inputmask.userOptions=t.extend(!0,{},i.userOptions),o.inputmask.el=o,o.inputmask.maskset=c,o.inputmask.isRTL=!1,t.data(o,"_inputmask_opts",l),s({action:"mask",el:o}))})),n&&n[0]&&n[0].inputmask||this},option:function(e,n){return"string"==typeof e?this.opts[e]:"object"==typeof e?(t.extend(this.userOptions,e),this.el&&!0!==n&&this.mask(this.el),this):void 0},unmaskedvalue:function(t){return s({action:"unmaskedvalue",el:this.el,value:t},this.el&&this.el.inputmask?this.el.inputmask.maskset:a(this.opts,this.noMasksCache),this.opts)},remove:function(){return this.el?(s({action:"remove",el:this.el}),this.el.inputmask=void 0,this.el):void 0},getemptymask:function(){return s({action:"getemptymask"},this.maskset||a(this.opts,this.noMasksCache),this.opts)},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return s({action:"isComplete",el:this.el},this.maskset||a(this.opts,this.noMasksCache),this.opts)},getmetadata:function(){return s({action:"getmetadata"},this.maskset||a(this.opts,this.noMasksCache),this.opts)},isValid:function(t){return s({action:"isValid",value:t},this.maskset||a(this.opts,this.noMasksCache),this.opts)},format:function(t,e){return s({action:"format",value:t,metadata:e},this.maskset||a(this.opts,this.noMasksCache),this.opts)}},e.extendDefaults=function(n){t.extend(!0,e.prototype.defaults,n)},e.extendDefinitions=function(n){t.extend(!0,e.prototype.defaults.definitions,n)},e.extendAliases=function(n){t.extend(!0,e.prototype.defaults.aliases,n)},e.format=function(t,n,i){return e(n).format(t,i)},e.unmask=function(t,n){return e(n).unmaskedvalue(t)},e.isValid=function(t,n){return e(n).isValid(t)},e.remove=function(e){t.each(e,(function(t,e){e.inputmask&&e.inputmask.remove()}))},e.escapeRegex=function(t){var e=["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"];return t.replace(new RegExp("(\\"+e.join("|\\")+")","gim"),"\\$1")},e.keyCode={ALT:18,BACKSPACE:8,BACKSPACE_SAFARI:127,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91,X:88};var l=navigator.userAgent,c=/mobile/i.test(l),u=/iemobile/i.test(l),d=/iphone/i.test(l)&&!u;/android.*safari.*/i.test(l),window.Inputmask=e}(jQuery),function(t,e){void 0===t.fn.inputmask&&(t.fn.inputmask=function(n,i){var o,r=this[0];if(void 0===i&&(i={}),"string"==typeof n)switch(n){case"unmaskedvalue":return r&&r.inputmask?r.inputmask.unmaskedvalue():t(r).val();case"remove":return this.each((function(){this.inputmask&&this.inputmask.remove()}));case"getemptymask":return r&&r.inputmask?r.inputmask.getemptymask():"";case"hasMaskedValue":return!(!r||!r.inputmask)&&r.inputmask.hasMaskedValue();case"isComplete":return!r||!r.inputmask||r.inputmask.isComplete();case"getmetadata":return r&&r.inputmask?r.inputmask.getmetadata():void 0;case"setvalue":t(r).val(i),r&&void 0!==r.inputmask&&t(r).triggerHandler("setvalue");break;case"option":if("string"!=typeof i)return this.each((function(){return void 0!==this.inputmask?this.inputmask.option(i):void 0}));if(r&&void 0!==r.inputmask)return r.inputmask.option(i);break;default:return i.alias=n,o=new e(i),this.each((function(){o.mask(this)}))}else{if("object"==typeof n)return o=new e(n),void 0===n.mask&&void 0===n.alias?this.each((function(){return void 0!==this.inputmask?this.inputmask.option(n):void o.mask(this)})):this.each((function(){o.mask(this)}));if(void 0===n)return this.each((function(){(o=new e(i)).mask(this)}))}}),t.fn.inputmask}(jQuery,Inputmask),function(t,e){e.extendDefinitions({h:{validator:"[01][0-9]|2[0-3]",cardinality:2,prevalidator:[{validator:"[0-2]",cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:"[0-5]",cardinality:1}]},d:{validator:"0[1-9]|[12][0-9]|3[01]",cardinality:2,prevalidator:[{validator:"[0-3]",cardinality:1}]},m:{validator:"0[1-9]|1[012]",cardinality:2,prevalidator:[{validator:"[01]",cardinality:1}]},y:{validator:"(19|20)\\d{2}",cardinality:4,prevalidator:[{validator:"[12]",cardinality:1},{validator:"(19|20)",cardinality:2},{validator:"(19|20)\\d",cardinality:3}]}}),e.extendAliases({"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:new RegExp("[0-3]"),val1:new RegExp("0[1-9]|[12][0-9]|3[01]"),val2pre:function(t){var n=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|[12][0-9]|3[01])"+n+"[01])")},val2:function(t){var n=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|[12][0-9])"+n+"(0[1-9]|1[012]))|(30"+n+"(0[13-9]|1[012]))|(31"+n+"(0[13578]|1[02]))")}},leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(t,e,n){if(isNaN(t))return!1;var i=parseInt(t.concat(e.toString().slice(t.length))),o=parseInt(t.concat(n.toString().slice(t.length)));return!isNaN(i)&&(i>=e&&n>=i)||!isNaN(o)&&(o>=e&&n>=o)},determinebaseyear:function(t,e,n){var i=(new Date).getFullYear();if(t>i)return t;if(i>e){for(var o=e.toString().slice(0,2),r=e.toString().slice(2,4);o+n>e;)o--;var a=o+r;return t>a?t:a}if(i>=t&&e>=i){for(var s=i.toString().slice(0,2);s+n>e;)s--;var l=s+n;return t>l?t:l}return i},onKeyDown:function(n){var i=t(this);if(n.ctrlKey&&n.keyCode===e.keyCode.RIGHT){var o=new Date;i.val(o.getDate().toString()+(o.getMonth()+1).toString()+o.getFullYear().toString()),i.trigger("setvalue")}},getFrontValue:function(t,e,n){for(var i=0,o=0,r=0;r<t.length&&"2"!==t.charAt(r);r++){var a=n.definitions[t.charAt(r)];a?(i+=o,o=a.cardinality):o++}return e.join("").substr(i,o)},definitions:{1:{validator:function(t,e,n,i,o){var r=o.regex.val1.test(t);return i||r||t.charAt(1)!==o.separator&&-1==="-./".indexOf(t.charAt(1))||!(r=o.regex.val1.test("0"+t.charAt(0)))?r:(e.buffer[n-1]="0",{refreshFromBuffer:{start:n-1,end:n},pos:n,c:t.charAt(0)})},cardinality:2,prevalidator:[{validator:function(t,e,n,i,o){var r=t;isNaN(e.buffer[n+1])||(r+=e.buffer[n+1]);var a=1===r.length?o.regex.val1pre.test(r):o.regex.val1.test(r);if(!i&&!a){if(a=o.regex.val1.test(t+"0"))return e.buffer[n]=t,e.buffer[++n]="0",{pos:n,c:"0"};if(a=o.regex.val1.test("0"+t))return e.buffer[n]="0",{pos:++n}}return a},cardinality:1}]},2:{validator:function(t,e,n,i,o){var r=o.getFrontValue(e.mask,e.buffer,o);-1!==r.indexOf(o.placeholder[0])&&(r="01"+o.separator);var a=o.regex.val2(o.separator).test(r+t);if(!i&&!a&&(t.charAt(1)===o.separator||-1!=="-./".indexOf(t.charAt(1)))&&(a=o.regex.val2(o.separator).test(r+"0"+t.charAt(0))))return e.buffer[n-1]="0",{refreshFromBuffer:{start:n-1,end:n},pos:n,c:t.charAt(0)};if(o.mask.indexOf("2")===o.mask.length-1&&a){if(e.buffer.join("").substr(4,4)+t!==o.leapday)return!0;var s=parseInt(e.buffer.join("").substr(0,4),10);return s%4==0&&(s%100!=0||s%400==0)}return a},cardinality:2,prevalidator:[{validator:function(t,e,n,i,o){isNaN(e.buffer[n+1])||(t+=e.buffer[n+1]);var r=o.getFrontValue(e.mask,e.buffer,o);-1!==r.indexOf(o.placeholder[0])&&(r="01"+o.separator);var a=1===t.length?o.regex.val2pre(o.separator).test(r+t):o.regex.val2(o.separator).test(r+t);return i||a||!(a=o.regex.val2(o.separator).test(r+"0"+t))?a:(e.buffer[n]="0",{pos:++n})},cardinality:1}]},y:{validator:function(t,e,n,i,o){if(o.isInYearRange(t,o.yearrange.minyear,o.yearrange.maxyear)){if(e.buffer.join("").substr(0,6)!==o.leapday)return!0;var r=parseInt(t,10);return r%4==0&&(r%100!=0||r%400==0)}return!1},cardinality:4,prevalidator:[{validator:function(t,e,n,i,o){var r=o.isInYearRange(t,o.yearrange.minyear,o.yearrange.maxyear);if(!i&&!r){var a=o.determinebaseyear(o.yearrange.minyear,o.yearrange.maxyear,t+"0").toString().slice(0,1);if(r=o.isInYearRange(a+t,o.yearrange.minyear,o.yearrange.maxyear))return e.buffer[n++]=a.charAt(0),{pos:n};if(a=o.determinebaseyear(o.yearrange.minyear,o.yearrange.maxyear,t+"0").toString().slice(0,2),r=o.isInYearRange(a+t,o.yearrange.minyear,o.yearrange.maxyear))return e.buffer[n++]=a.charAt(0),e.buffer[n++]=a.charAt(1),{pos:n}}return r},cardinality:1},{validator:function(t,e,n,i,o){var r=o.isInYearRange(t,o.yearrange.minyear,o.yearrange.maxyear);if(!i&&!r){var a=o.determinebaseyear(o.yearrange.minyear,o.yearrange.maxyear,t).toString().slice(0,2);if(r=o.isInYearRange(t[0]+a[1]+t[1],o.yearrange.minyear,o.yearrange.maxyear))return e.buffer[n++]=a.charAt(1),{pos:n};if(a=o.determinebaseyear(o.yearrange.minyear,o.yearrange.maxyear,t).toString().slice(0,2),o.isInYearRange(a+t,o.yearrange.minyear,o.yearrange.maxyear))if(e.buffer.join("").substr(0,6)!==o.leapday)r=!0;else{var s=parseInt(t,10);r=s%4==0&&(s%100!=0||s%400==0)}else r=!1;if(r)return e.buffer[n-1]=a.charAt(0),e.buffer[n++]=a.charAt(1),e.buffer[n++]=t.charAt(0),{refreshFromBuffer:{start:n-3,end:n},pos:n}}return r},cardinality:2},{validator:function(t,e,n,i,o){return o.isInYearRange(t,o.yearrange.minyear,o.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(t){var n=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+n+"[0-3])|(02"+n+"[0-2])")},val2:function(t){var n=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+n+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+n+"30)|((0[13578]|1[02])"+n+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(n){var i=t(this);if(n.ctrlKey&&n.keyCode===e.keyCode.RIGHT){var o=new Date;i.val((o.getMonth()+1).toString()+o.getDate().toString()+o.getFullYear().toString()),i.trigger("setvalue")}}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyDown:function(n){var i=t(this);if(n.ctrlKey&&n.keyCode===e.keyCode.RIGHT){var o=new Date;i.val(o.getFullYear().toString()+(o.getMonth()+1).toString()+o.getDate().toString()),i.trigger("setvalue")}}},"dd.mm.yyyy":{mask:"1.2.y",placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",leapday:"29-02-",separator:"-",alias:"dd/mm/yyyy"},"mm.dd.yyyy":{mask:"1.2.y",placeholder:"mm.dd.yyyy",leapday:"02.29.",separator:".",alias:"mm/dd/yyyy"},"mm-dd-yyyy":{mask:"1-2-y",placeholder:"mm-dd-yyyy",leapday:"02-29-",separator:"-",alias:"mm/dd/yyyy"},"yyyy.mm.dd":{mask:"y.1.2",placeholder:"yyyy.mm.dd",leapday:".02.29",separator:".",alias:"yyyy/mm/dd"},"yyyy-mm-dd":{mask:"y-1-2",placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",alias:"dd/mm/yyyy",regex:{hrspre:new RegExp("[012]"),hrs24:new RegExp("2[0-4]|1[3-9]"),hrs:new RegExp("[01][0-9]|2[0-4]"),ampm:new RegExp("^[a|p|A|P][m|M]"),mspre:new RegExp("[0-5]"),ms:new RegExp("[0-5][0-9]")},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(t,e,n,i,o){if("24"===o.hourFormat&&24===parseInt(t,10))return e.buffer[n-1]="0",e.buffer[n]="0",{refreshFromBuffer:{start:n-1,end:n},c:"0"};var r=o.regex.hrs.test(t);if(!i&&!r&&(t.charAt(1)===o.timeseparator||-1!=="-.:".indexOf(t.charAt(1)))&&(r=o.regex.hrs.test("0"+t.charAt(0))))return e.buffer[n-1]="0",e.buffer[n]=t.charAt(0),{refreshFromBuffer:{start:++n-2,end:n},pos:n,c:o.timeseparator};if(r&&"24"!==o.hourFormat&&o.regex.hrs24.test(t)){var a=parseInt(t,10);return 24===a?(e.buffer[n+5]="a",e.buffer[n+6]="m"):(e.buffer[n+5]="p",e.buffer[n+6]="m"),10>(a-=12)?(e.buffer[n]=a.toString(),e.buffer[n-1]="0"):(e.buffer[n]=a.toString().charAt(1),e.buffer[n-1]=a.toString().charAt(0)),{refreshFromBuffer:{start:n-1,end:n+6},c:e.buffer[n]}}return r},cardinality:2,prevalidator:[{validator:function(t,e,n,i,o){var r=o.regex.hrspre.test(t);return i||r||!(r=o.regex.hrs.test("0"+t))?r:(e.buffer[n]="0",{pos:++n})},cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:function(t,e,n,i,o){var r=o.regex.mspre.test(t);return i||r||!(r=o.regex.ms.test("0"+t))?r:(e.buffer[n]="0",{pos:++n})},cardinality:1}]},t:{validator:function(t,e,n,i,o){return o.regex.ampm.test(t+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"mm/dd/yyyy hh:mm xm":{mask:"1/2/y h:s t\\m",placeholder:"mm/dd/yyyy hh:mm xm",alias:"datetime12",regex:{val2pre:function(t){var n=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+n+"[0-3])|(02"+n+"[0-2])")},val2:function(t){var n=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+n+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+n+"30)|((0[13578]|1[02])"+n+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(n){var i=t(this);if(n.ctrlKey&&n.keyCode===e.keyCode.RIGHT){var o=new Date;i.val((o.getMonth()+1).toString()+o.getDate().toString()+o.getFullYear().toString()),i.trigger("setvalue")}}},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",placeholder:"hh:mm:ss",alias:"datetime",autoUnmask:!1},"hh:mm":{mask:"h:s",placeholder:"hh:mm",alias:"datetime",autoUnmask:!1},date:{alias:"dd/mm/yyyy"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"},shamsi:{regex:{val2pre:function(t){var n=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+n+"[0-3])")},val2:function(t){var n=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+n+"(0[1-9]|[12][0-9]))|((0[1-9]|1[012])"+n+"30)|((0[1-6])"+n+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},yearrange:{minyear:1300,maxyear:1499},mask:"y/1/2",leapday:"/12/30",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",clearIncomplete:!0}})}(jQuery,Inputmask),function(t,e){e.extendDefinitions({A:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",cardinality:1,casing:"upper"},"&":{validator:"[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Fa-f]",cardinality:1,casing:"upper"}}),e.extendAliases({url:{definitions:{i:{validator:".",cardinality:1}},mask:"(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",insertMode:!1,autoUnmask:!1},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(t,e,n){return n-1>-1&&"."!==e.buffer[n-1]?(t=e.buffer[n-1]+t,t=n-2>-1&&"."!==e.buffer[n-2]?e.buffer[n-2]+t:"0"+t):t="00"+t,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(t)},cardinality:1}},onUnMask:function(t){return t}},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(t){return(t=t.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"},"-":{validator:"[0-9A-Za-z-]",cardinality:1,casing:"lower"}},onUnMask:function(t){return t}},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",cardinality:1,casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}})}(jQuery,Inputmask),function(t,e){e.extendAliases({numeric:{mask:function(t){function n(e){for(var n="",i=0;i<e.length;i++)n+=t.definitions[e.charAt(i)]||t.optionalmarker.start===e.charAt(i)||t.optionalmarker.end===e.charAt(i)||t.quantifiermarker.start===e.charAt(i)||t.quantifiermarker.end===e.charAt(i)||t.groupmarker.start===e.charAt(i)||t.groupmarker.end===e.charAt(i)||t.alternatormarker===e.charAt(i)?"\\"+e.charAt(i):e.charAt(i);return n}if(0!==t.repeat&&isNaN(t.integerDigits)&&(t.integerDigits=t.repeat),t.repeat=0,t.groupSeparator===t.radixPoint&&("."===t.radixPoint?t.groupSeparator=",":","===t.radixPoint?t.groupSeparator=".":t.groupSeparator="")," "===t.groupSeparator&&(t.skipOptionalPartCharacter=void 0),t.autoGroup=t.autoGroup&&""!==t.groupSeparator,t.autoGroup&&("string"==typeof t.groupSize&&isFinite(t.groupSize)&&(t.groupSize=parseInt(t.groupSize)),isFinite(t.integerDigits))){var i=Math.floor(t.integerDigits/t.groupSize),o=t.integerDigits%t.groupSize;t.integerDigits=parseInt(t.integerDigits)+(0===o?i-1:i),t.integerDigits<1&&(t.integerDigits="*")}t.placeholder.length>1&&(t.placeholder=t.placeholder.charAt(0)),t.radixFocus=t.radixFocus&&""!==t.placeholder&&!0===t.integerOptional,t.definitions[";"]=t.definitions["~"],t.definitions[";"].definitionSymbol="~",
!0===t.numericInput&&(t.radixFocus=!1,t.digitsOptional=!1,isNaN(t.digits)&&(t.digits=2),t.decimalProtect=!1);var r=n(t.prefix);return r+="[+]",r+=!0===t.integerOptional?"~{1,"+t.integerDigits+"}":"~{"+t.integerDigits+"}",void 0!==t.digits&&(isNaN(t.digits)||parseInt(t.digits)>0)&&(t.decimalProtect&&(t.radixPointDefinitionSymbol=":"),r+=t.digitsOptional?"["+(t.decimalProtect?":":t.radixPoint)+";{1,"+t.digits+"}]":(t.decimalProtect?":":t.radixPoint)+";{"+t.digits+"}"),r+="[-]",r+=n(t.suffix),t.greedy=!1,null!==t.min&&(t.min=t.min.toString().replace(new RegExp(e.escapeRegex(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.min=t.min.replace(t.radixPoint,"."))),null!==t.max&&(t.max=t.max.toString().replace(new RegExp(e.escapeRegex(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.max=t.max.replace(t.radixPoint,"."))),r},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,radixPoint:".",radixFocus:!0,groupSize:3,groupSeparator:"",autoGroup:!1,allowPlus:!0,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,postFormat:function(n,i,o){!0===o.numericInput&&(n=n.reverse(),isFinite(i)&&(i=n.join("").length-i-1));var r,a,s=!1;n.length>=o.suffix.length&&n.join("").indexOf(o.suffix)===n.length-o.suffix.length&&(n.length=n.length-o.suffix.length,s=!0);var l=!1,c=n[i=i>=n.length?n.length-1:i<o.prefix.length?o.prefix.length:i],u=n.slice();c===o.groupSeparator&&(u.splice(i--,1),c=u[i]),c!==o.radixPoint&&c!==o.negationSymbol.front&&c!==o.negationSymbol.back&&(u[i]="?");var d=u.join(""),h=d;if(d.length>0&&o.autoGroup||-1!==d.indexOf(o.groupSeparator)){var p=e.escapeRegex(o.groupSeparator);l=0===d.indexOf(o.groupSeparator);var f=(d=d.replace(new RegExp(p,"g"),"")).split(o.radixPoint);if((d=""===o.radixPoint?d:f[0])!==o.prefix+"?0"&&d.length>=o.groupSize+o.prefix.length)for(var m=new RegExp("([-+]?[\\d?]+)([\\d?]{"+o.groupSize+"})");m.test(d)&&""!==o.groupSeparator;)d=(d=d.replace(m,"$1"+o.groupSeparator+"$2")).replace(o.groupSeparator+o.groupSeparator,o.groupSeparator);""!==o.radixPoint&&f.length>1&&(d+=o.radixPoint+f[1])}for(l=h!==d,n.length=d.length,r=0,a=d.length;a>r;r++)n[r]=d.charAt(r);var g=t.inArray("?",n);if(-1===g&&(g=t.inArray(c,n)),n[g]=c,!l&&s)for(r=0,a=o.suffix.length;a>r;r++)n.push(o.suffix.charAt(r));return g=o.numericInput&&isFinite(i)?n.join("").length-g-1:g,o.numericInput&&(n=n.reverse(),t.inArray(o.radixPoint,n)<g&&n.join("").length-o.suffix.length!==g&&(g-=1)),{pos:g,refreshFromBuffer:l,buffer:n}},onBeforeWrite:function(n,i,o,r){var a;if(n&&("blur"===n.type||"checkval"===n.type||"keydown"===n.type)){var s=r.numericInput?i.slice().reverse().join(""):i.join(""),l=s.replace(r.prefix,"");l=(l=l.replace(r.suffix,"")).replace(new RegExp(e.escapeRegex(r.groupSeparator),"g"),""),","===r.radixPoint&&(l=l.replace(r.radixPoint,"."));var c=l.match(new RegExp("[-"+e.escapeRegex(r.negationSymbol.front)+"]","g"));if(c=null!==c&&1===c.length,l=(l=l.replace(new RegExp("[-"+e.escapeRegex(r.negationSymbol.front)+"]","g"),"")).replace(new RegExp(e.escapeRegex(r.negationSymbol.back)+"$"),""),isNaN(r.placeholder)&&(l=l.replace(new RegExp(e.escapeRegex(r.placeholder),"g"),"")),""!==(l=l===r.negationSymbol.front?l+"0":l)&&isFinite(l)){var u=parseFloat(l),d=c?-1*u:u;if(null!==r.min&&isFinite(r.min)&&d<parseFloat(r.min)?(u=Math.abs(r.min),c=r.min<0,s=void 0):null!==r.max&&isFinite(r.max)&&d>parseFloat(r.max)&&(u=Math.abs(r.max),c=r.max<0,s=void 0),l=u.toString().replace(".",r.radixPoint).split(""),isFinite(r.digits)){var h=t.inArray(r.radixPoint,l),p=t.inArray(r.radixPoint,s);-1===h&&(l.push(r.radixPoint),h=l.length-1);for(var f=1;f<=r.digits;f++)r.digitsOptional||void 0!==l[h+f]&&l[h+f]!==r.placeholder.charAt(0)?-1!==p&&void 0!==s[p+f]&&(l[h+f]=l[h+f]||s[p+f]):l[h+f]="0";l[l.length-1]===r.radixPoint&&delete l[l.length-1]}if(u.toString()!==l&&u.toString()+"."!==l||c)return!c||0===u&&"blur"===n.type||(l.unshift(r.negationSymbol.front),l.push(r.negationSymbol.back)),l=(r.prefix+l.join("")).split(""),r.numericInput&&(l=l.reverse()),(a=r.postFormat(l,r.numericInput?o:o-1,r)).buffer&&(a.refreshFromBuffer=a.buffer.join("")!==i.join("")),a}}return r.autoGroup?((a=r.postFormat(i,r.numericInput?o:o-1,r)).caret=o<=r.prefix.length?a.pos:a.pos+1,a):void 0},regex:{integerPart:function(t){return new RegExp("["+e.escapeRegex(t.negationSymbol.front)+"+]?\\d+")},integerNPart:function(t){return new RegExp("[\\d"+e.escapeRegex(t.groupSeparator)+e.escapeRegex(t.placeholder.charAt(0))+"]+")}},signHandler:function(t,e,n,i,o){if(!i&&o.allowMinus&&"-"===t||o.allowPlus&&"+"===t){var r=e.buffer.join("").match(o.regex.integerPart(o));if(r&&r[0].length>0)return e.buffer[r.index]===("-"===t?"+":o.negationSymbol.front)?"-"===t?""!==o.negationSymbol.back?{pos:r.index,c:o.negationSymbol.front,remove:r.index,caret:n,insert:{pos:e.buffer.length-o.suffix.length-1,c:o.negationSymbol.back}}:{pos:r.index,c:o.negationSymbol.front,remove:r.index,caret:n}:""!==o.negationSymbol.back?{pos:r.index,c:"+",remove:[r.index,e.buffer.length-o.suffix.length-1],caret:n}:{pos:r.index,c:"+",remove:r.index,caret:n}:e.buffer[r.index]===("-"===t?o.negationSymbol.front:"+")?"-"===t&&""!==o.negationSymbol.back?{remove:[r.index,e.buffer.length-o.suffix.length-1],caret:n-1}:{remove:r.index,caret:n-1}:"-"===t?""!==o.negationSymbol.back?{pos:r.index,c:o.negationSymbol.front,caret:n+1,insert:{pos:e.buffer.length-o.suffix.length,c:o.negationSymbol.back}}:{pos:r.index,c:o.negationSymbol.front,caret:n+1}:{pos:r.index,c:t,caret:n+1}}return!1},radixHandler:function(e,n,i,o,r){if(!o&&!0!==r.numericInput&&e===r.radixPoint&&void 0!==r.digits&&(isNaN(r.digits)||parseInt(r.digits)>0)){var a=t.inArray(r.radixPoint,n.buffer),s=n.buffer.join("").match(r.regex.integerPart(r));if(-1!==a&&n.validPositions[a])return n.validPositions[a-1]?{caret:a+1}:{pos:s.index,c:s[0],caret:a+1};if(!s||"0"===s[0]&&s.index+1!==i)return n.buffer[s?s.index:i]="0",{pos:(s?s.index:i)+1,c:r.radixPoint}}return!1},leadingZeroHandler:function(e,n,i,o,r,a){if(!o)if(!0===r.numericInput){var s=n.buffer.slice("").reverse();if("0"===s[r.prefix.length]&&void 0===n.validPositions[i-1])return{pos:i,remove:s.length-r.prefix.length-1}}else{var l=t.inArray(r.radixPoint,n.buffer),c=n.buffer.slice(0,-1!==l?l:void 0).join("").match(r.regex.integerNPart(r));if(c&&(-1===l||l>=i)){var u=-1===l?0:parseInt(n.buffer.slice(l+1).join(""));if(0===c[0].indexOf(""!==r.placeholder?r.placeholder.charAt(0):"0")&&(c.index+1===i||!0!==a&&0===u))return n.buffer.splice(c.index,1),{pos:c.index,remove:c.index};if("0"===e&&i<=c.index&&c[0]!==r.groupSeparator)return!1}}return!0},definitions:{"~":{validator:function(n,i,o,r,a,s){var l=a.signHandler(n,i,o,r,a);if(!l&&(!(l=a.radixHandler(n,i,o,r,a))&&(!0===(l=r?new RegExp("[0-9"+e.escapeRegex(a.groupSeparator)+"]").test(n):new RegExp("[0-9]").test(n))&&!0===(l=a.leadingZeroHandler(n,i,o,r,a,s))))){var c=t.inArray(a.radixPoint,i.buffer);l=-1!==c&&(!1===a.digitsOptional||i.validPositions[o])&&!0!==a.numericInput&&o>c&&!r?{pos:o,remove:o}:{pos:o}}return l},cardinality:1},"+":{validator:function(t,e,n,i,o){var r=o.signHandler(t,e,n,i,o);return!r&&(i&&o.allowMinus&&t===o.negationSymbol.front||o.allowMinus&&"-"===t||o.allowPlus&&"+"===t)&&(r=!(!i&&"-"===t)||(""!==o.negationSymbol.back?{pos:n,c:"-"===t?o.negationSymbol.front:"+",caret:n+1,insert:{pos:e.buffer.length,c:o.negationSymbol.back}}:{pos:n,c:"-"===t?o.negationSymbol.front:"+",caret:n+1})),r},cardinality:1,placeholder:""},"-":{validator:function(t,e,n,i,o){var r=o.signHandler(t,e,n,i,o);return!r&&i&&o.allowMinus&&t===o.negationSymbol.back&&(r=!0),r},cardinality:1,placeholder:""},":":{validator:function(t,n,i,o,r){var a=r.signHandler(t,n,i,o,r);if(!a){var s="["+e.escapeRegex(r.radixPoint)+"]";(a=new RegExp(s).test(t))&&n.validPositions[i]&&n.validPositions[i].match.placeholder===r.radixPoint&&(a={caret:i+1})}return a?{c:r.radixPoint}:a},cardinality:1,placeholder:function(t){return t.radixPoint}}},onUnMask:function(t,n,i){var o=t.replace(i.prefix,"");return o=(o=o.replace(i.suffix,"")).replace(new RegExp(e.escapeRegex(i.groupSeparator),"g"),""),i.unmaskAsNumber?(""!==i.radixPoint&&-1!==o.indexOf(i.radixPoint)&&(o=o.replace(e.escapeRegex.call(this,i.radixPoint),".")),Number(o)):o},isComplete:function(t,n){var i=t.join(""),o=t.slice();if(n.postFormat(o,0,n),o.join("")!==i)return!1;var r=i.replace(n.prefix,"");return r=(r=r.replace(n.suffix,"")).replace(new RegExp(e.escapeRegex(n.groupSeparator),"g"),""),","===n.radixPoint&&(r=r.replace(e.escapeRegex(n.radixPoint),".")),isFinite(r)},onBeforeMask:function(t,n){if(""!==n.radixPoint&&isFinite(t))t=t.toString().replace(".",n.radixPoint);else{var i=t.match(/,/g),o=t.match(/\./g);o&&i?o.length>i.length?t=(t=t.replace(/\./g,"")).replace(",",n.radixPoint):i.length>o.length?t=(t=t.replace(/,/g,"")).replace(".",n.radixPoint):t=t.indexOf(".")<t.indexOf(",")?t.replace(/\./g,""):t=t.replace(/,/g,""):t=t.replace(new RegExp(e.escapeRegex(n.groupSeparator),"g"),"")}if(0===n.digits&&(-1!==t.indexOf(".")?t=t.substring(0,t.indexOf(".")):-1!==t.indexOf(",")&&(t=t.substring(0,t.indexOf(",")))),""!==n.radixPoint&&isFinite(n.digits)&&-1!==t.indexOf(n.radixPoint)){var r=t.split(n.radixPoint)[1].match(new RegExp("\\d*"))[0];if(parseInt(n.digits)<r.toString().length){var a=Math.pow(10,parseInt(n.digits));t=t.replace(e.escapeRegex(n.radixPoint),"."),t=(t=Math.round(parseFloat(t)*a)/a).toString().replace(".",n.radixPoint)}}return t.toString()},canClearPosition:function(t,e,n,i,o){var r=t.validPositions[e].input;return r!==o.radixPoint||null!==t.validPositions[e].match.fn&&!1===o.decimalProtect||isFinite(r)||e===n||r===o.groupSeparator||r===o.negationSymbol.front||r===o.negationSymbol.back},onKeyDown:function(n,i,o,r){var a=t(this);if(n.ctrlKey)switch(n.keyCode){case e.keyCode.UP:a.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(r.step)),a.trigger("setvalue");break;case e.keyCode.DOWN:a.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(r.step)),a.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowPlus:!1,allowMinus:!1}})}(jQuery,Inputmask),function(t,e){e.extendAliases({phone:{url:"phone-codes/phone-codes.js",countrycode:"",phoneCodeCache:{},mask:function(e){if(void 0===e.phoneCodeCache[e.url]){var n=[];e.definitions["#"]=e.definitions[9],t.ajax({url:e.url,async:!1,type:"get",dataType:"json",success:function(t){n=t},error:function(t,n,i){alert(i+" - "+e.url)}}),e.phoneCodeCache[e.url]=n.sort((function(t,e){return(t.mask||t)<(e.mask||e)?-1:1}))}return e.phoneCodeCache[e.url]},keepStatic:!1,nojumps:!0,nojumpsThreshold:1,onBeforeMask:function(t,e){var n=t.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(n.indexOf(e.countrycode)>1||-1===n.indexOf(e.countrycode))&&(n="+"+e.countrycode+n),n}},phonebe:{alias:"phone",url:"phone-codes/phone-be.js",countrycode:"32",nojumpsThreshold:4}})}(jQuery,Inputmask),function(t,e){e.extendAliases({Regex:{mask:"r",greedy:!1,repeat:"*",regex:null,regexTokens:null,tokenizer:/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,quantifierFilter:/[0-9]+[^,]/,isComplete:function(t,e){return new RegExp(e.regex).test(t.join(""))},definitions:{r:{validator:function(e,n,i,o,r){function a(t,e){this.matches=[],this.isGroup=t||!1,this.isQuantifier=e||!1,this.quantifier={min:1,max:1},this.repeaterPart=void 0}function s(){var t,e,n=new a,i=[];for(r.regexTokens=[];t=r.tokenizer.exec(r.regex);)switch(e=t[0],e.charAt(0)){case"(":i.push(new a(!0));break;case")":u=i.pop(),i.length>0?i[i.length-1].matches.push(u):n.matches.push(u);break;case"{":case"+":case"*":var o=new a(!1,!0),s=(e=e.replace(/[{}]/g,"")).split(","),l=isNaN(s[0])?s[0]:parseInt(s[0]),c=1===s.length?l:isNaN(s[1])?s[1]:parseInt(s[1]);if(o.quantifier={min:l,max:c},i.length>0){var d=i[i.length-1].matches;(t=d.pop()).isGroup||((u=new a(!0)).matches.push(t),t=u),d.push(t),d.push(o)}else(t=n.matches.pop()).isGroup||((u=new a(!0)).matches.push(t),t=u),n.matches.push(t),n.matches.push(o);break;default:i.length>0?i[i.length-1].matches.push(e):n.matches.push(e)}n.matches.length>0&&r.regexTokens.push(n)}function l(e,n){var i=!1;n&&(h+="(",f++);for(var o=0;o<e.matches.length;o++){var r=e.matches[o];if(!0===r.isGroup)i=l(r,!0);else if(!0===r.isQuantifier){var a=t.inArray(r,e.matches),s=e.matches[a-1],u=h;if(isNaN(r.quantifier.max)){for(;r.repeaterPart&&r.repeaterPart!==h&&r.repeaterPart.length>h.length&&!(i=l(s,!0)););(i=i||l(s,!0))&&(r.repeaterPart=h),h=u+r.quantifier.max}else{for(var d=0,p=r.quantifier.max-1;p>d&&!(i=l(s,!0));d++);h=u+"{"+r.quantifier.min+","+r.quantifier.max+"}"}}else if(void 0!==r.matches)for(var m=0;m<r.length&&!(i=l(r[m],n));m++);else{var g;if("["==r.charAt(0)){g=h,g+=r;for(var v=0;f>v;v++)g+=")";i=new RegExp("^("+g+")$").test(c)}else for(var y=0,_=r.length;_>y;y++)if("\\"!==r.charAt(y)){g=h,g=(g+=r.substr(0,y+1)).replace(/\|$/,"");for(v=0;f>v;v++)g+=")";if(i=new RegExp("^("+g+")$").test(c))break}h+=r}if(i)break}return n&&(h+=")",f--),i}var c,u,d=n.buffer.slice(),h="",p=!1,f=0;null===r.regexTokens&&s(),d.splice(i,0,e),c=d.join("");for(var m=0;m<r.regexTokens.length;m++){var g=r.regexTokens[m];if(p=l(g,g.isGroup))break}return p},cardinality:1}}}})}(jQuery,Inputmask),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery||Zepto)}((function(t){var e=function(e,n,i){var o={invalid:[],getCaret:function(){try{var t,n=0,i=e.get(0),r=document.selection,a=i.selectionStart;return r&&-1===navigator.appVersion.indexOf("MSIE 10")?((t=r.createRange()).moveStart("character",-o.val().length),n=t.text.length):(a||"0"===a)&&(n=a),n}catch(t){}},setCaret:function(t){try{if(e.is(":focus")){var n,i=e.get(0);i.setSelectionRange?(i.focus(),i.setSelectionRange(t,t)):((n=i.createTextRange()).collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select())}}catch(t){}},events:function(){e.on("keydown.mask",(function(t){e.data("mask-keycode",t.keyCode||t.which)})).on(t.jMaskGlobals.useInput?"input.mask":"keyup.mask",o.behaviour).on("paste.mask drop.mask",(function(){setTimeout((function(){e.keydown().keyup()}),100)})).on("change.mask",(function(){e.data("changed",!0)})).on("blur.mask",(function(){s===o.val()||e.data("changed")||e.trigger("change"),e.data("changed",!1)})).on("blur.mask",(function(){s=o.val()})).on("focus.mask",(function(e){!0===i.selectOnFocus&&t(e.target).select()})).on("focusout.mask",(function(){i.clearIfNotMatch&&!r.test(o.val())&&o.val("")}))},getRegexMask:function(){for(var t,e,i,o,r,s,l=[],c=0;c<n.length;c++)(t=a.translation[n.charAt(c)])?(e=t.pattern.toString().replace(/.{1}$|^.{1}/g,""),i=t.optional,(o=t.recursive)?(l.push(n.charAt(c)),r={digit:n.charAt(c),pattern:e}):l.push(i||o?e+"?":e)):l.push(n.charAt(c).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));return s=l.join(""),r&&(s=s.replace(new RegExp("("+r.digit+"(.*"+r.digit+")?)"),"($1)?").replace(new RegExp(r.digit,"g"),r.pattern)),new RegExp(s)},destroyEvents:function(){e.off(["input","keydown","keyup","paste","drop","blur","focusout",""].join(".mask "))},val:function(t){var n,i=e.is("input")?"val":"text";return arguments.length>0?(e[i]()!==t&&e[i](t),n=e):n=e[i](),n},getMCharsBeforeCount:function(t,e){for(var i=0,o=0,r=n.length;o<r&&o<t;o++)a.translation[n.charAt(o)]||(t=e?t+1:t,i++);return i},caretPos:function(t,e,i,r){return a.translation[n.charAt(Math.min(t-1,n.length-1))]?Math.min(t+i-e-r,i):o.caretPos(t+1,e,i,r)},behaviour:function(n){n=n||window.event,o.invalid=[];var i=e.data("mask-keycode");if(-1===t.inArray(i,a.byPassKeys)){var r=o.getCaret(),s=o.val().length,l=o.getMasked(),c=l.length,u=o.getMCharsBeforeCount(c-1)-o.getMCharsBeforeCount(s-1),d=r<s;return o.val(l),d&&(8!==i&&46!==i&&(r=o.caretPos(r,s,c,u)),o.setCaret(r)),o.callbacks(n)}},getMasked:function(t,e){var r,s,l=[],c=void 0===e?o.val():e+"",u=0,d=n.length,h=0,p=c.length,f=1,m="push",g=-1;for(i.reverse?(m="unshift",f=-1,r=0,u=d-1,h=p-1,s=function(){return u>-1&&h>-1}):(r=d-1,s=function(){return u<d&&h<p});s();){var v=n.charAt(u),y=c.charAt(h),_=a.translation[v];_?(y.match(_.pattern)?(l[m](y),_.recursive&&(-1===g?g=u:u===r&&(u=g-f),r===g&&(u-=f)),u+=f):_.optional?(u+=f,h-=f):_.fallback?(l[m](_.fallback),u+=f,h-=f):o.invalid.push({p:h,v:y,e:_.pattern}),h+=f):(t||l[m](v),y===v&&(h+=f),u+=f)}var b=n.charAt(r);return d!==p+1||a.translation[b]||l.push(b),l.join("")},callbacks:function(t){var r=o.val(),a=r!==s,l=[r,t,e,i],c=function(t,e,n){"function"==typeof i[t]&&e&&i[t].apply(this,n)};c("onChange",!0===a,l),c("onKeyPress",!0===a,l),c("onComplete",r.length===n.length,l),c("onInvalid",o.invalid.length>0,[r,t,e,o.invalid,i])}};e=t(e);var r,a=this,s=o.val();n="function"==typeof n?n(o.val(),void 0,e,i):n,a.mask=n,a.options=i,a.remove=function(){var t=o.getCaret();return o.destroyEvents(),o.val(a.getCleanVal()),o.setCaret(t-o.getMCharsBeforeCount(t)),e},a.getCleanVal=function(){return o.getMasked(!0)},a.getMaskedVal=function(t){return o.getMasked(!1,t)},a.init=function(n){if(n=n||!1,i=i||{},a.clearIfNotMatch=t.jMaskGlobals.clearIfNotMatch,a.byPassKeys=t.jMaskGlobals.byPassKeys,a.translation=t.extend({},t.jMaskGlobals.translation,i.translation),a=t.extend(!0,{},a,i),r=o.getRegexMask(),!1===n){i.placeholder&&e.attr("placeholder",i.placeholder),e.data("mask")&&e.attr("autocomplete","off"),o.destroyEvents(),o.events();var s=o.getCaret();o.val(o.getMasked()),o.setCaret(s+o.getMCharsBeforeCount(s,!0))}else o.events(),o.val(o.getMasked())},a.init(!e.is("input"))};t.maskWatchers={};var n=function(){var n=t(this),o={},r="data-mask-",a=n.attr("data-mask");if(n.attr(r+"reverse")&&(o.reverse=!0),n.attr(r+"clearifnotmatch")&&(o.clearIfNotMatch=!0),"true"===n.attr(r+"selectonfocus")&&(o.selectOnFocus=!0),i(n,a,o))return n.data("mask",new e(this,a,o))},i=function(e,n,i){i=i||{};var o=t(e).data("mask"),r=JSON.stringify,a=t(e).val()||t(e).text();try{return"function"==typeof n&&(n=n(a)),"object"!=typeof o||r(o.options)!==r(i)||o.mask!==n}catch(t){}},o=function(t){var e,n=document.createElement("div");return(e=(t="on"+t)in n)||(n.setAttribute(t,"return;"),e="function"==typeof n[t]),n=null,e};t.fn.mask=function(n,o){o=o||{};var r=this.selector,a=t.jMaskGlobals,s=a.watchInterval,l=o.watchInputs||a.watchInputs,c=function(){if(i(this,n,o))return t(this).data("mask",new e(this,n,o))};return t(this).each(c),r&&""!==r&&l&&(clearInterval(t.maskWatchers[r]),t.maskWatchers[r]=setInterval((function(){t(document).find(r).each(c)}),s)),this},t.fn.masked=function(t){return this.data("mask").getMaskedVal(t)},t.fn.unmask=function(){return clearInterval(t.maskWatchers[this.selector]),delete t.maskWatchers[this.selector],this.each((function(){var e=t(this).data("mask");e&&e.remove().removeData("mask")}))},t.fn.cleanVal=function(){return this.data("mask").getCleanVal()},t.applyDataMask=function(e){((e=e||t.jMaskGlobals.maskElements)instanceof t?e:t(e)).filter(t.jMaskGlobals.dataMaskAttr).each(n)};var r={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,useInput:o("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};t.jMaskGlobals=t.jMaskGlobals||{},(r=t.jMaskGlobals=t.extend(!0,{},r,t.jMaskGlobals)).dataMask&&t.applyDataMask(),setInterval((function(){t.jMaskGlobals.watchDataMask&&t.applyDataMask()}),r.watchInterval)})),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(){"use strict";var t=jQuery.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;return t(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||t(i).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),o=n.data("bs.alert");o||n.data("bs.alert",o=new i(this)),"string"==typeof e&&o[e].call(n)}))}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.4.1",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){a.detach().trigger("closed.bs.alert").remove()}var o=t(this),r=o.attr("data-target");r||(r=(r=o.attr("href"))&&r.replace(/.*(?=#[^\s]*$)/,"")),r="#"===r?[]:r;var a=t(document).find(r);e&&e.preventDefault(),a.length||(a=o.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var i=t(this),o=i.data("bs.button"),r="object"==typeof e&&e;o||i.data("bs.button",o=new n(this,r)),"toggle"==e?o.toggle():e&&o.setState(e)}))}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.4.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",r=i.data();e+="Text",null==r.resetText&&i.data("resetText",i[o]()),setTimeout(t.proxy((function(){i[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))}),this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(n){var i=t(n.target).closest(".btn");e.call(i,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))}))}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var i=t(this),o=i.data("bs.carousel"),r=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),a="string"==typeof e?e:r.slide;o||i.data("bs.carousel",o=new n(this,r)),"number"==typeof e?o.to(e):a?o[a]():r.interval&&o.pause().cycle()}))}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.4.1",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e);if(("prev"==t&&0===n||"next"==t&&n==this.$items.length-1)&&!this.options.wrap)return e;var i=(n+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(i)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){e.to(t)})):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,i){var o=this.$element.find(".item.active"),r=i||this.getItemForDirection(e,o),a=this.interval,s="next"==e?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var c=r[0],u=t.Event("slide.bs.carousel",{relatedTarget:c,direction:s});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=t(this.$indicators.children()[this.getItemIndex(r)]);d&&d.addClass("active")}var h=t.Event("slid.bs.carousel",{relatedTarget:c,direction:s});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),"object"==typeof r&&r.length&&r[0].offsetWidth,o.addClass(s),r.addClass(s),o.one("bsTransitionEnd",(function(){r.removeClass([e,s].join(" ")).addClass("active"),o.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout((function(){l.$element.trigger(h)}),0)})).emulateTransitionEnd(n.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(h)),a&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var o=function(n){var i=t(this),o=i.attr("href");o&&(o=o.replace(/.*(?=#[^\s]+$)/,""));var r=i.attr("data-target")||o,a=t(document).find(r);if(a.hasClass("carousel")){var s=t.extend({},a.data(),i.data()),l=i.attr("data-slide-to");l&&(s.interval=!1),e.call(a,s),l&&a.data("bs.carousel").to(l),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",(function(){t('[data-ride="carousel"]').each((function(){var n=t(this);e.call(n,n.data())}))}))}(jQuery),function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(document).find(i)}function n(e){return this.each((function(){var n=t(this),o=n.data("bs.collapse"),r=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||n.data("bs.collapse",o=new i(this,r)),"string"==typeof e&&o[e]()}))}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.4.1",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"))&&e.transitioning)){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(n.call(o,"hide"),e||o.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return s.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[a](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return o.call(this);this.$element[n](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(i.TRANSITION_DURATION)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy((function(n,i){var o=t(i);this.addAriaAndCollapsedClass(e(o),o)}),this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var o=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(i){var o=t(this);o.attr("data-target")||i.preventDefault();var r=e(o),a=r.data("bs.collapse")?"toggle":o.data();n.call(r,a)}))}(jQuery),function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==n?t(document).find(n):null;return i&&i.length?i:e.parent()}function n(n){n&&3===n.which||(t(o).remove(),t(r).each((function(){var i=t(this),o=e(i),r={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))})))}function i(e){return this.each((function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new a(this)),"string"==typeof e&&i[e].call(n)}))}var o=".dropdown-backdrop",r='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.4.1",a.prototype.toggle=function(i){var o=t(this);if(!o.is(".disabled, :disabled")){var r=e(o),a=r.hasClass("open");if(n(),!a){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var s={relatedTarget:this};if(r.trigger(i=t.Event("show.bs.dropdown",s)),i.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),
r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",s))}return!1}},a.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var o=e(i),a=o.hasClass("open");if(!a&&27!=n.which||a&&27==n.which)return 27==n.which&&o.find(r).trigger("focus"),i.trigger("click");var s=" li:not(.disabled):visible a",l=o.find(".dropdown-menu"+s);if(l.length){var c=l.index(n.target);38==n.which&&c>0&&c--,40==n.which&&c<l.length-1&&c++,~c||(c=0),l.eq(c).trigger("focus")}}}};var s=t.fn.dropdown;t.fn.dropdown=i,t.fn.dropdown.Constructor=a,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=s,this},t(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",r,a.prototype.toggle).on("keydown.bs.dropdown.data-api",r,a.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",a.prototype.keydown)}(jQuery),function(t){"use strict";function e(e,i){return this.each((function(){var o=t(this),r=o.data("bs.modal"),a=t.extend({},n.DEFAULTS,o.data(),"object"==typeof e&&e);r||o.data("bs.modal",r=new n(this,a)),"string"==typeof e?r[e](i):a.show&&r.show(i)}))}var n=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};n.VERSION="3.4.1",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},n.prototype.show=function(e){var i=this,o=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",(function(){i.$element.one("mouseup.dismiss.bs.modal",(function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var o=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),o&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var r=t.Event("shown.bs.modal",{relatedTarget:e});o?i.$dialog.one("bsTransitionEnd",(function(){i.$element.trigger("focus").trigger(r)})).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(r)})))},n.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy((function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}),this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy((function(t){27==t.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop((function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")}))},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=t.support.transition&&o;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+o).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy((function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())}),this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;r?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):a()}else e&&e()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",e+n),t(this.fixedContent).each((function(e,i){var o=i.style.paddingRight,r=t(i).css("padding-right");t(i).data("padding-right",o).css("padding-right",parseFloat(r)+n+"px")})))},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),t(this.fixedContent).each((function(e,n){var i=t(n).data("padding-right");t(n).removeData("padding-right"),n.style.paddingRight=i||""}))},n.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=n,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(n){var i=t(this),o=i.attr("href"),r=i.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,""),a=t(document).find(r),s=a.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},a.data(),i.data());i.is("a")&&n.preventDefault(),a.one("show.bs.modal",(function(t){t.isDefaultPrevented()||a.one("hidden.bs.modal",(function(){i.is(":visible")&&i.trigger("focus")}))})),e.call(a,s,this)}))}(jQuery),function(t){"use strict";function e(e,n){var i=e.nodeName.toLowerCase();if(-1!==t.inArray(i,n))return-1===t.inArray(i,r)||Boolean(e.nodeValue.match(s)||e.nodeValue.match(l));for(var o=t(n).filter((function(t,e){return e instanceof RegExp})),a=0,c=o.length;a<c;a++)if(i.match(o[a]))return!0;return!1}function n(n,i,o){if(0===n.length)return n;if(o&&"function"==typeof o)return o(n);if(!document.implementation||!document.implementation.createHTMLDocument)return n;var r=document.implementation.createHTMLDocument("sanitization");r.body.innerHTML=n;for(var a=t.map(i,(function(t,e){return e})),s=t(r.body).find("*"),l=0,c=s.length;l<c;l++){var u=s[l],d=u.nodeName.toLowerCase();if(-1!==t.inArray(d,a))for(var h=t.map(u.attributes,(function(t){return t})),p=[].concat(i["*"]||[],i[d]||[]),f=0,m=h.length;f<m;f++)e(h[f],p)||u.removeAttribute(h[f].nodeName);else u.parentNode.removeChild(u)}return r.body.innerHTML}function i(e){return this.each((function(){var n=t(this),i=n.data("bs.tooltip"),o="object"==typeof e&&e;!i&&/destroy|hide/.test(e)||(i||n.data("bs.tooltip",i=new c(this,o)),"string"==typeof e&&i[e]())}))}var o=["sanitize","whiteList","sanitizeFn"],r=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],a={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},s=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i,c=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};c.VERSION="3.4.1",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:a},c.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var a=o[r];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(e){var i=this.$element.data();for(var r in i)i.hasOwnProperty(r)&&-1!==t.inArray(r,o)&&delete i[r];return(e=t.extend({},this.getDefaults(),i,e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e.sanitize&&(e.template=n(e.template,e.whiteList,e.sanitizeFn)),e},c.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,(function(t,i){n[t]!=i&&(e[t]=i)})),e},c.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},c.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},c.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},c.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var i=this,o=this.tip(),r=this.getUID(this.type);this.setContent(),o.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&o.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,l=s.test(a);l&&(a=a.replace(s,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?o.appendTo(t(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),d=o[0].offsetWidth,h=o[0].offsetHeight;if(l){var p=a,f=this.getPosition(this.$viewport);a="bottom"==a&&u.bottom+h>f.bottom?"top":"top"==a&&u.top-h<f.top?"bottom":"right"==a&&u.right+d>f.width?"left":"left"==a&&u.left-d<f.left?"right":a,o.removeClass(p).addClass(a)}var m=this.getCalculatedOffset(a,u,d,h);this.applyPlacement(m,a);var g=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",g).emulateTransitionEnd(c.TRANSITION_DURATION):g()}},c.prototype.applyPlacement=function(e,n){var i=this.tip(),o=i[0].offsetWidth,r=i[0].offsetHeight,a=parseInt(i.css("margin-top"),10),s=parseInt(i.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(s)&&(s=0),e.top+=a,e.left+=s,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;"top"==n&&c!=r&&(e.top=e.top+r-c);var u=this.getViewportAdjustedDelta(n,e,l,c);u.left?e.left+=u.left:e.top+=u.top;var d=/top|bottom/.test(n),h=d?2*u.left-o+l:2*u.top-r+c,p=d?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(h,i[0][p],d)},c.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},c.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=n(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},c.prototype.hide=function(e){function n(){"in"!=i.hoverState&&o.detach(),i.$element&&i.$element.removeAttr("aria-describedby").trigger("hidden.bs."+i.type),e&&e()}var i=this,o=t(this.$tip),r=t.Event("hide.bs."+this.type);if(this.$element.trigger(r),!r.isDefaultPrevented())return o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(c.TRANSITION_DURATION):n(),this.hoverState=null,this},c.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(e){var n=(e=e||this.$element)[0],i="BODY"==n.tagName,o=n.getBoundingClientRect();null==o.width&&(o=t.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var r=window.SVGElement&&n instanceof window.SVGElement,a=i?{top:0,left:0}:r?null:e.offset(),s={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},o,s,l,a)},c.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},c.prototype.getViewportAdjustedDelta=function(t,e,n,i){var o={top:0,left:0};if(!this.$viewport)return o;var r=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var s=e.top-r-a.scroll,l=e.top+r-a.scroll+i;s<a.top?o.top=a.top-s:l>a.top+a.height&&(o.top=a.top+a.height-l)}else{var c=e.left-r,u=e.left+r+n;c<a.left?o.left=a.left-c:u>a.right&&(o.left=a.left+a.width-u)}return o},c.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},c.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},c.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null}))},c.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var u=t.fn.tooltip;t.fn.tooltip=i,t.fn.tooltip.Constructor=c,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=u,this}}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var i=t(this),o=i.data("bs.popover"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||i.data("bs.popover",o=new n(this,r)),"string"==typeof e&&o[e]())}))}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.4.1",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();if(this.options.html){var i=typeof n;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===i&&(n=this.sanitizeHtml(n))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===i?"html":"append"](n)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(n);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery),function(t){"use strict";function e(n,i){this.$body=t(document.body),this.$scrollElement=t(n).is(document.body)?t(window):t(n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each((function(){var i=t(this),o=i.data("bs.scrollspy"),r="object"==typeof n&&n;o||i.data("bs.scrollspy",o=new e(this,r)),"string"==typeof n&&o[n]()}))}e.VERSION="3.4.1",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[n]().top+i,o]]||null})).sort((function(t,e){return t[0]-e[0]})).each((function(){e.offsets.push(this[0]),e.targets.push(this[1])}))},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),o=this.offsets,r=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return a!=(t=r[r.length-1])&&this.activate(t);if(a&&e<o[0])return this.activeTarget=null,this.clear();for(t=o.length;t--;)a!=r[t]&&e>=o[t]&&(void 0===o[t+1]||e<o[t+1])&&this.activate(r[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=t.fn.scrollspy;t.fn.scrollspy=n,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load.bs.scrollspy.data-api",(function(){t('[data-spy="scroll"]').each((function(){var e=t(this);n.call(e,e.data())}))}))}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var i=t(this),o=i.data("bs.tab");o||i.data("bs.tab",o=new n(this)),"string"==typeof e&&o[e]()}))}var n=function(e){this.element=t(e)};n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.show=function(){var e=this.element,n=e.closest("ul:not(.dropdown-menu)"),i=e.data("target");if(i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var o=n.find(".active:last a"),r=t.Event("hide.bs.tab",{relatedTarget:e[0]}),a=t.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(r),e.trigger(a),!a.isDefaultPrevented()&&!r.isDefaultPrevented()){var s=t(document).find(i);this.activate(e.closest("li"),n),this.activate(s,s.parent(),(function(){o.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:o[0]})}))}}},n.prototype.activate=function(e,i,o){function r(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var a=i.find("> .active"),s=o&&t.support.transition&&(a.length&&a.hasClass("fade")||!!i.find("> .fade").length);a.length&&s?a.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),a.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var o=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var i=t(this),o=i.data("bs.affix"),r="object"==typeof e&&e;o||i.data("bs.affix",o=new n(this,r)),"string"==typeof e&&o[e]()}))}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i);var o=this.options.target===n.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=o.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.4.1",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var o=this.$target.scrollTop(),r=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return o<n&&"top";if("bottom"==this.affixed)return null!=n?!(o+this.unpin<=r.top)&&"bottom":!(o+a<=t-i)&&"bottom";var s=null==this.affixed,l=s?o:r.top;return null!=n&&o<=n?"top":null!=i&&l+(s?a:e)>=t-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,o=i.top,r=i.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(r=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof r&&(r=i.bottom(this.$element));var s=this.getState(a,e,o,r);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-e-r})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)}))}))}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(window.jQuery||window.Zepto)}((function(t){var e,n,i,o,r,a,s="Close",l="BeforeClose",c="AfterClose",u="BeforeAppend",d="MarkupParse",h="Open",p="Change",f="mfp",m="."+f,g="mfp-ready",v="mfp-removing",y="mfp-prevent-close",_=function(){},b=!!window.jQuery,w=t(window),x=function(t,n){e.ev.on(f+t+m,n)},k=function(e,n,i,o){var r=document.createElement("div");return r.className="mfp-"+e,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=t(r),n&&r.appendTo(n)),r},C=function(n,i){e.ev.triggerHandler(f+n,i),e.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),e.st.callbacks[n]&&e.st.callbacks[n].apply(e,t.isArray(i)?i:[i]))},S=function(n){return n===a&&e.currTemplate.closeBtn||(e.currTemplate.closeBtn=t(e.st.closeMarkup.replace("%title%",e.st.tClose)),a=n),e.currTemplate.closeBtn},T=function(){t.magnificPopup.instance||((e=new _).init(),t.magnificPopup.instance=e)},E=function(){var t=document.createElement("p").style,e=["ms","O","Moz","Webkit"];if(void 0!==t.transition)return!0;for(;e.length;)if(e.pop()+"Transition"in t)return!0;return!1};_.prototype={constructor:_,init:function(){var n=navigator.appVersion;e.isIE7=-1!==n.indexOf("MSIE 7."),e.isIE8=-1!==n.indexOf("MSIE 8."),e.isLowIE=e.isIE7||e.isIE8,e.isAndroid=/android/gi.test(n),e.isIOS=/iphone|ipad|ipod/gi.test(n),e.supportsTransition=E(),e.probablyMobile=e.isAndroid||e.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),i=t(document),e.popupsCache={}},open:function(n){var o;if(!1===n.isObj){e.items=n.items.toArray(),e.index=0;var a,s=n.items;for(o=0;o<s.length;o++)if((a=s[o]).parsed&&(a=a.el[0]),a===n.el[0]){e.index=o;break}}else e.items=t.isArray(n.items)?n.items:[n.items],e.index=n.index||0;if(!e.isOpen){e.types=[],r="",n.mainEl&&n.mainEl.length?e.ev=n.mainEl.eq(0):e.ev=i,n.key?(e.popupsCache[n.key]||(e.popupsCache[n.key]={}),e.currTemplate=e.popupsCache[n.key]):e.currTemplate={},e.st=t.extend(!0,{},t.magnificPopup.defaults,n),e.fixedContentPos="auto"===e.st.fixedContentPos?!e.probablyMobile:e.st.fixedContentPos,e.st.modal&&(e.st.closeOnContentClick=!1,e.st.closeOnBgClick=!1,e.st.showCloseBtn=!1,e.st.enableEscapeKey=!1),e.bgOverlay||(e.bgOverlay=k("bg").on("click"+m,(function(){e.close()})),e.wrap=k("wrap").attr("tabindex",-1).on("click"+m,(function(t){e._checkIfClose(t.target)&&e.close()})),e.container=k("container",e.wrap)),e.contentContainer=k("content"),e.st.preloader&&(e.preloader=k("preloader",e.container,e.st.tLoading));var l=t.magnificPopup.modules;for(o=0;o<l.length;o++){var c=l[o];c=c.charAt(0).toUpperCase()+c.slice(1),e["init"+c].call(e)}C("BeforeOpen"),e.st.showCloseBtn&&(e.st.closeBtnInside?(x(d,(function(t,e,n,i){n.close_replaceWith=S(i.type)})),r+=" mfp-close-btn-in"):e.wrap.append(S())),e.st.alignTop&&(r+=" mfp-align-top"),e.fixedContentPos?e.wrap.css({overflow:e.st.overflowY,overflowX:"hidden",overflowY:e.st.overflowY}):e.wrap.css({top:w.scrollTop(),position:"absolute"}),(!1===e.st.fixedBgPos||"auto"===e.st.fixedBgPos&&!e.fixedContentPos)&&e.bgOverlay.css({height:i.height(),position:"absolute"}),e.st.enableEscapeKey&&i.on("keyup"+m,(function(t){27===t.keyCode&&e.close()})),w.on("resize"+m,(function(){e.updateSize()})),e.st.closeOnContentClick||(r+=" mfp-auto-cursor"),r&&e.wrap.addClass(r);var u=e.wH=w.height(),p={};if(e.fixedContentPos&&e._hasScrollBar(u)){var f=e._getScrollbarSize();f&&(p.marginRight=f)}e.fixedContentPos&&(e.isIE7?t("body, html").css("overflow","hidden"):p.overflow="hidden");var v=e.st.mainClass;return e.isIE7&&(v+=" mfp-ie7"),v&&e._addClassToMFP(v),e.updateItemHTML(),C("BuildControls"),t("html").css(p),e.bgOverlay.add(e.wrap).prependTo(e.st.prependTo||t(document.body)),e._lastFocusedEl=document.activeElement,setTimeout((function(){e.content?(e._addClassToMFP(g),e._setFocus()):e.bgOverlay.addClass(g),i.on("focusin"+m,e._onFocusIn)}),16),e.isOpen=!0,e.updateSize(u),C(h),n}e.updateItemHTML()},close:function(){e.isOpen&&(C(l),e.isOpen=!1,e.st.removalDelay&&!e.isLowIE&&e.supportsTransition?(e._addClassToMFP(v),setTimeout((function(){e._close()}),e.st.removalDelay)):e._close())},_close:function(){C(s);var n=v+" "+g+" ";if(e.bgOverlay.detach(),e.wrap.detach(),e.container.empty(),e.st.mainClass&&(n+=e.st.mainClass+" "),e._removeClassFromMFP(n),e.fixedContentPos){var o={marginRight:""};e.isIE7?t("body, html").css("overflow",""):o.overflow="",t("html").css(o)}i.off("keyup"+m+" focusin"+m),e.ev.off(m),e.wrap.attr("class","mfp-wrap").removeAttr("style"),e.bgOverlay.attr("class","mfp-bg"),e.container.attr("class","mfp-container"),!e.st.showCloseBtn||e.st.closeBtnInside&&!0!==e.currTemplate[e.currItem.type]||e.currTemplate.closeBtn&&e.currTemplate.closeBtn.detach(),e._lastFocusedEl&&t(e._lastFocusedEl).focus(),e.currItem=null,e.content=null,e.currTemplate=null,e.prevHeight=0,C(c)},updateSize:function(t){if(e.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;e.wrap.css("height",i),e.wH=i}else e.wH=t||w.height();e.fixedContentPos||e.wrap.css("height",e.wH),C("Resize")},updateItemHTML:function(){var n=e.items[e.index];e.contentContainer.detach(),e.content&&e.content.detach(),n.parsed||(n=e.parseEl(e.index));var i=n.type;if(C("BeforeChange",[e.currItem?e.currItem.type:"",i]),e.currItem=n,!e.currTemplate[i]){var r=!!e.st[i]&&e.st[i].markup;C("FirstMarkupParse",r),e.currTemplate[i]=!r||t(r)}o&&o!==n.type&&e.container.removeClass("mfp-"+o+"-holder");var a=e["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,e.currTemplate[i]);e.appendContent(a,i),n.preloaded=!0,C(p,n),o=n.type,e.container.prepend(e.contentContainer),C("AfterChange")},appendContent:function(t,n){e.content=t,t?e.st.showCloseBtn&&e.st.closeBtnInside&&!0===e.currTemplate[n]?e.content.find(".mfp-close").length||e.content.append(S()):e.content=t:e.content="",C(u),
e.container.addClass("mfp-"+n+"-holder"),e.contentContainer.append(e.content)},parseEl:function(n){var i,o=e.items[n];if(o.tagName?o={el:t(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=e.types,a=0;a<r.length;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||e.st.type||"inline",o.index=n,o.parsed=!0,e.items[n]=o,C("ElementParse",o),e.items[n]},addGroup:function(t,n){var i=function(i){i.mfpEl=this,e._openClick(i,t,n)};n||(n={});var o="click.magnificPopup";n.mainEl=t,n.items?(n.isObj=!0,t.off(o).on(o,i)):(n.isObj=!1,n.delegate?t.off(o).on(o,n.delegate,i):(n.items=t,t.off(o).on(o,i)))},_openClick:function(n,i,o){if((void 0!==o.midClick?o.midClick:t.magnificPopup.defaults.midClick)||2!==n.which&&!n.ctrlKey&&!n.metaKey){var r=void 0!==o.disableOn?o.disableOn:t.magnificPopup.defaults.disableOn;if(r)if(t.isFunction(r)){if(!r.call(e))return!0}else if(w.width()<r)return!0;n.type&&(n.preventDefault(),e.isOpen&&n.stopPropagation()),o.el=t(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),e.open(o)}},updateStatus:function(t,i){if(e.preloader){n!==t&&e.container.removeClass("mfp-s-"+n),i||"loading"!==t||(i=e.st.tLoading);var o={status:t,text:i};C("UpdateStatus",o),t=o.status,i=o.text,e.preloader.html(i),e.preloader.find("a").on("click",(function(t){t.stopImmediatePropagation()})),e.container.addClass("mfp-s-"+t),n=t}},_checkIfClose:function(n){if(!t(n).hasClass(y)){var i=e.st.closeOnContentClick,o=e.st.closeOnBgClick;if(i&&o)return!0;if(!e.content||t(n).hasClass("mfp-close")||e.preloader&&n===e.preloader[0])return!0;if(n===e.content[0]||t.contains(e.content[0],n)){if(i)return!0}else if(o&&t.contains(document,n))return!0;return!1}},_addClassToMFP:function(t){e.bgOverlay.addClass(t),e.wrap.addClass(t)},_removeClassFromMFP:function(t){this.bgOverlay.removeClass(t),e.wrap.removeClass(t)},_hasScrollBar:function(t){return(e.isIE7?i.height():document.body.scrollHeight)>(t||w.height())},_setFocus:function(){(e.st.focus?e.content.find(e.st.focus).eq(0):e.wrap).focus()},_onFocusIn:function(n){if(n.target!==e.wrap[0]&&!t.contains(e.wrap[0],n.target))return e._setFocus(),!1},_parseMarkup:function(e,n,i){var o;i.data&&(n=t.extend(i.data,n)),C(d,[e,n,i]),t.each(n,(function(t,n){if(void 0===n||!1===n)return!0;if((o=t.split("_")).length>1){var i=e.find(m+"-"+o[0]);if(i.length>0){var r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith('<img src="'+n+'" class="'+i.attr("class")+'" />'):i.attr(o[1],n)}}else e.find(m+"-"+t).html(n)}))},_getScrollbarSize:function(){if(void 0===e.scrollbarSize){var t=document.createElement("div");t.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(t),e.scrollbarSize=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return e.scrollbarSize}},t.magnificPopup={instance:null,proto:_.prototype,modules:[],open:function(e,n){return T(),(e=e?t.extend(!0,{},e):{}).isObj=!0,e.index=n||0,this.instance.open(e)},close:function(){return t.magnificPopup.instance&&t.magnificPopup.instance.close()},registerModule:function(e,n){n.options&&(t.magnificPopup.defaults[e]=n.options),t.extend(this.proto,n.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},t.fn.magnificPopup=function(n){T();var i=t(this);if("string"==typeof n)if("open"===n){var o,r=b?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),e._openClick({mfpEl:o},i,r)}else e.isOpen&&e[n].apply(e,Array.prototype.slice.call(arguments,1));else n=t.extend(!0,{},n),b?i.data("magnificPopup",n):i[0].magnificPopup=n,e.addGroup(i,n);return i};var $,D,A,j="inline",M=function(){A&&(D.after(A.addClass($)).detach(),A=null)};t.magnificPopup.registerModule(j,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){e.types.push(j),x(s+"."+j,(function(){M()}))},getInline:function(n,i){if(M(),n.src){var o=e.st.inline,r=t(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(D||($=o.hiddenClass,D=k($),$="mfp-"+$),A=r.after(D).detach().removeClass($)),e.updateStatus("ready")}else e.updateStatus("error",o.tNotFound),r=t("<div>");return n.inlineElement=r,r}return e.updateStatus("ready"),e._parseMarkup(i,{},n),i}}});var I,P="ajax",O=function(){I&&t(document.body).removeClass(I)},N=function(){O(),e.req&&e.req.abort()};t.magnificPopup.registerModule(P,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){e.types.push(P),I=e.st.ajax.cursor,x(s+"."+P,N),x("BeforeChange."+P,N)},getAjax:function(n){I&&t(document.body).addClass(I),e.updateStatus("loading");var i=t.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};C("ParseAjax",a),e.appendContent(t(a.data),P),n.finished=!0,O(),e._setFocus(),setTimeout((function(){e.wrap.addClass(g)}),16),e.updateStatus("ready"),C("AjaxContentAdded")},error:function(){O(),n.finished=n.loadError=!0,e.updateStatus("error",e.st.ajax.tError.replace("%url%",n.src))}},e.st.ajax.settings);return e.req=t.ajax(i),""}}});var L,F=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=e.st.image.titleSrc;if(i){if(t.isFunction(i))return i.call(e,n);if(n.el)return n.el.attr(i)||""}return""};t.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var n=e.st.image,i=".image";e.types.push("image"),x(h+i,(function(){"image"===e.currItem.type&&n.cursor&&t(document.body).addClass(n.cursor)})),x(s+i,(function(){n.cursor&&t(document.body).removeClass(n.cursor),w.off("resize"+m)})),x("Resize"+i,e.resizeImage),e.isLowIE&&x("AfterChange",e.resizeImage)},resizeImage:function(){var t=e.currItem;if(t&&t.img&&e.st.image.verticalFit){var n=0;e.isLowIE&&(n=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",e.wH-n)}},_onImageHasSize:function(t){t.img&&(t.hasSize=!0,L&&clearInterval(L),t.isCheckingImgSize=!1,C("ImageHasSize",t),t.imgHidden&&(e.content&&e.content.removeClass("mfp-loading"),t.imgHidden=!1))},findImageSize:function(t){var n=0,i=t.img[0],o=function(r){L&&clearInterval(L),L=setInterval((function(){i.naturalWidth>0?e._onImageHasSize(t):(n>200&&clearInterval(L),3===++n?o(10):40===n?o(50):100===n&&o(500))}),r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===e.currItem&&(e._onImageHasSize(n),e.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,C("ImageLoadComplete")):++o<200?setTimeout(r,100):a())},a=function(){n&&(n.img.off(".mfploader"),n===e.currItem&&(e._onImageHasSize(n),e.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=e.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.el&&n.el.find("img").length&&(c.alt=n.el.find("img").attr("alt")),n.img=t(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),(c=n.img[0]).naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return e._parseMarkup(i,{title:F(n),img_replaceWith:n.img},n),e.resizeImage(),n.hasSize?(L&&clearInterval(L),n.loadError?(i.addClass("mfp-loading"),e.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),e.updateStatus("ready")),i):(e.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),e.findImageSize(n)),i)}}});var R,q=function(){return void 0===R&&(R=void 0!==document.createElement("p").style.MozTransform),R};t.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(t){return t.is("img")?t:t.find("img")}},proto:{initZoom:function(){var t,n=e.st.zoom,i=".zoom";if(n.enabled&&e.supportsTransition){var o,r,a=n.duration,c=function(t){var e=t.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,e.css(o),e},u=function(){e.content.css("visibility","visible")};x("BuildControls"+i,(function(){if(e._allowZoom()){if(clearTimeout(o),e.content.css("visibility","hidden"),!(t=e._getItemToZoom()))return void u();(r=c(t)).css(e._getOffset()),e.wrap.append(r),o=setTimeout((function(){r.css(e._getOffset(!0)),o=setTimeout((function(){u(),setTimeout((function(){r.remove(),t=r=null,C("ZoomAnimationEnded")}),16)}),a)}),16)}})),x(l+i,(function(){if(e._allowZoom()){if(clearTimeout(o),e.st.removalDelay=a,!t){if(!(t=e._getItemToZoom()))return;r=c(t)}r.css(e._getOffset(!0)),e.wrap.append(r),e.content.css("visibility","hidden"),setTimeout((function(){r.css(e._getOffset())}),16)}})),x(s+i,(function(){e._allowZoom()&&(u(),r&&r.remove(),t=null)}))}},_allowZoom:function(){return"image"===e.currItem.type},_getItemToZoom:function(){return!!e.currItem.hasSize&&e.currItem.img},_getOffset:function(n){var i,o=(i=n?e.currItem.img:e.st.zoom.opener(e.currItem.el||e.currItem)).offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=t(window).scrollTop()-r;var s={width:i.width(),height:(b?i.innerHeight():i[0].offsetHeight)-a-r};return q()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var B="iframe",H="//about:blank",U=function(t){if(e.currTemplate[B]){var n=e.currTemplate[B].find("iframe");n.length&&(t||(n[0].src=H),e.isIE8&&n.css("display",t?"block":"none"))}};t.magnificPopup.registerModule(B,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){e.types.push(B),x("BeforeChange",(function(t,e,n){e!==n&&(e===B?U():n===B&&U(!0))})),x(s+"."+B,(function(){U()}))},getIframe:function(n,i){var o=n.src,r=e.st.iframe;t.each(r.patterns,(function(){if(o.indexOf(this.index)>-1)return this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1}));var a={};return r.srcAction&&(a[r.srcAction]=o),e._parseMarkup(i,a,n),e.updateStatus("ready"),i}}});var z=function(t){var n=e.items.length;return t>n-1?t-n:t<0?n+t:t},W=function(t,e,n){return t.replace(/%curr%/gi,e+1).replace(/%total%/gi,n)};t.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=e.st.gallery,o=".mfp-gallery",a=Boolean(t.fn.mfpFastClick);if(e.direction=!0,!n||!n.enabled)return!1;r+=" mfp-gallery",x(h+o,(function(){n.navigateByImgClick&&e.wrap.on("click"+o,".mfp-img",(function(){if(e.items.length>1)return e.next(),!1})),i.on("keydown"+o,(function(t){37===t.keyCode?e.prev():39===t.keyCode&&e.next()}))})),x("UpdateStatus"+o,(function(t,n){n.text&&(n.text=W(n.text,e.currItem.index,e.items.length))})),x(d+o,(function(t,i,o,r){var a=e.items.length;o.counter=a>1?W(n.tCounter,r.index,a):""})),x("BuildControls"+o,(function(){if(e.items.length>1&&n.arrows&&!e.arrowLeft){var i=n.arrowMarkup,o=e.arrowLeft=t(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),r=e.arrowRight=t(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=a?"mfpFastClick":"click";o[s]((function(){e.prev()})),r[s]((function(){e.next()})),e.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",r[0],!1,!0),k("a",r[0],!1,!0)),e.container.append(o.add(r))}})),x(p+o,(function(){e._preloadTimeout&&clearTimeout(e._preloadTimeout),e._preloadTimeout=setTimeout((function(){e.preloadNearbyImages(),e._preloadTimeout=null}),16)})),x(s+o,(function(){i.off(o),e.wrap.off("click"+o),e.arrowLeft&&a&&e.arrowLeft.add(e.arrowRight).destroyMfpFastClick(),e.arrowRight=e.arrowLeft=null}))},next:function(){e.direction=!0,e.index=z(e.index+1),e.updateItemHTML()},prev:function(){e.direction=!1,e.index=z(e.index-1),e.updateItemHTML()},goTo:function(t){e.direction=t>=e.index,e.index=t,e.updateItemHTML()},preloadNearbyImages:function(){var t,n=e.st.gallery.preload,i=Math.min(n[0],e.items.length),o=Math.min(n[1],e.items.length);for(t=1;t<=(e.direction?o:i);t++)e._preloadItem(e.index+t);for(t=1;t<=(e.direction?i:o);t++)e._preloadItem(e.index-t)},_preloadItem:function(n){if(n=z(n),!e.items[n].preloaded){var i=e.items[n];i.parsed||(i=e.parseEl(n)),C("LazyLoad",i),"image"===i.type&&(i.img=t('<img class="mfp-img" />').on("load.mfploader",(function(){i.hasSize=!0})).on("error.mfploader",(function(){i.hasSize=!0,i.loadError=!0,C("LazyLoadError",i)})).attr("src",i.src)),i.preloaded=!0}}}});var Q,V,G,Y,X="retina";t.magnificPopup.registerModule(X,{options:{replaceSrc:function(t){return t.src.replace(/\.\w+$/,(function(t){return"@2x"+t}))},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var t=e.st.retina,n=t.ratio;(n=isNaN(n)?n():n)>1&&(x("ImageHasSize."+X,(function(t,e){e.img.css({"max-width":e.img[0].naturalWidth/n,width:"100%"})})),x("ElementParse."+X,(function(e,i){i.src=t.replaceSrc(i,n)})))}}}}),Q=1e3,V="ontouchstart"in window,G=function(){w.off("touchmove"+Y+" touchend"+Y)},Y=".mfpFastClick",t.fn.mfpFastClick=function(e){return t(this).each((function(){var n,i,o,r,a,s,l,c=t(this);V&&c.on("touchstart"+Y,(function(t){a=!1,l=1,s=t.originalEvent?t.originalEvent.touches[0]:t.touches[0],o=s.clientX,r=s.clientY,w.on("touchmove"+Y,(function(t){s=t.originalEvent?t.originalEvent.touches:t.touches,l=s.length,s=s[0],(Math.abs(s.clientX-o)>10||Math.abs(s.clientY-r)>10)&&(a=!0,G())})).on("touchend"+Y,(function(t){G(),a||l>1||(n=!0,t.preventDefault(),clearTimeout(i),i=setTimeout((function(){n=!1}),Q),e())}))})),c.on("click"+Y,(function(){n||e()}))}))},t.fn.destroyMfpFastClick=function(){t(this).off("touchstart"+Y+" click"+Y),V&&w.off("touchmove"+Y+" touchend"+Y)},T()})),function(t,e,n){t.fn.backstretch=function(i,o){return(i===n||0===i.length)&&t.error("No images were supplied for Backstretch"),0===t(e).scrollTop()&&e.scrollTo(0,0),this.each((function(){var e=t(this),n=e.data("backstretch");if(n){if("string"==typeof i&&"function"==typeof n[i])return void n[i](o);o=t.extend(n.options,o),n.destroy(!0)}n=new r(this,i,o),e.data("backstretch",n)}))},t.backstretch=function(e,n){return t("body").backstretch(e,n).data("backstretch")},t.expr[":"].backstretch=function(e){return t(e).data("backstretch")!==n},t.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5e3,fade:0};var i={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},o={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},r=function(n,o,r){this.options=t.extend({},t.fn.backstretch.defaults,r||{}),this.images=t.isArray(o)?o:[o],t.each(this.images,(function(){t("<img />")[0].src=this})),this.isBody=n===document.body,this.$container=t(n),this.$root=this.isBody?t(a?e:document):this.$container,n=this.$container.children(".backstretch").first(),this.$wrap=n.length?n:t('<div class="backstretch"></div>').css(i).appendTo(this.$container),this.isBody||(n=this.$container.css("position"),o=this.$container.css("zIndex"),this.$container.css({position:"static"===n?"relative":n,zIndex:"auto"===o?0:o,background:"none"}),this.$wrap.css({zIndex:-999998})),this.$wrap.css({position:this.isBody&&a?"fixed":"absolute"}),this.index=0,this.show(this.index),t(e).on("resize.backstretch",t.proxy(this.resize,this)).on("orientationchange.backstretch",t.proxy((function(){this.isBody&&0===e.pageYOffset&&(e.scrollTo(0,1),this.resize())}),this))};r.prototype={resize:function(){try{var t,n={left:0,top:0},i=this.isBody?this.$root.width():this.$root.innerWidth(),o=i,r=this.isBody?e.innerHeight?e.innerHeight:this.$root.height():this.$root.innerHeight(),a=o/this.$img.data("ratio");a>=r?(t=(a-r)/2,this.options.centeredY&&(n.top="-"+t+"px")):(t=((o=(a=r)*this.$img.data("ratio"))-i)/2,this.options.centeredX&&(n.left="-"+t+"px")),this.$wrap.css({width:i,height:r}).find("img:not(.deleteable)").css({width:o,height:a}).css(n)}catch(t){}return this},show:function(e){if(!(Math.abs(e)>this.images.length-1)){var n=this,i=n.$wrap.find("img").addClass("deleteable"),r={relatedTarget:n.$container[0]};return n.$container.trigger(t.Event("backstretch.before",r),[n,e]),this.index=e,clearInterval(n.interval),n.$img=t("<img />").css(o).bind("load",(function(o){var a=this.width||t(o.target).width();o=this.height||t(o.target).height(),t(this).data("ratio",a/o),t(this).fadeIn(n.options.speed||n.options.fade,(function(){i.remove(),n.paused||n.cycle(),t(["after","show"]).each((function(){n.$container.trigger(t.Event("backstretch."+this,r),[n,e])}))})),n.resize()})).appendTo(n.$wrap),n.$img.attr("src",n.images[e]),n}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this.next(),this},cycle:function(){return 1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(t.proxy((function(){this.paused||this.next()}),this),this.options.duration)),this},destroy:function(n){t(e).off("resize.backstretch orientationchange.backstretch"),clearInterval(this.interval),n||this.$wrap.remove(),this.$container.removeData("backstretch")}};var a,s=navigator.userAgent,l=navigator.platform,c=!!(c=s.match(/AppleWebKit\/([0-9]+)/))&&c[1],u=!!(u=s.match(/Fennec\/([0-9]+)/))&&u[1],d=s.match(/Opera Mobi\/([0-9]+)/),h=!!d&&d[1],p=!!(p=s.match(/MSIE ([0-9]+)/))&&p[1];a=!((-1<l.indexOf("iPhone")||-1<l.indexOf("iPad")||-1<l.indexOf("iPod"))&&c&&534>c||e.operamini&&"[object OperaMini]"==={}.toString.call(e.operamini)||d&&7458>h||-1<s.indexOf("Android")&&c&&533>c||u&&6>u||"palmGetResource"in e&&c&&534>c||-1<s.indexOf("MeeGo")&&-1<s.indexOf("NokiaBrowser/8.5.0")||p&&6>=p)}(jQuery,window),"function"!=typeof Object.create&&(Object.create=function(t){function e(){}return e.prototype=t,new e}),function(t,e,n){var i={init:function(e,n){var i=this;i.$elem=t(n),i.options=t.extend({},t.fn.owlCarousel.options,i.$elem.data(),e),i.userOptions=e,i.loadContent()},loadContent:function(){function e(t){var e,n="";if("function"==typeof i.options.jsonSuccess)i.options.jsonSuccess.apply(this,[t]);else{for(e in t.owl)t.owl.hasOwnProperty(e)&&(n+=t.owl[e].item);i.$elem.html(n)}i.logIn()}var n,i=this;"function"==typeof i.options.beforeInit&&i.options.beforeInit.apply(this,[i.$elem]),"string"==typeof i.options.jsonPath?(n=i.options.jsonPath,t.getJSON(n,e)):i.logIn()},logIn:function(){var t=this;t.$elem.data("owl-originalStyles",t.$elem.attr("style")).data("owl-originalClasses",t.$elem.attr("class")),t.$elem.css({opacity:0}),t.orignalItems=t.options.items,t.checkBrowser(),t.wrapperWidth=0,t.checkVisible=null,t.setVars()},setVars:function(){var t=this;if(0===t.$elem.children().length)return!1;t.baseClass(),t.eventTypes(),t.$userItems=t.$elem.children(),t.itemsAmount=t.$userItems.length,t.wrapItems(),t.$owlItems=t.$elem.find(".owl-item"),t.$owlWrapper=t.$elem.find(".owl-wrapper"),t.playDirection="next",t.prevItem=0,t.prevArr=[0],t.currentItem=0,t.customEvents(),t.onStartup()},onStartup:function(){var t=this;t.updateItems(),t.calculateAll(),t.buildControls(),t.updateControls(),t.response(),t.moveEvents(),t.stopOnHover(),t.owlStatus(),!1!==t.options.transitionStyle&&t.transitionTypes(t.options.transitionStyle),!0===t.options.autoPlay&&(t.options.autoPlay=5e3),t.play(),t.$elem.find(".owl-wrapper").css("display","block"),t.$elem.is(":visible")?t.$elem.css("opacity",1):t.watchVisibility(),t.onstartup=!1,t.eachMoveUpdate(),"function"==typeof t.options.afterInit&&t.options.afterInit.apply(this,[t.$elem])},eachMoveUpdate:function(){var t=this;!0===t.options.lazyLoad&&t.lazyLoad(),!0===t.options.autoHeight&&t.autoHeight(),t.onVisibleItems(),"function"==typeof t.options.afterAction&&t.options.afterAction.apply(this,[t.$elem])},updateVars:function(){var t=this;"function"==typeof t.options.beforeUpdate&&t.options.beforeUpdate.apply(this,[t.$elem]),t.watchVisibility(),t.updateItems(),t.calculateAll(),t.updatePosition(),t.updateControls(),t.eachMoveUpdate(),"function"==typeof t.options.afterUpdate&&t.options.afterUpdate.apply(this,[t.$elem])},reload:function(){var t=this;e.setTimeout((function(){t.updateVars()}),0)},watchVisibility:function(){var t=this;if(!1!==t.$elem.is(":visible"))return!1;t.$elem.css({opacity:0}),e.clearInterval(t.autoPlayInterval),e.clearInterval(t.checkVisible),t.checkVisible=e.setInterval((function(){t.$elem.is(":visible")&&(t.reload(),t.$elem.animate({opacity:1},200),e.clearInterval(t.checkVisible))}),500)},wrapItems:function(){var t=this;t.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"></div>'),t.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">'),t.wrapperOuter=t.$elem.find(".owl-wrapper-outer"),t.$elem.css("display","block")},baseClass:function(){var t=this,e=t.$elem.hasClass(t.options.baseClass),n=t.$elem.hasClass(t.options.theme);e||t.$elem.addClass(t.options.baseClass),n||t.$elem.addClass(t.options.theme)},updateItems:function(){var e,n,i=this;if(!1===i.options.responsive)return!1;if(!0===i.options.singleItem)return i.options.items=i.orignalItems=1,i.options.itemsCustom=!1,i.options.itemsDesktop=!1,i.options.itemsDesktopSmall=!1,i.options.itemsTablet=!1,i.options.itemsTabletSmall=!1,i.options.itemsMobile=!1,!1;if((e=t(i.options.responsiveBaseWidth).width())>(i.options.itemsDesktop[0]||i.orignalItems)&&(i.options.items=i.orignalItems),!1!==i.options.itemsCustom)for(i.options.itemsCustom.sort((function(t,e){return t[0]-e[0]})),n=0;n<i.options.itemsCustom.length;n+=1)i.options.itemsCustom[n][0]<=e&&(i.options.items=i.options.itemsCustom[n][1]);else e<=i.options.itemsDesktop[0]&&!1!==i.options.itemsDesktop&&(i.options.items=i.options.itemsDesktop[1]),e<=i.options.itemsDesktopSmall[0]&&!1!==i.options.itemsDesktopSmall&&(i.options.items=i.options.itemsDesktopSmall[1]),e<=i.options.itemsTablet[0]&&!1!==i.options.itemsTablet&&(i.options.items=i.options.itemsTablet[1]),e<=i.options.itemsTabletSmall[0]&&!1!==i.options.itemsTabletSmall&&(i.options.items=i.options.itemsTabletSmall[1]),e<=i.options.itemsMobile[0]&&!1!==i.options.itemsMobile&&(i.options.items=i.options.itemsMobile[1]);i.options.items>i.itemsAmount&&!0===i.options.itemsScaleUp&&(i.options.items=i.itemsAmount)},response:function(){var n,i,o=this;if(!0!==o.options.responsive)return!1;i=t(e).width(),o.resizer=function(){t(e).width()!==i&&(!1!==o.options.autoPlay&&e.clearInterval(o.autoPlayInterval),e.clearTimeout(n),n=e.setTimeout((function(){i=t(e).width(),o.updateVars()}),o.options.responsiveRefreshRate))},t(e).resize(o.resizer)},updatePosition:function(){var t=this;t.jumpTo(t.currentItem),!1!==t.options.autoPlay&&t.checkAp()},appendItemsSizes:function(){var e=this,n=0,i=e.itemsAmount-e.options.items;e.$owlItems.each((function(o){var r=t(this);r.css({width:e.itemWidth}).data("owl-item",Number(o)),o%e.options.items!=0&&o!==i||o>i||(n+=1),r.data("owl-roundPages",n)}))},appendWrapperSizes:function(){var t=this,e=t.$owlItems.length*t.itemWidth;t.$owlWrapper.css({width:2*e,left:0}),t.appendItemsSizes()},calculateAll:function(){var t=this;t.calculateWidth(),t.appendWrapperSizes(),t.loops(),t.max()},calculateWidth:function(){var t=this;t.itemWidth=Math.round(t.$elem.width()/t.options.items)},max:function(){var t=this,e=-1*(t.itemsAmount*t.itemWidth-t.options.items*t.itemWidth);return t.options.items>t.itemsAmount?(t.maximumItem=0,e=0,t.maximumPixels=0):(t.maximumItem=t.itemsAmount-t.options.items,t.maximumPixels=e),e},min:function(){return 0},loops:function(){var e,n,i=this,o=0,r=0;for(i.positionsInArray=[0],i.pagesInArray=[],e=0;e<i.itemsAmount;e+=1)r+=i.itemWidth,i.positionsInArray.push(-r),!0===i.options.scrollPerPage&&(n=t(i.$owlItems[e]).data("owl-roundPages"))!==o&&(i.pagesInArray[o]=i.positionsInArray[e],o=n)},buildControls:function(){var e=this;!0!==e.options.navigation&&!0!==e.options.pagination||(e.owlControls=t('<div class="owl-controls"/>').toggleClass("clickable",!e.browser.isTouch).appendTo(e.$elem)),!0===e.options.pagination&&e.buildPagination(),!0===e.options.navigation&&e.buildButtons()},buildButtons:function(){var e=this,n=t('<div class="owl-buttons"/>');e.owlControls.append(n),e.buttonPrev=t("<div/>",{class:"owl-prev",html:e.options.navigationText[0]||""}),e.buttonNext=t("<div/>",{class:"owl-next",html:e.options.navigationText[1]||""}),n.append(e.buttonPrev).append(e.buttonNext),n.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',(function(t){t.preventDefault()})),n.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',(function(n){n.preventDefault(),t(this).hasClass("owl-next")?e.next():e.prev()}))},buildPagination:function(){var e=this;e.paginationWrapper=t('<div class="owl-pagination"/>'),e.owlControls.append(e.paginationWrapper),e.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",(function(n){n.preventDefault(),Number(t(this).data("owl-page"))!==e.currentItem&&e.goTo(Number(t(this).data("owl-page")),!0)}))},updatePagination:function(){var e,n,i,o,r,a,s=this;if(!1===s.options.pagination)return!1;for(s.paginationWrapper.html(""),e=0,n=s.itemsAmount-s.itemsAmount%s.options.items,o=0;o<s.itemsAmount;o+=1)o%s.options.items==0&&(e+=1,n===o&&(i=s.itemsAmount-s.options.items),r=t("<div/>",{class:"owl-page"}),a=t("<span></span>",{text:!0===s.options.paginationNumbers?e:"",class:!0===s.options.paginationNumbers?"owl-numbers":""}),r.append(a),r.data("owl-page",n===o?i:o),r.data("owl-roundPages",e),s.paginationWrapper.append(r));s.checkPagination()},checkPagination:function(){var e=this;if(!1===e.options.pagination)return!1;e.paginationWrapper.find(".owl-page").each((function(){t(this).data("owl-roundPages")===t(e.$owlItems[e.currentItem]).data("owl-roundPages")&&(e.paginationWrapper.find(".owl-page").removeClass("active"),t(this).addClass("active"))}))},checkNavigation:function(){var t=this;if(!1===t.options.navigation)return!1;!1===t.options.rewindNav&&(0===t.currentItem&&0===t.maximumItem?(t.buttonPrev.addClass("disabled"),t.buttonNext.addClass("disabled")):0===t.currentItem&&0!==t.maximumItem?(t.buttonPrev.addClass("disabled"),t.buttonNext.removeClass("disabled")):t.currentItem===t.maximumItem?(t.buttonPrev.removeClass("disabled"),t.buttonNext.addClass("disabled")):0!==t.currentItem&&t.currentItem!==t.maximumItem&&(t.buttonPrev.removeClass("disabled"),t.buttonNext.removeClass("disabled")))},updateControls:function(){var t=this;t.updatePagination(),t.checkNavigation(),t.owlControls&&(t.options.items>=t.itemsAmount?t.owlControls.hide():t.owlControls.show())},destroyControls:function(){var t=this;t.owlControls&&t.owlControls.remove()},next:function(t){var e=this;if(e.isTransition)return!1;if(e.currentItem+=!0===e.options.scrollPerPage?e.options.items:1,e.currentItem>e.maximumItem+(!0===e.options.scrollPerPage?e.options.items-1:0)){if(!0!==e.options.rewindNav)return e.currentItem=e.maximumItem,!1;e.currentItem=0,t="rewind"}e.goTo(e.currentItem,t)},prev:function(t){var e=this;if(e.isTransition)return!1;if(!0===e.options.scrollPerPage&&e.currentItem>0&&e.currentItem<e.options.items?e.currentItem=0:e.currentItem-=!0===e.options.scrollPerPage?e.options.items:1,e.currentItem<0){if(!0!==e.options.rewindNav)return e.currentItem=0,!1;e.currentItem=e.maximumItem,t="rewind"}e.goTo(e.currentItem,t)},goTo:function(t,n,i){var o,r=this;return!r.isTransition&&("function"==typeof r.options.beforeMove&&r.options.beforeMove.apply(this,[r.$elem]),t>=r.maximumItem?t=r.maximumItem:t<=0&&(t=0),r.currentItem=r.owl.currentItem=t,!1!==r.options.transitionStyle&&"drag"!==i&&1===r.options.items&&!0===r.browser.support3d?(r.swapSpeed(0),!0===r.browser.support3d?r.transition3d(r.positionsInArray[t]):r.css2slide(r.positionsInArray[t],1),r.afterGo(),r.singleItemTransition(),!1):(o=r.positionsInArray[t],!0===r.browser.support3d?(r.isCss3Finish=!1,!0===n?(r.swapSpeed("paginationSpeed"),e.setTimeout((function(){r.isCss3Finish=!0}),r.options.paginationSpeed)):"rewind"===n?(r.swapSpeed(r.options.rewindSpeed),e.setTimeout((function(){r.isCss3Finish=!0}),r.options.rewindSpeed)):(r.swapSpeed("slideSpeed"),e.setTimeout((function(){r.isCss3Finish=!0}),r.options.slideSpeed)),r.transition3d(o)):!0===n?r.css2slide(o,r.options.paginationSpeed):"rewind"===n?r.css2slide(o,r.options.rewindSpeed):r.css2slide(o,r.options.slideSpeed),void r.afterGo()))},jumpTo:function(t){var e=this;"function"==typeof e.options.beforeMove&&e.options.beforeMove.apply(this,[e.$elem]),t>=e.maximumItem||-1===t?t=e.maximumItem:t<=0&&(t=0),e.swapSpeed(0),!0===e.browser.support3d?e.transition3d(e.positionsInArray[t]):e.css2slide(e.positionsInArray[t],1),e.currentItem=e.owl.currentItem=t,e.afterGo()},afterGo:function(){var t=this;t.prevArr.push(t.currentItem),t.prevItem=t.owl.prevItem=t.prevArr[t.prevArr.length-2],t.prevArr.shift(0),t.prevItem!==t.currentItem&&(t.checkPagination(),t.checkNavigation(),t.eachMoveUpdate(),!1!==t.options.autoPlay&&t.checkAp()),"function"==typeof t.options.afterMove&&t.prevItem!==t.currentItem&&t.options.afterMove.apply(this,[t.$elem])},stop:function(){var t=this;t.apStatus="stop",e.clearInterval(t.autoPlayInterval)},checkAp:function(){var t=this;"stop"!==t.apStatus&&t.play()},play:function(){var t=this;if(t.apStatus="play",!1===t.options.autoPlay)return!1;e.clearInterval(t.autoPlayInterval),t.autoPlayInterval=e.setInterval((function(){t.next(!0)}),t.options.autoPlay)},swapSpeed:function(t){var e=this;"slideSpeed"===t?e.$owlWrapper.css(e.addCssSpeed(e.options.slideSpeed)):"paginationSpeed"===t?e.$owlWrapper.css(e.addCssSpeed(e.options.paginationSpeed)):"string"!=typeof t&&e.$owlWrapper.css(e.addCssSpeed(t))},addCssSpeed:function(t){return{"-webkit-transition":"all "+t+"ms ease","-moz-transition":"all "+t+"ms ease","-o-transition":"all "+t+"ms ease",transition:"all "+t+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(t){return{"-webkit-transform":"translate3d("+t+"px, 0px, 0px)","-moz-transform":"translate3d("+t+"px, 0px, 0px)","-o-transform":"translate3d("+t+"px, 0px, 0px)","-ms-transform":"translate3d("+t+"px, 0px, 0px)",transform:"translate3d("+t+"px, 0px,0px)"}},transition3d:function(t){var e=this;e.$owlWrapper.css(e.doTranslate(t))},css2move:function(t){this.$owlWrapper.css({left:t})},css2slide:function(t,e){var n=this;n.isCssFinish=!1,n.$owlWrapper.stop(!0,!0).animate({left:t},{duration:e||n.options.slideSpeed,complete:function(){n.isCssFinish=!0}})},checkBrowser:function(){var t,i,o,r,a=this,s="translate3d(0px, 0px, 0px)",l=n.createElement("div");l.style.cssText="  -moz-transform:"+s+"; -ms-transform:"+s+"; -o-transform:"+s+"; -webkit-transform:"+s+"; transform:"+s,t=/translate3d\(0px, 0px, 0px\)/g,o=null!==(i=l.style.cssText.match(t))&&1===i.length,r="ontouchstart"in e||e.navigator.msMaxTouchPoints,a.browser={support3d:o,isTouch:r}},moveEvents:function(){var t=this;!1===t.options.mouseDrag&&!1===t.options.touchDrag||(t.gestures(),t.disabledEvents())},eventTypes:function(){var t=this,e=["s","e","x"];t.ev_types={},
!0===t.options.mouseDrag&&!0===t.options.touchDrag?e=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]:!1===t.options.mouseDrag&&!0===t.options.touchDrag?e=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:!0===t.options.mouseDrag&&!1===t.options.touchDrag&&(e=["mousedown.owl","mousemove.owl","mouseup.owl"]),t.ev_types.start=e[0],t.ev_types.move=e[1],t.ev_types.end=e[2]},disabledEvents:function(){var e=this;e.$elem.on("dragstart.owl",(function(t){t.preventDefault()})),e.$elem.on("mousedown.disableTextSelect",(function(e){return t(e.target).is("input, textarea, select, option")}))},gestures:function(){function i(t){if(void 0!==t.touches)return{x:t.touches[0].pageX,y:t.touches[0].pageY};if(void 0===t.touches){if(void 0!==t.pageX)return{x:t.pageX,y:t.pageY};if(void 0===t.pageX)return{x:t.clientX,y:t.clientY}}}function o(e){"on"===e?(t(n).on(l.ev_types.move,a),t(n).on(l.ev_types.end,s)):"off"===e&&(t(n).off(l.ev_types.move),t(n).off(l.ev_types.end))}function r(n){var r,a=n.originalEvent||n||e.event;if(3===a.which)return!1;if(!(l.itemsAmount<=l.options.items)){if(!1===l.isCssFinish&&!l.options.dragBeforeAnimFinish)return!1;if(!1===l.isCss3Finish&&!l.options.dragBeforeAnimFinish)return!1;!1!==l.options.autoPlay&&e.clearInterval(l.autoPlayInterval),!0===l.browser.isTouch||l.$owlWrapper.hasClass("grabbing")||l.$owlWrapper.addClass("grabbing"),l.newPosX=0,l.newRelativeX=0,t(this).css(l.removeTransition()),r=t(this).position(),c.relativePos=r.left,c.offsetX=i(a).x-r.left,c.offsetY=i(a).y-r.top,o("on"),c.sliding=!1,c.targetElement=a.target||a.srcElement}}function a(o){var r,a,s=o.originalEvent||o||e.event;l.newPosX=i(s).x-c.offsetX,l.newPosY=i(s).y-c.offsetY,l.newRelativeX=l.newPosX-c.relativePos,"function"==typeof l.options.startDragging&&!0!==c.dragging&&0!==l.newRelativeX&&(c.dragging=!0,l.options.startDragging.apply(l,[l.$elem])),(l.newRelativeX>8||l.newRelativeX<-8)&&!0===l.browser.isTouch&&(void 0!==s.preventDefault?s.preventDefault():s.returnValue=!1,c.sliding=!0),(l.newPosY>10||l.newPosY<-10)&&!1===c.sliding&&t(n).off("touchmove.owl"),r=function(){return l.newRelativeX/5},a=function(){return l.maximumPixels+l.newRelativeX/5},l.newPosX=Math.max(Math.min(l.newPosX,r()),a()),!0===l.browser.support3d?l.transition3d(l.newPosX):l.css2move(l.newPosX)}function s(n){var i,r,a,s=n.originalEvent||n||e.event;s.target=s.target||s.srcElement,c.dragging=!1,!0!==l.browser.isTouch&&l.$owlWrapper.removeClass("grabbing"),l.newRelativeX<0?l.dragDirection=l.owl.dragDirection="left":l.dragDirection=l.owl.dragDirection="right",0!==l.newRelativeX&&(i=l.getNewPosition(),l.goTo(i,!1,"drag"),c.targetElement===s.target&&!0!==l.browser.isTouch&&(t(s.target).on("click.disable",(function(e){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t(e.target).off("click.disable")})),a=(r=t._data(s.target,"events").click).pop(),r.splice(0,0,a))),o("off")}var l=this,c={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};l.isCssFinish=!0,l.$elem.on(l.ev_types.start,".owl-wrapper",r)},getNewPosition:function(){var t=this,e=t.closestItem();return e>t.maximumItem?(t.currentItem=t.maximumItem,e=t.maximumItem):t.newPosX>=0&&(e=0,t.currentItem=0),e},closestItem:function(){var e=this,n=!0===e.options.scrollPerPage?e.pagesInArray:e.positionsInArray,i=e.newPosX,o=null;return t.each(n,(function(r,a){i-e.itemWidth/20>n[r+1]&&i-e.itemWidth/20<a&&"left"===e.moveDirection()?(o=a,!0===e.options.scrollPerPage?e.currentItem=t.inArray(o,e.positionsInArray):e.currentItem=r):i+e.itemWidth/20<a&&i+e.itemWidth/20>(n[r+1]||n[r]-e.itemWidth)&&"right"===e.moveDirection()&&(!0===e.options.scrollPerPage?(o=n[r+1]||n[n.length-1],e.currentItem=t.inArray(o,e.positionsInArray)):(o=n[r+1],e.currentItem=r+1))})),e.currentItem},moveDirection:function(){var t,e=this;return e.newRelativeX<0?(t="right",e.playDirection="next"):(t="left",e.playDirection="prev"),t},customEvents:function(){var t=this;t.$elem.on("owl.next",(function(){t.next()})),t.$elem.on("owl.prev",(function(){t.prev()})),t.$elem.on("owl.play",(function(e,n){t.options.autoPlay=n,t.play(),t.hoverStatus="play"})),t.$elem.on("owl.stop",(function(){t.stop(),t.hoverStatus="stop"})),t.$elem.on("owl.goTo",(function(e,n){t.goTo(n)})),t.$elem.on("owl.jumpTo",(function(e,n){t.jumpTo(n)}))},stopOnHover:function(){var t=this;!0===t.options.stopOnHover&&!0!==t.browser.isTouch&&!1!==t.options.autoPlay&&(t.$elem.on("mouseover",(function(){t.stop()})),t.$elem.on("mouseout",(function(){"stop"!==t.hoverStatus&&t.play()})))},lazyLoad:function(){var e,n,i,o,r=this;if(!1===r.options.lazyLoad)return!1;for(e=0;e<r.itemsAmount;e+=1)"loaded"!==(n=t(r.$owlItems[e])).data("owl-loaded")&&(i=n.data("owl-item"),"string"==typeof(o=n.find(".lazyOwl")).data("src")?(void 0===n.data("owl-loaded")&&(o.hide(),n.addClass("loading").data("owl-loaded","checked")),(!0!==r.options.lazyFollow||i>=r.currentItem)&&i<r.currentItem+r.options.items&&o.length&&r.lazyPreload(n,o)):n.data("owl-loaded","loaded"))},lazyPreload:function(t,n){function i(){t.data("owl-loaded","loaded").removeClass("loading"),n.removeAttr("data-src"),"fade"===a.options.lazyEffect?n.fadeIn(400):n.show(),"function"==typeof a.options.afterLazyLoad&&a.options.afterLazyLoad.apply(this,[a.$elem])}function o(){s+=1,a.completeImg(n.get(0))||!0===r?i():s<=100?e.setTimeout(o,100):i()}var r,a=this,s=0;"DIV"===n.prop("tagName")?(n.css("background-image","url("+n.data("src")+")"),r=!0):n[0].src=n.data("src"),o()},autoHeight:function(){function n(){var n=t(r.$owlItems[r.currentItem]).height();r.wrapperOuter.css("height",n+"px"),r.wrapperOuter.hasClass("autoHeight")||e.setTimeout((function(){r.wrapperOuter.addClass("autoHeight")}),0)}function i(){o+=1,r.completeImg(a.get(0))?n():o<=100?e.setTimeout(i,100):r.wrapperOuter.css("height","")}var o,r=this,a=t(r.$owlItems[r.currentItem]).find("img");void 0!==a.get(0)?(o=0,i()):n()},completeImg:function(t){return!!t.complete&&("undefined"===typeof t.naturalWidth||0!==t.naturalWidth)},onVisibleItems:function(){var e,n=this;for(!0===n.options.addClassActive&&n.$owlItems.removeClass("active"),n.visibleItems=[],e=n.currentItem;e<n.currentItem+n.options.items;e+=1)n.visibleItems.push(e),!0===n.options.addClassActive&&t(n.$owlItems[e]).addClass("active");n.owl.visibleItems=n.visibleItems},transitionTypes:function(t){var e=this;e.outClass="owl-"+t+"-out",e.inClass="owl-"+t+"-in"},singleItemTransition:function(){function t(t){return{position:"relative",left:t+"px"}}var e=this,n=e.outClass,i=e.inClass,o=e.$owlItems.eq(e.currentItem),r=e.$owlItems.eq(e.prevItem),a=Math.abs(e.positionsInArray[e.currentItem])+e.positionsInArray[e.prevItem],s=Math.abs(e.positionsInArray[e.currentItem])+e.itemWidth/2,l="webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend";e.isTransition=!0,e.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":s+"px","-moz-perspective-origin":s+"px","perspective-origin":s+"px"}),r.css(t(a,10)).addClass(n).on(l,(function(){e.endPrev=!0,r.off(l),e.clearTransStyle(r,n)})),o.addClass(i).on(l,(function(){e.endCurrent=!0,o.off(l),e.clearTransStyle(o,i)}))},clearTransStyle:function(t,e){var n=this;t.css({position:"",left:""}).removeClass(e),n.endPrev&&n.endCurrent&&(n.$owlWrapper.removeClass("owl-origin"),n.endPrev=!1,n.endCurrent=!1,n.isTransition=!1)},owlStatus:function(){var t=this;t.owl={userOptions:t.userOptions,baseElement:t.$elem,userItems:t.$userItems,owlItems:t.$owlItems,currentItem:t.currentItem,prevItem:t.prevItem,visibleItems:t.visibleItems,isTouch:t.browser.isTouch,browser:t.browser,dragDirection:t.dragDirection}},clearEvents:function(){var i=this;i.$elem.off(".owl owl mousedown.disableTextSelect"),t(n).off(".owl owl"),t(e).off("resize",i.resizer)},unWrap:function(){var t=this;0!==t.$elem.children().length&&(t.$owlWrapper.unwrap(),t.$userItems.unwrap().unwrap(),t.owlControls&&t.owlControls.remove()),t.clearEvents(),t.$elem.attr("style",t.$elem.data("owl-originalStyles")||"").attr("class",t.$elem.data("owl-originalClasses"))},destroy:function(){var t=this;t.stop(),e.clearInterval(t.checkVisible),t.unWrap(),t.$elem.removeData()},reinit:function(e){var n=this,i=t.extend({},n.userOptions,e);n.unWrap(),n.init(i,n.$elem)},addItem:function(t,e){var n,i=this;return!!t&&(0===i.$elem.children().length?(i.$elem.append(t),i.setVars(),!1):(i.unWrap(),(n=void 0===e||-1===e?-1:e)>=i.$userItems.length||-1===n?i.$userItems.eq(-1).after(t):i.$userItems.eq(n).before(t),void i.setVars()))},removeItem:function(t){var e,n=this;if(0===n.$elem.children().length)return!1;e=void 0===t||-1===t?-1:t,n.unWrap(),n.$userItems.eq(e).remove(),n.setVars()}};t.fn.owlCarousel=function(e){return this.each((function(){if(!0===t(this).data("owl-init"))return!1;t(this).data("owl-init",!0);var n=Object.create(i);n.init(e,this),t.data(this,"owlCarousel",n)}))},t.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1e3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:e,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}}(jQuery,window,document),function(t){"function"==typeof define&&define.amd?define(["jquery"],(function(e){return t(e,document,window,navigator)})):"object"==typeof exports?t(require("jquery"),document,window,navigator):t(jQuery,document,window,navigator)}((function(t,e,n,i,o){"use strict";var r,a,s=0,l=(r=i.userAgent,a=/msie\s\d+/i,r.search(a)>0&&a.exec(r).toString().split(" ")[1]<9&&(t("html").addClass("lt-ie9"),!0));Function.prototype.bind||(Function.prototype.bind=function(t){var e=this,n=[].slice;if("function"!=typeof e)throw new TypeError;var i=n.call(arguments,1),o=function(){if(this instanceof o){var r=function(){};r.prototype=e.prototype;var a=new r,s=e.apply(a,i.concat(n.call(arguments)));return Object(s)===s?s:a}return e.apply(t,i.concat(n.call(arguments)))};return o}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var n;if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),o=i.length>>>0;if(0===o)return-1;var r=+e||0;if(Math.abs(r)===1/0&&(r=0),r>=o)return-1;for(n=Math.max(r>=0?r:o-Math.abs(r),0);n<o;){if(n in i&&i[n]===t)return n;n++}return-1});var c='<span class="irs"><span class="irs-line" tabindex="0"><span class="irs-line-left"></span><span class="irs-line-mid"></span><span class="irs-line-right"></span></span><span class="irs-min">0</span><span class="irs-max">1</span><span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span></span><span class="irs-grid"></span><span class="irs-bar"></span>',u='<span class="irs-bar-edge"></span><span class="irs-shadow shadow-single"></span><span class="irs-slider single"></span>',d='<span class="irs-shadow shadow-from"></span><span class="irs-shadow shadow-to"></span><span class="irs-slider from"></span><span class="irs-slider to"></span>',h='<span class="irs-disable-mask"></span>',p=function(i,r,a){this.VERSION="2.2.0",this.input=i,this.plugin_count=a,this.current_plugin=0,this.calc_count=0,this.update_tm=0,this.old_from=0,this.old_to=0,this.old_min_interval=null,this.raf_id=null,this.dragging=!1,this.force_redraw=!1,this.no_diapason=!1,this.has_tab_index=!0,this.is_key=!1,this.is_update=!1,this.is_start=!0,this.is_finish=!1,this.is_active=!1,this.is_resize=!1,this.is_click=!1,r=r||{},this.$cache={win:t(n),body:t(e.body),input:t(i),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]},this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]},this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var s,l,c,u=this.$cache.input,d=u.prop("value");for(c in s={type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!0,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" \u2014 ",input_values_separator:";",disable:!1,block:!1,extra_classes:"",scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null},"INPUT"!==u[0].nodeName&&console&&console.warn&&console.warn("Base element should be <input>!",u[0]),(l={type:u.data("type"),min:u.data("min"),max:u.data("max"),from:u.data("from"),to:u.data("to"),step:u.data("step"),min_interval:u.data("minInterval"),max_interval:u.data("maxInterval"),drag_interval:u.data("dragInterval"),values:u.data("values"),from_fixed:u.data("fromFixed"),from_min:u.data("fromMin"),from_max:u.data("fromMax"),from_shadow:u.data("fromShadow"),to_fixed:u.data("toFixed"),to_min:u.data("toMin"),to_max:u.data("toMax"),to_shadow:u.data("toShadow"),prettify_enabled:u.data("prettifyEnabled"),prettify_separator:u.data("prettifySeparator"),force_edges:u.data("forceEdges"),keyboard:u.data("keyboard"),grid:u.data("grid"),grid_margin:u.data("gridMargin"),grid_num:u.data("gridNum"),grid_snap:u.data("gridSnap"),hide_min_max:u.data("hideMinMax"),hide_from_to:u.data("hideFromTo"),prefix:u.data("prefix"),postfix:u.data("postfix"),max_postfix:u.data("maxPostfix"),decorate_both:u.data("decorateBoth"),values_separator:u.data("valuesSeparator"),input_values_separator:u.data("inputValuesSeparator"),disable:u.data("disable"),block:u.data("block"),extra_classes:u.data("extraClasses")}).values=l.values&&l.values.split(","),l)l.hasOwnProperty(c)&&(l[c]!==o&&""!==l[c]||delete l[c]);d!==o&&""!==d&&((d=d.split(l.input_values_separator||r.input_values_separator||";"))[0]&&d[0]==+d[0]&&(d[0]=+d[0]),d[1]&&d[1]==+d[1]&&(d[1]=+d[1]),r&&r.values&&r.values.length?(s.from=d[0]&&r.values.indexOf(d[0]),s.to=d[1]&&r.values.indexOf(d[1])):(s.from=d[0]&&+d[0],s.to=d[1]&&+d[1])),t.extend(s,r),t.extend(s,l),this.options=s,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()};p.prototype={init:function(t){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),t?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var t='<span class="irs js-irs-'+this.plugin_count+" "+this.options.extra_classes+'"></span>';this.$cache.input.before(t),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html(c),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append(u),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(d),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var t=this.options.min,e=this.options.max,n=this.options.from,i=this.options.to;n>t&&i===e?this.$cache.s_from.addClass("type_last"):i<e&&this.$cache.s_to.addClass("type_last")},changeLevel:function(t){switch(t){case"single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake),this.$cache.s_single.addClass("state_hover");break;case"from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.$cache.s_from.addClass("state_hover"),this.$cache.s_from.addClass("type_last"),this.$cache.s_to.removeClass("type_last");break;case"to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake),this.$cache.s_to.addClass("state_hover"),this.$cache.s_to.addClass("type_last"),this.$cache.s_from.removeClass("type_last");break;case"both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}},appendDisableMask:function(){this.$cache.cont.append(h),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),l&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),l&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(){var t,e;this.target||(t=(e="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,t+=e.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:t}))},pointerMove:function(t){if(this.dragging){var e=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;this.coords.x_pointer=e-this.coords.x_gap,this.calc()}},pointerUp:function(e){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,l&&t("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(t.contains(this.$cache.cont[0],e.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(e,n){n.preventDefault();var i=n.pageX||n.originalEvent.touches&&n.originalEvent.touches[0].pageX;2!==n.button&&("both"===e&&this.setTempMinInterval(),e||(e=this.target||"from"),this.current_plugin=this.plugin_count,this.target=e,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=i-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(e),l&&t("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(t,e){e.preventDefault();var n=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;2!==e.button&&(this.current_plugin=this.plugin_count,this.target=t,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(n-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(t,e){if(!(this.current_plugin!==this.plugin_count||e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)){switch(e.which){case 83:case 65:case 40:case 37:e.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:e.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(t){var e=this.coords.p_pointer,n=(this.options.max-this.options.min)/100;n=this.options.step/n,t?e+=n:e-=n,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*e),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var t=this._prettify(this.options.min),e=this._prettify(this.options.max);this.result.min_pretty=t,this.result.max_pretty=e,this.$cache.min.html(this.decorate(t,this.options.min)),this.$cache.max.html(this.decorate(e,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var t=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=t},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(t){if(this.options&&(this.calc_count++,(10===this.calc_count||t)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var e=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,e=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,e=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(e)),this.target){case"base":var n=(this.options.max-this.options.min)/100,i=(this.result.from-this.options.min)/n,o=(this.result.to-this.options.min)/n;this.coords.p_single_real=this.toFixed(i),this.coords.p_from_real=this.toFixed(i),this.coords.p_to_real=this.toFixed(o),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(e),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(e),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(e),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real<this.coords.p_from_real&&(this.coords.p_to_real=this.coords.p_from_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both":if(this.options.from_fixed||this.options.to_fixed)break;e=this.toFixed(e+.001*this.coords.p_handle),this.coords.p_from_real=this.convertToRealPercent(e)-this.coords.p_gap_left,this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.convertToRealPercent(e)+this.coords.p_gap_right,this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both_one":if(this.options.from_fixed||this.options.to_fixed)break;var r=this.convertToRealPercent(e),a=this.result.from_percent,s=this.result.to_percent-a,l=s/2,c=r-l,u=r+l;c<0&&(u=(c=0)+s),u>100&&(c=(u=100)-s),this.coords.p_from_real=this.calcWithStep(c),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.calcWithStep(u),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.result.from_pretty=this._prettify(this.result.from),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.from_pretty=this._prettify(this.result.from),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.result.to_pretty=this._prettify(this.result.to),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to])),this.calcMinMax(),this.calcLabels()}},calcPointerPercent:function(){this.coords.w_rs?(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(t){return t/(100-this.coords.p_handle)*100},convertToFakePercent:function(t){return t/100*(100-this.coords.p_handle)},getHandleX:function(){var t=100-this.coords.p_handle,e=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return e<0?e=0:e>t&&(e=t),e},calcHandlePercent:function(){"single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(t){return"single"===this.options.type?"single":t>=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),
this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)&&(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?(this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%",this.$cache.single[0].style.left=this.labels.p_single_left+"%"):(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",(this.old_from!==this.result.from||this.force_redraw)&&(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),(this.old_to!==this.result.to||this.force_redraw)&&(this.$cache.to[0].style.left=this.labels.p_to_left+"%"),this.$cache.single[0].style.left=this.labels.p_single_left+"%"),this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input")),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_key=!1,this.is_click=!1,this.callOnFinish()),this.is_update=!1,this.is_resize=!1,this.is_finish=!1),this.is_start=!1,this.is_key=!1,this.is_click=!1,this.force_redraw=!1))},drawLabels:function(){if(this.options){var t,e,n,i,o,r=this.options.values.length,a=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)r?(t=this.decorate(a[this.result.from]),this.$cache.single.html(t)):(i=this._prettify(this.result.from),t=this.decorate(i,this.result.from),this.$cache.single.html(t)),this.calcLabels(),this.labels.p_single_left<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",this.labels.p_single_left+this.labels.p_single_fake>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{r?(this.options.decorate_both?(t=this.decorate(a[this.result.from]),t+=this.options.values_separator,t+=this.decorate(a[this.result.to])):t=this.decorate(a[this.result.from]+this.options.values_separator+a[this.result.to]),e=this.decorate(a[this.result.from]),n=this.decorate(a[this.result.to]),this.$cache.single.html(t),this.$cache.from.html(e),this.$cache.to.html(n)):(i=this._prettify(this.result.from),o=this._prettify(this.result.to),this.options.decorate_both?(t=this.decorate(i,this.result.from),t+=this.options.values_separator,t+=this.decorate(o,this.result.to)):t=this.decorate(i+this.options.values_separator+o,this.result.to),e=this.decorate(i,this.result.from),n=this.decorate(o,this.result.to),this.$cache.single.html(t),this.$cache.from.html(e),this.$cache.to.html(n)),this.calcLabels();var s=Math.min(this.labels.p_single_left,this.labels.p_from_left),l=this.labels.p_single_left+this.labels.p_single_fake,c=this.labels.p_to_left+this.labels.p_to_fake,u=Math.max(l,c);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",u=c):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",u=Math.max(l,c))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),s<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",u>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var t,e,n,i,o=this.options,r=this.$cache,a="number"==typeof o.from_min&&!isNaN(o.from_min),s="number"==typeof o.from_max&&!isNaN(o.from_max),l="number"==typeof o.to_min&&!isNaN(o.to_min),c="number"==typeof o.to_max&&!isNaN(o.to_max);"single"===o.type?o.from_shadow&&(a||s)?(t=this.convertToPercent(a?o.from_min:o.min),e=this.convertToPercent(s?o.from_max:o.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),e=this.toFixed(e-this.coords.p_handle/100*e),t+=this.coords.p_handle/2,r.shad_single[0].style.display="block",r.shad_single[0].style.left=t+"%",r.shad_single[0].style.width=e+"%"):r.shad_single[0].style.display="none":(o.from_shadow&&(a||s)?(t=this.convertToPercent(a?o.from_min:o.min),e=this.convertToPercent(s?o.from_max:o.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),e=this.toFixed(e-this.coords.p_handle/100*e),t+=this.coords.p_handle/2,r.shad_from[0].style.display="block",r.shad_from[0].style.left=t+"%",r.shad_from[0].style.width=e+"%"):r.shad_from[0].style.display="none",o.to_shadow&&(l||c)?(n=this.convertToPercent(l?o.to_min:o.min),i=this.convertToPercent(c?o.to_max:o.max)-n,n=this.toFixed(n-this.coords.p_handle/100*n),i=this.toFixed(i-this.coords.p_handle/100*i),n+=this.coords.p_handle/2,r.shad_to[0].style.display="block",r.shad_to[0].style.left=n+"%",r.shad_to[0].style.width=i+"%"):r.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(t,e){var n,i=this.options.max-this.options.min,o=i/100;return i?(n=(e?t:t-this.options.min)/o,this.toFixed(n)):(this.no_diapason=!0,0)},convertToValue:function(t){var e,n,i=this.options.min,o=this.options.max,r=i.toString().split(".")[1],a=o.toString().split(".")[1],s=0,l=0;if(0===t)return this.options.min;if(100===t)return this.options.max;r&&(s=e=r.length),a&&(s=n=a.length),e&&n&&(s=e>=n?e:n),i<0&&(i=+(i+(l=Math.abs(i))).toFixed(s),o=+(o+l).toFixed(s));var c,u=(o-i)/100*t+i,d=this.options.step.toString().split(".")[1];return d?u=+u.toFixed(d.length):(u/=this.options.step,u=+(u*=this.options.step).toFixed(0)),l&&(u-=l),(c=d?+u.toFixed(d.length):this.toFixed(u))<this.options.min?c=this.options.min:c>this.options.max&&(c=this.options.max),c},calcWithStep:function(t){var e=Math.round(t/this.coords.p_step)*this.coords.p_step;return e>100&&(e=100),100===t&&(e=100),this.toFixed(e)},checkMinInterval:function(t,e,n){var i,o,r=this.options;return r.min_interval?(i=this.convertToValue(t),o=this.convertToValue(e),"from"===n?o-i<r.min_interval&&(i=o-r.min_interval):i-o<r.min_interval&&(i=o+r.min_interval),this.convertToPercent(i)):t},checkMaxInterval:function(t,e,n){var i,o,r=this.options;return r.max_interval?(i=this.convertToValue(t),o=this.convertToValue(e),"from"===n?o-i>r.max_interval&&(i=o-r.max_interval):i-o>r.max_interval&&(i=o+r.max_interval),this.convertToPercent(i)):t},checkDiapason:function(t,e,n){var i=this.convertToValue(t),o=this.options;return"number"!=typeof e&&(e=o.min),"number"!=typeof n&&(n=o.max),i<e&&(i=e),i>n&&(i=n),this.convertToPercent(i)},toFixed:function(t){return+(t=t.toFixed(20))},_prettify:function(t){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(t):this.prettify(t):t},prettify:function(t){return t.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(t,e){return this.options.force_edges?(t<0?t=0:t>100-e&&(t=100-e),this.toFixed(t)):this.toFixed(t)},validate:function(){var t,e,n=this.options,i=this.result,o=n.values,r=o.length;if("string"==typeof n.min&&(n.min=+n.min),"string"==typeof n.max&&(n.max=+n.max),"string"==typeof n.from&&(n.from=+n.from),"string"==typeof n.to&&(n.to=+n.to),"string"==typeof n.step&&(n.step=+n.step),"string"==typeof n.from_min&&(n.from_min=+n.from_min),"string"==typeof n.from_max&&(n.from_max=+n.from_max),"string"==typeof n.to_min&&(n.to_min=+n.to_min),"string"==typeof n.to_max&&(n.to_max=+n.to_max),"string"==typeof n.grid_num&&(n.grid_num=+n.grid_num),n.max<n.min&&(n.max=n.min),r)for(n.p_values=[],n.min=0,n.max=r-1,n.step=1,n.grid_num=n.max,n.grid_snap=!0,e=0;e<r;e++)t=+o[e],isNaN(t)?t=o[e]:(o[e]=t,t=this._prettify(t)),n.p_values.push(t);("number"!=typeof n.from||isNaN(n.from))&&(n.from=n.min),("number"!=typeof n.to||isNaN(n.to))&&(n.to=n.max),"single"===n.type?(n.from<n.min&&(n.from=n.min),n.from>n.max&&(n.from=n.max)):(n.from<n.min&&(n.from=n.min),n.from>n.max&&(n.from=n.max),n.to<n.min&&(n.to=n.min),n.to>n.max&&(n.to=n.max),this.update_check.from&&(this.update_check.from!==n.from&&n.from>n.to&&(n.from=n.to),this.update_check.to!==n.to&&n.to<n.from&&(n.to=n.from)),n.from>n.to&&(n.from=n.to),n.to<n.from&&(n.to=n.from)),("number"!=typeof n.step||isNaN(n.step)||!n.step||n.step<0)&&(n.step=1),"number"==typeof n.from_min&&n.from<n.from_min&&(n.from=n.from_min),"number"==typeof n.from_max&&n.from>n.from_max&&(n.from=n.from_max),"number"==typeof n.to_min&&n.to<n.to_min&&(n.to=n.to_min),"number"==typeof n.to_max&&n.from>n.to_max&&(n.to=n.to_max),i&&(i.min!==n.min&&(i.min=n.min),i.max!==n.max&&(i.max=n.max),(i.from<i.min||i.from>i.max)&&(i.from=n.from),(i.to<i.min||i.to>i.max)&&(i.to=n.to)),("number"!=typeof n.min_interval||isNaN(n.min_interval)||!n.min_interval||n.min_interval<0)&&(n.min_interval=0),("number"!=typeof n.max_interval||isNaN(n.max_interval)||!n.max_interval||n.max_interval<0)&&(n.max_interval=0),n.min_interval&&n.min_interval>n.max-n.min&&(n.min_interval=n.max-n.min),n.max_interval&&n.max_interval>n.max-n.min&&(n.max_interval=n.max-n.min)},decorate:function(t,e){var n="",i=this.options;return i.prefix&&(n+=i.prefix),n+=t,i.max_postfix&&(i.values.length&&t===i.p_values[i.max]||e===i.max)&&(n+=i.max_postfix,i.postfix&&(n+=" ")),i.postfix&&(n+=i.postfix),n},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var t,e,n,i,o,r=this.options,a=r.max-r.min,s=r.grid_num,l=0,c=0,u=4,d="";for(this.calcGridMargin(),r.grid_snap?a>50?(s=50/r.step,l=this.toFixed(r.step/.5)):(s=a/r.step,l=this.toFixed(r.step/(a/100))):l=this.toFixed(100/s),s>4&&(u=3),s>7&&(u=2),s>14&&(u=1),s>28&&(u=0),t=0;t<s+1;t++){for(n=u,(c=this.toFixed(l*t))>100&&(c=100),this.coords.big[t]=c,i=(c-l*(t-1))/(n+1),e=1;e<=n&&0!==c;e++)d+='<span class="irs-grid-pol small" style="left: '+this.toFixed(c-i*e)+'%"></span>';d+='<span class="irs-grid-pol" style="left: '+c+'%"></span>',o=this.convertToValue(c),d+='<span class="irs-grid-text js-grid-text-'+t+'" style="left: '+c+'%">'+(o=r.values.length?r.p_values[o]:this._prettify(o))+"</span>"}this.coords.big_num=Math.ceil(s+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(d),this.cacheGridLabels()}},cacheGridLabels:function(){var t,e,n=this.coords.big_num;for(e=0;e<n;e++)t=this.$cache.grid.find(".js-grid-text-"+e),this.$cache.grid_labels.push(t);this.calcGridLabels()},calcGridLabels:function(){var t,e,n=[],i=[],o=this.coords.big_num;for(t=0;t<o;t++)this.coords.big_w[t]=this.$cache.grid_labels[t].outerWidth(!1),this.coords.big_p[t]=this.toFixed(this.coords.big_w[t]/this.coords.w_rs*100),this.coords.big_x[t]=this.toFixed(this.coords.big_p[t]/2),n[t]=this.toFixed(this.coords.big[t]-this.coords.big_x[t]),i[t]=this.toFixed(n[t]+this.coords.big_p[t]);for(this.options.force_edges&&(n[0]<-this.coords.grid_gap&&(n[0]=-this.coords.grid_gap,i[0]=this.toFixed(n[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),i[o-1]>100+this.coords.grid_gap&&(i[o-1]=100+this.coords.grid_gap,n[o-1]=this.toFixed(i[o-1]-this.coords.big_p[o-1]),this.coords.big_x[o-1]=this.toFixed(this.coords.big_p[o-1]-this.coords.grid_gap))),this.calcGridCollision(2,n,i),this.calcGridCollision(4,n,i),t=0;t<o;t++)e=this.$cache.grid_labels[t][0],this.coords.big_x[t]!==Number.POSITIVE_INFINITY&&(e.style.marginLeft=-this.coords.big_x[t]+"%")},calcGridCollision:function(t,e,n){var i,o,r,a=this.coords.big_num;for(i=0;i<a&&!((o=i+t/2)>=a);i+=t)r=this.$cache.grid_labels[o][0],n[i]<=e[o]?r.style.visibility="visible":r.style.visibility="hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&("single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(e){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=t.extend(this.options,e),this.validate(),this.updateResult(e),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),t.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},t.fn.ionRangeSlider=function(e){return this.each((function(){t.data(this,"ionRangeSlider")||t.data(this,"ionRangeSlider",new p(this,e,s++))}))},function(){for(var t=0,e=["ms","moz","webkit","o"],i=0;i<e.length&&!n.requestAnimationFrame;++i)n.requestAnimationFrame=n[e[i]+"RequestAnimationFrame"],n.cancelAnimationFrame=n[e[i]+"CancelAnimationFrame"]||n[e[i]+"CancelRequestAnimationFrame"];n.requestAnimationFrame||(n.requestAnimationFrame=function(e){var i=(new Date).getTime(),o=Math.max(0,16-(i-t)),r=n.setTimeout((function(){e(i+o)}),o);return t=i+o,r}),n.cancelAnimationFrame||(n.cancelAnimationFrame=function(t){clearTimeout(t)})}()})),ClusterIcon.prototype.onAdd=function(){var t,e,n=this;this.div_=document.createElement("div"),this.div_.className=this.className_,this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",(function(){e=t})),google.maps.event.addDomListener(this.div_,"mousedown",(function(){t=!0,e=!1})),google.maps.event.addDomListener(this.div_,"click",(function(i){if(t=!1,!e){var o,r,a=n.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"click",n.cluster_),google.maps.event.trigger(a,"clusterclick",n.cluster_),a.getZoomOnClick()&&(r=a.getMaxZoom(),o=n.cluster_.getBounds(),a.getMap().fitBounds(o),setTimeout((function(){a.getMap().fitBounds(o),null!==r&&a.getMap().getZoom()>r&&a.getMap().setZoom(r+1)}),100)),i.cancelBubble=!0,i.stopPropagation&&i.stopPropagation()}})),google.maps.event.addDomListener(this.div_,"mouseover",(function(){var t=n.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseover",n.cluster_)})),google.maps.event.addDomListener(this.div_,"mouseout",(function(){var t=n.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseout",n.cluster_)}))},ClusterIcon.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},ClusterIcon.prototype.draw=function(){if(this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.top=t.y+"px",this.div_.style.left=t.x+"px"}},ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},ClusterIcon.prototype.show=function(){if(this.div_){var t="",e=this.backgroundPosition_.split(" "),n=parseInt(e[0].replace(/^\s+|\s+$/g,""),10),i=parseInt(e[1].replace(/^\s+|\s+$/g,""),10),o=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(o),t="<img src='"+this.url_+"' style='position: absolute; top: "+i+"px; left: "+n+"px; ",this.cluster_.getMarkerClusterer().enableRetinaIcons_||(t+="clip: rect("+-1*i+"px, "+(-1*n+this.width_)+"px, "+(-1*i+this.height_)+"px, "+-1*n+"px);"),t+="'>",this.div_.innerHTML=t+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+this.sums_.text+"</div>",void 0===this.sums_.title||""===this.sums_.title?this.div_.title=this.cluster_.getMarkerClusterer().getTitle():this.div_.title=this.sums_.title,this.div_.style.display=""}this.visible_=!0},ClusterIcon.prototype.useStyle=function(t){this.sums_=t;var e=Math.max(0,t.index-1);e=Math.min(this.styles_.length-1,e);var n=this.styles_[e];this.url_=n.url,this.height_=n.height,this.width_=n.width,this.anchorText_=n.anchorText||[0,0],this.anchorIcon_=n.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)],this.textColor_=n.textColor||"black",this.textSize_=n.textSize||11,this.textDecoration_=n.textDecoration||"none",this.fontWeight_=n.fontWeight||"bold",this.fontStyle_=n.fontStyle||"normal",this.fontFamily_=n.fontFamily||"Arial,sans-serif",this.backgroundPosition_=n.backgroundPosition||"0 0"},ClusterIcon.prototype.setCenter=function(t){this.center_=t},ClusterIcon.prototype.createCss=function(t){var e=[];return e.push("cursor: pointer;"),e.push("position: absolute; top: "+t.y+"px; left: "+t.x+"px;"),e.push("width: "+this.width_+"px; height: "+this.height_+"px;"),e.join("")},ClusterIcon.prototype.getPosFromLatLng_=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon_[1],e.y-=this.anchorIcon_[0],e.x=parseInt(e.x,10),e.y=parseInt(e.y,10),e},Cluster.prototype.getSize=function(){return this.markers_.length},Cluster.prototype.getMarkers=function(){return this.markers_},Cluster.prototype.getCenter=function(){return this.center_},Cluster.prototype.getMap=function(){return this.map_},Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_},Cluster.prototype.getBounds=function(){var t,e=new google.maps.LatLngBounds(this.center_,this.center_),n=this.getMarkers();for(t=0;t<n.length;t++)e.extend(n[t].getPosition());return e},Cluster.prototype.remove=function(){this.clusterIcon_.setMap(null),this.markers_=[],delete this.markers_},Cluster.prototype.addMarker=function(t){var e,n,i;if(this.isMarkerAlreadyAdded_(t))return!1;if(this.center_){if(this.averageCenter_){var o=this.markers_.length+1,r=(this.center_.lat()*(o-1)+t.getPosition().lat())/o,a=(this.center_.lng()*(o-1)+t.getPosition().lng())/o;this.center_=new google.maps.LatLng(r,a),this.calculateBounds_()}}else this.center_=t.getPosition(),this.calculateBounds_();if(t.isAdded=!0,this.markers_.push(t),n=this.markers_.length,null!==(i=this.markerClusterer_.getMaxZoom())&&this.map_.getZoom()>i)t.getMap()!==this.map_&&t.setMap(this.map_);else if(n<this.minClusterSize_)t.getMap()!==this.map_&&t.setMap(this.map_);else if(n===this.minClusterSize_)for(e=0;e<n;e++)this.markers_[e].setMap(null);else t.setMap(null);return this.updateIcon_(),!0},Cluster.prototype.isMarkerInClusterBounds=function(t){return this.bounds_.contains(t.getPosition())},Cluster.prototype.calculateBounds_=function(){var t=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(t)},Cluster.prototype.updateIcon_=function(){var t=this.markers_.length,e=this.markerClusterer_.getMaxZoom();if(null!==e&&this.map_.getZoom()>e)this.clusterIcon_.hide();else if(t<this.minClusterSize_)this.clusterIcon_.hide();else{var n=this.markerClusterer_.getStyles().length,i=this.markerClusterer_.getCalculator()(this.markers_,n);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.useStyle(i),this.clusterIcon_.show()}},Cluster.prototype.isMarkerAlreadyAdded_=function(t){var e;if(this.markers_.indexOf)return-1!==this.markers_.indexOf(t);for(e=0;e<this.markers_.length;e++)if(t===this.markers_[e])return!0;return!1},MarkerClusterer.prototype.onAdd=function(){var t=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",(function(){t.resetViewport_(!1),this.getZoom()!==(this.get("minZoom")||0)&&this.getZoom()!==this.get("maxZoom")||google.maps.event.trigger(this,"idle")})),google.maps.event.addListener(this.getMap(),"idle",(function(){t.redraw_()}))]},MarkerClusterer.prototype.onRemove=function(){var t;for(t=0;t<this.markers_.length;t++)this.markers_[t].getMap()!==this.activeMap_&&this.markers_[t].setMap(this.activeMap_);for(t=0;t<this.clusters_.length;t++)this.clusters_[t].remove();for(this.clusters_=[],t=0;t<this.listeners_.length;t++)google.maps.event.removeListener(this.listeners_[t]);this.listeners_=[],this.activeMap_=null,this.ready_=!1},MarkerClusterer.prototype.draw=function(){},MarkerClusterer.prototype.setupStyles_=function(){var t,e;if(!(this.styles_.length>0))for(t=0;t<this.imageSizes_.length;t++)e=this.imageSizes_[t],this.styles_.push({url:this.imagePath_+(t+1)+"."+this.imageExtension_,height:e,width:e})},MarkerClusterer.prototype.fitMapToMarkers=function(){var t,e=this.getMarkers(),n=new google.maps.LatLngBounds;for(t=0;t<e.length;t++)n.extend(e[t].getPosition());this.getMap().fitBounds(n)},MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_},MarkerClusterer.prototype.setGridSize=function(t){this.gridSize_=t},MarkerClusterer.prototype.getMinimumClusterSize=function(){return this.minClusterSize_},MarkerClusterer.prototype.setMinimumClusterSize=function(t){this.minClusterSize_=t},MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_},MarkerClusterer.prototype.setMaxZoom=function(t){this.maxZoom_=t},MarkerClusterer.prototype.getStyles=function(){return this.styles_},MarkerClusterer.prototype.setStyles=function(t){this.styles_=t},MarkerClusterer.prototype.getTitle=function(){return this.title_},MarkerClusterer.prototype.setTitle=function(t){this.title_=t},MarkerClusterer.prototype.getZoomOnClick=function(){return this.zoomOnClick_},MarkerClusterer.prototype.setZoomOnClick=function(t){this.zoomOnClick_=t},MarkerClusterer.prototype.getAverageCenter=function(){return this.averageCenter_},MarkerClusterer.prototype.setAverageCenter=function(t){this.averageCenter_=t},MarkerClusterer.prototype.getIgnoreHidden=function(){return this.ignoreHidden_},MarkerClusterer.prototype.setIgnoreHidden=function(t){this.ignoreHidden_=t},MarkerClusterer.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_},MarkerClusterer.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons_=t},MarkerClusterer.prototype.getImageExtension=function(){return this.imageExtension_},MarkerClusterer.prototype.setImageExtension=function(t){this.imageExtension_=t},MarkerClusterer.prototype.getImagePath=function(){return this.imagePath_},MarkerClusterer.prototype.setImagePath=function(t){this.imagePath_=t},MarkerClusterer.prototype.getImageSizes=function(){return this.imageSizes_},MarkerClusterer.prototype.setImageSizes=function(t){this.imageSizes_=t},MarkerClusterer.prototype.getCalculator=function(){return this.calculator_},MarkerClusterer.prototype.setCalculator=function(t){this.calculator_=t},MarkerClusterer.prototype.getBatchSizeIE=function(){return this.batchSizeIE_},MarkerClusterer.prototype.setBatchSizeIE=function(t){this.batchSizeIE_=t},MarkerClusterer.prototype.getClusterClass=function(){return this.clusterClass_},MarkerClusterer.prototype.setClusterClass=function(t){this.clusterClass_=t},MarkerClusterer.prototype.getMarkers=function(){return this.markers_},MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers_.length},MarkerClusterer.prototype.getClusters=function(){return this.clusters_},MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length},MarkerClusterer.prototype.addMarker=function(t,e){this.pushMarkerTo_(t),e||this.redraw_()},MarkerClusterer.prototype.addMarkers=function(t,e){var n;for(n in t)t.hasOwnProperty(n)&&this.pushMarkerTo_(t[n]);e||this.redraw_()},MarkerClusterer.prototype.pushMarkerTo_=function(t){if(t.getDraggable()){var e=this;google.maps.event.addListener(t,"dragend",(function(){e.ready_&&(this.isAdded=!1,e.repaint())}))}t.isAdded=!1,this.markers_.push(t)},MarkerClusterer.prototype.removeMarker=function(t,e){var n=this.removeMarker_(t);return!e&&n&&this.repaint(),n},MarkerClusterer.prototype.removeMarkers=function(t,e){var n,i,o=!1;for(n=0;n<t.length;n++)i=this.removeMarker_(t[n]),o=o||i;return!e&&o&&this.repaint(),o},MarkerClusterer.prototype.removeMarker_=function(t){var e,n=-1;if(this.markers_.indexOf)n=this.markers_.indexOf(t);else for(e=0;e<this.markers_.length;e++)if(t===this.markers_[e]){n=e;break}return-1!==n&&(t.setMap(null),this.markers_.splice(n,1),!0)},MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport_(!0),this.markers_=[]},MarkerClusterer.prototype.repaint=function(){var t=this.clusters_.slice();this.clusters_=[],this.resetViewport_(!1),this.redraw_(),setTimeout((function(){var e;for(e=0;e<t.length;e++)t[e].remove()}),0)},MarkerClusterer.prototype.getExtendedBounds=function(t){var e=this.getProjection(),n=new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()),i=new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()),o=e.fromLatLngToDivPixel(n);o.x+=this.gridSize_,o.y-=this.gridSize_;var r=e.fromLatLngToDivPixel(i);r.x-=this.gridSize_,r.y+=this.gridSize_;var a=e.fromDivPixelToLatLng(o),s=e.fromDivPixelToLatLng(r);return t.extend(a),t.extend(s),t},MarkerClusterer.prototype.redraw_=function(){this.createClusters_(0)},MarkerClusterer.prototype.resetViewport_=function(t){var e,n;for(e=0;e<this.clusters_.length;e++)this.clusters_[e].remove();for(this.clusters_=[],e=0;e<this.markers_.length;e++)(n=this.markers_[e]).isAdded=!1,t&&n.setMap(null)},MarkerClusterer.prototype.distanceBetweenPoints_=function(t,e){var n=6371,i=(e.lat()-t.lat())*Math.PI/180,o=(e.lng()-t.lng())*Math.PI/180,r=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return n*(2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r)))},MarkerClusterer.prototype.isMarkerInBounds_=function(t,e){return e.contains(t.getPosition())},MarkerClusterer.prototype.addToClosestCluster_=function(t){var e,n,i,o,r=4e4,a=null;for(e=0;e<this.clusters_.length;e++)(o=(i=this.clusters_[e]).getCenter())&&(n=this.distanceBetweenPoints_(o,t.getPosition()))<r&&(r=n,a=i);a&&a.isMarkerInClusterBounds(t)?a.addMarker(t):((i=new Cluster(this)).addMarker(t),this.clusters_.push(i))},MarkerClusterer.prototype.createClusters_=function(t){var e,n,i,o=this;if(this.ready_){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),void 0!==this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),i=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var r=this.getExtendedBounds(i),a=Math.min(t+this.batchSize_,this.markers_.length);for(e=t;e<a;e++)!(n=this.markers_[e]).isAdded&&this.isMarkerInBounds_(n,r)&&(!this.ignoreHidden_||this.ignoreHidden_&&n.getVisible())&&this.addToClosestCluster_(n);a<this.markers_.length?this.timerRefStatic=setTimeout((function(){o.createClusters_(a)}),0):(delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this))}},MarkerClusterer.prototype.extend=function(t,e){return function(t){var e;for(e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},MarkerClusterer.CALCULATOR=function(t,e){for(var n=0,i="",o=t.length.toString(),r=o;0!==r;)r=parseInt(r/10,10),n++;return{text:o,index:n=Math.min(n,e),title:i}},MarkerClusterer.BATCH_SIZE=2e3,MarkerClusterer.BATCH_SIZE_IE=500,MarkerClusterer.IMAGE_PATH="../images/m",MarkerClusterer.IMAGE_EXTENSION="png",MarkerClusterer.IMAGE_SIZES=[53,56,66,78,90],function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}((function(t,e){function n(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var t=new Date;return n(t.getFullYear(),t.getMonth(),t.getDate())}function o(t,e){
return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}function r(t){return function(){return this[t].apply(this,arguments)}}function a(t){return t&&!isNaN(t.getTime())}function s(e,n){function i(t,e){return e.toLowerCase()}var o=t(e).data(),r={},a=new RegExp("^"+n.toLowerCase()+"([A-Z])");for(var s in n=new RegExp("^"+n.toLowerCase()),o)n.test(s)&&(r[s.replace(a,i)]=o[s]);return r}function l(e){var n={};if(v[e]||(e=e.split("-")[0],v[e])){var i=v[e];return t.each(g,(function(t,e){e in i&&(n[e]=i[e])})),n}}var c,u=(c={get:function(t){return this.slice(t)[0]},contains:function(t){for(var e=t&&t.valueOf(),n=0,i=this.length;n<i;n++)if(0<=this[n].valueOf()-e&&this[n].valueOf()-e<864e5)return n;return-1},remove:function(t){this.splice(t,1)},replace:function(e){e&&(t.isArray(e)||(e=[e]),this.clear(),this.push.apply(this,e))},clear:function(){this.length=0},copy:function(){var t=new u;return t.replace(this),t}},function(){var e=[];return e.push.apply(e,arguments),t.extend(e,c),e}),d=function(e,n){t.data(e,"datepicker",this),this._process_options(n),this.dates=new u,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=t(e),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=t(y.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",(function(t,e){return Number(e)+1})),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.setDaysOfWeekHighlighted(this.o.daysOfWeekHighlighted),this.setDatesDisabled(this.o.datesDisabled),this.setViewMode(this.o.startView),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.isInline&&this.show()};d.prototype={constructor:d,_resolveViewName:function(e){return t.each(y.viewModes,(function(n,i){if(e===n||-1!==t.inArray(e,i.names))return e=n,!1})),e},_resolveDaysOfWeek:function(e){return t.isArray(e)||(e=e.split(/[,\s]*/)),t.map(e,Number)},_check_template:function(n){try{return n!==e&&""!==n&&((n.match(/[<>]/g)||[]).length<=0||t(n).length>0)}catch(t){return!1}},_process_options:function(e){this._o=t.extend({},this._o,e);var o=this.o=t.extend({},this._o),r=o.language;v[r]||(r=r.split("-")[0],v[r]||(r=m.language)),o.language=r,o.startView=this._resolveViewName(o.startView),o.minViewMode=this._resolveViewName(o.minViewMode),o.maxViewMode=this._resolveViewName(o.maxViewMode),o.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,o.startView)),!0!==o.multidate&&(o.multidate=Number(o.multidate)||!1,!1!==o.multidate&&(o.multidate=Math.max(0,o.multidate))),o.multidateSeparator=String(o.multidateSeparator),o.weekStart%=7,o.weekEnd=(o.weekStart+6)%7;var a=y.parseFormat(o.format);o.startDate!==-1/0&&(o.startDate?o.startDate instanceof Date?o.startDate=this._local_to_utc(this._zero_time(o.startDate)):o.startDate=y.parseDate(o.startDate,a,o.language,o.assumeNearbyYear):o.startDate=-1/0),o.endDate!==1/0&&(o.endDate?o.endDate instanceof Date?o.endDate=this._local_to_utc(this._zero_time(o.endDate)):o.endDate=y.parseDate(o.endDate,a,o.language,o.assumeNearbyYear):o.endDate=1/0),o.daysOfWeekDisabled=this._resolveDaysOfWeek(o.daysOfWeekDisabled||[]),o.daysOfWeekHighlighted=this._resolveDaysOfWeek(o.daysOfWeekHighlighted||[]),o.datesDisabled=o.datesDisabled||[],t.isArray(o.datesDisabled)||(o.datesDisabled=o.datesDisabled.split(",")),o.datesDisabled=t.map(o.datesDisabled,(function(t){return y.parseDate(t,a,o.language,o.assumeNearbyYear)}));var s=String(o.orientation).toLowerCase().split(/\s+/g),l=o.orientation.toLowerCase();if(s=t.grep(s,(function(t){return/^auto|left|right|top|bottom$/.test(t)})),o.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===s.length)switch(s[0]){case"top":case"bottom":o.orientation.y=s[0];break;case"left":case"right":o.orientation.x=s[0]}else l=t.grep(s,(function(t){return/^left|right$/.test(t)})),o.orientation.x=l[0]||"auto",l=t.grep(s,(function(t){return/^top|bottom$/.test(t)})),o.orientation.y=l[0]||"auto";else;if(o.defaultViewDate){var c=o.defaultViewDate.year||(new Date).getFullYear(),u=o.defaultViewDate.month||0,d=o.defaultViewDate.day||1;o.defaultViewDate=n(c,u,d)}else o.defaultViewDate=i()},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var n,i,o,r=0;r<t.length;r++)n=t[r][0],2===t[r].length?(i=e,o=t[r][1]):3===t[r].length&&(i=t[r][1],o=t[r][2]),n.on(o,i)},_unapplyEvents:function(t){for(var n,i,o,r=0;r<t.length;r++)n=t[r][0],2===t[r].length?(o=e,i=t[r][1]):3===t[r].length&&(o=t[r][1],i=t[r][2]),n.off(i,o)},_buildEvents:function(){var e={keyup:t.proxy((function(e){-1===t.inArray(e.keyCode,[27,37,39,38,40,32,13,9])&&this.update()}),this),keydown:t.proxy(this.keydown,this),paste:t.proxy(this.paste,this)};!0===this.o.showOnFocus&&(e.focus=t.proxy(this.show,this)),this.isInput?this._events=[[this.element,e]]:this.component&&this.inputField.length?this._events=[[this.inputField,e],[this.component,{click:t.proxy(this.show,this)}]]:this._events=[[this.element,{click:t.proxy(this.show,this),keydown:t.proxy(this.keydown,this)}]],this._events.push([this.element,"*",{blur:t.proxy((function(t){this._focused_from=t.target}),this)}],[this.element,{blur:t.proxy((function(t){this._focused_from=t.target}),this)}]),this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":t.proxy((function(t){this.update(t.date)}),this)}]),this._secondaryEvents=[[this.picker,{click:t.proxy(this.click,this)}],[this.picker,".prev, .next",{click:t.proxy(this.navArrowsClick,this)}],[t(window),{resize:t.proxy(this.place,this)}],[t(document),{"mousedown touchstart":t.proxy((function(t){this.element.is(t.target)||this.element.find(t.target).length||this.picker.is(t.target)||this.picker.find(t.target).length||this.isInline||this.hide()}),this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(e,n){var i=n||this.dates.get(-1),o=this._utc_to_local(i);this.element.trigger({type:e,date:o,viewMode:this.viewMode,dates:t.map(this.dates,this._utc_to_local),format:t.proxy((function(t,e){0===arguments.length?(t=this.dates.length-1,e=this.o.format):"string"==typeof t&&(e=t,t=this.dates.length-1),e=e||this.o.format;var n=this.dates.get(t);return y.formatDate(n,e,this.o.language)}),this)})},show:function(){if(!(this.inputField.prop("disabled")||this.inputField.prop("readonly")&&!1===this.o.enableOnReadonly))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&t(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")||(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide")),this},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(e){var n;if(e.originalEvent.clipboardData&&e.originalEvent.clipboardData.types&&-1!==t.inArray("text/plain",e.originalEvent.clipboardData.types))n=e.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;n=window.clipboardData.getData("Text")}this.setDate(n),this.update(),e.preventDefault()},_utc_to_local:function(t){return t&&new Date(t.getTime()+6e4*t.getTimezoneOffset())},_local_to_utc:function(t){return t&&new Date(t.getTime()-6e4*t.getTimezoneOffset())},_zero_time:function(t){return t&&new Date(t.getFullYear(),t.getMonth(),t.getDate())},_zero_utc_time:function(t){return t&&n(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())},getDates:function(){return t.map(this.dates,this._utc_to_local)},getUTCDates:function(){return t.map(this.dates,(function(t){return new Date(t)}))},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var t=this.dates.get(-1);return t!==e?new Date(t):null},clearDates:function(){this.inputField.val(""),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var e=t.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,e),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var e=t.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,t.map(e,this._utc_to_local)),this},setDate:r("setDates"),setUTCDate:r("setUTCDates"),remove:r("destroy"),setValue:function(){var t=this.getFormattedDate();return this.inputField.val(t),this},getFormattedDate:function(n){n===e&&(n=this.o.format);var i=this.o.language;return t.map(this.dates,(function(t){return y.formatDate(t,n,i)})).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(t){return this._process_options({startDate:t}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(t){return this._process_options({endDate:t}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(t){return this._process_options({daysOfWeekDisabled:t}),this.update(),this},setDaysOfWeekHighlighted:function(t){return this._process_options({daysOfWeekHighlighted:t}),this.update(),this},setDatesDisabled:function(t){return this._process_options({datesDisabled:t}),this.update(),this},place:function(){if(this.isInline)return this;var e=this.picker.outerWidth(),n=this.picker.outerHeight(),i=10,o=t(this.o.container),r=o.width(),a="body"===this.o.container?t(document).scrollTop():o.scrollTop(),s=o.offset(),l=[];this.element.parents().each((function(){var e=t(this).css("z-index");"auto"!==e&&0!==e&&l.push(parseInt(e))}));var c=Math.max.apply(Math,l)+this.o.zIndexOffset,u=this.component?this.component.parent().offset():this.element.offset(),d=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),h=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),p=u.left-s.left,f=u.top-s.top;"body"!==this.o.container&&(f+=a),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(p-=e-h)):u.left<0?(this.picker.addClass("datepicker-orient-left"),p-=u.left-i):p+e>r?(this.picker.addClass("datepicker-orient-right"),p+=h-e):this.picker.addClass("datepicker-orient-left");var m=this.o.orientation.y;if("auto"===m&&(m=-a+f-n<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+m),"top"===m?f-=n+parseInt(this.picker.css("padding-top")):f+=d,this.o.rtl){var g=r-(p+h);this.picker.css({top:f,right:g,zIndex:c})}else this.picker.css({top:f,left:p,zIndex:c});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var e=this.dates.copy(),n=[],i=!1;return arguments.length?(t.each(arguments,t.proxy((function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),n.push(e)}),this)),i=!0):(n=(n=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?n.split(this.o.multidateSeparator):[n],delete this.element.data().date),n=t.map(n,t.proxy((function(t){return y.parseDate(t,this.o.format,this.o.language,this.o.assumeNearbyYear)}),this)),n=t.grep(n,t.proxy((function(t){return!this.dateWithinRange(t)||!t}),this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate,i?(this.setValue(),this.element.change()):this.dates.length&&String(e)!==String(this.dates)&&i&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&e.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){var e=this.o.weekStart,n="<tr>";for(this.o.calendarWeeks&&(n+='<th class="cw">&#160;</th>');e<this.o.weekStart+7;)n+='<th class="dow',-1!==t.inArray(e,this.o.daysOfWeekDisabled)&&(n+=" disabled"),n+='">'+v[this.o.language].daysMin[e++%7]+"</th>";n+="</tr>",this.picker.find(".datepicker-days thead").append(n)},fillMonths:function(){for(var t=this._utc_to_local(this.viewDate),e="",n=0;n<12;){e+='<span class="month'+(t&&t.getMonth()===n?" focused":"")+'">'+v[this.o.language].monthsShort[n++]+"</span>"}this.picker.find(".datepicker-months td").html(e)},setRange:function(e){e&&e.length?this.range=t.map(e,(function(t){return t.valueOf()})):delete this.range,this.fill()},getClassNames:function(e){var n=[],r=this.viewDate.getUTCFullYear(),a=this.viewDate.getUTCMonth(),s=i();return e.getUTCFullYear()<r||e.getUTCFullYear()===r&&e.getUTCMonth()<a?n.push("old"):(e.getUTCFullYear()>r||e.getUTCFullYear()===r&&e.getUTCMonth()>a)&&n.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&n.push("focused"),this.o.todayHighlight&&o(e,s)&&n.push("today"),-1!==this.dates.contains(e)&&n.push("active"),this.dateWithinRange(e)||n.push("disabled"),this.dateIsDisabled(e)&&n.push("disabled","disabled-date"),-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekHighlighted)&&n.push("highlighted"),this.range&&(e>this.range[0]&&e<this.range[this.range.length-1]&&n.push("range"),-1!==t.inArray(e.valueOf(),this.range)&&n.push("selected"),e.valueOf()===this.range[0]&&n.push("range-start"),e.valueOf()===this.range[this.range.length-1]&&n.push("range-end")),n},_fill_yearsView:function(n,i,o,r,a,s,l,c){var u,d,h,p,f,m,g,v,y,_,b;for(u="",d=this.picker.find(n),h=parseInt(a/o,10)*o,f=parseInt(s/r,10)*r,m=parseInt(l/r,10)*r,p=t.map(this.dates,(function(t){return parseInt(t.getUTCFullYear()/r,10)*r})),d.find(".datepicker-switch").text(h+"-"+(h+9*r)),g=h-r,v=-1;v<11;v+=1)y=[i],_=null,-1===v?y.push("old"):10===v&&y.push("new"),-1!==t.inArray(g,p)&&y.push("active"),(g<f||g>m)&&y.push("disabled"),g===this.viewDate.getFullYear()&&y.push("focused"),c!==t.noop&&((b=c(new Date(g,0,1)))===e?b={}:"boolean"==typeof b?b={enabled:b}:"string"==typeof b&&(b={classes:b}),!1===b.enabled&&y.push("disabled"),b.classes&&(y=y.concat(b.classes.split(/\s+/))),b.tooltip&&(_=b.tooltip)),u+='<span class="'+y.join(" ")+'"'+(_?' title="'+_+'"':"")+">"+g+"</span>",g+=r;d.find("td").html(u)},fill:function(){var i,o,r=new Date(this.viewDate),a=r.getUTCFullYear(),s=r.getUTCMonth(),l=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,c=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,u=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,d=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,h=v[this.o.language].today||v.en.today||"",p=v[this.o.language].clear||v.en.clear||"",f=v[this.o.language].titleFormat||v.en.titleFormat;if(!isNaN(a)&&!isNaN(s)){this.picker.find(".datepicker-days .datepicker-switch").text(y.formatDate(r,f,this.o.language)),this.picker.find("tfoot .today").text(h).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot .clear").text(p).toggle(!1!==this.o.clearBtn),this.picker.find("thead .datepicker-title").text(this.o.title).toggle(""!==this.o.title),this.updateNavArrows(),this.fillMonths();var m=n(a,s,0),g=m.getUTCDate();m.setUTCDate(g-(m.getUTCDay()-this.o.weekStart+7)%7);var _=new Date(m);m.getUTCFullYear()<100&&_.setUTCFullYear(m.getUTCFullYear()),_.setUTCDate(_.getUTCDate()+42),_=_.valueOf();for(var b,w,x=[];m.valueOf()<_;){if((b=m.getUTCDay())===this.o.weekStart&&(x.push("<tr>"),this.o.calendarWeeks)){var k=new Date(+m+(this.o.weekStart-b-7)%7*864e5),C=new Date(Number(k)+(11-k.getUTCDay())%7*864e5),S=new Date(Number(S=n(C.getUTCFullYear(),0,1))+(11-S.getUTCDay())%7*864e5),T=(C-S)/864e5/7+1;x.push('<td class="cw">'+T+"</td>")}(w=this.getClassNames(m)).push("day"),this.o.beforeShowDay!==t.noop&&((o=this.o.beforeShowDay(this._utc_to_local(m)))===e?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1===o.enabled&&w.push("disabled"),o.classes&&(w=w.concat(o.classes.split(/\s+/))),o.tooltip&&(i=o.tooltip)),w=t.isFunction(t.uniqueSort)?t.uniqueSort(w):t.unique(w),x.push('<td class="'+w.join(" ")+'"'+(i?' title="'+i+'"':"")+(this.o.dateCells?' data-date="'+m.getTime().toString()+'"':"")+">"+m.getUTCDate()+"</td>"),i=null,b===this.o.weekEnd&&x.push("</tr>"),m.setUTCDate(m.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(x.join(""));var E=v[this.o.language].monthsTitle||v.en.monthsTitle||"Months",$=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?E:a).end().find("tbody span").removeClass("active");if(t.each(this.dates,(function(t,e){e.getUTCFullYear()===a&&$.eq(e.getUTCMonth()).addClass("active")})),(a<l||a>u)&&$.addClass("disabled"),a===l&&$.slice(0,c).addClass("disabled"),a===u&&$.slice(d+1).addClass("disabled"),this.o.beforeShowMonth!==t.noop){var D=this;t.each($,(function(n,i){var o=new Date(a,n,1),r=D.o.beforeShowMonth(o);r===e?r={}:"boolean"==typeof r?r={enabled:r}:"string"==typeof r&&(r={classes:r}),!1!==r.enabled||t(i).hasClass("disabled")||t(i).addClass("disabled"),r.classes&&t(i).addClass(r.classes),r.tooltip&&t(i).prop("title",r.tooltip)}))}this._fill_yearsView(".datepicker-years","year",10,1,a,l,u,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,10,a,l,u,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,100,a,l,u,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var t,e,n=new Date(this.viewDate),i=n.getUTCFullYear(),o=n.getUTCMonth();switch(this.viewMode){case 0:t=this.o.startDate!==-1/0&&i<=this.o.startDate.getUTCFullYear()&&o<=this.o.startDate.getUTCMonth(),e=this.o.endDate!==1/0&&i>=this.o.endDate.getUTCFullYear()&&o>=this.o.endDate.getUTCMonth();break;case 1:case 2:case 3:case 4:t=this.o.startDate!==-1/0&&i<=this.o.startDate.getUTCFullYear(),e=this.o.endDate!==1/0&&i>=this.o.endDate.getUTCFullYear()}this.picker.find(".prev").toggleClass("disabled",t),this.picker.find(".next").toggleClass("disabled",e)}},click:function(e){var o,r,a,s,l;e.preventDefault(),e.stopPropagation(),(o=t(e.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),o.hasClass("today")&&!o.hasClass("day")&&(this.setViewMode(0),this._setDate(i(),"linked"===this.o.todayBtn?null:"view")),o.hasClass("clear")&&this.clearDates(),o.hasClass("disabled")||(o.hasClass("day")&&(a=Number(o.text()),s=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),(o.hasClass("old")||o.hasClass("new"))&&(l=(l+(r=o.hasClass("old")?-1:1)+12)%12,(-1===r&&11===l||1===r&&0===l)&&(s+=r,this._trigger("changeYear",this.viewDate)),this._trigger("changeMonth",this.viewDate)),this._setDate(n(s,l,a))),(o.hasClass("month")||o.hasClass("year")||o.hasClass("decade")||o.hasClass("century"))&&(this.viewDate.setUTCDate(1),a=1,1===this.viewMode?(l=o.parent().find("span").index(o),s=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(l)):(l=0,s=Number(o.text()),this.viewDate.setUTCFullYear(s)),this._trigger(y.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(n(s,l,a)):(this.setViewMode(this.viewMode-1),this.fill()))),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},navArrowsClick:function(e){var n=t(e.target).hasClass("prev")?-1:1;0!==this.viewMode&&(n*=12*y.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,n),this._trigger(y.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(t){var e=this.dates.contains(t);if(t||this.dates.clear(),-1!==e?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(e):!1===this.o.multidate?(this.dates.clear(),this.dates.push(t)):this.dates.push(t),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(t,e){e&&"date"!==e||this._toggle_multidate(t&&new Date(t)),e&&"view"!==e||(this.viewDate=t&&new Date(t)),this.fill(),this.setValue(),e&&"view"===e||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||e&&"date"!==e||this.hide()},moveDay:function(t,e){var n=new Date(t);return n.setUTCDate(t.getUTCDate()+e),n},moveWeek:function(t,e){return this.moveDay(t,7*e)},moveMonth:function(t,e){if(!a(t))return this.o.defaultViewDate;if(!e)return t;var n,i,o=new Date(t.valueOf()),r=o.getUTCDate(),s=o.getUTCMonth(),l=Math.abs(e);if(e=e>0?1:-1,1===l)i=-1===e?function(){return o.getUTCMonth()===s}:function(){return o.getUTCMonth()!==n},n=s+e,o.setUTCMonth(n),n=(n+12)%12;else{for(var c=0;c<l;c++)o=this.moveMonth(o,e);n=o.getUTCMonth(),o.setUTCDate(r),i=function(){return n!==o.getUTCMonth()}}for(;i();)o.setUTCDate(--r),o.setUTCMonth(n);return o},moveYear:function(t,e){return this.moveMonth(t,12*e)},moveAvailableDate:function(t,e,n){do{if(t=this[n](t,e),!this.dateWithinRange(t))return!1;n="moveDay"}while(this.dateIsDisabled(t));return t},weekOfDateIsDisabled:function(e){return-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(e){return this.weekOfDateIsDisabled(e)||t.grep(this.o.datesDisabled,(function(t){return o(e,t)})).length>0},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":visible")){var e,n,i=!1,o=this.focusDate||this.viewDate;switch(t.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),t.preventDefault(),t.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;e=37===t.keyCode||38===t.keyCode?-1:1,0===this.viewMode?t.ctrlKey?(n=this.moveAvailableDate(o,e,"moveYear"))&&this._trigger("changeYear",this.viewDate):t.shiftKey?(n=this.moveAvailableDate(o,e,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===t.keyCode||39===t.keyCode?n=this.moveAvailableDate(o,e,"moveDay"):this.weekOfDateIsDisabled(o)||(n=this.moveAvailableDate(o,e,"moveWeek")):1===this.viewMode?(38!==t.keyCode&&40!==t.keyCode||(e*=4),n=this.moveAvailableDate(o,e,"moveMonth")):2===this.viewMode&&(38!==t.keyCode&&40!==t.keyCode||(e*=4),n=this.moveAvailableDate(o,e,"moveYear")),n&&(this.focusDate=this.viewDate=n,this.setValue(),this.fill(),t.preventDefault());break;case 13:if(!this.o.forceParse)break;o=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(o),i=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(t.preventDefault(),t.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}i&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))}else 40!==t.keyCode&&27!==t.keyCode||(this.show(),t.stopPropagation())},setViewMode:function(t){this.viewMode=t,this.picker.children("div").hide().filter(".datepicker-"+y.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var h=function(e,n){t.data(e,"datepicker",this),this.element=t(e),this.inputs=t.map(n.inputs,(function(t){return t.jquery?t[0]:t})),delete n.inputs,this.keepEmptyValues=n.keepEmptyValues,delete n.keepEmptyValues,f.call(t(this.inputs),n).on("changeDate",t.proxy(this.dateUpdated,this)),this.pickers=t.map(this.inputs,(function(e){return t.data(e,"datepicker")})),this.updateDates()};h.prototype={updateDates:function(){this.dates=t.map(this.pickers,(function(t){return t.getUTCDate()})),this.updateRanges()},updateRanges:function(){var e=t.map(this.dates,(function(t){return t.valueOf()}));t.each(this.pickers,(function(t,n){n.setRange(e)}))},dateUpdated:function(n){if(!this.updating){this.updating=!0;var i=t.data(n.target,"datepicker");if(i!==e){var o=i.getUTCDate(),r=this.keepEmptyValues,a=t.inArray(n.target,this.inputs),s=a-1,l=a+1,c=this.inputs.length;if(-1!==a){if(t.each(this.pickers,(function(t,e){e.getUTCDate()||e!==i&&r||e.setUTCDate(o)})),o<this.dates[s])for(;s>=0&&o<this.dates[s];)this.pickers[s--].setUTCDate(o);else if(o>this.dates[l])for(;l<c&&o>this.dates[l];)this.pickers[l++].setUTCDate(o);this.updateDates(),delete this.updating}}}},destroy:function(){t.map(this.pickers,(function(t){t.destroy()})),delete this.element.data().datepicker},remove:r("destroy")};var p=t.fn.datepicker,f=function(n){var i,o=Array.apply(null,arguments);if(o.shift(),this.each((function(){var e=t(this),r=e.data("datepicker"),a="object"==typeof n&&n;if(!r){var c=s(this,"date"),u=l(t.extend({},m,c,a).language),p=t.extend({},m,u,c,a);e.hasClass("input-daterange")||p.inputs?(t.extend(p,{inputs:p.inputs||e.find("input").toArray()}),r=new h(this,p)):r=new d(this,p),e.data("datepicker",r)}"string"==typeof n&&"function"==typeof r[n]&&(i=r[n].apply(r,o))})),i===e||i instanceof d||i instanceof h)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+n+" function)");return i};t.fn.datepicker=f;var m=t.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:t.noop,beforeShowMonth:t.noop,beforeShowYear:t.noop,beforeShowDecade:t.noop,beforeShowCentury:t.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,dateCells:!1,title:"",templates:{leftArrow:"&laquo;",rightArrow:"&raquo;"}},g=t.fn.datepicker.locale_opts=["format","rtl","weekStart"];t.fn.datepicker.Constructor=d;var v=t.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},y={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(t){if("function"==typeof t.toValue&&"function"==typeof t.toDisplay)return t;var e=t.replace(this.validParts,"\0").split("\0"),n=t.match(this.validParts);if(!e||!e.length||!n||0===n.length)throw new Error("Invalid date format.");return{separators:e,parts:n}},parseDate:function(o,r,a,s){function l(t,e){return!0===e&&(e=10),t<100&&(t+=2e3)>(new Date).getFullYear()+e&&(t-=100),t}function c(){var t=this.slice(0,u[f].length),e=u[f].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(!o)return e;if(o instanceof Date)return o;if("string"==typeof r&&(r=y.parseFormat(r)),r.toValue)return r.toValue(o,r,a);var u,h,p,f,m,g={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},_={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(o in _&&(o=_[o]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(o)){for(u=o.match(/([\-+]\d+)([dmwy])/gi),o=new Date,f=0;f<u.length;f++)h=u[f].match(/([\-+]\d+)([dmwy])/i),p=Number(h[1]),m=g[h[2].toLowerCase()],o=d.prototype[m](o,p);return n(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate())}u=o&&o.match(this.nonpunctuation)||[],o=new Date;var b,w,x={},k=["yyyy","yy","M","MM","m","mm","d","dd"],C={yyyy:function(t,e){return t.setUTCFullYear(s?l(e,s):e)},m:function(t,e){if(isNaN(t))return t;for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}};C.yy=C.yyyy,C.M=C.MM=C.mm=C.m,C.dd=C.d,o=i();var S=r.parts.slice();if(u.length!==S.length&&(S=t(S).filter((function(e,n){return-1!==t.inArray(n,k)})).toArray()),u.length===S.length){var T,E,$;for(f=0,T=S.length;f<T;f++){if(b=parseInt(u[f],10),h=S[f],isNaN(b))switch(h){case"MM":w=t(v[a].months).filter(c),b=t.inArray(w[0],v[a].months)+1;break;case"M":w=t(v[a].monthsShort).filter(c),b=t.inArray(w[0],v[a].monthsShort)+1}x[h]=b}for(f=0;f<k.length;f++)($=k[f])in x&&!isNaN(x[$])&&(E=new Date(o),C[$](E,x[$]),isNaN(E)||(o=E))}return o},formatDate:function(e,n,i){if(!e)return"";if("string"==typeof n&&(n=y.parseFormat(n)),n.toDisplay)return n.toDisplay(e,n,i);var o={d:e.getUTCDate(),D:v[i].daysShort[e.getUTCDay()],DD:v[i].days[e.getUTCDay()],m:e.getUTCMonth()+1,M:v[i].monthsShort[e.getUTCMonth()],MM:v[i].months[e.getUTCMonth()],yy:e.getUTCFullYear().toString().substring(2),yyyy:e.getUTCFullYear()};o.dd=(o.d<10?"0":"")+o.d,o.mm=(o.m<10?"0":"")+o.m,e=[];for(var r=t.extend([],n.separators),a=0,s=n.parts.length;a<=s;a++)r.length&&e.push(r.shift()),e.push(o[n.parts[a]]);return e.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">&laquo;</th><th colspan="5" class="datepicker-switch"></th><th class="next">&raquo;</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};y.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+y.headTemplate+"<tbody></tbody>"+y.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+y.headTemplate+y.contTemplate+y.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+y.headTemplate+y.contTemplate+y.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+y.headTemplate+y.contTemplate+y.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+y.headTemplate+y.contTemplate+y.footTemplate+"</table></div></div>",t.fn.datepicker.DPGlobal=y,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=p,this},t.fn.datepicker.version="1.7.0-dev",t(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',(function(e){var n=t(this);n.data("datepicker")||(e.preventDefault(),f.call(n,"show"))})),t((function(){f.call(t('[data-provide="datepicker-inline"]'))}))})),jQuery.fn.datepicker.dates.ru={days:["\u0412\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435","\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a","\u0412\u0442\u043e\u0440\u043d\u0438\u043a","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041f\u044f\u0442\u043d\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043e\u0442\u0430"],daysShort:["\u0412\u0441\u043a","\u041f\u043d\u0434","\u0412\u0442\u0440","\u0421\u0440\u0434","\u0427\u0442\u0432","\u041f\u0442\u043d","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041f\u043d","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041f\u0442","\u0421\u0431"],
months:["\u042f\u043d\u0432\u0430\u0440\u044c","\u0424\u0435\u0432\u0440\u0430\u043b\u044c","\u041c\u0430\u0440\u0442","\u0410\u043f\u0440\u0435\u043b\u044c","\u041c\u0430\u0439","\u0418\u044e\u043d\u044c","\u0418\u044e\u043b\u044c","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c","\u041e\u043a\u0442\u044f\u0431\u0440\u044c","\u041d\u043e\u044f\u0431\u0440\u044c","\u0414\u0435\u043a\u0430\u0431\u0440\u044c"],monthsShort:["\u042f\u043d\u0432","\u0424\u0435\u0432","\u041c\u0430\u0440","\u0410\u043f\u0440","\u041c\u0430\u0439","\u0418\u044e\u043d","\u0418\u044e\u043b","\u0410\u0432\u0433","\u0421\u0435\u043d","\u041e\u043a\u0442","\u041d\u043e\u044f","\u0414\u0435\u043a"],today:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f",clear:"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c",format:"dd.mm.yyyy",weekStart:1},fotoramaVersion="4.6.4",function(t,e,n,i,o){"use strict";function r(t){var e="bez_"+i.makeArray(arguments).join("_").replace(".","p");if("function"!=typeof i.easing[e]){var n=function(t,e){var n=[null,null],i=[null,null],o=[null,null],r=function(r,a){return o[a]=3*t[a],i[a]=3*(e[a]-t[a])-o[a],n[a]=1-o[a]-i[a],r*(o[a]+r*(i[a]+r*n[a]))},a=function(t){return o[0]+t*(2*i[0]+3*n[0]*t)},s=function(t){for(var e,n=t,i=0;++i<14&&(e=r(n,0)-t,!(Math.abs(e)<.001));)n-=e/a(n);return n};return function(t){return r(s(t),1)}};i.easing[e]=function(e,i,o,r,a){return r*n([t[0],t[1]],[t[2],t[3]])(i/a)+o}}return e}function a(){}function s(t,e,n){return Math.max(isNaN(e)?-1/0:e,Math.min(isNaN(n)?1/0:n,t))}function l(t){return t.match(/ma/)&&t.match(/-?\d+(?!d)/g)[t.match(/3d/)?12:4]}function c(t){return Fe?+l(t.css("transform")):+t.css("left").replace("px","")}function u(t){var e={};return Fe?e.transform="translate3d("+t+"px,0,0)":e.left=t,e}function d(t){return{"transition-duration":t+"ms"}}function h(t,e){return isNaN(t)?e:t}function p(t,e){return h(+String(t).replace(e||"px",""))}function f(t){return/%$/.test(t)?p(t,"%"):o}function m(t,e){return h(f(t)/100*e,p(t))}function g(t){return(!isNaN(p(t))||!isNaN(p(t,"%")))&&t}function v(t,e,n,i){return(t-(i||0))*(e+(n||0))}function y(t,e,n,i){return-Math.round(t/(e+(n||0))-(i||0))}function _(t){var e=t.data();e.tEnd||(W(t[0],{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",msTransition:"MSTransitionEnd",transition:"transitionend"}[_e.prefixed("transition")],(function(t){e.tProp&&t.propertyName.match(e.tProp)&&e.onEndFn()})),e.tEnd=!0)}function b(t,e,n,i){var o,r=t.data();r&&(r.onEndFn=function(){o||(o=!0,clearTimeout(r.tT),n())},r.tProp=e,clearTimeout(r.tT),r.tT=setTimeout((function(){r.onEndFn()}),1.5*i),_(t))}function w(t,e){if(t.length){var n=t.data();Fe?(t.css(d(0)),n.onEndFn=a,clearTimeout(n.tT)):t.stop();var i=x(e,(function(){return c(t)}));return t.css(u(i)),i}}function x(){for(var t,e=0,n=arguments.length;e<n&&"number"!=typeof(t=e?arguments[e]():arguments[e]);e++);return t}function k(t,e){return Math.round(t+(e-t)/1.5)}function C(){return C.p=C.p||("https:"===n.protocol?"https://":"http://"),C.p}function S(t){var n=e.createElement("a");return n.href=t,n}function T(t,e){if("string"!=typeof t)return t;var n,i;if((t=S(t)).host.match(/youtube\.com/)&&t.search){if(n=t.search.split("v=")[1]){var o=n.indexOf("&");-1!==o&&(n=n.substring(0,o)),i="youtube"}}else t.host.match(/youtube\.com|youtu\.be/)?(n=t.pathname.replace(/^\/(embed\/|v\/)?/,"").replace(/\/.*/,""),i="youtube"):t.host.match(/vimeo\.com/)&&(i="vimeo",n=t.pathname.replace(/^\/(video\/)?/,"").replace(/\/.*/,""));return n&&i||!e||(n=t.href,i="custom"),!!n&&{id:n,type:i,s:t.search.replace(/^\?/,""),p:C()}}function E(t,e,n){var o,r,a=t.video;return"youtube"===a.type?(o=(r=C()+"img.youtube.com/vi/"+a.id+"/default.jpg").replace(/\/default.jpg$/,"/hqdefault.jpg"),t.thumbsReady=!0):"vimeo"===a.type?i.ajax({url:C()+"vimeo.com/api/v2/video/"+a.id+".json",dataType:"jsonp",success:function(i){t.thumbsReady=!0,$(e,{img:i[0].thumbnail_large,thumb:i[0].thumbnail_small},t.i,n)}}):t.thumbsReady=!0,{img:o,thumb:r}}function $(t,e,n,o){for(var r=0,a=t.length;r<a;r++){var s=t[r];if(s.i===n&&s.thumbsReady){var l={videoReady:!0};l[Ze]=l[en]=l[tn]=!1,o.splice(r,1,i.extend({},s,l,e));break}}}function D(t){function e(t,e,o){var r=t.children("img").eq(0),a=t.attr("href"),s=t.attr("src"),l=r.attr("src"),c=e.video,u=!!o&&T(a,!0===c);u?a=!1:u=c,n(t,r,i.extend(e,{video:u,img:e.img||a||s||l,thumb:e.thumb||l||s||a}))}function n(t,e,n){var o=n.thumb&&n.img!==n.thumb,r=p(n.width||t.attr("width")),a=p(n.height||t.attr("height")),s=e&&e.attr("alt"),l=e&&e.attr("title");s&&i.extend(n,{alt:s}),l&&i.extend(n,{title:l}),i.extend(n,{width:r,height:a,thumbratio:z(n.thumbratio||p(n.thumbwidth||e&&e.attr("width")||o||r)/p(n.thumbheight||e&&e.attr("height")||o||a))})}var o=[];return t.children().each((function(){var t=i(this),r=U(i.extend(t.data(),{id:t.attr("id")}));if(t.is("a, img"))e(t,r,!0);else{if(t.is(":empty"))return;n(t,null,i.extend(r,{html:this,_html:t.html()}))}o.push(r)})),o}function A(t){return 0===t.offsetWidth&&0===t.offsetHeight}function j(t){return!i.contains(e.documentElement,t)}function M(t,e,n,i){return M.i||(M.i=1,M.ii=[!0]),i=i||M.i,void 0===M.ii[i]&&(M.ii[i]=!0),t()?e():M.ii[i]&&setTimeout((function(){M.ii[i]&&M(t,e,n,i)}),n||100),M.i++}function I(t){n.replace(n.protocol+"//"+n.host+n.pathname.replace(/^\/?/,"/")+n.search+"#"+t)}function P(t,e,n,i){var o=t.data(),r=o.measures;if(r&&(!o.l||o.l.W!==r.width||o.l.H!==r.height||o.l.r!==r.ratio||o.l.w!==e.w||o.l.h!==e.h||o.l.m!==n||o.l.p!==i)){var a=r.width,l=r.height,c=e.w/e.h,u=r.ratio>=c,d="scaledown"===n,h="contain"===n,p="cover"===n,f=J(i);u&&(d||h)||!u&&p?l=(a=s(e.w,0,d?a:1/0))/r.ratio:(u&&p||!u&&(d||h))&&(a=(l=s(e.h,0,d?l:1/0))*r.ratio),t.css({width:a,height:l,left:m(f.x,e.w-a),top:m(f.y,e.h-l)}),o.l={W:r.width,H:r.height,r:r.ratio,w:e.w,h:e.h,m:n,p:i}}return!0}function O(t,e){var n=t[0];n.styleSheet?n.styleSheet.cssText=e:t.html(e)}function N(t,e,n){return e!==n&&(t<=e?"left":t>=n?"right":"left right")}function L(t,e,n,i){if(!n)return!1;if(!isNaN(t))return t-(i?0:1);for(var o,r=0,a=e.length;r<a;r++){if(e[r].id===t){o=r;break}}return o}function F(t,e,n){n=n||{},t.each((function(){var t,o=i(this),r=o.data();r.clickOn||(r.clickOn=!0,i.extend(nt(o,{onStart:function(e){t=e,(n.onStart||a).call(this,e)},onMove:n.onMove||a,onTouchEnd:n.onTouchEnd||a,onEnd:function(n){n.moved||e.call(this,t)}}),{noMove:!0}))}))}function R(t,e){return'<div class="'+t+'">'+(e||"")+"</div>"}function q(t){for(var e=t.length;e;){var n=Math.floor(Math.random()*e--),i=t[e];t[e]=t[n],t[n]=i}return t}function B(t){return"[object Array]"==Object.prototype.toString.call(t)&&i.map(t,(function(t){return i.extend({},t)}))}function H(t,e,n){t.scrollLeft(e||0).scrollTop(n||0)}function U(t){if(t){var e={};return i.each(t,(function(t,n){e[t.toLowerCase()]=n})),e}}function z(t){if(t){var e=+t;return isNaN(e)?+(e=t.split("/"))[0]/+e[1]||o:e}}function W(t,e,n,i){e&&(t.addEventListener?t.addEventListener(e,n,!!i):t.attachEvent("on"+e,n))}function Q(t){return!!t.getAttribute("disabled")}function V(t){return{tabindex:-1*t+"",disabled:t}}function G(t,e){W(t,"keyup",(function(n){Q(t)||13==n.keyCode&&e.call(t,n)}))}function Y(t,e){W(t,"focus",t.onfocusin=function(n){e.call(t,n)},!0)}function X(t,e){t.preventDefault?t.preventDefault():t.returnValue=!1,e&&t.stopPropagation&&t.stopPropagation()}function K(t){return t?">":"<"}function J(t){return{x:g((t=(t+"").split(/\s+/))[0])||an,y:g(t[1])||an}}function Z(t,e){var n=t.data(),o=Math.round(e.pos),r=function(){n.sliding=!1,(e.onEnd||a)()};void 0!==e.overPos&&e.overPos!==e.pos&&(o=e.overPos,r=function(){Z(t,i.extend({},e,{overPos:e.pos,time:Math.max(Qe,e.time/2)}))});var s=i.extend(u(o),e.width&&{width:e.width});n.sliding=!0,Fe?(t.css(i.extend(d(e.time),s)),e.time>10?b(t,"transform",r,e.time):r()):t.stop().animate(s,e.time,on,r)}function tt(t,e,n,o,r,s){var l=void 0!==s;if(l||(r.push(arguments),Array.prototype.push.call(arguments,r.length),!(r.length>1))){t=t||i(t),e=e||i(e);var c=t[0],u=e[0],d="crossfade"===o.method,h=function(){if(!h.done){h.done=!0;var t=(l||r.shift())&&r.shift();t&&tt.apply(this,t),(o.onEnd||a)(!!t)}},p=o.time/(s||1);n.removeClass(Ut+" "+Ht),t.stop().addClass(Ut),e.stop().addClass(Ht),d&&u&&t.fadeTo(0,0),t.fadeTo(d?p:0,1,d&&h),e.fadeTo(p,0,h),c&&d||u||h()}}function et(t){var e=(t.touches||[])[0]||t;t._x=e.pageX,t._y=e.clientY,t._now=i.now()}function nt(t,n){function o(t){if(h=i(t.target),b.checked=m=g=y=!1,u||b.flow||t.touches&&t.touches.length>1||t.which>1||Ae&&Ae.type!==t.type&&Me||(m=n.select&&h.is(n.select,_)))return m;f="touchstart"===t.type,g=h.is("a, a *",_),p=b.control,v=b.noMove||b.noSwipe||p?16:b.snap?0:4,et(t),d=Ae=t,je=t.type.replace(/down|start/,"move").replace(/Down/,"Move"),(n.onStart||a).call(_,t,{control:p,$target:h}),u=b.flow=!0,f&&!b.go||X(t)}function r(t){if(t.touches&&t.touches.length>1||Ue&&!t.isPrimary||je!==t.type||!u)return u&&s(),void(n.onTouchEnd||a)();et(t);var e=Math.abs(t._x-d._x),i=Math.abs(t._y-d._y),o=e-i,r=(b.go||b.x||o>=0)&&!b.noSwipe,l=o<0;f&&!b.checked?(u=r)&&X(t):(X(t),(n.onMove||a).call(_,t,{touch:f})),!y&&Math.sqrt(Math.pow(e,2)+Math.pow(i,2))>v&&(y=!0),b.checked=b.checked||r||l}function s(t){(n.onTouchEnd||a)();var e=u;b.control=u=!1,e&&(b.flow=!1),!e||g&&!b.checked||(t&&X(t),Me=!0,clearTimeout(Ie),Ie=setTimeout((function(){Me=!1}),1e3),(n.onEnd||a).call(_,{moved:y,$target:h,control:p,touch:f,startEvent:d,aborted:!t||"MSPointerCancel"===t.type}))}function l(){b.flow||setTimeout((function(){b.flow=!0}),10)}function c(){b.flow&&setTimeout((function(){b.flow=!1}),We)}var u,d,h,p,f,m,g,v,y,_=t[0],b={};return Ue?(W(_,"MSPointerDown",o),W(e,"MSPointerMove",r),W(e,"MSPointerCancel",s),W(e,"MSPointerUp",s)):(W(_,"touchstart",o),W(_,"touchmove",r),W(_,"touchend",s),W(e,"touchstart",l),W(e,"touchend",c),W(e,"touchcancel",c),Pe.on("scroll",c),t.on("mousedown",o),Oe.on("mousemove",r).on("mouseup",s)),t.on("click","a",(function(t){b.checked&&X(t)})),b}function it(t,e){function n(n,i){S=!0,c=d=n._x,g=n._now,m=[[g,c]],h=p=$.noMove||i?0:w(t,(e.getPos||a)()),(e.onStart||a).call(T,n)}function o(t,e){y=$.min,_=$.max,b=$.snap,x=t.altKey,S=C=!1,e.control||E.sliding||n(t)}function r(i,o){$.noSwipe||(S||n(i),d=i._x,m.push([i._now,d]),f=N(p=h-(c-d),y,_),p<=y?p=k(p,y):p>=_&&(p=k(p,_)),$.noMove||(t.css(u(p)),C||(C=!0,o.touch||Ue||t.addClass(ie)),(e.onMove||a).call(T,i,{pos:p,edge:f})))}function l(o){if(!$.noSwipe||!o.moved){S||n(o.startEvent,!0),o.touch||Ue||t.removeClass(ie);for(var r,l,c,u,f,g,w,k,C,E=(v=i.now())-We,D=null,A=Qe,j=e.friction,M=m.length-1;M>=0;M--){if(r=m[M][0],l=Math.abs(r-E),null===D||l<c)D=r,u=m[M][1];else if(D===E||l>c)break;c=l}w=s(p,y,_);var I=u-d,P=I>=0,O=v-D,N=O>We,L=!N&&p!==h&&w===p;b&&(w=s(Math[L?P?"floor":"ceil":"round"](p/b)*b,y,_),y=_=w),L&&(b||w===p)&&(C=-I/O,A*=s(Math.abs(C),e.timeLow,e.timeHigh),f=Math.round(p+C*A/j),b||(w=f),(!P&&f>_||P&&f<y)&&(g=P?y:_,b||(w=g),k=s(w+.03*(k=f-g),g-50,g+50),A=Math.abs((p-k)/(C/j)))),A*=x?10:1,(e.onEnd||a).call(T,i.extend(o,{moved:o.moved||N&&b,pos:p,newPos:w,overPos:k,time:A}))}}var c,d,h,p,f,m,g,v,y,_,b,x,C,S,T=t[0],E=t.data(),$={};return $=i.extend(nt(e.$wrap,i.extend({},e,{onStart:o,onMove:r,onEnd:l})),$)}function ot(t,e){var n,o,r,s=t[0],l={prevent:{}};return W(s,ze,(function(t){var s=t.wheelDeltaY||-1*t.deltaY||0,c=t.wheelDeltaX||-1*t.deltaX||0,u=Math.abs(c)&&!Math.abs(s),d=K(c<0),h=o===d,p=i.now(),f=p-r<We;o=d,r=p,u&&l.ok&&(!l.prevent[d]||n)&&(X(t,!0),n&&h&&f||(e.shift&&(n=!0,clearTimeout(l.t),l.t=setTimeout((function(){n=!1}),Ve)),(e.onEnd||a)(t,e.shift?d:c)))})),l}function rt(){i.each(i.Fotorama.instances,(function(t,e){e.index=t}))}function at(t){i.Fotorama.instances.push(t),rt()}function st(t){i.Fotorama.instances.splice(t.index,1),rt()}var lt="fotorama",ct="fullscreen",ut=lt+"__wrap",dt=ut+"--css2",ht=ut+"--css3",pt=ut+"--video",ft=ut+"--fade",mt=ut+"--slide",gt=ut+"--no-controls",vt=ut+"--no-shadows",yt=ut+"--pan-y",_t=ut+"--rtl",bt=ut+"--only-active",wt=ut+"--no-captions",xt=ut+"--toggle-arrows",kt=lt+"__stage",Ct=kt+"__frame",St=Ct+"--video",Tt=kt+"__shaft",Et=lt+"__grab",$t=lt+"__pointer",Dt=lt+"__arr",At=Dt+"--disabled",jt=Dt+"--prev",Mt=Dt+"--next",It=lt+"__nav",Pt=It+"-wrap",Ot=It+"__shaft",Nt=It+"--dots",Lt=It+"--thumbs",Ft=It+"__frame",Rt=Ft+"--dot",qt=Ft+"--thumb",Bt=lt+"__fade",Ht=Bt+"-front",Ut=Bt+"-rear",zt=lt+"__shadow"+"s",Wt=zt+"--left",Qt=zt+"--right",Vt=lt+"__active",Gt=lt+"__select",Yt=lt+"--hidden",Xt=lt+"--fullscreen",Kt=lt+"__fullscreen-icon",Jt=lt+"__error",Zt=lt+"__loading",te=lt+"__loaded",ee=te+"--full",ne=te+"--img",ie=lt+"__grabbing",oe=lt+"__img",re=oe+"--full",ae=lt+"__dot",se=lt+"__thumb",le=se+"-border",ce=lt+"__html",ue=lt+"__video",de=ue+"-play",he=ue+"-close",pe=lt+"__caption",fe=lt+"__caption__wrap",me=lt+"__spinner",ge='" tabindex="0" role="button',ve=i&&i.fn.jquery.split(".");if(!ve||ve[0]<1||1==ve[0]&&ve[1]<8)throw"Fotorama requires jQuery 1.8 or later and will not run without it.";var ye={},_e=function(t,e,n){function i(t){g.cssText=t}function o(t,e){return typeof t===e}function r(t,e){return!!~(""+t).indexOf(e)}function a(t,e){for(var i in t){var o=t[i];if(!r(o,"-")&&g[o]!==n)return"pfx"!=e||o}return!1}function s(t,e,i){for(var r in t){var a=e[t[r]];if(a!==n)return!1===i?t[r]:o(a,"function")?a.bind(i||e):a}return!1}function l(t,e,n){var i=t.charAt(0).toUpperCase()+t.slice(1),r=(t+" "+_.join(i+" ")+i).split(" ");return o(e,"string")||o(e,"undefined")?a(r,e):s(r=(t+" "+b.join(i+" ")+i).split(" "),e,n)}var c,u,d="2.6.2",h={},p=e.documentElement,f="modernizr",m=e.createElement(f),g=m.style,v=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),y="Webkit Moz O ms",_=y.split(" "),b=y.toLowerCase().split(" "),w={},x=[],k=x.slice,C=function(t,n,i,o){var r,a,s,l,c=e.createElement("div"),u=e.body,d=u||e.createElement("body");if(parseInt(i,10))for(;i--;)(s=e.createElement("div")).id=o?o[i]:f+(i+1),c.appendChild(s);return r=["&#173;",'<style id="s',f,'">',t,"</style>"].join(""),c.id=f,(u?c:d).innerHTML+=r,d.appendChild(c),u||(d.style.background="",d.style.overflow="hidden",l=p.style.overflow,p.style.overflow="hidden",p.appendChild(d)),a=n(c,t),u?c.parentNode.removeChild(c):(d.parentNode.removeChild(d),p.style.overflow=l),!!a},S={}.hasOwnProperty;for(var T in u=o(S,"undefined")||o(S.call,"undefined")?function(t,e){return e in t&&o(t.constructor.prototype[e],"undefined")}:function(t,e){return S.call(t,e)},Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if("function"!=typeof e)throw new TypeError;var n=k.call(arguments,1),i=function(){if(this instanceof i){var o=function(){};o.prototype=e.prototype;var r=new o,a=e.apply(r,n.concat(k.call(arguments)));return Object(a)===a?a:r}return e.apply(t,n.concat(k.call(arguments)))};return i}),w.csstransforms3d=function(){return!!l("perspective")},w)u(w,T)&&(c=T.toLowerCase(),h[c]=w[T](),x.push((h[c]?"":"no-")+c));return h.addTest=function(t,e){if("object"==typeof t)for(var i in t)u(t,i)&&h.addTest(i,t[i]);else{if(t=t.toLowerCase(),h[t]!==n)return h;e="function"==typeof e?e():e,"undefined"!=typeof enableClasses&&enableClasses&&(p.className+=" "+(e?"":"no-")+t),h[t]=e}return h},i(""),m=null,h._version=d,h._prefixes=v,h._domPrefixes=b,h._cssomPrefixes=_,h.testProp=function(t){return a([t])},h.testAllProps=l,h.testStyles=C,h.prefixed=function(t,e,n){return e?l(t,e,n):l(t,"pfx")},h}(0,e),be={ok:!1,is:function(){return!1},request:function(){},cancel:function(){},event:"",prefix:""},we="webkit moz o ms khtml".split(" ");if(void 0!==e.cancelFullScreen)be.ok=!0;else for(var xe=0,ke=we.length;xe<ke;xe++)if(be.prefix=we[xe],void 0!==e[be.prefix+"CancelFullScreen"]){be.ok=!0;break}be.ok&&(be.event=be.prefix+"fullscreenchange",be.is=function(){switch(this.prefix){case"":return e.fullScreen;case"webkit":return e.webkitIsFullScreen;default:return e[this.prefix+"FullScreen"]}},be.request=function(t){return""===this.prefix?t.requestFullScreen():t[this.prefix+"RequestFullScreen"]()},be.cancel=function(){return""===this.prefix?e.cancelFullScreen():e[this.prefix+"CancelFullScreen"]()});var Ce,Se,Te={lines:12,length:5,width:2,radius:7,corners:1,rotate:15,color:"rgba(128, 128, 128, .75)",hwaccel:!0},Ee={top:"auto",left:"auto",className:""};Se=function(){function t(t,n){var i,o=e.createElement(t||"div");for(i in n)o[i]=n[i];return o}function n(t){for(var e=1,n=arguments.length;e<n;e++)t.appendChild(arguments[e]);return t}function i(t,e,n,i){var o=["opacity",e,~~(100*t),n,i].join("-"),r=.01+n/i*100,a=Math.max(1-(1-t)/e*(100-r),t),s=h.substring(0,h.indexOf("Animation")).toLowerCase(),l=s&&"-"+s+"-"||"";return m[o]||(g.insertRule("@"+l+"keyframes "+o+"{0%{opacity:"+a+"}"+r+"%{opacity:"+t+"}"+(r+.01)+"%{opacity:1}"+(r+e)%100+"%{opacity:"+t+"}100%{opacity:"+a+"}}",g.cssRules.length),m[o]=1),o}function r(t,e){var n,i,r=t.style;for(e=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<f.length;i++)if(r[n=f[i]+e]!==o)return n;if(r[e]!==o)return e}function a(t,e){for(var n in e)t.style[r(t,n)||n]=e[n];return t}function s(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)t[i]===o&&(t[i]=n[i])}return t}function l(t){for(var e={x:t.offsetLeft,y:t.offsetTop};t=t.offsetParent;)e.x+=t.offsetLeft,e.y+=t.offsetTop;return e}function c(t,e){return"string"==typeof t?t:t[e%t.length]}function u(t){if(void 0===this)return new u(t);this.opts=s(t||{},u.defaults,v)}function d(){function e(e,n){return t("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',n)}g.addRule(".spin-vml","behavior:url(#default#VML)"),u.prototype.lines=function(t,i){function o(){return a(e("group",{coordsize:u+" "+u,coordorigin:-l+" "+-l}),{width:u,height:u})}function r(t,r,s){n(h,n(a(o(),{rotation:360/i.lines*t+"deg",left:~~r}),n(a(e("roundrect",{arcsize:i.corners}),{width:l,height:i.width,left:i.radius,top:-i.width>>1,filter:s}),e("fill",{color:c(i.color,t),opacity:i.opacity}),e("stroke",{opacity:0}))))}var s,l=i.length+i.width,u=2*l,d=2*-(i.width+i.length)+"px",h=a(o(),{position:"absolute",top:d,left:d});if(i.shadow)for(s=1;s<=i.lines;s++)r(s,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(s=1;s<=i.lines;s++)r(s);return n(t,h)},u.prototype.opacity=function(t,e,n,i){var o=t.firstChild;i=i.shadow&&i.lines||0,o&&e+i<o.childNodes.length&&(o=(o=(o=o.childNodes[e+i])&&o.firstChild)&&o.firstChild)&&(o.opacity=n)}}var h,p,f=["webkit","Moz","ms","O"],m={},g=(p=t("style",{type:"text/css"}),n(e.getElementsByTagName("head")[0],p),p.sheet||p.styleSheet),v={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:1/4,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto",position:"relative"};u.defaults={},s(u.prototype,{spin:function(e){this.stop();var n,i,o=this,r=o.opts,s=o.el=a(t(0,{className:r.className}),{position:r.position,width:0,zIndex:r.zIndex}),c=r.radius+r.length+r.width;if(e&&(e.insertBefore(s,e.firstChild||null),i=l(e),n=l(s),a(s,{left:("auto"==r.left?i.x-n.x+(e.offsetWidth>>1):parseInt(r.left,10)+c)+"px",top:("auto"==r.top?i.y-n.y+(e.offsetHeight>>1):parseInt(r.top,10)+c)+"px"})),s.setAttribute("role","progressbar"),o.lines(s,o.opts),!h){var u,d=0,p=(r.lines-1)*(1-r.direction)/2,f=r.fps,m=f/r.speed,g=(1-r.opacity)/(m*r.trail/100),v=m/r.lines;!function t(){d++;for(var e=0;e<r.lines;e++)u=Math.max(1-(d+(r.lines-e)*v)%m*g,r.opacity),o.opacity(s,e*r.direction+p,u,r);o.timeout=o.el&&setTimeout(t,~~(1e3/f))}()}return o},stop:function(){var t=this.el;return t&&(clearTimeout(this.timeout),t.parentNode&&t.parentNode.removeChild(t),this.el=o),this},lines:function(e,o){function r(e,n){return a(t(),{position:"absolute",width:o.length+o.width+"px",height:o.width+"px",background:e,boxShadow:n,transformOrigin:"left",transform:"rotate("+~~(360/o.lines*l+o.rotate)+"deg) translate("+o.radius+"px,0)",borderRadius:(o.corners*o.width>>1)+"px"})}for(var s,l=0,u=(o.lines-1)*(1-o.direction)/2;l<o.lines;l++)s=a(t(),{position:"absolute",top:1+~(o.width/2)+"px",transform:o.hwaccel?"translate3d(0,0,0)":"",opacity:o.opacity,animation:h&&i(o.opacity,o.trail,u+l*o.direction,o.lines)+" "+1/o.speed+"s linear infinite"}),o.shadow&&n(s,a(r("#000","0 0 4px #000"),{top:"2px"})),n(e,n(s,r(c(o.color,l),"0 0 1px rgba(0,0,0,.1)")));return e},opacity:function(t,e,n){e<t.childNodes.length&&(t.childNodes[e].style.opacity=n)}});var y=a(t("group"),{behavior:"url(#default#VML)"});return!r(y,"transform")&&y.adj?d():h=r(y,"animation"),u},Ce=Se();var $e,De,Ae,je,Me,Ie,Pe=i(t),Oe=i(e),Ne="quirks"===n.hash.replace("#",""),Le=_e.csstransforms3d,Fe=Le&&!Ne,Re=Le||"CSS1Compat"===e.compatMode,qe=be.ok,Be=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i),He=!Fe||Be,Ue=navigator.msPointerEnabled,ze="onwheel"in e.createElement("div")?"wheel":e.onmousewheel!==o?"mousewheel":"DOMMouseScroll",We=250,Qe=300,Ve=1400,Ge=5e3,Ye=2,Xe=64,Ke=500,Je=333,Ze="$stageFrame",tn="$navDotFrame",en="$navThumbFrame",nn="auto",on=r([.1,0,.25,1]),rn=99999,an="50%",sn={width:null,minwidth:null,maxwidth:"100%",height:null,minheight:null,maxheight:null,ratio:null,margin:Ye,glimpse:0,fit:"contain",position:an,thumbposition:an,nav:"dots",navposition:"bottom",navwidth:null,thumbwidth:Xe,thumbheight:Xe,thumbmargin:Ye,thumbborderwidth:Ye,thumbfit:"cover",allowfullscreen:!1,transition:"slide",clicktransition:null,transitionduration:Qe,captions:!0,hash:!1,startindex:0,loop:!1,autoplay:!1,stopautoplayontouch:!0,keyboard:!1,arrows:!0,click:!0,swipe:!0,trackpad:!1,enableifsingleframe:!1,controlsonstart:!0,shuffle:!1,direction:"ltr",shadows:!0,spinner:null},ln={left:!0,right:!0,down:!1,up:!1,space:!1,home:!1,end:!1};M.stop=function(t){M.ii[t]=!1},jQuery.Fotorama=function(t,o){function r(){i.each(Sn,(function(t,e){if(!e.i){e.i=pi++;var n=T(e.video,!0);if(n){var i={};e.video=n,e.img||e.thumb?e.thumbsReady=!0:i=E(e,Sn,ci),$(Sn,{img:i.img,thumb:i.thumb},e.i,ci)}}}))}function a(t){return Jn[t]||ci.fullScreen}function l(t){var e="keydown."+lt,n=lt+ui,i="keydown."+n,r="resize."+n+" orientationchange."+n;t?(Oe.on(i,(function(t){var e,n;Dn&&27===t.keyCode?(e=!0,pn(Dn,!0,!0)):(ci.fullScreen||o.keyboard&&!ci.index)&&(27===t.keyCode?(e=!0,ci.cancelFullScreen()):t.shiftKey&&32===t.keyCode&&a("space")||37===t.keyCode&&a("left")||38===t.keyCode&&a("up")?n="<":32===t.keyCode&&a("space")||39===t.keyCode&&a("right")||40===t.keyCode&&a("down")?n=">":36===t.keyCode&&a("home")?n="<<":35===t.keyCode&&a("end")&&(n=">>")),(e||n)&&X(t),n&&ci.show({index:n,slow:t.altKey,user:!0})})),ci.index||Oe.off(e).on(e,"textarea, input, select",(function(t){!De.hasClass(ct)&&t.stopPropagation()})),Pe.on(r,ci.resize)):(Oe.off(i),Pe.off(r))}function c(e){e!==c.f&&(e?(t.html("").addClass(lt+" "+di).append(vi).before(mi).before(gi),at(ci)):(vi.detach(),mi.detach(),gi.detach(),t.html(fi.urtext).removeClass(di),st(ci)),l(e),c.f=e)}function h(){Sn=ci.data=Sn||B(o.data)||D(t),Tn=ci.size=Sn.length,!Cn.ok&&o.shuffle&&q(Sn),r(),Oi=C(Oi),Tn&&c(!0)}function f(){var t=Tn<2&&!o.enableifsingleframe||Dn;Li.noMove=t||Wn,Li.noSwipe=t||!o.swipe,!Yn&&_i.toggleClass(Et,!o.click&&!Li.noMove&&!Li.noSwipe),Ue&&vi.toggleClass(yt,!Li.noSwipe)}function _(t){!0===t&&(t=""),o.autoplay=Math.max(+t||Ge,1.5*Gn)}function b(){function t(t,n){e[t?"add":"remove"].push(n)}ci.options=o=U(o),Wn="crossfade"===o.transition||"dissolve"===o.transition,Rn=o.loop&&(Tn>2||Wn&&(!Yn||"slide"!==Yn)),Gn=+o.transitionduration||Qe,Kn="rtl"===o.direction,Jn=i.extend({},o.keyboard&&ln,o.keyboard);var e={add:[],remove:[]};Tn>1||o.enableifsingleframe?(qn=o.nav,Hn="top"===o.navposition,e.remove.push(Gt),ki.toggle(!!o.arrows)):(qn=!1,ki.hide()),Ut(),$n=new Ce(i.extend(Te,o.spinner,Ee,{direction:Kn?-1:1})),Ae(),je(),o.autoplay&&_(o.autoplay),Qn=p(o.thumbwidth)||Xe,Vn=p(o.thumbheight)||Xe,Fi.ok=qi.ok=o.trackpad&&!He,f(),Ye(o,[Ni]),(Bn="thumbs"===qn)?(ve(Tn,"navThumb"),En=$i,li=en,O(mi,i.Fotorama.jst.style({w:Qn,h:Vn,b:o.thumbborderwidth,m:o.thumbmargin,s:ui,q:!Re})),Si.addClass(Lt).removeClass(Nt)):"dots"===qn?(ve(Tn,"navDot"),En=Ei,li=tn,Si.addClass(Nt).removeClass(Lt)):(qn=!1,Si.removeClass(Lt+" "+Nt)),qn&&(Hn?Ci.insertBefore(yi):Ci.insertAfter(yi),xe.nav=!1,xe(En,Ti,"nav")),(Un=o.allowfullscreen)?(Ai.prependTo(yi),zn=qe&&"native"===Un):(Ai.detach(),zn=!1),t(Wn,ft),t(!Wn,mt),t(!o.captions,wt),t(Kn,_t),t("always"!==o.arrows,xt),t(!(Xn=o.shadows&&!He),vt),vi.addClass(e.add.join(" ")).removeClass(e.remove.join(" ")),i.extend({},o)}function k(t){return t<0?(Tn+t%Tn)%Tn:t>=Tn?t%Tn:t}function C(t){return s(t,0,Tn-1)}function S(t){return Rn?k(t):C(t)}function A(t){return!!(t>0||Rn)&&t-1}function Q(t){return!!(t<Tn-1||Rn)&&t+1}function J(){Li.min=Rn?-1/0:-v(Tn-1,Ni.w,o.margin,Mn),Li.max=Rn?1/0:-v(0,Ni.w,o.margin,Mn),Li.snap=Ni.w+o.margin}function et(){Ri.min=Math.min(0,Ni.nw-Ti.width()),Ri.max=0,Ti.toggleClass(Et,!(Ri.noMove=Ri.min===Ri.max))}function nt(t,e,n){if("number"==typeof t){t=new Array(t);var o=!0}return i.each(t,(function(t,i){if(o&&(i=t),"number"==typeof i){var r=Sn[k(i)];if(r){var a="$"+e+"Frame",s=r[a];n.call(this,t,i,r,s,a,s&&s.data())}}}))}function rt(t,e,n,i){(!Zn||"*"===Zn&&i===Fn)&&(t=g(o.width)||g(t)||Ke,e=g(o.height)||g(e)||Je,ci.resize({width:t,ratio:o.ratio||n||t/e},0,i!==Fn&&"*"))}function Bt(t,e,n,r,a,s){nt(t,e,(function(t,l,c,u,d,h){function p(t){var e=k(l);on(t,{index:e,src:x,frame:Sn[e]})}function f(){_.remove(),i.Fotorama.cache[x]="error",c.html&&"stage"===e||!C||C===x?(!x||c.html||v?"stage"===e&&(u.trigger("f:load").removeClass(Zt+" "+Jt).addClass(te),p("load"),rt()):(u.trigger("f:error").removeClass(Zt).addClass(Jt),p("error")),h.state="error",!(Tn>1&&Sn[l]===c)||c.html||c.deleted||c.video||v||(c.deleted=!0,ci.splice(l,1))):(c[w]=x=C,Bt([l],e,n,r,a,!0))}function m(){i.Fotorama.measures[x]=b.measures=i.Fotorama.measures[x]||{width:y.width,height:y.height,ratio:y.width/y.height},rt(b.measures.width,b.measures.height,b.measures.ratio,l),_.off("load error").addClass(oe+(v?" "+re:"")).prependTo(u),P(_,(i.isFunction(n)?n():n)||Ni,r||c.fit||o.fit,a||c.position||o.position),i.Fotorama.cache[x]=h.state="loaded",setTimeout((function(){u.trigger("f:load").removeClass(Zt+" "+Jt).addClass(te+" "+(v?ee:ne)),"stage"===e?p("load"):(c.thumbratio===nn||!c.thumbratio&&o.thumbratio===nn)&&(c.thumbratio=b.measures.ratio,xn())}),0)}function g(){var t=10;M((function(){return!ai||!t--&&!He}),(function(){m()}))}if(u){var v=ci.fullScreen&&c.full&&c.full!==c.img&&!h.$full&&"stage"===e;if(!h.$img||s||v){var y=new Image,_=i(y),b=_.data();h[v?"$full":"$img"]=_;var w="stage"===e?v?"full":"img":"thumb",x=c[w],C=v?null:c["stage"===e?"thumb":"img"];"navThumb"===e&&(u=h.$wrap),x?(i.Fotorama.cache[x]?function t(){"error"===i.Fotorama.cache[x]?f():"loaded"===i.Fotorama.cache[x]?setTimeout(g,0):setTimeout(t,100)}():(i.Fotorama.cache[x]="*",_.on("load",g).on("error",f)),h.state="",h.data.hasOwnProperty("alt")&&(y.alt=h.data.alt),h.data.hasOwnProperty("title")&&(y.title=h.data.title),y.src=x):f()}}}))}function Ht(t){Pi.append($n.spin().el).appendTo(t)}function Ut(){Pi.detach(),$n&&$n.stop()}function ie(){var t=An[Ze];t&&!t.data().state&&(Ht(t),t.on("f:load f:error",(function(){t.off("f:load f:error"),Ut()})))}function ue(t){G(t,_n),Y(t,(function(){setTimeout((function(){H(Si)}),0),Ne({time:Gn,guessIndex:i(this).data().eq,minMax:Ri})}))}function ve(t,e){nt(t,e,(function(t,n,o,r,a,s){if(!r){r=o[a]=vi[a].clone(),(s=r.data()).data=o;var l=r[0];"stage"===e?(o.html&&i('<div class="'+ce+'"></div>').append(o._html?i(o.html).removeAttr("id").html(o._html):o.html).appendTo(r),o.caption&&i(R(pe,R(fe,o.caption))).appendTo(r),o.video&&r.addClass(St).append(Mi.clone()),Y(l,(function(){setTimeout((function(){H(yi)}),0),gn({index:s.eq,user:!0})})),bi=bi.add(r)):"navDot"===e?(ue(l),Ei=Ei.add(r)):"navThumb"===e&&(ue(l),s.$wrap=r.children(":first"),$i=$i.add(r),o.video&&s.$wrap.append(Mi.clone()))}}))}function ye(t,e,n,i){return t&&t.length&&P(t,e,n,i)}function _e(t){nt(t,"stage",(function(t,e,n,r,a,s){if(r){var l=k(e),c=n.fit||o.fit,u=n.position||o.position;s.eq=l,Hi[Ze][l]=r.css(i.extend({left:Wn?0:v(e,Ni.w,o.margin,Mn)},Wn&&d(0))),j(r[0])&&(r.appendTo(_i),pn(n.$video)),ye(s.$img,Ni,c,u),ye(s.$full,Ni,c,u)}}))}function we(t,e){if("thumbs"===qn&&!isNaN(t)){var n=-t,r=-t+Ni.nw;$i.each((function(){var t=i(this).data(),a=t.eq,s=function(){return{h:Vn,w:t.w}},l=s(),c=Sn[a]||{},u=c.thumbfit||o.thumbfit,d=c.thumbposition||o.thumbposition;l.w=t.w,t.l+t.w<n||t.l>r||ye(t.$img,l,u,d)||e&&Bt([a],"navThumb",s,u,d)}))}}function xe(t,e,n){if(!xe[n]){var r="nav"===n&&Bn,a=0;e.append(t.filter((function(){for(var t,e=i(this),n=e.data(),o=0,r=Sn.length;o<r;o++)if(n.data===Sn[o]){t=!0,n.eq=o;break}return t||e.remove()&&!1})).sort((function(t,e){return i(t).data().eq-i(e).data().eq})).each((function(){if(r){var t=i(this),e=t.data(),n=Math.round(Vn*e.data.thumbratio)||Qn;e.l=a,e.w=n,t.css({width:n}),a+=n+o.thumbmargin}}))),xe[n]=!0}}function ke(t){return t-Ui>Ni.w/3}function Se(t){return!(Rn||Oi+t&&Oi-Tn+t||Dn)}function Ae(){var t=Se(0),e=Se(1);wi.toggleClass(At,t).attr(V(t)),xi.toggleClass(At,e).attr(V(e))}function je(){Fi.ok&&(Fi.prevent={"<":Se(0),">":Se(1)})}function Me(t){var e,n,i=t.data();return Bn?(e=i.l,n=i.w):(e=t.position().left,n=t.width()),{c:e+n/2,min:-e+10*o.thumbmargin,max:-e+Ni.w-n-10*o.thumbmargin}}function Ie(t){var e=An[li].data();Z(Di,{time:1.2*t,pos:e.l,width:e.w-2*o.thumbborderwidth})}function Ne(t){var e=Sn[t.guessIndex][li];if(e){var n=Ri.min!==Ri.max,i=t.minMax||n&&Me(An[li]),o=n&&(t.keep&&Ne.l?Ne.l:s((t.coo||Ni.nw/2)-Me(e).c,i.min,i.max)),r=n&&s(o,Ri.min,Ri.max),a=1.1*t.time;Z(Ti,{time:a,pos:r||0,onEnd:function(){we(r,!0)}}),hn(Si,N(r,Ri.min,Ri.max)),Ne.l=o}}function Le(){Be(li),Bi[li].push(An[li].addClass(Vt))}function Be(t){for(var e=Bi[t];e.length;)e.shift().removeClass(Vt)}function ze(t){var e=Hi[t];i.each(jn,(function(t,n){delete e[k(n)]})),i.each(e,(function(t,n){delete e[t],n.detach()}))}function Ve(t){Mn=In=Oi;var e=An[Ze];e&&(Be(Ze),Bi[Ze].push(e.addClass(Vt)),t||ci.show.onEnd(!0),w(_i,0,!0),ze(Ze),_e(jn),J(),et())}function Ye(t,e){t&&i.each(e,(function(e,n){n&&i.extend(n,{width:t.width||n.width,height:t.height,minwidth:t.minwidth,maxwidth:t.maxwidth,minheight:t.minheight,maxheight:t.maxheight,ratio:z(t.ratio)})}))}function on(e,n){t.trigger(lt+":"+e,[ci,n])}function an(){clearTimeout(sn.t),ai=1,o.stopautoplayontouch?ci.stopAutoplay():ii=!0}function sn(){ai&&(o.stopautoplayontouch||(cn(),un()),sn.t=setTimeout((function(){ai=0}),Qe+We))}function cn(){ii=!(!Dn&&!oi)}function un(){if(clearTimeout(un.t),M.stop(un.w),o.autoplay&&!ii){ci.autoplay||(ci.autoplay=!0,on("startautoplay"));var t=Oi,e=An[Ze].data();un.w=M((function(){return e.state||t!==Oi}),(function(){un.t=setTimeout((function(){if(!ii&&t===Oi){var e=Ln,n=Sn[e][Ze].data();un.w=M((function(){return n.state||e!==Ln}),(function(){ii||e!==Ln||ci.show(Rn?K(!Kn):Ln)}))}}),o.autoplay)}))}else ci.autoplay&&(ci.autoplay=!1,on("stopautoplay"))}function dn(){ci.fullScreen&&(ci.fullScreen=!1,qe&&be.cancel(hi),De.removeClass(ct),$e.removeClass(ct),t.removeClass(Xt).insertAfter(gi),Ni=i.extend({},ri),pn(Dn,!0,!0),yn("x",!1),ci.resize(),Bt(jn,"stage"),H(Pe,ei,ti),on("fullscreenexit"))}function hn(t,e){Xn&&(t.removeClass(Wt+" "+Qt),e&&!Dn&&t.addClass(e.replace(/^|\s/g," "+zt+"--")))}function pn(t,e,n){e&&(vi.removeClass(pt),Dn=!1,f()),t&&t!==Dn&&(t.remove(),on("unloadvideo")),n&&(cn(),un())}function fn(t){vi.toggleClass(gt,t)}function mn(t){if(!Li.flow){var e=t?t.pageX:mn.x,n=e&&!Se(ke(e))&&o.click;mn.p!==n&&yi.toggleClass($t,n)&&(mn.p=n,mn.x=e)}}function gn(t){clearTimeout(gn.t),o.clicktransition&&o.clicktransition!==o.transition?setTimeout((function(){var e=o.transition;ci.setOptions({transition:o.clicktransition}),Yn=e,gn.t=setTimeout((function(){ci.show(t)}),10)}),0):ci.show(t)}function vn(t,e){var n=t.target;i(n).hasClass(de)?ci.playVideo():n===ji?ci.toggleFullScreen():Dn?n===Ii&&pn(Dn,!0,!0):e?fn():o.click&&gn({index:t.shiftKey||K(ke(t._x)),slow:t.altKey,user:!0})}function yn(t,e){Li[t]=Ri[t]=e}function _n(t){gn({index:i(this).data().eq,slow:t.altKey,user:!0,coo:t._x-Si.offset().left})}function bn(t){gn({index:ki.index(this)?">":"<",slow:t.altKey,user:!0})}function wn(t){Y(t,(function(){setTimeout((function(){H(yi)}),0),fn(!1)}))}function xn(){if(h(),b(),!xn.i){xn.i=!0;var t=o.startindex;(t||o.hash&&n.hash)&&(Fn=L(t||n.hash.replace(/^#/,""),Sn,0===ci.index||t,t)),Oi=Mn=In=Pn=Fn=S(Fn)||0}if(Tn){if(kn())return;Dn&&pn(Dn,!0),jn=[],ze(Ze),xn.ok=!0,ci.show({index:Oi,time:0}),ci.resize()}else ci.destroy()}function kn(){if(!kn.f===Kn)return kn.f=Kn,Oi=Tn-1-Oi,ci.reverse(),!0}function Cn(){Cn.ok||(Cn.ok=!0,on("ready"))}$e=i("html"),De=i("body")
;var Sn,Tn,En,$n,Dn,An,jn,Mn,In,Pn,On,Nn,Ln,Fn,Rn,qn,Bn,Hn,Un,zn,Wn,Qn,Vn,Gn,Yn,Xn,Kn,Jn,Zn,ti,ei,ni,ii,oi,ri,ai,si,li,ci=this,ui=i.now(),di=lt+ui,hi=t[0],pi=1,fi=t.data(),mi=i("<style></style>"),gi=i(R(Yt)),vi=i(R(ut)),yi=i(R(kt)).appendTo(vi),_i=(yi[0],i(R(Tt)).appendTo(yi)),bi=i(),wi=i(R(Dt+" "+jt+ge)),xi=i(R(Dt+" "+Mt+ge)),ki=wi.add(xi).appendTo(yi),Ci=i(R(Pt)),Si=i(R(It)).appendTo(Ci),Ti=i(R(Ot)).appendTo(Si),Ei=i(),$i=i(),Di=(_i.data(),Ti.data(),i(R(le)).appendTo(Ti)),Ai=i(R(Kt+ge)),ji=Ai[0],Mi=i(R(de)),Ii=i(R(he)).appendTo(yi)[0],Pi=i(R(me)),Oi=!1,Ni={},Li={},Fi={},Ri={},qi={},Bi={},Hi={},Ui=0,zi=[];vi[Ze]=i(R(Ct)),vi[en]=i(R(Ft+" "+qt+ge,R(se))),vi[tn]=i(R(Ft+" "+Rt+ge,R(ae))),Bi[Ze]=[],Bi[en]=[],Bi[tn]=[],Hi[Ze]={},vi.addClass(Fe?ht:dt).toggleClass(gt,!o.controlsonstart),fi.fotorama=this,ci.startAutoplay=function(t){return ci.autoplay||(ii=oi=!1,_(t||o.autoplay),un()),this},ci.stopAutoplay=function(){return ci.autoplay&&(ii=oi=!0,un()),this},ci.show=function(t){var e;"object"!=typeof t?(e=t,t={}):e=t.index,e=">"===e?In+1:"<"===e?In-1:"<<"===e?0:">>"===e?Tn-1:e,e=void 0===(e=isNaN(e)?L(e,Sn,!0):e)?Oi||0:e,ci.activeIndex=Oi=S(e),On=A(Oi),Nn=Q(Oi),Ln=k(Oi+(Kn?-1:1)),jn=[Oi,On,Nn],In=Rn?e:Oi;var n=Math.abs(Pn-In),i=x(t.time,(function(){return Math.min(Gn*(1+(n-1)/12),2*Gn)})),r=t.overPos;t.slow&&(i*=10);var a=An;ci.activeFrame=An=Sn[Oi];var l=a===An&&!t.user;pn(Dn,An.i!==Sn[k(Mn)].i),ve(jn,"stage"),_e(He?[In]:[In,A(In),Q(In)]),yn("go",!0),l||on("show",{user:t.user,time:i}),ii=!0;var c=ci.show.onEnd=function(e){if(!c.ok){if(c.ok=!0,e||Ve(!0),l||on("showend",{user:t.user}),!e&&Yn&&Yn!==o.transition)return ci.setOptions({transition:Yn}),void(Yn=!1);ie(),Bt(jn,"stage"),yn("go",!1),je(),mn(),cn(),un()}};Wn?tt(An[Ze],Oi!==Pn?Sn[Pn][Ze]:null,bi,{time:i,method:o.transition,onEnd:c},zi):Z(_i,{pos:-v(In,Ni.w,o.margin,Mn),overPos:r,time:i,onEnd:c});if(Ae(),qn){Le();var u=C(Oi+s(In-Pn,-1,1));Ne({time:i,coo:u!==Oi&&t.coo,guessIndex:void 0!==t.coo?u:Oi,keep:l}),Bn&&Ie(i)}return ni=void 0!==Pn&&Pn!==Oi,Pn=Oi,o.hash&&ni&&!ci.eq&&I(An.id||Oi+1),this},ci.requestFullScreen=function(){return Un&&!ci.fullScreen&&(ti=Pe.scrollTop(),ei=Pe.scrollLeft(),H(Pe),yn("x",!0),ri=i.extend({},Ni),t.addClass(Xt).appendTo(De.addClass(ct)),$e.addClass(ct),pn(Dn,!0,!0),ci.fullScreen=!0,zn&&be.request(hi),ci.resize(),Bt(jn,"stage"),ie(),on("fullscreenenter")),this},ci.cancelFullScreen=function(){return zn&&be.is()?be.cancel(e):dn(),this},ci.toggleFullScreen=function(){return ci[(ci.fullScreen?"cancel":"request")+"FullScreen"]()},W(e,be.event,(function(){!Sn||be.is()||Dn||dn()})),ci.resize=function(t){if(!Sn)return this;var e=arguments[1]||0,n=arguments[2];Ye(ci.fullScreen?{width:"100%",maxwidth:null,minwidth:null,height:"100%",maxheight:null,minheight:null}:U(t),[Ni,n||ci.fullScreen||o]);var i=Ni.width,r=Ni.height,a=Ni.ratio,l=Pe.height()-(qn?Si.height():0);return g(i)&&(vi.addClass(bt).css({width:i,minWidth:Ni.minwidth||0,maxWidth:Ni.maxwidth||rn}),i=Ni.W=Ni.w=vi.width(),Ni.nw=qn&&m(o.navwidth,i)||i,o.glimpse&&(Ni.w-=Math.round(2*(m(o.glimpse,i)||0))),_i.css({width:Ni.w,marginLeft:(Ni.W-Ni.w)/2}),(r=(r=m(r,l))||a&&i/a)&&(i=Math.round(i),r=Ni.h=Math.round(s(r,m(Ni.minheight,l),m(Ni.maxheight,l))),yi.stop().animate({width:i,height:r},e,(function(){vi.removeClass(bt)})),Ve(),qn&&(Si.stop().animate({width:Ni.nw},e),Ne({guessIndex:Oi,time:e,keep:!0}),Bn&&xe.nav&&Ie(e)),Zn=n||!0,Cn())),Ui=yi.offset().left,this},ci.setOptions=function(t){return i.extend(o,t),xn(),this},ci.shuffle=function(){return Sn&&q(Sn)&&xn(),this},ci.destroy=function(){return ci.cancelFullScreen(),ci.stopAutoplay(),Sn=ci.data=null,c(),jn=[],ze(Ze),xn.ok=!1,this},ci.playVideo=function(){var t=An,e=t.video,n=Oi;return"object"==typeof e&&t.videoReady&&(zn&&ci.fullScreen&&ci.cancelFullScreen(),M((function(){return!be.is()||n!==Oi}),(function(){n===Oi&&(t.$video=t.$video||i(i.Fotorama.jst.video(e)),t.$video.appendTo(t[Ze]),vi.addClass(pt),Dn=t.$video,f(),ki.blur(),Ai.blur(),on("loadvideo"))}))),this},ci.stopVideo=function(){return pn(Dn,!0,!0),this},yi.on("mousemove",mn),Li=it(_i,{onStart:an,onMove:function(t,e){hn(yi,e.edge)},onTouchEnd:sn,onEnd:function(t){hn(yi);var e=(Ue&&!si||t.touch)&&o.arrows&&"always"!==o.arrows;if(t.moved||e&&t.pos!==t.newPos&&!t.control){var n=y(t.newPos,Ni.w,o.margin,Mn);ci.show({index:n,time:Wn?Gn:t.time,overPos:t.overPos,user:!0})}else t.aborted||t.control||vn(t.startEvent,e)},timeLow:1,timeHigh:1,friction:2,select:"."+Gt+", ."+Gt+" *",$wrap:yi}),Ri=it(Ti,{onStart:an,onMove:function(t,e){hn(Si,e.edge)},onTouchEnd:sn,onEnd:function(t){function e(){Ne.l=t.newPos,cn(),un(),we(t.newPos,!0)}if(t.moved)t.pos!==t.newPos?(ii=!0,Z(Ti,{time:t.time,pos:t.newPos,overPos:t.overPos,onEnd:e}),we(t.newPos),Xn&&hn(Si,N(t.newPos,Ri.min,Ri.max))):e();else{var n=t.$target.closest("."+Ft,Ti)[0];n&&_n.call(n,t.startEvent)}},timeLow:.5,timeHigh:2,friction:5,$wrap:Si}),Fi=ot(yi,{shift:!0,onEnd:function(t,e){an(),sn(),ci.show({index:e,slow:t.altKey})}}),qi=ot(Si,{onEnd:function(t,e){an(),sn();var n=w(Ti)+.25*e;Ti.css(u(s(n,Ri.min,Ri.max))),Xn&&hn(Si,N(n,Ri.min,Ri.max)),qi.prevent={"<":n>=Ri.max,">":n<=Ri.min},clearTimeout(qi.t),qi.t=setTimeout((function(){Ne.l=n,we(n,!0)}),We),we(n)}}),vi.hover((function(){setTimeout((function(){ai||fn(!(si=!0))}),0)}),(function(){si&&fn(!(si=!1))})),F(ki,(function(t){X(t),bn.call(this,t)}),{onStart:function(){an(),Li.control=!0},onTouchEnd:sn}),ki.each((function(){G(this,(function(t){bn.call(this,t)})),wn(this)})),G(ji,ci.toggleFullScreen),wn(ji),i.each("load push pop shift unshift reverse sort splice".split(" "),(function(t,e){ci[e]=function(){return Sn=Sn||[],"load"!==e?Array.prototype[e].apply(Sn,arguments):arguments[0]&&"object"==typeof arguments[0]&&arguments[0].length&&(Sn=B(arguments[0])),xn(),ci}})),xn()},i.fn.fotorama=function(e){return this.each((function(){var n=this,o=i(this),r=o.data(),a=r.fotorama;a?a.setOptions(e,!0):M((function(){return!A(n)}),(function(){r.urtext=o.html(),new i.Fotorama(o,i.extend({},sn,t.fotoramaDefaults,e,r))}))}))},i.Fotorama.instances=[],i.Fotorama.cache={},i.Fotorama.measures={},(i=i||{}).Fotorama=i.Fotorama||{},i.Fotorama.jst=i.Fotorama.jst||{},i.Fotorama.jst.style=function(t){var e,n="";ye.escape;return n+=".fotorama"+(null==(e=t.s)?"":e)+" .fotorama__nav--thumbs .fotorama__nav__frame{\npadding:"+(null==(e=t.m)?"":e)+"px;\nheight:"+(null==(e=t.h)?"":e)+"px}\n.fotorama"+(null==(e=t.s)?"":e)+" .fotorama__thumb-border{\nheight:"+(null==(e=t.h-t.b*(t.q?0:2))?"":e)+"px;\nborder-width:"+(null==(e=t.b)?"":e)+"px;\nmargin-top:"+(null==(e=t.m)?"":e)+"px}"},i.Fotorama.jst.video=function(t){function e(){n+=i.call(arguments,"")}var n="",i=(ye.escape,Array.prototype.join);return n+='<div class="fotorama__video"><iframe src="',e(("youtube"==t.type?t.p+"youtube.com/embed/"+t.id+"?autoplay=1":"vimeo"==t.type?t.p+"player.vimeo.com/video/"+t.id+"?autoplay=1&badge=0":t.id)+(t.s&&"custom"!=t.type?"&"+t.s:"")),n+='" frameborder="0" allowfullscreen></iframe></div>\n'},i((function(){i("."+lt+':not([data-auto="false"])').fotorama()}))}(window,document,location,"undefined"!=typeof jQuery&&jQuery),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}((function(t){var e=-1,n=-1,i=function(t){return parseFloat(t)||0},o=function(e){var n=1,o=t(e),r=null,a=[];return o.each((function(){var e=t(this),o=e.offset().top-i(e.css("margin-top")),s=a.length>0?a[a.length-1]:null;null===s?a.push(e):Math.floor(Math.abs(r-o))<=n?a[a.length-1]=s.add(e):a.push(e),r=o})),a},r=function(e){var n={byRow:!0,property:"height",target:null,remove:!1};return"object"==typeof e?t.extend(n,e):("boolean"==typeof e?n.byRow=e:"remove"===e&&(n.remove=!0),n)},a=t.fn.matchHeight=function(e){var n=r(e);if(n.remove){var i=this;return this.css(n.property,""),t.each(a._groups,(function(t,e){e.elements=e.elements.not(i)})),this}return this.length<=1&&!n.target||(a._groups.push({elements:this,options:n}),a._apply(this,n)),this};a.version="0.7.0",a._groups=[],a._throttle=80,a._maintainScroll=!1,a._beforeUpdate=null,a._afterUpdate=null,a._rows=o,a._parse=i,a._parseOptions=r,a._apply=function(e,n){var s=r(n),l=t(e),c=[l],u=t(window).scrollTop(),d=t("html").outerHeight(!0),h=l.parents().filter(":hidden");return h.each((function(){var e=t(this);e.data("style-cache",e.attr("style"))})),h.css("display","block"),s.byRow&&!s.target&&(l.each((function(){var e=t(this),n=e.css("display");"inline-block"!==n&&"flex"!==n&&"inline-flex"!==n&&(n="block"),e.data("style-cache",e.attr("style")),e.css({display:n,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})})),c=o(l),l.each((function(){var e=t(this);e.attr("style",e.data("style-cache")||"")}))),t.each(c,(function(e,n){var o=t(n),r=0;if(s.target)r=s.target.outerHeight(!1);else{if(s.byRow&&o.length<=1)return void o.css(s.property,"");o.each((function(){var e=t(this),n=e.attr("style"),i=e.css("display");"inline-block"!==i&&"flex"!==i&&"inline-flex"!==i&&(i="block");var o={display:i};o[s.property]="",e.css(o),e.outerHeight(!1)>r&&(r=e.outerHeight(!1)),n?e.attr("style",n):e.css("display","")}))}o.each((function(){var e=t(this),n=0;s.target&&e.is(s.target)||("border-box"!==e.css("box-sizing")&&(n+=i(e.css("border-top-width"))+i(e.css("border-bottom-width")),n+=i(e.css("padding-top"))+i(e.css("padding-bottom"))),e.css(s.property,r-n+"px"))}))})),h.each((function(){var e=t(this);e.attr("style",e.data("style-cache")||null)})),a._maintainScroll&&t(window).scrollTop(u/d*t("html").outerHeight(!0)),this},a._applyDataApi=function(){var e={};t("[data-match-height], [data-mh]").each((function(){var n=t(this),i=n.attr("data-mh")||n.attr("data-match-height");e[i]=i in e?e[i].add(n):n})),t.each(e,(function(){this.matchHeight(!0)}))};var s=function(e){a._beforeUpdate&&a._beforeUpdate(e,a._groups),t.each(a._groups,(function(){a._apply(this.elements,this.options)})),a._afterUpdate&&a._afterUpdate(e,a._groups)};a._update=function(i,o){if(o&&"resize"===o.type){var r=t(window).width();if(r===e)return;e=r}i?-1===n&&(n=setTimeout((function(){s(o),n=-1}),a._throttle)):s(o)},t(a._applyDataApi),t(window).bind("load",(function(t){a._update(!1,t)})),t(window).bind("resize orientationchange",(function(t){a._update(!0,t)}))})),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}((function(t){var e=function(){if(t&&t.fn&&t.fn.select2&&t.fn.select2.amd)var e=t.fn.select2.amd;return function(){var t,n,i;e&&e.requirejs||(e?n=e:e={},function(e){function o(t,e){return b.call(t,e)}function r(t,e){var n,i,o,r,a,s,l,c,u,d,h,p=e&&e.split("/"),f=y.map,m=f&&f["*"]||{};if(t&&"."===t.charAt(0))if(e){for(a=(t=t.split("/")).length-1,y.nodeIdCompat&&x.test(t[a])&&(t[a]=t[a].replace(x,"")),t=p.slice(0,p.length-1).concat(t),u=0;u<t.length;u+=1)if("."===(h=t[u]))t.splice(u,1),u-=1;else if(".."===h){if(1===u&&(".."===t[2]||".."===t[0]))break;u>0&&(t.splice(u-1,2),u-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((p||m)&&f){for(u=(n=t.split("/")).length;u>0;u-=1){if(i=n.slice(0,u).join("/"),p)for(d=p.length;d>0;d-=1)if((o=f[p.slice(0,d).join("/")])&&(o=o[i])){r=o,s=u;break}if(r)break;!l&&m&&m[i]&&(l=m[i],c=u)}!r&&l&&(r=l,s=c),r&&(n.splice(0,s,r),t=n.join("/"))}return t}function a(t,n){return function(){var i=w.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),p.apply(e,i.concat([t,n]))}}function s(t){return function(e){return r(e,t)}}function l(t){return function(e){g[t]=e}}function c(t){if(o(v,t)){var n=v[t];delete v[t],_[t]=!0,h.apply(e,n)}if(!o(g,t)&&!o(_,t))throw new Error("No "+t);return g[t]}function u(t){var e,n=t?t.indexOf("!"):-1;return n>-1&&(e=t.substring(0,n),t=t.substring(n+1,t.length)),[e,t]}function d(t){return function(){return y&&y.config&&y.config[t]||{}}}var h,p,f,m,g={},v={},y={},_={},b=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;f=function(t,e){var n,i=u(t),o=i[0];return t=i[1],o&&(n=c(o=r(o,e))),o?t=n&&n.normalize?n.normalize(t,s(e)):r(t,e):(o=(i=u(t=r(t,e)))[0],t=i[1],o&&(n=c(o))),{f:o?o+"!"+t:t,n:t,pr:o,p:n}},m={require:function(t){return a(t)},exports:function(t){var e=g[t];return void 0!==e?e:g[t]={}},module:function(t){return{id:t,uri:"",exports:g[t],config:d(t)}}},h=function(t,n,i,r){var s,u,d,h,p,y,b=[],w=typeof i;if(r=r||t,"undefined"===w||"function"===w){for(n=!n.length&&i.length?["require","exports","module"]:n,p=0;p<n.length;p+=1)if("require"===(u=(h=f(n[p],r)).f))b[p]=m.require(t);else if("exports"===u)b[p]=m.exports(t),y=!0;else if("module"===u)s=b[p]=m.module(t);else if(o(g,u)||o(v,u)||o(_,u))b[p]=c(u);else{if(!h.p)throw new Error(t+" missing "+u);h.p.load(h.n,a(r,!0),l(u),{}),b[p]=g[u]}d=i?i.apply(g[t],b):void 0,t&&(s&&s.exports!==e&&s.exports!==g[t]?g[t]=s.exports:d===e&&y||(g[t]=d))}else t&&(g[t]=i)},t=n=p=function(t,n,i,o,r){if("string"==typeof t)return m[t]?m[t](n):c(f(t,n).f);if(!t.splice){if((y=t).deps&&p(y.deps,y.callback),!n)return;n.splice?(t=n,n=i,i=null):t=e}return n=n||function(){},"function"==typeof i&&(i=o,o=r),o?h(e,t,n,i):setTimeout((function(){h(e,t,n,i)}),4),p},p.config=function(t){return p(t)},t._defined=g,(i=function(t,e,n){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(n=e,e=[]),o(g,t)||o(v,t)||(v[t]=[t,e,n])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=n,e.define=i)}(),e.define("almond",(function(){})),e.define("jquery",[],(function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e})),e.define("select2/utils",["jquery"],(function(t){function e(t){var e=t.prototype,n=[];for(var i in e){"function"==typeof e[i]&&("constructor"!==i&&n.push(i))}return n}var n={Extend:function(t,e){function n(){this.constructor=t}var i={}.hasOwnProperty;for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},Decorate:function(t,n){function i(){var e=Array.prototype.unshift,i=n.prototype.constructor.length,o=t.prototype.constructor;i>0&&(e.call(arguments,t.prototype.constructor),o=n.prototype.constructor),o.apply(this,arguments)}function o(){this.constructor=i}var r=e(n),a=e(t);n.displayName=t.displayName,i.prototype=new o;for(var s=0;s<a.length;s++){var l=a[s];i.prototype[l]=t.prototype[l]}for(var c=function(t){var e=function(){};t in i.prototype&&(e=i.prototype[t]);var o=n.prototype[t];return function(){return Array.prototype.unshift.call(arguments,e),o.apply(this,arguments)}},u=0;u<r.length;u++){var d=r[u];i.prototype[d]=c(d)}return i}},i=function(){this.listeners={}};return i.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},i.prototype.trigger=function(t){var e=Array.prototype.slice,n=e.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=t,t in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(t,e){for(var n=0,i=t.length;n<i;n++)t[n].apply(this,e)},n.Observable=i,n.generateChars=function(t){for(var e="",n=0;n<t;n++){e+=Math.floor(36*Math.random()).toString(36)}return e},n.bind=function(t,e){return function(){t.apply(e,arguments)}},n._convertData=function(t){for(var e in t){var n=e.split("-"),i=t;if(1!==n.length){for(var o=0;o<n.length;o++){var r=n[o];(r=r.substring(0,1).toLowerCase()+r.substring(1))in i||(i[r]={}),o==n.length-1&&(i[r]=t[e]),i=i[r]}delete t[e]}}return t},n.hasScroll=function(e,n){var i=t(n),o=n.style.overflowX,r=n.style.overflowY;return(o!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===o||"scroll"===r||(i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth))},n.escapeMarkup=function(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,(function(t){return e[t]}))},n.appendMany=function(e,n){if("1.7"===t.fn.jquery.substr(0,3)){var i=t();t.map(n,(function(t){i=i.add(t)})),n=i}e.append(n)},n})),e.define("select2/results",["jquery","./utils"],(function(t,e){function n(t,e,i){this.$element=t,this.data=i,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e,e},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(e){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=t('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),o=this.options.get("translations").get(e.message);i.append(n(o(e.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(t){this.hideLoading();var e=[];if(null!=t.results&&0!==t.results.length){t.results=this.sort(t.results);for(var n=0;n<t.results.length;n++){var i=t.results[n],o=this.option(i);e.push(o)}this.$results.append(e)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(t,e){e.find(".select2-results").append(t)},n.prototype.sort=function(t){return this.options.get("sorter")(t)},n.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2-results__option[aria-selected]"),e=t.filter("[aria-selected=true]");e.length>0?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var e=this;this.data.current((function(n){var i=t.map(n,(function(t){return t.id.toString()}));e.$results.find(".select2-results__option[aria-selected]").each((function(){var e=t(this),n=t.data(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&t.inArray(o,i)>-1?e.attr("aria-selected","true"):e.attr("aria-selected","false")}))}))},n.prototype.showLoading=function(t){this.hideLoading();var e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(t)},n=this.option(e);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(e){var n=document.createElement("li");n.className="select2-results__option";var i={role:"treeitem","aria-selected":"false"};for(var o in e.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==e.id&&delete i["aria-selected"],null!=e._resultId&&(n.id=e._resultId),e.title&&(n.title=e.title),e.children&&(i.role="group",i["aria-label"]=e.text,delete i["aria-selected"]),i){var r=i[o];n.setAttribute(o,r)}if(e.children){var a=t(n),s=document.createElement("strong");s.className="select2-results__group";t(s);this.template(e,s);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var h=t("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});h.append(l),a.append(s),a.append(h)}else this.template(e,n);return t.data(n,"data",e),n},n.prototype.bind=function(e){var n=this,i=e.id+"-results";this.$results.attr("id",i),e.on("results:all",(function(t){n.clear(),n.append(t.data),e.isOpen()&&(n.setClasses(),n.highlightFirstItem())})),e.on("results:append",(function(t){n.append(t.data),e.isOpen()&&n.setClasses()})),e.on("query",(function(t){n.hideMessages(),n.showLoading(t)})),e.on("select",(function(){e.isOpen()&&(n.setClasses(),n.highlightFirstItem())})),e.on("unselect",(function(){e.isOpen()&&(n.setClasses(),n.highlightFirstItem())})),e.on("open",(function(){n.$results.attr("aria-expanded","true"),n.$results.attr("aria-hidden","false"),n.setClasses(),n.ensureHighlightVisible()})),e.on("close",(function(){n.$results.attr("aria-expanded","false"),n.$results.attr("aria-hidden","true"),n.$results.removeAttr("aria-activedescendant")})),e.on("results:toggle",(function(){var t=n.getHighlightedResults();0!==t.length&&t.trigger("mouseup")})),e.on("results:select",(function(){var t=n.getHighlightedResults();if(0!==t.length){var e=t.data("data");"true"==t.attr("aria-selected")?n.trigger("close",{}):n.trigger("select",{data:e})}})),e.on("results:previous",(function(){var t=n.getHighlightedResults(),e=n.$results.find("[aria-selected]"),i=e.index(t);if(0!==i){var o=i-1;0===t.length&&(o=0);var r=e.eq(o);r.trigger("mouseenter");var a=n.$results.offset().top,s=r.offset().top,l=n.$results.scrollTop()+(s-a);0===o?n.$results.scrollTop(0):s-a<0&&n.$results.scrollTop(l)}})),e.on("results:next",(function(){var t=n.getHighlightedResults(),e=n.$results.find("[aria-selected]"),i=e.index(t)+1;if(!(i>=e.length)){var o=e.eq(i);o.trigger("mouseenter");var r=n.$results.offset().top+n.$results.outerHeight(!1),a=o.offset().top+o.outerHeight(!1),s=n.$results.scrollTop()+a-r;0===i?n.$results.scrollTop(0):a>r&&n.$results.scrollTop(s)}})),e.on("results:focus",(function(t){t.element.addClass("select2-results__option--highlighted")})),e.on("results:message",(function(t){n.displayMessage(t)})),t.fn.mousewheel&&this.$results.on("mousewheel",(function(t){var e=n.$results.scrollTop(),i=n.$results.get(0).scrollHeight-e+t.deltaY,o=t.deltaY>0&&e-t.deltaY<=0,r=t.deltaY<0&&i<=n.$results.height();o?(n.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):r&&(n.$results.scrollTop(n.$results.get(0).scrollHeight-n.$results.height()),t.preventDefault(),t.stopPropagation())})),this.$results.on("mouseup",".select2-results__option[aria-selected]",(function(e){var i=t(this),o=i.data("data");"true"!==i.attr("aria-selected")?n.trigger("select",{originalEvent:e,data:o}):n.options.get("multiple")?n.trigger("unselect",{originalEvent:e,data:o}):n.trigger("close",{})})),this.$results.on("mouseenter",".select2-results__option[aria-selected]",(function(){var e=t(this).data("data");n.getHighlightedResults().removeClass("select2-results__option--highlighted"),n.trigger("results:focus",{data:e,element:t(this)})}))},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]").index(t),n=this.$results.offset().top,i=t.offset().top,o=this.$results.scrollTop()+(i-n),r=i-n;o-=2*t.outerHeight(!1),e<=2?this.$results.scrollTop(0):(r>this.$results.outerHeight()||r<0)&&this.$results.scrollTop(o)}},n.prototype.template=function(e,n){var i=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),r=i(e,n);null==r?n.style.display="none":"string"==typeof r?n.innerHTML=o(r):t(n).append(r)},n})),e.define("select2/keys",[],(function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),e.define("select2/selection/base",["jquery","../utils","../keys"],(function(t,e,n){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e,e},i.prototype.bind=function(t){var e=this,i=(t.id,t.id+"-results");this.container=t,this.$selection.on("focus",(function(t){e.trigger("focus",t)})),this.$selection.on("blur",(function(t){e._handleBlur(t)})),this.$selection.on("keydown",(function(t){e.trigger("keypress",t),t.which===n.SPACE&&t.preventDefault()})),t.on("results:focus",(function(t){e.$selection.attr("aria-activedescendant",t.data._resultId)})),t.on("selection:update",(function(t){e.update(t.data)})),t.on("open",(function(){e.$selection.attr("aria-expanded","true"),e.$selection.attr("aria-owns",i),e._attachCloseHandler(t)})),t.on("close",(function(){e.$selection.attr("aria-expanded","false"),e.$selection.removeAttr("aria-activedescendant"),e.$selection.removeAttr("aria-owns"),e.$selection.focus(),e._detachCloseHandler(t)})),t.on("enable",(function(){e.$selection.attr("tabindex",e._tabindex)})),t.on("disable",(function(){e.$selection.attr("tabindex","-1")}))},i.prototype._handleBlur=function(e){var n=this;window.setTimeout((function(){document.activeElement==n.$selection[0]||t.contains(n.$selection[0],document.activeElement)||n.trigger("blur",e)}),1)},i.prototype._attachCloseHandler=function(e){t(document.body).on("mousedown.select2."+e.id,(function(e){var n=t(e.target).closest(".select2");t(".select2.select2-container--open").each((function(){var e=t(this);this!=n[0]&&e.data("element").select2("close")}))}))},i.prototype._detachCloseHandler=function(e){t(document.body).off("mousedown.select2."+e.id)},i.prototype.position=function(t,e){e.find(".selection").append(t)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(){throw new Error("The `update` method must be defined in child classes.")},i})),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(t,e,n){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,e),i.prototype.render=function(){var t=i.__super__.render.call(this);return t.addClass("select2-selection--single"),t.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var o=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",o),this.$selection.attr("aria-labelledby",o),this.$selection.on("mousedown",(function(t){1===t.which&&n.trigger("toggle",{originalEvent:t})})),this.$selection.on("focus",(function(){})),this.$selection.on("blur",(function(){})),t.on("focus",(function(){t.isOpen()||n.$selection.focus()})),t.on("selection:update",(function(t){n.update(t.data)}))},i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},i.prototype.display=function(t,e){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(t,e))},i.prototype.selectionContainer=function(){return t("<span></span>")},i.prototype.update=function(t){if(0!==t.length){var e=t[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(e,n);n.empty().append(i),n.prop("title",e.title||e.text)}else this.clear()},i})),e.define("select2/selection/multiple",["jquery","./base","../utils"],(function(t,e,n){function i(t,e){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,e),i.prototype.render=function(){var t=i.__super__.render.call(this);return t.addClass("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},i.prototype.bind=function(e,n){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",(function(t){o.trigger("toggle",{originalEvent:t})})),this.$selection.on("click",".select2-selection__choice__remove",(function(e){if(!o.options.get("disabled")){var n=t(this).parent().data("data");o.trigger("unselect",{originalEvent:e,data:n})}}))},i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},i.prototype.display=function(t,e){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(t,e))},i.prototype.selectionContainer=function(){return t('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},i.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],i=0;i<t.length;i++){var o=t[i],r=this.selectionContainer(),a=this.display(o,r);r.append(a),r.prop("title",o.title||o.text),r.data("data",o),e.push(r)}var s=this.$selection.find(".select2-selection__rendered");n.appendMany(s,e)}},i})),e.define("select2/selection/placeholder",["../utils"],(function(){function t(t,e,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n)}return t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.createPlaceholder=function(t,e){var n=this.selectionContainer();return n.html(this.display(e)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(t,e){var n=1==e.length&&e[0].id!=this.placeholder.id;if(e.length>1||n)return t.call(this,e);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t})),e.define("select2/selection/allowClear",["jquery","../keys"],(function(t,e){function n(){}return n.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",(function(t){i._handleClear(t)})),e.on("keypress",(function(t){i._handleKeyboardClear(t,e)}))},n.prototype._handleClear=function(t,e){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){e.stopPropagation();for(var i=n.data("data"),o=0;o<i.length;o++){var r={data:i[o]};if(this.trigger("unselect",r),r.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},n.prototype._handleKeyboardClear=function(t,n,i){i.isOpen()||n.which!=e.DELETE&&n.which!=e.BACKSPACE||this._handleClear(n)},n.prototype.update=function(e,n){if(e.call(this,n),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var i=t('<span class="select2-selection__clear">&times;</span>');i.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(i)}},n})),e.define("select2/selection/search",["jquery","../utils","../keys"],(function(t,e,n){function i(t,e,n){t.call(this,e,n)}return i.prototype.render=function(e){var n=t('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=e.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(t,e,i){var o=this;t.call(this,e,i),e.on("open",(function(){o.$search.trigger("focus")})),e.on("close",(function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")})),e.on("enable",(function(){o.$search.prop("disabled",!1),o._transferTabIndex()})),e.on("disable",(function(){o.$search.prop("disabled",!0)})),e.on("focus",(function(){o.$search.trigger("focus")})),e.on("results:focus",(function(t){o.$search.attr("aria-activedescendant",t.id)})),this.$selection.on("focusin",".select2-search--inline",(function(t){o.trigger("focus",t)})),this.$selection.on("focusout",".select2-search--inline",(function(t){o._handleBlur(t)})),this.$selection.on("keydown",".select2-search--inline",(function(t){if(t.stopPropagation(),o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented(),t.which===n.BACKSPACE&&""===o.$search.val()){var e=o.$searchContainer.prev(".select2-selection__choice");if(e.length>0){var i=e.data("data");o.searchRemoveChoice(i),t.preventDefault()}}}));var r=document.documentMode,a=r&&r<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(){a?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(t){if(a&&"input"===t.type)o.$selection.off("input.search input.searchcheck");else{var e=t.which;e!=n.SHIFT&&e!=n.CTRL&&e!=n.ALT&&e!=n.TAB&&o.handleSearch(t)}}))},i.prototype._transferTabIndex=function(){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},
i.prototype.update=function(t,e){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";""!==this.$search.attr("placeholder")?t=this.$selection.find(".select2-selection__rendered").innerWidth():t=.75*(this.$search.val().length+1)+"em";this.$search.css("width",t)},i})),e.define("select2/selection/eventRelay",["jquery"],(function(t){function e(){}return e.prototype.bind=function(e,n,i){var o=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],a=["opening","closing","selecting","unselecting"];e.call(this,n,i),n.on("*",(function(e,n){if(-1!==t.inArray(e,r)){n=n||{};var i=t.Event("select2:"+e,{params:n});o.$element.trigger(i),-1!==t.inArray(e,a)&&(n.prevented=i.isDefaultPrevented())}}))},e})),e.define("select2/translation",["jquery","require"],(function(t,e){function n(t){this.dict=t||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(t){return this.dict[t]},n.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},n._cache={},n.loadPath=function(t){if(!(t in n._cache)){var i=e(t);n._cache[t]=i}return new n(n._cache[t])},n})),e.define("select2/diacritics",[],(function(){return{"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1","\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03c9":"\u03c9","\u03c2":"\u03c3"}})),e.define("select2/data/base",["../utils"],(function(t){function e(){e.__super__.constructor.call(this)}return t.Extend(e,t.Observable),e.prototype.current=function(){throw new Error("The `current` method must be defined in child classes.")},e.prototype.query=function(){throw new Error("The `query` method must be defined in child classes.")},e.prototype.bind=function(){},e.prototype.destroy=function(){},e.prototype.generateResultId=function(e,n){var i=e.id+"-result-";return i+=t.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+t.generateChars(4),i},e})),e.define("select2/data/select",["./base","../utils","jquery"],(function(t,e,n){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,t),i.prototype.current=function(t){var e=[],i=this;this.$element.find(":selected").each((function(){var t=n(this),o=i.item(t);e.push(o)})),t(e)},i.prototype.select=function(t){var e=this;if(t.selected=!0,n(t.element).is("option"))return t.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current((function(i){var o=[];(t=[t]).push.apply(t,i);for(var r=0;r<t.length;r++){var a=t[r].id;-1===n.inArray(a,o)&&o.push(a)}e.$element.val(o),e.$element.trigger("change")}));else{var i=t.id;this.$element.val(i),this.$element.trigger("change")}},i.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple")){if(t.selected=!1,n(t.element).is("option"))return t.element.selected=!1,void this.$element.trigger("change");this.current((function(i){for(var o=[],r=0;r<i.length;r++){var a=i[r].id;a!==t.id&&-1===n.inArray(a,o)&&o.push(a)}e.$element.val(o),e.$element.trigger("change")}))}},i.prototype.bind=function(t){var e=this;this.container=t,t.on("select",(function(t){e.select(t.data)})),t.on("unselect",(function(t){e.unselect(t.data)}))},i.prototype.destroy=function(){this.$element.find("*").each((function(){n.removeData(this,"data")}))},i.prototype.query=function(t,e){var i=[],o=this;this.$element.children().each((function(){var e=n(this);if(e.is("option")||e.is("optgroup")){var r=o.item(e),a=o.matches(t,r);null!==a&&i.push(a)}})),e({results:i})},i.prototype.addOptions=function(t){e.appendMany(this.$element,t)},i.prototype.option=function(t){var e;t.children?(e=document.createElement("optgroup")).label=t.text:void 0!==(e=document.createElement("option")).textContent?e.textContent=t.text:e.innerText=t.text,t.id&&(e.value=t.id),t.disabled&&(e.disabled=!0),t.selected&&(e.selected=!0),t.title&&(e.title=t.title);var i=n(e),o=this._normalizeItem(t);return o.element=e,n.data(e,"data",o),i},i.prototype.item=function(t){var e={};if(null!=(e=n.data(t[0],"data")))return e;if(t.is("option"))e={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){e={text:t.prop("label"),children:[],title:t.prop("title")};for(var i=t.children("option"),o=[],r=0;r<i.length;r++){var a=n(i[r]),s=this.item(a);o.push(s)}e.children=o}return(e=this._normalizeItem(e)).element=t[0],n.data(t[0],"data",e),e},i.prototype._normalizeItem=function(t){n.isPlainObject(t)||(t={id:t,text:t});var e={selected:!1,disabled:!1};return null!=(t=n.extend({},{text:""},t)).id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),n.extend({},e,t)},i.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},i})),e.define("select2/data/array",["./select","../utils","jquery"],(function(t,e,n){function i(t,e){var n=e.get("data")||[];i.__super__.constructor.call(this,t,e),this.addOptions(this.convertToOptions(n))}return e.Extend(i,t),i.prototype.select=function(t){var e=this.$element.find("option").filter((function(e,n){return n.value==t.id.toString()}));0===e.length&&(e=this.option(t),this.addOptions(e)),i.__super__.select.call(this,t)},i.prototype.convertToOptions=function(t){function i(t){return function(){return n(this).val()==t.id}}for(var o=this,r=this.$element.find("option"),a=r.map((function(){return o.item(n(this)).id})).get(),s=[],l=0;l<t.length;l++){var c=this._normalizeItem(t[l]);if(n.inArray(c.id,a)>=0){var u=r.filter(i(c)),d=this.item(u),h=n.extend(!0,{},c,d),p=this.option(h);u.replaceWith(p)}else{var f=this.option(c);if(c.children){var m=this.convertToOptions(c.children);e.appendMany(f,m)}s.push(f)}}return s},i})),e.define("select2/data/ajax",["./array","../utils","jquery"],(function(t,e,n){function i(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,t,e)}return e.Extend(i,t),i.prototype._applyDefaults=function(t){var e={data:function(t){return n.extend({},t,{q:t.term})},transport:function(t,e,i){var o=n.ajax(t);return o.then(e),o.fail(i),o}};return n.extend({},e,t,!0)},i.prototype.processResults=function(t){return t},i.prototype.query=function(t,e){function i(){var i=r.transport(r,(function(i){var r=o.processResults(i,t);o.options.get("debug")&&window.console&&console.error&&(r&&r.results&&n.isArray(r.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),e(r)}),(function(){i.status&&"0"===i.status||o.trigger("results:message",{message:"errorLoading"})}));o._request=i}var o=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof r.url&&(r.url=r.url.call(this.$element,t)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(i,this.ajaxOptions.delay)):i()},i})),e.define("select2/data/tags",["jquery"],(function(t){function e(e,n,i){var o=i.get("tags"),r=i.get("createTag");void 0!==r&&(this.createTag=r);var a=i.get("insertTag");if(void 0!==a&&(this.insertTag=a),e.call(this,n,i),t.isArray(o))for(var s=0;s<o.length;s++){var l=o[s],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return e.prototype.query=function(t,e,n){function i(t,r){for(var a=t.results,s=0;s<a.length;s++){var l=a[s],c=null!=l.children&&!i({results:l.children},!0);if(l.text===e.term||c)return!r&&(t.data=a,void n(t))}if(r)return!0;var u=o.createTag(e);if(null!=u){var d=o.option(u);d.attr("data-select2-tag",!0),o.addOptions([d]),o.insertTag(a,u)}t.results=a,n(t)}var o=this;this._removeOldTags(),null!=e.term&&null==e.page?t.call(this,e,i):t.call(this,e,n)},e.prototype.createTag=function(e,n){var i=t.trim(n.term);return""===i?null:{id:i,text:i}},e.prototype.insertTag=function(t,e,n){e.unshift(n)},e.prototype._removeOldTags=function(){this._lastTag;this.$element.find("option[data-select2-tag]").each((function(){this.selected||t(this).remove()}))},e})),e.define("select2/data/tokenizer",["jquery"],(function(t){function e(t,e,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),t.call(this,e,n)}return e.prototype.bind=function(t,e,n){t.call(this,e,n),this.$search=e.dropdown.$search||e.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,n,i){function o(e){var n=a._normalizeItem(e);if(!a.$element.find("option").filter((function(){return t(this).val()===n.id})).length){var i=a.option(n);i.attr("data-select2-tag",!0),a._removeOldTags(),a.addOptions([i])}r(n)}function r(t){a.trigger("select",{data:t})}var a=this;n.term=n.term||"";var s=this.tokenizer(n,this.options,o);s.term!==n.term&&(this.$search.length&&(this.$search.val(s.term),this.$search.focus()),n.term=s.term),e.call(this,n,i)},e.prototype.tokenizer=function(e,n,i,o){for(var r=i.get("tokenSeparators")||[],a=n.term,s=0,l=this.createTag||function(t){return{id:t.term,text:t.term}};s<a.length;){var c=a[s];if(-1!==t.inArray(c,r)){var u=a.substr(0,s),d=l(t.extend({},n,{term:u}));null!=d?(o(d),a=a.substr(s+1)||"",s=0):s++}else s++}return{term:a}},e})),e.define("select2/data/minimumInputLength",[],(function(){function t(t,e,n){this.minimumInputLength=n.get("minimumInputLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){e.term=e.term||"",e.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):t.call(this,e,n)},t})),e.define("select2/data/maximumInputLength",[],(function(){function t(t,e,n){this.maximumInputLength=n.get("maximumInputLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){e.term=e.term||"",this.maximumInputLength>0&&e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):t.call(this,e,n)},t})),e.define("select2/data/maximumSelectionLength",[],(function(){function t(t,e,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){var i=this;this.current((function(o){var r=null!=o?o.length:0;i.maximumSelectionLength>0&&r>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):t.call(i,e,n)}))},t})),e.define("select2/dropdown",["jquery","./utils"],(function(t,e){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e,e},n.prototype.bind=function(){},n.prototype.position=function(){},n.prototype.destroy=function(){this.$dropdown.remove()},n})),e.define("select2/dropdown/search",["jquery","../utils"],(function(t){function e(){}return e.prototype.render=function(e){var n=e.call(this),i=t('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},e.prototype.bind=function(e,n,i){var o=this;e.call(this,n,i),this.$search.on("keydown",(function(t){o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented()})),this.$search.on("input",(function(){t(this).off("keyup")})),this.$search.on("keyup input",(function(t){o.handleSearch(t)})),n.on("open",(function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout((function(){o.$search.focus()}),0)})),n.on("close",(function(){o.$search.attr("tabindex",-1),o.$search.val("")})),n.on("focus",(function(){n.isOpen()&&o.$search.focus()})),n.on("results:all",(function(t){null!=t.query.term&&""!==t.query.term||(o.showSearch(t)?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide"))}))},e.prototype.handleSearch=function(){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},e.prototype.showSearch=function(){return!0},e})),e.define("select2/dropdown/hidePlaceholder",[],(function(){function t(t,e,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n,i)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var n=e.slice(0),i=e.length-1;i>=0;i--){var o=e[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},t})),e.define("select2/dropdown/infiniteScroll",["jquery"],(function(t){function e(t,e,n,i){this.lastParams={},t.call(this,e,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,n,i){var o=this;e.call(this,n,i),n.on("query",(function(t){o.lastParams=t,o.loading=!0})),n.on("query:append",(function(t){o.lastParams=t,o.loading=!0})),this.$results.on("scroll",(function(){var e=t.contains(document.documentElement,o.$loadingMore[0]);!o.loading&&e&&(o.$results.offset().top+o.$results.outerHeight(!1)+50>=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1)&&o.loadMore())}))},e.prototype.loadMore=function(){this.loading=!0;var e=t.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},e.prototype.createLoadingMore=function(){var e=t('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return e.html(n(this.lastParams)),e},e})),e.define("select2/dropdown/attachBody",["jquery","../utils"],(function(t,e){function n(e,n,i){this.$dropdownParent=i.get("dropdownParent")||t(document.body),e.call(this,n,i)}return n.prototype.bind=function(t,e,n){var i=this,o=!1;t.call(this,e,n),e.on("open",(function(){i._showDropdown(),i._attachPositioningHandler(e),o||(o=!0,e.on("results:all",(function(){i._positionDropdown(),i._resizeDropdown()})),e.on("results:append",(function(){i._positionDropdown(),i._resizeDropdown()})))})),e.on("close",(function(){i._hideDropdown(),i._detachPositioningHandler(e)})),this.$dropdownContainer.on("mousedown",(function(t){t.stopPropagation()}))},n.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(t,e,n){e.attr("class",n.attr("class")),e.removeClass("select2"),e.addClass("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(e){var n=t("<span></span>"),i=e.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var o=this,r="scroll.select2."+i.id,a="resize.select2."+i.id,s="orientationchange.select2."+i.id,l=this.$container.parents().filter(e.hasScroll);l.each((function(){t(this).data("select2-scroll-position",{x:t(this).scrollLeft(),y:t(this).scrollTop()})})),l.on(r,(function(){var e=t(this).data("select2-scroll-position");t(this).scrollTop(e.y)})),t(window).on(r+" "+a+" "+s,(function(){o._positionDropdown(),o._resizeDropdown()}))},n.prototype._detachPositioningHandler=function(n,i){var o="scroll.select2."+i.id,r="resize.select2."+i.id,a="orientationchange.select2."+i.id;this.$container.parents().filter(e.hasScroll).off(o),t(window).off(o+" "+r+" "+a)},n.prototype._positionDropdown=function(){var e=t(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),o=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var a={height:this.$container.outerHeight(!1)};a.top=r.top,a.bottom=r.top+a.height;var s={height:this.$dropdown.outerHeight(!1)},l={top:e.scrollTop(),bottom:e.scrollTop()+e.height()},c=l.top<r.top-s.height,u=l.bottom>r.bottom+s.height,d={left:r.left,top:a.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var p=h.offset();d.top-=p.top,d.left-=p.left,n||i||(o="below"),u||!c||n?!c&&u&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(d.top=a.top-p.top-s.height),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(d)},n.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},n.prototype._showDropdown=function(){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n})),e.define("select2/dropdown/minimumResultsForSearch",[],(function(){function t(e){for(var n=0,i=0;i<e.length;i++){var o=e[i];o.children?n+=t(o.children):n++}return n}function e(t,e,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,n,i)}return e.prototype.showSearch=function(e,n){return!(t(n.data.results)<this.minimumResultsForSearch)&&e.call(this,n)},e})),e.define("select2/dropdown/selectOnClose",[],(function(){function t(){}return t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("close",(function(t){i._handleSelectOnClose(t)}))},t.prototype._handleSelectOnClose=function(t,e){if(e&&null!=e.originalSelect2Event){var n=e.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var o=i.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},t})),e.define("select2/dropdown/closeOnSelect",[],(function(){function t(){}return t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("select",(function(t){i._selectTriggered(t)})),e.on("unselect",(function(t){i._selectTriggered(t)}))},t.prototype._selectTriggered=function(t,e){var n=e.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:e})},t})),e.define("select2/i18n/en",[],(function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,n="Please delete "+e+" character";return 1!=e&&(n+="s"),n},inputTooShort:function(t){return"Please enter "+(t.minimum-t.input.length)+" or more characters"},loadingMore:function(){return"Loading more results\u2026"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching\u2026"}}})),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],(function(t,e,n,i,o,r,a,s,l,c,u,d,h,p,f,m,g,v,y,_,b,w,x,k,C,S,T,E,$){function D(){this.reset()}return D.prototype.apply=function(d){if(null==(d=t.extend(!0,{},this.defaults,d)).dataAdapter){if(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=p:d.dataAdapter=h,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,_)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null!=d.query){var $=e(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,$)}if(null!=d.initSelection){var D=e(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,D)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,k)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,x)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,T))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=b;else{var A=c.Decorate(b,w);d.dropdownAdapter=A}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,S)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,E)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){
var j=e(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,j)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,C)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=o:d.selectionAdapter=i,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,r)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var M=e(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,M)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var I=d.language.split("-")[0];d.language=[d.language,I]}else d.language=[d.language];if(t.isArray(d.language)){var P=new u;d.language.push("en");for(var O=d.language,N=0;N<O.length;N++){var L=O[N],F={};try{F=u.loadPath(L)}catch(t){try{L=this.defaults.amdLanguageBase+L,F=u.loadPath(L)}catch(t){d.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+L+'" could not be automatically loaded. A fallback will be used instead.');continue}}P.extend(F)}d.translations=P}else{var R=u.loadPath(this.defaults.amdLanguageBase+"en"),q=new u(d.language);q.extend(R),d.translations=q}return d},D.prototype.reset=function(){function e(t){function e(t){return d[t]||t}return t.replace(/[^\u0000-\u007E]/g,e)}function n(i,o){if(""===t.trim(i.term))return o;if(o.children&&o.children.length>0){for(var r=t.extend(!0,{},o),a=o.children.length-1;a>=0;a--){null==n(i,o.children[a])&&r.children.splice(a,1)}return r.children.length>0?r:n(i,r)}var s=e(o.text).toUpperCase(),l=e(i.term).toUpperCase();return s.indexOf(l)>-1?o:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:$,matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},D.prototype.set=function(e,n){var i={};i[t.camelCase(e)]=n;var o=c._convertData(i);t.extend(this.defaults,o)},new D})),e.define("select2/options",["require","jquery","./defaults","./utils"],(function(t,e,n,i){function o(e,o){if(this.options=e,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var r=t(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,r)}}return o.prototype.fromElement=function(t){var n=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.language&&(t.prop("lang")?this.options.language=t.prop("lang").toLowerCase():t.closest("[lang]").prop("lang")&&(this.options.language=t.closest("[lang]").prop("lang"))),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),t.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),t.data("data",t.data("select2Tags")),t.data("tags",!0)),t.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",t.data("ajaxUrl")),t.data("ajax--url",t.data("ajaxUrl")));var o={};o=e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset?e.extend(!0,{},t[0].dataset,t.data()):t.data();var r=e.extend(!0,{},o);for(var a in r=i._convertData(r))e.inArray(a,n)>-1||(e.isPlainObject(this.options[a])?e.extend(this.options[a],r[a]):this.options[a]=r[a]);return this},o.prototype.get=function(t){return this.options[t]},o.prototype.set=function(t,e){this.options[t]=e},o})),e.define("select2/core",["jquery","./options","./utils","./keys"],(function(t,e,n,i){var o=function(t,n){null!=t.data("select2")&&t.data("select2").destroy(),this.$element=t,this.id=this._generateId(t),n=n||{},this.options=new e(n,t),o.__super__.constructor.call(this);var i=t.attr("tabindex")||0;t.data("old-tabindex",i),t.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(t,this.options);var a=this.render();this._placeContainer(a);var s=this.options.get("selectionAdapter");this.selection=new s(t,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var l=this.options.get("dropdownAdapter");this.dropdown=new l(t,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var c=this.options.get("resultsAdapter");this.results=new c(t,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(t){u.trigger("selection:update",{data:t})})),t.addClass("select2-hidden-accessible"),t.attr("aria-hidden","true"),this._syncAttributes(),t.data("select2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(t){return"select2-"+(null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},o.prototype._resolveWidth=function(t,e){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var i=this._resolveWidth(t,"style");return null!=i?i:this._resolveWidth(t,"element")}if("element"==e){var o=t.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==e){var r=t.attr("style");if("string"!=typeof r)return null;for(var a=r.split(";"),s=0,l=a.length;s<l;s+=1){var c=a[s].replace(/\s/g,"").match(n);if(null!==c&&c.length>=1)return c[1]}return null}return e},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",(function(){e.dataAdapter.current((function(t){e.trigger("selection:update",{data:t})}))})),this.$element.on("focus.select2",(function(t){e.trigger("focus",t)})),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i((function(n){t.each(n,e._syncA),t.each(n,e._syncS)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},o.prototype._registerDataEvents=function(){var t=this;this.dataAdapter.on("*",(function(e,n){t.trigger(e,n)}))},o.prototype._registerSelectionEvents=function(){var e=this,n=["toggle","focus"];this.selection.on("toggle",(function(){e.toggleDropdown()})),this.selection.on("focus",(function(t){e.focus(t)})),this.selection.on("*",(function(i,o){-1===t.inArray(i,n)&&e.trigger(i,o)}))},o.prototype._registerDropdownEvents=function(){var t=this;this.dropdown.on("*",(function(e,n){t.trigger(e,n)}))},o.prototype._registerResultsEvents=function(){var t=this;this.results.on("*",(function(e,n){t.trigger(e,n)}))},o.prototype._registerEvents=function(){var t=this;this.on("open",(function(){t.$container.addClass("select2-container--open")})),this.on("close",(function(){t.$container.removeClass("select2-container--open")})),this.on("enable",(function(){t.$container.removeClass("select2-container--disabled")})),this.on("disable",(function(){t.$container.addClass("select2-container--disabled")})),this.on("blur",(function(){t.$container.removeClass("select2-container--focus")})),this.on("query",(function(e){t.isOpen()||t.trigger("open",{}),this.dataAdapter.query(e,(function(n){t.trigger("results:all",{data:n,query:e})}))})),this.on("query:append",(function(e){this.dataAdapter.query(e,(function(n){t.trigger("results:append",{data:n,query:e})}))})),this.on("keypress",(function(e){var n=e.which;t.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&e.altKey?(t.close(),e.preventDefault()):n===i.ENTER?(t.trigger("results:select",{}),e.preventDefault()):n===i.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):n===i.UP?(t.trigger("results:previous",{}),e.preventDefault()):n===i.DOWN&&(t.trigger("results:next",{}),e.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&e.altKey)&&(t.open(),e.preventDefault())}))},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._syncSubtree=function(t,e){var n=!1,i=this;if(!t||!t.target||"OPTION"===t.target.nodeName||"OPTGROUP"===t.target.nodeName){if(e)if(e.addedNodes&&e.addedNodes.length>0)for(var o=0;o<e.addedNodes.length;o++){e.addedNodes[o].selected&&(n=!0)}else e.removedNodes&&e.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current((function(t){i.trigger("selection:update",{data:t})}))}},o.prototype.trigger=function(t,e){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===e&&(e={}),t in i){var r=i[t],a={prevented:!1,name:t,args:e};if(n.call(this,r,a),a.prevented)return void(e.prevented=!0)}n.call(this,t,e)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},o.prototype.focus=function(){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=t&&0!==t.length||(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current((function(e){t=e})),t},o.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var n=e[0];t.isArray(n)&&(n=t.map(n,(function(t){return t.toString()}))),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),e.data("element",this.$element),e},o})),e.define("jquery-mousewheel",["jquery"],(function(t){return t})),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],(function(t,e,n,i){if(null==t.fn.select2){var o=["open","close","destroy"];t.fn.select2=function(e){if("object"==typeof(e=e||{}))return this.each((function(){var i=t.extend(!0,{},e);new n(t(this),i)})),this;if("string"==typeof e){var i,r=Array.prototype.slice.call(arguments,1);return this.each((function(){var n=t(this).data("select2");null==n&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),i=n[e].apply(n,r)})),t.inArray(e,o)>-1?this:i}throw new Error("Invalid arguments for Select2: "+e)}}return null==t.fn.select2.defaults&&(t.fn.select2.defaults=i),n})),{define:e.define,require:e.require}}(),n=e.require("jquery.select2");return t.fn.select2.amd=e,n})),function(t,e,n,i){var o=t(e);t.fn.lazyload=function(r){function a(){var e=0;l.each((function(){var n=t(this);if(!c.skip_invisible||n.is(":visible"))if(t.abovethetop(this,c)||t.leftofbegin(this,c));else if(t.belowthefold(this,c)||t.rightoffold(this,c)){if(++e>c.failure_limit)return!1}else n.trigger("appear"),e=0}))}var s,l=this,c={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:e,data_attribute:"original",skip_invisible:!1,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return r&&(i!==r.failurelimit&&(r.failure_limit=r.failurelimit,delete r.failurelimit),i!==r.effectspeed&&(r.effect_speed=r.effectspeed,delete r.effectspeed),t.extend(c,r)),s=c.container===i||c.container===e?o:t(c.container),0===c.event.indexOf("scroll")&&s.on(c.event,(function(){return a()})),this.each((function(){var e=this,n=t(e);e.loaded=!1,n.attr("src")!==i&&!1!==n.attr("src")||n.is("img")&&n.attr("src",c.placeholder),n.one("appear",(function(){if(!this.loaded){if(c.appear){var i=l.length;c.appear.call(e,i,c)}t("<img />").one("load",(function(){var i=n.attr("data-"+c.data_attribute);n.hide(),n.is("img")?n.attr("src",i):n.css("background-image","url('"+i+"')"),n[c.effect](c.effect_speed),e.loaded=!0;var o=t.grep(l,(function(t){return!t.loaded}));if(l=t(o),c.load){var r=l.length;c.load.call(e,r,c)}})).attr("src",n.attr("data-"+c.data_attribute))}})),0!==c.event.indexOf("scroll")&&n.on(c.event,(function(){e.loaded||n.trigger("appear")}))})),o.on("resize",(function(){a()})),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&o.on("pageshow",(function(e){e.originalEvent&&e.originalEvent.persisted&&l.each((function(){t(this).trigger("appear")}))})),t(n).ready((function(){a()})),this},t.belowthefold=function(n,r){return(r.container===i||r.container===e?(e.innerHeight?e.innerHeight:o.height())+o.scrollTop():t(r.container).offset().top+t(r.container).height())<=t(n).offset().top-r.threshold},t.rightoffold=function(n,r){return(r.container===i||r.container===e?o.width()+o.scrollLeft():t(r.container).offset().left+t(r.container).width())<=t(n).offset().left-r.threshold},t.abovethetop=function(n,r){return(r.container===i||r.container===e?o.scrollTop():t(r.container).offset().top)>=t(n).offset().top+r.threshold+t(n).height()},t.leftofbegin=function(n,r){return(r.container===i||r.container===e?o.scrollLeft():t(r.container).offset().left)>=t(n).offset().left+r.threshold+t(n).width()},t.inviewport=function(e,n){return!(t.rightoffold(e,n)||t.leftofbegin(e,n)||t.belowthefold(e,n)||t.abovethetop(e,n))},t.extend(t.expr[":"],{"below-the-fold":function(e){return t.belowthefold(e,{threshold:0})},"above-the-top":function(e){return!t.belowthefold(e,{threshold:0})},"right-of-screen":function(e){return t.rightoffold(e,{threshold:0})},"left-of-screen":function(e){return!t.rightoffold(e,{threshold:0})},"in-viewport":function(e){return t.inviewport(e,{threshold:0})},"above-the-fold":function(e){return!t.belowthefold(e,{threshold:0})},"right-of-fold":function(e){return t.rightoffold(e,{threshold:0})},"left-of-fold":function(e){return!t.rightoffold(e,{threshold:0})}})}(jQuery,window,document),function(t,e){"function"==typeof define&&define.amd?define([],(function(){return e(t)})):"object"==typeof exports?module.exports=e(t):t.SmoothScroll=e(t)}("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,(function(t){"use strict";var e="querySelector"in document&&"addEventListener"in t&&"requestAnimationFrame"in t&&"closest"in t.Element.prototype,n={ignore:"[data-scroll-ignore]",header:null,speed:500,offset:0,easing:"easeInOutCubic",customEasing:null,before:function(){},after:function(){}},i=function(){for(var t={},e=0,n=arguments.length,i=function(e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};e<n;e++){i(arguments[e])}return t},o=function(e){return parseInt(t.getComputedStyle(e).height,10)},r=function(t){"#"===t.charAt(0)&&(t=t.substr(1));for(var e,n=String(t),i=n.length,o=-1,r="",a=n.charCodeAt(0);++o<i;){if(0===(e=n.charCodeAt(o)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");e>=1&&e<=31||127==e||0===o&&e>=48&&e<=57||1===o&&e>=48&&e<=57&&45===a?r+="\\"+e.toString(16)+" ":r+=e>=128||45===e||95===e||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?n.charAt(o):"\\"+n.charAt(o)}return"#"+r},a=function(t,e){var n;return"easeInQuad"===t.easing&&(n=e*e),"easeOutQuad"===t.easing&&(n=e*(2-e)),"easeInOutQuad"===t.easing&&(n=e<.5?2*e*e:(4-2*e)*e-1),"easeInCubic"===t.easing&&(n=e*e*e),"easeOutCubic"===t.easing&&(n=--e*e*e+1),"easeInOutCubic"===t.easing&&(n=e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1),"easeInQuart"===t.easing&&(n=e*e*e*e),"easeOutQuart"===t.easing&&(n=1- --e*e*e*e),"easeInOutQuart"===t.easing&&(n=e<.5?8*e*e*e*e:1-8*--e*e*e*e),"easeInQuint"===t.easing&&(n=e*e*e*e*e),"easeOutQuint"===t.easing&&(n=1+--e*e*e*e*e),"easeInOutQuint"===t.easing&&(n=e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e),t.customEasing&&(n=t.customEasing(e)),n||e},s=function(){return parseInt(t.getComputedStyle(document.documentElement).height,10)},l=function(t,e,n){var i=0;if(t.offsetParent)do{i+=t.offsetTop,t=t.offsetParent}while(t);return i=Math.max(i-e-n,0)},c=function(t){return t?o(t)+t.offsetTop:0},u=function(e,n,i){i||(e.focus(),document.activeElement.id!==e.id&&(e.setAttribute("tabindex","-1"),e.focus(),e.style.outline="none"),t.scrollTo(0,n))},d=function(){return!(!("matchMedia"in t)||!t.matchMedia("(prefers-reduced-motion)").matches)},h=function(o,h){var p,f,m,g,v,y,_,b={};b.cancelScroll=function(){cancelAnimationFrame(_)},b.animateScroll=function(e,o,r){var d=i(p||n,r||{}),h="[object Number]"===Object.prototype.toString.call(e),f=h||!e.tagName?null:e;if(h||f){var m=t.pageYOffset;d.header&&!g&&(g=document.querySelector(d.header)),v||(v=c(g));var y,_,w,x=h?e:l(f,v,parseInt("function"==typeof d.offset?d.offset():d.offset,10)),k=x-m,C=s(),S=0,T=function(n,i){var r=t.pageYOffset;if(n==i||r==i||(m<i&&t.innerHeight+r)>=C)return b.cancelScroll(),u(e,i,h),d.after(e,o),y=null,!0},E=function(e){y||(y=e),_=(S+=e-y)/parseInt(d.speed,10),w=m+k*a(d,_=_>1?1:_),t.scrollTo(0,Math.floor(w)),T(w,x)||(t.requestAnimationFrame(E),y=e)};0===t.pageYOffset&&t.scrollTo(0,0),d.before(e,o),b.cancelScroll(),t.requestAnimationFrame(E)}};var w=function(){f&&(f.id=f.getAttribute("data-scroll-id"),b.animateScroll(f,m),f=null,m=null)},x=function(e){if(!d(p)&&0===e.button&&!e.metaKey&&!e.ctrlKey&&(m=e.target.closest(o))&&"a"===m.tagName.toLowerCase()&&!e.target.closest(p.ignore)&&m.hostname===t.location.hostname&&m.pathname===t.location.pathname&&/#/.test(m.href)){var n;try{n=r(decodeURIComponent(m.hash))}catch(t){n=r(m.hash)}if("#"===n){e.preventDefault();var i=(f=document.body).id?f.id:"smooth-scroll-top";return f.setAttribute("data-scroll-id",i),f.id="",void(t.location.hash.substring(1)===i?w():t.location.hash=i)}(f=document.querySelector(n))&&(f.setAttribute("data-scroll-id",f.id),f.id="",m.hash===t.location.hash&&(e.preventDefault(),w()))}},k=function(){y||(y=setTimeout((function(){y=null,v=c(g)}),66))};return b.destroy=function(){p&&(document.removeEventListener("click",x,!1),t.removeEventListener("resize",k,!1),b.cancelScroll(),p=null,f=null,m=null,g=null,v=null,y=null,_=null)},b.init=function(o){e&&(b.destroy(),p=i(n,o||{}),g=p.header?document.querySelector(p.header):null,v=c(g),document.addEventListener("click",x,!1),t.addEventListener("hashchange",w,!1),g&&t.addEventListener("resize",k,!1))},b.init(h),b};return h})),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}((function(t){return t.ui=t.ui||{},t.ui.version="1.12.1"})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){return t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo((function(e){return function(n){return!!t.data(n,e)}})):function(e,n,i){return!!t.data(e,i[3])}})})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){return t.fn.extend({disableSelection:(e="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(e+".ui-disableSelection",(function(t){t.preventDefault()}))}),enableSelection:function(){return this.off(".ui-disableSelection")}});var e})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)e=(t=t.parent()).css("visibility");return"hidden"!==e}return t.ui.focusable=function(n,i){var o,r,a,s,l,c=n.nodeName.toLowerCase();return"area"===c?(r=(o=n.parentNode).name,!(!n.href||!r||"map"!==o.nodeName.toLowerCase())&&((a=t("img[usemap='#"+r+"']")).length>0&&a.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(c)?(s=!n.disabled)&&(l=t(n).closest("fieldset")[0])&&(s=!l.disabled):s="a"===c&&n.href||i,s&&t(n).is(":visible")&&e(t(n)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){return t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)}})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){return t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){return t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){return t.ui.escapeSelector=(e=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,function(t){return t.replace(e,"\\$1")});var e})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version","./escape-selector"],t):t(jQuery)}((function(t){return t.fn.labels=function(){var e,n,i,o,r;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(o=this.eq(0).parents("label"),(i=this.attr("id"))&&(r=(e=this.eq(0).parents().last()).add(e.length?e.siblings():this.siblings()),n="label[for='"+t.ui.escapeSelector(i)+"']",o=o.add(r.find(n).addBack(n))),this.pushStack(o))}})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],(function(e,n){function i(e,n,i,r){return t.each(o,(function(){n-=parseFloat(t.css(e,"padding"+this))||0,i&&(n-=parseFloat(t.css(e,"border"+this+"Width"))||0),r&&(n-=parseFloat(t.css(e,"margin"+this))||0)})),n}var o="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(e){return void 0===e?a["inner"+n].call(this):this.each((function(){t(this).css(r,i(this,e)+"px")}))},t.fn["outer"+n]=function(e,o){return"number"!=typeof e?a["outer"+n].call(this,e):this.each((function(){t(this).css(r,i(this,e,!0,o)+"px")}))}})),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))})})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){return t.ui.plugin={add:function(e,n,i){var o,r=t.ui[e].prototype;for(o in i)r.plugins[o]=r.plugins[o]||[],r.plugins[o].push([n,i[o]])},call:function(t,e,n,i){var o,r=t.plugins[e];if(r&&(i||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<r.length;o++)t.options[r[o][0]]&&r[o][1].apply(t.element,n)}}})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){return t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(n){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e}})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){return t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")}})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){return t.fn.scrollParent=function(e){var n=this.css("position"),i="absolute"===n,o=e?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter((function(){var e=t(this);return(!i||"static"!==e.css("position"))&&o.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))})).eq(0);return"fixed"!==n&&r.length?r:t(this[0].ownerDocument||document)}})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version","./focusable"],t):t(jQuery)}((function(t){return t.extend(t.expr[":"],{tabbable:function(e){var n=t.attr(e,"tabindex"),i=null!=n;return(!i||n>=0)&&t.ui.focusable(e,i)}})})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){return t.fn.extend({uniqueId:(e=0,function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++e)}))}),removeUniqueId:function(){return this.each((function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")}))}});var e})),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){var e,n="ui-effects-",i="ui-effects-style",o="ui-effects-animated",r=t;return t.effects={effect:{}},function(t,e){function n(t,e,n){var i=d[e.type]||{};return null==t?n||!e.def?null:e.def:(t=i.floor?~~t:parseFloat(t),isNaN(t)?e.def:i.mod?(t+i.mod)%i.mod:0>t?0:i.max<t?i.max:t)}function i(e){var n=c(),i=n._rgba=[];return e=e.toLowerCase(),f(l,(function(t,o){var r,a=o.re.exec(e),s=a&&o.parse(a),l=o.space||"rgba";if(s)return r=n[l](s),n[u[l].cache]=r[u[l].cache],i=n._rgba=r._rgba,!1})),i.length?("0,0,0,0"===i.join()&&t.extend(i,r.transparent),n):r[e]}function o(t,e,n){return 6*(n=(n+1)%1)<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}var r,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",s=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],c=t.Color=function(e,n,i,o){return new t.Color.fn.parse(e,n,i,o)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=c.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",h.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,(function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}})),c.fn=t.extend(c.prototype,{parse:function(o,a,s,l){if(o===e)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=t(o).css(a),a=e);var d=this,h=t.type(o),p=this._rgba=[];return a!==e&&(o=[o,a,s,l],h="array"),"string"===h?this.parse(i(o)||r._default):"array"===h?(f(u.rgba.props,(function(t,e){p[e.idx]=n(o[e.idx],e)})),this):"object"===h?(f(u,o instanceof c?function(t,e){o[e.cache]&&(d[e.cache]=o[e.cache].slice())}:function(e,i){var r=i.cache;f(i.props,(function(t,e){if(!d[r]&&i.to){if("alpha"===t||null==o[t])return;d[r]=i.to(d._rgba)}d[r][e.idx]=n(o[t],e,!0)})),d[r]&&t.inArray(null,d[r].slice(0,3))<0&&(d[r][3]=1,i.from&&(d._rgba=i.from(d[r])))}),this):void 0},is:function(t){var e=c(t),n=!0,i=this;return f(u,(function(t,o){var r,a=e[o.cache];return a&&(r=i[o.cache]||o.to&&o.to(i._rgba)||[],f(o.props,(function(t,e){if(null!=a[e.idx])return n=a[e.idx]===r[e.idx]}))),n})),n},_space:function(){var t=[],e=this;return f(u,(function(n,i){e[i.cache]&&t.push(n)})),t.pop()},transition:function(t,e){var i=c(t),o=i._space(),r=u[o],a=0===this.alpha()?c("transparent"):this,s=a[r.cache]||r.to(a._rgba),l=s.slice();return i=i[r.cache],f(r.props,(function(t,o){var r=o.idx,a=s[r],c=i[r],u=d[o.type]||{};null!==c&&(null===a?l[r]=c:(u.mod&&(c-a>u.mod/2?a+=u.mod:a-c>u.mod/2&&(a-=u.mod)),l[r]=n((c-a)*e+a,o)))})),this[o](l)},blend:function(e){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),o=c(e)._rgba;return c(t.map(n,(function(t,e){return(1-i)*o[e]+i*t})))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,(function(t,e){return null==t?e>2?1:0:t}));return 1===n[3]&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),(function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t}));return 1===n[3]&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),i=n.pop();return e&&n.push(~~(255*i)),"#"+t.map(n,(function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t})).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),c.fn.parse.prototype=c.fn,u.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,n,i=t[0]/255,o=t[1]/255,r=t[2]/255,a=t[3],s=Math.max(i,o,r),l=Math.min(i,o,r),c=s-l,u=s+l,d=.5*u;return e=l===s?0:i===s?60*(o-r)/c+360:o===s?60*(r-i)/c+120:60*(i-o)/c+240,n=0===c?0:d<=.5?c/u:c/(2-u),[Math.round(e)%360,n,d,null==a?1:a]},u.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,n=t[1],i=t[2],r=t[3],a=i<=.5?i*(1+n):i+n-i*n,s=2*i-a;return[Math.round(255*o(s,a,e+1/3)),Math.round(255*o(s,a,e)),Math.round(255*o(s,a,e-1/3)),r]},f(u,(function(i,o){var r=o.props,a=o.cache,l=o.to,u=o.from;c.fn[i]=function(i){if(l&&!this[a]&&(this[a]=l(this._rgba)),i===e)return this[a].slice();var o,s=t.type(i),d="array"===s||"object"===s?i:arguments,h=this[a].slice();return f(r,(function(t,e){
var i=d["object"===s?t:e.idx];null==i&&(i=h[e.idx]),h[e.idx]=n(i,e)})),u?((o=c(u(h)))[a]=h,o):c(h)},f(r,(function(e,n){c.fn[e]||(c.fn[e]=function(o){var r,a=t.type(o),l="alpha"===e?this._hsla?"hsla":"rgba":i,c=this[l](),u=c[n.idx];return"undefined"===a?u:("function"===a&&(o=o.call(this,u),a=t.type(o)),null==o&&n.empty?this:("string"===a&&(r=s.exec(o))&&(o=u+parseFloat(r[2])*("+"===r[1]?1:-1)),c[n.idx]=o,this[l](c)))})}))})),c.hook=function(e){var n=e.split(" ");f(n,(function(e,n){t.cssHooks[n]={set:function(e,o){var r,a,s="";if("transparent"!==o&&("string"!==t.type(o)||(r=i(o)))){if(o=c(r||o),!h.rgba&&1!==o._rgba[3]){for(a="backgroundColor"===n?e.parentNode:e;(""===s||"transparent"===s)&&a&&a.style;)try{s=t.css(a,"backgroundColor"),a=a.parentNode}catch(t){}o=o.blend(s&&"transparent"!==s?s:"_default")}o=o.toRgbaString()}try{e.style[n]=o}catch(t){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=c(e.elem,n),e.end=c(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}}))},c.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],(function(n,i){e["border"+i+"Color"]=t})),e}},r=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(r),function(){function e(e){var n,i,o=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,r={};if(o&&o.length&&o[0]&&o[o[0]])for(i=o.length;i--;)"string"==typeof o[n=o[i]]&&(r[t.camelCase(n)]=o[n]);else for(n in o)"string"==typeof o[n]&&(r[n]=o[n]);return r}function n(e,n){var i,o,r={};for(i in n)o=n[i],e[i]!==o&&(a[i]||!t.fx.step[i]&&isNaN(parseFloat(o))||(r[i]=o));return r}var i,o=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(e,n){t.fx.step[n]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(r.style(t.elem,n,t.end),t.setAttr=!0)}})),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(i,r,a,s){var l=t.speed(r,a,s);return this.queue((function(){var r,a=t(this),s=a.attr("class")||"",c=l.children?a.find("*").addBack():a;c=c.map((function(){return{el:t(this),start:e(this)}})),(r=function(){t.each(o,(function(t,e){i[e]&&a[e+"Class"](i[e])}))})(),c=c.map((function(){return this.end=e(this.el[0]),this.diff=n(this.start,this.end),this})),a.attr("class",s),c=c.map((function(){var e=this,n=t.Deferred(),i=t.extend({},l,{queue:!1,complete:function(){n.resolve(e)}});return this.el.animate(this.diff,i),n.promise()})),t.when.apply(t,c.get()).done((function(){r(),t.each(arguments,(function(){var e=this.el;t.each(this.diff,(function(t){e.css(t,"")}))})),l.complete.call(a[0])}))}))},t.fn.extend({addClass:(i=t.fn.addClass,function(e,n,o,r){return n?t.effects.animateClass.call(this,{add:e},n,o,r):i.apply(this,arguments)}),removeClass:function(e){return function(n,i,o,r){return arguments.length>1?t.effects.animateClass.call(this,{remove:n},i,o,r):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(n,i,o,r,a){return"boolean"==typeof i||void 0===i?o?t.effects.animateClass.call(this,i?{add:n}:{remove:n},o,r,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:n},i,o,r)}}(t.fn.toggleClass),switchClass:function(e,n,i,o,r){return t.effects.animateClass.call(this,{add:n,remove:e},i,o,r)}})}(),function(){function e(e,n,i,o){return t.isPlainObject(e)&&(n=e,e=e.effect),e={effect:e},null==n&&(n={}),t.isFunction(n)&&(o=n,i=null,n={}),("number"==typeof n||t.fx.speeds[n])&&(o=i,i=n,n={}),t.isFunction(i)&&(o=i,i=null),n&&t.extend(e,n),i=i||n.duration,e.duration=t.fx.off?0:"number"==typeof i?i:i in t.fx.speeds?t.fx.speeds[i]:t.fx.speeds._default,e.complete=o||n.complete,e}function r(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}function a(t,e){var n=e.outerWidth(),i=e.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,n,i,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?n:parseFloat(o[2]),bottom:"auto"===o[3]?i:parseFloat(o[3]),left:parseFloat(o[4])||0}}var s;t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=(s=t.expr.filters.animated,function(e){return!!t(e).data(o)||s(e)})),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,o=e.length;i<o;i++)null!==e[i]&&t.data(n+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,o=0,r=e.length;o<r;o++)null!==e[o]&&(i=t.data(n+e[o]),t.css(e[o],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var n={width:e.outerWidth(!0),height:e.outerHeight(!0),float:e.css("float")},i=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:e.width(),height:e.height()},r=document.activeElement;try{r.id}catch(t){r=document.body}return e.wrap(i),(e[0]===r||t.contains(e[0],r))&&t(r).trigger("focus"),i=e.parent(),"static"===e.css("position")?(i.css({position:"relative"}),e.css({position:"relative"})):(t.extend(n,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],(function(t,i){n[i]=e.css(i),isNaN(parseInt(n[i],10))&&(n[i]="auto")})),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(o),i.css(n).show()},removeWrapper:function(e){var n=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===n||t.contains(e[0],n))&&t(n).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,n,i){return i||(i=n,n="effect"),t.effects.effect[e]=i,t.effects.effect[e].mode=n,i},scaledDimensions:function(t,e,n){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var i="horizontal"!==n?(e||100)/100:1,o="vertical"!==n?(e||100)/100:1;return{height:t.height()*o,width:t.width()*i,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*i}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,n){var i=t.queue();e>1&&i.splice.apply(i,[1,0].concat(i.splice(e,n))),t.dequeue()},saveStyle:function(t){t.data(i,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(i)||"",t.removeData(i)},mode:function(t,e){var n=t.is(":hidden");return"toggle"===e&&(e=n?"show":"hide"),(n?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var n,i;switch(t[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=t[0]/e.height}switch(t[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=t[1]/e.width}return{x:i,y:n}},createPlaceholder:function(e){var i,o=e.css("position"),r=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(o)&&(o="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(n+"placeholder",i)),e.css({position:o,left:r.left,top:r.top}),i},removePlaceholder:function(t){var e=n+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,n,i,o){return o=o||{},t.each(n,(function(t,n){var r=e.cssUnit(n);r[0]>0&&(o[n]=r[0]*i+r[1])})),o}}),t.fn.extend({effect:function(){function n(e){function n(){l.removeData(o),t.effects.cleanUp(l),"hide"===i.mode&&l.hide(),s()}function s(){t.isFunction(c)&&c.call(l[0]),t.isFunction(e)&&e()}var l=t(this);i.mode=d.shift(),!1===t.uiBackCompat||a?"none"===i.mode?(l[u](),s()):r.call(l[0],i,n):(l.is(":hidden")?"hide"===u:"show"===u)?(l[u](),s()):r.call(l[0],i,s)}var i=e.apply(this,arguments),r=t.effects.effect[i.effect],a=r.mode,s=i.queue,l=s||"fx",c=i.complete,u=i.mode,d=[],h=function(e){var n=t(this),i=t.effects.mode(n,u)||a;n.data(o,!0),d.push(i),a&&("show"===i||i===a&&"hide"===i)&&n.show(),a&&"none"===i||t.effects.saveStyle(n),t.isFunction(e)&&e()};return t.fx.off||!r?u?this[u](i.duration,c):this.each((function(){c&&c.call(this)})):!1===s?this.each(h).each(n):this.queue(l,h).queue(l,n)},show:function(t){return function(n){if(r(n))return t.apply(this,arguments);var i=e.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(n){if(r(n))return t.apply(this,arguments);var i=e.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(n){if(r(n)||"boolean"==typeof n)return t.apply(this,arguments);var i=e.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var n=this.css(e),i=[];return t.each(["em","px","%","pt"],(function(t,e){n.indexOf(e)>0&&(i=[parseFloat(n),e])})),i},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):a(this.css("clip"),this)},transfer:function(e,n){var i=t(this),o=t(e.to),r="fixed"===o.css("position"),a=t("body"),s=r?a.scrollTop():0,l=r?a.scrollLeft():0,c=o.offset(),u={top:c.top-s,left:c.left-l,height:o.innerHeight(),width:o.innerWidth()},d=i.offset(),h=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:d.top-s,left:d.left-l,height:i.innerHeight(),width:i.innerWidth(),position:r?"fixed":"absolute"}).animate(u,e.duration,e.easing,(function(){h.remove(),t.isFunction(n)&&n()}))}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=a(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),e={},t.each(["Quad","Cubic","Quart","Quint","Expo"],(function(t,n){e[n]=function(e){return Math.pow(e,t+2)}})),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,(function(e,n){t.easing["easeIn"+e]=n,t.easing["easeOut"+e]=function(t){return 1-n(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?n(2*t)/2:1-n(-2*t+2)/2}})),t.effects})),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}((function(t){return t.effects.define("highlight","show",(function(e,n){var i=t(this),o={backgroundColor:i.css("backgroundColor")};"hide"===e.mode&&(o.opacity=0),t.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:n})}))})),function(t,e,n){function i(t,e){return typeof t===e}function o(){var t,e,n,o,r,s;for(var u in a)if(a.hasOwnProperty(u)){if(t=[],(e=a[u]).name&&(t.push(e.name.toLowerCase()),e.options&&e.options.aliases&&e.options.aliases.length))for(n=0;n<e.options.aliases.length;n++)t.push(e.options.aliases[n].toLowerCase());for(o=i(e.fn,"function")?e.fn():e.fn,r=0;r<t.length;r++)1===(s=t[r].split(".")).length?l[s[0]]=o:(!l[s[0]]||l[s[0]]instanceof Boolean||(l[s[0]]=new Boolean(l[s[0]])),l[s[0]][s[1]]=o),c.push((o?"":"no-")+s.join("-"))}}function r(){return"function"!=typeof e.createElement?e.createElement(arguments[0]):d?e.createElementNS.call(e,"http://www.w3.org/2000/svg",arguments[0]):e.createElement.apply(e,arguments)}var a=[],s={_version:"3.6.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(t,e){var n=this;setTimeout((function(){e(n[t])}),0)},addTest:function(t,e,n){a.push({name:t,fn:e,options:n})},addAsyncTest:function(t){a.push({name:null,fn:t})}},l=function(){};l.prototype=s,l=new l;var c=[],u=e.documentElement,d="svg"===u.nodeName.toLowerCase(),h=r("input"),p="search tel url email datetime date month week time datetime-local number range color".split(" "),f={};l.inputtypes=function(t){for(var i,o,r,a=t.length,s="1)",l=0;a>l;l++)h.setAttribute("type",i=t[l]),(r="text"!==h.type&&"style"in h)&&(h.value=s,h.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(i)&&h.style.WebkitAppearance!==n?(u.appendChild(h),r=(o=e.defaultView).getComputedStyle&&"textfield"!==o.getComputedStyle(h,null).WebkitAppearance&&0!==h.offsetHeight,u.removeChild(h)):/^(search|tel)$/.test(i)||(r=/^(url|email)$/.test(i)?h.checkValidity&&!1===h.checkValidity():h.value!=s)),f[t[l]]=!!r;return f}(p),o(),delete s.addTest,delete s.addAsyncTest;for(var m=0;m<l._q.length;m++)l._q[m]();t.Modernizr=l}(window,document),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,(function(){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(i,o,function(e){return t[e]}.bind(null,o));return i},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=i(n(1)),l=i(n(3)),c=i(n(4)),u=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.resolveOptions(n),i.listenClick(e),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(t,l.default),a(t,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===r(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,c.default)(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new s.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return o("action",t)}},{key:"defaultTarget",value:function(t){var e=o("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return o("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach((function(t){n=n&&!!document.queryCommandSupported(t)})),n}}]),t}();t.exports=u},function(t,e,n){"use strict";var i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=(i=n(2))&&i.__esModule?i:{default:i},s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.resolveOptions(e),this.initSelection()}return r(t,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,a.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,a.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":o(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=s},function(t){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var i=window.getSelection(),o=document.createRange();o.selectNodeContents(t),i.removeAllRanges(),i.addRange(o),e=i.toString()}return e}},function(t){function e(){}e.prototype={on:function(t,e,n){var i=this.e||(this.e={});return(i[t]||(i[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function i(){o.off(t,i),e.apply(n,arguments)}var o=this;return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),i=0,o=n.length;i<o;i++)n[i].fn.apply(n[i].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),i=n[t],o=[];if(i&&e)for(var r=0,a=i.length;r<a;r++)i[r].fn!==e&&i[r].fn._!==e&&o.push(i[r]);return o.length?n[t]=o:delete n[t],this}},t.exports=e},function(t,e,n){var i=n(5),o=n(6);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!i.string(e))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(t))return h=e,p=n,(d=t).addEventListener(h,p),{destroy:function(){d.removeEventListener(h,p)}};if(i.nodeList(t))return l=t,c=e,u=n,Array.prototype.forEach.call(l,(function(t){t.addEventListener(c,u)})),{destroy:function(){Array.prototype.forEach.call(l,(function(t){t.removeEventListener(c,u)}))}};if(i.string(t))return r=t,a=e,s=n,o(document.body,r,a,s);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var r,a,s,l,c,u,d,h,p}},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){function i(t,e,n,i,r){var a=function(t,e,n,i){return function(n){n.delegateTarget=o(n.target,e),n.delegateTarget&&i.call(t,n)}}.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}var o=n(7);t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,(function(t){return i(t,e,n,o,r)})))}},function(t){if("undefined"!=typeof Element&&!Element.prototype.matches){var e=Element.prototype;e.matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}}])}));var now=function(){return Date.now()};!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Airbrake={})}(this,(function(t){"use strict";function e(t,e){function n(){this.constructor=t}if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");G(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function n(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))}function i(t){return new this((function(e,n){function i(t,n){if(n&&("object"==typeof n||"function"==typeof n)){var a=n.then;if("function"==typeof a)return void a.call(n,(function(e){i(t,e)}),(function(n){o[t]={status:"rejected",reason:n},0==--r&&e(o)}))}o[t]={status:"fulfilled",value:n},0==--r&&e(o)}if(!t||void 0===t.length)return n(new TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var o=Array.prototype.slice.call(t);if(0===o.length)return e([]);for(var r=o.length,a=0;a<o.length;a++)i(a,o[a])}))}function o(t){return Boolean(t&&void 0!==t.length)}function r(){}function a(t,e){return function(){t.apply(e,arguments)}}function s(t){if(!(this instanceof s))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(t,this)}function l(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,s._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var i;try{i=n(t._value)}catch(t){return void u(e.promise,t)}c(e.promise,i)}else(1===t._state?c:u)(e.promise,t._value)}))):t._deferreds.push(e)}function c(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof s)return t._state=3,t._value=e,void d(t);if("function"==typeof n)return void p(a(n,e),t)}t._state=1,t._value=e,d(t)}catch(e){u(t,e)}}function u(t,e){t._state=2,t._value=e,d(t)}function d(t){2===t._state&&0===t._deferreds.length&&s._immediateFn((function(){t._handled||s._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)l(t,t._deferreds[e]);t._deferreds=null}function h(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function p(t,e){var n=!1;try{t((function(t){n||(n=!0,c(e,t))}),(function(t){n||(n=!0,u(e,t))}))}catch(t){if(n)return;n=!0,u(e,t)}}function f(t,e){var n=void 0===e?{}:e,i=n.maxLength,o=void 0===i?64e3:i,r=n.keysBlocklist,a=void 0===r?[]:r;if(t.errors)for(var s=0;s<t.errors.length;s++){var l=new tt({keysBlocklist:a});t.errors[s]=l.truncate(t.errors[s])}for(var c="",u=["context","params","environment","session"],d=0;d<8;d++){for(var h={level:d,keysBlocklist:a},p=0,f=u;p<f.length;p++){(b=t[_=f[p]])&&(t[_]=g(b,h))}if((c=JSON.stringify(t)).length<o)return c}var m={json:c.slice(0,Math.floor(o/2))+"..."};u.push("errors");for(var v=0,y=u;v<y.length;v++){var _,b;(b=t[_=y[v]])&&(c=JSON.stringify(b),m[_]=c.length)}var w=new Error("airbrake: notice exceeds max length and can't be truncated");throw w.params=m,w}function m(t,e){return t>>e||1}function g(t,e){return void 0===e&&(e={}),new tt(e).truncate(t)}function v(t,e){try{return t[e]}catch(t){return}}function y(t){return Object.prototype.toString.apply(t).slice(8,-1)}function _(t,e){for(var n=0,i=e;n<i.length;n++){var o=i[n];if(o===t)return!0;if(o instanceof RegExp&&t.match(o))return!0}return!1}function b(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function w(t){var e={exports:{}};return t(e,e.exports),e.exports}function x(t){try{return st.parse(t)}catch(e){lt&&t.stack&&console.warn("ErrorStackParser:",e.toString(),t.stack)}return t.fileName?[t]:[]}function k(t){var e=[];if(t.noStack)e.push({function:t.functionName||"",file:t.fileName||"",line:t.lineNumber||0,column:t.columnNumber||0});else{var n=x(t);if(0===n.length)try{throw new Error("fake")}catch(t){(n=x(t)).shift(),n.shift()}for(var i=0,o=n;i<o.length;i++){var r=o[i];e.push({function:r.functionName||"",file:r.fileName||"",line:r.lineNumber||0,column:r.columnNumber||0})}}return{type:t.name?t.name:"",message:t.message?String(t.message):String(t),backtrace:e}}function C(t){var e=t.errors[0];if(""!==e.type&&"Error"!==e.type)return t;var n=e.message.match(ct);return null!==n&&(e.type=n[1],e.message=n[2]),t}function S(){var t,e;return function(n){var i=JSON.stringify(n.errors);return i===t?null:(e&&clearTimeout(e),t=i,e=setTimeout((function(){t=""}),1e3),n)}}function T(t){var e=t.errors[0];if(""===e.type&&-1!==ut.indexOf(e.message))return null;if(e.backtrace&&e.backtrace.length>0&&"<anonymous>"===e.backtrace[0].file)return null;return t}function E(t){var e=t.errors[0];if(""!==e.type&&"Error"!==e.type)return t;var n=e.message.match(dt);return null!==n&&(e.type=n[1],e.message=n[2]),t}function $(t){if(Date.now()/1e3<mt)return s.reject(ft.ipRateLimited);var e={method:t.method,body:t.body,headers:t.headers};return pt(t.url,e).then((function(t){if(401===t.status)throw ft.unauthorized;if(429===t.status){var e=t.headers.get("X-RateLimit-Delay");if(!e)throw ft.ipRateLimited;var n=parseInt(e,10);throw n>0&&(mt=Date.now()/1e3+n),ft.ipRateLimited}if(204===t.status)return{json:null};if(404===t.status)throw new Error("404 Not Found");return t.status>=200&&t.status<300?t.json().then((function(t){return{json:t}})):t.status>=400&&t.status<500?t.json().then((function(t){throw new Error(t.message)})):t.text().then((function(e){throw new Error("airbrake: fetch: unexpected response: code="+t.status+" body='"+e+"'")}))}))}function D(t){return function(e){return A(e,t)}}function A(t,e){return Date.now()/1e3<gt?s.reject(ft.ipRateLimited):new s((function(n,i){e({url:t.url,method:t.method,body:t.body,headers:{"content-type":"application/json"},timeout:t.timeout},(function(t,e,o){if(t)i(t);else{if(!e.statusCode)return t=new Error("airbrake: request: response statusCode is "+e.statusCode),void i(t);if(401!==e.statusCode)if(429!==e.statusCode)if(204!==e.statusCode)if(e.statusCode>=200&&e.statusCode<300){var r=void 0;try{r=JSON.parse(o)}catch(t){return void i(t)}n(r)}else{if(e.statusCode>=400&&e.statusCode<500){r=void 0;try{r=JSON.parse(o)}catch(t){return void i(t)}return t=new Error(r.message),void i(t)}o=o.trim(),t=new Error("airbrake: node: unexpected response: code="+e.statusCode+" body='"+o+"'"),i(t)}else n({json:null});else{i(ft.ipRateLimited);var a=e.headers["x-ratelimit-delay"];if(!a)return;var s=void 0;if("string"==typeof a)s=a;else{if(!(a instanceof Array))return;s=a[0]}var l=parseInt(s,10);l>0&&(gt=Date.now()/1e3+l)}else i(ft.unauthorized)}}))}))}function j(t){return t.request?D(t.request):$}function M(t){var e=[],n=[];return t.centroids.each((function(t){e.push(t.mean),n.push(t.n)})),{mean:e,count:n}}function I(t){return window.navigator&&window.navigator.userAgent&&(t.context.userAgent=window.navigator.userAgent),window.location&&(t.context.url=String(window.location),t.context.rootDirectory=window.location.protocol+"//"+window.location.host),t}function P(t){for(var e=function(e){if(!(e in console))return"continue";var n=console[e],i=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.apply(console,i),t.scope().pushHistory({type:"log",severity:e,arguments:i})};i.inner=n,console[e]=i},n=0,i=Ut;n<i.length;n++){e(i[n])}}function O(t){var e=N(t);window.addEventListener&&(window.addEventListener("load",e),window.addEventListener("error",(function(t){q(t,"error")||e(t)}),!0)),"object"==typeof document&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",e),document.addEventListener("click",e),document.addEventListener("keypress",e))}function N(t){return function(e){var n=q(e,"target");if(n){var i={type:e.type};try{i.target=R(n)}catch(t){i.target="<"+String(t)+">"}t.scope().pushHistory(i)}}}function L(t){if(!t)return"";var e=[];if(t.tagName&&e.push(t.tagName.toLowerCase()),t.id&&(e.push("#"),e.push(t.id)),t.classList&&Array.from)e.push("."),
e.push(Array.from(t.classList).join("."));else if(t.className){var n=F(t.className);""!==n&&(e.push("."),e.push(n))}if(t.getAttribute)for(var i=0,o=zt;i<o.length;i++){var r=o[i],a=t.getAttribute(r);a&&e.push("["+r+'="'+a+'"]')}return e.join("")}function F(t){return t.split?t.split(" ").join("."):t.baseVal&&t.baseVal.split?t.baseVal.split(" ").join("."):(console.error("unsupported HTMLElement.className type",typeof t),"")}function R(t){for(var e=10,n=[],i=t;i;){var o=L(i);if(""!==o&&(n.push(o),n.length>e))break;i=i.parentNode}return 0===n.length?String(t):n.reverse().join(" > ")}function q(t,e){try{return t[e]}catch(t){return null}}function B(t){var e=window.fetch;window.fetch=function(n,i){var o={type:"xhr",date:new Date};return o.method=i&&i.method?i.method:"GET","string"==typeof n?o.url=n:(o.method=n.method,o.url=n.url),t._ignoreNextXHR++,setTimeout((function(){return t._ignoreNextXHR--})),e.apply(this,arguments).then((function(e){return o.statusCode=e.status,o.duration=(new Date).getTime()-o.date.getTime(),t.scope().pushHistory(o),e})).catch((function(e){throw o.error=e,o.duration=(new Date).getTime()-o.date.getTime(),t.scope().pushHistory(o),e}))}}function H(){return document.location&&document.location.pathname}function U(t){Wt=H();var e=window.onpopstate;window.onpopstate=function(n){var i=H();if(i&&z(t,i),e)return e.apply(this,arguments)};var n=history.pushState;history.pushState=function(e,i,o){o&&z(t,o.toString()),n.apply(this,arguments)}}function z(t,e){var n=e.indexOf("://");n>=0?(n=(e=e.slice(n+3)).indexOf("/"),e=n>=0?e.slice(n):"/"):"/"!==e.charAt(0)&&(e="/"+e),t.scope().pushHistory({type:"location",from:Wt,to:e}),Wt=e}function W(t){function e(e){var n=e.__state;n.statusCode=e.status,n.duration=(new Date).getTime()-n.date.getTime(),t.scope().pushHistory(n)}var n=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(e,i,o,r,a){0===t._ignoreNextXHR&&(this.__state={type:"xhr",method:e,url:i}),n.apply(this,arguments)};var i=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(t){var n=this.onreadystatechange;return this.onreadystatechange=function(t){if(4===this.readyState&&this.__state&&e(this),n)return n.apply(this,arguments)},this.__state&&(this.__state.date=new Date),i.apply(this,arguments)}}function Q(t){return t&&t.startsWith&&t.startsWith("dev")}function V(t){return void 0===t||!0===t}var G=function(t,e){return G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},G(t,e)},Y=function(){return Y=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Y.apply(this,arguments)},X=setTimeout;s.prototype.catch=function(t){return this.then(null,t)},s.prototype.then=function(t,e){var n=new this.constructor(r);return l(this,new h(t,e,n)),n},s.prototype.finally=n,s.all=function(t){return new s((function(e,n){function i(t,o){try{if(o&&("object"==typeof o||"function"==typeof o)){var s=o.then;if("function"==typeof s)return void s.call(o,(function(e){i(t,e)}),n)}r[t]=o,0==--a&&e(r)}catch(t){n(t)}}if(!o(t))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);for(var a=r.length,s=0;s<r.length;s++)i(s,r[s])}))},s.allSettled=i,s.resolve=function(t){return t&&"object"==typeof t&&t.constructor===s?t:new s((function(e){e(t)}))},s.reject=function(t){return new s((function(e,n){n(t)}))},s.race=function(t){return new s((function(e,n){if(!o(t))return n(new TypeError("Promise.race accepts an array"));for(var i=0,r=t.length;i<r;i++)s.resolve(t[i]).then(e,n)}))},s._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){X(t,0)},s._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var K,J="[Filtered]",Z=128,tt=function(){function t(t){this.maxStringLength=1024,this.maxObjectLength=Z,this.maxArrayLength=Z,this.maxDepth=8,this.keys=[],this.keysBlocklist=[],this.seen=[];var e=t.level||0;this.keysBlocklist=t.keysBlocklist||[],this.maxStringLength=m(this.maxStringLength,e),this.maxObjectLength=m(this.maxObjectLength,e),this.maxArrayLength=m(this.maxArrayLength,e),this.maxDepth=m(this.maxDepth,e)}return t.prototype.truncate=function(t,e,n){if(void 0===e&&(e=""),void 0===n&&(n=0),null==t)return t;switch(typeof t){case"boolean":case"number":case"function":return t;case"string":return this.truncateString(t);case"object":break;default:return this.truncateString(String(t))}if(t instanceof String)return this.truncateString(t.toString());if(t instanceof Boolean||t instanceof Number||t instanceof Date||t instanceof RegExp)return t;if(t instanceof Error)return this.truncateString(t.toString());if(this.seen.indexOf(t)>=0)return"[Circular "+this.getPath(t)+"]";var i=y(t);if(++n>this.maxDepth)return"[Truncated "+i+"]";switch(this.keys.push(e),this.seen.push(t),i){case"Array":return this.truncateArray(t,n);case"Object":return this.truncateObject(t,n);default:var o=this.maxDepth;this.maxDepth=0;var r=this.truncateObject(t,n);return r.__type=i,this.maxDepth=o,r}},t.prototype.getPath=function(t){for(var e=this.seen.indexOf(t),n=[this.keys[e]],i=e;i>=0;i--){var o=this.seen[i];o&&v(o,n[0])===t&&(t=o,n.unshift(this.keys[i]))}return"~"+n.join(".")},t.prototype.truncateString=function(t){return t.length>this.maxStringLength?t.slice(0,this.maxStringLength)+"...":t},t.prototype.truncateArray=function(t,e){void 0===e&&(e=0);for(var n=0,i=[],o=0;o<t.length;o++){var r=t[o];if(i.push(this.truncate(r,o.toString(),e)),++n>=this.maxArrayLength)break}return i},t.prototype.truncateObject=function(t,e){void 0===e&&(e=0);var n=0,i={};for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(_(o,this.keysBlocklist))i[o]=J;else{var r=v(t,o);if(void 0!==r&&"function"!=typeof r&&(i[o]=this.truncate(r,o,e),++n>=this.maxObjectLength))break}return i},t}(),et=function(){function t(t,e,n){this._dur=0,this._level=0,this._metric=t,this.name=e,this.startTime=n||new Date}return t.prototype.end=function(t){this.endTime=t||new Date,this._dur+=this.endTime.getTime()-this.startTime.getTime(),this._metric._incGroup(this.name,this._dur),this._metric=null},t.prototype._pause=function(){if(!this._paused()){var t=new Date;this._dur+=t.getTime()-this.startTime.getTime(),this.startTime=null}},t.prototype._resume=function(){this._paused()&&(this.startTime=new Date)},t.prototype._paused=function(){return null==this.startTime},t}(),nt=function(){function t(){this._spans={},this._groups={},this.startTime=new Date}return t.prototype.end=function(t){this.endTime||(this.endTime=t||new Date)},t.prototype.isRecording=function(){return!0},t.prototype.startSpan=function(t,e){var n=this._spans[t];n?n._level++:(n=new et(this,t,e),this._spans[t]=n)},t.prototype.endSpan=function(t,e){var n=this._spans[t];n?n._level>0?n._level--:(n.end(e),delete this._spans[n.name]):console.error("airbrake: span=%s does not exist",t)},t.prototype._incGroup=function(t,e){this._groups[t]=(this._groups[t]||0)+e},t.prototype._duration=function(){return this.endTime||(this.endTime=new Date),this.endTime.getTime()-this.startTime.getTime()},t}(),it=function(){function t(){}return t.prototype.isRecording=function(){return!1},t.prototype.startSpan=function(){},t.prototype.endSpan=function(){},t.prototype._incGroup=function(){},t}(),ot=function(){function t(){this._noopMetric=new it,this._context={},this._historyMaxLen=20,this._history=[]}return t.prototype.clone=function(){var e=new t;return e._context=Y({},this._context),e._history=this._history.slice(),e},t.prototype.setContext=function(t){this._context=Y(Y({},this._context),t)},t.prototype.context=function(){var t=Y({},this._context);return this._history.length>0&&(t.history=this._history.slice()),t},t.prototype.pushHistory=function(t){this._isDupState(t)?this._lastRecord.num?this._lastRecord.num++:this._lastRecord.num=2:(t.date||(t.date=new Date),this._history.push(t),this._lastRecord=t,this._history.length>this._historyMaxLen&&(this._history=this._history.slice(-this._historyMaxLen)))},t.prototype._isDupState=function(t){if(!this._lastRecord)return!1;for(var e in t)if(t.hasOwnProperty(e)&&"date"!==e&&t[e]!==this._lastRecord[e])return!1;return!0},t.prototype.routeMetric=function(){return this._routeMetric||this._noopMetric},t.prototype.setRouteMetric=function(t){this._routeMetric=t},t.prototype.queueMetric=function(){return this._queueMetric||this._noopMetric},t.prototype.setQueueMetric=function(t){this._queueMetric=t},t}(),rt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},at=w((function(t){var e;e=function(){function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t){return t.charAt(0).toUpperCase()+t.substring(1)}function n(t){return function(){return this[t]}}function i(t){if(t)for(var n=0;n<l.length;n++)void 0!==t[l[n]]&&this["set"+e(l[n])](t[l[n]])}var o=["isConstructor","isEval","isNative","isToplevel"],r=["columnNumber","lineNumber"],a=["fileName","functionName","source"],s=["args"],l=o.concat(r,a,s);i.prototype={getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(t){if(t instanceof i)this.evalOrigin=t;else{if(!(t instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new i(t)}},toString:function(){var t=this.getFileName()||"",e=this.getLineNumber()||"",n=this.getColumnNumber()||"",i=this.getFunctionName()||"";return this.getIsEval()?t?"[eval] ("+t+":"+e+":"+n+")":"[eval]:"+e+":"+n:i?i+" ("+t+":"+e+":"+n+")":t+":"+e+":"+n}},i.fromString=function(t){var e=t.indexOf("("),n=t.lastIndexOf(")"),o=t.substring(0,e),r=t.substring(e+1,n).split(","),a=t.substring(n+1);if(0===a.indexOf("@"))var s=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a,""),l=s[1],c=s[2],u=s[3];return new i({functionName:o,args:r||void 0,fileName:l,lineNumber:c||void 0,columnNumber:u||void 0})};for(var c=0;c<o.length;c++)i.prototype["get"+e(o[c])]=n(o[c]),i.prototype["set"+e(o[c])]=function(t){return function(e){this[t]=Boolean(e)}}(o[c]);for(var u=0;u<r.length;u++)i.prototype["get"+e(r[u])]=n(r[u]),i.prototype["set"+e(r[u])]=function(e){return function(n){if(!t(n))throw new TypeError(e+" must be a Number");this[e]=Number(n)}}(r[u]);for(var d=0;d<a.length;d++)i.prototype["get"+e(a[d])]=n(a[d]),i.prototype["set"+e(a[d])]=function(t){return function(e){this[t]=String(e)}}(a[d]);return i},t.exports=e()})),st=w((function(t){var e;e=function(t){var e=/(^|@)\S+:\d+/,n=/^\s*at .*(\S+:\d+|\(native\))/m,i=/^(eval@)?(\[native code])?$/;return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(n))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(t){return!!t.match(n)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),i=n.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(n=i?n.replace(i[0],""):n).split(/\s+/).slice(1),r=this.extractLocation(i?i[1]:o.pop()),a=o.join(" ")||void 0,s=["eval","<anonymous>"].indexOf(r[0])>-1?void 0:r[0];return new t({functionName:a,fileName:s,lineNumber:r[1],columnNumber:r[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(i)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,i=e.match(n),o=i&&i[1]?i[1]:void 0,r=this.extractLocation(e.replace(n,""));return new t({functionName:o,fileName:r[0],lineNumber:r[1],columnNumber:r[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,i=e.message.split("\n"),o=[],r=2,a=i.length;r<a;r+=2){var s=n.exec(i[r]);s&&o.push(new t({fileName:s[2],lineNumber:s[1],source:i[r]}))}return o},parseOpera10:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,i=e.stacktrace.split("\n"),o=[],r=0,a=i.length;r<a;r+=2){var s=n.exec(i[r]);s&&o.push(new t({functionName:s[3]||void 0,fileName:s[2],lineNumber:s[1],source:i[r]}))}return o},parseOpera11:function(n){return n.stack.split("\n").filter((function(t){return!!t.match(e)&&!t.match(/^Error created at/)}),this).map((function(e){var n,i=e.split("@"),o=this.extractLocation(i.pop()),r=i.shift()||"",a=r.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;r.match(/\(([^)]*)\)/)&&(n=r.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t({functionName:a,args:s,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}},t.exports=e(at)})),lt="object"==typeof console&&console.warn,ct=new RegExp(["^","\\[(\\$.+)\\]","\\s","([\\s\\S]+)","$"].join("")),ut=["Script error","Script error.","InvalidAccessError"],dt=new RegExp(["^","Uncaught\\s","(.+?)",":\\s","(.+)","$"].join("")),ht=w((function(t,e){var n="undefined"!=typeof self?self:rt,i=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();!function(t){!function(e){function n(t){return t&&DataView.prototype.isPrototypeOf(t)}function i(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function o(t){return"string"!=typeof t&&(t=String(t)),t}function r(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return b.iterable&&(e[Symbol.iterator]=function(){return e}),e}function a(t){this.map={},t instanceof a?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function s(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function l(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function c(t){var e=new FileReader,n=l(e);return e.readAsArrayBuffer(t),n}function u(t){var e=new FileReader,n=l(e);return e.readAsText(t),n}function d(t){for(var e=new Uint8Array(t),n=new Array(e.length),i=0;i<e.length;i++)n[i]=String.fromCharCode(e[i]);return n.join("")}function h(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:b.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:b.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:b.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():b.arrayBuffer&&b.blob&&n(t)?(this._bodyArrayBuffer=h(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):b.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||x(t))?this._bodyArrayBuffer=h(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):b.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},b.blob&&(this.blob=function(){var t=s(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?s(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(c)}),this.text=function(){var t=s(this);if(t)return t;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(d(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},b.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(t){var e=t.toUpperCase();return k.indexOf(e)>-1?e:t}function m(t,e){var n=(e=e||{}).body;if(t instanceof m){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new a(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new a(e.headers)),this.method=f(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function g(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(o))}})),e}function v(t){var e=new a;return t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),i=n.shift().trim();if(i){var o=n.join(":").trim();e.append(i,o)}})),e}function y(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new a(e.headers),this.url=e.url||"",this._initBody(t)}function _(t,n){return new Promise((function(i,o){function r(){s.abort()}var a=new m(t,n);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;s.onload=function(){var t={status:s.status,statusText:s.statusText,headers:v(s.getAllResponseHeaders()||"")};t.url="responseURL"in s?s.responseURL:t.headers.get("X-Request-URL");var e="response"in s?s.response:s.responseText;i(new y(e,t))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&b.blob&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",r),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",r)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}var b={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(b.arrayBuffer)var w=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],x=ArrayBuffer.isView||function(t){return t&&w.indexOf(Object.prototype.toString.call(t))>-1};a.prototype.append=function(t,e){t=i(t),e=o(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},a.prototype.delete=function(t){delete this.map[i(t)]},a.prototype.get=function(t){return t=i(t),this.has(t)?this.map[t]:null},a.prototype.has=function(t){return this.map.hasOwnProperty(i(t))},a.prototype.set=function(t,e){this.map[i(t)]=o(e)},a.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},a.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),r(t)},a.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),r(t)},a.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),r(t)},b.iterable&&(a.prototype[Symbol.iterator]=a.prototype.entries);var k=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},p.call(m.prototype),p.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var C=[301,302,303,307,308];y.redirect=function(t,e){if(-1===C.indexOf(e))throw new RangeError("Invalid status code");return new y(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}_.polyfill=!0,t.fetch||(t.fetch=_,t.Headers=a,t.Request=m,t.Response=y),e.Headers=a,e.Request=m,e.Response=y,e.fetch=_,Object.defineProperty(e,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=i;(e=o.fetch).default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e})),pt=b(ht),ft={unauthorized:new Error("airbrake: unauthorized: project id or key are wrong"),ipRateLimited:new Error("airbrake: IP is rate limited")},mt=0,gt=0,vt=!1;try{K=require("tdigest"),vt=!0}catch(t){}var yt=function(){function t(){this.count=0,this.sum=0,this.sumsq=0,this._td=new K.Digest}return t.prototype.add=function(t){0===t&&(t=1e-5),this.count+=1,this.sum+=t,this.sumsq+=t*t,this._td&&this._td.push(t)},t.prototype.toJSON=function(){return{count:this.count,sum:this.sum,sumsq:this.sumsq,tdigestCentroids:M(this._td)}},t}(),_t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.groups={},e}return e(n,t),n.prototype.addGroups=function(t,e){for(var n in this.add(t),e)e.hasOwnProperty(n)&&this.addGroup(n,e[n])},n.prototype.addGroup=function(t,e){var n=this.groups[t];n||(n=new yt,this.groups[t]=n),n.add(e)},n.prototype.toJSON=function(){return{count:this.count,sum:this.sum,sumsq:this.sumsq,tdigestCentroids:M(this._td),groups:this.groups}},n}(yt),bt=15e3,wt=function(){function t(t){void 0===t&&(t=""),this.method="",this.route="",this.query="",this.func="",this.file="",this.line=0,this.startTime=new Date,this.query=t}return t.prototype._duration=function(){return this.endTime||(this.endTime=new Date),this.endTime.getTime()-this.startTime.getTime()},t}(),xt=function(){function t(t){this._m={},this._opt=t,this._url=t.host+"/api/v5/projects/"+t.projectId+"/queries-stats?key="+t.projectKey,this._requester=j(t)}return t.prototype.start=function(t){return void 0===t&&(t=""),new wt(t)},t.prototype.notify=function(t){var e=this;if(vt&&this._opt.performanceStats&&this._opt.queryStats){var n=t._duration(),i=6e4,o=new Date(Math.floor(t.startTime.getTime()/i)*i),r={method:t.method,route:t.route,query:t.query,func:t.func,file:t.file,line:t.line,time:o},a=JSON.stringify(r),s=this._m[a];s||(s=new yt,this._m[a]=s),s.add(n),this._timer||(this._timer=setTimeout((function(){e._flush()}),bt))}},t.prototype._flush=function(){var t=[];for(var e in this._m)if(this._m.hasOwnProperty(e)){var n=JSON.parse(e),i=Y(Y({},n),this._m[e].toJSON());t.push(i)}this._m={},this._timer=null;var o=JSON.stringify({environment:this._opt.environment,queries:t}),r={method:"POST",url:this._url,body:o};this._requester(r).then((function(){})).catch((function(t){console.error&&console.error("can not report queries stats",t)}))},t}(),kt=15e3,Ct=function(t){function n(e){var n=t.call(this)||this;return n.queue=e,n.startTime=new Date,n}return e(n,t),n}(nt),St=function(){function t(t){this._m={},this._opt=t,this._url=t.host+"/api/v5/projects/"+t.projectId+"/queues-stats?key="+t.projectKey,this._requester=j(t)}return t.prototype.notify=function(t){var e=this;if(vt&&this._opt.performanceStats&&this._opt.queueStats){var n=t._duration();0===n&&(n=1e-5);var i=6e4,o=new Date(Math.floor(t.startTime.getTime()/i)*i),r={queue:t.queue,time:o},a=JSON.stringify(r),s=this._m[a];s||(s=new _t,this._m[a]=s),s.addGroups(n,t._groups),this._timer||(this._timer=setTimeout((function(){e._flush()}),kt))}},t.prototype._flush=function(){var t=[];for(var e in this._m)if(this._m.hasOwnProperty(e)){var n=JSON.parse(e),i=Y(Y({},n),this._m[e].toJSON());t.push(i)}this._m={},this._timer=null;var o=JSON.stringify({environment:this._opt.environment,queues:t}),r={method:"POST",url:this._url,body:o};this._requester(r).then((function(){})).catch((function(t){console.error&&console.error("can not report queues breakdowns",t)}))},t}(),Tt=15e3,Et=function(t){function n(e,n,i,o){void 0===e&&(e=""),void 0===n&&(n=""),void 0===i&&(i=0),void 0===o&&(o="");var r=t.call(this)||this;return r.method=e,r.route=n,r.statusCode=i,r.contentType=o,r.startTime=new Date,r}return e(n,t),n}(nt),$t=function(){function t(t){this._m={},this._opt=t,this._url=t.host+"/api/v5/projects/"+t.projectId+"/routes-stats?key="+t.projectKey,this._requester=j(t)}return t.prototype.notify=function(t){var e=this;if(vt&&this._opt.performanceStats){var n=t._duration(),i=6e4,o=new Date(Math.floor(t.startTime.getTime()/i)*i),r={method:t.method,route:t.route,statusCode:t.statusCode,time:o},a=JSON.stringify(r),s=this._m[a];s||(s=new yt,this._m[a]=s),s.add(n),this._timer||(this._timer=setTimeout((function(){e._flush()}),Tt))}},t.prototype._flush=function(){var t=[];for(var e in this._m)if(this._m.hasOwnProperty(e)){var n=JSON.parse(e),i=Y(Y({},n),this._m[e].toJSON());t.push(i)}this._m={},this._timer=null;var o=JSON.stringify({environment:this._opt.environment,routes:t}),r={method:"POST",url:this._url,body:o};this._requester(r).then((function(){})).catch((function(t){console.error&&console.error("can not report routes stats",t)}))},t}(),Dt=function(){function t(t){this._m={},this._opt=t,this._url=t.host+"/api/v5/projects/"+t.projectId+"/routes-breakdowns?key="+t.projectKey,this._requester=j(t)}return t.prototype.notify=function(t){var e=this;if(vt&&this._opt.performanceStats&&!(t.statusCode<200||t.statusCode>=300&&t.statusCode<400||404===t.statusCode||0===Object.keys(t._groups).length)){var n=t._duration();0===n&&(n=1e-5);var i=6e4,o=new Date(Math.floor(t.startTime.getTime()/i)*i),r={method:t.method,route:t.route,responseType:this._responseType(t),time:o},a=JSON.stringify(r),s=this._m[a];s||(s=new _t,this._m[a]=s),s.addGroups(n,t._groups),this._timer||(this._timer=setTimeout((function(){e._flush()}),Tt))}},t.prototype._flush=function(){var t=[];for(var e in this._m)if(this._m.hasOwnProperty(e)){var n=JSON.parse(e),i=Y(Y({},n),this._m[e].toJSON());t.push(i)}this._m={},this._timer=null;var o=JSON.stringify({environment:this._opt.environment,routes:t}),r={method:"POST",url:this._url,body:o};this._requester(r).then((function(){})).catch((function(t){console.error&&console.error("can not report routes breakdowns",t)}))},t.prototype._responseType=function(t){return t.statusCode>=500?"5xx":t.statusCode>=400?"4xx":t.contentType?t.contentType.split(";")[0].split("/")[-1]:""},t}(),At="airbrake-js/browser",jt="2.1.4",Mt="https://github.com/airbrake/airbrake-js/tree/master/packages/browser",It="2020-06-18",Pt=6e5,Ot={notifier_name:At,notifier_version:jt,os:"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:void 0,language:"JavaScript"},Nt="errors",Lt="apm",Ft=function(){function t(t){this._opt=t,this._requester=j(t),this._data=new Rt(t.projectId,{project_id:null,poll_sec:0,updated_at:0,config_route:"",settings:[]}),this._origErrorNotifications=t.errorNotifications,this._origPerformanceStats=t.performanceStats}return t.prototype.poll=function(){var t=this,e=setInterval((function(){t._doRequest(),clearInterval(e)}),0);return setInterval(this._doRequest.bind(this),Pt)},t.prototype._doRequest=function(){var t=this;this._requester(this._requestParams(this._opt)).then((function(e){t._data.merge(e.json),t._opt.host=t._data.errorHost(),t._opt.apmHost=t._data.apmHost(),t._processErrorNotifications(t._data),t._processPerformanceStats(t._data)})).catch((function(){}))},t.prototype._requestParams=function(t){return{method:"GET",url:this._pollUrl(t),headers:{Accept:"application/json","Cache-Control":"no-cache,no-store"}}},t.prototype._pollUrl=function(t){for(var e=this._data.configRoute(t.remoteConfigHost),n="?",i=0,o=this._entries(Ot);i<o.length;i++){var r=o[i],a=r[0],s=r[1];n+="&"+encodeURIComponent(a)+"="+encodeURIComponent(s)}return e+n},t.prototype._processErrorNotifications=function(t){this._origErrorNotifications&&(this._opt.errorNotifications=t.errorNotifications())},t.prototype._processPerformanceStats=function(t){this._origPerformanceStats&&(this._opt.performanceStats=t.performanceStats())},t.prototype._entries=function(t){for(var e=Object.keys(t),n=e.length,i=new Array(n);n--;)i[n]=[e[n],t[e[n]]];return i},t}(),Rt=function(){function t(t,e){this._projectId=t,this._data=e}return t.prototype.merge=function(t){this._data=Y(Y({},this._data),t)},t.prototype.configRoute=function(t){var e=t.replace(/\/$/,""),n=this._data.config_route;return null==n||""===n?e+"/"+It+"/config/"+this._projectId+"/config.json":e+"/"+n},t.prototype.errorNotifications=function(){var t=this._findSetting(Nt);return null===t||t.enabled},t.prototype.performanceStats=function(){var t=this._findSetting(Lt);return null===t||t.enabled},t.prototype.errorHost=function(){var t=this._findSetting(Nt);return null===t?null:t.endpoint},t.prototype.apmHost=function(){var t=this._findSetting(Lt);return null===t?null:t.endpoint},t.prototype._findSetting=function(t){var e=this._data.settings;if(null==e)return null;var n=e.find((function(e){return e.name===t}));return void 0===n?null:n},t}(),qt=function(){function t(t){var e=this;if(this._filters=[],this._performanceFilters=[],this._scope=new ot,this._onClose=[],!t.projectId||!t.projectKey)throw new Error("airbrake: projectId and projectKey are required");if(this._opt=t,this._opt.host=this._opt.host||"https://api.airbrake.io",this._opt.remoteConfigHost=this._opt.remoteConfigHost||"https://notifier-configs.airbrake.io",this._opt.apmHost=this._opt.apmHost||"https://api.airbrake.io",this._opt.timeout=this._opt.timeout||1e4,this._opt.keysBlocklist=this._opt.keysBlocklist||[/password/,/secret/],this._url=this._opt.host+"/api/v3/projects/"+this._opt.projectId+"/notices?key="+this._opt.projectKey,this._opt.errorNotifications=!1!==this._opt.errorNotifications,this._opt.performanceStats=!1!==this._opt.performanceStats,this._opt.queryStats=!1!==this._opt.queryStats,this._opt.queueStats=!1!==this._opt.queueStats,this._opt.remoteConfig=!1!==this._opt.remoteConfig,this._processor=this._opt.processor||k,this._requester=j(this._opt),this.addFilter(T),this.addFilter(S()),this.addFilter(E),this.addFilter(C),this.addFilter((function(t){return t.context.notifier={name:At,version:jt,url:Mt},e._opt.environment&&(t.context.environment=e._opt.environment),t})),this.routes=new Bt(this),this.queues=new Ht(this),this.queries=new xt(this._opt),this._opt.remoteConfig){var n=new Ft(this._opt).poll();this._onClose.push((function(){return clearInterval(n)}))}}return t.prototype.close=function(){for(var t=0,e=this._onClose;t<e.length;t++){(0,e[t])()}},t.prototype.scope=function(){return this._scope},t.prototype.setActiveScope=function(t){this._scope=t},t.prototype.addFilter=function(t){this._filters.push(t)},t.prototype.addPerformanceFilter=function(t){this._performanceFilters.push(t)},t.prototype.notify=function(t){var e={errors:[],context:Y(Y({severity:"error"},this.scope().context()),t.context),params:t.params||{},environment:t.environment||{},session:t.session||{}};if("object"==typeof t&&void 0!==t.error||(t={error:t}),
!this._opt.errorNotifications)return e.error=new Error("airbrake: not sending this error, errorNotifications is disabled err="+JSON.stringify(t.error)),s.resolve(e);if(!t.error)return e.error=new Error("airbrake: got err="+JSON.stringify(t.error)+", wanted an Error"),s.resolve(e);var n=this._processor(t.error);e.errors.push(n);for(var i=0,o=this._filters;i<o.length;i++){var r=(0,o[i])(e);if(null===r)return e.error=new Error("airbrake: error is filtered"),s.resolve(e);e=r}return e.context||(e.context={}),e.context.language="JavaScript",this._sendNotice(e)},t.prototype._sendNotice=function(t){var e=f(t,{keysBlocklist:this._opt.keysBlocklist});if(this._opt.reporter){if("function"==typeof this._opt.reporter)return this._opt.reporter(t);console.warn("airbrake: options.reporter must be a function")}var n={method:"POST",url:this._url,body:e};return this._requester(n).then((function(e){return t.id=e.json.id,t.url=e.json.url,t})).catch((function(e){return t.error=e,t}))},t.prototype.wrap=function(t,e){if(void 0===e&&(e=[]),t._airbrake)return t;var n=this,i=function(){var e=Array.prototype.slice.call(arguments),i=n._wrapArguments(e);try{return t.apply(this,i)}catch(t){throw n.notify({error:t,params:{arguments:e}}),n._ignoreNextWindowError(),t}};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);for(var r=0,a=e;r<a.length;r++){o=a[r];t.hasOwnProperty(o)&&(i[o]=t[o])}return i._airbrake=!0,i.inner=t,i},t.prototype._wrapArguments=function(t){for(var e=0;e<t.length;e++){var n=t[e];"function"==typeof n&&(t[e]=this.wrap(n))}return t},t.prototype._ignoreNextWindowError=function(){},t.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.wrap(t).apply(this,Array.prototype.slice.call(arguments,1))},t}(),Bt=function(){function t(t){this._notifier=t,this._routes=new $t(t._opt),this._breakdowns=new Dt(t._opt),this._opt=t._opt}return t.prototype.start=function(t,e,n,i){void 0===t&&(t=""),void 0===e&&(e=""),void 0===n&&(n=0),void 0===i&&(i="");var o=new Et(t,e,n,i);if(!this._opt.performanceStats)return o;var r=this._notifier.scope().clone();return r.setContext({httpMethod:t,route:e}),r.setRouteMetric(o),this._notifier.setActiveScope(r),o},t.prototype.notify=function(t){if(this._opt.performanceStats){t.end();for(var e=0,n=this._notifier._performanceFilters;e<n.length;e++){if(null===(0,n[e])(t))return}this._routes.notify(t),this._breakdowns.notify(t)}},t}(),Ht=function(){function t(t){this._notifier=t,this._queues=new St(t._opt),this._opt=t._opt}return t.prototype.start=function(t){var e=new Ct(t);if(!this._opt.performanceStats)return e;var n=this._notifier.scope().clone();return n.setContext({queue:t}),n.setQueueMetric(e),this._notifier.setActiveScope(n),e},t.prototype.notify=function(t){this._opt.performanceStats&&(t.end(),this._queues.notify(t))},t}(),Ut=["debug","log","info","warn","error"],zt=["type","name","src"],Wt="",Qt=function(t){function n(e){var n=t.call(this,e)||this;return n.offline=!1,n.todo=[],n._ignoreWindowError=0,n._ignoreNextXHR=0,"undefined"==typeof window||(n.addFilter(I),window.addEventListener&&(n.onOnline=n.onOnline.bind(n),window.addEventListener("online",n.onOnline),n.onOffline=n.onOffline.bind(n),window.addEventListener("offline",n.onOffline),n.onUnhandledrejection=n.onUnhandledrejection.bind(n),window.addEventListener("unhandledrejection",n.onUnhandledrejection),n._onClose.push((function(){window.removeEventListener("online",n.onOnline),window.removeEventListener("offline",n.onOffline),window.removeEventListener("unhandledrejection",n.onUnhandledrejection)}))),n._instrument(e.instrumentation)),n}return e(n,t),n.prototype._instrument=function(t){if(void 0===t&&(t={}),void 0===t.console&&(t.console=!Q(this._opt.environment)),V(t.onerror)){var e=this,n=window.onerror;window.onerror=function(){n&&n.apply(this,arguments),e.onerror.apply(e,arguments)}}O(this),V(t.fetch)&&"function"==typeof fetch&&B(this),V(t.history)&&"object"==typeof history&&U(this),V(t.console)&&"object"==typeof console&&P(this),V(t.xhr)&&"undefined"!=typeof XMLHttpRequest&&W(this)},n.prototype.notify=function(e){var n=this;return this.offline?new s((function(t,i){for(n.todo.push({err:e,resolve:t,reject:i});n.todo.length>100;){var o=n.todo.shift();if(void 0===o)break;o.resolve({error:new Error("airbrake: offline queue is too large")})}})):t.prototype.notify.call(this,e)},n.prototype.onOnline=function(){this.offline=!1;for(var t=function(t){e.notify(t.err).then((function(e){t.resolve(e)}))},e=this,n=0,i=this.todo;n<i.length;n++){t(i[n])}this.todo=[]},n.prototype.onOffline=function(){this.offline=!0},n.prototype.onUnhandledrejection=function(t){var e=t.reason||t.detail&&t.detail.reason;if(e){var n=e.message||String(e);n.indexOf&&0===n.indexOf("airbrake: ")||("object"==typeof e&&void 0!==e.error?this.notify(Y(Y({},e),{context:{unhandledRejection:!0}})):this.notify({error:e,context:{unhandledRejection:!0}}))}},n.prototype.onerror=function(t,e,n,i,o){this._ignoreWindowError>0||(o?this.notify({error:o,context:{windowError:!0}}):e&&n&&this.notify({error:{message:t,fileName:e,lineNumber:n,columnNumber:i,noStack:!0},context:{windowError:!0}}))},n.prototype._ignoreNextWindowError=function(){var t=this;this._ignoreWindowError++,setTimeout((function(){return t._ignoreWindowError--}))},n}(qt);t.BaseNotifier=qt,t.Notifier=Qt,t.QueryInfo=wt,t.Scope=ot,Object.defineProperty(t,"__esModule",{value:!0})})),jQuery(window).ready((function(){Atropos()}));var _arr={};if(jQuery().mediaelementplayer&&jQuery("video").length>0&&jQuery(".fullscreenbanner video").length<1&&jQuery(".fullwidthbanner video").length<1){function eventClickTrigger(){jQuery("video").trigger("click")}jQuery("video").mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:"100%",videoHeight:"100%",audioWidth:400,audioHeight:30,startVolume:.8,loop:!0,enableAutosize:!0,features:["playpause","progress","current","duration","tracks","volume","fullscreen"],alwaysShowControls:!1,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,enableKeyboard:!0,pauseOtherPlayers:!0,keyActions:[]}),setTimeout("eventClickTrigger()",1e3);var vid_w_orig,vid_h_orig,min_w=300;function resizeToCover(){jQuery(".video-wrap").width(jQuery(window).width()),jQuery(".video-wrap").height(jQuery(window).height());var t=jQuery(window).width()/vid_w_orig,e=jQuery(window).height()/vid_h_orig,n=t>e?t:e;n*vid_w_orig<min_w&&(n=min_w/vid_w_orig),jQuery("video, source").width(n*vid_w_orig),jQuery("video, source").height(n*vid_h_orig),jQuery(".video-wrap").scrollLeft((jQuery("video").width()-jQuery(window).width())/2),jQuery(".video-wrap").scrollTop((jQuery("video").height()-jQuery(window).height())/2)}jQuery((function(){vid_w_orig=parseInt(jQuery("video, source").attr("width")),vid_h_orig=parseInt(jQuery("video, source").attr("height")),jQuery(window).resize((function(){resizeToCover()}))}))}jQuery("div.fb-like").length>0&&(jQuery("body").append('<div id="fb-root"></div>'),function(t,e,n){var i,o=t.getElementsByTagName(e)[0];t.getElementById(n)||((i=t.createElement(e)).id=n,i.src="//connect.facebook.net/en_US/all.js#xfbml=1",o.parentNode.insertBefore(i,o))}(document,"script","facebook-jssdk")),jQuery("div.g-plusone").length>0&&function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://apis.google.com/js/platform.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}(),jQuery("a.twitter-share-button").length>0&&function(t,e,n){var i,o=t.getElementsByTagName(e)[0];t.getElementById(n)||((i=t.createElement(e)).id=n,i.src="https://platform.twitter.com/widgets.js",o.parentNode.insertBefore(i,o))}(document,"script","twitter-wjs"),function(t){"use strict";var e,n={action:function(){},runOnLoad:!1,duration:500},i=!1,o={init:function(){for(var t=0;t<=arguments.length;t++){var e=arguments[t];switch(typeof e){case"function":n.action=e;break;case"boolean":n.runOnLoad=e;break;case"number":n.duration=e}}return this.each((function(){n.runOnLoad&&n.action(),jQuery(this).resize((function(){o.timedAction.call(this)}))}))},timedAction:function(t,o){var r=function(){var t=n.duration;if(i){var o=new Date-e;if((t=n.duration-o)<=0)return clearTimeout(i),i=!1,void n.action()}a(t)},a=function(t){i=setTimeout(r,t)};e=new Date,"number"==typeof o&&(n.duration=o),"function"==typeof t&&(n.action=t),i||r()}};t.fn.afterResize=function(t){return o[t]?o[t].apply(this,Array.prototype.slice.call(arguments,1)):o.init.apply(this,arguments)}}(jQuery),function(t){function e(t,e){return t.toFixed(e.decimals)}t.fn.countTo=function(e){return e=e||{},jQuery(this).each((function(){function n(){c++,i(u+=a),"function"==typeof o.onUpdate&&o.onUpdate.call(s,u),c>=r&&(l.removeData("countTo"),clearInterval(d.interval),u=o.to,"function"==typeof o.onComplete&&o.onComplete.call(s,u))}function i(t){var e=o.formatter.call(s,t,o);l.html(e)}var o=jQuery.extend({},t.fn.countTo.defaults,{from:jQuery(this).data("from"),to:jQuery(this).data("to"),speed:jQuery(this).data("speed"),refreshInterval:jQuery(this).data("refresh-interval"),decimals:jQuery(this).data("decimals")},e),r=Math.ceil(o.speed/o.refreshInterval),a=(o.to-o.from)/r,s=this,l=jQuery(this),c=0,u=o.from,d=l.data("countTo")||{};l.data("countTo",d),d.interval&&clearInterval(d.interval),d.interval=setInterval(n,o.refreshInterval),i(u)}))},t.fn.countTo.defaults={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:e,onUpdate:null,onComplete:null}}(jQuery),function(){"use strict";jQuery.fn.fitVids=function(t){var e={customSelector:null};if(!document.getElementById("fit-vids-style")){var n=document.createElement("div"),i=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];n.className="fit-vids-style",n.id="fit-vids-style",n.style.display="none",n.innerHTML="&shy;<style>                 .fluid-width-video-wrapper {                   width: 100%;                                position: relative;                         padding: 0;                              }                                                                                       .fluid-width-video-wrapper iframe,          .fluid-width-video-wrapper object,          .fluid-width-video-wrapper embed {             position: absolute;                         top: 0;                                     left: 0;                                    width: 100%;                                height: 100%;                            }                                         </style>",i.parentNode.insertBefore(n,i)}return t&&jQuery.extend(e,t),this.each((function(){var t=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];e.customSelector&&t.push(e.customSelector);var n=jQuery(this).find(t.join(","));(n=n.not("object object")).each((function(){var t=jQuery(this);if(!("embed"===this.tagName.toLowerCase()&&t.parent("object").length||t.parent(".fluid-width-video-wrapper").length)){var e=("object"===this.tagName.toLowerCase()||t.attr("height")&&!isNaN(parseInt(t.attr("height"),10))?parseInt(t.attr("height"),10):t.height())/(isNaN(parseInt(t.attr("width"),10))?t.width():parseInt(t.attr("width"),10));if(!t.attr("id")){var n="fitvid"+Math.floor(999999*Math.random());t.attr("id",n)}t.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*e+"%"),t.removeAttr("height").removeAttr("width")}}))}))}}(),jQuery.fn.unFitVids=function(){var t=jQuery(this).attr("id"),e=jQuery("#"+t+" .fluid-width-video-wrapper").children().clone();jQuery("#"+t+" .fluid-width-video-wrapper").remove(),jQuery("#"+t).append(e)},function(t){var e="waitForImages";t.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"]},t.expr[":"].uncached=function(e){if(!t(e).is('img[src!=""]'))return!1;var n=new Image;return n.src=e.src,!n.complete},t.fn.waitForImages=function(n,i,o){var r=0,a=0;if(t.isPlainObject(arguments[0])&&(o=arguments[0].waitForAll,i=arguments[0].each,n=arguments[0].finished),n=n||t.noop,i=i||t.noop,o=!!o,!t.isFunction(n)||!t.isFunction(i))throw new TypeError("An invalid callback was supplied.");return this.each((function(){var s=t(this),l=[],c=t.waitForImages.hasImageProperties||[],u=/url\(\s*(['"]?)(.*?)\1\s*\)/g;o?s.find("*").addBack().each((function(){var e=t(this);e.is("img:uncached")&&l.push({src:e.attr("src"),element:e[0]}),t.each(c,(function(t,n){var i,o=e.css(n);if(!o)return!0;for(;i=u.exec(o);)l.push({src:i[2],element:e[0]})}))})):s.find("img:uncached").each((function(){l.push({src:this.src,element:this})})),r=l.length,a=0,0===r&&n.call(s[0]),t.each(l,(function(o,l){var c=new Image;t(c).on("load."+e+" error."+e,(function(t){if(a++,i.call(l.element,a,r,"load"==t.type),a==r)return n.call(s[0]),!1})),c.src=l.src}))}))}}(jQuery),$(window).ready((function(){var t=!1;$("#topMain li.dropdown > a, #topMain li.dropdown-submenu > a").bind("click",(function(e){"#"==$(this).attr("href")&&e.preventDefault(),e.stopPropagation(),$(window).width()>979||(t=$(this).parent().hasClass("resp-active"),$("#topMain").find(".resp-active").removeClass("resp-active"),t||$(this).parents("li").addClass("resp-active"))}))})),function(){function t(t){$(t).removeClass("btn-primary").addClass("btn-success").html('<i class="fa fa-check"></i> <span class="copy-link-btn__label">\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e</span>')}function e(t){$(t).removeClass("btn-success").addClass("btn-primary").html('<i class="fa fa-clone"></i> <span class="copy-link-btn__label">\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c</span>')}function n(t){$(t).addClass("has-success")}function i(t){$(t).removeClass("has-success")}function o(t,e){return"undefined"!=typeof ClipboardJS&&(!!t&&!!e)}function r(o,r){var a=new ClipboardJS(o);$(o).click((function(){this.disabled=!0})),a.on("success",(function(){n(r),t(o),setTimeout((function(){i(r),e(o),o.disabled=!1}),1500)}))}document.addEventListener("DOMContentLoaded",(function(){var t=document.querySelector('[data-role="copy-link-form-group"]'),e=document.querySelector('[data-action="copy-link-btn"]');o(e,t)&&r(e,t)}))}(),function(){function t(){return new URL(window.location.href).searchParams.get("modal")}document.addEventListener("DOMContentLoaded",(function(){var e=t();if(e){var n=document.getElementById(e);n?(console.log("Found a request to open a modal with id '"+e+"', opening\u2026"),$(n).modal("show")):console.error("A modal with id '"+e+"' was requested to be open, but no such HTML element is at page")}}))}(),QUESTS_TO_COMPARE_IDS="quests_to_compare_ids",function(){function t(){return document.getElementById("header_shadow")}function e(){return $(window).scrollTop()<70}function n(){return $(window).width()>=h}function i(){y["mobile:expands"]||(p.classList.remove("mobile-collapsed"),t().classList.remove("mobile-collapsed"),f.trigger("mobile:expands"),y["mobile:expands"]=!0,y["mobile:collapses"]=!1)}function o(){y["mobile:collapses"]||(p.classList.add("mobile-collapsed"),t().classList.add("mobile-collapsed"),f.trigger("mobile:collapses"),y["mobile:collapses"]=!0,y["mobile:expands"]=!1)}function r(){y["desktop:expands"]||(m.classList.add("navbar__desktop-expanded"),m.classList.remove("navbar__desktop-collapsed"),f.trigger("desktop:expands"),y["desktop:expands"]=!0,y["desktop:collapses"]=!1)}function a(){y["desktop:collapses"]||(m.classList.add("navbar__desktop-collapsed"),m.classList.remove("navbar__desktop-expanded"),f.trigger("desktop:collapses"),y["desktop:collapses"]=!0,y["desktop:expands"]=!1)}function s(){n()?c()?r():a():l()?i():o()}function l(){return"up"===v||(!!n()||!!e())}function c(){return"up"===v||(!n()||!!e())}function u(){var t=$(window).scrollTop(),e="none";return t>g&&(e="down"),t<g&&(e="up"),g=t,e}function d(){v=u(),s()}var h=430,p=document.getElementById("topNav"),f=$(p),m=document.querySelector(".navbar__stripe"),g=($(m),$(window).scrollTop()),v="none",y={"desktop:expands":!1,"desktop:collapses":!1,"mobile:expands":!1,"mobile:collapses":!1};p&&($(document).ready((function(){s()})),$(window).scroll(throttle(d,300,{leading:!0,trailing:!0})))}.call(this),window.slideAnotherTime=function(){$("#another-time").slideToggle(100)},window.slideClientComment=function(){$("#client-comment-block").slideToggle(100)},window.slideReviewBlock=function(){$("#review-block").slideToggle(100)},window.slide10MarkFields=function(){$("#client-mark-10-fields").slideToggle(100)},window.clearAllFields=function(){$("#order_client_comment").val(""),$("textarea.client-comment-block__comment-variant").val(""),$("#order_client_date").val(""),$("#order_client_time").val(""),$("#client_f_quality_of_puzzle").val(""),$("#client_mark_10").val(""),$("#client_f_entourage").val(""),$("#client_f_service").val(""),$("#client_f_safety").val(""),$("input[name=choosen_client_comment][type=radio]").prop("checked",!1)},window.toggleReviewForms=function(){clearAllFields(),(!$("#feedback_another_time").prop("checked")&&$("#another-time").is(":visible")||$("#feedback_another_time").prop("checked")&&!$("#another-time").is(":visible"))&&slideAnotherTime(),(!$("#feedback_not_visited").prop("checked")&&$("#client-comment-block").is(":visible")||$("#feedback_not_visited").prop("checked")&&!$("#client-comment-block").is(":visible"))&&slideClientComment(),($("#feedback_not_visited").prop("checked")&&$("#client-players-block").is(":visible")||!$("#feedback_not_visited").prop("checked")&&!$("#client-players-block").is(":visible"))&&$("#client-players-block").slideToggle()},$(document).ready((function(){$("#client-comment-block").hide(),$("#order_client_time").inputmask("h:s",{placeholder:"\u0447\u0447:\u043c\u043c"}),$("#order_client_date").inputmask("y-m-d",{placeholder:"\u0433\u0433\u0433\u0433-\u043c\u043c-\u0434\u0434"}),$("#order_client_date").datepicker({autoclose:!0,format:"yyyy-mm-dd",endDate:"0d",language:"ru"}),$('input[name="order[is_visited_client]"]').on("change",(function(){toggleReviewForms(),$("#feedback_another_time").prop("checked")?($("#order_client_date").prop("required",!0),$("#order_client_time").prop("required",!0)):($("#order_client_date").prop("required",!1),$("#order_client_time").prop("required",!1))})),toggleReviewForms()})),$(document).ready((function(){var t=$("#integration_timetable");t.on("ajax:beforeSend",(function(){$("#result").fadeOut("fast").html(""),$(this).find(".input-group").removeClass("has-error"),$(this).find(".input-group").removeClass("has-success"),$(this).find('button[type="submit"]').html('<i class="fa fa-clock-o"></i> &nbsp; \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435...'),$(this).find("input,button").attr("disabled",!0)})),t.on("ajax:complete",(function(){$(this).find('button[type="submit"]').html("\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435"),$(this).find("input,button").removeAttr("disabled")})),t.on("ajax:success",(function(){$(this).find(".input-group").addClass("has-success")})),t.on("ajax:error",(function(){$(this).find(".input-group").addClass("has-error"),$(this).find(".input-group").tooltip({title:"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435",trigger:"click"}).tooltip("show")}));var e=$("#integration_booking");e.on("ajax:beforeSend",(function(){$("#result").fadeOut("fast").html(""),$(this).find(".input-group").removeClass("has-error"),$(this).find(".input-group").removeClass("has-success"),$(this).find('button[type="submit"]').html('<i class="fa fa-clock-o"></i> &nbsp; \u041f\u043e\u0441\u044b\u043b\u0430\u0435\u043c callback...'),$(this).find("input,button").attr("disabled",!0)})),e.on("ajax:complete",(function(){$(this).find('button[type="submit"]').html("\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c callback"),$(this).find("input,button").removeAttr("disabled")})),e.on("ajax:success",(function(){$(this).find(".input-group").addClass("has-success")})),e.on("ajax:error",(function(){$(this).find(".input-group").addClass("has-error"),$(this).find(".input-group").tooltip({title:"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c JSON-\u043e\u0442\u0432\u0435\u0442 \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430",trigger:"click"}).tooltip("show")})),$("#integration_phone").inputmask("+7 (999) 999-99-99"),$("#integration_date").inputmask("9999-99-99"),$("#integration_time").inputmask("99:99")})),$(document).on("keydown","#review_comment",(function(t){is_CtrlEnter(t)&&(t.preventDefault(),$("#new_review").submit())})),$(document).on("keydown",(function(t){is_CtrlEnter(t)&&(t.preventDefault(),fetch_pre_filled_typo_modal())})),$("#report_link").click((function(){fetch_pre_filled_typo_modal()}));var map_container_div_id="map-container",YandexMaps_API_key="ea5ff49d-7a52-45d8-aa2a-095e6b79ac67",YandexMapsAPIendpoint="https://api-maps.yandex.ru/2.1/?lang=ru_RU&apikey="+YandexMaps_API_key,GoogleMaps_API_key="AIzaSyD4CV8ryVsgWT3h4CkzN3OIfMpLWWwzrCc",GoogleMapsAPIendpoint="https://maps.google.com/maps/api/js?key="+GoogleMaps_API_key,cluster_icon_path="/map-icons/m",default_map_zoom=12,max_clusterization_zoom=14;!function(){function t(t,e){return new ymaps.Map(map_container_div_id,{center:[t.latitude,t.longitude],controls:["geolocationControl","trafficControl","fullscreenControl","zoomControl"],zoom:e})}function e(t){return t.map((function(t){return new ymaps.GeoObject({geometry:{type:"Point",coordinates:[t.latitude,t.longitude]},properties:{clusterCaption:t.name,balloonContentBody:t.content}},{preset:"islands#nightCircleDotIcon"})}))}function n(){var n=get_map_center_from_page(),r=get_map_zoom_from_page()||i,a=get_locations_from_page(),s=t(n,r),l=e(a);s.behaviors.disable("scrollZoom"),s.events.add("click",(function(){s.balloon.close()})),s.geoObjects.events.add("balloonopen",(function(){load_lazy_balloon_image()}));var c=new ymaps.Clusterer({maxZoom:o});c.add(l),s.geoObjects.add(c)}var i=10,o=13;window.renderYandexMap=n}(),$("img.lazyload").lazyload({threshold:1e3}),$(document).ready((function(){function t(t){var n=$("#quest").data("url")+"?city_id="+$("#city_id").val();t=void 0!==t&&t,$.ajax({url:n,dataType:"json",beforeSend:function(){$("#quest").attr("disabled","disabled")},success:function(t){$("#quest").find('option:not([value=""])').remove(),$.each(t,(function(t,e){$("#quest").append("<option value="+e.id+">"+e.name+"</option>")}))},complete:function(){$("#quest").removeAttr("disabled"),t||e()}})}function e(){$(".form-group").removeClass("has-error"),$(".alert.alert-block").fadeOut(150),$("span.help-block").fadeOut(150)}$('a[data-www!=""][data-www]').on("click",(function(){$(this).attr("href",$(this).data("www"))}));new SmoothScroll("a[data-scroll]",{header:"#topNav",speed:400,easing:"easeOutQuart"});$("select.select2").select2({language:"ru",theme:"bootstrap",width:"100%"}),$("select.select2ws").select2({language:"ru",theme:"bootstrap",minimumResultsForSearch:-1,width:"100%"}),$(window).width()>1024&&$('[data-toggle="tooltip"]').tooltip({container:"body"}),$('[data-toggle="tooltip-with-image"]').tooltip({container:"body",html:!0,placement:"bottom",template:'<div class="tooltip tooltip-with-image" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'}),$("#city_id").length&&""!=$("#city_id").val()&&t(!0),$("#city_id").change((function(){if(""==$(this).val())return $("#quest").find('option:not([value=""])').remove(),!1;t()})),$("#quest").change((function(){if(""==$(this).val())return!1;e()})),$('a[data-link!=""][data-link]').on("click",(function(){var t=$(this).data("link");$(this).attr("href",t)})),$(document).on("ajax:send","form[data-remote=true]",(function(){var t=$(this),e=t.find(".disable-after-ajax-complete");e.length&&(t.on("ajax:complete",(function(){setTimeout((function(){e.each((function(){Rails.disableElement(this)}))}),1)})),$(document).one("turbolinks:before-cache",(function(){e.each((function(){Rails.enableElement(this)}))})))}))})),function(){function t(t){if(isNaN(t))throw new Error("percent must be numeric");var e=document.getElementById(s);if(!e)throw new Error("progress bar with ID \u201c"+s+"\u201d not found in page");e.value=t;var n=document.querySelector('[data-progressbar-id="'+s+'"]');if(!n)throw new Error("tooltip spen with [data-progressbar-id="+s+"] not found in page");n.innerText=t+"\u2009%",t>50?(n.style.left=null,n.style.right=100-t+"%"):(n.style.right=null,n.style.left=t+"%")}function e(){if($loader=$(".loader"),"\u0421\u0432\u043e\u0439 \u0434\u0438\u0437\u0430\u0439\u043d"===$("#gift_gift_style_id").find("option:selected").text()&&!$("#gift_image").val())return $("#gift_image_presence_error").show(),void $loader.hide();$giftPreview=$("#gift_preview"),$.ajax({url:"/gifts/preview",data:new FormData($("#new_gift")[0]),processData:!1,contentType:!1,type:"POST",beforeSend:function(){$giftPreview.hide(),$loader.show()},success:function(t){$giftPreview.attr("src",t.preview_url),$giftPreview.show(),$loader.hide()},error:function(t){if(t.responseJSON){var e=t.responseJSON;alert("\u041e\u0448\u0438\u0431\u043a\u0430: "+e.error)}}})}function n(e,n){var i=$(".add-and-get-more");$(".loader-inner").show(),i.html('<div class="loader-inner ball-pulse"><div></div><div></div><div></div></div>'),$.ajax({url:"/gifts/availiable_quests",dataType:"json",data:JSON.stringify({price:parseInt(e.val()),gift_variant_id:parseInt(n.val())}),type:"POST",processData:!1,contentType:"application/json; charset=UTF-8",success:function(e){t(e.percents),$(".gift-new__comparison").html(e.count_txt),i.html(e.add_and_get_more_txt)}})}function i(){e()}function o(t,e){e.preventDefault(),type=$(t).attr("data-type");var i=$("input[name='gift[gift_price]']"),o=$("#gift_gift_variant_id");if(!i.is(t)){var a=parseInt(i.val()),s=$(".gift-price"),l=parseInt(i[0].step),c=parseInt(i[0].min);isNaN(a)?i.val(0):"minus"==type?a-l>c&&(s.html(a-l),i.val(a-l).change()):"plus"==type&&(s.html(a+l),i.val(a+l).change())}n(i,o),r(i.val())}function r(t){var e=$("#gift_quantity"),n=$(".gift-new__start-price"),i=$(".gift-new__final-price"),o=$(".gift-new__discount-price"),r=+t*a;if(e.val(a),n.text(t),i.text(r),a>2){var s=r-10*r/100;o.text(s),i.addClass("gift-new__discount-price--del"),o.removeClass("hide")}else i.removeClass("gift-new__discount-price--del"),o.addClass("hide")}var a=2,s="gift-new__progressbar";document.addEventListener("DOMContentLoaded",(function(){if(document.getElementById("new_gift")){var t=debounce(i,2e3),e=debounce(i,100),n=debounce(o,100);"\u0421\u0432\u043e\u0439 \u0434\u0438\u0437\u0430\u0439\u043d"===$("#gift_gift_style_id").find("option:selected").text()?$("#gift_custom_block").show():$("#gift_custom_block").hide(),$("#gift_gift_style_id").on("change paste keyup",(function(){"\u0421\u0432\u043e\u0439 \u0434\u0438\u0437\u0430\u0439\u043d"===$("#gift_gift_style_id").find("option:selected").text()?($("#gift_custom_block").show(),$("#gift_image").val()?e():$("#gift_preview").hide()):($("#gift_custom_block").hide(),e())})),$("#download_template").on("click",(function(t){t.preventDefault(),window.open("https://mir-kvestov.ru/images/gift_template.png")})),$("#new_gift").on("change","#gift_image",(function(){$("#gift_image_presence_error").hide(),this.files[0].size/1024/1024<10?($("#gift_image_size_error").hide(),e()):$("#gift_image_size_error").show()})),$("#gift_client_comment").on("change paste keyup",(function(){t()})),$("#gift_show_custom_message").on("change",(function(){$comment=$("#gift_client_comment"),this.checked?$comment.prop("disabled",!0):$comment.prop("disabled",!1),e()})),e(),$('[data-action="udpate-gift-price"]').on("click change paste keyup",(function(e){n(this,e),t()})),$("#gift_price").on("paste keyup",(function(e){t(),n(this,e)})),$("#new_gift").submit((function(){$submit=$(this).find("input[type='submit']"),$submit.attr("disabled","disabled"),$submit.attr("value","\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430...")})),$("#gift_multiple").on("change",(function(t){var e=$("input[name='gift[gift_price]']"),n=$(".gift-new__ticket-quantity"),i=$(".gift-new__ticket-count");t.target.checked?(a=2,i.text(a),n.removeClass("hide")):(n.addClass("hide"),a=null),r(e.val())})),$('[data-action="udpate-gift-count"]').on("click",(function(t){var e=t.target.dataset.type,n=$(".gift-new__ticket-count"),i=$(".gift-new__start-price");"plus"===e?(a++,r(+i.text())):"minus"===e&&a>2&&(a--,r(+i.text())),n.text(a)}))}}))}(),document.addEventListener("DOMContentLoaded",(function(){$("#filter-quests-for-gifts-form").submit((function(){$(".rating-table-1").empty(),$(".section-btn-1").remove(),$(".loader").show();var t=new SmoothScroll,e=document.querySelector("#quests");t.animateScroll(e,null,{offset:100})}))})),document.addEventListener("DOMContentLoaded",(function(){$("#gift_show_custom_message").on("change",(function(){$(this).is(":checked")?($(".client-comment-wrapper").show(),$("#gift_client_comment").prop("disabled",!1)):($(".client-comment-wrapper").hide(),$("#gift_client_comment").prop("disabled",!0))})),$("#gift_send_to_recipient").on("change",(function(){$(this).is(":checked")?($(".send-recipient-wrapper").show(),$("#gift_recipient_send_email").prop("disabled",!1),$("#recipient_send_name").prop("required",!0),$("#gift_recipient_send_email").prop("required",!0)):($(".send-recipient-wrapper").hide(),$("#gift_recipient_send_email").prop("disabled",!0),$("#recipient_send_name").prop("required",!1),$("#gift_recipient_send_email").prop("required",!1))})),$('input[type=radio][name="gift[recipient_send_mode]"]').change((function(){"now"===this.value?($(".send-datetime").hide(),$("#gift_recipient_send_date").prop("required",!1),$("#gift_recipient_send_time").prop("required",!1)):"later"===this.value&&($(".send-datetime").show(),$("#gift_recipient_send_date").prop("required",!0),$("#gift_recipient_send_time").prop("required",!0))}))})),document.addEventListener("DOMContentLoaded",(function(){$price=$("#js-variant-price"),step=parseInt($price.data("step")),$link=$price.parent().siblings(".gift-variant__btn"),$link.click((function(t){$price.is(":empty")||(t.preventDefault(),window.location.href=$(this).attr("href")+"&price="+$price.text())})),$("#js-decrement-variant-price").click((function(){priceInt=parseInt($price.text()),$price.is(":empty")?$price.html($price.data("default-price")):!isNaN(priceInt)&&priceInt>0&&(priceToSet=priceInt-step,priceToSet<0&&(priceToSet=0),$price.text(priceToSet))})),$("#js-increment-variant-price").click((function(){priceInt=parseInt($price.text()),$price.is(":empty")?$price.html($price.data("default-price")):isNaN(priceInt)||(priceToSet=priceInt+step,$price.text(priceToSet))}))})),document.addEventListener("DOMContentLoaded",(function(){$('body[data-page="gifts-cities"]').find(".js-city-filter").on("input",(function(){var t=$(".city");t.hide();var e=$(this).val();t.each((function(){$(this).text().toLowerCase().match(e.toLowerCase())&&$(this).show()}))}))})),function(){function t(t){$.ajax({type:"GET",url:"/compare",dataType:"script",data:{quest_ids:JSON.stringify(t)}})}$(".js-compare-page").length>0&&t(getAryFromLocalStorage(QUESTS_TO_COMPARE_IDS));$(".js-remove-all-compared").click((function(){localStorage.removeItem(QUESTS_TO_COMPARE_IDS)}))}(),function(){function t(){var t=getAryFromLocalStorage(QUESTS_TO_COMPARE_IDS);0==t.length?(r.parent().hide(),a.hide()):(r.parent().show(),r.text(t.length),a.show())}var e=$(".js-quest-compare-btn"),n=$(".js-compare-popup"),i=$(".js-compare-close"),o=$(".js-compare-txt"),r=$(".js-compare-number"),a=$(".js-compare-btn"),s=getAryFromLocalStorage(QUESTS_TO_COMPARE_IDS);e.each((function(){s.includes($(this).data("id"))&&$(this).addClass("active")})),e.on("click",(function(){var e=$(this).data("id");if((s=getAryFromLocalStorage(QUESTS_TO_COMPARE_IDS)).includes(e)){s=s.filter((function(t){return t!==e})),$(this).removeClass("active");var i="";i="\u044d\u043a\u0448\u043d-\u0438\u0433\u0440\u0430"===$(this).data("type").toLowerCase()||"\u043a\u0432\u0438\u0437\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f"===$(this).data("type").toLowerCase()||"\u043a\u0432\u0435\u0441\u0442-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f"===$(this).data("type").toLowerCase()?" \u0443\u0434\u0430\u043b\u0435\u043d\u0430":" \u0443\u0434\u0430\u043b\u0435\u043d"
;var r=$(this).data("type")+" \xab"+$(this).data("name")+"\xbb "+i+" \u0438\u0437 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f"}else{s.push(e),$(this).addClass("active");i="";i="\u044d\u043a\u0448\u043d-\u0438\u0433\u0440\u0430"===$(this).data("type").toLowerCase()||"\u043a\u0432\u0438\u0437\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f"===$(this).data("type").toLowerCase()||"\u043a\u0432\u0435\u0441\u0442-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f"===$(this).data("type").toLowerCase()?" \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430":" \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d";r=$(this).data("type")+" \xab"+$(this).data("name")+"\xbb "+i+" \u043a \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e"}localStorage.setItem(QUESTS_TO_COMPARE_IDS,JSON.stringify(s)),n.addClass("active"),o.text(r),t()})),i.on("click",(function(){n.removeClass("active")}))}();const toggle=(t,e)=>t?.classList?.toggle(e),selector=(t,e)=>t?.querySelector(e),createElem=(t,e)=>{const n=document.createElement(t);return e&&n.classList.add(e),n},createJoinedFilter=(t,e,n)=>{const i=e?" "+e:"",o=createElem("div","search-form__filters-joined-item"),r=createElem("div");r.innerText=(t+i).toLowerCase();const a=createElem("div","search-form__filters-joined-item-remove");return a.classList.add("js-filter-joined-remove"),o.appendChild(r),o.appendChild(a),o.dataset.id=n,o},filterSelector=t=>({header:selector(t,".js-filter-open"),content:selector(t,".js-filter-content"),chevron:selector(t,".js-filter-chevron"),resetBtn:selector(t,".js-filter-reset"),moreBtn:selector(t,".js-filter-more")}),toggleShowMoreItems=(t,e)=>{t.forEach((t=>{const n=t.querySelectorAll(".js-filter-item"),i=+t.dataset.maxlength;n.forEach(((t,n)=>{if(e)t.style.display="flex";else{const e=n+1>i;t.style.display=e?"none":"flex"}}))}))},hideFilterItems=(t,e,n,i)=>{t.classList.remove("filters__wrapper--expanded"),e.classList.add("display-none"),n.classList.add("filters__header--white"),i.classList.add("filters__header-chevron--white")},filterBlocks=document.querySelectorAll(".js-filter"),joinedItems=document.querySelectorAll(".search-form__filters-joined-item"),filters=document.querySelectorAll(".js-filter-content");let prevHeader="",prevItem={};const stopPropagation=()=>{document.addEventListener("click",(()=>{filterBlocks.forEach((t=>{const{header:e,content:n,chevron:i}=filterSelector(t);hideFilterItems(t,n,e,i)}))}));const t=document.querySelector(".search-form__filters");t&&t.addEventListener("click",(t=>t.stopPropagation()))};filterBlocks.forEach((t=>{const{header:e,content:n,chevron:i,resetBtn:o,moreBtn:r}=filterSelector(t),a=n.querySelectorAll(".js-filter-tooltip")||null,s=n.querySelectorAll(".js-filter-block");toggleShowMoreItems(s),e.addEventListener("click",(()=>{prevHeader&&e.innerText!==prevHeader&&hideFilterItems(prevItem.block,prevItem.content,prevItem.header,prevItem.chevron),toggle(t,"filters__wrapper--expanded"),toggle(n,"display-none"),toggle(e,"filters__header--white"),toggle(i,"filters__header-chevron--white"),prevItem={block:t,content:n,header:e,chevron:i},prevHeader=e.innerText})),r&&r.addEventListener("click",(()=>{const t="hidden"===r.dataset.moreItems;toggleShowMoreItems(s,t),r.innerText=t?"\u0421\u043a\u0440\u044b\u0442\u044c":"\u0415\u0449\u0435",r.dataset.moreItems=t?"showed":"hidden"})),o&&o.addEventListener("click",(()=>{t.querySelectorAll(".js-filter-checkbox").forEach((t=>{const e=document.querySelector(`.search-form__filters-joined-item[data-id="${t.id}"]`);e&&t.value&&e.remove(),t.checked=!1}))})),a&&a.forEach((t=>{const e=t.querySelector(".filters__tooltip");t.addEventListener("click",(()=>{toggle(e,"display-none")}))}))}));const changeJoinedFilters=()=>{const t=selector(document,".js-filter-joined"),e=document.querySelectorAll(".js-filter-checkbox"),n=document.querySelector(".filters__select");e.forEach((e=>{e.addEventListener("change",(n=>{const i=n.target.checked,o=e.id;e.checked=i;const r=document.querySelector(`.search-form__filters-joined-item[data-id="${o}"]`),a=r&&r.dataset.id===o;if(i&&!a){const n=e.dataset.joinedSublabel||"",i=e.parentNode.querySelector(".filters__main-checkbox-label"),r=createJoinedFilter(i.innerText,n,o);t.appendChild(r)}else r.remove()}))})),t&&t.addEventListener("click",(t=>{t.stopPropagation();const e=t.target,i=e.classList.contains("js-filter-joined-remove");if(e.classList.contains("js-filter-joined-remove--date")||!i)return;const o=e.parentNode,r=o.dataset.id;if(n.value||!r)return n.value="",void o.remove();const a=document.getElementById(r);"INPUT"===a?.tagName&&(a.checked=!1,o.remove())})),null!=n&&n.addEventListener("change",(e=>{const i=n.options[n.selectedIndex].innerHTML,o=e.target.value;[...document.querySelectorAll(".search-form__filters-joined-item")].forEach((t=>{n.innerText.includes(t.innerText)&&t.remove()}));const r=createJoinedFilter(i,null,o);o&&t.appendChild(r)}))},createTabs=()=>{const t=document.querySelectorAll(".js-filter-tab");t&&t.forEach((t=>{t.addEventListener("click",(()=>{const e=t.nextSibling;toggle(e,"display-none")}))}))};changeJoinedFilters(),createTabs(),stopPropagation();const createDefaultCalendarDates=()=>{const t=document.querySelector(".search-form");return(t.dataset?.dates?JSON.parse(t.dataset.dates):[]).map((t=>{const[e,n,i]=t.split("-");return{date:new Date(e,n,i),data:{day:i,month:n,year:e}}}))},createParsedDate=t=>`${t.year}-${t.month}-${t.day}`,createJoinedFilterCalendar=(t,e,n)=>{const i=e?" "+e:"",o=createElem("div","search-form__filters-joined-item"),r=createElem("div");r.innerText=t+i;const a=createElem("div","search-form__filters-joined-item-remove");return a.classList.add("js-filter-joined-remove"),a.classList.add("js-filter-joined-remove--date"),o.appendChild(r),o.appendChild(a),o.dataset.id=n,o},MonthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],DayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],StartOfWeek={"ru-RU":1},Events={DATE_SELECTED:"dateSelected"},ClassNames={BTN:"calendar__btn",BTN_DISABLED:"calendar__btn_disabled",BTN_PREV:"calendar__btn_prev",BTN_NEXT:"calendar__btn_next",HEADER:"calendar__header",MONTH:"calendar__month",ROOT:"calendar",TABLE:"calendar__table",TABLE_BODY:"calendar__table-body",TABLE_CELL:"calendar__table-cell",TABLE_CELL_DISABLED:"calendar__table-cell_disabled",TABLE_CELL_SELECTED:"calendar__table-cell_selected",TABLE_COL_HEADER:"calendar__table-col-header",TABLE_HEAD:"calendar__table-head",TABLE_ROW:"calendar__table-row",YEAR:"calendar__year"},Defaults={minDate:new Date(-864e13),maxDate:new Date(864e13)};class Calendar{constructor(t,{minDate:e,maxDate:n,selectedDate:i}){this._root=t,this._minDate=e||Defaults.minDate,this._maxDate=n||Defaults.maxDate,this._localize(),this._createUi(),this.setDate(i||new Date,!0),this.dates=[]}updateDateArray(t,e){const n=createParsedDate(e),i=this.dates.findIndex((t=>createParsedDate(t.data)===n)),o=i>=0;if(o){this.dates=this.dates.filter(((t,e)=>e!==i));document.querySelector(`.search-form__filters-joined-item[data-id="${n}"]`).remove()}else{this.dates=[...this.dates,{date:t,data:e}];const i=createJoinedFilterCalendar(n,"",n);document.querySelector(".js-filter-joined").append(i)}const r=document.querySelector(".filters__calendar-inputs");r.innerHTML="";const a=t=>{const e=document.createElement("input");e.setAttribute("id",t),e.setAttribute("value",t),e.name="date[]",e.classList.add("display-none"),r.append(e)};return this.dates.map((t=>a(`${t.data.year}-${t.data.month}-${t.data.day}`))),o}updateSelectedDateUi(t){const e=this.dates||[],{date:n,month:i,year:o}=t.dataset;e.findIndex((t=>{const{day:e,month:r,year:a}=t.data;return+e==+n&&+r==+i&&+a==+o}))>=0&&t.classList.add(ClassNames.TABLE_CELL_SELECTED)}setDate(t){t.getTime()<this._minDate.getTime()||t.getTime()>this._maxDate.getTime()||(this._selectedDate=t,this.reset())}reset(){this._month=this._selectedDate.getMonth(),this._year=this._selectedDate.getFullYear(),this._updateUi()}prevMonth(){this._isMinMonth()||(--this._month<0&&(this._month+=12,this._year--),this._updateUi())}nextMonth(){this._isMaxMonth()||(++this._month>=12&&(this._month-=12,this._year++),this._updateUi())}_localize(t){t=t||navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage;const e=new Date;e.setDate(e.getDate()-e.getDay()),this._dayNames=DayNames.map(((e,n)=>{const i=new Date;return i.setDate(i.getDate()-i.getDay()+n),i.toLocaleString(t,{weekday:"short"})||e})),this._monthNames=MonthNames.map(((e,n)=>{const i=new Date;return i.setMonth(n),i.toLocaleString(t,{month:"long"})||e})),this._startOfWeek=StartOfWeek[t]||0}_createUi(){this._root.classList.add(ClassNames.ROOT);const t=document.createElement("div");t.className=ClassNames.HEADER,this._monthElem=document.createElement("span"),this._monthElem.className=ClassNames.MONTH,t.appendChild(this._monthElem),t.appendChild(document.createTextNode(" ")),this._yearElem=document.createElement("span"),this._yearElem.className=ClassNames.YEAR,t.appendChild(this._yearElem),this._prevBtn=document.createElement("div"),this._prevBtn.classList.add(ClassNames.BTN,ClassNames.BTN_PREV),this._prevBtn.addEventListener("click",(()=>{this.prevMonth()})),t.appendChild(this._prevBtn),this._nextBtn=document.createElement("div"),this._nextBtn.classList.add(ClassNames.BTN,ClassNames.BTN_NEXT),this._nextBtn.addEventListener("click",(()=>{this.nextMonth()})),t.appendChild(this._nextBtn),this._root.appendChild(t);const e=document.createElement("table");e.className=ClassNames.TABLE;const n=document.createElement("thead");n.className=ClassNames.TABLE_HEAD;const i=document.createElement("tr");i.className=ClassNames.TABLE_ROW;for(let t=0;t<7;t++){const e=this._dayNames[(t+this._startOfWeek)%7],n=document.createElement("th");n.scope="col",n.className=ClassNames.TABLE_COL_HEADER,n.textContent=e,i.appendChild(n)}n.appendChild(i),e.appendChild(n),this._tableBody=document.createElement("tbody"),this._tableBody.className=ClassNames.TABLE_BODY,this._tableBody.addEventListener("click",(t=>{const e=t.target;if(e.classList.contains(ClassNames.TABLE_CELL)&&e.dataset.date){const t=new Date(this._year,this._month,e.dataset.date),n=this.updateDateArray(t,{day:String(e.dataset.date).padStart(2,"0"),month:String(this._month+1).padStart(2,"0"),year:this._year});e.classList[n?"remove":"add"](ClassNames.TABLE_CELL_SELECTED)}})),e.appendChild(this._tableBody),this._root.appendChild(e)}_updateUi(){this._monthElem.textContent=this._monthNames[this._month],this._yearElem.textContent=this._year,this._isMinMonth()?this._prevBtn.classList.add(ClassNames.BTN_DISABLED):this._prevBtn.classList.remove(ClassNames.BTN_DISABLED),this._isMaxMonth()?this._nextBtn.classList.add(ClassNames.BTN_DISABLED):this._nextBtn.classList.remove(ClassNames.BTN_DISABLED),this._tableBody.innerHTML="";const t=new Date(this._year,this._month,1);t.setDate(1-(t.getDay()+7-this._startOfWeek)%7);do{const e=document.createElement("tr");for(let n=0;n<7;n++){const n=document.createElement("td");n.classList.add(ClassNames.TABLE_CELL),t.getMonth()==this._month&&(n.textContent=t.getDate(),this._minDate.getTime()<=t.getTime()&&this._maxDate.getTime()>=t.getTime()?(n.dataset.date=String(t.getDate()).padStart(2,"0"),n.dataset.month=String(t.getMonth()+1).padStart(2,"0"),n.dataset.year=t.getFullYear(),t.getTime(),new Date(this._selectedDate.getFullYear(),this._selectedDate.getMonth(),this._selectedDate.getDate()).getTime()):n.classList.add(ClassNames.TABLE_CELL_DISABLED)),this.updateSelectedDateUi(n),e.appendChild(n),t.setDate(t.getDate()+1)}this._tableBody.appendChild(e)}while(t.getMonth()==this._month)}_isMinMonth(){return this._month==this._minDate.getMonth()&&this._year==this._minDate.getFullYear()}_isMaxMonth(){return this._month==this._maxDate.getMonth()&&this._year==this._maxDate.getFullYear()}_initJoinedItemsListener(){selector(document,".js-filter-joined").addEventListener("click",(t=>{t.stopPropagation();const e=t.target,n=e.classList.contains("js-filter-joined-remove"),i=e.classList.contains("js-filter-joined-remove--date"),o=e.parentNode,r=o.dataset.id;if(!i||!n)return;const[a,s,l]=r.split("-"),c=new Date(a,+s-1,l);this.updateDateArray(c,{day:l,month:s,year:a});[...document.querySelectorAll(".calendar__table-cell")].find((t=>{const{date:e,month:n,year:i}=t.dataset;return l===e&&n===s&&i===a})).classList.remove("calendar__table-cell_selected"),o.remove()}))}}const calendarElem=document.getElementById("calendar");if(null!=calendarElem){const t=new Date,e=new Calendar(calendarElem,{minDate:new Date(t.getFullYear(),t.getMonth(),t.getDate()),maxDate:new Date(t.getFullYear()+1,t.getMonth(),t.getDate())});calendarElem.addEventListener(Events.DATE_SELECTED,(t=>{e.setDate(t.detail.date)}));const n=createDefaultCalendarDates();n?.length&&n.forEach((t=>e.updateDateArray(t.date,t.data))),e._updateUi(),e._initJoinedItemsListener()}document.addEventListener("DOMContentLoaded",(function(){$("#modal-coupon-2nd-part").modal("show")})),window.current_locale=function(){return window.location.href.indexOf("lang=en")>0?"en":"ru"},function(){function t(){return extract_page_data("country-phone-format")}function e(){return extract_page_data("country")}function n(){"+8"===this.value.substr(0,2)&&(this.value=this.value.replace("+8","+7")),"+7"!==this.value.substr(0,2)&&(this.value=this.value.replace("+","+7"))}function i(t){if(!t)throw new Error("phone format not passed");$('[data-autoformat="phone"]').mask(t)}function o(t){if(!t)throw new Error("Country not passed");"\u0420\u043e\u0441\u0441\u0438\u044f"===t&&$(document).on("input",'[data-autoformat="phone"]',n)}document.addEventListener("DOMContentLoaded",(function(){"en"!==current_locale()&&(i(t()),o(e()))}))}(),document.addEventListener("DOMContentLoaded",(function(){$('button[data-action="toggle-password"]').on("mousedown",(function(t){var e=$("#user_password"),n=$(this);"text"==e.attr("type")?(e.attr("type","password"),n.html('<i class="fa fa-eye fa-lg"></i>')):(e.attr("type","text"),n.html('<i class="fa fa-eye-slash fa-lg"></i>')),t.preventDefault()})),$(".profile_status[data-link]").on("click",(function(){window.location=$(this).data("link")}))})),function(){function t(){return document.querySelector('[name="sort"]:checked').value}function e(){"geolocation"in navigator?navigator.geolocation.getCurrentPosition(o,i):alert("\u0412\u0430\u0448 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u044e")}function n(){document.getElementById("sort_distance").disabled=!0}function i(t){1==t.code&&alert("\u041f\u043e\u0445\u043e\u0436\u0435, \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u0430 \u0432\xa0\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u043d\u043e\u0432\u0430, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443."),document.getElementById("sort_default").checked=!0,n()}function o(t){r(t.coords.latitude,t.coords.longitude)}function r(t,e){const n=document.querySelector('[name="latitude"]'),i=document.querySelector('[name="longitude"]');n&&i&&(n.value=t,i.value=e)}document.addEventListener("DOMContentLoaded",(function(){if($("#js-form-uncollapser").click((function(){$("#js-quest-search-form").removeClass("collapsed"),$(this).addClass("hidden")})),document.getElementById("js-quest-search-form")){"geolocation"in navigator||n(),$('[name="sort"]').change((function(){"distance"===t()?e():r(null,null)})),$('input[name="date"]').datepicker({autoclose:!0,language:"ru",format:"dd.mm.yyyy",startDate:"0d"});var i=$('meta[name="currency"]').attr("content"),o=$(".quest-search #max_price");o.ionRangeSlider({grid:!0,min:o.data("min"),max:o.data("max"),postfix:i[0].innerHTML,from:o.data("min-sel"),to:o.data("max-sel")});var a=$("#search-form"),s=$("#search-results"),l=s.find(".quests"),c=a.find("button.btn.btn-primary");a.on("ajax:beforeSend",(function(){c.html('<i class="fa fa-clock-o"></i>'),$(this).find("input, button, select").attr("disabled",!0),l.slideUp(100,(function(){s.find(".loader").slideDown(150)})),$("html, body").animate({scrollTop:l.offset().top-200},500)})),a.on("ajax:complete",(function(){c.html("\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c"),$(this).find("input,button, select").removeAttr("disabled"),s.find(".loader").slideUp(100,(function(){l.slideDown(150)})),$("img.lazyload").lazyload({threshold:1e3})})),$(document).on("click","#display-map-new",(function(t){$(this).hasClass("active")||(a.append('<input type="hidden" name="display" value="map" />'),$(".sort__search-wrap").hide(),$(".filters__search-button-container").trigger("click")),t.preventDefault()})),$(document).on("click","#display-list-new",(function(t){if(!$(this).hasClass("active")){var e=a.find('input[type="hidden"][name="display"]');e.length&&e.remove(),$(".sort__search-wrap").show(),$(".filters__search-button-container").trigger("click")}$("img.lazyload").lazyload({threshold:1e3}),t.preventDefault()})),$(document).on("click","#search-load-more",(function(t){var e=$(this);if(!e.hasClass("disabled")){var n=l.find("ul"),i=parseInt(e.data("page")),o=parseInt(e.data("max-page"));i+=1,$.ajax({method:"GET",url:e.data("href")+"&page="+i,dataType:"json",beforeSend:function(){$(this).find("input, button, select").attr("disabled",!0),e.slideUp(100,(function(){s.find(".loader").slideDown(150)}))},complete:function(){e.removeClass("disabled"),s.find(".loader").slideUp(100,(function(){i<o&&e.slideDown(150)}))},success:function(t){e.data("page",i),t&&$.each(t,(function(t,e){n.append(e.content)})),$("img.lazyload").lazyload({threshold:1e3})},error:function(t,e){alert(e)}})}t.preventDefault()}))}}))}(),function(){function t(t){return t.filter((function(t){return""!==t.value}))}function e(t){return t.replace("utf8=\u2713","").replace("utf8=%E2%9C%93","").replace("&search_in_additional_quests=false&search_in_additional_quests=true","&search_in_additional_quests=true").replace("&search_in_additional_quests=true&search_in_additional_quests=false","&search_in_additional_quests=true").replace("&hide_visited_quests=true","").replace(/^\&/,"")}function n(t){return t.map((function(t){return i(t)})).join("&")}function i(t){return[t.name,t.value].join("=")}function o(t){return $(t).serializeArray()}function r(){return window.location.protocol+"//"+window.location.host+window.location.pathname}function a(i){var a=e(n(t(o(i))));return[r(),"?",a].join("").replace(/\?$/,"")}window.update_share_search_URL_with_form_state=function(){var t=document.getElementById("search-form"),e=document.getElementById("search_share_link");t&&e&&setTimeout((function(){console.log("Replacing"),e.value=a(t)}),1500)},document.addEventListener("DOMContentLoaded",(function(){update_share_search_URL_with_form_state()}))}(),$(document).ready((function(){function t(){g={},$("#quest-search-master-modal").find("input[type=checkbox]").prop("checked",!1)}function e(){let t;return t="type"in g?"quest"==g.type?$("#quest-search-master-modal").find(".quest-tab"):$("#quest-search-master-modal").find(".performance-tab"):$("#quest-search-master-modal").find(".quest-tab.performance-tab"),t}function n(t){let n=e();$(n[t]).show()}function i(t){let n=e();$(n[t]).hide()}function o(t){t>5||t<1?$(".progress-wrapper").addClass("invisible"):$(".progress-wrapper").removeClass("invisible"),$("#quest-search-master-modal").find("progress").val(t),$(".progress-1__tooltip").text(t+"/5")}function r(t){console.log(t),t>1&&$(".next").removeClass("invisible"),t>1&&$(".prev").removeClass("invisible"),(t>5||t<=1)&&$(".next").addClass("invisible"),t<=1&&$(".prev").addClass("invisible")}function a(t,e){g[t]=e}function s(t){const e=t.data("eventname");dataLayer.push({event:e})}function l(t,e,n){const i=t.data("submiteventname");dataLayer.push({event:i,question:e,answer:n})}function c(){i(v),n(v+=1),o(v),r(v),s($(".tab:visible")),console.log(g)}function u(){i(v),1==(v-=1)&&t(),n(v),o(v),r(v),s($(".tab:visible"))}function d(t){t.data("key")&&t.data("value")&&(a(t.data("key"),t.data("value")),l($(".tab:visible"),t.data("key"),t.data("value"))),c()}function h(t){const e=t.parents(".tab");e.find(".choices").each((function(){const t=$(this).data("key");g[t]=[],$(this).find('input[type="checkbox"]:checked').each((function(){g[t].push($(this).val())})),l(e,$(this).data("key"),g[t])})),c()}function p(t){const e=t.parents(".tab");e.find("select").each((function(){const t=$(this).data("key");g[t]=$(this).val(),l(e,$(this).data("key"),g[t])})),c()}function f(t){return Math.floor(Math.random()*t)}function m(t){let e="/quests/search";return e+=-1==e.indexOf("?")?"?":"&","quest"==t.type?e+="quest_types[]=1":e+="quest_types[]=2&quest_types[]=6","difficulty"in t&&(e+="&levels[]="+t.difficulty),"categories"in t&&t.categories.forEach((function(t){e+="&category[]="+t})),"ages"in t&&("parents"in t&&t.parents.length>0?t.ages.forEach((function(t){e+="&min_ages[]=supervised-"+t})):t.ages.forEach((function(t){e+="&min_ages[]=alone-"+t}))),"scary_level"in t&&(e+="&scary_levels[]="+t.scary_level),"date"in t&&(e+="&date="+t.date),"time"in t&&(e+="&time="+t.time),e}if(new URLSearchParams(window.location.search).get("show_master")){var g={},v=0;n(v),$("#quest-search-master-modal").modal("show");const t=f(3),e=$("#types");e.find("h2").text(e.find("h2").data("question")[t]),e.find(".quest").text(e.find(".quest").data("answer")[t]),e.find(".performance").text(e.find(".performance").data("answer")[t]);const i=f(3),o=$("#difficulty");o.find("h2").text(o.find("h2").data("question")[i]),o.find(".easy").text(o.find(".easy").data("answer")[i]),o.find(".moderate").text(o.find(".moderate").data("answer")[i]),o.find(".hard").text(o.find(".hard").data("answer")[i]);const r=$("#scary"),a=f(3);r.find("h2").text(r.find("h2").data("question")[a]),r.find(".low").text(r.find(".low").data("answer")[a]),r.find(".moderate").text(r.find(".moderate").data("answer")[a]),r.find(".hight").text(r.find(".hight").data("answer")[a]);const s=f(3),l=$("#categories-quest");l.find("h2").text(l.find("h2").data("question")[s]),l.find(".choice").find(".label-txt").each((function(){$(this).text($(this).siblings("input").data("answer")[s])}));const y=f(3),_=$("#categories-performance");_.find("h2").text(_.find("h2").data("question")[y]),_.find(".choice").find(".label-txt").each((function(){$(this).text($(this).siblings("input").data("answer")[y])})),dataLayer.push({event:"showSmartSearchIntro"}),$(".submit-current-tab").on("click",(function(){d($(this))})),$(".submit-checkboxes").on("click",(function(){h($(this))})),$(".submit-selects").on("click",(function(){p($(this))})),$(".tab").find('input[type="checkbox"]').change((function(){$(this).parents(".tab").find(".ready").removeClass("invisible")})),$(".tab").find("select").change((function(){$(this).parents(".tab").find(".ready").removeClass("invisible")})),$(".next").on("click",(function(){c()})),$(".prev").on("click",(function(){u()}));$("#finish").find("button").on("click",(function(){const t=m(g);window.location.href=t}))}})),document.addEventListener("DOMContentLoaded",(function(){$(".quest-tile-1").click((function(t){if("A"==t.target.tagName||"SPAN"==t.target.tagName){var e=this.dataset.position;e&&dataLayer.push({event:"clickOnQuestTile",quest_tile_position:e})}}))})),function(){window.map_libs_loaded=!1;var t=document.getElementById("js-quest-map-spinner"),e=document.querySelector(".quest-map");document.addEventListener("DOMContentLoaded",(function(){var n=document.getElementById("show-map");n&&(url=new URL(window.location.href),url.searchParams.has("show-map")&&setTimeout((function(){$(n).click(),scroll_to("#contacts")}),1e3),url.searchParams.has("show-route")&&setTimeout((function(){$("#show-route-video").click(),scroll_to("#contacts")}),1e3),$(n).click((function(i){if(i.preventDefault(),this.blur(),$(e).is(":visible"))n.textContent=n.dataset.before,e.style.display="none";else{if(n.textContent=n.dataset.after,window.map_libs_loaded)return void(e.style.display="block");t.style.display="block",tryToRenderAppropriateMap((function(){window.map_libs_loaded=!0,setTimeout((function(){t.style.display="none",e.style.display="block"}),1e3)}))}})))}))}(),function(){function t(t){var e=t.closest(".modal");if(!e)throw new Error("Modal for this button could not be found");return e}function e(t){var e=t.dataset.reviewId;if(!e)throw new Error("Review id could not be extracted from the button");return e}function n(t){document.getElementById(t).classList.add("review-1--highlighted")}$(document).on("click",'[data-action="close-modal-scroll-to-review"]',(function(){var i=t(this),o=e(this);$(i).modal("hide"),n(o),scroll_to("#"+o)}))}();const toggleFavorite=(t,e)=>{const n=e.target,i=`/quests/${t}/favorite`;$.ajax(i,{dataType:"json",type:"POST",success:function(){n.classList.add("clicked"),setTimeout((()=>{n.classList.remove("clicked")}),150),n.classList.contains("fa-heart")?(n.classList.remove("fa-heart"),n.classList.add("fa-heart-o")):(n.classList.remove("fa-heart-o"),n.classList.add("fa-heart"))},error:function(t){401===t.status&&(createCookie("location",window.location.href),createCookie("scrollYPosition",window.scrollY),$("#loginmodalWindow").modal("show"))}})};document.addEventListener("DOMContentLoaded",(t=>{document.body.addEventListener("click",(e=>{if(e.target.classList.contains("fa-heart")||e.target.classList.contains("fa-heart-o")){t.preventDefault();const n=e.target.closest(".favorite").dataset.id;toggleFavorite(n,e)}}))})),window.addEventListener("load",(function(){const t=readCookie("location"),e=parseInt(readCookie("scrollYPosition"));t===window.location.href&&e&&(window.scrollTo(0,e),eraseCookie("location"),eraseCookie("scrollYPosition"))})),function(){function t(t){if(t.target.value.length>2){c.show(),s.empty();var i={sq:t.target.value};$.ajax({type:"GET",url:d,dataType:"json",contentType:"application/json",data:i,success:function(t){s.removeClass("hidden"),l.removeClass("hidden"),t.length?(s.empty(),t.forEach((function(t){s.append(e(t)),a.show()}))):(s.empty().append(n("div","\u041f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e","search-modal__results-empty",!1)),a.show(),u.show()),c.hide(),u.show()}})}else s.empty(),s.addClass("hidden"),l.addClass("hidden"),a.hide(),u.hide()}function e(t){var e=n("a",!1,"search-modal__item",["href",t.url]),i=n("div",!1,"search-modal__item-content"),o=n("div",!1,"search-modal__item-banner-wrapper"),r=n("img",!1,"search-modal__item-banner",["src",t.image_url]);o.append(r);var a=n("div",t.name,"search-modal__item-title");i.append(a);var s=n("div",t.company_text,"search-modal__item-category");i.append(s);var l=n("div",!1,"search-modal__item-type"),c=n("img",!1,"search-modal__item-type-icon",["src",t.quest_type_icon]),u=n("div",t.quest_type_name,"search-modal__item-type-text");if(l.append(c),l.append(u),i.append(l),t.is_closed){var d=n("div",!1,"search-modal__item-banner-closed"),h=n("div","\u041a\u0432\u0435\u0441\u0442 \u0437\u0430\u043a\u0440\u044b\u0442","search-modal__item-banner-closed-text"),p=n("img",!1,!1,["src",$(".search-modal").data("closed-img")]);d.append(p),d.append(h),o.append(d),$(e).addClass("closed")}return e.append(o),e.append(i),e}function n(t,e,n,i){var o=document.createElement(t);return n&&o.classList.add(n),e&&(o.innerHTML=e),i&&o.setAttribute(i[0],i[1]),o}var i=$(".super-navbar__search"),o=i.find(".super-navbar__search-input"),r=i.find(".super-navbar__search-label"),a=i.find(".search-modal"),s=i.find(".search-modal__content"),l=i.find(".search-modal__search-btn-block"),c=i.find(".super-navbar__search-loading"),u=i.find(".super-navbar__search-close"),d="/quests/search_preview";$(document).on("keydown","form",(function(t){return"Enter"!=t.key})),o.on("input",(function(e){t(e)})),u.on("click",(function(){s.empty(),a.hide(),u.hide(),o.val(""),i.removeClass("focused")})),r.on("click",(function(){i.hasClass("focused")||(i.addClass("focused"),s.children().length&&setTimeout((function(){a.show(),u.show()}),500))})),$(document).on("click",(function(t){$(t.target).closest(i).length||$(t.target).is(i)||!i.hasClass("focused")||(i.removeClass("focused"),a.hide(),u.hide())}))}(),function(){function t(t){var e=$("ul.quests").data("search-params"),n=new URLSearchParams(e);n.set("sort",t.value),$.ajax({url:"/quests/search?"+n.toString(),type:"GET",dataType:"script",success:function(){document.getElementById("js-sort-select-spinner").style.display="none",$("img.lazyload").lazyload({threshold:1e3})}})}function e(){"geolocation"in navigator?navigator.geolocation.getCurrentPosition(i,n):alert("\u0412\u0430\u0448 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u044e")}function n(t){document.getElementById("js-sort-select-spinner").style.display="none",a.find('input:radio[value="distance"]').attr("disabled",!0).attr("checked",""),1===t.code&&alert("\u041f\u043e\u0445\u043e\u0436\u0435, \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u0430 \u0432\xa0\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u043d\u043e\u0432\u0430, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.")}function i(t){window.location.href=o(t.coords.latitude,t.coords.longitude)}function o(t,e){var n=new URL(window.location);return n.searchParams.set("sort","distance"),n.searchParams.set("latitude",t),n.searchParams.set("longitude",e),n.href}function r(t){var e=new URL(window.location);return""===t?e.searchParams.delete("sort"):e.searchParams.set("sort",t),e.searchParams.delete("latitude"),e.searchParams.delete("longitude"),e.href}var a=$(".sort__select"),s=a.find("input:radio"),l=a.find(".sort__dropdown");document.addEventListener("DOMContentLoaded",(function(){"geolocation"in navigator||a.find('input:radio[value="distance"]').attr("disabled",!0).attr("checked",""),a.find(".sort__select-selected").on("click",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),$(this).hasClass("sort__select-selected--open")?($(this).removeClass("sort__select-selected--open"),l.slideUp()):($(this).addClass("sort__select-selected--open"),l.slideDown()),$(document).on("click",(function(){$(".sort__select-selected").hasClass("sort__select-selected--open")&&($(".sort__select-selected").removeClass("sort__select-selected--open"),l.slideUp())}))})),s.on("change",(function(){if(!$(this).is("[disabled=disabled")){document.getElementById("js-sort-select-spinner").style.display=null;var n=$(this).val();createCookie("sort_quests",n,365),a.find(".sort__select-selected").removeClass("sort__select-selected--open"),l.slideUp(),"/"==window.location.pathname||window.location.pathname.startsWith("/categories")||window.location.pathname.startsWith("/quests")?"distance"===n?e():window.location.href=r(this.value):"/quests/search"==window.location.pathname?t(this):console.log("no sort handler found")}}))}))}(),$(".corporate-form").click((function(){var t=new URL(window.location.origin);t.pathname="/gifts/corporate/new",$.getScript(t.href)}));